GuardMalloc crash in WebCore::HTMLFrameElementBase::marginHeight()
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-04-26  Brent Fulgham  <bfulgham@apple.com>
2
3         GuardMalloc crash in WebCore::HTMLFrameElementBase::marginHeight() 
4         https://bugs.webkit.org/show_bug.cgi?id=157020
5         <rdar://problem/25148315>
6
7         Reviewed by Darin Adler.
8
9         Calls to setIntegralAttribute triggers event handling code, which can cause
10         the underlying m_frameOwnerElement member to be deleted. We could clone this
11         object, but since we only want the width and height we should just read them
12         while we know the object is in a good state, then execute the potentially
13         mutating methods.
14
15         Tested by imported/blink/fast/dom/HTMLBodyElement/body-inserting-iframe-crash.html.
16
17         * html/HTMLBodyElement.cpp:
18         (WebCore::HTMLBodyElement::insertedInto): Read margin width and height before
19         calling setIntegralAttribute.
20
21 2016-04-25  Filip Pizlo  <fpizlo@apple.com>
22
23         WebCore on Mac ignores the user's preferred region (country) while getting the language
24         https://bugs.webkit.org/show_bug.cgi?id=156993
25
26         Reviewed by Geoffrey Garen.
27
28         I don't know how to test this since this depends on user settings.
29         
30         WebCore was previously getting the list of preferred languages, and for each one, deducing
31         the default region. That's wrong, since for example it doesn't respect the user's choice (in
32         System Preferences) to display dates/calenders/etc according to a different region (like how
33         I have my machine set to en-pl right now).
34         
35         It might be possible for the country code we get via kCFLocaleCountryCode to be something
36         that our ICU doesn't handle. To defend against this, we search for the resulting country
37         code in ICU's ISO countries list. If it doesn't appear in that list, we fall back on old
38         behavior.
39
40         * platform/mac/Language.mm:
41         (WebCore::httpStyleLanguageCode):
42         (WebCore::platformUserPreferredLanguages):
43
44 2016-04-26  Chris Dumez  <cdumez@apple.com>
45
46         [Web IDL] Specify default values for optional parameters of TypedArray types
47         https://bugs.webkit.org/show_bug.cgi?id=157017
48
49         Reviewed by Darin Adler.
50
51         Specify default values for optional parameters of TypedArray types and let
52         the bindings generator use WTF::Optional<> for the ones that do not have a
53         default value.
54
55         * bindings/scripts/CodeGeneratorJS.pm:
56         (CanUseWTFOptionalForParameter): Deleted.
57         * html/HTMLMediaElement.cpp:
58         (WebCore::HTMLMediaElement::webkitGenerateKeyRequest):
59         (WebCore::HTMLMediaElement::webkitAddKey):
60         (WebCore::HTMLMediaElement::webkitCancelKeyRequest): Deleted.
61         * html/HTMLMediaElement.h:
62         * html/HTMLMediaElement.idl:
63
64 2016-04-26  Chris Dumez  <cdumez@apple.com>
65
66         [Web IDL] Specify default values for optional parameters of type 'long' / 'unrestricted double'
67         https://bugs.webkit.org/show_bug.cgi?id=157012
68
69         Reviewed by Darin Adler.
70
71         Specify default values for optional parameters of type 'long' / 'unrestricted double'
72         and let the bindings generator use WTF::Optional<> for the ones that do not have a
73         default value.
74
75         * Modules/mediastream/RTCDTMFSender.cpp:
76         (WebCore::RTCDTMFSender::insertDTMF):
77         (WebCore::RTCDTMFSender::didPlayTone): Deleted.
78         * Modules/mediastream/RTCDTMFSender.h:
79         * Modules/webaudio/AudioBufferSourceNode.cpp:
80         (WebCore::AudioBufferSourceNode::start):
81         (WebCore::AudioBufferSourceNode::startPlaying): Deleted.
82         * Modules/webaudio/AudioBufferSourceNode.h:
83         * Modules/webaudio/AudioBufferSourceNode.idl:
84         * Modules/webaudio/AudioContext.cpp:
85         (WebCore::AudioContext::createDelay): Deleted.
86         * Modules/webaudio/AudioContext.h:
87         * Modules/webaudio/AudioContext.idl:
88         * Modules/webaudio/AudioScheduledSourceNode.cpp:
89         (WebCore::AudioScheduledSourceNode::start): Deleted.
90         (WebCore::AudioScheduledSourceNode::stop): Deleted.
91         * Modules/webaudio/AudioScheduledSourceNode.h:
92         * Modules/webaudio/OscillatorNode.idl:
93         * bindings/scripts/CodeGeneratorJS.pm:
94         (CanUseWTFOptionalForParameter): Deleted.
95         * bindings/scripts/test/JS/JSTestObj.cpp:
96         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
97         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
98         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
99         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
100         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
101         (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
102         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
103         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue): Deleted.
104         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString): Deleted.
105         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): Deleted.
106         (WebCore::jsTestObjConstructorFunctionClassMethod2): Deleted.
107         (WebCore::jsTestObjConstructorFunctionOverloadedMethod1): Deleted.
108         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise): Deleted.
109         * html/HTMLInputElement.idl:
110         * page/WindowTimers.idl:
111         * testing/Internals.h:
112         * testing/Internals.idl:
113
114 2016-04-26  Youenn Fablet  <youenn.fablet@crf.canon.fr>
115
116         Drop [UsePointersEvenForNonNullableObjectArguments] from SpeechSynthesis
117         https://bugs.webkit.org/show_bug.cgi?id=156901
118
119         Reviewed by Darin Adler.
120
121         SpeechSynthesis.speak will now throw in case of bad parameters instead of silently failing.
122         Started refactoring to use more references where possible.
123
124         Covered by updated test.
125
126         * Modules/speech/SpeechSynthesis.cpp:
127         (WebCore::SpeechSynthesis::startSpeakingImmediately): Refactored to get a reference.
128         (WebCore::SpeechSynthesis::speak):
129         (WebCore::SpeechSynthesis::fireEvent):
130         (WebCore::SpeechSynthesis::handleSpeakingCompleted): Removing first item in utteranceQueue unconditionally,
131         since that would crash in Debug mode otherwise.
132         (WebCore::SpeechSynthesis::boundaryEventOccurred):
133         (WebCore::SpeechSynthesis::didStartSpeaking):
134         (WebCore::SpeechSynthesis::didPauseSpeaking):
135         (WebCore::SpeechSynthesis::didResumeSpeaking):
136         (WebCore::SpeechSynthesis::didFinishSpeaking):
137         (WebCore::SpeechSynthesis::speakingErrorOccurred):
138         * Modules/speech/SpeechSynthesis.h:
139         * Modules/speech/SpeechSynthesis.idl:
140
141 2016-04-26  Youenn Fablet  <youenn.fablet@crf.canon.fr>
142
143         Drop [UsePointersEvenForNonNullableObjectArguments] from WebKitNamedFlow
144         https://bugs.webkit.org/show_bug.cgi?id=156979
145
146         Reviewed by Chris Dumez.
147
148         No change of behavior.
149
150         * dom/WebKitNamedFlow.idl: Marking contentNode parameter as nullable.
151
152 2016-04-26  Youenn Fablet  <youenn.fablet@crf.canon.fr>
153
154         Drop [UsePointersEvenForNonNullableObjectArguments] from EventTarget
155         https://bugs.webkit.org/show_bug.cgi?id=156977
156
157         Reviewed by Chris Dumez.
158
159         No change of behavior.
160
161         * dom/EventTarget.idl:
162
163 2016-04-25  Ryosuke Niwa  <rniwa@webkit.org>
164
165         Remove the build flag for template elements
166         https://bugs.webkit.org/show_bug.cgi?id=157022
167
168         Reviewed by Daniel Bates.
169
170         Removed the build flag.
171
172         * Configurations/FeatureDefines.xcconfig:
173         * DerivedSources.cpp:
174         * bindings/js/JSHTMLTemplateElementCustom.cpp:
175         (WebCore::JSHTMLTemplateElement::content):
176         * css/html.css:
177         (summary::-webkit-details-marker):
178         (template):
179         (bdi, output):
180         * dom/ContainerNode.cpp:
181         (WebCore::isInTemplateContent):
182         (WebCore::containsConsideringHostElements):
183         (WebCore::ContainerNode::parserInsertBefore):
184         (WebCore::ContainerNode::parserAppendChild):
185         * dom/Document.cpp:
186         (WebCore::Document::Document):
187         (WebCore::Document::~Document):
188         (WebCore::Document::getCachedLocale):
189         (WebCore::Document::ensureTemplateDocument):
190         (WebCore::Document::fonts):
191         * dom/Document.h:
192         (WebCore::Document::setTemplateDocumentHost):
193         (WebCore::Document::templateDocumentHost):
194         (WebCore::Document::hasDisabledFieldsetElement):
195         (WebCore::Document::textEncoding):
196         (WebCore::Document::templateDocument):
197         * dom/Element.cpp:
198         (WebCore::Element::setInnerHTML):
199         * dom/Node.cpp:
200         (WebCore::Node::containsIncludingHostElements):
201         (WebCore::Node::pseudoAwarePreviousSibling):
202         * dom/TemplateContentDocumentFragment.h:
203         * editing/MarkupAccumulator.cpp:
204         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
205         * editing/markup.cpp:
206         (WebCore::createFragmentForInnerOuterHTML):
207         * html/HTMLTagNames.in:
208         * html/HTMLTemplateElement.cpp:
209         (WebCore::HTMLTemplateElement::didMoveToNewDocument):
210         * html/HTMLTemplateElement.h:
211         * html/HTMLTemplateElement.idl:
212         * html/parser/HTMLConstructionSite.cpp:
213         (WebCore::insert):
214         (WebCore::HTMLConstructionSite::insertTextNode):
215         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
216         (WebCore::HTMLConstructionSite::findFosterSite):
217         * html/parser/HTMLElementStack.cpp:
218         (WebCore::HTMLNames::isScopeMarker):
219         (WebCore::HTMLNames::isTableScopeMarker):
220         (WebCore::HTMLNames::isTableBodyScopeMarker):
221         (WebCore::HTMLNames::isTableRowScopeMarker):
222         (WebCore::HTMLElementStack::inSelectScope):
223         (WebCore::HTMLElementStack::hasTemplateInHTMLScope):
224         (WebCore::HTMLElementStack::htmlElement):
225         * html/parser/HTMLElementStack.h:
226         * html/parser/HTMLPreloadScanner.cpp:
227         (WebCore::TokenPreloadScanner::scan):
228         * html/parser/HTMLPreloadScanner.h:
229         * html/parser/HTMLStackItem.h:
230         (WebCore::isSpecialNode):
231         * html/parser/HTMLTreeBuilder.cpp:
232         (WebCore::HTMLTreeBuilder::isParsingTemplateContents):
233         (WebCore::HTMLTreeBuilder::isParsingFragmentOrTemplateContents):
234         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
235         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
236         (WebCore::HTMLTreeBuilder::didCreateCustomOrCallbackElement):
237         (WebCore::HTMLTreeBuilder::processTemplateStartTag):
238         (WebCore::HTMLTreeBuilder::processEndOfFileForInTemplateContents):
239         (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
240         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
241         (WebCore::HTMLTreeBuilder::processStartTag):
242         (WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
243         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
244         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
245         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
246         (WebCore::HTMLTreeBuilder::processEndTag):
247         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
248         (WebCore::HTMLTreeBuilder::processEndOfFile):
249         (WebCore::HTMLTreeBuilder::processStartTagForInHead):
250         (WebCore::HTMLTreeBuilder::finished):
251         * html/parser/HTMLTreeBuilder.h:
252         * inspector/InspectorDOMAgent.cpp:
253         (WebCore::InspectorDOMAgent::buildObjectForNode):
254         * inspector/InspectorInstrumentation.h:
255         (WebCore::InspectorInstrumentation::instrumentingAgentsForDocument):
256         * xml/parser/XMLDocumentParserLibxml2.cpp:
257         (WebCore::XMLDocumentParser::startElementNs):
258
259 2016-04-25  Jiewen Tan  <jiewen_tan@apple.com>
260
261         [iOS] ftp links crash @ WebCore::FTPDirectoryDocumentParser::appendEntry
262         https://bugs.webkit.org/show_bug.cgi?id=157019
263         <rdar://problem/24292650>
264
265         Reviewed by Chris Dumez.
266
267         Create separate Ref<Element> object for every row element instead of reusing
268         one because Ref<>'s operator=() does not allow assignment after a WTFMove().
269
270         * html/FTPDirectoryDocument.cpp:
271         (WebCore::FTPDirectoryDocumentParser::appendEntry):
272
273 2016-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
274
275         [Cocoa] Guarantee FontPlatformData's m_cgFont is never nullptr
276         https://bugs.webkit.org/show_bug.cgi?id=156929
277
278         Reviewed by Darin Adler.
279
280         After some investigation, it turns out that there is no place where it is meaningful
281         to pass us a null CoreText font. Therefore, the CoreGraphics font is also never null.
282
283         We should simply check for these null values at the ingestion site in order to
284         make the guarantee internally of having non-null values.
285
286         * platform/graphics/FontPlatformData.cpp:
287         (WebCore::FontPlatformData::FontPlatformData): Because the pointer is never null, we
288         can delete the code which handles that case.
289         * platform/graphics/FontPlatformData.h:
290         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto.
291         (WebCore::webFallbackFontFamily): Deleted.
292         (WebCore::FontPlatformData::setFallbackCGFont): Deleted.
293         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
294         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Asking the
295         CTRun for its kCTFontAttributeName will always return non-null.
296         * platform/graphics/mac/FontCustomPlatformData.cpp:
297         (WebCore::FontCustomPlatformData::fontPlatformData): Once we have a font descriptor,
298         CTFontCreateWithFontDescriptor() will always return non-null. We check if the font
299         descriptor is null elsewhere.
300         * platform/mac/DragImageMac.mm: The fonts in this file are gotten by asking for the
301         system font, which will always return non-null.
302         (WebCore::fontFromNSFont):
303         (WebCore::widthWithFont):
304         (WebCore::drawAtPoint):
305         (WebCore::createDragImageForLink):
306
307 2016-04-25  Chris Dumez  <cdumez@apple.com>
308
309         Crash under MemoryCache::remove()
310         https://bugs.webkit.org/show_bug.cgi?id=157000
311         <rdar://problem/23344660>
312
313         Reviewed by Andreas Kling.
314
315         MemoryCache::evictResources() was caching the number of resources ('size')
316         in the cache for a particular sessionID, and then proceed to call
317         MemoryCache::remove() 'size' times using the first item in the HashMap
318         each time. This was unsafe because resources may be ref'ing each other
319         and therefore removing one may cause other resources to get removed as
320         well. In such case, we would call remove() too many times and crash because
321         we dereferenced resources.begin()->value (with the HashMap being empty).
322
323         This patch avoids the issue by copying the resources to a Vector and
324         ref'ing them first, before going on to remove each one from the cache.
325
326         * loader/cache/MemoryCache.cpp:
327         (WebCore::MemoryCache::forEachSessionResource):
328         (WebCore::MemoryCache::evictResources):
329         * loader/cache/MemoryCache.h:
330
331 2016-04-25  Chris Dumez  <cdumez@apple.com>
332
333         Crash under WebCore::MutationObserver::deliverAllMutations()
334         https://bugs.webkit.org/show_bug.cgi?id=156997
335         <rdar://problem/16542323>
336
337         Reviewed by Ryosuke Niwa.
338
339         The crash traces indicate that we may derefence a null pointer when
340         dereferencing MutationCallback::scriptExecutationContext() in
341         MutationObserver::canDeliver(). This can happen when the script
342         execution context gets destroyed as a JSMutationCallback is an
343         ActiveDOMObject, which is a ContextDestructionObserver.
344
345         This patch refactors the code so that MutationObserver::canDeliver()
346         now simply asks JSMutationCallback if it can invoke its callback.
347         JSMutationCallback makes this decision using
348         ActiveDOMCallback::canInvokeCallback() which does a proper null
349         check of the ScriptExecutationContext. This avoids some code
350         duplication and fixes the crash.
351
352         * bindings/js/JSMutationCallback.h:
353         * dom/MutationCallback.h:
354         * dom/MutationObserver.cpp:
355         (WebCore::MutationObserver::canDeliver):
356
357 2016-04-25  Brady Eidson  <beidson@apple.com>
358
359         Fix a flaky test after r200032
360
361         * fileapi/File.cpp:
362         (WebCore::File::lastModified): This used to return a date object which did a WTF::timeClip on the double,
363           but now that we're returning a raw double we need to WTF::timeClip it ourselves.
364
365 2016-04-25  Chris Dumez  <cdumez@apple.com>
366
367         [Web IDL] Specify default values for optional parameters of type 'float' / 'unrestricted float'
368         https://bugs.webkit.org/show_bug.cgi?id=156995
369
370         Reviewed by Darin Adler.
371
372         Specify default values for optional parameters of type 'float' / 'unrestricted float'
373         and let the bindings generator use WTF::Optional<> for the ones that do not have a
374         default value.
375
376         * bindings/scripts/CodeGeneratorJS.pm:
377         (CanUseWTFOptionalForParameter): Deleted.
378         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
379         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
380         * html/canvas/CanvasRenderingContext2D.cpp:
381         (WebCore::CanvasRenderingContext2D::setStrokeColor):
382         (WebCore::CanvasRenderingContext2D::setFillColor):
383         (WebCore::CanvasRenderingContext2D::setShadow):
384         (WebCore::CanvasRenderingContext2D::fillText):
385         (WebCore::CanvasRenderingContext2D::strokeText):
386         (WebCore::CanvasRenderingContext2D::drawTextInternal):
387         (WebCore::CanvasRenderingContext2D::clearShadow): Deleted.
388         (WebCore::normalizeSpaces): Deleted.
389         (WebCore::CanvasRenderingContext2D::measureText): Deleted.
390         * html/canvas/CanvasRenderingContext2D.h:
391         * html/canvas/CanvasRenderingContext2D.idl:
392         * testing/Internals.idl:
393
394 2016-04-25  Brent Fulgham  <bfulgham@apple.com>
395
396         Add port 4190 (managesieve) to port blacklist
397         https://bugs.webkit.org/show_bug.cgi?id=156986
398         <rdar://problem/9119470>
399
400         Reviewed by Daniel Bates.
401
402         Tested by security/block-test.html.
403
404         * platform/URL.cpp:
405         (WebCore::portAllowed): Add 4190 to the port blacklist.
406
407 2016-04-25  Nan Wang  <n_wang@apple.com>
408
409         AX: Crash at -[WebAccessibilityObjectWrapper accessibilityAttributeValue:] + 4391
410         https://bugs.webkit.org/show_bug.cgi?id=156987
411
412         Reviewed by Chris Fleizach.
413
414         When we hit test on a slider indicator asking for the value when the parent slider's
415         accessibility object is not created or the parent slider has been removed, it will cause
416         crash. Fixed it by adding a check to see if the object is detached from the parent. 
417
418         Test: accessibility/mac/slider-thumb-value-crash.html
419
420         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
421         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
422
423 2016-04-25  Jer Noble  <jer.noble@apple.com>
424
425         WebKitPlaybackSessionModelMediaElement should initialize the interface added by setWebPlaybackSessionInterface() with initial data
426         https://bugs.webkit.org/show_bug.cgi?id=156996
427
428         Reviewed by Beth Dakin.
429
430         Notify the interface of the current values in the media element when the model is given an interface.
431
432         * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
433         (WebPlaybackSessionModelMediaElement::setWebPlaybackSessionInterface):
434
435 2016-04-25  Simon Fraser  <simon.fraser@apple.com>
436
437         Toggling animation-play-state can re-start a finished animation
438         https://bugs.webkit.org/show_bug.cgi?id=156731
439
440         Reviewed by Dean Jackson.
441
442         After an animation completed, CompositeAnimation::updateKeyframeAnimations() cleared
443         all state that the animation had run on the element, so changing the value of some
444         animation property triggered the animation to run again. This is wrong, since animation-name
445         still applied to the element.
446
447         Fix by keeping state for keyframe animations in the Done state in the m_keyframeAnimations
448         map. This allows for the removal of the index property on KeyframeAnimation.
449
450         Tests: animations/change-completed-animation-transform.html
451                animations/change-completed-animation.html
452
453         * page/animation/AnimationBase.cpp:
454         (WebCore::AnimationBase::timeToNextService):
455         * page/animation/AnimationBase.h:
456         (WebCore::AnimationBase::isAnimatingProperty):
457         * page/animation/CompositeAnimation.cpp: Add animations that should stick around to AnimationNameMap,
458         and swap with m_keyframeAnimations at the end.
459         (WebCore::CompositeAnimation::updateKeyframeAnimations):
460         * page/animation/KeyframeAnimation.cpp:
461         (WebCore::KeyframeAnimation::KeyframeAnimation):
462         (WebCore::KeyframeAnimation::getAnimatedStyle):
463         * page/animation/KeyframeAnimation.h:
464
465 2016-04-25  Alberto Garcia  <berto@igalia.com>
466
467         [GTK] Crashes if DISPLAY is unset
468         https://bugs.webkit.org/show_bug.cgi?id=156972
469
470         Reviewed by Carlos Garcia Campos.
471
472         If DISPLAY is unset then m_display will be NULL, crashing WebKit
473         when XCloseDisplay is called in the PlatformDisplayX11 destructor.
474
475         * platform/graphics/x11/PlatformDisplayX11.cpp:
476         (WebCore::PlatformDisplayX11::~PlatformDisplayX11):
477
478 2016-04-25  Ryan Haddad  <ryanhaddad@apple.com>
479
480         Update JS bindings test results after r200037
481
482         Unreviewed test gardening.
483
484         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
485         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
486
487 2016-04-25  Simon Fraser  <simon.fraser@apple.com>
488
489         play-state not parsed as part of animation shorthand
490         https://bugs.webkit.org/show_bug.cgi?id=156959
491
492         Reviewed by Darin Adler.
493
494         We failed to parse animation-play-state as part of the animation shorthand, contrary
495         to the spec and other browsers.
496
497         Fix for both the prefixed and unprefixed properties. There is some compat risk here,
498         but only changing unprefixed behavior will probably lead to more author confusion.
499
500         Test: animations/play-state-in-shorthand.html
501
502         * css/CSSParser.cpp:
503         (WebCore::CSSParser::parseAnimationShorthand):
504         * css/CSSPropertyNames.in:
505         * css/StylePropertyShorthand.cpp:
506         (WebCore::animationShorthandForParsing): Remove the long comment which is no longer relevant
507         now that the behavior has been written into the spec.
508
509 2016-04-25  Simon Fraser  <simon.fraser@apple.com>
510
511         Negative animation-delay is treated as 0s
512         https://bugs.webkit.org/show_bug.cgi?id=141008
513
514         Reviewed by Daniel Bates.
515         
516         Fix keyframe animations which start in the paused state.
517         
518         Explicitly move such animations from the new to the paused state, and
519         set m_pauseTime to 0, rather than leaving it at -1. Fix getElapsedTime()
520         to compute a correct time elapsed time for such animations, which takes
521         negative delay into account correctly.
522         
523         Fix assertions which need to account for the new transition of New -> PlayStatePaused.
524
525         Test: animations/play-state-start-paused.html
526
527         * page/animation/AnimationBase.cpp:
528         (WebCore::AnimationBase::updateStateMachine):
529         (WebCore::AnimationBase::getElapsedTime):
530         * page/animation/KeyframeAnimation.cpp:
531         (WebCore::KeyframeAnimation::animate):
532
533 2016-04-25  Antti Koivisto  <antti@apple.com>
534
535         Inline RenderStyle into RenderElement
536         https://bugs.webkit.org/show_bug.cgi?id=156981
537
538         Reviewed by Andreas Kling.
539
540         We can save memory and reduce indirection of style access by inlining RenderStyle to RenderElement.
541
542         This patch also makes RenderStyle moveable and switches from std::unique_ptr<RenderStyle> to RenderStyle&&
543         in many places where ownership is passed.
544
545         * Modules/plugins/PluginReplacement.h:
546         (WebCore::PluginReplacement::scriptObject):
547         (WebCore::PluginReplacement::willCreateRenderer):
548         * Modules/plugins/QuickTimePluginReplacement.h:
549         * Modules/plugins/QuickTimePluginReplacement.mm:
550         (WebCore::QuickTimePluginReplacement::~QuickTimePluginReplacement):
551         (WebCore::QuickTimePluginReplacement::createElementRenderer):
552         * Modules/plugins/YouTubePluginReplacement.cpp:
553         (WebCore::YouTubePluginReplacement::YouTubePluginReplacement):
554         (WebCore::YouTubePluginReplacement::createElementRenderer):
555         * Modules/plugins/YouTubePluginReplacement.h:
556         * css/StyleResolver.cpp:
557         (WebCore::StyleResolver::styleForElement):
558         (WebCore::StyleResolver::styleForKeyframe):
559         (WebCore::StyleResolver::pseudoStyleForElement):
560         (WebCore::StyleResolver::styleForPage):
561         (WebCore::StyleResolver::defaultStyleForElement):
562         (WebCore::StyleResolver::addToMatchedPropertiesCache):
563         (WebCore::StyleResolver::applyPropertyToStyle):
564         * dom/Document.cpp:
565         (WebCore::Document::recalcStyle):
566         (WebCore::Document::webkitWillEnterFullScreenForElement):
567         (WebCore::Document::setFullScreenRenderer):
568         * dom/Element.cpp:
569         (WebCore::Element::rendererIsNeeded):
570         (WebCore::Element::createElementRenderer):
571         * dom/Element.h:
572         (WebCore::Element::copyNonAttributePropertiesFromElement):
573         * dom/PseudoElement.cpp:
574         (WebCore::PseudoElement::resolveCustomStyle):
575         (WebCore::PseudoElement::didAttachRenderers):
576         (WebCore::PseudoElement::didRecalcStyle):
577         * html/BaseButtonInputType.cpp:
578         (WebCore::BaseButtonInputType::appendFormData):
579         (WebCore::BaseButtonInputType::createInputRenderer):
580         * html/BaseButtonInputType.h:
581         * html/FileInputType.cpp:
582         (WebCore::FileInputType::handleDOMActivateEvent):
583         (WebCore::FileInputType::createInputRenderer):
584         * html/FileInputType.h:
585         * html/HTMLAppletElement.cpp:
586         (WebCore::HTMLAppletElement::rendererIsNeeded):
587         (WebCore::HTMLAppletElement::createElementRenderer):
588
589         ...
590
591 2016-04-25  Eric Carlson  <eric.carlson@apple.com>
592
593         Stop listening for "media can start" notifications when media player is cleared
594         https://bugs.webkit.org/show_bug.cgi?id=156985
595         <rdar://problem/23158505>
596
597         Reviewed by Jer Noble.
598
599         No new tests, I have not been able to create a test that reliably reproduces this.
600
601         * html/HTMLMediaElement.cpp:
602         (WebCore::HTMLMediaElement::loadInternal): Add logging.
603         (WebCore::HTMLMediaElement::selectMediaResource): Assert and return early if there is
604           no media player.
605         (WebCore::HTMLMediaElement::clearMediaPlayer): Stop listening for can start notifications.
606         (WebCore::HTMLMediaElement::visibilityStateChanged): Add logging.
607         (WebCore::HTMLMediaElement::mediaCanStart): Ditto.
608
609 2016-04-25  Chris Dumez  <cdumez@apple.com>
610
611         [Web IDL] Specify default values for parameters of type 'unsigned short'
612         https://bugs.webkit.org/show_bug.cgi?id=156967
613
614         Reviewed by Darin Adler.
615
616         Specify default values for parameters of type 'unsigned short' and let
617         the bindings generator use WTF::Optional<> for the ones without a
618         default value.
619
620         * bindings/scripts/CodeGeneratorJS.pm:
621         (CanUseWTFOptionalForParameter):
622         (GenerateParametersCheck):
623         * testing/Internals.cpp:
624         (WebCore::Internals::layerTreeAsText): Deleted.
625         (WebCore::Internals::displayListForElement): Deleted.
626         (WebCore::Internals::replayDisplayListForElement): Deleted.
627         * testing/Internals.h:
628         * testing/Internals.idl:
629
630 2016-04-25  Per Arne Vollan  <peavo@outlook.com>
631
632         [Win][IndexedDB] Fix build errors.
633         https://bugs.webkit.org/show_bug.cgi?id=156713
634
635         Reviewed by Alex Christensen.
636
637         Fix compile and link errors when building with IndexedDB enabled.
638
639         * Modules/indexeddb/IDBCursor.h:
640         * Modules/indexeddb/IDBTransaction.cpp:
641         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
642         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
643         * PlatformWin.cmake:
644         * platform/win/FileSystemWin.cpp:
645         (WebCore::hardLinkOrCopyFile):
646
647 2016-04-25  Brady Eidson  <beidson@apple.com>
648
649         Implement latest File object spec (including its constructor).
650         https://bugs.webkit.org/show_bug.cgi?id=156511
651
652         Reviewed by Darin Adler.
653
654         Test: fast/files/file-constructor.html
655
656         * CMakeLists.txt:
657         * WebCore.xcodeproj/project.pbxproj:
658
659         * bindings/js/JSDictionary.cpp:
660         (WebCore::JSDictionary::convertValue):
661         * bindings/js/JSDictionary.h:
662
663         * bindings/js/JSFileCustom.cpp: Added.
664         (WebCore::constructJSFile):
665
666         * fileapi/File.cpp:
667         (WebCore::File::File):
668         (WebCore::File::lastModified):
669         (WebCore::File::lastModifiedDate): Deleted.
670         * fileapi/File.h:
671         * fileapi/File.idl:
672
673
674
675 2016-04-25  Antti Koivisto  <antti@apple.com>
676
677         REGRESSION(r156846): Crashes with guard malloc
678         https://bugs.webkit.org/show_bug.cgi?id=156984
679
680         Reviewed by Andreas Kling.
681
682         RenderElement::cachedFirstLineStyle() returns pointer to local std::unique_ptr.
683
684         * rendering/RenderElement.cpp:
685         (WebCore::RenderElement::uncachedFirstLineStyle):
686         (WebCore::RenderElement::cachedFirstLineStyle):
687         (WebCore::RenderElement::firstLineStyle):
688         (WebCore::firstLineStyleForCachedUncachedType): Deleted.
689
690             Don't try to use a single function for the cached and uncached cases. Separate the cases into the calling functions.
691
692 2016-04-25  Daniel Bates  <dabates@apple.com>
693
694         REGRESSION (r196012): Subresource may be blocked by Content Security Policy if it only matches 'self'
695         https://bugs.webkit.org/show_bug.cgi?id=156935
696         <rdar://problem/25351286>
697
698         Reviewed by Darin Adler.
699
700         Fixes an issue where subresource load may be blocked by the Content Security Policy (CSP) if its URL only
701         matched 'self'. In particular, the load would be blocked if initiated from a document that inherited the
702         origin of its owner document (e.g. the document contained in <iframe src="about:blank"></iframe>).
703
704         Following r196012 we compute and cache 'self' and its protocol on instantiation of a ContentSecurityPolicy
705         object for use when matching a URL against it. These cached values become out-of-date if the document
706         subsequently inherits the origin of its owner document. Therefore matches against 'self' will fail and
707         CSP will block a load if its not otherwise allowed by the policy. Previously we would compute 'self' when
708         parsing the definition of a source list and compute the protocol for 'self' each time we tried to match a
709         URL against 'self'. So, 'self' would always be up-to-date with respect to the origin of the document.
710
711         Tests: http/tests/security/contentSecurityPolicy/iframe-blank-url-programmatically-add-external-script.html
712                http/tests/security/contentSecurityPolicy/iframe-srcdoc-external-script.html
713
714         * page/csp/ContentSecurityPolicy.cpp:
715         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy): Extract out logic for computing and caching
716         'self' and its protocol into ContentSecurityPolicy::updateSourceSelf() and make use of this function.
717         (WebCore::ContentSecurityPolicy::updateSourceSelf): Computes and caches 'self' and its protocol with
718         respect to the specified SecurityOrigin.
719         (WebCore::ContentSecurityPolicy::applyPolicyToScriptExecutionContext): Call ContentSecurityPolicy::updateSourceSelf()
720         to ensure that we have an up-to-date representation for 'self' and the protocol of 'self' which can
721         become out-of-date if the document inherited the origin of its owner document.
722         * page/csp/ContentSecurityPolicy.h:
723
724 2016-04-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
725
726         Drop [UsePointersEvenForNonNullableObjectArguments] from TextTrack
727         https://bugs.webkit.org/show_bug.cgi?id=156899
728
729         Reviewed by Chris Dumez.
730
731         No behavior changes.
732
733         * html/track/TextTrack.idl: Marking cue and region parameter as nullable.
734         Also marking cues and activeCues as nullable attributes.
735
736 2016-04-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
737
738         Drop [UsePointersEvenForNonNullableObjectArguments] from File API interfaces
739         https://bugs.webkit.org/show_bug.cgi?id=156898
740
741         Reviewed by Chris Dumez.
742
743         Making FileReaderSync API API throwing a TypeError in case of null parameters, in lieu of a NOT_FOUND_ERR.
744         Making FileReader API taking nullable parameters as a temporary fix.
745
746         Test: fast/files/workers/worker-file-reader-sync-bad-parameter.html
747
748         * Modules/websockets/WebSocketChannel.cpp:
749         (WebCore::WebSocketChannel::processOutgoingFrameQueue): Updated to cope with FileReaderLoader::start taking a Blob&.
750         * fileapi/FileReader.cpp:
751         (WebCore::FileReader::readAsArrayBuffer): Updated to cope with readInternal taking a Blob&.
752         (WebCore::FileReader::readAsBinaryString): Ditto.
753         (WebCore::FileReader::readAsText): Ditto.
754         (WebCore::FileReader::readAsDataURL): Ditto.
755         (WebCore::FileReader::readInternal):  Updated to cope with FileReaderLoader::start taking a Blob&.
756         * fileapi/FileReader.h:
757         * fileapi/FileReader.idl: Marking the readXX methods as taking a nullable blob parameter to keep compatibility, at least temporarily.
758         * fileapi/FileReaderLoader.cpp:
759         (WebCore::FileReaderLoader::start): It now takes a Blob& as input.
760         * fileapi/FileReaderLoader.h:
761         * fileapi/FileReaderSync.cpp:
762         (WebCore::FileReaderSync::readAsArrayBuffer): Taking a Blob& as input.
763         (WebCore::FileReaderSync::readAsBinaryString): Ditto.
764         (WebCore::FileReaderSync::readAsText): Ditto.
765         (WebCore::FileReaderSync::readAsDataURL): Ditto.
766         (WebCore::FileReaderSync::startLoading) Ditto.
767         * fileapi/FileReaderSync.h:
768         (WebCore::FileReaderSync::readAsText): Ditto.
769         * fileapi/FileReaderSync.idl:
770
771 2016-04-25  Manuel Rego Casasnovas  <rego@igalia.com>
772
773         [css-grid] Fix grid-template-columns|rows computed style with content alignment
774         https://bugs.webkit.org/show_bug.cgi?id=156793
775
776         Reviewed by Darin Adler.
777
778         Computed style of grid-template-columns and grid-template-rows properties
779         was including the distribution offset because of content alignment.
780         We should subtract that offset, like we do for the case of gaps,
781         when we're calculating the computed style.
782
783         Test: fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html
784
785         * css/CSSComputedStyleDeclaration.cpp:
786         (WebCore::valueForGridTrackList):
787         * rendering/RenderGrid.cpp:
788         (WebCore::RenderGrid::offsetBetweenTracks):
789         (WebCore::RenderGrid::populateGridPositions): Deleted FIXME.
790         * rendering/RenderGrid.h:
791
792 2016-04-25  Frederic Wang  <fwang@igalia.com>
793
794         Refactor RenderMathMLMenclose.
795         https://bugs.webkit.org/show_bug.cgi?id=155019
796
797         Reviewed by Sergio Villar Senin.
798
799         Tests: mathml/presentation/menclose-notation-equivalence.html
800                mathml/presentation/menclose-notation-values.html
801
802         We rewrite RenderMathMLMenclose so that layout functions correctly override the
803         behavior of RenderMathMLRow. We try and rely on the draft  of the MathML in HTML5
804         implementation note, to make easier to get consistency with other rendering engines
805         in the future. All notations are now drawn with GraphicContext functions instead of
806         mixing them with CSS style. To save memory space, the list of known notations are
807         now saved on a short integer using bit masks instead of a vector of string names.
808         Finally, we remove support for the radical notation so that we no longer need to
809         create an anonymous RenderMathMLRoot.
810
811         * mathml/MathMLMencloseElement.cpp: Remove code for some special notations and just
812         reimplement parsing of the notation attribute.
813         (WebCore::MathMLMencloseElement::MathMLMencloseElement): By default, the notation is longdiv.
814         (WebCore::MathMLMencloseElement::parseAttribute): By default, the list of notation is empty.
815         If there is no notation attribute, the default value longdiv is used.
816         Otherwise, we parse the notation attribute and add each notation, using some equivalences
817         for box, actuarial and madruwb.
818         (WebCore::MathMLMencloseElement::isPresentationAttribute): Deleted. No need to define
819         specific style for some notation.
820         (WebCore::MathMLMencloseElement::finishParsingChildren): Deleted. No need to add an
821         anonymous square root.
822         (WebCore::MathMLMencloseElement::collectStyleForPresentationAttribute): Deleted. No need to
823         define specific style for some notation.
824         (WebCore::MathMLMencloseElement::longDivLeftPadding): Deleted. RenderMathMLMenclose uses an
825         arbitrary size instead of measure a glyph.
826         * mathml/MathMLMencloseElement.h: Define simple bit mask for each notation, add a short
827         integer to store the list of notations together with helper functions. Remove old code.
828         * rendering/mathml/RenderMathMLMenclose.cpp: Rewrite RenderMathMLMenclose so that layout
829         functions correctly override the behavior of RenderMathMLRow.
830         (WebCore::RenderMathMLMenclose::RenderMathMLMenclose): Init m_ascent to 0.
831         (WebCore::RenderMathMLMenclose::ruleThickness): For now, we use the fallback value used by
832         for other bars. We may refine that in the future.
833         (WebCore::RenderMathMLMenclose::getSpaceAroundContent): Helper function to retrieve the
834         space to add around the content, depending on the notations specified. Note that for
835         notation circle, this spacing depends on the content size.
836         (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths): Reimplement this function.
837         This is just adding left/right spacing around the content.
838         (WebCore::RenderMathMLMenclose::layoutBlock): Reimplement this function. We do the normal
839         RenderMathMLRow layout, adjust spacing and child position and
840         calculate m_ascent and m_contentRect.
841         (WebCore::RenderMathMLMenclose::firstLineBaseline): Implement this function.
842         We just return m_ascent.
843         (WebCore::drawLine): Helper function to draw a line using strokePath.
844         (WebCore::RenderMathMLMenclose::paint): We reimplement this function to draw
845         all notations using GraphicContext.
846         (WebCore::RenderMathMLMenclose::addChild): Deleted. No need to manage anonymous renderers.
847         (WebCore::RenderMathMLMenclose::updateLogicalHeight): Deleted. Height is now calculated
848         in layoutBlock.
849         (WebCore::RenderMathMLMenclose::checkNotationalValuesValidity): Deleted.
850         * rendering/mathml/RenderMathMLMenclose.h: Update member definitions.
851         * rendering/mathml/RenderMathMLRoot.cpp: We no longer need anonymous roots.
852         (WebCore::RenderMathMLRoot::RenderMathMLRoot): Deleted.
853         * rendering/mathml/RenderMathMLRoot.h: We no longer need anonymous roots.
854         * rendering/mathml/RenderMathMLRow.cpp: Allow to get the exact metrics of the chid row,
855         for use in RenderMathMLRoot.
856         (WebCore::RenderMathMLRow::computeLineVerticalStretch): rename parameters.
857         (WebCore::RenderMathMLRow::layoutRowItems): Set parameters to the final ascent, descent and
858         logical width of the chid row. Set the temporary logical width for RenderMathMenclose before
859         laying the children out.
860         (WebCore::RenderMathMLRow::layoutBlock): Rename parameters ; add a dummy logicalWidth
861         parameter.
862         * rendering/mathml/RenderMathMLRow.h: Make some functions accessible or overridable by
863         RenderMathMLRoot. Make layoutRowItems return the final ascent, descent and logical width
864         after the chid row is laid out.
865         * rendering/mathml/RenderMathMLSquareRoot.cpp: We no longer need anonymous roots.
866         (WebCore::RenderMathMLSquareRoot::RenderMathMLSquareRoot): Deleted.
867         (WebCore::RenderMathMLSquareRoot::createAnonymousWithParentRenderer): Deleted.
868         * rendering/mathml/RenderMathMLSquareRoot.h: We no longer need anonymous roots.
869
870 2016-04-25  Frederic Wang  <fwang@igalia.com>
871
872         Minor refactoring in RenderMathMLOperator
873         https://bugs.webkit.org/show_bug.cgi?id=156906
874
875         Reviewed by Martin Robinson.
876
877         No new tests, this is only minor refactoring that does not change the behavior.
878
879         * rendering/mathml/RenderMathMLOperator.cpp:
880         (WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack):
881         We rename the "state" integer to an "expected" enum indicating the next expected part.
882         (WebCore::RenderMathMLOperator::paintGlyph): We add a missing dot at the end of a sequence.
883         We also replace ceil(x+1) with ceil(x)+1 to get rid of the temporary variable.
884
885 2016-04-24  Chris Dumez  <cdumez@apple.com>
886
887         [Web IDL] Specify default values for boolean parameters
888         https://bugs.webkit.org/show_bug.cgi?id=156964
889
890         Reviewed by Darin Adler.
891
892         Specify default values for boolean parameters in our IDL files and
893         let the bindings generator use WTF::Optional<> for the ones without
894         a default value.
895
896         * CMakeLists.txt:
897         * Modules/indexeddb/IDBKeyRange.cpp:
898         * Modules/indexeddb/IDBKeyRange.h:
899         * Modules/indexeddb/IDBKeyRange.idl:
900         * WebCore.xcodeproj/project.pbxproj:
901         * bindings/js/JSBindingsAllInOne.cpp:
902
903         * bindings/js/JSDOMTokenListCustom.cpp: Removed.
904         We no longer need these custom bindings as the bindings generator
905         will now provide the implementation with an Optional<bool>, given
906         that the parameter has no default value.
907
908         * bindings/scripts/CodeGeneratorJS.pm:
909         (CanUseWTFOptionalForParameterType): Deleted.
910         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
911         (webkit_dom_test_obj_method_with_optional_boolean):
912         (webkit_dom_test_obj_method_with_optional_boolean_is_false):
913         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
914         * bindings/scripts/test/JS/JSTestObj.cpp:
915         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBoolean):
916         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse):
917         * bindings/scripts/test/ObjC/DOMTestObj.h:
918         * bindings/scripts/test/ObjC/DOMTestObj.mm:
919         (-[DOMTestObj methodWithOptionalBoolean:]):
920         (-[DOMTestObj methodWithOptionalBooleanIsFalse:]):
921         * bindings/scripts/test/TestObj.idl:
922         * dom/Document.h:
923         * dom/Document.idl:
924         * dom/Element.idl:
925         * dom/EventTarget.idl:
926         * html/DOMTokenList.idl:
927
928 2016-04-24  Chris Dumez  <cdumez@apple.com>
929
930         Autogenerated IDBFactory.open() does the wrong thing if you pass an explicit 'undefined' as the second argument
931         https://bugs.webkit.org/show_bug.cgi?id=156939
932
933         Reviewed by Darin Adler.
934
935         As per WebIDL, if undefined is passed by JS for an optional parameter then
936         we should use its default value if it has one, or use the special value
937         "missing":
938         http://heycam.github.io/webidl/#es-overloads (step 10.4)
939
940         Our bindings generator was already mapping undefined to the parameter's
941         default value when present. However, it was missing the notion of
942         "missing" value when there no default value. This patch adds supports
943         for its by passing Optional<>(Nullopt) to the implementation in such
944         case. This means that the implementation will need to use WTF::Optional<>
945         type for parameters that do not have a default value. Thankfully though,
946         in most cases, we will be able to specify a default value in the IDL
947         so cases where we will need to use WTF::Optional<> will actually be
948         rare.
949
950         To avoid having to do too much refactoring in this patch, the support
951         for WTF::Optional is currently blacklisted for most IDL types. I will
952         gradually stop blacklisting each type in follow-up patches, as I either:
953         - Add default parameter values in our IDL (preferred)
954         - Use WTF::Optional<> in our implementation (when we cannot specify a
955           default value).
956
957         This patch fixes a bug with IDBFactory.open()'s second parameter (version)
958         for which undefined should not throw and indicate that the version
959         should not be changed. We now use WTF::Optional in the implementation to
960         distinguish this case and not throw.
961
962         No new tests, existing tests were updated / rebaselined.
963
964         * Modules/indexeddb/IDBFactory.cpp:
965         (WebCore::IDBFactory::open):
966         (WebCore::IDBFactory::openInternal): Deleted.
967         * Modules/indexeddb/IDBFactory.h:
968         * bindings/scripts/CodeGeneratorJS.pm:
969         (ShouldUseWTFOptionalForParameterType):
970         (GenerateParametersCheck):
971         * fileapi/Blob.idl:
972         * inspector/InspectorIndexedDBAgent.cpp:
973
974 2016-04-23  Chris Dumez  <cdumez@apple.com>
975
976         [WebIDL] Drop [Default] WebKit-IDL extended attribute
977         https://bugs.webkit.org/show_bug.cgi?id=156955
978
979         Reviewed by Darin Adler.
980
981         Drop [Default] WebKit-IDL extended attribute in favor of the standard
982         WebIDL syntax for parameters' default value.
983
984         Here is what it looks like:
985         [Default=NullString] optional DOMString a -> optional DOMString a = null
986         [Default=NullString] optional DOMString? a -> optional DOMString? a = null
987         [Default=Undefined] optional DOMString a -> optional DOMString a = "undefined"
988         [Default=Undefined] optional DOMString? a -> optional DOMString? a = null
989         [Default=Undefined] optional long a -> optional long a = 0
990         [Default=Undefined] optional bool a -> optional bool a = false
991         [Default=Undefined] optional unrestricted double a -> optional unrestricted double a = NaN
992         [Default=Undefined] optional unrestricted float a -> optional unrestricted float a = NaN
993         [Default=Undefined] optional sequence<DOMString> a -> optional sequence<DOMString> a = []
994
995         These do not cause any Web-Exposed behavior change. However, when getting
996         rid of [Default] started passing more parameters by derefence instead of
997         pointer (as is expected for parameters not marked as nullable). As a result,
998         I had to mark a few parameters as nullable in the IDL to maintain the
999         previous behavior. In some cases, the implementation was already throwing
1000         when passing null. In such cases, I have not marked the type as nullable
1001         so that the generated bindings now throw the exception instead of our
1002         implementation code. In some cases, the exception being thrown is now
1003         different. This is why some of the layout tests had to be rebaselined.
1004
1005         No new tests, existing tests have been rebaselined. No significant Web
1006         exposed behavior change is expected from this patch, beside exceptions
1007         type sometimes being different.
1008
1009         * Modules/encryptedmedia/MediaKeys.idl:
1010         * Modules/fetch/FetchRequest.idl:
1011         * Modules/gamepad/deprecated/GamepadList.idl:
1012         * Modules/indexeddb/IDBDatabase.idl:
1013         * Modules/mediastream/RTCStatsResponse.idl:
1014         * Modules/notifications/Notification.idl:
1015         * Modules/speech/SpeechSynthesisUtterance.idl:
1016         * Modules/webaudio/AudioNode.idl:
1017         * Modules/websockets/WebSocket.idl:
1018         * bindings/scripts/CodeGeneratorJS.pm:
1019         (GenerateParametersCheck):
1020         * bindings/scripts/IDLAttributes.txt:
1021         * bindings/scripts/IDLParser.pm:
1022         (parseDefault):
1023         (parseDefaultValue):
1024         * bindings/scripts/test/TestInterface.idl:
1025         * bindings/scripts/test/TestNamedConstructor.idl:
1026         * bindings/scripts/test/TestObj.idl:
1027         * bindings/scripts/test/TestOverrideBuiltins.idl:
1028         * css/CSSKeyframesRule.idl:
1029         * css/CSSMediaRule.idl:
1030         * css/CSSPrimitiveValue.idl:
1031         * css/CSSRuleList.idl:
1032         * css/CSSStyleDeclaration.idl:
1033         * css/CSSStyleSheet.idl:
1034         * css/CSSSupportsRule.idl:
1035         * css/CSSValueList.idl:
1036         * css/MediaList.idl:
1037         * css/MediaQueryList.idl:
1038         * css/MediaQueryListListener.idl:
1039         * css/StyleMedia.idl:
1040         * css/StyleSheetList.idl:
1041         * css/WebKitCSSFilterValue.idl:
1042         * css/WebKitCSSMatrix.idl:
1043         * css/WebKitCSSTransformValue.idl:
1044         * dom/ClientRectList.idl:
1045         * dom/Comment.idl:
1046         * dom/CompositionEvent.idl:
1047         * dom/CustomEvent.h:
1048         * dom/CustomEvent.idl:
1049         * dom/DOMImplementation.idl:
1050         * dom/DOMStringList.idl:
1051         * dom/DataTransferItem.idl:
1052         * dom/DataTransferItemList.idl:
1053         * dom/DeviceMotionEvent.idl:
1054         * dom/DeviceOrientationEvent.idl:
1055         * dom/Document.cpp:
1056         (WebCore::Document::adoptNode):
1057         * dom/Document.idl:
1058         * dom/Element.cpp:
1059         (WebCore::Element::setAttributeNode):
1060         (WebCore::Element::setAttributeNodeNS):
1061         (WebCore::Element::removeAttributeNode):
1062         (WebCore::Element::parseAttributeName): Deleted.
1063         * dom/Element.h:
1064         * dom/Element.idl:
1065         * dom/Event.idl:
1066         * dom/HashChangeEvent.idl:
1067         * dom/KeyboardEvent.idl:
1068         * dom/MessageEvent.idl:
1069         * dom/MouseEvent.idl:
1070         * dom/MutationEvent.idl:
1071         * dom/NamedNodeMap.cpp:
1072         (WebCore::NamedNodeMap::setNamedItem):
1073         (WebCore::NamedNodeMap::setNamedItemNS):
1074         (WebCore::NamedNodeMap::item): Deleted.
1075         * dom/NamedNodeMap.h:
1076         * dom/NamedNodeMap.idl:
1077         * dom/Node.idl:
1078         * dom/NodeFilter.idl:
1079         * dom/NonElementParentNode.idl:
1080         * dom/OverflowEvent.idl:
1081         * dom/Range.idl:
1082         * dom/Text.idl:
1083         * dom/TextEvent.idl:
1084         * dom/TouchEvent.idl:
1085         * dom/UIEvent.idl:
1086         * dom/WheelEvent.idl:
1087         * html/DOMFormData.idl:
1088         * html/HTMLAllCollection.idl:
1089         * html/HTMLAudioElement.idl:
1090         * html/HTMLCanvasElement.idl:
1091         * html/HTMLCollection.idl:
1092         * html/HTMLDocument.idl:
1093         * html/HTMLElement.cpp:
1094         (WebCore::HTMLElement::insertAdjacentElement):
1095         (WebCore::contextElementForInsertion): Deleted.
1096         * html/HTMLElement.h:
1097         * html/HTMLElement.idl:
1098         * html/HTMLFormControlsCollection.idl:
1099         * html/HTMLInputElement.idl:
1100         * html/HTMLMediaElement.idl:
1101         * html/HTMLOptionElement.idl:
1102         * html/HTMLOptionsCollection.idl:
1103         * html/HTMLSelectElement.idl:
1104         * html/HTMLTableElement.idl:
1105         * html/HTMLTableRowElement.idl:
1106         * html/HTMLTableSectionElement.idl:
1107         * html/HTMLTextAreaElement.idl:
1108         * html/ImageData.idl:
1109         * html/canvas/CanvasGradient.idl:
1110         * html/canvas/CanvasRenderingContext2D.idl:
1111         * html/canvas/DOMPath.idl:
1112         * html/canvas/OESVertexArrayObject.idl:
1113         * page/DOMSelection.cpp:
1114         (WebCore::DOMSelection::extend):
1115         (WebCore::DOMSelection::getRangeAt): Deleted.
1116         * page/DOMSelection.h:
1117         * page/DOMSelection.idl:
1118         * page/DOMWindow.idl:
1119         * page/History.idl:
1120         * page/Performance.idl:
1121         * page/WindowTimers.idl:
1122         * plugins/DOMMimeTypeArray.idl:
1123         * plugins/DOMPlugin.idl:
1124         * plugins/DOMPluginArray.idl:
1125         * storage/StorageEvent.idl:
1126         * svg/SVGAnimationElement.idl:
1127         * svg/SVGDocument.idl:
1128         * svg/SVGElement.idl:
1129         * svg/SVGFEDropShadowElement.idl:
1130         * svg/SVGFEGaussianBlurElement.idl:
1131         * svg/SVGFEMorphologyElement.idl:
1132         * svg/SVGFilterElement.idl:
1133         * svg/SVGGraphicsElement.idl:
1134         * svg/SVGMarkerElement.idl:
1135         * svg/SVGPathElement.idl:
1136         * svg/SVGSVGElement.idl:
1137         * svg/SVGTests.idl:
1138         * svg/SVGTextContentElement.idl:
1139         * xml/DOMParser.idl:
1140         * xml/XMLSerializer.cpp:
1141         (WebCore::XMLSerializer::serializeToString):
1142         * xml/XMLSerializer.h:
1143         * xml/XMLSerializer.idl:
1144         * xml/XPathEvaluator.idl:
1145         * xml/XPathExpression.idl:
1146         * xml/XPathNSResolver.idl:
1147         * xml/XPathResult.idl:
1148         * xml/XSLTProcessor.idl:
1149
1150 2016-04-24  Antti Koivisto  <antti@apple.com>
1151
1152         RenderStyle should not be reference counted
1153         https://bugs.webkit.org/show_bug.cgi?id=156846
1154
1155         Reviewed by Andreas Kling.
1156
1157         RenderStyle reference counts its substructures. We no longer share RenderStyle objects between normal renderers
1158         so there is no reason to refcount the RenderStyles themselves too. Making it a non-refcounted type clarifies
1159         ownership relations, reduces branchiness and saves some memory.
1160
1161         This patches switches mostly mechanically from Ref/RefPtr<RenderStyle> to std::unique_ptr<RenderStyle>. In
1162         the future RenderStyle can be given regular value semantics.
1163
1164         * Modules/plugins/PluginReplacement.h:
1165         (WebCore::PluginReplacement::scriptObject):
1166         (WebCore::PluginReplacement::willCreateRenderer):
1167         * Modules/plugins/QuickTimePluginReplacement.h:
1168         * Modules/plugins/QuickTimePluginReplacement.mm:
1169         (WebCore::QuickTimePluginReplacement::~QuickTimePluginReplacement):
1170         (WebCore::QuickTimePluginReplacement::createElementRenderer):
1171         * Modules/plugins/YouTubePluginReplacement.cpp:
1172         (WebCore::YouTubePluginReplacement::YouTubePluginReplacement):
1173         (WebCore::YouTubePluginReplacement::createElementRenderer):
1174         * Modules/plugins/YouTubePluginReplacement.h:
1175         * css/CSSComputedStyleDeclaration.cpp:
1176         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
1177         (WebCore::ComputedStyleExtractor::useFixedFontDefaultSize):
1178         (WebCore::updateStyleIfNeededForNode):
1179         (WebCore::computeRenderStyleForProperty):
1180         (WebCore::ComputedStyleExtractor::customPropertyValue):
1181         (WebCore::ComputedStyleExtractor::propertyValue):
1182         * css/MediaQueryEvaluator.cpp:
1183         (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
1184         (WebCore::MediaQueryEvaluator::eval):
1185         * css/MediaQueryEvaluator.h:
1186
1187             Clarify in code that MediaQueryEvaluator does not own the style.
1188
1189         * css/MediaQueryMatcher.cpp:
1190         (WebCore::MediaQueryMatcher::mediaType):
1191         (WebCore::MediaQueryMatcher::documentElementUserAgentStyle):
1192         (WebCore::MediaQueryMatcher::evaluate):
1193         (WebCore::MediaQueryMatcher::matchMedia):
1194         (WebCore::MediaQueryMatcher::styleResolverChanged):
1195         (WebCore::MediaQueryMatcher::prepareEvaluator): Deleted.
1196         * css/MediaQueryMatcher.h:
1197         * css/StyleMedia.cpp:
1198         (WebCore::StyleMedia::matchMedium):
1199         * css/StyleResolver.cpp:
1200         (WebCore::StyleResolver::State::clear):
1201         (WebCore::StyleResolver::State::updateConversionData):
1202         (WebCore::StyleResolver::State::setStyle):
1203         (WebCore::StyleResolver::State::setParentStyle):
1204
1205             State owns the style explicitly set by setParentStyle but not the one given via constructor.
1206
1207         (WebCore::isAtShadowBoundary):
1208         (WebCore::StyleResolver::styleForElement):
1209         (WebCore::StyleResolver::styleForKeyframe):
1210         (WebCore::StyleResolver::keyframeStylesForAnimation):
1211         (WebCore::StyleResolver::pseudoStyleForElement):
1212         (WebCore::StyleResolver::styleForPage):
1213         (WebCore::StyleResolver::defaultStyleForElement):
1214         (WebCore::StyleResolver::applyMatchedProperties):
1215         (WebCore::StyleResolver::applyPropertyToStyle):
1216         * css/StyleResolver.h:
1217         (WebCore::ElementStyle::ElementStyle):
1218         (WebCore::StyleResolver::style):
1219         (WebCore::StyleResolver::parentStyle):
1220         (WebCore::StyleResolver::setOverrideDocumentElementStyle):
1221         (WebCore::StyleResolver::State::document):
1222         (WebCore::StyleResolver::State::element):
1223         (WebCore::StyleResolver::State::style):
1224         (WebCore::StyleResolver::State::takeStyle):
1225         (WebCore::StyleResolver::State::parentStyle):
1226         (WebCore::StyleResolver::State::rootElementStyle):
1227         (WebCore::StyleResolver::State::regionForStyling):
1228         (WebCore::StyleResolver::State::setParentStyle): Deleted.
1229         * dom/Document.cpp:
1230         (WebCore::Document::recalcStyle):
1231         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
1232         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
1233         (WebCore::Document::isPageBoxVisible):
1234         (WebCore::Document::pageSizeAndMarginsInPixels):
1235         (WebCore::Document::addAutoSizingNode):
1236         (WebCore::Document::validateAutoSizingNodes):
1237         (WebCore::Document::resetAutoSizingNodes):
1238         (WebCore::Document::setFullScreenRenderer):
1239         * dom/Document.h:
1240         * dom/Element.cpp:
1241         (WebCore::Element::rendererIsNeeded):
1242         (WebCore::Element::createElementRenderer):
1243         (WebCore::Element::resolveComputedStyle):
1244         * dom/Element.h:
1245         (WebCore::Element::copyNonAttributePropertiesFromElement):
1246         * dom/ElementRareData.h:
1247
1248         ...
1249
1250         * page/animation/AnimationBase.h:
1251         * page/animation/AnimationController.cpp:
1252         (WebCore::AnimationControllerPrivate::receivedStartTimeResponse):
1253         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
1254         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
1255         (WebCore::AnimationController::cancelAnimations):
1256         (WebCore::AnimationController::updateAnimations):
1257
1258             std::unique_ptr<RenderStyle& animatedStyle argument is now expected no be initially null and
1259             is only set if a new style is created.
1260
1261         (WebCore::AnimationController::getAnimatedStyleForRenderer):
1262         * page/animation/AnimationController.h:
1263         * page/animation/AnimationControllerPrivate.h:
1264         * page/animation/CompositeAnimation.cpp:
1265         (WebCore::CompositeAnimation::updateTransitions):
1266         (WebCore::CompositeAnimation::updateKeyframeAnimations):
1267         (WebCore::CompositeAnimation::animate):
1268         (WebCore::CompositeAnimation::getAnimatedStyle):
1269         * page/animation/CompositeAnimation.h:
1270         * page/animation/ImplicitAnimation.cpp:
1271         (WebCore::ImplicitAnimation::ImplicitAnimation):
1272         (WebCore::ImplicitAnimation::shouldSendEventForListener):
1273         (WebCore::ImplicitAnimation::animate):
1274         (WebCore::ImplicitAnimation::getAnimatedStyle):
1275         (WebCore::ImplicitAnimation::onAnimationEnd):
1276         (WebCore::ImplicitAnimation::reset):
1277         * page/animation/ImplicitAnimation.h:
1278         * page/animation/KeyframeAnimation.cpp:
1279         (WebCore::KeyframeAnimation::KeyframeAnimation):
1280         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
1281         (WebCore::KeyframeAnimation::animate):
1282         (WebCore::KeyframeAnimation::getAnimatedStyle):
1283         * page/animation/KeyframeAnimation.h:
1284         * rendering/RenderAttachment.cpp:
1285         (WebCore::RenderAttachment::RenderAttachment):
1286         * rendering/RenderAttachment.h:
1287         * rendering/RenderBlock.cpp:
1288         (WebCore::RenderBlock::RenderBlock):
1289         (WebCore::RenderBlock::styleDidChange):
1290         (WebCore::RenderBlock::clone):
1291         (WebCore::RenderBlock::updateFirstLetterStyle):
1292         (WebCore::RenderBlock::createFirstLetterRenderer):
1293         * rendering/RenderBlock.h:
1294         * rendering/RenderBlockFlow.cpp:
1295         (WebCore::RenderBlockFlow::MarginInfo::MarginInfo):
1296         (WebCore::RenderBlockFlow::RenderBlockFlow):
1297         * rendering/RenderBlockFlow.h:
1298         * rendering/RenderBox.cpp:
1299         (WebCore::skipBodyBackground):
1300         (WebCore::RenderBox::RenderBox):
1301         * rendering/RenderBox.h:
1302         * rendering/RenderBoxModelObject.cpp:
1303         (WebCore::RenderBoxModelObject::suspendAnimations):
1304         (WebCore::RenderBoxModelObject::RenderBoxModelObject):
1305         * rendering/RenderBoxModelObject.h:
1306         * rendering/RenderButton.cpp:
1307         (WebCore::RenderButton::RenderButton):
1308         (WebCore::RenderButton::setupInnerStyle):
1309         * rendering/RenderButton.h:
1310         * rendering/RenderCombineText.h:
1311         * rendering/RenderDeprecatedFlexibleBox.cpp:
1312         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
1313         * rendering/RenderDeprecatedFlexibleBox.h:
1314         * rendering/RenderDetailsMarker.cpp:
1315         (WebCore::RenderDetailsMarker::RenderDetailsMarker):
1316         * rendering/RenderDetailsMarker.h:
1317         * rendering/RenderElement.cpp:
1318         (WebCore::controlStatesRendererMap):
1319         (WebCore::RenderElement::RenderElement):
1320         (WebCore::RenderElement::~RenderElement):
1321         (WebCore::RenderElement::createFor):
1322         (WebCore::firstLineStyleForCachedUncachedType):
1323         (WebCore::RenderElement::uncachedFirstLineStyle):
1324         (WebCore::RenderElement::cachedFirstLineStyle):
1325         (WebCore::RenderElement::initializeStyle):
1326         (WebCore::RenderElement::setStyle):
1327         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
1328         (WebCore::RenderElement::styleDidChange):
1329         (WebCore::RenderElement::getCachedPseudoStyle):
1330
1331             Return plain pointer as the cache owns the style.
1332
1333         (WebCore::RenderElement::getUncachedPseudoStyle):
1334
1335             return std::unique_ptr<RenderStyle>
1336
1337         (WebCore::RenderElement::selectionColor):
1338         (WebCore::RenderElement::selectionPseudoStyle):
1339         (WebCore::RenderElement::selectionBackgroundColor):
1340         * rendering/RenderElement.h:
1341         (WebCore::RenderElement::hasInitializedStyle):
1342         (WebCore::RenderElement::style):
1343         (WebCore::RenderElement::element):
1344         (WebCore::RenderElement::setStyleInternal):
1345         * rendering/RenderEmbeddedObject.cpp:
1346
1347         ...
1348
1349         (WebCore::RenderImage::imageResource):
1350         * rendering/RenderInline.cpp:
1351         (WebCore::RenderInline::RenderInline):
1352         (WebCore::updateStyleOfAnonymousBlockContinuations):
1353         (WebCore::RenderInline::styleDidChange):
1354
1355             Continuations now get their own RenderStyles.
1356
1357         (WebCore::RenderInline::addChildIgnoringContinuation):
1358         (WebCore::RenderInline::clone):
1359         * rendering/RenderInline.h:
1360         * rendering/RenderLayer.cpp:
1361         (WebCore::RenderLayer::currentTransform):
1362         (WebCore::RenderLayer::calculateClipRects):
1363         * rendering/RenderLayer.h:
1364
1365         ...
1366
1367         * rendering/style/KeyframeList.cpp:
1368         (WebCore::KeyframeList::operator==):
1369         (WebCore::KeyframeList::insert):
1370
1371             KeyframeValue is now movable but not copyable type. Adjust accordingly.
1372
1373         * rendering/style/KeyframeList.h:
1374         (WebCore::KeyframeValue::KeyframeValue):
1375         (WebCore::KeyframeValue::setKey):
1376         (WebCore::KeyframeValue::style):
1377         (WebCore::KeyframeValue::setStyle):
1378         (WebCore::KeyframeList::animationName):
1379         (WebCore::KeyframeList::addProperty):
1380         (WebCore::KeyframeList::containsProperty):
1381         * rendering/style/RenderStyle.cpp:
1382         (WebCore::defaultStyle):
1383         (WebCore::RenderStyle::create):
1384         (WebCore::RenderStyle::createDefaultStyle):
1385         (WebCore::RenderStyle::createAnonymousStyleWithDisplay):
1386         (WebCore::RenderStyle::clone):
1387         (WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
1388
1389             Return std::unique_ptr<RenderStyle> instead of Ref<RenderStyle>.
1390
1391         (WebCore::RenderStyle::RenderStyle):
1392         (WebCore::RenderStyle::~RenderStyle):
1393         (WebCore::resolveAlignmentData):
1394         (WebCore::RenderStyle::operator==):
1395         (WebCore::RenderStyle::hasUniquePseudoStyle):
1396         (WebCore::RenderStyle::getCachedPseudoStyle):
1397         (WebCore::RenderStyle::addCachedPseudoStyle):
1398         (WebCore::RenderStyle::isStyleAvailable): Deleted.
1399         * rendering/style/RenderStyle.h:
1400         (WebCore::RenderStyle::setStyleType):
1401         (WebCore::RenderStyle::cachedPseudoStyles):
1402         (WebCore::RenderStyle::initialIsolation):
1403         (WebCore::RenderStyle::isPlaceholderStyle):
1404         (WebCore::RenderStyle::setIsPlaceholderStyle):
1405
1406             Add placeholder style bit to rareNonInheritedData. We no longer rely on RenderStyle identity for this test.
1407
1408         (WebCore::RenderStyle::noninheritedFlagsMemoryOffset):
1409         * rendering/style/SVGRenderStyle.cpp:
1410         (WebCore::defaultSVGStyle):
1411         (WebCore::SVGRenderStyle::createDefaultStyle):
1412         * rendering/style/StyleRareNonInheritedData.cpp:
1413         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1414         (WebCore::StyleRareNonInheritedData::operator==):
1415         (WebCore::StyleRareNonInheritedData::contentDataEquivalent):
1416         * rendering/style/StyleRareNonInheritedData.h:
1417
1418         ...
1419
1420         (WebCore::findRenderingRoot):
1421         (WebCore::findRenderingRoots):
1422         (WebCore::RenderTreeUpdater::commit):
1423
1424             Style::Update is no longer const as we move the styles from it to the render tree.
1425
1426         (WebCore::pseudoStyleCacheIsInvalid):
1427         (WebCore::RenderTreeUpdater::updateElementRenderer):
1428         (WebCore::moveToFlowThreadIfNeeded):
1429         (WebCore::RenderTreeUpdater::createRenderer):
1430         (WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):
1431         * style/RenderTreeUpdater.h:
1432         * style/StyleResolveForDocument.cpp:
1433         (WebCore::Style::resolveForDocument):
1434         * style/StyleResolveForDocument.h:
1435         * style/StyleSharingResolver.cpp:
1436         (WebCore::Style::elementHasDirectionAuto):
1437         (WebCore::Style::SharingResolver::resolve):
1438         * style/StyleSharingResolver.h:
1439         * style/StyleTreeResolver.cpp:
1440         (WebCore::Style::ensurePlaceholderStyle):
1441
1442             Set the placeholder.
1443
1444         (WebCore::Style::TreeResolver::Parent::Parent):
1445         (WebCore::Style::TreeResolver::pushScope):
1446         (WebCore::Style::TreeResolver::pushEnclosingScope):
1447         (WebCore::Style::TreeResolver::popScope):
1448
1449             Set and clear StyleResolver overrideDocumentElementStyle as needed. It is owned by the TreeResolver.
1450
1451         (WebCore::Style::TreeResolver::styleForElement):
1452
1453             Clone the placeholder style.
1454
1455         (WebCore::Style::TreeResolver::resolveElement):
1456         (WebCore::Style::TreeResolver::pushParent):
1457         (WebCore::Style::TreeResolver::resolveComposedTree):
1458         (WebCore::Style::TreeResolver::resolve):
1459
1460             Adopt to the std::unique_ptr and ElementStyle move semantics.
1461
1462         * style/StyleTreeResolver.h:
1463         (WebCore::Style::TreeResolver::scope):
1464         * style/StyleUpdate.cpp:
1465         (WebCore::Style::Update::elementUpdate):
1466         (WebCore::Style::Update::textUpdate):
1467         (WebCore::Style::Update::elementStyle):
1468         (WebCore::Style::Update::addElement):
1469         (WebCore::Style::Update::addText):
1470         * style/StyleUpdate.h:
1471         (WebCore::Style::Update::roots):
1472         (WebCore::Style::Update::document):
1473         * svg/SVGAElement.cpp:
1474         (WebCore::SVGAElement::svgAttributeChanged):
1475         (WebCore::SVGAElement::createElementRenderer):
1476
1477         ...
1478
1479 2016-04-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1480
1481         Drop [UsePointersEvenForNonNullableObjectArguments] from MediaControlsHost
1482         https://bugs.webkit.org/show_bug.cgi?id=156903
1483
1484         Reviewed by Chris Dumez.
1485
1486         No change of behavior.
1487
1488         * Modules/mediacontrols/MediaControlsHost.idl: Marking some parameters as nullable.
1489
1490 2016-04-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1491
1492         Drop [UsePointersEvenForNonNullableObjectArguments] from WebGLRenderingContext
1493         https://bugs.webkit.org/show_bug.cgi?id=156909
1494
1495         Reviewed by Chris Dumez.
1496
1497         No change of behavior.
1498
1499         Marking a lot of method parameters as nullable.
1500
1501         * html/canvas/WebGLRenderingContextBase.idl:
1502
1503 2016-04-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1504
1505         Drop [UsePointersEvenForNonNullableObjectArguments] from WebSocket
1506         https://bugs.webkit.org/show_bug.cgi?id=156897
1507
1508         Reviewed by Chris Dumez.
1509
1510         No change of behavior.
1511
1512         Updating WebSocket::send methods to take references, except for ArrayBufferView, which is not yet supported by the binding generator.
1513
1514         * Modules/websockets/WebSocket.cpp:
1515         (WebCore::WebSocket::send):
1516         * Modules/websockets/WebSocket.h:
1517         * Modules/websockets/WebSocket.idl:
1518
1519 2016-04-23  Andy Estes  <aestes@apple.com>
1520
1521         Fix issues found by the clang static analyzer
1522         https://bugs.webkit.org/show_bug.cgi?id=156956
1523
1524         Reviewed by Alexey Proskuryakov.
1525
1526         * editing/cocoa/DataDetection.mm:
1527         (WebCore::DataDetection::detectContentInRange): Stored tz in a RetainPtr.
1528         * platform/cf/KeyedDecoderCF.cpp:
1529         (WebCore::KeyedDecoderCF::KeyedDecoderCF): If dynamic_cf_cast returned nullptr, the result of
1530         CFPropertyListCreateWithData would leak. Stored the CFPropertyListRef in a RetainPtr, then leaked/adopted it
1531         into m_rootDictionary (to avoid retain count churn) if it is a CFDictionary.
1532         * platform/ios/WebAVPlayerController.mm:
1533         (-[WebAVPlayerController dealloc]): Released _externalPlaybackAirPlayDeviceLocalizedName.
1534         (-[WebAVMediaSelectionOption dealloc]): Added to release _localizedDisplayName.
1535         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1536         (-[WebAVPlayerLayer dealloc]): Released _pixelBufferAttributes.
1537         * platform/network/cocoa/WebCoreNSURLSession.h: Removed the readwrite attributes from properties, since
1538         properties are readwrite by default.
1539         * platform/network/cocoa/WebCoreNSURLSession.mm: Removed @dynamic, which isn't necessary just for defining a custom getter.
1540         (-[WebCoreNSURLSessionDataTask dealloc]): Added to release copied ivars.
1541
1542 2016-04-23  Dan Bernstein  <mitz@apple.com>
1543
1544         <rdar://problem/25894586> A project has failed to build because WTF_MAKE_FAST_ALLOCATED was not defined
1545
1546         Rubber-stamped by Chris Dumez.
1547
1548         Reverted the IntSize part of r199735, to let IntSize.h keep being used in another project.
1549
1550         * platform/graphics/IntSize.h:
1551         (WebCore::IntSize::IntSize):
1552
1553 2016-04-23  Chris Dumez  <cdumez@apple.com>
1554
1555         Tie the DiagnosticLoggingClient's lifetime to the Page
1556         https://bugs.webkit.org/show_bug.cgi?id=156938
1557         <rdar://problem/25851499>
1558
1559         Reviewed by Antti Koivisto.
1560
1561         Tie the DiagnosticLoggingClient's lifetime to the Page rather than to the
1562         MainFrame. The diagnostic logging client in WebKit2 requires the WebPage
1563         to be alive in order to send IPC to the UIProcess. The WebPage owns the
1564         Page and Page is not refCounted so the lifetime of the
1565         DiagnosticLoggingClient should now be tied to the one of the WebPage as
1566         well.
1567
1568         Previously, the DiagnosticLoggingClient would stay alive as long as the
1569         MainFrame and could apparently in rare cases outlive the WebPage, thus
1570         crashing when trying to send the IPC.
1571
1572         * history/PageCache.cpp:
1573         (WebCore::logPageCacheFailureDiagnosticMessage):
1574         (WebCore::canCachePage):
1575         * html/HTMLMediaElement.cpp:
1576         (WebCore::HTMLMediaElement::loadResource):
1577         (WebCore::logMediaLoadRequest):
1578         (WebCore::HTMLMediaElement::updatePlayState):
1579         (WebCore::HTMLMediaElement::mediaPlayerEngineFailedToLoad):
1580         * loader/EmptyClients.h:
1581         * loader/FrameLoader.cpp:
1582         (WebCore::logNavigation):
1583         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1584         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1585         * loader/ResourceLoader.cpp:
1586         (WebCore::logResourceResponseSource):
1587         * loader/SubframeLoader.cpp:
1588         (WebCore::logPluginRequest):
1589         * loader/SubresourceLoader.cpp:
1590         (WebCore::SubresourceLoader::willSendRequestInternal):
1591         (WebCore::SubresourceLoader::didReceiveResponse):
1592         (WebCore::logResourceLoaded):
1593         * loader/cache/CachedResourceLoader.cpp:
1594         (WebCore::logMemoryCacheResourceRequest):
1595         (WebCore::logResourceRevalidationDecision):
1596         * page/DiagnosticLoggingClient.h:
1597         * page/MainFrame.cpp:
1598         (WebCore::MainFrame::MainFrame): Deleted.
1599         (WebCore::MainFrame::~MainFrame): Deleted.
1600         (WebCore::MainFrame::diagnosticLoggingClient): Deleted.
1601         * page/MainFrame.h:
1602         * page/Page.cpp:
1603         (WebCore::Page::Page):
1604         (WebCore::Page::~Page):
1605         (WebCore::Page::diagnosticLoggingClient):
1606         * page/Page.h:
1607
1608 2016-04-22  Chris Dumez  <cdumez@apple.com>
1609
1610         Cannot access the SQLTransaction.constructor.prototype
1611         https://bugs.webkit.org/show_bug.cgi?id=156613
1612
1613         Reviewed by Darin Adler.
1614
1615         Drop [NoInterfaceObject] from the following SQL interfaces:
1616         Database, SQLError, SQLResultSet, SQLResultSetRowList and SQLTransaction.
1617
1618         This matches the specification:
1619         https://dev.w3.org/html5/webdatabase/
1620
1621         This was causing the 'constructor' property to be wrong for these
1622         interfaces as it would be a generic Object.
1623
1624         Test: storage/websql/transaction-prototype.html
1625
1626         * Modules/webdatabase/Database.idl:
1627         * Modules/webdatabase/SQLError.idl:
1628         * Modules/webdatabase/SQLResultSet.idl:
1629         * Modules/webdatabase/SQLResultSetRowList.idl:
1630         * Modules/webdatabase/SQLTransaction.idl:
1631
1632 2016-04-22  Joseph Pecoraro  <pecoraro@apple.com>
1633
1634         Web Inspector: Include columnNumber in event listener locations
1635         https://bugs.webkit.org/show_bug.cgi?id=156927
1636         <rdar://problem/25884584>
1637
1638         Reviewed by Brian Burg.
1639
1640         * inspector/InspectorDOMAgent.cpp:
1641         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1642         Include the column number in the location as well.
1643
1644 2016-04-22  Brent Fulgham  <bfulgham@apple.com>
1645
1646         [Win] Unreviewed build fix.
1647
1648         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1649         (PlatformCALayerWin::isHidden):
1650
1651 2016-04-22  Jer Noble  <jer.noble@apple.com>
1652
1653         [iOS] Crash at -[WebAVPlayerLayer resolveBounds]
1654         https://bugs.webkit.org/show_bug.cgi?id=156931
1655         <rdar://problem/25865315> 
1656
1657         Reviewed by Eric Carlson.
1658
1659         When cloning the WebAVPlayerLayer, we must copy over the fullscreenInterface to the cloned layer.
1660
1661         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1662         (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
1663
1664 2016-04-22  Chris Dumez  <cdumez@apple.com>
1665
1666         Crash under WebCore::DataDetection::detectContentInRange()
1667         https://bugs.webkit.org/show_bug.cgi?id=156880
1668         <rdar://problem/25622631>
1669
1670         Reviewed by Darin Adler.
1671
1672         We would sometimes crash under WebCore::DataDetection::detectContentInRange()
1673         when dereferencing a null parentNode pointer. This patch adds a null check
1674         for parentNode in the for() loop. It also does some clean up and optimization
1675         since I was passing by.
1676
1677         * editing/cocoa/DataDetection.mm:
1678         (WebCore::DataDetection::detectContentInRange):
1679
1680 2016-04-22  Keith Miller  <keith_miller@apple.com>
1681
1682         buildObjectForEventListener should not call into JSC with a null ExecState
1683         https://bugs.webkit.org/show_bug.cgi?id=156923
1684
1685         Reviewed by Joseph Pecoraro.
1686
1687         If a user had disabled JavaScript on their page then the inspector tried to
1688         add an event listener we would fail to create an ExecState. Since we didn't
1689         check this ExecState was valid we would then attempt to stringify the value,
1690         which would cause JSC to crash.
1691
1692         * inspector/InspectorDOMAgent.cpp:
1693         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1694
1695 2016-04-22  Dean Jackson  <dino@apple.com>
1696
1697         Yet another attempt at fixing Windows.
1698
1699         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1700         (PlatformCALayerWin::isHidden):
1701         * platform/graphics/ca/win/PlatformCALayerWin.h:
1702
1703 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
1704
1705         Attempt to fix Windows build after r199862
1706
1707         Unreviewed build fix.
1708
1709         * platform/graphics/ca/win/PlatformCALayerWin.h:
1710
1711 2016-04-22  Brent Fulgham  <bfulgham@apple.com>
1712
1713         Anchor element 'ping' property should only apply to http/https destinations
1714         https://bugs.webkit.org/show_bug.cgi?id=156801
1715         <rdar://problem/25834419>
1716
1717         Reviewed by Chris Dumez.
1718
1719         Take advantage of the hyperlink auditing language "UAs may either ignore the
1720         ping attribute altogether, or selectively ignore URLs in the list (e.g. ignoring
1721         any third-party URLs)" to restrict pings to http/https targets. For details, see
1722         <https://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing>.
1723
1724         Tested by http/tests/navigation/ping-attribute tests.
1725
1726         * loader/PingLoader.cpp:
1727         (WebCore::PingLoader::sendPing): Ignore requests to ping anything outside the
1728         family of HTTP protocols (http/https).
1729
1730 2016-04-22  Ryan Haddad  <ryanhaddad@apple.com>
1731
1732         Fix builds that do not support AVKit
1733
1734         Unreviewed build fix.
1735
1736         * platform/ios/WebAVPlayerController.h:
1737         * platform/ios/WebAVPlayerController.mm:
1738
1739 2016-04-22  Dave Hyatt  <hyatt@apple.com>
1740
1741         REGRESSION (r189567): The top of Facebook's messenger.com looks visually broken
1742         https://bugs.webkit.org/show_bug.cgi?id=156869
1743         <rdar://problem/23204668>
1744
1745         Reviewed by Zalan Bujtas.
1746
1747         Added fast/block/min-content-with-box-sizing.html
1748
1749         * rendering/RenderBox.cpp:
1750         (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
1751
1752 2016-04-22  Antti Koivisto  <antti@apple.com>
1753
1754         TextAutoSizingKey should use normal refcounting
1755         https://bugs.webkit.org/show_bug.cgi?id=156893
1756
1757         Reviewed by Andreas Kling.
1758
1759         Get rid of special refcounting of style in favor of RefPtr. It also becomes a move-only type
1760         to support future switch to non-refcounted RenderStyle.
1761
1762         Also general cleanups and modernization.
1763
1764         * dom/Document.cpp:
1765         (WebCore::TextAutoSizingTraits::constructDeletedValue):
1766         (WebCore::TextAutoSizingTraits::isDeletedValue):
1767         (WebCore::Document::addAutoSizingNode):
1768         (WebCore::Document::validateAutoSizingNodes):
1769         (WebCore::Document::resetAutoSizingNodes):
1770
1771             Adopt to being move-only.
1772
1773         * rendering/TextAutoSizing.cpp:
1774         (WebCore::cloneRenderStyleWithState):
1775         (WebCore::TextAutoSizingKey::TextAutoSizingKey):
1776
1777             Clone the style for safety against mutations. Cloning is cheap.
1778
1779         (WebCore::TextAutoSizingValue::numNodes):
1780         (WebCore::TextAutoSizingValue::adjustNodeSizes):
1781         (WebCore::TextAutoSizingValue::reset):
1782         (WebCore::TextAutoSizingKey::~TextAutoSizingKey): Deleted.
1783         (WebCore::TextAutoSizingKey::operator=): Deleted.
1784         (WebCore::TextAutoSizingKey::ref): Deleted.
1785         (WebCore::TextAutoSizingKey::deref): Deleted.
1786         * rendering/TextAutoSizing.h:
1787         (WebCore::TextAutoSizingKey::TextAutoSizingKey):
1788         (WebCore::TextAutoSizingKey::style):
1789         (WebCore::TextAutoSizingKey::isDeleted):
1790         (WebCore::operator==):
1791         (WebCore::TextAutoSizingKey::doc): Deleted.
1792         (WebCore::TextAutoSizingKey::isValidDoc): Deleted.
1793         (WebCore::TextAutoSizingKey::isValidStyle): Deleted.
1794         (WebCore::TextAutoSizingKey::deletedKeyDoc): Deleted.
1795         (WebCore::TextAutoSizingKey::deletedKeyStyle): Deleted.
1796
1797             m_doc member is not used for anything except deleted value comparisons. Replace it with a bit.
1798
1799 2016-04-22  Chris Dumez  <cdumez@apple.com>
1800
1801         Crash under FontCache::purgeInactiveFontData()
1802         https://bugs.webkit.org/show_bug.cgi?id=156822
1803         <rdar://problem/25373970>
1804
1805         Reviewed by Darin Adler.
1806
1807         In some rare cases, the Font constructor would mutate the FontPlatformData
1808         that is being passed in. This is an issue because because our FontCache
1809         uses the FontPlatformData as key for the cached fonts. This could lead to
1810         crashes because the WTFMove() in FontCache::purgeInactiveFontData() would
1811         nullify values in our HashMap but we would then fail to remove them from
1812         the HashMap (because the key did not match). We would then reference the
1813         null font when looping again when doing font->hasOneRef().
1814
1815         This patch marks Font::m_platformData member as const to avoid such issues
1816         in the future and moves the code altering the FontPlatformData from the
1817         Font constructor into the FontPlatformData constructor. The purpose of
1818         that code was to initialize FontPlatformData::m_cgFont in case the CGFont
1819         passed in the constructor was null.
1820
1821         * platform/graphics/Font.h:
1822         * platform/graphics/FontCache.cpp:
1823         (WebCore::FontCache::fontForPlatformData):
1824         (WebCore::FontCache::purgeInactiveFontData):
1825         * platform/graphics/FontPlatformData.cpp:
1826         (WebCore::FontPlatformData::FontPlatformData):
1827         * platform/graphics/FontPlatformData.h:
1828         * platform/graphics/cocoa/FontCocoa.mm:
1829         (WebCore::webFallbackFontFamily): Deleted.
1830         (WebCore::Font::platformInit): Deleted.
1831         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1832         (WebCore::webFallbackFontFamily):
1833         (WebCore::FontPlatformData::setFallbackCGFont):
1834         * platform/graphics/win/FontPlatformDataCGWin.cpp:
1835         (WebCore::FontPlatformData::setFallbackCGFont):
1836
1837 2016-04-22  Chris Dumez  <cdumez@apple.com>
1838
1839         Support disabling at runtime IndexedDB constructors exposed to workers
1840         https://bugs.webkit.org/show_bug.cgi?id=156883
1841
1842         Reviewed by Darin Adler.
1843
1844         Support disabling at runtime IndexedDB constructors exposed to workers.
1845         Previously, constructors visibility to workers and window was constrolled
1846         by the same runtime flag.
1847
1848         * Modules/indexeddb/IDBCursor.idl:
1849         * Modules/indexeddb/IDBCursorWithValue.idl:
1850         * Modules/indexeddb/IDBDatabase.idl:
1851         * Modules/indexeddb/IDBFactory.idl:
1852         * Modules/indexeddb/IDBIndex.idl:
1853         * Modules/indexeddb/IDBKeyRange.idl:
1854         * Modules/indexeddb/IDBObjectStore.idl:
1855         * Modules/indexeddb/IDBOpenDBRequest.idl:
1856         * Modules/indexeddb/IDBRequest.idl:
1857         * Modules/indexeddb/IDBTransaction.idl:
1858         * Modules/indexeddb/IDBVersionChangeEvent.idl:
1859         * workers/WorkerGlobalScope.idl:
1860
1861 2016-04-22  Dean Jackson  <dino@apple.com>
1862
1863         Attempting to fix Windows build. Add isHidden implementation.
1864
1865         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1866         (PlatformCALayerWin::isHidden):
1867
1868 2016-04-22  Brady Eidson  <beidson@apple.com>
1869
1870         Attempt at a Windows build fix.
1871
1872         * workers/WorkerMessagingProxy.cpp:
1873         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
1874
1875 2016-04-22  Dave Hyatt  <hyatt@apple.com>
1876
1877          -webkit-image-set doesn't work inside CSS variables
1878         https://bugs.webkit.org/show_bug.cgi?id=156915
1879         <rdar://problem/25473972>
1880
1881         Reviewed by Zalan Bujtas.
1882
1883         Added new tests in fast/hidpi.
1884
1885         * css/CSSPrimitiveValue.cpp:
1886         (WebCore::CSSPrimitiveValue::equals):
1887         (WebCore::CSSPrimitiveValue::buildParserValue):
1888
1889 2016-04-22  Commit Queue  <commit-queue@webkit.org>
1890
1891         Unreviewed, rolling out r199877.
1892         https://bugs.webkit.org/show_bug.cgi?id=156918
1893
1894         The LayoutTest added with this change is failing on all
1895         platforms. (Requested by ryanhaddad on #webkit).
1896
1897         Reverted changeset:
1898
1899         "REGRESSION (r189567): The top of Facebook's messenger.com
1900         looks visually broken"
1901         https://bugs.webkit.org/show_bug.cgi?id=156869
1902         http://trac.webkit.org/changeset/199877
1903
1904 2016-04-22  Brady Eidson  <beidson@apple.com>
1905
1906         Modern IDB: Rework the ownership/RefCounting model of IDBConnectionToServer and IDBConnectionProxy.
1907         https://bugs.webkit.org/show_bug.cgi?id=156916
1908
1909         Reviewed by Tim Horton.
1910
1911         No new tests (No behavior change).
1912
1913         * Modules/indexeddb/IDBFactory.cpp: Remove unneeded include.
1914         
1915         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
1916         (WebCore::IDBClient::IDBConnectionProxy::ref): Ref the ConnectionToServer.
1917         (WebCore::IDBClient::IDBConnectionProxy::deref): Deref it.
1918         (WebCore::IDBClient::IDBConnectionProxy::connectionToServer):
1919         (WebCore::IDBClient::IDBConnectionProxy::openDatabase):
1920         (WebCore::IDBClient::IDBConnectionProxy::deleteDatabase):
1921         (WebCore::IDBClient::IDBConnectionProxy::create): Deleted.
1922         * Modules/indexeddb/client/IDBConnectionProxy.h:
1923         
1924         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1925         (WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer): Create a proxy owned by this.
1926         (WebCore::IDBClient::IDBConnectionToServer::proxy): Expose it.
1927         * Modules/indexeddb/client/IDBConnectionToServer.h:
1928         
1929         * dom/Document.cpp:
1930         (WebCore::Document::idbConnectionProxy):
1931
1932         * WebCore.xcodeproj/project.pbxproj:
1933
1934 2016-04-22  Antti Koivisto  <antti@apple.com>
1935
1936         REGRESSION (r194898): Multi download of external SVG defs file by <use> xlinks:href (caching)
1937         https://bugs.webkit.org/show_bug.cgi?id=156368
1938         <rdar://problem/25611746>
1939
1940         Reviewed by Simon Fraser.
1941
1942         We would load svg resources with fragment identifier again because the encoding never matched.
1943
1944         Test: http/tests/svg/svg-use-external.html
1945
1946         * loader/TextResourceDecoder.cpp:
1947         (WebCore::TextResourceDecoder::setEncoding):
1948         (WebCore::TextResourceDecoder::hasEqualEncodingForCharset):
1949
1950             Encoding can depend on mime type. Add a comparison function that takes this into account.
1951
1952         (WebCore::findXMLEncoding):
1953         * loader/TextResourceDecoder.h:
1954         (WebCore::TextResourceDecoder::encoding):
1955         * loader/cache/CachedCSSStyleSheet.h:
1956         * loader/cache/CachedResource.h:
1957         (WebCore::CachedResource::textResourceDecoder):
1958
1959             Add a way to get the TextResourceDecoder from a cached resource.
1960
1961         * loader/cache/CachedResourceLoader.cpp:
1962         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1963
1964             Use the new comparison function.
1965
1966         * loader/cache/CachedSVGDocument.h:
1967         * loader/cache/CachedScript.h:
1968         * loader/cache/CachedXSLStyleSheet.h:
1969
1970 2016-04-22  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1971
1972         Drop [UsePointersEvenForNonNullableObjectArguments] from InspectorFrontendHost
1973         https://bugs.webkit.org/show_bug.cgi?id=156908
1974
1975         Reviewed by Timothy Hatcher.
1976
1977         No change of behavior.
1978
1979         * inspector/InspectorFrontendHost.idl: Marking event parameter as nullable to keep compatibility.
1980
1981 2016-04-22  Chris Dumez  <cdumez@apple.com>
1982
1983         Drop [UsePointersEvenForNonNullableObjectArguments] from MutationObserver
1984         https://bugs.webkit.org/show_bug.cgi?id=156890
1985
1986         Reviewed by Darin Adler.
1987
1988         Drop [UsePointersEvenForNonNullableObjectArguments] from MutationObserver
1989         and clean up / modernize the code a bit. There is not significant Web-
1990         exposed behavior change except that MutationObserver.observe() now throws
1991         a different kind of exception (a TypeError as per Web IDL) when passed in
1992         a null Node.
1993
1994         No new tests, rebaselined existing test.
1995
1996         * bindings/js/JSMutationCallback.cpp:
1997         (WebCore::JSMutationCallback::call):
1998         * bindings/js/JSMutationCallback.h:
1999         * bindings/js/JSMutationObserverCustom.cpp:
2000         (WebCore::constructJSMutationObserver):
2001         * css/PropertySetCSSStyleDeclaration.cpp:
2002         * dom/ChildListMutationScope.cpp:
2003         (WebCore::ChildListMutationAccumulator::enqueueMutationRecord):
2004         * dom/MutationCallback.h:
2005         * dom/MutationObserver.cpp:
2006         (WebCore::MutationObserver::create):
2007         (WebCore::MutationObserver::MutationObserver):
2008         (WebCore::MutationObserver::observe):
2009         (WebCore::MutationObserver::takeRecords):
2010         (WebCore::MutationObserver::enqueueMutationRecord):
2011         (WebCore::MutationObserver::deliver):
2012         (WebCore::MutationObserver::disconnect): Deleted.
2013         * dom/MutationObserver.h:
2014         * dom/MutationObserver.idl:
2015         * dom/MutationObserverInterestGroup.cpp:
2016         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
2017         * dom/MutationObserverInterestGroup.h:
2018         * dom/MutationRecord.cpp:
2019         (WebCore::MutationRecord::createChildList):
2020         * dom/MutationRecord.h:
2021
2022 2016-04-22  Dave Hyatt  <hyatt@apple.com>
2023
2024         REGRESSION (r189567): The top of Facebook's messenger.com looks visually broken
2025         https://bugs.webkit.org/show_bug.cgi?id=156869
2026         <rdar://problem/23204668>
2027
2028         Reviewed by Zalan Bujtas.
2029
2030         Added fast/block/min-content-with-box-sizing.html
2031
2032         * rendering/RenderBox.cpp:
2033         (WebCore::RenderBox::computeContentLogicalHeight):
2034
2035 2016-04-22  Manuel Rego Casasnovas  <rego@igalia.com>
2036
2037         [css-grid] Fix bug with positioned items in vertical writing mode
2038         https://bugs.webkit.org/show_bug.cgi?id=156870
2039
2040         Reviewed by Darin Adler.
2041
2042         In RenderGrid::offsetAndBreadthForPositionedChild() we were using
2043         directly borderLeft(), which is wrong in vertical writing modes.
2044
2045         To fix it we just need to use borderLogicalLeft() which is aware of
2046         the current writing mode.
2047
2048         Test: fast/css-grid-layout/grid-positioned-children-writing-modes.html
2049
2050         * rendering/RenderGrid.cpp:
2051         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
2052
2053 2016-04-21  Zan Dobersek  <zdobersek@igalia.com>
2054
2055         REGRESSION(r199738): The ANGLE update broke accelerated compositing in GTK+ port
2056         https://bugs.webkit.org/show_bug.cgi?id=156789
2057
2058         Reviewed by Carlos Garcia Campos.
2059
2060         After the update, the ANGLE library has to be built with
2061         ANGLE_ENABLE_ESSL and ANGLE_ENABLE_GLSL definitions in order
2062         to compile in the support for the two translators that Linux-based
2063         ports using OpenGL ES or OpenGL require. Missing files are also added.
2064
2065         * CMakeLists.txt:
2066
2067 2016-04-21  Chris Dumez  <cdumez@apple.com>
2068
2069         Drop [UsePointersEvenForNonNullableObjectArguments] from Document
2070         https://bugs.webkit.org/show_bug.cgi?id=156881
2071
2072         Reviewed by Darin Adler.
2073
2074         Drop [UsePointersEvenForNonNullableObjectArguments] from Document. There
2075         is no major Web-exposed behavior change but the type of the exception
2076         being thrown when passing null or not enough parameters has changed for
2077         some of the API (It is now always a TypeError as per the Web IDL
2078         specification).
2079
2080         Tests: fast/dom/Document/adoptNode-null.html
2081                fast/dom/Document/importNode-null.html
2082
2083         * dom/ContainerNode.cpp:
2084         (WebCore::ContainerNode::takeAllChildrenFrom):
2085         (WebCore::ContainerNode::parserInsertBefore):
2086         (WebCore::ContainerNode::parserAppendChild):
2087         * dom/Document.cpp:
2088         (WebCore::Document::importNode):
2089         (WebCore::Document::adoptNode):
2090         (WebCore::Document::createNodeIterator):
2091         (WebCore::Document::createTreeWalker):
2092         (WebCore::Document::setBodyOrFrameset):
2093         (WebCore::Document::hasValidNamespaceForElements): Deleted.
2094         (WebCore::Document::scheduleForcedStyleRecalc): Deleted.
2095         (WebCore::Document::scheduleStyleRecalc): Deleted.
2096         (WebCore::Document::unscheduleStyleRecalc): Deleted.
2097         (WebCore::Document::hasPendingStyleRecalc): Deleted.
2098         (WebCore::Document::hasPendingForcedStyleRecalc): Deleted.
2099         (WebCore::Document::recalcStyle): Deleted.
2100         (WebCore::Document::explicitClose): Deleted.
2101         * dom/Document.h:
2102         (WebCore::Document::importNode):
2103         * dom/Document.idl:
2104         * dom/NodeIterator.cpp:
2105         (WebCore::NodeIterator::NodeIterator):
2106         * dom/NodeIterator.h:
2107         (WebCore::NodeIterator::create):
2108
2109 2016-04-21  Frederic Wang  <fwang@igalia.com>
2110
2111         More improvements and explanations regarding resetting CSS properties on the <math> element
2112         https://bugs.webkit.org/show_bug.cgi?id=156840
2113
2114         Reviewed by Darin Adler.
2115
2116         We some follow-up improvements regarding CSS rules on the <math> element, after bug 133603:
2117         - We fix indenting to use 4 spaces.
2118         - We explain why we set -webkit-line-box-contain and add references to related bugs.
2119         - We explain why we reset some CSS spacing rules.
2120         - We explain why the direction is set to ltr.
2121         - We explain why font-family is set to a list of known math fonts and add reference
2122           to the wiki.
2123         - We mention the need to customize math fonts to get consistent style and add references to
2124           a bug report and to the wiki.
2125         - We described each of the math font listed and add some justification about their orders.
2126         - We better explain the section about fonts that do not satisfy the requirements for good
2127           mathematical rendering, reformulate why we still need them for iOS/Mac and we add some
2128           references to a bug report and to the wiki. Some fonts that not pre-installed were removed
2129           in r199773.
2130         - We add a FIXME comments for potential changes of CSS properties on the <math> tag.
2131
2132         We make the following changes to the lists of font-family:
2133         - We move "TeX Gyre Termes Math" into the Times group.
2134         - We move "Asana Math" into the Palatino group.
2135         - We remove iOS conditionals on "Symbol" and "Times New Roman".
2136
2137         No new tests, only order of math fonts that are not used by test framework is changed.
2138
2139         * css/mathml.css:
2140         (math): We merge the two math selectors, reorder some font-families, remove iOS ifdef and
2141         add more description.
2142
2143 2016-04-21  Dean Jackson  <dino@apple.com>
2144
2145         Backdrop Filter should not be visible if element has visibility:hidden
2146         https://bugs.webkit.org/show_bug.cgi?id=149318
2147         <rdar://problem/22749780>
2148
2149         Reviewed by Simon Fraser.
2150
2151         Make sure that backdrop filter layers take note of when
2152         the contents are visible or not.
2153
2154         Tests: css3/filters/backdrop/backdrop-with-visibility-hidden-changing.html
2155                css3/filters/backdrop/backdrop-with-visibility-hidden.html
2156                css3/filters/backdrop/backdrop-with-visibility-hidden-2.html
2157
2158         * platform/graphics/ca/GraphicsLayerCA.cpp:
2159         (WebCore::GraphicsLayerCA::updateContentsVisibility): Tell the backdrop layer about the
2160         change if there is one.
2161         (WebCore::GraphicsLayerCA::updateBackdropFilters): When we update filters, make
2162         sure to check the contents visibility.
2163         (WebCore::dumpInnerLayer): Output "hidden" if the layer is set as such.
2164         * platform/graphics/ca/PlatformCALayer.h: Add an isHidden method.
2165         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
2166         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2167         (PlatformCALayerCocoa::isHidden): Call into CALayer isHidden.
2168
2169 2016-04-21  Zalan Bujtas  <zalan@apple.com>
2170
2171         RenderVideo should always update the intrinsic size before layout.
2172         https://bugs.webkit.org/show_bug.cgi?id=156878
2173
2174         Reviewed by Simon Fraser.
2175
2176         In order to layout video element properly we need to know the correct intrinsic size.
2177         This patch also asserts if we end up updating the intrinsic size right after finishing video renderer layout.
2178
2179         This issues was discovered as part of webkit.org/b/156245. (hence covered by existing tests)
2180
2181         * rendering/RenderVideo.cpp:
2182         (WebCore::RenderVideo::updateIntrinsicSize):
2183         (WebCore::RenderVideo::layout):
2184         (WebCore::RenderVideo::updatePlayer):
2185         * rendering/RenderVideo.h:
2186
2187 2016-04-21  Brady Eidson  <beidson@apple.com>
2188
2189         Modern IDB (Workers): Get the IDBConnectionProxy from the Document to the WorkerGlobalScope.
2190         https://bugs.webkit.org/show_bug.cgi?id=156877
2191
2192         Reviewed by Tim Horton.
2193
2194         No new tests (Covered by changes to existing tests).
2195
2196         * workers/WorkerMessagingProxy.cpp:
2197         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope): This is the point on the main thread
2198           where we can get the IDBConnectionProxy from the Document and pass it down through Worker
2199           machinery so it can end up at the WorkerGlobalScope.
2200         
2201         Everything else is this patch is just passing it along as needed.
2202
2203         And cleaning up header style for neglected headers.
2204
2205         * workers/DedicatedWorkerGlobalScope.cpp:
2206         (WebCore::DedicatedWorkerGlobalScope::create):
2207         (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
2208         * workers/DedicatedWorkerGlobalScope.h:
2209
2210         * workers/DedicatedWorkerThread.cpp:
2211         (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
2212         (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
2213         * workers/DedicatedWorkerThread.h:
2214         (WebCore::DedicatedWorkerThread::create):
2215         (WebCore::DedicatedWorkerThread::workerObjectProxy):
2216
2217         * workers/WorkerGlobalScope.cpp:
2218         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
2219         (WebCore::WorkerGlobalScope::idbConnectionProxy):
2220         * workers/WorkerGlobalScope.h:
2221
2222         * workers/WorkerThread.cpp:
2223         (WebCore::WorkerThread::WorkerThread):
2224         (WebCore::WorkerThread::idbConnectionProxy):
2225         * workers/WorkerThread.h:
2226         (WebCore::WorkerThread::threadID):
2227         (WebCore::WorkerThread::runLoop):
2228         (WebCore::WorkerThread::workerLoaderProxy):
2229         (WebCore::WorkerThread::workerReportingProxy):
2230         (WebCore::WorkerThread::getNotificationClient):
2231         (WebCore::WorkerThread::setNotificationClient):
2232         (WebCore::WorkerThread::workerGlobalScope):
2233
2234 2016-04-21  Anders Carlsson  <andersca@apple.com>
2235
2236         Fix crashes when loading SVG images.
2237
2238         * loader/EmptyClients.cpp:
2239         (WebCore::fillWithEmptyClients):
2240         Give the SVG page its own application cache storage.
2241
2242 2016-04-21  Anders Carlsson  <andersca@apple.com>
2243
2244         Get rid of ApplicationCacheStorage::singleton
2245         https://bugs.webkit.org/show_bug.cgi?id=156882
2246
2247         Reviewed by Tim Horton.
2248
2249         * loader/appcache/ApplicationCacheStorage.cpp:
2250         (WebCore::ApplicationCacheStorage::setCacheDirectory): Deleted.
2251         (WebCore::ApplicationCacheStorage::singleton): Deleted.
2252         * loader/appcache/ApplicationCacheStorage.h:
2253         * page/Page.cpp:
2254         (WebCore::Page::Page):
2255
2256 2016-04-21  Simon Fraser  <simon.fraser@apple.com>
2257
2258         ASSERTION FAILED: accumulation == TransformState::FlattenTransform in WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect
2259         https://bugs.webkit.org/show_bug.cgi?id=155362
2260
2261         Reviewed by Zalan Bujtas.
2262
2263         A particular configuration of composited RenderLayers with preserve-3d and clipping
2264         caused assertions because an ancestor clipping layer had masksToBounds() set, but
2265         a preserves3D() parent, triggering an assertion in GraphicsLayerCA::computeVisibleAndCoverageRect().
2266         Make two changes to address this:
2267
2268         First, CSS clip: and clip-path: should force flattening and override preserve-3d in
2269         the RenderStyle.
2270
2271         Second, don't accumulate transforms in GraphicsLayerCA through layers with masksToBounds().
2272
2273         Tests: compositing/clipping/preserve3d-flatten-assertion-nested.html
2274                compositing/clipping/preserve3d-flatten-assertion.html
2275
2276         * css/StyleResolver.cpp:
2277         (WebCore::StyleResolver::adjustRenderStyle):
2278         * platform/graphics/ca/GraphicsLayerCA.cpp:
2279         (WebCore::accumulatesTransform):
2280
2281 2016-04-21  Chris Dumez  <cdumez@apple.com>
2282
2283         Element::idForStyleResolution() is a foot-gun
2284         https://bugs.webkit.org/show_bug.cgi?id=156852
2285
2286         Reviewed by Darin Adler.
2287
2288         Element::idForStyleResolution() is a foot-gun. It requires the caller to check
2289         Element::hasID() first or it may end up crashing when dereferencing elementData()
2290         (e.g. see Bug 156806).
2291
2292         This patch updates Element::idForStyleResolution() to return nullAtom is the
2293         Element does not have an ID. I did not see a performance impact on Speedometer,
2294         Dromaeo DOM Core, Dromaeo CSS Selectors and our local performanceTests/.
2295
2296         * css/ElementRuleCollector.cpp:
2297         (WebCore::ElementRuleCollector::collectMatchingRules):
2298         * css/SelectorChecker.cpp:
2299         (WebCore::SelectorChecker::checkOne):
2300         * css/SelectorFilter.cpp:
2301         (WebCore::collectElementIdentifierHashes):
2302         * dom/Element.h:
2303         (WebCore::Element::idForStyleResolution):
2304         * rendering/RenderBlockFlow.cpp:
2305         (WebCore::needsAppleMailPaginationQuirk):
2306         * rendering/RenderTreeAsText.cpp:
2307         (WebCore::writeRenderRegionList):
2308         * style/StyleSharingResolver.cpp:
2309         (WebCore::Style::SharingResolver::canShareStyleWithElement):
2310
2311 2016-04-21  Brady Eidson  <beidson@apple.com>
2312
2313         Modern IDB (Workers): Move IDBConnectionProxy into IDBRequest and IDBDatabase.
2314         https://bugs.webkit.org/show_bug.cgi?id=156868
2315
2316         Reviewed by Tim Horton.
2317
2318         No new tests (No behavior change).
2319
2320         * Modules/indexeddb/IDBDatabase.cpp:
2321         (WebCore::IDBDatabase::create):
2322         (WebCore::IDBDatabase::IDBDatabase):
2323         (WebCore::IDBDatabase::~IDBDatabase):
2324         (WebCore::IDBDatabase::transaction):
2325         (WebCore::IDBDatabase::maybeCloseInServer):
2326         * Modules/indexeddb/IDBDatabase.h:
2327         (WebCore::IDBDatabase::connectionProxy):
2328         (WebCore::IDBDatabase::serverConnection):
2329
2330         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2331         (WebCore::IDBOpenDBRequest::createDeleteRequest):
2332         (WebCore::IDBOpenDBRequest::createOpenRequest):
2333         (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
2334         (WebCore::IDBOpenDBRequest::onSuccess):
2335         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
2336         (WebCore::IDBOpenDBRequest::requestCompleted):
2337         (WebCore::IDBOpenDBRequest::maybeCreateDeleteRequest): Deleted.
2338         (WebCore::IDBOpenDBRequest::maybeCreateOpenRequest): Deleted.
2339         * Modules/indexeddb/IDBOpenDBRequest.h:
2340
2341         * Modules/indexeddb/IDBRequest.cpp:
2342         (WebCore::IDBRequest::IDBRequest):
2343         (WebCore::IDBRequest::connectionToServer): Deleted.
2344         * Modules/indexeddb/IDBRequest.h:
2345         (WebCore::IDBRequest::connectionProxy):
2346
2347         * Modules/indexeddb/IDBTransaction.h:
2348
2349         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
2350         (WebCore::IDBClient::IDBConnectionProxy::openDatabase):
2351         (WebCore::IDBClient::IDBConnectionProxy::deleteDatabase):
2352
2353 2016-04-21  Jiewen Tan  <jiewen_tan@apple.com>
2354
2355         [iOS] DumpRenderTree crashed in com.apple.WebCore: WebCore::ResourceLoadNotifier::didFailToLoad
2356         https://bugs.webkit.org/show_bug.cgi?id=156829
2357         <rdar://problem/23348217>
2358
2359         Reviewed by Daniel Bates.
2360
2361         Ensure that the frame associated with the ResourceLoadNotifier is kept alive when notifying the Web Inspector.
2362
2363         Covered by existing tests.
2364
2365         * loader/ResourceLoadNotifier.cpp:
2366         (WebCore::ResourceLoadNotifier::didFailToLoad):
2367         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
2368         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
2369         (WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
2370         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
2371         (WebCore::ResourceLoadNotifier::dispatchDidFailLoading):
2372
2373 2016-04-21  Brady Eidson  <beidson@apple.com>
2374
2375         Modern IDB (Workers): More IDBConnectionProxy refactoring.
2376         https://bugs.webkit.org/show_bug.cgi?id=156855
2377
2378         Reviewed by Darin Adler.
2379
2380         No new tests (Covered by changes to existing tests).
2381
2382         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
2383         (WebCore::DOMWindowIndexedDatabase::indexedDB):
2384
2385         Hang on to the IDBConnectionProxy passed in at creation time, as it should never change:
2386         * Modules/indexeddb/IDBFactory.cpp:
2387         (WebCore::IDBFactory::create):
2388         (WebCore::IDBFactory::IDBFactory):
2389         (WebCore::IDBFactory::openInternal):
2390         (WebCore::IDBFactory::deleteDatabase):
2391         * Modules/indexeddb/IDBFactory.h:
2392
2393         Hang on to the IDBConnectionProxy passed in at creation time, as it should never change:
2394         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
2395         (WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
2396         (WebCore::WorkerGlobalScopeIndexedDatabase::from):
2397         (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
2398         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
2399
2400         Make IDBConnectionProxy ThreadSafeRefCounted:
2401         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
2402         (WebCore::IDBClient::IDBConnectionProxy::create):
2403         * Modules/indexeddb/client/IDBConnectionProxy.h:
2404
2405         * dom/Document.cpp:
2406         (WebCore::Document::idbConnectionProxy):
2407         * dom/Document.h:
2408
2409 2016-04-21  Keith Miller  <keith_miller@apple.com>
2410
2411         WebScriptObject description swizzler should work in a multi-threaded world
2412         https://bugs.webkit.org/show_bug.cgi?id=156808
2413
2414         Reviewed by Geoffrey Garen.
2415
2416         A WebKit legacy API user might be running Objective-C code on another thread.
2417         Since we don't want to corrupt other thread's NSObject description method
2418         we use TLS to record if we are in the stringValue function. As an attempt to
2419         preserve any user swizzling we update the non-stringValue NSObject description
2420         method on each call to stringValue if it has changed. Additionally, the TLS
2421         needs to be a int because the user might call into stringValue, back into JS,
2422         then back into stringValue. If the TLS was a boolean then it would be unset
2423         at that point so when we return into the first stringValue call we would call
2424         the original NSObject description method rather than our override.
2425
2426         Test added to API tests: WebKit1.WebScriptObjectDescription
2427
2428         * bridge/objc/objc_instance.mm:
2429         (-[NSObject _web_description]):
2430         (ObjcInstance::stringValue):
2431         (swizzleNSObjectDescription): Deleted.
2432
2433 2016-04-21  Beth Dakin  <bdakin@apple.com>
2434
2435         Build fix.
2436
2437         * platform/mac/WebPlaybackSessionInterfaceMac.mm:
2438         (WebCore::WebPlaybackSessionInterfaceMac::setAudioMediaSelectionOptions):
2439         (WebCore::WebPlaybackSessionInterfaceMac::setLegibleMediaSelectionOptions):
2440         (WebCore::WebPlaybackSessionInterfaceMac::invalidate):
2441
2442 2016-04-21  Beth Dakin  <bdakin@apple.com>
2443
2444         32 bit build fix.
2445
2446         * platform/mac/WebPlaybackSessionInterfaceMac.mm:
2447
2448 2016-04-21  Konstantin Tokarev  <annulen@yandex.ru>
2449
2450         Fixed compilation with !ENABLE(SVG_FONTS).
2451         https://bugs.webkit.org/show_bug.cgi?id=156850
2452
2453         Reviewed by Michael Catanzaro.
2454
2455         No new tests needed.
2456
2457         * css/CSSFontFaceSource.cpp:
2458         (WebCore::CSSFontFaceSource::CSSFontFaceSource):
2459         Added missing ENABLE(SVG_FONTS) guards.
2460         * css/CSSFontFaceSource.h: Ditto.
2461         * platform/graphics/FontCascade.cpp: Ditto.
2462         * svg/SVGToOTFFontConversion.cpp:
2463         (WebCore::FontCascade::drawGlyphBuffer): Deleted extraneous
2464         !ENABLE(SVG_FONTS) guard.
2465
2466 2016-04-21  Beth Dakin  <bdakin@apple.com>
2467
2468         Remove reliance on WebAVMediaSelectionOptionMac for the 
2469         WebPlaybackControlsManager
2470         https://bugs.webkit.org/show_bug.cgi?id=156811
2471         -and corresponding-
2472         rdar://problem/25760523
2473
2474         Reviewed by Jer Noble.
2475
2476         * platform/mac/WebPlaybackSessionInterfaceMac.mm:
2477         (-[WebPlaybackControlsManager setSeekableTimeRanges:]):
2478         (-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]):
2479         (-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]):
2480         (WebCore::WebPlaybackSessionInterfaceMac::~WebPlaybackSessionInterfaceMac):
2481         (WebCore::WebPlaybackSessionInterfaceMac::setSeekableRanges):
2482         (WebCore::WebPlaybackSessionInterfaceMac::setAudioMediaSelectionOptions):
2483         (WebCore::WebPlaybackSessionInterfaceMac::setLegibleMediaSelectionOptions):
2484         (WebCore::WebPlaybackSessionInterfaceMac::invalidate):
2485         (-[WebAVMediaSelectionOptionMac localizedDisplayName]): Deleted.
2486         (-[WebAVMediaSelectionOptionMac setLocalizedDisplayName:]): Deleted.
2487         (-[WebPlaybackControlsManager isSeeking]): Deleted.
2488         (-[WebPlaybackControlsManager seekToTime:toleranceBefore:toleranceAfter:]): Deleted.
2489         (-[WebPlaybackControlsManager audioMediaSelectionOptions]): Deleted.
2490         (-[WebPlaybackControlsManager setAudioMediaSelectionOptions:]): Deleted.
2491         (-[WebPlaybackControlsManager currentAudioMediaSelectionOption]): Deleted.
2492         (-[WebPlaybackControlsManager setCurrentAudioMediaSelectionOption:]): Deleted.
2493         (-[WebPlaybackControlsManager legibleMediaSelectionOptions]): Deleted.
2494         (-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:]): Deleted.
2495         (-[WebPlaybackControlsManager currentLegibleMediaSelectionOption]): Deleted.
2496         (-[WebPlaybackControlsManager setCurrentLegibleMediaSelectionOption:]): Deleted.
2497         (-[WebPlaybackControlsManager cancelThumbnailAndAudioAmplitudeSampleGeneration]): Deleted.
2498         (WebCore::mediaSelectionOptions): Deleted.
2499
2500 2016-04-21  Said Abou-Hallawa  <sabouhallawa@apple.com>
2501
2502         REGRESSION(198782): ImageSource::subsamplingLevelForScale() does not cache the MaximumSubsamplingLevel for this ImageSource
2503         https://bugs.webkit.org/show_bug.cgi?id=156766
2504
2505         Reviewed by Darin Adler.
2506
2507         Ensure the MaximumSubsamplingLevel for the ImageSource is calculated
2508         only once and is cached for subsequent uses. 
2509         
2510         The image subsampling is on by default only for iOS. So the and this
2511         patch currently affects the iOS port.
2512
2513         * platform/graphics/ImageSource.cpp:
2514         (WebCore::ImageSource::cacheMetadata): Cache m_maximumSubsamplingLevel.
2515         Use m_frameCount as a flag for having_the_cache_done.
2516         (WebCore::ImageSource::subsamplingLevelForScale): Call cacheMetadata()
2517         before using m_maximumSubsamplingLevel.
2518         (WebCore::ImageSource::frameCount): Call cacheMetadata() before returning
2519         m_frameCount.
2520         * platform/graphics/ImageSource.h:
2521
2522 2016-04-21  Antoine Quint  <graouts@apple.com>
2523
2524         Creating a large number of WebGL contexts should recycle older contexts
2525         https://bugs.webkit.org/show_bug.cgi?id=156689
2526         <rdar://problem/19535330>
2527
2528         Reviewed by Dean Jackson.
2529
2530         We used to stop creating WebGL contexts once a maximum of 64 WebGL contexts had been
2531         created on a page. Other browsers have a limit of 16 concurrent active WebGL contexts
2532         and they lose older contexts when the developer creates a new context, logging a warning
2533         to the console. We now follow the same approach.
2534
2535         Tests: webgl/max-active-contexts-console-warning.html
2536                webgl/max-active-contexts-gc.html
2537                webgl/max-active-contexts-oldest-context-lost.html
2538                webgl/max-active-contexts-webglcontextlost-prevent-default.html
2539
2540         * html/canvas/WebGLRenderingContextBase.cpp:
2541         (WebCore::WebGLRenderingContextBase::recycleContext):
2542
2543         Prints a warning message to the console indicating that an older WebGL context
2544         will be lost to accomodate for the active contexts limit being reached and loses
2545         the provided context in a way that it may not be recovered by calling `event.preventDefault()`
2546         in the `webglcontextlost` event handler. Finally, we destroy the associated GraphicsContext3D
2547         since it will no longer be useful and it may hold large Open GL resources.
2548
2549         * html/canvas/WebGLRenderingContextBase.h:
2550         * platform/graphics/GraphicsContext3D.h:
2551
2552         Changed GraphicsContext3D::create to return RefPtr instead of PassRefPtr.
2553
2554         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2555         (WebCore::GraphicsContext3D::create):
2556         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2557         (WebCore::GraphicsContext3D::create):
2558         * platform/graphics/mac/GraphicsContext3DMac.mm:
2559         (WebCore::activeContexts):
2560         (WebCore::GraphicsContext3D::create):
2561
2562         Check if we are at the active contexts limit (16) and recycle the oldest context
2563         in our active contexts list. Calling recycleContext() on a context will call the
2564         GraphicsContext3D destructor and remove it from the active contexts list there.
2565
2566         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2567
2568         Remove the deconstructed context from the active contexts list.
2569
2570         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2571         (WebCore::GraphicsContext3D::recycleContext):
2572         * platform/graphics/win/GraphicsContext3DWin.cpp:
2573         (WebCore::GraphicsContext3D::create):
2574
2575 2016-04-21  Dave Hyatt  <hyatt@apple.com>
2576
2577         Don't hyphenate the last word in a paragraph of text.
2578         https://bugs.webkit.org/show_bug.cgi?id=156803
2579
2580         Reviewed by Simon Fraser.
2581
2582         Added fast/text/hyphenate-avoid-orphaned-word.html
2583
2584         * rendering/RenderText.h:
2585         * rendering/line/BreakingContext.h:
2586         (WebCore::BreakingContext::handleText):
2587
2588 2016-04-21  Chris Dumez  <cdumez@apple.com>
2589
2590         Drop [UsePointersEvenForNonNullableObjectArguments] from Range
2591         https://bugs.webkit.org/show_bug.cgi?id=156805
2592
2593         Reviewed by Youenn Fablet.
2594
2595         No new tests, no web-exposed behavior change.
2596
2597         * accessibility/AXObjectCache.cpp:
2598         (WebCore::AXObjectCache::rangeForNodeContents):
2599         (WebCore::characterOffsetsInOrder):
2600         (WebCore::setRangeStartOrEndWithCharacterOffset):
2601         (WebCore::AXObjectCache::startOrEndCharacterOffsetForRange):
2602         (WebCore::AXObjectCache::previousBoundary):
2603         * accessibility/AccessibilityObject.cpp:
2604         (WebCore::AccessibilityObject::selectText):
2605         * accessibility/AccessibilityRenderObject.cpp:
2606         (WebCore::AccessibilityRenderObject::documentBasedSelectedTextRange):
2607         * dom/Node.cpp:
2608         (WebCore::Node::textRects):
2609         * dom/Range.cpp:
2610         (WebCore::Range::Range):
2611         (WebCore::Range::setDocument):
2612         (WebCore::Range::setStart):
2613         (WebCore::Range::setEnd):
2614         (WebCore::Range::isPointInRange):
2615         (WebCore::Range::comparePoint):
2616         (WebCore::Range::compareNode):
2617         (WebCore::Range::compareBoundaryPoints):
2618         (WebCore::Range::compareBoundaryPointsForBindings):
2619         (WebCore::Range::intersectsNode):
2620         (WebCore::Range::processContents):
2621         (WebCore::Range::insertNode):
2622         (WebCore::Range::checkNodeWOffset):
2623         (WebCore::Range::setStartAfter):
2624         (WebCore::Range::setEndBefore):
2625         (WebCore::Range::setEndAfter):
2626         (WebCore::Range::selectNode):
2627         (WebCore::Range::selectNodeContents):
2628         (WebCore::Range::surroundContents):
2629         (WebCore::Range::setStartBefore):
2630         (WebCore::Range::contains):
2631         (WebCore::rangesOverlap):
2632         (WebCore::rangeOfContents):
2633         (WebCore::boundaryNodeChildrenWillBeRemoved):
2634         (WebCore::boundaryTextNodesMerged):
2635         (WebCore::boundaryTextNodesSplit):
2636         (WebCore::Range::expand):
2637         (WebCore::checkForDifferentRootContainer): Deleted.
2638         (WebCore::highestAncestorUnderCommonRoot): Deleted.
2639         (WebCore::childOfCommonRootBeforeOffset): Deleted.
2640         (WebCore::deleteCharacterData): Deleted.
2641         (WebCore::Range::toString): Deleted.
2642         (WebCore::Range::toHTML): Deleted.
2643         (WebCore::Range::text): Deleted.
2644         (WebCore::Range::cloneRange): Deleted.
2645         (WebCore::Range::absoluteTextRects): Deleted.
2646         (WebCore::Range::absoluteTextQuads): Deleted.
2647         (WebCore::boundaryNodeChildrenChanged): Deleted.
2648         (WebCore::boundaryNodeWillBeRemoved): Deleted.
2649         (WebCore::Range::nodeWillBeRemoved): Deleted.
2650         (WebCore::boundaryTextRemoved): Deleted.
2651         (WebCore::Range::getBoundingClientRect): Deleted.
2652         (WebCore::Range::getBorderAndTextQuads): Deleted.
2653         * dom/Range.h:
2654         * dom/Range.idl:
2655         * dom/RangeBoundaryPoint.h:
2656         (WebCore::RangeBoundaryPoint::set):
2657         (WebCore::RangeBoundaryPoint::setToStartOfNode):
2658         (WebCore::RangeBoundaryPoint::setToEndOfNode):
2659         * editing/AlternativeTextController.cpp:
2660         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2661         * editing/ApplyStyleCommand.cpp:
2662         (WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle):
2663         * editing/Editor.cpp:
2664         (WebCore::Editor::advanceToNextMisspelling):
2665         (WebCore::Editor::rangeOfString):
2666         (WebCore::isFrameInRange):
2667         (WebCore::Editor::countMatchesForText):
2668         * editing/EditorCommand.cpp:
2669         (WebCore::unionDOMRanges):
2670         (WebCore::executeDeleteToMark):
2671         (WebCore::executeSelectToMark):
2672         * editing/FormatBlockCommand.cpp:
2673         (WebCore::FormatBlockCommand::formatRange):
2674         * editing/FrameSelection.cpp:
2675         (WebCore::FrameSelection::respondToNodeModification):
2676         * editing/InsertListCommand.cpp:
2677         (WebCore::InsertListCommand::doApplyForSingleParagraph):
2678         * editing/TextCheckingHelper.cpp:
2679         (WebCore::TextCheckingParagraph::offsetTo):
2680         * editing/TextIterator.cpp:
2681         (WebCore::CharacterIterator::range):
2682         (WebCore::BackwardsCharacterIterator::range):
2683         (WebCore::TextIterator::rangeFromLocationAndLength):
2684         (WebCore::TextIterator::getLocationAndLengthFromRange):
2685         (WebCore::findPlainText):
2686         * editing/VisiblePosition.cpp:
2687         (WebCore::setStart):
2688         (WebCore::setEnd):
2689         * editing/VisibleSelection.cpp:
2690         (WebCore::makeSearchRange):
2691         * editing/VisibleUnits.cpp:
2692         (WebCore::previousBoundary):
2693         (WebCore::nextBoundary):
2694         * editing/htmlediting.cpp:
2695         (WebCore::visiblePositionForIndexUsingCharacterIterator):
2696         (WebCore::isNodeVisiblyContainedWithin):
2697         * editing/htmlediting.h:
2698         * editing/mac/EditorMac.mm:
2699         (WebCore::Editor::adjustedSelectionRange):
2700         * page/ContextMenuController.cpp:
2701         (WebCore::ContextMenuController::contextMenuItemSelected):
2702         * page/DOMSelection.cpp:
2703         (WebCore::DOMSelection::addRange):
2704         * page/DragController.cpp:
2705         (WebCore::selectElement):
2706         * page/EventHandler.cpp:
2707         (WebCore::EventHandler::dispatchMouseEvent):
2708         * page/Page.cpp:
2709         (WebCore::Page::findStringMatchingRanges):
2710         * page/TextIndicator.cpp:
2711         (WebCore::hasNonInlineOrReplacedElements):
2712         * rendering/RenderNamedFlowThread.cpp:
2713         (WebCore::RenderNamedFlowThread::getRanges):
2714
2715 2016-04-21  Chris Dumez  <cdumez@apple.com>
2716
2717         Drop [UsePointersEvenForNonNullableObjectArguments] from DOMURL
2718         https://bugs.webkit.org/show_bug.cgi?id=156797
2719
2720         Reviewed by Youenn Fablet.
2721
2722         * html/DOMURL.cpp:
2723         (WebCore::DOMURL::create):
2724         * html/DOMURL.h:
2725         * html/DOMURL.idl:
2726
2727 2016-04-21  Claudio Saavedra  <csaavedra@igalia.com>
2728
2729         [GTK][EFL] Move non-glib/gtk platform implementations out of platform/gtk
2730         https://bugs.webkit.org/show_bug.cgi?id=156847
2731
2732         Reviewed by Carlos Garcia Campos.
2733
2734         The Language and Logging implementation don't really need glib, so
2735         rework them and move them to a new platform/unix directory so that
2736         they can be shared among Unix ports.
2737
2738         * PlatformEfl.cmake: Use the unix version.
2739         * PlatformGTK.cmake: Same.
2740         * platform/efl/LanguageEfl.cpp: Removed.
2741         * platform/efl/LoggingEfl.cpp: Removed.
2742         * platform/unix/LanguageUnix.cpp: Renamed from Source/WebCore/platform/gtk/LanguageGtk.cpp.
2743         (WebCore::platformLanguage):
2744         (WebCore::platformUserPreferredLanguages):
2745         * platform/unix/LoggingUnix.cpp: Renamed from Source/WebCore/platform/gtk/LoggingGtk.cpp.
2746         (WebCore::logLevelString):
2747
2748 2016-04-21  Nan Wang  <n_wang@apple.com>
2749
2750         AX: stringForTextMarkerRange returning empty string for document range
2751         https://bugs.webkit.org/show_bug.cgi?id=156819
2752
2753         Reviewed by Chris Fleizach.
2754
2755         Set text marker data with CharacterOffset when VisiblePosition is having PositionIsAfterAnchor
2756         or PositionIsAfterChildren anchor type, so that the character offset corresponds to the anchored
2757         node.
2758
2759         Test: accessibility/mac/text-marker-string-for-document-range.html
2760
2761         * accessibility/AXObjectCache.cpp:
2762         (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
2763
2764 2016-04-20  Chris Dumez  <cdumez@apple.com>
2765
2766         Crash under WebCore::TextIterator::subrange()
2767         https://bugs.webkit.org/show_bug.cgi?id=156809
2768         <rdar://problem/21102730>
2769
2770         Reviewed by Ryosuke Niwa.
2771
2772         TextIterator::rangeFromLocationAndLength() may return null. However, we
2773         failed to do a null check before calling TextIterator::subrange() with
2774         that range.
2775
2776         No new tests, do not know how to reproduce.
2777
2778         * editing/AlternativeTextController.cpp:
2779         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
2780
2781 2016-04-20  Brady Eidson  <beidson@apple.com>
2782
2783         Modern IDB (Workers): Remove IDBRequest/IDBOpenDBRequest's requirement to get an IDBServerConnection around.
2784         https://bugs.webkit.org/show_bug.cgi?id=156826
2785
2786         Reviewed by Alex Christensen.
2787
2788         No new tests (No behavior change, existing tests pass).
2789
2790         This doesn't appear to do much but make things a little more complicated, but it's the first of a few 
2791         small pushes in the right direction.
2792         
2793         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2794         (WebCore::IDBOpenDBRequest::maybeCreateDeleteRequest):
2795         (WebCore::IDBOpenDBRequest::maybeCreateOpenRequest):
2796         (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
2797         (WebCore::IDBOpenDBRequest::onSuccess):
2798         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
2799         (WebCore::IDBOpenDBRequest::requestCompleted):
2800         (WebCore::IDBOpenDBRequest::createDeleteRequest): Deleted.
2801         (WebCore::IDBOpenDBRequest::createOpenRequest): Deleted.
2802         * Modules/indexeddb/IDBOpenDBRequest.h:
2803         
2804         * Modules/indexeddb/IDBRequest.cpp:
2805         (WebCore::IDBRequest::IDBRequest):
2806         (WebCore::IDBRequest::connectionToServer):
2807         * Modules/indexeddb/IDBRequest.h:
2808         (WebCore::IDBRequest::connection): Deleted.
2809         
2810         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
2811         (WebCore::IDBClient::IDBConnectionProxy::IDBConnectionProxy):
2812         (WebCore::IDBClient::IDBConnectionProxy::connectionToServer):
2813         (WebCore::IDBClient::IDBConnectionProxy::openDatabase):
2814         (WebCore::IDBClient::IDBConnectionProxy::deleteDatabase):
2815         * Modules/indexeddb/client/IDBConnectionProxy.h:
2816         (WebCore::IDBClient::IDBConnectionProxy::serverConnectionIdentifier):
2817         
2818         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
2819         (WebCore::IDBResourceIdentifier::IDBResourceIdentifier):
2820         * Modules/indexeddb/shared/IDBResourceIdentifier.h:
2821
2822 2016-04-20  John Wilander  <wilander@apple.com>
2823
2824         Add Subresource Integrity as "Under consideration".
2825         https://bugs.webkit.org/show_bug.cgi?id=156800
2826
2827         Reviewed by Alexey Proskuryakov.
2828
2829         No new tests needed.
2830
2831         * features.json:
2832             Added an entry for Subresource Integrity.
2833
2834 2016-04-20  Anders Carlsson  <andersca@apple.com>
2835
2836         Get rid of a couple of uses of ApplicationCacheStorage::singleton()
2837         https://bugs.webkit.org/show_bug.cgi?id=156818
2838
2839         Reviewed by Geoffrey Garen.
2840
2841         * loader/appcache/ApplicationCache.cpp:
2842         (WebCore::ApplicationCache::addResource):
2843         * loader/appcache/ApplicationCacheGroup.h:
2844         (WebCore::ApplicationCacheGroup::storage):
2845         * testing/Internals.cpp:
2846         (WebCore::Internals::resetToConsistentState):
2847         (WebCore::Internals::setApplicationCacheOriginQuota):
2848
2849 2016-04-20  Brady Eidson  <beidson@apple.com>
2850
2851         Modern IDB (Workers): Introduce "IDBConnectionProxy" for future threading abstraction, and adopt it in IDBFactory.
2852         https://bugs.webkit.org/show_bug.cgi?id=156810
2853
2854         Reviewed by Alex Christensen.
2855
2856         No new tests (Covered by changes to existing tests).
2857
2858         Add the IDBConnectionProxy object, including the ability to replicate IDBFactory functionality:
2859         * Modules/indexeddb/client/IDBConnectionProxy.cpp: Added.
2860         (WebCore::IDBClient::IDBConnectionProxy::IDBConnectionProxy):
2861         (WebCore::IDBClient::IDBConnectionProxy::openDatabase):
2862         (WebCore::IDBClient::IDBConnectionProxy::deleteDatabase):
2863         * Modules/indexeddb/client/IDBConnectionProxy.h: 
2864         
2865         Add pure virtual IDBConnectionProxy accessor:
2866         * dom/ScriptExecutionContext.h: 
2867
2868         Implement it:
2869         * dom/Document.cpp:
2870         (WebCore::Document::idbConnectionProxy):
2871         * dom/Document.h:
2872         
2873         Implement it:
2874         * workers/WorkerGlobalScope.cpp:
2875         (WebCore::WorkerGlobalScope::idbConnectionProxy):
2876         * workers/WorkerGlobalScope.h:
2877         
2878         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
2879         (WebCore::DOMWindowIndexedDatabase::indexedDB):
2880
2881
2882         Don't keep a reference to IDBConnectionToServer, but rather get at the context's IDBConnectionProxy:
2883         * Modules/indexeddb/IDBFactory.cpp:
2884         (WebCore::IDBFactory::create):
2885         (WebCore::IDBFactory::IDBFactory):
2886         (WebCore::IDBFactory::open):
2887         (WebCore::IDBFactory::openInternal):
2888         (WebCore::IDBFactory::deleteDatabase):
2889         * Modules/indexeddb/IDBFactory.h:
2890         * Modules/indexeddb/IDBFactory.idl:
2891
2892         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
2893         (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
2894
2895         * Modules/indexeddb/client/IDBConnectionToServer.h:
2896
2897         * inspector/InspectorIndexedDBAgent.cpp:
2898
2899         * CMakeLists.txt:
2900         * WebCore.xcodeproj/project.pbxproj:
2901
2902 2016-04-20  Chris Dumez  <cdumez@apple.com>
2903
2904         Use Optional<size_t> for OrderIterator::m_orderIndex instead of int
2905         https://bugs.webkit.org/show_bug.cgi?id=156796
2906
2907         Reviewed by Anders Carlsson.
2908
2909         Use Optional<size_t> for OrderIterator::m_orderIndex instead of int
2910         (with invalid value of -1). m_orderIndex a vector index and therefore
2911         is in the range of an unsigned (type used internally by Vector, even
2912         though the index is exposed as size_t). Therefore, assigning it to an
2913         int is unsafe as it may overflow.
2914
2915         This may fix <rdar://problem/23410338> which is a top crasher.
2916
2917         * rendering/OrderIterator.cpp:
2918         (WebCore::OrderIterator::next):
2919         (WebCore::OrderIterator::reset):
2920         * rendering/OrderIterator.h:
2921
2922 2016-04-20  Chris Dumez  <cdumez@apple.com>
2923
2924         Crash under needsAppleMailPaginationQuirk()
2925         https://bugs.webkit.org/show_bug.cgi?id=156806
2926         <rdar://problem/23323479>
2927
2928         Reviewed by Simon Fraser.
2929
2930         Add check for element()->hasID() before calling element()->idForStyleResolution()
2931         so that we don't dereference a potentially null element()->elementData().
2932         Also stop repeatedly atomizing "messageContentContainer" and leverage
2933         the operator==(const AtomicString&, const char*) instead for performance.
2934
2935         * rendering/RenderBlockFlow.cpp:
2936         (WebCore::needsAppleMailPaginationQuirk):
2937
2938 2016-04-20  Brady Eidson  <beidson@apple.com>
2939
2940         Attempt to fix non-INDEXED_DATABASE_IN_WORKERS builds after r199779
2941
2942         * testing/InternalSettings.cpp:
2943         (WebCore::InternalSettings::Backup::Backup):
2944         (WebCore::InternalSettings::Backup::restoreTo):
2945         (WebCore::InternalSettings::setIndexedDBWorkersEnabled):
2946         * testing/InternalSettings.h:
2947
2948 2016-04-20  Chris Dumez  <cdumez@apple.com>
2949
2950         Potential overflow in RenderLayer::hitTestList()
2951         https://bugs.webkit.org/show_bug.cgi?id=156804
2952
2953         Reviewed by Simon Fraser.
2954
2955         Use size_t type instead of int to iterate over the Vector to make sure
2956         we don't overflow. This is a speculative fix for <rdar://problem/23249479>.
2957
2958         * rendering/RenderLayer.cpp:
2959         (WebCore::RenderLayer::hitTestList):
2960
2961 2016-04-20  Brady Eidson  <beidson@apple.com>
2962
2963         Modern IDB (Workers): Enable INDEXED_DATABASE_IN_WORKERS compile time flag, but disabled in RuntimeEnabledFeatures.
2964         https://bugs.webkit.org/show_bug.cgi?id=156782
2965
2966         Reviewed by Alex Christensen.
2967
2968         Test: storage/indexeddb/modern/workers-disabled.html
2969               storage/indexeddb/modern/workers-enable.html
2970
2971         * Configurations/FeatureDefines.xcconfig:
2972
2973         ScriptExecutionContext shouldn't really be supplementable:
2974         * dom/ScriptExecutionContext.h:
2975
2976         WorkerGlobalScope should be supplementable.
2977         Also modernize this archaic header (pragma once, and re-indent):
2978         * workers/WorkerGlobalScope.h:
2979         
2980         Update for WorkerGlobalScope now being directly supplementable:
2981         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
2982         (WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
2983         (WebCore::WorkerGlobalScopeIndexedDatabase::from):
2984         (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
2985         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:
2986         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl:
2987         * Modules/notifications/WorkerGlobalScopeNotifications.cpp:
2988         (WebCore::WorkerGlobalScopeNotifications::WorkerGlobalScopeNotifications):
2989         (WebCore::WorkerGlobalScopeNotifications::from):
2990         (WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
2991         * Modules/notifications/WorkerGlobalScopeNotifications.h:
2992         
2993         Expose IndexedDBWorkers to RuntimeEnabledFeatures:
2994         * bindings/generic/RuntimeEnabledFeatures.cpp:
2995         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
2996         * bindings/generic/RuntimeEnabledFeatures.h:
2997         (WebCore::RuntimeEnabledFeatures::setIndexedDBWorkersEnabled):
2998         (WebCore::RuntimeEnabledFeatures::indexedDBWorkersEnabled):
2999
3000         Expose IndexedDBWorkers to InternalSettings:
3001         * testing/InternalSettings.cpp:
3002         (WebCore::InternalSettings::Backup::Backup):
3003         (WebCore::InternalSettings::Backup::restoreTo):
3004         (WebCore::InternalSettings::setIndexedDBWorkersEnabled):
3005         * testing/InternalSettings.h:
3006         * testing/InternalSettings.idl:
3007
3008 2016-04-20  Dave Hyatt  <hyatt@apple.com>
3009
3010         Hangable punctuation measurement using the wrong indices.
3011         https://bugs.webkit.org/show_bug.cgi?id=155899
3012
3013         Reviewed by Simon Fraser.
3014
3015         New tests in fast/text.
3016
3017         * rendering/RenderBlockFlow.cpp:
3018         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
3019         * rendering/RenderText.cpp:
3020         (WebCore::RenderText::hangablePunctuationStartWidth):
3021         (WebCore::RenderText::hangablePunctuationEndWidth):
3022         (WebCore::RenderText::isHangableStopOrComma):
3023
3024 2016-04-20  Chris Dumez  <cdumez@apple.com>
3025
3026         Drop [UsePointersEvenForNonNullableObjectArguments] from several Canvas interfaces
3027         https://bugs.webkit.org/show_bug.cgi?id=156781
3028
3029         Reviewed by Darin Adler.
3030
3031         * html/canvas/CanvasRenderingContext2D.cpp:
3032         (WebCore::CanvasRenderingContext2D::fill):
3033         (WebCore::CanvasRenderingContext2D::stroke):
3034         (WebCore::CanvasRenderingContext2D::clip):
3035         (WebCore::CanvasRenderingContext2D::isPointInPath):
3036         (WebCore::CanvasRenderingContext2D::isPointInStroke):
3037         (WebCore::size):
3038         (WebCore::CanvasRenderingContext2D::drawImage):
3039         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
3040         (WebCore::CanvasRenderingContext2D::drawFocusIfNeeded):
3041         * html/canvas/CanvasRenderingContext2D.h:
3042         * html/canvas/CanvasRenderingContext2D.idl:
3043         * html/canvas/DOMPath.h:
3044         * html/canvas/DOMPath.idl:
3045         * html/canvas/WebGLDebugShaders.cpp:
3046         (WebCore::WebGLDebugShaders::getTranslatedShaderSource):
3047         * html/canvas/WebGLDebugShaders.h:
3048         * html/canvas/WebGLDebugShaders.idl:
3049
3050 2016-04-20  Chris Dumez  <cdumez@apple.com>
3051
3052         Drop [UsePointersEvenForNonNullableObjectArguments] from WebAudio
3053         https://bugs.webkit.org/show_bug.cgi?id=156777
3054
3055         Reviewed by Darin Adler.
3056
3057         Drop [UsePointersEvenForNonNullableObjectArguments] from WebAudio and
3058         modernize the interface a bit.
3059
3060         There is no major Web-exposed behavioral change except for
3061         the exception type thrown when passing null (now always TypeError).
3062         Tests were updated to add coverage for this.
3063
3064         * Modules/webaudio/AsyncAudioDecoder.cpp:
3065         (WebCore::AsyncAudioDecoder::decodeAsync):
3066         (WebCore::AsyncAudioDecoder::DecodingTask::DecodingTask):
3067         (WebCore::AsyncAudioDecoder::DecodingTask::decode): Deleted.
3068         * Modules/webaudio/AsyncAudioDecoder.h:
3069         (WebCore::AsyncAudioDecoder::DecodingTask::audioData):
3070         * Modules/webaudio/AudioContext.cpp:
3071         (WebCore::AudioContext::lazyInitialize):
3072         (WebCore::AudioContext::createBuffer):
3073         (WebCore::AudioContext::decodeAudioData):
3074         (WebCore::AudioContext::createBufferSource):
3075         (WebCore::AudioContext::createMediaElementSource):
3076         (WebCore::AudioContext::createMediaStreamSource):
3077         (WebCore::AudioContext::createMediaStreamDestination):
3078         (WebCore::AudioContext::createScriptProcessor):
3079         (WebCore::AudioContext::createBiquadFilter):
3080         (WebCore::AudioContext::createWaveShaper):
3081         (WebCore::AudioContext::createPanner):
3082         (WebCore::AudioContext::createConvolver):
3083         (WebCore::AudioContext::createDynamicsCompressor):
3084         (WebCore::AudioContext::createAnalyser):
3085         (WebCore::AudioContext::createGain):
3086         (WebCore::AudioContext::createDelay):
3087         (WebCore::AudioContext::createChannelSplitter):
3088         (WebCore::AudioContext::createChannelMerger):
3089         (WebCore::AudioContext::createOscillator):
3090         (WebCore::AudioContext::createPeriodicWave):
3091         (WebCore::AudioContext::derefFinishedSourceNodes):
3092         (WebCore::AudioContext::refNode):
3093         (WebCore::AudioContext::derefNode):
3094         (WebCore::AudioContext::notifyNodeFinishedProcessing): Deleted.
3095         (WebCore::AudioContext::derefUnfinishedSourceNodes): Deleted.
3096         (WebCore::AudioContext::lock): Deleted.
3097         * Modules/webaudio/AudioContext.h:
3098         * Modules/webaudio/AudioContext.idl:
3099         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
3100         (WebCore::MediaElementAudioSourceNode::create):
3101         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
3102         (WebCore::MediaElementAudioSourceNode::process):
3103         * Modules/webaudio/MediaElementAudioSourceNode.h:
3104         (WebCore::MediaElementAudioSourceNode::mediaElement):
3105         * Modules/webaudio/OscillatorNode.idl:
3106
3107 2016-04-20  Brady Eidson  <beidson@apple.com>
3108
3109         Addressing additional review feedback for:
3110         Modern IDB: Lots of IDB bindings cleanup (including making IDBVersionChangeEvent constructible).
3111         https://bugs.webkit.org/show_bug.cgi?id=156760
3112
3113         * Modules/indexeddb/IDBVersionChangeEvent.h:
3114
3115 2016-04-20  Frederic Wang  <fwang@igalia.com>
3116
3117         Use OpenType MATH fonts by default
3118         https://bugs.webkit.org/show_bug.cgi?id=133603
3119
3120         Reviewed by Alejandro G. Castro.
3121
3122         No new tests. This is already tested by pixel tests like roots.xhtml.
3123         However, new math fonts are not used during test execution.
3124
3125         * css/mathml.css:
3126         (math): We use only a list of known OpenType fonts with a MATH table but keep some pre-installed fallback fonts for OS X and iOS.
3127
3128 2016-04-20  Claudio Saavedra  <csaavedra@igalia.com>
3129
3130         [GTK] Move GTK+-independent platform code to platform/glib
3131         https://bugs.webkit.org/show_bug.cgi?id=156787
3132
3133         Reviewed by Carlos Garcia Campos.
3134
3135         There is plenty of code in platform/gtk that is independent from the GTK+ library.
3136         Move those files to platform/glib so that they can be reused by other GLib-based ports.
3137
3138         Also clean some style warnings in those files.
3139
3140         * PlatformGTK.cmake: Move the files.
3141         * platform/glib/EventLoopGlib.cpp: Renamed from Source/WebCore/platform/gtk/EventLoopGtk.cpp.
3142         (WebCore::EventLoop::cycle):
3143         * platform/glib/FileSystemGlib.cpp: Renamed from Source/WebCore/platform/gtk/FileSystemGtk.cpp.
3144         (WebCore::filenameToString):
3145         (WebCore::unescapedFilename):
3146         (WebCore::fileSystemRepresentation):
3147         (WebCore::filenameForDisplay):
3148         (WebCore::fileExists):
3149         (WebCore::deleteFile):
3150         (WebCore::deleteEmptyDirectory):
3151         (WebCore::getFileStat):
3152         (WebCore::getFileSize):
3153         (WebCore::getFileCreationTime):
3154         (WebCore::getFileModificationTime):
3155         (WebCore::getFileMetadata):
3156         (WebCore::pathByAppendingComponent):
3157         (WebCore::makeAllDirectories):
3158         (WebCore::homeDirectoryPath):
3159         (WebCore::pathGetFileName):
3160         (WebCore::applicationDirectoryPath):
3161         (WebCore::sharedResourcesPath):
3162         (WebCore::getVolumeFreeSizeForPath):
3163         (WebCore::directoryName):
3164         (WebCore::listDirectory):
3165         (WebCore::openTemporaryFile):
3166         (WebCore::openFile):
3167         (WebCore::closeFile):
3168         (WebCore::seekFile):
3169         (WebCore::writeToFile):
3170         (WebCore::readFromFile):
3171         (WebCore::unloadModule):
3172         (WebCore::hardLinkOrCopyFile):
3173         * platform/glib/GamepadsGlib.cpp: Renamed from Source/WebCore/platform/gtk/GamepadsGtk.cpp.
3174         (WebCore::GamepadDeviceGlib::GamepadDeviceGlib):
3175         (WebCore::GamepadDeviceGlib::~GamepadDeviceGlib):
3176         (WebCore::GamepadDeviceGlib::readCallback):
3177         (WebCore::GamepadsGlib::GamepadsGlib):
3178         (WebCore::GamepadsGlib::~GamepadsGlib):
3179         (WebCore::GamepadsGlib::registerDevice):
3180         (WebCore::GamepadsGlib::unregisterDevice):
3181         (WebCore::GamepadsGlib::updateGamepadList):
3182         (WebCore::GamepadsGlib::onUEventCallback):
3183         (WebCore::GamepadsGlib::isGamepadDevice):
3184         (WebCore::sampleGamepads):
3185         * platform/glib/SharedBufferGlib.cpp: Renamed from Source/WebCore/platform/gtk/SharedBufferGtk.cpp.
3186         (WebCore::SharedBuffer::createFromReadingFile):
3187
3188 2016-04-20  Frederic Wang  <fwang@igalia.com>
3189
3190         Refactor RenderMathMLSpace to avoid using flexbox
3191         https://bugs.webkit.org/show_bug.cgi?id=155168
3192
3193         Reviewed by Martin Robinson.
3194
3195         No new tests, already covered by existing tests. The behavior of mspace-prefered-width-expected is not specified by the MathML recommendation, we update that test to match our new behavior.
3196
3197         * rendering/mathml/RenderMathMLSpace.cpp: Implement layout functions without passing by flebox.
3198         (WebCore::RenderMathMLSpace::computePreferredLogicalWidths): Implement this function.
3199         (WebCore::RenderMathMLSpace::layoutBlock): Implement this function.
3200         (WebCore::RenderMathMLSpace::computeIntrinsicLogicalWidths): Deleted.
3201         (WebCore::RenderMathMLSpace::updateLogicalWidth): Deleted.
3202         (WebCore::RenderMathMLSpace::updateLogicalHeight): Deleted.
3203         * rendering/mathml/RenderMathMLSpace.h: Update function declarations.
3204
3205 2016-04-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3206
3207         [Cairo] Crash in GraphicsContext::drawFocusRing when painting is disabled
3208         https://bugs.webkit.org/show_bug.cgi?id=156785
3209
3210         Reviewed by Žan Doberšek.
3211
3212         This happens for example when view state changes to focus and paint is called from
3213         FrameView::updateControlTints() with a graphics context that doesn't have a platform context. Layout test
3214         fast/images/image-map-outline-with-scale-transform.html sometimes crashes because of this.
3215
3216         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3217         (WebCore::GraphicsContext::drawFocusRing): Return early if painting is disabled.
3218
3219 2016-04-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3220
3221         REGRESSION(r198782): SHOULD NEVER BE REACHED failure in ImageSource::setData since r198782
3222         https://bugs.webkit.org/show_bug.cgi?id=156690
3223
3224         Reviewed by Michael Catanzaro.
3225
3226         The assertion is wrong, because it assumes that ImageDecoder::create() always returns a valid pointer, which is
3227         only true for the CG implementation. The non CG implementation can return nullptr if there isn't enough data to
3228         figure out the image format or if the image format is not supported. This is causing several crashes in the
3229         debug bots.
3230
3231         * platform/graphics/ImageSource.cpp:
3232         (WebCore::ImageSource::setData): Remove the invalid ASSERT and return early if we fail to create the decoder.
3233         (WebCore::ImageSource::ensureDecoderIsCreated): Deleted.
3234         * platform/graphics/ImageSource.h:
3235
3236 2016-04-19  Brent Fulgham  <bfulgham@apple.com>
3237
3238         Remove remaining bits of dynamic <link> rel='icon' loading
3239         https://bugs.webkit.org/show_bug.cgi?id=156727
3240
3241         Reviewed by Darin Adler.
3242
3243         Don't call 'shouldLoadLink' for 'icon' link types. It performs no
3244         useful checks for 'icon' types, and emits the non-standard
3245         'onbeforeload' event.
3246
3247         This work finishes up https://webkit.org/b/153151, where we removed
3248         FrameLoaderClient::dispatchDidChangeIcons() and related code.
3249
3250         Test: webarchive/test-link-rel-subresource-beforeload.html
3251
3252         * loader/LinkLoader.cpp:
3253         (WebCore::LinkLoader::loadLink): Remove unneeded call to 'shouldLoadLink'.
3254
3255 2016-04-19  Chris Dumez  <cdumez@apple.com>
3256
3257         AudioBufferSourceNode.buffer should be nullable
3258         https://bugs.webkit.org/show_bug.cgi?id=156769
3259
3260         Reviewed by Darin Adler.
3261
3262         AudioBufferSourceNode.buffer should be nullable as per the
3263         specification:
3264         https://webaudio.github.io/web-audio-api/#AudioBufferSourceNode
3265
3266         Our implementation was initially returning null when getting
3267         AudioBufferSourceNode.buffer, which is correct. However, it would
3268         throw a TypeError when trying to set the attribute to null. Our
3269         implementation setter actually supported setting the buffer to
3270         null but the custom bindings for the setter would not.
3271
3272         This patch does the following:
3273         - Get rid of the custom bindings for the AudioBufferSourceNode.buffer
3274           setter. We can have the bindings generator generate the same code
3275           by using [StrictTypeChecking]. The custom bindinds were also throwing
3276           a TypeError if the input AudioBuffer had too many channels but this
3277           does not seem to be possible.
3278         - Mark AudioBufferSourceNode.buffer as nullable in the IDL so that
3279           we no longer throw when the JS tries to assign null, but instead
3280           calls AudioBufferSourceNode::setBuffer(nullptr)
3281
3282         No new test, updated webaudio/audiobuffersource-channels.html
3283
3284         * CMakeLists.txt:
3285         * Modules/webaudio/AudioBufferSourceNode.cpp:
3286         (WebCore::AudioBufferSourceNode::setBuffer):
3287         * Modules/webaudio/AudioBufferSourceNode.h:
3288         * Modules/webaudio/AudioBufferSourceNode.idl:
3289         * Modules/webaudio/AudioContext.h:
3290         * WebCore.xcodeproj/project.pbxproj:
3291         * bindings/js/JSAudioBufferSourceNodeCustom.cpp: Removed.
3292
3293 2016-04-19  Brady Eidson  <beidson@apple.com>
3294
3295         Modern IDB: Lots of IDB bindings cleanup (including making IDBVersionChangeEvent constructible).
3296         https://bugs.webkit.org/show_bug.cgi?id=156760
3297
3298         Reviewed by Darin Adler (and looked over by Chris Dumez and Alex Christensen).
3299
3300         Test: storage/indexeddb/modern/idbversionchangeevent-constructor.html
3301
3302         Add WorkerGlobalScopeConstructors to the xcodeproj:
3303         * WebCore.xcodeproj/project.pbxproj:
3304
3305         Remove the completely irrelevant webkit* prefixed constructors from DOMWindow:
3306         * page/DOMWindow.idl:
3307
3308         Remove the poor way most objects were exposed on the WorkerGlobalScope:
3309         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl:
3310
3311         Expose most of the objects on the WorkerGlobalScope the correct way:
3312         * Modules/indexeddb/IDBCursor.idl:
3313         * Modules/indexeddb/IDBCursorWithValue.idl:
3314         * Modules/indexeddb/IDBDatabase.idl:
3315         * Modules/indexeddb/IDBFactory.idl:
3316         * Modules/indexeddb/IDBIndex.idl:
3317         * Modules/indexeddb/IDBKeyRange.idl:
3318         * Modules/indexeddb/IDBObjectStore.idl:
3319         * Modules/indexeddb/IDBOpenDBRequest.idl:
3320         * Modules/indexeddb/IDBRequest.idl:
3321         * Modules/indexeddb/IDBTransaction.idl:
3322
3323         Make IDBVersionChangeEvent constructible:        
3324         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
3325         (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
3326         (WebCore::IDBVersionChangeEvent::newVersion): Deleted.
3327         * Modules/indexeddb/IDBVersionChangeEvent.h:
3328         * Modules/indexeddb/IDBVersionChangeEvent.idl:
3329
3330         * bindings/js/JSDictionary.h:
3331         (WebCore::JSDictionary::convertValue): Add a templated form of convertValue that
3332           handles Optional<>s.
3333
3334 2016-04-19  Alex Christensen  <achristensen@webkit.org>
3335
3336         Build fix after r199738
3337
3338         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3339         (WebCore::GraphicsContext3D::GraphicsContext3D):
3340         * platform/graphics/win/GraphicsContext3DWin.cpp:
3341         (WebCore::GraphicsContext3D::GraphicsContext3D):
3342
3343 2016-04-19  Keith Miller  <keith_miller@apple.com>
3344
3345         ObjcInstance::stringValue should not call NSObject's description method
3346         https://bugs.webkit.org/show_bug.cgi?id=156758
3347
3348         Reviewed by Geoffrey Garen.
3349
3350         This patch makes it so that we no longer call NSObject's description method without first
3351         swizzling the implementation for WebScriptObjects. We restore the incomming NSObject's
3352         description method once we have finished generating the string.
3353
3354         Test: platform/mac/fast/objc/webScriptObject-does-not-call-description-on-nsobject.html
3355
3356         * bridge/objc/objc_instance.mm:
3357         (swizzleNSObjectDescription):
3358         (ObjcInstance::stringValue):
3359
3360 2016-04-19  Alex Christensen  <achristensen@webkit.org>
3361
3362         Update ANGLE
3363         https://bugs.webkit.org/show_bug.cgi?id=156755
3364
3365         Reviewed by Dean Jackson.
3366
3367         * CMakeLists.txt:
3368         * platform/graphics/ANGLEWebKitBridge.h:
3369         (WebCore::ANGLEWebKitBridge::getResources):
3370         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3371         (WebCore::GraphicsContext3D::GraphicsContext3D):
3372         Continue to compile successfully with new ANGLE.
3373
3374 2016-04-19  Chris Dumez  <cdumez@apple.com>
3375
3376         Mark more classes as WTF_MAKE_FAST_ALLOCATED
3377         https://bugs.webkit.org/show_bug.cgi?id=156732
3378
3379         Reviewed by Darin Adler.
3380
3381         * css/CSSImageGeneratorValue.h:
3382         * css/DocumentRuleSets.h:
3383         * css/MediaQueryMatcher.h:
3384         * css/RuleFeature.h:
3385         * css/StyleResolver.h:
3386         * dom/ActiveDOMCallbackMicrotask.h:
3387         * dom/DocumentSharedObjectPool.h:
3388         * dom/MutationObserver.cpp:
3389         * dom/MutationObserverInterestGroup.h:
3390         * dom/MutationObserverRegistration.h:
3391         * dom/ScriptExecutionContext.cpp:
3392         * dom/SlotAssignment.h:
3393         * html/HTMLCollection.h:
3394         * html/canvas/CanvasRenderingContext2D.cpp:
3395         * html/parser/HTMLToken.h:
3396         * html/parser/XSSAuditorDelegate.h:
3397         * loader/FrameLoader.cpp:
3398         * loader/SubframeLoader.h:
3399         * page/AutoscrollController.h:
3400         * page/csp/ContentSecurityPolicySource.h:
3401         * platform/cf/RunLoopObserver.h:
3402         * platform/graphics/FloatQuad.h:
3403         * platform/graphics/FloatRoundedRect.h:
3404         * platform/graphics/IntSize.h:
3405         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
3406         * platform/graphics/cg/ImageDecoderCG.h:
3407         * platform/graphics/cocoa/IOSurface.h:
3408         * platform/graphics/displaylists/DisplayList.h:
3409         * platform/graphics/mac/ComplexTextController.h:
3410         * platform/graphics/mac/FontCustomPlatformData.h:
3411         * platform/mac/PowerObserverMac.h:
3412         * platform/network/DataURLDecoder.cpp:
3413         * platform/text/PlatformLocale.h:
3414         * rendering/TextAutosizer.h:
3415         * style/StyleUpdate.h:
3416         * xml/XMLHttpRequestUpload.h:
3417
3418 2016-04-18  Ada Chan  <adachan@apple.com>
3419
3420         Context menu items related to fullscreen should be specific to standard fullscreen
3421         https://bugs.webkit.org/show_bug.cgi?id=156723
3422         <rdar://problem/25452632>
3423
3424         Reviewed by Darin Adler.
3425
3426         Introduce HTMLMediaElement::isStandardFullscreen() that the HitTestResult code can use
3427         when handling the validation and selection of fullscreen-related context menu items.
3428
3429         * html/HTMLMediaElement.cpp:
3430         (WebCore::HTMLMediaElement::isStandardFullscreen):
3431         (WebCore::HTMLMediaElement::toggleStandardFullscreenState):
3432         Renamed to make it clear that it's for toggling standard fullscreen. Call the new
3433         HTMLMediaElement::isStandardFullscreen().
3434         * html/HTMLMediaElement.h:
3435         * rendering/HitTestResult.cpp:
3436         (WebCore::HitTestResult::mediaIsInFullscreen):
3437         Use HTMLMediaElement::isStandardFullscreen().
3438         (WebCore::HitTestResult::toggleMediaFullscreenState):
3439         Call the renamed HTMLMediaElement::toggleStandardFullscreenState().
3440
3441 2016-04-19  Brady Eidson  <beidson@apple.com>
3442
3443         Modern IDB: ObjectStore Blob Support.
3444         https://bugs.webkit.org/show_bug.cgi?id=143193
3445
3446         Reviewed by Alex Christensen.
3447
3448         Tests: imported/blink/storage/indexeddb/blob-basics-metadata.html
3449                imported/blink/storage/indexeddb/blob-delete-objectstore-db.html
3450                imported/blink/storage/indexeddb/blob-valid-after-deletion.html
3451                imported/blink/storage/indexeddb/blob-valid-before-commit.html
3452                imported/blink/storage/indexeddb/empty-blob-file.html
3453                storage/indexeddb/modern/blob-simple.html
3454
3455         Most of the work has been done already.
3456         
3457         Besides a handful of tweaks to that work, all this really does is remove the clause
3458         that prevents blob URLs from going into the database.
3459
3460         * Modules/indexeddb/IDBObjectStore.cpp:
3461         (WebCore::IDBObjectStore::putOrAdd): Only disallow blobs if private browsing is enabled
3462           (Making that work is already covered by another bug)
3463           
3464         * Modules/indexeddb/IDBTransaction.cpp:
3465         (WebCore::IDBTransaction::putOrAddOnServer):
3466