764c150f411078bcb24b6356d30d4a9d444dc60d
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-05-20  Antti Koivisto  <antti@apple.com>
2
3         Assertion failure in WebCore::BidiRun::BidiRun()
4         https://bugs.webkit.org/show_bug.cgi?id=145203
5         rdar://problem/20958973
6
7         Reviewed by Andreas Kling.
8
9         Test: fast/text/text-combine-crash.html
10
11         * rendering/line/BreakingContext.h:
12         (WebCore::BreakingContext::handleText):
13
14             Renove !isCombined() check. RenderCombineText::combineText() doesn't
15             do any work unless needed and text may become uncombined too.
16
17         * rendering/line/LineBreaker.cpp:
18         (WebCore::LineBreaker::skipLeadingWhitespace):
19
20             Same here.
21
22 2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
23
24         AudioContext resume/close/suspend should reject promises with a DOM exception in lieu of throwing exceptions
25         https://bugs.webkit.org/show_bug.cgi?id=145064
26
27         Reviewed by Darin Adler.
28
29         Rejecting resume/suspend/close promises with InvalidStateError values in case context is offline.
30         Removed unneeded calls to postTask for resolving/rejecting promises.
31         Adding promise rejection of DOM Exception values, 0 being equivalent of no error passed to reject callback.
32
33         Test: webaudio/audiocontext-promise-throwing.html
34
35         * Modules/webaudio/AudioContext.cpp:
36         (WebCore::AudioContext::suspendContext): Rejecting promise in lieu of throwing exception.
37         (WebCore::AudioContext::resumeContext): Ditto.
38         (WebCore::AudioContext::closeContext): Ditto.
39         * Modules/webaudio/AudioContext.h:
40         * bindings/js/JSAudioContextCustom.cpp:
41         (WebCore::JSAudioContext::suspend): Removing ExceptionCode handling.
42         (WebCore::JSAudioContext::resume): Ditto.
43         (WebCore::JSAudioContext::close): Ditto.
44         * bindings/js/JSDOMBinding.cpp:
45         (WebCore::createDOMException): Splitting DOM exception creation from throwing.
46         (WebCore::setDOMException): Ditto.
47         * bindings/js/JSDOMBinding.h: Adding createDOMException prototype.
48         * bindings/js/JSDOMPromise.h:
49         (WebCore::DeferredWrapper::reject<ExceptionCode>):
50
51 2015-05-20  Commit Queue  <commit-queue@webkit.org>
52
53         Unreviewed, rolling out r184645.
54         https://bugs.webkit.org/show_bug.cgi?id=145220
55
56         Broken build (Requested by jacob_nielsen on #webkit).
57
58         Reverted changeset:
59
60         "AX: AutoFill button is not accessible with VoiceOver"
61         https://bugs.webkit.org/show_bug.cgi?id=145200
62         http://trac.webkit.org/changeset/184645
63
64 2015-05-20  Daniel Bates  <dabates@apple.com>
65
66         AX: AutoFill button is not accessible with VoiceOver
67         https://bugs.webkit.org/show_bug.cgi?id=145200
68         <rdar://problem/20507480>
69
70         Reviewed by Chris Fleizach.
71
72         Add ARIA label and role attributes to the AutoFill button markup so that VoiceOver
73         can identify and interact with it.
74
75         Test: accessibility/input-auto-fill-button.html
76
77         * English.lproj/Localizable.strings: Add placeholder localized string for AutoFill button.
78         * html/TextFieldInputType.cpp:
79         (WebCore::TextFieldInputType::createAutoFillButton): Add ARIA label and role attributes.
80         * platform/LocalizedStrings.cpp:
81         (WebCore::AXAutoFillButtonText): Added; returns the localized string for the AutoFill button.
82         * platform/LocalizedStrings.h:
83         * platform/efl/LocalizedStringsEfl.cpp:
84         (WebCore::AXAutoFillButtonText): Ditto.
85         * platform/gtk/LocalizedStringsGtk.cpp:
86         (WebCore::AXAutoFillButtonText): Ditto.
87
88 2015-05-20  Alex Christensen  <achristensen@webkit.org>
89
90         [Content Extensions] Relax restrictions on triggers that match everything.
91         https://bugs.webkit.org/show_bug.cgi?id=145069
92
93         Reviewed by Benjamin Poulain.
94
95         Added API tests that cover the new functionality and test for correctness in behavior.
96
97         * contentextensions/CompiledContentExtension.cpp:
98         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
99         * contentextensions/ContentExtensionCompiler.cpp:
100         (WebCore::ContentExtensions::addUniversalActionsToDFA):
101         (WebCore::ContentExtensions::compileRuleList):
102         Put universalActionsWithoutDomains into the DFA from filtersWithoutDomains and
103         put universalActionsWithDomains into the DFA from filtersWithDomains.        
104         * contentextensions/ContentExtensionError.cpp:
105         (WebCore::ContentExtensions::contentExtensionErrorCategory):
106         * contentextensions/ContentExtensionError.h:
107         Remove error codes for errors that are not errors any more.
108         * contentextensions/ContentExtensionsBackend.cpp:
109         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
110         * contentextensions/ContentExtensionsBackend.h:
111         * contentextensions/DFABytecode.h:
112         (WebCore::ContentExtensions::instructionSizeWithArguments):
113         * contentextensions/DFABytecodeCompiler.cpp:
114         (WebCore::ContentExtensions::set32Bits):
115         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
116         (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
117         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
118         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
119         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
120         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
121         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction): Deleted.
122         * contentextensions/DFABytecodeCompiler.h:
123         * contentextensions/DFABytecodeInterpreter.cpp:
124         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
125         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
126         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
127         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
128         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot): Deleted.
129         * contentextensions/DFABytecodeInterpreter.h:
130         Add a new bytecode AppendActionDefaultStylesheet to mark actions that are css-display-none
131         that need to be put in the default stylesheet to be ignored or not as a whole.
132         css-display-none actions with flags or domain rules and css-display-none actions 
133         after ignore-previous-rules actions are not to be in this precompiled stylesheet, but
134         they will be applied as needed per page.  The precompiled stylesheet is already applied
135         if no ignore-previous-rules action is triggered.
136         * loader/ResourceLoadInfo.h:
137
138 2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
139
140         JS binding generator should create a member variable for each Promise attribute of an interface
141         https://bugs.webkit.org/show_bug.cgi?id=145056
142
143         Reviewed by Darin Adler.
144
145         For each attribute XXX whose type is Promise, a member m_XXXPromiseDeferred is created, its type being a JSC::Strong of JSPromiseDeferred.
146         The purpose is to enable custom getters to create the JSPromiseDeferred and store ino the class member to ensure the same promise is returned each time
147         the custom getter is called.
148         This patch will enable simplifying ReadableStreamReader custom binding.
149
150         Covered by added attribute in TestObj.idl.
151
152         * bindings/scripts/CodeGeneratorJS.pm:
153         (GenerateHeader):
154         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
155         (webkit_dom_test_obj_get_property):
156         (webkit_dom_test_obj_class_init):
157         (webkit_dom_test_obj_get_test_promise_attr):
158         (webkit_dom_test_obj_set_nullable_string_value): Deleted.
159         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
160         * bindings/scripts/test/JS/JSTestObj.cpp:
161         (WebCore::jsTestObjTestPromiseAttr):
162         (WebCore::jsTestObjAttributeWithReservedEnumType): Deleted.
163         * bindings/scripts/test/JS/JSTestObj.h:
164         * bindings/scripts/test/ObjC/DOMTestObj.h:
165         * bindings/scripts/test/ObjC/DOMTestObj.mm:
166         (-[DOMTestObj testPromiseAttr]):
167         (-[DOMTestObj attribute]): Deleted.
168         * bindings/scripts/test/TestObj.idl:
169
170 2015-05-20  Youenn Fablet  <youenn.fablet@crf.canon.fr>
171
172         AudioContext suspend/resume/close should resolve promises immediately when state is already suspended/active/closed
173         https://bugs.webkit.org/show_bug.cgi?id=145164
174
175         Reviewed by Jer Noble.
176
177         Test: webaudio/audiocontext-promise.html
178
179         * Modules/webaudio/AudioContext.cpp:
180         (WebCore::AudioContext::suspendContext): Immediatly call callbacks whenever possible to resolve/reject promises.
181         (WebCore::AudioContext::resumeContext): Ditto.
182         (WebCore::AudioContext::closeContext): Ditto
183
184 2015-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>
185
186         REGRESSION(r184420): [GTK] webkit_dom_html_element_get_children has been removed
187         https://bugs.webkit.org/show_bug.cgi?id=145174
188
189         Reviewed by Philippe Normand.
190
191         children property has been moved to Element, Document and
192         DocumentFragment to match the spec, so we need to expose the new
193         get_children and bring back webkit_dom_html_element_get_children()
194         as deprecated.
195
196         * bindings/gobject/WebKitDOMDeprecated.cpp:
197         (webkit_dom_html_element_get_children):
198         * bindings/gobject/WebKitDOMDeprecated.h:
199         * bindings/gobject/WebKitDOMDeprecated.symbols:
200         * bindings/gobject/webkitdom.symbols:
201
202 2015-05-20  Hunseop Jeong  <hs85.jeong@samsung.com>
203
204         nullptr cleanup in WebCore/xml.
205         https://bugs.webkit.org/show_bug.cgi?id=145165
206
207         Reviewed by Csaba Osztrogonác.
208
209         No new tests, no behavior changes
210
211         * xml/XMLHttpRequest.cpp:
212         (WebCore::XMLHttpRequest::responseXML):
213         (WebCore::XMLHttpRequest::internalAbort):
214         (WebCore::XMLHttpRequest::clearResponseBuffers):
215         (WebCore::XMLHttpRequest::clearRequest):
216         (WebCore::XMLHttpRequest::didFinishLoading):
217         * xml/XMLHttpRequestProgressEventThrottle.cpp:
218         (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
219         * xml/XSLImportRule.cpp:
220         (WebCore::XSLImportRule::XSLImportRule):
221         (WebCore::XSLImportRule::~XSLImportRule):
222         (WebCore::XSLImportRule::setXSLStyleSheet):
223         (WebCore::XSLImportRule::loadSheet):
224         * xml/XSLStyleSheet.h:
225         * xml/XSLStyleSheetLibxslt.cpp:
226         (WebCore::XSLStyleSheet::XSLStyleSheet):
227         (WebCore::XSLStyleSheet::~XSLStyleSheet):
228         (WebCore::XSLStyleSheet::clearDocuments):
229         * xml/XSLTProcessorLibxslt.cpp:
230         (WebCore::saveResultToString):
231         (WebCore::xsltParamArrayFromParameterMap):
232         (WebCore::xmlDocPtrFromNode):
233         (WebCore::XSLTProcessor::transformToString):
234         * xml/parser/XMLDocumentParser.cpp:
235         (WebCore::XMLDocumentParser::clearCurrentNodeStack):
236         (WebCore::XMLDocumentParser::exitText):
237         (WebCore::XMLDocumentParser::notifyFinished):
238         * xml/parser/XMLDocumentParser.h:
239         * xml/parser/XMLDocumentParserLibxml2.cpp:
240         (WebCore::openFunc):
241         (WebCore::XMLDocumentParser::XMLDocumentParser):
242         * xml/parser/XMLDocumentParserScope.cpp:
243         * xml/parser/XMLDocumentParserScope.h:
244
245 2015-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
246
247         [SOUP] Network Cache: Implement ShareableResource for Soup and enable it for GTK platform
248         https://bugs.webkit.org/show_bug.cgi?id=144380
249
250         Reviewed by Antti Koivisto.
251
252         Add a soup implementation of SharedBuffer::tryReplaceContentsWithPlatformBuffer().
253
254         Covered by http/tests/cache/disk-cache/ tests.
255
256         * loader/cache/CachedResource.cpp: Define
257         CachedResource::tryReplaceEncodedData() also for Soup.
258         * loader/cache/CachedResource.h: Ditto.
259         * platform/soup/SharedBufferSoup.cpp:
260         (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer):
261
262 2015-05-17  Sam Weinig  <sam@webkit.org>
263
264         Organize event handlers a bit
265         https://bugs.webkit.org/show_bug.cgi?id=145106
266
267         Reviewed by Darin Adler.
268
269         - Add GlobalEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers)
270           and move all event handlers shared by Element, Document and DOMWindow there. Put all the standard defined
271           event handlers at the top (commenting out the ones that aren't implemented yet) and the non-standard ones
272           at the bottom.
273
274           There is one change in behavior here. Previously, the media related event handlers where only exposed on
275           Element and DOMWindow. The spec says they should also be on Document, so this adds support for that (this
276           is tested in fast/dom/event-handler-attributes.html).
277
278         - Add WindowEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#windoweventhandlers)
279           and move all event handlers shared by DOMWindow, HTMLBodyElement and HTMLFrameSetElement there. Put all the 
280           standard defined event handlers at the top (commenting out the ones that aren't implemented yet) and the 
281           non-standard ones at the bottom.
282
283         - Group remaining event handlers in Element, Document, DOMWindow, HTMLBodyElement and HTMLFrameSetElement by
284           their grouping, and add some FIXMEs for future cleaning.
285
286         * CMakeLists.txt:
287         * DerivedSources.make:
288         * WebCore.xcodeproj/project.pbxproj:
289         - Add GlobalEventHandlers.idl and WindowEventHandlers.idl.
290
291         * bindings/scripts/CodeGeneratorJS.pm:
292         (GenerateImplementation):
293         Add special cases for WindowEventHandler when used on DOMWindow and DocumentEventHandler when used on Document
294         so that event handlers using those extended attributes can be set on shared interfaces. This is used to allow
295         DOMWindow to implement WindowEventHandlers.
296
297         * dom/Document.idl:
298         Move event handlers to GlobalEventHandlers and have Document implement it. Group remaining event handlers.
299
300         * dom/Element.idl:
301         Move event handlers to GlobalEventHandlers and have Element implement it. Group remaining event handlers.
302
303         * dom/GlobalEventHandlers.idl:
304         Added.
305
306         * html/HTMLBodyElement.idl:
307         Move event handlers to WindowEventHandlers and have HTMLBodyElement implement it. Group remaining event handlers.
308         
309         * html/HTMLFrameSetElement.idl:
310         Move event handlers to WindowEventHandlers and have HTMLFrameSetElement implement it. Group remaining event handlers.
311
312         * page/DOMWindow.idl:
313         Move event handlers to GlobalEventHandlers and WindowEventHandlers and have DOMWindow implement both of them. Group 
314         remaining event handlers.
315
316         * page/WindowEventHandlers.idl:
317         Added.
318
319 2015-05-19  Antti Koivisto  <antti@apple.com>
320
321         Crash under WebCore::invalidateStyleRecursively
322         https://bugs.webkit.org/show_bug.cgi?id=145186
323         rdar://problem/19736838
324
325         Reviewed by Andreas Kling
326
327         We have seen crashes where we run out of stack under invalidateStyleRecursively in StyleInvalidationAnalysis
328         on some devices.
329
330         Switch to iterative algorithm.
331
332         * css/StyleInvalidationAnalysis.cpp:
333         (WebCore::StyleInvalidationAnalysis::StyleInvalidationAnalysis):
334         (WebCore::invalidateIfNeeded):
335         (WebCore::invalidateStyleForTree):
336         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
337         (WebCore::invalidateStyleRecursively): Deleted.
338
339 2015-05-19  Yusuke Suzuki  <utatane.tea@gmail.com>
340
341         Move AtomicStringImpl table related operations from AtomicString to AtomicStringImpl
342         https://bugs.webkit.org/show_bug.cgi?id=145109
343
344         Reviewed by Darin Adler.
345
346         * dom/TreeScope.cpp:
347         (WebCore::TreeScope::getElementById):
348
349 2015-05-19  Jon Lee  <jonlee@apple.com>
350
351         [iOS] Optimized fullscreen placeholder is incorrectly sized
352         https://bugs.webkit.org/show_bug.cgi?id=145196
353         rdar://problem/21031188
354
355         Reviewed by Dean Jackson.
356
357         Add a new media part UI for the placeholder text when entering optimized fullscreen,
358         and use it as part of the title text in the placeholder. Now the wireless playback status
359         div serves as a multi-purpose placeholder.
360
361         * Modules/mediacontrols/MediaControlsHost.cpp:
362         (WebCore::MediaControlsHost::mediaUIImageData): Return the placeholder text.
363         * Modules/mediacontrols/MediaControlsHost.idl: Add a new UI part for placeholder text.
364         * Modules/mediacontrols/mediaControlsApple.js: Add a new "optimized" ClassName when
365         the presentation mode is set to optimized.
366
367         * Modules/mediacontrols/mediaControlsiOS.css:
368         (audio::-webkit-media-controls-wireless-playback-status): The text should be at
369         medium weight, not light weight.
370         (audio::-webkit-media-controls-wireless-playback-text-top): The title text should be
371         white for both wireless playback and optimized fullscreen. It matches the style
372         when taking a video fullscreen.
373
374         Add new CSS rules when the placard is used for optimized fullscreen.
375         (audio::-webkit-media-controls-wireless-playback-status.optimized): Accommodate the
376         size of the graphic, and position appropriately.
377         (audio::-webkit-media-controls-wireless-playback-text-top.optimized): One line is
378         needed, so use this one, and place it where the bottom one is since more room is
379         needed to accommodate the graphic.
380         (audio::-webkit-media-controls-wireless-playback-text-bottom.optimized): One line is
381         needed, so hide this one.
382         * Modules/mediacontrols/mediaControlsiOS.js:
383         (ControllerIOS.prototype.createControls): Several of the container divs are already
384         created in Controller.prototype.createControls(). Fly-by fix to avoid creation of
385         those divs. Only the panelContainer is new for the iOS controls. Fly-by fix of a
386         missing semicolon.
387         (ControllerIOS.prototype.handlePresentationModeChange): When the presentation mode
388         changes do several things:
389             1- Update the background image. Clear the inline background image when going back
390                to inline or in wireless playback.
391             2- Add the "optimized" ClassName to the placeholder container, and the two text
392                divs when entering optimized fullscreen. Remove them in other cases.
393             3- Set -webkit-media-controls-wireless-playback-text-top to the placeholder text.
394                This is better than embedding it inside the graphic. Clear the -bottom text.
395         * platform/ios/WebCoreSystemInterfaceIOS.h: Add a new enum to obtain the placeholder
396         text.
397
398 2015-05-19  Ryuan Choi  <ryuan.choi@navercorp.com>
399
400         [EFL] Use GSimpleProxyResolver instead of custom SoupProxyResolver
401         https://bugs.webkit.org/show_bug.cgi?id=145154
402
403         Reviewed by Gyuyoung Kim.
404
405         SoupProxyResolver was deprecated since libsoup 2.42.
406         So, this patch refactors the custom SoupProxyResolver to GSimpleProxyResolver
407         which provides same functionality in gio.
408
409         No new tests, because there is not behavior change.
410
411         * PlatformEfl.cmake:
412         * WebCore.vcxproj/WebCore.vcxproj:
413         * WebCore.vcxproj/WebCore.vcxproj.filters:
414         * platform/network/soup/ProxyResolverSoup.cpp: Removed.
415         * platform/network/soup/ProxyResolverSoup.h: Removed.
416         * platform/network/soup/SoupNetworkSession.cpp:
417         (WebCore::SoupNetworkSession::setHTTPProxy): Moved to private member.
418         (WebCore::SoupNetworkSession::httpProxy): Deleted because nobody calls it.
419         * platform/network/soup/SoupNetworkSession.h:
420
421 2015-05-19  Commit Queue  <commit-queue@webkit.org>
422
423         Unreviewed, rolling out r184595.
424         https://bugs.webkit.org/show_bug.cgi?id=145197
425
426         Introduced a crash in 15 layout tests on Mavericks on #webkit
427         (Requested by rniwa on #webkit).
428
429         Reverted changeset:
430
431         "Media Controls stop updating after hovering for a few
432         seconds."
433         https://bugs.webkit.org/show_bug.cgi?id=144770
434         http://trac.webkit.org/changeset/184595
435
436 2015-05-19  Carlos Alberto Lopez Perez  <clopez@igalia.com>
437
438         REGRESSION(r181571): Build broken when USE(OPENGL_ES_2) is defined.
439         https://bugs.webkit.org/show_bug.cgi?id=145156
440
441         Reviewed by Alex Christensen.
442
443         No new tests, no behavior changes.
444
445         Vertex Array Objects are not available in OpenGLESv2.
446         Add guards to avoid using this when building with GLESv2.
447
448         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
449         (WebCore::GraphicsContext3D::createVertexArray):
450         (WebCore::GraphicsContext3D::deleteVertexArray):
451         (WebCore::GraphicsContext3D::isVertexArray):
452         (WebCore::GraphicsContext3D::bindVertexArray):
453
454 2015-05-19  Roger Fong  <roger_fong@apple.com>
455
456         Upper half of volume control should be filled, not hollow.
457         https://bugs.webkit.org/show_bug.cgi?id=145187.
458         <rdar://problem/21021970>
459
460         Reviewed by Dean Jackson.
461
462         * Modules/mediacontrols/mediaControlsApple.js:
463         (Controller.prototype.drawVolumeBackground):
464
465 2015-05-19  Michael Saboff  <msaboff@apple.com>
466
467         REGRESSION(183787): JIT is enabled for all builds
468         https://bugs.webkit.org/show_bug.cgi?id=145179
469
470         Reviewed by Geoffrey Garen.
471
472         Eliminated the setting of ENABLE_JIT, as wtf/Platform.h has appropriate logic to
473         set it depending on OS and CPU type.
474
475         Only changed the way build options are initialized.
476
477         * Configurations/FeatureDefines.xcconfig:
478
479 2015-05-19  Chris Dumez  <cdumez@apple.com>
480
481         [Mac] Font lookups are flakey due to caching
482         https://bugs.webkit.org/show_bug.cgi?id=145180
483         <rdar://problem/21012406>
484
485         Reviewed by Darin Adler.
486
487         Font lookups were flakey on Mac due to the cache in fontWithFamily().
488         The reason is that the "desired family" to "available family" mapping
489         is sometimes dependent on the desired traits. However, our cache was
490         only using the "desired family" as key.
491
492         This patch now uses a std::pair as key containing both the "desired
493         family" and the "desired traits" for correctness. I also updated the
494         cache to use WTF types instead of NS types.
495
496         Test: platform/mac/fast/text/font-weights.html
497
498         * platform/graphics/mac/FontCacheMac.mm:
499         (WebCore::desiredFamilyToAvailableFamilyMap):
500         (WebCore::hasDesiredFamilyToAvailableFamilyMapping):
501         (WebCore::rememberDesiredFamilyToAvailableFamilyMapping):
502         (WebCore::fontWithFamily):
503         (WebCore::invalidateFontCache):
504         (WebCore::desiredFamilyToAvailableFamilyDictionary): Deleted.
505
506 2015-05-19  Brady Eidson  <beidson@apple.com>
507
508         X-Frame-Options headers not respected when loading from application cache.
509         <rdar://problem/14877623> and https://bugs.webkit.org/show_bug.cgi?id=131800
510
511         Reviewed by Alexey Proskuryakov.
512
513         Test: http/tests/appcache/x-frame-options-prevents-framing.php
514
515         This patch updates SubstituteData to hold on to a ResourceResponse instead of just a URL.
516         
517         It also updates all users of SubstituteData to reflect this.
518         
519         Finally it updates ApplicationCacheHost to put the full response (including x-frame-options header)
520         in the SubstituteData so they can be checked at the appropriate times.
521         
522         * loader/DocumentLoader.cpp:
523         (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
524         (WebCore::DocumentLoader::responseReceived): Update an ASSERT to reflect that it's okay to not have
525           a main resource as long as you have a substitute identifier for it.
526         (WebCore::DocumentLoader::documentURL):
527         (WebCore::DocumentLoader::contentFilterDidDecide):
528         
529         * loader/FrameLoader.cpp:
530         (WebCore::FrameLoader::loadArchive):
531         (WebCore::FrameLoader::defaultSubstituteDataForURL):
532
533         * loader/SubstituteData.h:
534         (WebCore::SubstituteData::SubstituteData):
535         (WebCore::SubstituteData::shouldRevealToSessionHistory):
536         (WebCore::SubstituteData::mimeType):
537         (WebCore::SubstituteData::textEncoding):
538         (WebCore::SubstituteData::response):
539         (WebCore::SubstituteData::responseURL): Deleted.
540
541         * loader/appcache/ApplicationCacheHost.cpp:
542         (WebCore::ApplicationCacheHost::maybeLoadMainResource): Put the full ResourceResponse here, which 
543           includes x-frame-options headers sent back when the resources was initially loaded from the network.
544
545         * platform/network/ResourceResponseBase.h:
546
547 2015-05-19  Brent Fulgham  <bfulgham@apple.com>
548
549         REGRESSION(142590): Part 2: Scroll-snap points are improperly snapping to earlier index values (Scrolling Thread) 
550         https://bugs.webkit.org/show_bug.cgi?id=145175
551         <rdar://problem/21023785>
552
553         Reviewed by Beth Dakin.
554
555         Extend the main-thread scrolling changes done in Bug 145140 to also handle Scrolling Thread snapping.
556         The post-layout fixup (needed to handle window resize and device orientation changes) should not fire
557         while Scrolling Thread scroll-snap animations are running, since these animations will most likely
558         move the scroll view into the proper position. If we attempt to 'fix up' the scroll position before
559         these animations finish, we get an ugly 'jump' in the display.
560
561         * page/FrameView.cpp:
562         (WebCore::FrameView::isScrollSnapInProgress): New method based on isRubberBandInProgress, which considers
563         both the ScrollAnimator (main thread) scrolling, as well as the ScrollingCoordinator (Scrolling Thread)
564         scrolling operations. Returns true if a scroll-snap animation is still active.
565         * page/FrameView.h:
566         * page/scrolling/AsyncScrollingCoordinator.cpp:
567         (WebCore::AsyncScrollingCoordinator::isScrollSnapInProgress): Added. Returns scrolling tree's
568         'isScrollSnapInProgress' state.
569         * page/scrolling/AsyncScrollingCoordinator.h:
570         * page/scrolling/ScrollingCoordinator.h:
571         (WebCore::ScrollingCoordinator::isScrollSnapInProgress): Added default 'false' stub.
572         * page/scrolling/ScrollingTree.cpp:
573         (WebCore::ScrollingTree::ScrollingTree): Use modern C++11 initializers.
574         (WebCore::ScrollingTree::isScrollSnapInProgress): Added.
575         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping): Added.
576         * page/scrolling/ScrollingTree.h:
577         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
578         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
579         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): Update scrolling tree state to match the
580         ScrollController's scroll-snap state.
581         (WebCore::ScrollingTreeFrameScrollingNodeMac::startScrollSnapTimer): Added. When starting a scroll snap timer,
582         always set the scrolling tree scroll-snapping state to true.
583         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopScrollSnapTimer): Added. When ending a scroll snap timer,
584         only set the scrolling tree scroll-snapping state to false if the other axis animator is inactive.
585         * platform/ScrollableArea.cpp:
586         (WebCore::ScrollableArea::updateScrollSnapState): Revise implementation to use its 'isScrollSnapInProgress'
587         method, rather than only looking at the ScrollAnimator (main thread) state.
588         * platform/ScrollableArea.h:
589         (WebCore::ScrollableArea::isScrollSnapInProgress): Added.
590         * platform/cocoa/ScrollController.h:
591         * platform/cocoa/ScrollController.mm:
592         (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Added. Reports if the scroll snap animation
593         timer on the requested axis is running or not.
594         * rendering/RenderLayer.cpp:
595         (WebCore::RenderLayer::isScrollSnapInProgress): Added.
596         * rendering/RenderLayer.h:
597
598 2015-05-19  Roger Fong  <roger_fong@apple.com>
599
600         Media Controls stop updating after hovering for a few seconds.
601         https://bugs.webkit.org/show_bug.cgi?id=144770.
602         <rdar://problem/19823121>
603
604         Reviewed by Jer Noble.
605
606         * Modules/mediacontrols/mediaControlsApple.js:
607         (Controller.prototype.createBase):
608         We should never hide controls immediately as a result of mousing out of the controls.
609         It should only happen when the mouse leaves the video entirely.
610         (Controller.prototype.updateTimelineMetricsIfNeeded):
611         Don’t update if controls are hidden, timeline dimensions will be 0.
612         (Controller.prototype.handlePanelTransitionEnd): 
613         Instead of adjusting visibility via adding and removing classes,
614         remove controls entirely from the tree.
615         (Controller.prototype.showControls):
616         Add controls back into the tree when showing controls.
617         (Controller.prototype.updateForShowingControls):
618         Helper method for showControls.
619         (Controller.prototype.controlsAreHidden):
620         Controls also hidden if removed from tree.
621
622         Remove forceUpdate logic, no longer necessary.
623         (Controller.prototype.handleDurationChange): 
624         (Controller.prototype.updateProgress):
625         (Controller.prototype.updateTime):
626
627         Override methods to use add and remove panelContainer for iOS.
628         * Modules/mediacontrols/mediaControlsiOS.js:
629         (ControllerIOS.prototype.handlePanelTransitionEnd):
630         (ControllerIOS.prototype.showControls):
631         (ControllerIOS.prototype.controlsAreHidden):
632
633 2015-05-19  Brent Fulgham  <bfulgham@apple.com>
634
635         Scroll-snap animations should not start on axes with zero-delta
636         https://bugs.webkit.org/show_bug.cgi?id=145148
637
638         Reviewed by Dean Jackson.
639
640         Don't begin a scroll snap animation on an axis that had no change in position (on that axis)
641         during the gesture.
642
643         * platform/cocoa/ScrollController.mm:
644         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Don't begin a scroll snap
645         animation if no movement on this axis was ever made.
646
647 2015-05-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
648
649         AudioContext should resolve promises with jsUndefined() and not jsNull()
650         https://bugs.webkit.org/show_bug.cgi?id=145063
651
652         Reviewed by Sam Weinig.
653
654         Covered by updated test.
655
656         * bindings/js/JSDOMPromise.h:
657         (WebCore::DeferredWrapper::resolve): resolving std::nullptr_t as jsUndefined() and not jsNull()
658
659 2015-05-19  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
660
661         [Streams API] Migrate closed promise handling from ReadableStreamReader to ReadableStream
662         https://bugs.webkit.org/show_bug.cgi?id=145110
663
664         Reviewed by Darin Adler.
665
666         Reader is now just checking whether it is the reader locking the stream or not.
667         If not and stream is readable, it resolves the closed promise.
668         Otherwise, it delegates the promise handling to its stream.
669
670         No change in behavior.
671
672         * Modules/streams/ReadableStream.cpp:
673         (WebCore::ReadableStream::cleanCallbacks): Cleaning of closed callbacks.
674         (WebCore::ReadableStream::changeStateToClosed): Resolving closed promise if set.
675         (WebCore::ReadableStream::changeStateToErrored): Rejecting closed promise if set.
676         (WebCore::ReadableStream::getReader): Removed reader state notification.
677         (WebCore::ReadableStream::closed): Moved from reader to stream.
678         * Modules/streams/ReadableStream.h:
679         (WebCore::ReadableStream::reader): Added to allow reader to check whether it is locking its stream or not.
680         (WebCore::ReadableStream::isReadable): Added as an improvement over internalState which is removed.
681         (WebCore::ReadableStream::internalState): Deleted.
682         * Modules/streams/ReadableStreamReader.cpp:
683         (WebCore::ReadableStreamReader::closed):
684         * Modules/streams/ReadableStreamReader.h: Removed state and closed promise callbacks.
685         * bindings/js/JSReadableStreamControllerCustom.cpp:
686         (WebCore::JSReadableStreamController::close): Refactoring of internalState to isReadable.
687         (WebCore::JSReadableStreamController::error): Ditto.
688         * bindings/js/JSReadableStreamReaderCustom.cpp:
689         (WebCore::JSReadableStreamReader::closed): Refactoring to have the promise value as callback parameter.
690
691 2015-05-19  Jeremy Jones  <jeremyj@apple.com>
692
693         Remove use of deprecated AVKit SPI cancelOptimizedFullscreen.
694         https://bugs.webkit.org/show_bug.cgi?id=145159
695
696         Reviewed by Eric Carlson.
697
698         Remove cancelOptimizedFullscreen, and use stopOptimizedFullscreen instead.
699
700         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
701         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal):
702         * platform/spi/cocoa/AVKitSPI.h: remove declaration.
703
704 2015-05-19  Zalan Bujtas  <zalan@apple.com>
705
706         Merged anonymous blocks should invalidate simple line layout path.
707         https://bugs.webkit.org/show_bug.cgi?id=145104
708         rdar://problem/20980930
709
710         Reviewed by Antti Koivisto.
711
712         When anonymous blocks are merged together, it's not guaranteed that the final block can use simple line layout.
713         This patch ensures that the flow block, where the other block's content gets moved to, is no longer on simple line layout path.
714         Whether the final flow block ends up using inline boxes or simple line layout will be determined during the next layout.
715
716         Test: fast/block/crash-when-anonymous-blocks-are-merged-with-simple-line-layout.html
717
718         * rendering/RenderElement.cpp:
719         (WebCore::RenderElement::insertChildInternal):
720
721 2015-05-19  Beth Dakin  <bdakin@apple.com>
722
723         Crash in WebCore::RenderLayer::updateScrollbarsAfterLayout
724         https://bugs.webkit.org/show_bug.cgi?id=145142
725
726         Reviewed by Simon Fraser.
727
728         I have not been able to reproduce this crash, but according to symbolication 
729         m_vBar is null. It seems like this crash was probably caused by 
730         http://trac.webkit.org/changeset/173668 which made it so that overflow:scroll 
731         behaves like overflow:auto when the scrollbars are overlay. I can see how you 
732         could encounter this crash with that change if the layout caused 
733         styleRequiresScrollbar() to return true when it used to return false. Then this 
734         code, by failing to null-check the scrollbars, assumes that 
735         styleRequiresScrollbar() could not have changed based on a layout. But it could 
736         change if the css changed the scrollbars to be custom or if the user managed 
737         switch to legacy style scrollbars at just the wrong time. Or I suppose it could 
738         also happen if the user has legacy scrollbars and the style switched from auto to 
739         scroll during the layout.
740
741         Anyway, we should null-check  the scrollbars. This is a speculative fix.
742         * rendering/RenderLayer.cpp:
743         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
744
745 2015-05-19  Hunseop Jeong  <hs85.jeong@samsung.com>
746
747         Use modern for-loops in WebCore/xml.
748         https://bugs.webkit.org/show_bug.cgi?id=145046
749
750         Reviewed by Chris Dumez.
751
752         No new tests, no new tests.
753
754         * xml/XMLHttpRequest.cpp:
755         (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):
756         * xml/XPathExpressionNode.cpp:
757         (WebCore::XPath::Expression::setSubexpressions):
758         * xml/XPathFunctions.cpp:
759         (WebCore::XPath::FunSum::evaluate):
760         (WebCore::XPath::populateFunctionMap):
761         * xml/XPathNodeSet.cpp:
762         (WebCore::XPath::NodeSet::traversalSort):
763         * xml/XPathParser.cpp:
764         (WebCore::XPath::populateAxisNamesMap):
765         * xml/XPathPath.cpp:
766         (WebCore::XPath::Filter::evaluate):
767         (WebCore::XPath::LocationPath::evaluate):
768         * xml/XPathPredicate.cpp:
769         (WebCore::XPath::EqTestOp::compare):
770         (WebCore::XPath::Union::evaluate):
771         * xml/XPathStep.cpp:
772         (WebCore::XPath::Step::optimize):
773         (WebCore::XPath::Step::predicatesAreContextListInsensitive):
774         (WebCore::XPath::Step::evaluate):
775         (WebCore::XPath::nodeMatches):
776         * xml/XSLStyleSheetLibxslt.cpp:
777         (WebCore::XSLStyleSheet::~XSLStyleSheet):
778         (WebCore::XSLStyleSheet::isLoading):
779         (WebCore::XSLStyleSheet::clearDocuments):
780         (WebCore::XSLStyleSheet::locateStylesheetSubResource):
781         * xml/XSLTProcessorLibxslt.cpp:
782         (WebCore::xsltParamArrayFromParameterMap):
783
784 2015-05-19  Jon Lee  <jonlee@apple.com>
785
786         Improve text rendering of placeholder
787         https://bugs.webkit.org/show_bug.cgi?id=145135
788
789         Reviewed by Eric Carlson.
790
791         * Modules/mediacontrols/mediaControlsApple.css: The <p> elements of the wireless playback
792         text are being popped out into separate layers, causing the text to render antialiased, which
793         looks bad on non-retina machines. Explicitly set the background color (which is ok since the
794         container element for the placeholder is also black). Also extend the height out 1pt to prevent
795         clipping of descenders.
796         (audio::-webkit-media-controls-wireless-playback-text-top): Set background color to black and add
797         1 to the height.
798         (audio::-webkit-media-controls-wireless-playback-text-bottom): Ditto.
799
800 2015-05-19  Jon Lee  <jonlee@apple.com>
801
802         [iOS] Current time display should be right-aligned
803         https://bugs.webkit.org/show_bug.cgi?id=145163
804         rdar://problem/21014339
805
806         Reviewed by Eric Carlson.
807
808         * Modules/mediacontrols/mediaControlsiOS.css: Use flex-start and flex-end
809         instead of right and left, similar to the Mac controls.
810         (video::-webkit-media-controls-current-time-display):
811         (video::-webkit-media-controls-time-remaining-display):
812
813 2015-05-14  Chris Fleizach  <cfleizach@apple.com>
814
815         AX: Select text mechanism returns results outside of text control regions
816         https://bugs.webkit.org/show_bug.cgi?id=145041
817
818         Reviewed by Mario Sanchez Prada.
819
820         The behavior of the select text mechanism (inside accessibility) should make sure that results
821         returned stay within text control elements if the search was initiated inside a text control element.
822
823         Test: platform/mac/accessibility/select-text-stays-inside-text-controls.html
824
825         * accessibility/AccessibilityObject.cpp:
826         (WebCore::rangeClosestToRange):
827         (WebCore::AccessibilityObject::selectText):
828
829 2015-05-19  Chris Dumez  <cdumez@apple.com>
830
831         Mark static variables as const when possible
832         https://bugs.webkit.org/show_bug.cgi?id=145161
833
834         Reviewed by Andreas Kling.
835
836         * Modules/mediasession/WebMediaSessionManager.cpp:
837         * Modules/mediasource/SourceBuffer.cpp:
838         * Modules/webdatabase/SQLException.cpp:
839         * dom/DOMCoreException.cpp:
840         * inspector/NetworkResourcesData.cpp:
841         * loader/icon/IconDatabase.cpp:
842         (WebCore::urlForLogging):
843         * page/AutoscrollController.cpp:
844         * page/Page.cpp:
845         * platform/RuntimeApplicationChecksIOS.mm:
846         (WebCore::applicationIsAdSheet):
847         (WebCore::applicationIsMobileMail):
848         (WebCore::applicationIsMobileSafari):
849         (WebCore::applicationIsDumpRenderTree):
850         (WebCore::applicationIsWebApp):
851         (WebCore::applicationIsOkCupid):
852         (WebCore::applicationIsFacebook):
853         (WebCore::applicationIsEpicurious):
854         (WebCore::applicationIsDaijisenDictionary):
855         (WebCore::applicationIsNASAHD):
856         (WebCore::applicationIsMASH):
857         (WebCore::applicationIsTheEconomistOnIPhone):
858         (WebCore::applicationIsWebProcess):
859         (WebCore::applicationIsIBooksOnIOS):
860         * platform/audio/HRTFElevation.cpp:
861         * platform/audio/mac/AudioHardwareListenerMac.cpp:
862         (WebCore::processIsRunningPropertyDescriptor):
863         (WebCore::outputDevicePropertyDescriptor):
864         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
865         * platform/graphics/ca/GraphicsLayerCA.cpp:
866         * platform/graphics/mac/FontCacheMac.mm:
867         (WebCore::toCoreTextFontWeight):
868         (WebCore::toAppKitFontWeight):
869         (WebCore::toNSFontWeight):
870         * platform/mac/ScrollAnimatorMac.mm:
871         (supportsUIStateTransitionProgress):
872         (supportsExpansionTransitionProgress):
873         (supportsContentAreaScrolledInDirection):
874         * platform/mac/ScrollbarThemeMac.mm:
875         * platform/mac/WebCoreNSURLExtras.mm:
876         (WebCore::dataForURLComponentType):
877         * platform/mock/ScrollbarThemeMock.cpp:
878         * platform/text/icu/UTextProviderLatin1.cpp:
879         * platform/text/ios/LocalizedDateCache.mm:
880         (WebCore::LocalizedDateCache::calculateMaximumWidth):
881         * rendering/RenderBlockLineLayout.cpp:
882         (WebCore::RenderBlockFlow::matchedEndLine):
883         * rendering/RenderBoxModelObject.cpp:
884         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
885         * rendering/RenderFrameBase.cpp:
886         (WebCore::shouldExpandFrame):
887         * rendering/RenderTableSection.cpp:
888         * rendering/RenderThemeIOS.mm:
889         (WebCore::getInsetGradient):
890         (WebCore::getShineGradient):
891         (WebCore::getShadeGradient):
892         (WebCore::getConvexGradient):
893         (WebCore::getConcaveGradient):
894         (WebCore::getSliderTrackGradient):
895         (WebCore::getReadonlySliderTrackGradient):
896         (WebCore::getSliderThumbOpaquePressedGradient):
897         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
898         (WebCore::RenderThemeIOS::paintRadioDecorations):
899         * rendering/RenderThemeMac.mm:
900         (WebCore::toFontWeight):
901         (WebCore::TopGradientInterpolate):
902         (WebCore::BottomGradientInterpolate):
903         (WebCore::MainGradientInterpolate):
904         (WebCore::TrackGradientInterpolate):
905
906 2015-05-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
907
908         Use Ref instead of PassRefPtr in WebCore/bindings
909         https://bugs.webkit.org/show_bug.cgi?id=144981
910
911         Reviewed by Darin Adler.
912
913         As a step to purge PassRefPtr, remove PassRefPtr in WebCore/bindings.
914
915         No new tests, no behavior changes.
916
917         * bindings/gobject/GObjectNodeFilterCondition.h:
918         (WebCore::GObjectNodeFilterCondition::create):
919         * bindings/gobject/GObjectXPathNSResolver.h:
920         (WebCore::GObjectXPathNSResolver::create):
921         * bindings/js/JSCustomXPathNSResolver.cpp:
922         (WebCore::JSCustomXPathNSResolver::create):
923         * bindings/js/JSCustomXPathNSResolver.h:
924         * bindings/js/JSDOMGlobalObjectTask.cpp:
925         * bindings/js/JSErrorHandler.h:
926         (WebCore::JSErrorHandler::create):
927         * bindings/js/JSLazyEventListener.cpp:
928         (WebCore::JSLazyEventListener::createForNode):
929         (WebCore::JSLazyEventListener::createForDOMWindow):
930         * bindings/js/JSLazyEventListener.h:
931         * bindings/js/JSMutationCallback.h:
932         (WebCore::JSMutationCallback::create):
933         * bindings/js/JSNodeFilterCondition.h:
934         (WebCore::JSNodeFilterCondition::create):
935         * bindings/js/SerializedScriptValue.cpp:
936         (WebCore::SerializedScriptValue::create):
937         (WebCore::SerializedScriptValue::numberValue):
938         (WebCore::SerializedScriptValue::undefinedValue):
939         (WebCore::SerializedScriptValue::nullValue):
940         * bindings/js/SerializedScriptValue.h:
941         * bindings/objc/ObjCEventListener.h:
942         * bindings/objc/ObjCEventListener.mm:
943         (WebCore::ObjCEventListener::wrap):
944         * bindings/objc/ObjCNodeFilterCondition.h:
945         (WebCore::ObjCNodeFilterCondition::create):
946
947 2015-05-18  Csaba Osztrogonác  <ossy@webkit.org>
948
949         Fix uninitialized warnings in RealtimeMediaSourceCenterOwr.cpp
950         https://bugs.webkit.org/show_bug.cgi?id=145119
951
952         Reviewed by Gyuyoung Kim.
953
954         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
955         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
956         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
957
958 2015-05-18  Michael Catanzaro  <mcatanzaro@igalia.com>
959
960         [CMake] Ignore warnings in system headers
961         https://bugs.webkit.org/show_bug.cgi?id=144747
962
963         Reviewed by Darin Adler.
964
965         Separate include directories into WebKit project includes and system includes. Suppress all
966         warnings from headers in system include directories using the SYSTEM argument to
967         the include_directories command.
968
969         * CMakeLists.txt:
970         * PlatformEfl.cmake:
971         * PlatformGTK.cmake:
972         * PlatformMac.cmake:
973
974 2015-05-18  Myles C. Maxfield  <mmaxfield@apple.com>
975
976         Addressing post-review comments on r184353
977         https://bugs.webkit.org/show_bug.cgi?id=145146
978
979         Reviewed by Benjamin Poulain.
980
981         See per-file comments.
982
983         No new tests because there is no behavior change.
984
985         * platform/graphics/mac/FontCacheMac.mm:
986         (WebCore::fontWithFamilySpecialCase): Use equalIgnoringASCIICase() AtomicString overload.
987         * rendering/RenderThemeMac.mm:
988         (WebCore::RenderThemeMac::updateCachedSystemFontDescription): Implement Ben's ideas for
989         cheaply constructing AtomicStrings only when necessary.
990
991 2015-05-18  Skachkov Alexandr  <gskachkov@gmail.com>
992
993         [ES6] Arrow function syntax. Feature flag for arrow function
994         https://bugs.webkit.org/show_bug.cgi?id=145108
995
996         Reviewed by Ryosuke Niwa.
997
998         Added feature flag ENABLE_ES6_ARROWFUNCTION_SYNTAX for arrow function
999
1000         * Configurations/FeatureDefines.xcconfig:
1001
1002 2015-05-18  Brent Fulgham  <bfulgham@apple.com>
1003
1004         REGRESSION(142590): Scroll-snap points are improperly snapping to earlier index values
1005         https://bugs.webkit.org/show_bug.cgi?id=145140
1006         <rdar://problem/21006738>
1007
1008         Reviewed by Beth Dakin.
1009
1010         The new "nearestActiveSnapPoint" logic is firing while scroll snap animations are running. We need
1011         to add an "isScrollSnapInProgress" predicate, much like the existing "isRubberBandInProgress" to avoid
1012         certain "fix-up" logic that we don't want running while we are in the process of moving to a new position.
1013
1014         * platform/ScrollAnimator.h:
1015         (WebCore::ScrollAnimator::ScrollAnimator::isScrollSnapInProgress): Added.
1016         * platform/ScrollableArea.cpp:
1017         (WebCore::ScrollableArea::updateScrollSnapState): If we are in the midst of a scroll snap operation,
1018         do not attempt to reset position to the current active snap point.
1019         * platform/cocoa/ScrollController.h:
1020         * platform/cocoa/ScrollController.mm:
1021         (WebCore::ScrollController::isScrollSnapInProgress): Added.
1022         * platform/mac/ScrollAnimatorMac.h:
1023         * platform/mac/ScrollAnimatorMac.mm:
1024         (WebCore::ScrollAnimatorMac::isScrollSnapInProgress): Added.
1025
1026 2015-05-17  Manuel Rego Casasnovas  <rego@igalia.com>
1027
1028         [CSS Grid Layout] Add scrollbar width in intrinsic logical widths computation
1029         https://bugs.webkit.org/show_bug.cgi?id=145021
1030
1031         Like for flexboxes we've to take into account the scrollbar logical
1032         width while computing the intrinsic min and max logical widths.
1033
1034         Reviewed by Sergio Villar Senin.
1035
1036         Test: fast/css-grid-layout/compute-intrinsic-widths-scrollbar.html
1037
1038         * rendering/RenderGrid.cpp:
1039         (WebCore::RenderGrid::computeIntrinsicLogicalWidths): Add scrollbar
1040         logical width.
1041
1042 2015-05-17  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1043
1044         [Streams API] Delegate ReadableStreamReader reference counting to ReadableStream
1045         https://bugs.webkit.org/show_bug.cgi?id=144907
1046
1047         Reviewed by Darin Adler.
1048
1049         Changed the link between readadable stream and reader.
1050         Controller ref()/deref() now increments/decrements its stream ref counter, similarly to ReadableStreamController.
1051         This ensures that even if JS scripts do not keep track of the readable stream,
1052         the readable stream will not be disposed as long as the JS script has access to its reader.
1053
1054         All readers of a given stream are kept by the stream, either in an array (for released readers) 
1055         or and in ReadableStream::m_reader for the active reader.
1056         This removes the need for the code synchronizing stream and reader.
1057
1058         As a reader can now already count on its stream, the reader no longer needs to store the error in errored state.
1059         Removal of ReadableJSStream::Reader as closed promise rejection error is directly retrieved from the ReadableStream.
1060         Moved the creation of reader directly in ReadableStream.
1061
1062         Next step should be to remove ReadableStreamReader::m_state and to delegate the handling of ReadableStreamReader closed promise callbacks to ReadableStream.
1063
1064         No change in behavior.
1065
1066         * Modules/streams/ReadableStream.cpp:
1067         (WebCore::ReadableStream::changeStateToClosed):
1068         (WebCore::ReadableStream::changeStateToErrored):
1069         (WebCore::ReadableStream::getReader):
1070         * Modules/streams/ReadableStream.h:
1071         (WebCore::ReadableStream::reader):
1072         * Modules/streams/ReadableStreamReader.cpp:
1073         (WebCore::ReadableStreamReader::clean):
1074         (WebCore::ReadableStreamReader::ref):
1075         (WebCore::ReadableStreamReader::deref):
1076         (WebCore::ReadableStreamReader::closed):
1077         (WebCore::ReadableStreamReader::changeStateToClosed):
1078         (WebCore::ReadableStreamReader::changeStateToErrored):
1079         * Modules/streams/ReadableStreamReader.h:
1080         (WebCore::ReadableStreamReader::ReadableStreamReader):
1081         * Modules/streams/ReadableStreamReader.idl:
1082         * bindings/js/JSReadableStreamCustom.cpp:
1083         (WebCore::JSReadableStream::getReader):
1084         * bindings/js/JSReadableStreamReaderCustom.cpp:
1085         (WebCore::JSReadableStreamReader::closed):
1086         (WebCore::constructJSReadableStreamReader):
1087         * bindings/js/ReadableJSStream.cpp:
1088         (WebCore::ReadableJSStream::storeError):
1089         (WebCore::ReadableJSStream::ReadableJSStream): Deleted.
1090         * bindings/js/ReadableJSStream.h:
1091
1092 2015-05-17  Alexey Proskuryakov  <ap@apple.com>
1093
1094         Crash when uploading huge files to YouTube or Google Drive
1095         https://bugs.webkit.org/show_bug.cgi?id=145083
1096         rdar://problem/15468529
1097
1098         Reviewed by Darin Adler.
1099
1100         This fixes the crash, but uploading will fail.
1101
1102         * fileapi/FileReaderLoader.cpp:
1103         (WebCore::FileReaderLoader::start): Tell SubresourceLoader to not store a copy of
1104         all received data, FileReaderLoader has its own buffer.
1105         (WebCore::FileReaderLoader::didReceiveResponse): Fixed a bounds check - not every
1106         64-bit value that doesn't fit into 32 bits is negative. With this, FileReader fails
1107         on huge files right away, as intended.
1108         (WebCore::FileReaderLoader::didReceiveData): Fixed multiple bugs in code that's
1109         executed when size is not available upfront. This is the code that used to crash,
1110         but with the above fix, it's not executed by YouTube.
1111         Not only overflow was handled incorrectly, but even simply growing a buffer for
1112         append was buggy.
1113
1114 2015-05-16  Zalan Bujtas  <zalan@apple.com>
1115
1116         REGRESSION (Subpixel): Dashed underline is missing when box is positioned at subpixels.
1117         https://bugs.webkit.org/show_bug.cgi?id=145097
1118         rdar://problem/18588415
1119
1120         Reviewed by Simon Fraser.
1121
1122         Dashed and dotted border painting needs clipping in order to properly display corners.
1123         Similarly to solid border's quad calculation, we pixelsnap the border positions before computing the clipping quad values.
1124
1125         Test: fast/borders/dashed-border-on-subpixel-position.html
1126               fast/borders/dotted-border-on-subpixel-position.html
1127
1128         * rendering/RenderBoxModelObject.cpp:
1129         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
1130
1131 2015-05-16  Sungmann Cho  <sungmann.cho@navercorp.com>
1132
1133         Remove styleText() and applyStyleText() from InspectorStyle.
1134         https://bugs.webkit.org/show_bug.cgi?id=145093
1135
1136         Reviewed by Darin Adler.
1137
1138         styleText() and applyStyleText() in InspectorStyle are private aliases for the public
1139         accessors in the same class but are rarely used. I think it would be better off removing
1140         these aliases and updating all the current call sites to use the public accessors directly
1141         as noted in InspectorStyleSheet.h.
1142
1143         No new tests, no behavior change.
1144
1145         * inspector/InspectorStyleSheet.cpp:
1146         (WebCore::InspectorStyle::populateAllProperties):
1147         * inspector/InspectorStyleSheet.h:
1148
1149 2015-05-16  Sungmann Cho  <sungmann.cho@navercorp.com>
1150
1151         Remove MessageType variant of addMessageToConsole() from ChromeClient.
1152         https://bugs.webkit.org/show_bug.cgi?id=145095
1153
1154         Reviewed by Darin Adler.
1155
1156         All addMessageToConsole() in ChromeClient are exactly the same thing.
1157         So there is no reason to keep all this methods.
1158
1159         No new tests, no behavior change.
1160
1161         * page/ChromeClient.h:
1162         * page/PageConsoleClient.cpp:
1163         (WebCore::PageConsoleClient::messageWithTypeAndLevel):
1164
1165 2015-05-15  Sam Weinig  <sam@webkit.org>
1166
1167         Add getElementById to DocumentFragment
1168         https://bugs.webkit.org/show_bug.cgi?id=145094
1169
1170         Reviewed by Alexey Proskuryakov.
1171
1172         Match the latest DOM standard and other browsers by adding getElementById
1173         to DocumentFragment in addition to Document and SVGSVGElement. Add NonElementParentNode
1174         interface that the DOM standard defines.
1175
1176         Test: fast/dom/DocumentFragment/getElementById.html
1177
1178         * DerivedSources.make:
1179         * WebCore.xcodeproj/project.pbxproj:
1180         Add NonElementParentNode.idl
1181
1182         * dom/Document.idl:
1183         Mark Document as implementing NonElementParentNode and remove now redundant getElementById
1184         declaration.
1185
1186         * dom/DocumentFragment.cpp:
1187         (WebCore::DocumentFragment::getElementById):
1188         * dom/DocumentFragment.h:
1189         Add implementation of getElementById for DocumentFragments. Add a fast path for ShadowRoots
1190         which can take advantage of the fact that they are TreeScopes to use the elements by id cache
1191         in TreeScrope.
1192
1193         * dom/DocumentFragment.idl:
1194         Mark DocumentFragment as implementing NonElementParentNode.
1195
1196         * dom/NonElementParentNode.idl: Copied from Source/WebCore/dom/NonDocumentTypeChildNode.idl.
1197         Added.
1198
1199         * svg/SVGSVGElement.cpp:
1200         (WebCore::SVGSVGElement::getElementById):
1201         * svg/SVGSVGElement.h:
1202         * svg/SVGSVGElement.idl:
1203         Convert to taking an AtomicString to match other getElementByIds.
1204
1205 2015-05-15  Antti Koivisto  <antti@apple.com>
1206
1207         When redirecting to data URL use HTTP response for same origin policy checks
1208         https://bugs.webkit.org/show_bug.cgi?id=145054
1209         rdar://problem/20299050
1210
1211         Reviewed by Alexey Proskuryakov.
1212
1213         Test: http/tests/security/canvas-remote-read-data-url-image-redirect.html
1214
1215         * dom/ScriptElement.cpp:
1216         (WebCore::ScriptElement::notifyFinished):
1217         * dom/ScriptExecutionContext.cpp:
1218         (WebCore::ScriptExecutionContext::sanitizeScriptError):
1219         * html/canvas/CanvasRenderingContext.cpp:
1220         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
1221         * loader/ImageLoader.cpp:
1222         (WebCore::ImageLoader::notifyFinished):
1223         * loader/MediaResourceLoader.cpp:
1224         (WebCore::MediaResourceLoader::responseReceived):
1225         * loader/TextTrackLoader.cpp:
1226         (WebCore::TextTrackLoader::notifyFinished):
1227         * loader/cache/CachedImage.cpp:
1228         (WebCore::CachedImage::isOriginClean):
1229         * loader/cache/CachedResource.cpp:
1230         (WebCore::CachedResource::passesAccessControlCheck):
1231         (WebCore::CachedResource::passesSameOriginPolicyCheck):
1232
1233             Factor repeatedly used same origin policy test into a function.
1234
1235         (WebCore::CachedResource::redirectReceived):
1236
1237             When redirecting to a data URL save the redirect response.
1238
1239         (WebCore::CachedResource::responseForSameOriginPolicyChecks):
1240
1241             In case we got redirected to data use that response instead of the final data response for policy checks.
1242
1243         * loader/cache/CachedResource.h:
1244
1245 2015-05-16  Jon Lee  <jonlee@apple.com>
1246
1247         [iOS] wireless playback picker button is drawn incorrectly
1248         https://bugs.webkit.org/show_bug.cgi?id=145057
1249         rdar://problem/20877518
1250
1251         Reviewed by Jer Noble.
1252
1253         * Modules/mediacontrols/mediaControlsiOS.js:
1254         (ControllerIOS.prototype.updateWirelessTargetPickerButton): This method is
1255         defined in Controller, but is only meant to run on Macs. Override it with
1256         an empty function for iOS.
1257
1258 2015-05-15  Simon Fraser  <simon.fraser@apple.com>
1259
1260         REGRESSION (r183300): Background missing on top links on apple.com
1261         https://bugs.webkit.org/show_bug.cgi?id=145079
1262         rdar://problem/20914252
1263
1264         Reviewed by Tim Horton.
1265         
1266         Re-land r184421 with a fix to check against rects.coverageRect
1267         rather than the stale m_coverageRect.
1268
1269         Test: compositing/visible-rect/backing-change-height-from-zero.html
1270
1271         * platform/graphics/ca/GraphicsLayerCA.cpp:
1272         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
1273         * rendering/RenderLayerBacking.cpp:
1274         (WebCore::RenderLayerBacking::shouldSkipLayerInDump):
1275
1276 2015-05-15  Matt Baker  <mattbaker@apple.com>
1277
1278         Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty
1279         https://bugs.webkit.org/show_bug.cgi?id=144882
1280
1281         Reviewed by Joseph Pecoraro.
1282
1283         A timeline recording will always be stopped before the end of the current run loop is observed. Before
1284         dispatching the recording stopped event, any events that are currently in progress should be considered
1285         complete and sent to the frontend.
1286
1287         * inspector/InspectorTimelineAgent.cpp:
1288         (WebCore::InspectorTimelineAgent::internalStop):
1289
1290 2015-05-15  Commit Queue  <commit-queue@webkit.org>
1291
1292         Unreviewed, rolling out r184421.
1293         https://bugs.webkit.org/show_bug.cgi?id=145087
1294
1295         Introduced 42 layout test failures (Requested by rniwa on
1296         #webkit).
1297
1298         Reverted changeset:
1299
1300         "REGRESSION (r183300): Background missing on top links on
1301         apple.com"
1302         https://bugs.webkit.org/show_bug.cgi?id=145079
1303         http://trac.webkit.org/changeset/184421
1304
1305 2015-05-15  Simon Fraser  <simon.fraser@apple.com>
1306
1307         REGRESSION (r183300): Background missing on top links on apple.com
1308         https://bugs.webkit.org/show_bug.cgi?id=145079
1309         rdar://problem/20914252
1310
1311         Reviewed by Tim Horton.
1312
1313         GraphicsLayerCA::setVisibleAndCoverageRects() only set the m_intersectsCoverageRect
1314         flag if the coverage rect changed, but it doesn't if you simply change the size of
1315         the layer.
1316
1317         Instead, always re-evaluate the intersection, and set the CoverageRectChanged bit
1318         if it changes.
1319
1320         Test: compositing/visible-rect/backing-change-height-from-zero.html
1321
1322         * platform/graphics/ca/GraphicsLayerCA.cpp:
1323         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
1324         * rendering/RenderLayerBacking.cpp:
1325         (WebCore::RenderLayerBacking::shouldSkipLayerInDump): Don't skip any layers in a
1326         debug layer dump, to assist debugging.
1327
1328 2015-05-15  Sam Weinig  <sam@webkit.org>
1329
1330         Move HTMLElement's children property to ParentNode
1331         https://bugs.webkit.org/show_bug.cgi?id=145072
1332
1333         Reviewed by Chris Dumez.
1334
1335         Match the latest DOM standard and other browsers by moving the children property
1336         to ParentNode, thus exposing it on Element, Document and DocumentFragment.
1337
1338         Test: fast/dom/ParentNode-children.html
1339
1340         * dom/ContainerNode.cpp:
1341         (WebCore::ContainerNode::children):
1342         Moved implementation from HTMLElement to here.
1343
1344         (WebCore::ContainerNode::ensureCachedHTMLCollection):
1345         (WebCore::ContainerNode::cachedHTMLCollection):
1346         Moved implementation from Element to here so that ContainerNode::children
1347         can use it.
1348
1349         (WebCore::ContainerNode::firstElementChild):
1350         (WebCore::ContainerNode::lastElementChild):
1351         (WebCore::ContainerNode::childElementCount):
1352         Remove unnecessary assertions.
1353
1354         * dom/ContainerNode.h:
1355         Moved declarations from HTMLElement and Element to here.
1356
1357         * dom/Element.cpp:
1358         (WebCore::Element::ensureCachedHTMLCollection): Deleted.
1359         (WebCore::Element::cachedHTMLCollection): Deleted.
1360         * dom/Element.h:
1361         Moved to ContainerNode.
1362
1363         * dom/Node.cpp:
1364         (WebCore::Node::previousElementSibling):
1365         (WebCore::Node::nextElementSibling):
1366         Remove unnecessary assertions.
1367
1368         * dom/ParentNode.idl:
1369         Moved the children property here from HTMLElement.
1370
1371         * html/HTMLElement.cpp:
1372         (WebCore::HTMLElement::children): Deleted.
1373         * html/HTMLElement.h:
1374         Moved to ContainerNode.
1375
1376         * html/HTMLElement.idl:
1377         Get rid of the children property for all bindings except Objective-C which needs
1378         to keep it to avoid changing the public API.
1379
1380 2015-05-15  Zalan Bujtas  <zalan@apple.com>
1381
1382         WebCore ASan debug build fails. ERROR: WebCore has a weak external symbol in it.
1383         https://bugs.webkit.org/show_bug.cgi?id=145070
1384
1385         Reviewed by David Kilzer.
1386
1387         Build fix.
1388
1389         * Configurations/WebCore.unexp:
1390
1391 2015-05-15  Beth Dakin  <bdakin@apple.com>
1392
1393         Prefix force on MouseEvent and add constants for click and force click values
1394         https://bugs.webkit.org/show_bug.cgi?id=145065
1395         -and corresponding-
1396         rdar://problem/20770052
1397
1398         Reviewed by Tim Horton.
1399
1400         (WebCore::MouseEvent::webkitForce):
1401         * dom/MouseEvent.idl:
1402
1403 2015-05-15  Jer Noble  <jer.noble@apple.com>
1404
1405         [MediaControls] Refactor media controls & bring improvements made to iOS controls to Mac.
1406         https://bugs.webkit.org/show_bug.cgi?id=144973
1407
1408         Reviewed by Dean Jackson.
1409
1410         Pull improvements made to the iOS media controls back into the Mac controls by moving
1411         code from mediaControlsiOS.js into MediaControlsApple.js.
1412
1413         The largest refactored feature is the ability to drop individual controls from the media
1414         controls when the video is too small to contain them. To allow these controls to resize
1415         dynamically, a new "resize" event is fired inside the media element's shadow DOM.
1416
1417         * Modules/mediacontrols/mediaControlsApple.css:
1418         (audio::-webkit-media-controls-panel .dropped): Added; sets "display: none".
1419         * Modules/mediacontrols/mediaControlsApple.js:
1420         (Controller): Set defaults for new variables.
1421         (Controller.prototype.updateControls): Update the controls width; moved from iOS.js.
1422         (Controller.prototype.handleReadyStateChange): Update the controls; moved from iOS.js.
1423         (Controller.prototype.handleTimeUpdate): Update the progress; moved from iOS.js.
1424         (Controller.prototype.handleTimelineInput): Pause if scrubbing; moved from iOS.js.
1425         (Controller.prototype.handleTimelineChange): Update the progress; moved from iOS.js.
1426         (Controller.prototype.showControls): Update the controls width; moved from iOS.js.
1427         (Controller.prototype.hideControls): Removed _potentiallyScrubbing check; not needed due to changes
1428             to controlsAlwaysVisible().
1429         (Controller.prototype.scheduleUpdateLayoutForDisplayedWidth): Moved from iOS.js.
1430         (Controller.prototype.isControlVisible): Added; checks whether control is parented & not hidden.
1431         (Controller.prototype.updateLayoutForDisplayedWidth): Moved from iOS.js and refactored.
1432         (Controller.prototype.controlsAlwaysVisible): Return true if scrubbing.
1433         (Controller.prototype.updateHasAudio): Check currentPlaybackTargetIsWireless(); moved from iOS.js.
1434         (Controller.prototype.get scrubbing): Simple getter for _scrubbing.
1435         (Controller.prototype.set scrubbing): Check play state if scrubbing; start playback (if necessary)
1436             if not scrubbing.
1437         (Controller.prototype.get pageScaleFactor): Moved from iOS.js.
1438         (Controller.prototype.set pageScaleFactor): Ditto.
1439         (Controller.prototype.handleRootResize): Schedule an update of the contrtols width.
1440
1441         Remove a bunch of newly unnecessary code from the iOS media controls:
1442
1443         * Modules/mediacontrols/mediaControlsiOS.js:
1444         (ControllerIOS):
1445         (ControllerIOS.prototype.createControls): Remove ivars moved into Apple.js.
1446         (ControllerIOS.prototype.configureInlineControls): Remove spacer; made unnecessary.
1447         (ControllerIOS.prototype.showControls): Deleted.
1448         (ControllerIOS.prototype.updateTime): Deleted.
1449         (ControllerIOS.prototype.handleTimelineTouchStart): Just call "scrubbing = true", handled in Apple.js.
1450         (ControllerIOS.prototype.handleTimelineTouchEnd): Just call "scrubbing = false", handled in Apple.js.
1451         (ControllerIOS.prototype.handleReadyStateChange): Deleted.
1452         (ControllerIOS.prototype.setPlaying): Don't check _timelineIsHidden; not needed.
1453         (ControllerIOS.prototype.get pageScaleFactor): Deleted.
1454         (ControllerIOS.prototype.set pageScaleFactor): Deleted.
1455         (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Deleted.
1456         (ControllerIOS.prototypeupdateLayoutForDisplayedWidth): Deleted.
1457
1458         Fire a "resize" event at the shadow DOM root when layout results in a size change.
1459
1460         * html/HTMLMediaElement.cpp:
1461         (WebCore::HTMLMediaElement::layoutSizeChanged): Fire the "resize" event at the shadow DOM.
1462         * html/HTMLMediaElement.h:
1463         * rendering/RenderMedia.cpp:
1464         (WebCore::RenderMedia::layout): Trigger layoutSizeChanged()
1465         * rendering/RenderMedia.h:
1466
1467         Drive-by fixes:
1468
1469         * Modules/mediacontrols/mediaControlsApple.js:
1470         (Controller.prototype.createControls): aria-label text is totally wrong; removed.
1471         (Controller.prototype.updateWirelessPlaybackStatus): Use class-names to hide controls, not inline styles.
1472
1473 2015-05-15  Alex Christensen  <achristensen@webkit.org>
1474
1475         [Content Extensions] Fail to load old content extension files
1476         https://bugs.webkit.org/show_bug.cgi?id=145027
1477
1478         Reviewed by Eric Carlson.
1479
1480         * contentextensions/DFABytecode.h:
1481
1482 2015-05-15  Eric Carlson  <eric.carlson@apple.com>
1483
1484         Unreviewed build fix.
1485
1486         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Add clang pragmas to ignore
1487         deprecation warnings.
1488
1489 2015-05-15  Jeremy Jones  <jeremyj@apple.com>
1490
1491         Limit alternate fullscreen with linked on or after.
1492         https://bugs.webkit.org/show_bug.cgi?id=144894
1493
1494         Reviewed by Dean Jackson.
1495
1496         * platform/ios/WebCoreSystemInterfaceIOS.h: add new wkIOSSystemVersion
1497
1498 2015-05-15  Roger Fong  <roger_fong@apple.com>
1499
1500         Unreviewed. Revert part of r184361.
1501
1502         * Modules/mediacontrols/mediaControlsApple.js:
1503         (Controller.prototype.configureInlineControls):
1504         HI wants the buttons flipped.
1505
1506 2015-05-15  Sungmann Cho  <sungmann.cho@navercorp.com>
1507
1508         Fix trivial typo in TextEncodingDetectorICU.cpp.
1509         https://bugs.webkit.org/show_bug.cgi?id=145055
1510
1511         Reviewed by Alexey Proskuryakov.
1512
1513         No new tests, no behavior change..
1514
1515         * platform/text/TextEncodingDetectorICU.cpp:
1516         (WebCore::detectTextEncoding):
1517
1518 2015-05-15  Alexey Proskuryakov  <ap@apple.com>
1519
1520         Cyrillic top-level domains are displayed as punycode
1521         https://bugs.webkit.org/show_bug.cgi?id=145024
1522         rdar://problem/17747133
1523         rdar://problem/14116594
1524
1525         Reviewed by Tim Horton.
1526
1527         Handling each TLD in code is annoying, but we can probably survive like this
1528         for a few more years, and maybe we'll think of an entirely different way to deal
1529         with non-ASCII domain labels in the meanwhile.
1530
1531         * platform/mac/WebCoreNSURLExtras.mm:
1532         (WebCore::isSecondLevelDomainNameAllowedByTLDRules):
1533         (WebCore::allCharactersAllowedByTLDRules):
1534
1535 2015-05-15  Roger Fong  <roger_fong@apple.com>
1536
1537         Cursor is displayed after full screen video controls fade away.
1538         https://bugs.webkit.org/show_bug.cgi?id=145034.
1539         <rdar://problem/20458604>
1540
1541         Reviewed by Jer Noble.
1542
1543         * Modules/mediacontrols/mediaControlsApple.css:
1544         (video::-webkit-media-controls-panel):
1545         Unnecessary cursor style is on the control panel while hidden but
1546         the cursor will already be hidden anyways from being auto-hidden.
1547         Causes style to change when controls are hidden,
1548         which causes the cursor to reappear.
1549
1550 2015-05-15  Roger Fong  <roger_fong@apple.com>
1551
1552         Checkmark on OFF option of captions sometimes does not appear.
1553         https://bugs.webkit.org/show_bug.cgi?id=145060.
1554         <rdar://problem/19388333>
1555
1556         Reviewed by Eric Carlson.
1557
1558         * Modules/mediacontrols/mediaControlsApple.js:
1559         (Controller.prototype.buildCaptionMenu):
1560         Audio tracks don’t have an OFF option.
1561         Remove related code to allow OFF option for subtitles to work properly.
1562
1563 2015-05-15  Zalan Bujtas  <zalan@apple.com>
1564
1565         White edge on animating panel on http://rokkosunnyvale.com
1566         https://bugs.webkit.org/show_bug.cgi?id=144986
1567         rdar://problem/20907683
1568
1569         Reviewed by Simon Fraser.
1570
1571         Background image geometry calculation needs to be based on the final painting size of the container
1572         in order to accurately compute tile sizes, repeating positions etc.
1573         The container's size is pixelsnapped at painting using absolute coordinates. This patch
1574         ensures that we snap to the same size while computing background geometry.
1575
1576         Test: fast/images/background-image-size-changes-fractional-position.html
1577
1578         * rendering/InlineFlowBox.cpp:
1579         (WebCore::InlineFlowBox::paintBoxDecorations):
1580         * rendering/RenderBox.cpp:
1581         (WebCore::RenderBox::paintBoxDecorations):
1582         (WebCore::RenderBox::paintBackground):
1583         (WebCore::RenderBox::getBackgroundPaintedExtent):
1584         (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
1585         (WebCore::RenderBox::maskClipRect):
1586         (WebCore::RenderBox::repaintLayerRectsForImage): unable to get absolute coords.
1587         * rendering/RenderBox.h:
1588         * rendering/RenderBoxModelObject.cpp:
1589         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1590         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1591         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
1592         (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground):
1593         * rendering/RenderBoxModelObject.h:
1594         * rendering/RenderFieldset.cpp:
1595         (WebCore::RenderFieldset::paintBoxDecorations):
1596         * rendering/RenderImage.cpp:
1597         (WebCore::RenderImage::boxShadowShouldBeAppliedToBackground):
1598         (WebCore::RenderImage::computeBackgroundIsKnownToBeObscured):
1599         * rendering/RenderImage.h:
1600         * rendering/RenderLayer.cpp: unable to get absolute coords.
1601         (WebCore::RenderLayer::calculateClipRects):
1602         * rendering/RenderLayerBacking.cpp:
1603         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): currently not used.
1604         * rendering/RenderObject.h:
1605         (WebCore::RenderObject::computeBackgroundIsKnownToBeObscured):
1606         (WebCore::RenderObject::backgroundIsKnownToBeObscured):
1607         * rendering/RenderTable.cpp:
1608         (WebCore::RenderTable::paintBoxDecorations):
1609         * rendering/RenderTableCell.cpp:
1610         (WebCore::RenderTableCell::boxShadowShouldBeAppliedToBackground):
1611         * rendering/RenderTableCell.h:
1612
1613 2015-05-15  Jer Noble  <jer.noble@apple.com>
1614
1615         Crash in RenderFlowThread::popFlowThreadLayoutState() due to mismatched push/pop count
1616         https://bugs.webkit.org/show_bug.cgi?id=145042
1617
1618         Reviewed by David Hyatt.
1619
1620         RenderFlowThread previously used a ListHashSet to store its stack of active objects. This
1621         is problematic because, if the same object is pushed twice, only a single entry of that
1622         object is added to the stack. After this occurs, a matching number of pushes will pop too
1623         many items off the stack, causing a crash when popping a stack with zero items. This
1624         specifically happens in FrameView::layout(), which will push its root renderer on the stack
1625         of active items, and then ask the root to layout(), which will attempt to push itself on the
1626         stack of active items.
1627
1628         Instead of a ListHashSet, use a Vector, which has similar memory characteristics and no 
1629         uniqueness requirements.
1630
1631         * rendering/RenderFlowThread.cpp:
1632         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
1633         (WebCore::RenderFlowThread::popFlowThreadLayoutState):
1634         * rendering/RenderFlowThread.h:
1635
1636 2015-05-15  Per Arne Vollan  <peavo@outlook.com>
1637
1638         [Curl] WebSocket platform part is not implemented.
1639         https://bugs.webkit.org/show_bug.cgi?id=144628
1640
1641         Reviewed by Darin Adler.
1642
1643         Add Curl platform code implementation for WebSockets.
1644
1645         * platform/network/curl/SocketStreamHandle.h:
1646         (WebCore::SocketStreamHandle::create):
1647         (WebCore::SocketStreamHandle::SocketData::SocketData):
1648         * platform/network/curl/SocketStreamHandleCurl.cpp:
1649         (WebCore::SocketStreamHandle::SocketStreamHandle):
1650         (WebCore::SocketStreamHandle::~SocketStreamHandle):
1651         (WebCore::SocketStreamHandle::platformSend):
1652         (WebCore::SocketStreamHandle::platformClose):
1653         (WebCore::SocketStreamHandle::readData):
1654         (WebCore::SocketStreamHandle::sendData):
1655         (WebCore::SocketStreamHandle::waitForAvailableData):
1656         (WebCore::SocketStreamHandle::startThread):
1657         (WebCore::SocketStreamHandle::stopThread):
1658         (WebCore::SocketStreamHandle::didReceiveData):
1659         (WebCore::SocketStreamHandle::didOpenSocket):
1660         (WebCore::SocketStreamHandle::createCopy):
1661
1662 2015-05-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1663
1664         REGRESSION(r183861): [SOUP] Downloads are broken when using the Network Process
1665         https://bugs.webkit.org/show_bug.cgi?id=144738
1666
1667         Reviewed by Alexey Proskuryakov.
1668
1669         Add ResourceHandle::releaseForDownload() that releases the current
1670         handle to be used as a download.
1671
1672         * platform/network/ResourceHandle.h:
1673         * platform/network/soup/ResourceHandleSoup.cpp:
1674         (WebCore::ResourceHandle::releaseForDownload):
1675
1676 2015-05-15  Zan Dobersek  <zdobersek@igalia.com>
1677
1678         [GTK] Fix PlatformDisplayWayland construction error, implement the destructor
1679         https://bugs.webkit.org/show_bug.cgi?id=144997
1680
1681         Reviewed by Carlos Garcia Campos.
1682
1683         The PlatformDisplayWayland constructor is private, so we can't use
1684         std::make_unique<>() to construct an object of this class.
1685
1686         Implement the PlatformDisplayWayland destructor, cleaning out all
1687         the Wayland resources, if present.
1688
1689         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
1690         (WebCore::PlatformDisplayWayland::create):
1691         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland):
1692         (WebCore::PlatformDisplayWayland::~PlatformDisplayWayland):
1693
1694 2015-05-14  Zalan Bujtas  <zalan@apple.com>
1695
1696         Images on www.fitstylelife.com jiggle on hover.
1697         https://bugs.webkit.org/show_bug.cgi?id=145020
1698         rdar://problem/20885337
1699
1700         Reviewed by Simon Fraser.
1701
1702         This patch ensures that the clipping layer of a composited content is pixel snapped properly.
1703
1704         Tests: compositing/composited-parent-clipping-layer-on-subpixel-position.html
1705                compositing/parent-clipping-layer-on-subpixel-position.html
1706
1707         * rendering/RenderLayerBacking.cpp:
1708         (WebCore::RenderLayerBacking::updateGeometry):
1709
1710 2015-05-14  Chris Dumez  <cdumez@apple.com>
1711
1712         Have DOMWindow::createWindow() take references to frames
1713         https://bugs.webkit.org/show_bug.cgi?id=145037
1714
1715         Reviewed by Gyuyoung Kim.
1716
1717         Have DOMWindow::createWindow() take references to frames instead of
1718         pointers as they are expected to be non-null. Also return a RefPtr
1719         instead of a PassRefPtr.
1720
1721         * inspector/InspectorFrontendClientLocal.cpp:
1722         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1723         * loader/FrameLoader.cpp:
1724         (WebCore::createWindow):
1725         * loader/FrameLoader.h:
1726         * page/DOMWindow.cpp:
1727         (WebCore::DOMWindow::createWindow):
1728         (WebCore::DOMWindow::open):
1729         (WebCore::DOMWindow::showModalDialog):
1730         * page/DOMWindow.h:
1731
1732 2015-05-14  Simon Fraser  <simon.fraser@apple.com>
1733
1734         REGRESSION (r183794): Garbage tiles when body background switches to fixed
1735         https://bugs.webkit.org/show_bug.cgi?id=145032
1736         rdar://problem/20963679
1737
1738         Reviewed by Dean Jackson.
1739         
1740         After r183794 (or possibly an earlier commit), we failed to dynamically update
1741         the configuration of layers that handled fixed background attachment on the root.
1742         
1743         This would result in unpainted tiles, and non-fixed-background behavior.
1744         
1745         Fix by calling RenderLayerCompositor::rootOrBodyStyleChanged() whenever the
1746         style changes on the root or body renderers, and triggering a compositing update
1747         if the fixedness of the background changes. It calls the existing rootBackgroundTransparencyChanged()
1748         if the color changes.
1749
1750         Test: platform/mac-wk2/tiled-drawing/toggle-to-fixed-background.html
1751
1752         * rendering/RenderBox.cpp:
1753         (WebCore::RenderBox::styleDidChange):
1754         * rendering/RenderLayerCompositor.cpp:
1755         (WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):
1756         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
1757         * rendering/RenderLayerCompositor.h:
1758
1759 2015-05-14  Commit Queue  <commit-queue@webkit.org>
1760
1761         Unreviewed, rolling out r184359 and r184362.
1762         https://bugs.webkit.org/show_bug.cgi?id=145035
1763
1764         Introduced a crash in six media element tests (Requested by
1765         rniwa on #webkit).
1766
1767         Reverted changesets:
1768
1769         "[MediaControls] Refactor media controls & bring improvements
1770         made to iOS controls to Mac."
1771         https://bugs.webkit.org/show_bug.cgi?id=144973
1772         http://trac.webkit.org/changeset/184359
1773
1774         "Unreviewed build fix after r184359; typo."
1775         http://trac.webkit.org/changeset/184362
1776
1777 2015-05-14  Jer Noble  <jer.noble@apple.com>
1778
1779         Unreviewed build fix after r184359; typo.
1780
1781         * html/HTMLMediaElement.cpp:
1782         (WebCore::HTMLMediaElement::layoutSizeChanged):
1783
1784 2015-05-14  Roger Fong  <roger_fong@apple.com>
1785
1786         Adjust button CSS and positioning in preparation.
1787         https://bugs.webkit.org/show_bug.cgi?id=144973.
1788         <rdar://problem/20306227>
1789
1790         Reviewed by Dean Jackson.
1791
1792         The only visual change here is the swapping of the rewind and play button positions.
1793         Also, position buttons based off of both left and right margins instead of just one of the two.
1794         This allows the controls drop off to work without having to use a spacer element to take the place
1795         of the timeline if the controls are too small.
1796         * Modules/mediacontrols/mediaControlsApple.css:
1797         (audio::-webkit-media-controls-rewind-button):
1798         (audio::-webkit-media-controls-play-button):
1799         (audio::-webkit-media-controls-panel .mute-box):
1800         (audio::-webkit-media-controls-wireless-playback-picker-button):
1801         (audio::-webkit-media-controls-toggle-closed-captions-button):
1802         (audio::-webkit-media-controls-fullscreen-button):
1803         (audio::-webkit-media-controls-fullscreen-button.exit):
1804         (audio::-webkit-media-controls-time-remaining-display):
1805         (audio:-webkit-full-screen::-webkit-media-controls-toggle-closed-captions-button):
1806         (audio:-webkit-full-screen::-webkit-media-controls-wireless-playback-picker-button):
1807         * Modules/mediacontrols/mediaControlsApple.js:
1808         (Controller.prototype.configureInlineControls):
1809
1810 2015-05-14  Dean Jackson  <dino@apple.com>
1811
1812         MediaControls: controls are live even when invisible
1813         https://bugs.webkit.org/show_bug.cgi?id=145029
1814         <rdar://problem/20865442>
1815
1816         Reviewed by Jer Noble.
1817
1818         When the controls are invisible they should ignore touch/mouse
1819         events.
1820
1821         * Modules/mediacontrols/mediaControlsiOS.css: Add pointer-events: none where appropriate.
1822         (video::-webkit-media-controls-panel-container):
1823         (video::-webkit-media-controls-panel-background):
1824         (video::-webkit-media-controls-panel):
1825         (video::-webkit-media-controls-panel.paused):
1826
1827 2015-05-14  Jer Noble  <jer.noble@apple.com>
1828
1829         [MediaControls] Refactor media controls & bring improvements made to iOS controls to Mac.
1830         https://bugs.webkit.org/show_bug.cgi?id=144973
1831
1832         Reviewed by Dean Jackson.
1833
1834         Pull improvements made to the iOS media controls back into the Mac controls by moving
1835         code from mediaControlsiOS.js into MediaControlsApple.js.
1836
1837         The largest refactored feature is the ability to drop individual controls from the media
1838         controls when the video is too small to contain them. To allow these controls to resize
1839         dynamically, a new "resize" event is fired inside the media element's shadow DOM.
1840
1841         * Modules/mediacontrols/mediaControlsApple.css:
1842         (audio::-webkit-media-controls-panel .dropped): Added; sets "display: none".
1843         * Modules/mediacontrols/mediaControlsApple.js:
1844         (Controller): Set defaults for new variables.
1845         (Controller.prototype.updateControls): Update the controls width; moved from iOS.js.
1846         (Controller.prototype.handleReadyStateChange): Update the controls; moved from iOS.js.
1847         (Controller.prototype.handleTimeUpdate): Update the progress; moved from iOS.js.
1848         (Controller.prototype.handleTimelineInput): Pause if scrubbing; moved from iOS.js.
1849         (Controller.prototype.handleTimelineChange): Update the progress; moved from iOS.js.
1850         (Controller.prototype.showControls): Update the controls width; moved from iOS.js.
1851         (Controller.prototype.hideControls): Removed _potentiallyScrubbing check; not needed due to changes
1852             to controlsAlwaysVisible().
1853         (Controller.prototype.scheduleUpdateLayoutForDisplayedWidth): Moved from iOS.js.
1854         (Controller.prototype.isControlVisible): Added; checks whether control is parented & not hidden.
1855         (Controller.prototype.updateLayoutForDisplayedWidth): Moved from iOS.js and refactored.
1856         (Controller.prototype.controlsAlwaysVisible): Return true if scrubbing.
1857         (Controller.prototype.updateHasAudio): Check currentPlaybackTargetIsWireless(); moved from iOS.js.
1858         (Controller.prototype.get scrubbing): Simple getter for _scrubbing.
1859         (Controller.prototype.set scrubbing): Check play state if scrubbing; start playback (if necessary)
1860             if not scrubbing.
1861         (Controller.prototype.get pageScaleFactor): Moved from iOS.js.
1862         (Controller.prototype.set pageScaleFactor): Ditto.
1863         (Controller.prototype.handleRootResize): Schedule an update of the contrtols width.
1864
1865         Remove a bunch of newly unnecessary code from the iOS media controls:
1866
1867         * Modules/mediacontrols/mediaControlsiOS.js:
1868         (ControllerIOS):
1869         (ControllerIOS.prototype.createControls): Remove ivars moved into Apple.js.
1870         (ControllerIOS.prototype.configureInlineControls): Remove spacer; made unnecessary.
1871         (ControllerIOS.prototype.showControls): Deleted.
1872         (ControllerIOS.prototype.updateTime): Deleted.
1873         (ControllerIOS.prototype.handleTimelineTouchStart): Just call "scrubbing = true", handled in Apple.js.
1874         (ControllerIOS.prototype.handleTimelineTouchEnd): Just call "scrubbing = false", handled in Apple.js.
1875         (ControllerIOS.prototype.handleReadyStateChange): Deleted.
1876         (ControllerIOS.prototype.setPlaying): Don't check _timelineIsHidden; not needed.
1877         (ControllerIOS.prototype.get pageScaleFactor): Deleted.
1878         (ControllerIOS.prototype.set pageScaleFactor): Deleted.
1879         (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Deleted.
1880         (ControllerIOS.prototypeupdateLayoutForDisplayedWidth): Deleted.
1881
1882         Fire a "resize" event at the shadow DOM root when layout results in a size change.
1883
1884         * html/HTMLMediaElement.cpp:
1885         (WebCore::HTMLMediaElement::layoutSizeChanged): Fire the "resize" event at the shadow DOM.
1886         * html/HTMLMediaElement.h:
1887         * rendering/RenderMedia.cpp:
1888         (WebCore::RenderMedia::layout): Trigger layoutSizeChanged()
1889         * rendering/RenderMedia.h:
1890
1891         Drive-by fixes:
1892
1893         * Modules/mediacontrols/mediaControlsApple.js:
1894         (Controller.prototype.createControls): aria-label text is totally wrong; removed.
1895         (Controller.prototype.updateWirelessPlaybackStatus): Use class-names to hide controls, not inline styles.
1896
1897 2015-05-13  Ryosuke Niwa  <rniwa@webkit.org>
1898
1899         Crash in ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline
1900         https://bugs.webkit.org/show_bug.cgi?id=119068
1901
1902         Reviewed by Enrica Casucci.
1903
1904         The bug was caused by makeInsertedContentRoundTrippableWithHTMLTreeBuilder not updating
1905         nodes kept tracked by insertedNodes and moveNodeOutOfAncestor stumbling upon it.
1906
1907         Fixed the bug by updating insertedNodes in makeInsertedContentRoundTrippableWithHTMLTreeBuilder.
1908
1909         Test: editing/inserting/insert-table-in-paragraph-crash.html
1910
1911         * editing/ReplaceSelectionCommand.cpp:
1912         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
1913         (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
1914         * editing/ReplaceSelectionCommand.h:
1915
1916 2015-05-14  Myles C. Maxfield  <mmaxfield@apple.com>
1917
1918         [Mac] Expose more font weights for -apple-system
1919         https://bugs.webkit.org/show_bug.cgi?id=144707
1920
1921         Reviewed by Simon Fraser.
1922
1923         Previously, when we parsed a CSS declaration of the form font: keyword; where keyword
1924         is one of caption, icon, menu, message-box, small-caption, -webkit-mini-control, -webkit-small-control,
1925         or -webkit-control (which html.css does for form controls), we would ask the system what the appropriate
1926         system font is, get that font's family name, and synthesize a font-family CSS property for the element.
1927         Then, later when we actually go to look up the font, we would look up the font by family name using this
1928         information. However, this round-tripping of a font through a family name is actually lossy, and is not
1929         guaranteed to preserve system-font-ness (which we use for various things including metrics calculations).
1930
1931         This patch modifies this logic to specify a token family name instead, which the font lookup code special
1932         cases (and reacts by making the appropriate system-font lookup call). This approach is currently how iOS
1933         handles these system fonts; this patch simply brings this approach to OS X.
1934
1935         There is also an added progression here. We used to simply call [NSFont fontWithName:size:] on the system
1936         font family name (which the parser found for us) which entirely disregards weight. This means that we
1937         used to be getting synthesized bold in form controls which ask for a heavy weight. Migrating to this
1938         system-font aware call means that we get the real bold font instead of synthesized bold.
1939
1940         Once this system-font-ness is guaranteed to be preserved between parsing time and font lookup time, we
1941         can safely migrate to using [NSFont systemFontOfSize:weight] instead of [NSFont systemFontOfSize:] on
1942         platforms which support it.
1943
1944         Tests: fast/text/systemFont.html
1945                fast/css/css2-system-fonts.html
1946                fast/forms/select/optgroup-rendering.html
1947                fast/forms/validation-message-appearance.html
1948
1949         * css/CSSParser.cpp:
1950         (WebCore::CSSParser::parseSystemFont): Add a comment regarding why we are bothering with expanding out
1951         the font property in the first place.
1952         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1953         (WebCore::FontCascade::primaryFontIsSystemFont): Update to use new system font tokens.
1954         * platform/graphics/mac/FontCacheMac.mm:
1955         (WebCore::toNSFontWeight): New static method to map font weights to NSFontWeight constants available on
1956         Yosemite and later.
1957         (WebCore::fontWithFamilySpecialCase): Pull all these special-case font token name handling into a
1958         separate function, which returns an Optional.
1959         (WebCore::fontWithFamily):
1960         * platform/mac/ThemeMac.mm:
1961         (WebCore::ThemeMac::controlFont): Use the font token name instead of the generated system font family
1962         name.
1963         * platform/spi/mac/NSFontSPI.h: Add [NSFont systemFontWithSize:weight:] and the proper NSFontWeight
1964         constants.
1965         * rendering/RenderThemeMac.mm:
1966         (WebCore::RenderThemeMac::updateCachedSystemFontDescription): Use the font token names instead of the
1967         generated system font family name.
1968         (WebCore::RenderThemeMac::setFontFromControlSize): Ditto.
1969
1970 2015-05-14  Roger Fong  <roger_fong@apple.com>
1971
1972         Add internals setting to disable wireless playback availability for layout tests
1973         https://bugs.webkit.org/show_bug.cgi?id=145012.
1974         <rdar://problem/20946504>
1975
1976         Reviewed by Eric Carlson.
1977
1978         * testing/InternalSettings.cpp:
1979         (WebCore::InternalSettings::resetToConsistentState):
1980         (WebCore::InternalSettings::setWirelessPlaybackDisabled):
1981         * testing/InternalSettings.idl:
1982
1983 2015-05-14  Beth Dakin  <bdakin@apple.com>
1984
1985         Change range of possible forces for mouseforcechanged DOM event
1986         https://bugs.webkit.org/show_bug.cgi?id=144987
1987         -and corresponding-
1988         rdar://problem/20472802
1989
1990         Reviewed by Tim Horton.
1991
1992         Change to a 0-3 range.
1993         * platform/PlatformMouseEvent.h:
1994         * platform/mac/PlatformEventFactoryMac.mm:
1995         (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
1996
1997 2015-05-14  Manuel Rego Casasnovas  <rego@igalia.com>
1998
1999         Fix typo in RenderBox::instrinsicScrollbarLogicalWidth()
2000         https://bugs.webkit.org/show_bug.cgi?id=144999
2001
2002         Reviewed by Sergio Villar Senin.
2003
2004         Rename RenderBox::instrinsicScrollbarLogicalWidth() to
2005         RenderBox::intrinsicScrollbarLogicalWidth().
2006
2007         No new tests, no behavior changes.
2008
2009         * rendering/RenderBlock.cpp:
2010         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
2011         * rendering/RenderBlockFlow.cpp:
2012         (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
2013         * rendering/RenderBox.cpp:
2014         (WebCore::RenderBox::intrinsicScrollbarLogicalWidth):
2015         (WebCore::RenderBox::instrinsicScrollbarLogicalWidth): Deleted.
2016         * rendering/RenderBox.h:
2017         * rendering/RenderDeprecatedFlexibleBox.cpp:
2018         (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
2019         * rendering/RenderFlexibleBox.cpp:
2020         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths):
2021
2022 2015-05-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2023
2024         SharedBuffer::createWithContentsOfFile should use map file routines
2025         https://bugs.webkit.org/show_bug.cgi?id=144192
2026
2027         Reviewed by Darin Adler.
2028
2029         Made use of mmap routines within SharedBuffer::createWithContentsOfFile for EFL, GTK and Mac ports.
2030         If mapping is failing, it falls back to the previous version of SharedBuffer::createWithContentsOfFile renamed as
2031         SharedBuffer::createFromReadingFile (using open/read method).
2032         File content is mapped until SharedBuffer is cleared, destroyed or additional content is appended to the SharedBuffer.
2033
2034         A helper class, MappedFileData, is introduced to handle mapped files through calls to open/mmap/munmap/close.
2035
2036         Patch covered by existing layout tests and added unit tests.
2037
2038         * platform/FileSystem.cpp:
2039         (WebCore::MappedFileData::MappedFileData):
2040         (WebCore::MappedFileData::operator=):
2041         (WebCore::MappedFileData::~MappedFileData):
2042         * platform/FileSystem.h:
2043         (WebCore::MappedFileData::MappedFileData):
2044         (WebCore::MappedFileData::operator bool):
2045         (WebCore::MappedFileData::data):
2046         (WebCore::MappedFileData::size):
2047         * platform/SharedBuffer.cpp:
2048         (WebCore::SharedBuffer::SharedBuffer):
2049         (WebCore::SharedBuffer::createWithContentsOfFile): Making use of MappedFileData before using createFromReadingFile.
2050         (WebCore::SharedBuffer::size): Checking whether data is coming from a MappedFileData.
2051         (WebCore::SharedBuffer::data): Ditto.
2052         (WebCore::SharedBuffer::append): Ditto.
2053         (WebCore::SharedBuffer::clear): Clearing MappedFileData if needed.
2054         (WebCore::SharedBuffer::copy): Transferring mapped data to buffer if needed.
2055         (WebCore::SharedBuffer::getSomeData):
2056         (WebCore::SharedBuffer::maybeTransferMappedFileData):
2057         * platform/SharedBuffer.h:
2058         * platform/gtk/SharedBufferGtk.cpp:
2059         (WebCore::SharedBuffer::createFromReadingFile): renamed from createWithContentsOfFile.
2060         * platform/mac/SharedBufferMac.mm:
2061         (WebCore::SharedBuffer::createFromReadingFile): Dito.
2062         * platform/posix/SharedBufferPOSIX.cpp:
2063         (WebCore::SharedBuffer::createFromReadingFile): Ditto.
2064         * platform/win/SharedBufferWin.cpp:
2065         (WebCore::SharedBuffer::createFromReadingFile): Ditto.
2066
2067 2015-05-13  Simon Fraser  <simon.fraser@apple.com>
2068
2069         Get the ScriptController from the correct frame for media elements and plug-ins
2070         https://bugs.webkit.org/show_bug.cgi?id=144983
2071         rdar://problem/20692642&19943135
2072
2073         Reviewed by Sam Weinig.
2074
2075         HTMLMediaElement, QuickTimePluginReplacement and HTMLPlugInImageElement were
2076         getting the main frame's ScriptController instead of the one for their frame.
2077         This caused media controls JS to be running in the context of the main frame,
2078         which broke media controls which use getCSSCanvasContext() and -webkit-canvas.
2079         
2080         Fix by getting the frame via the element's document.
2081         
2082         Also undo r180584 which was working around this bug.
2083
2084         * Modules/mediacontrols/mediaControlsiOS.js:
2085         (ControllerIOS.prototype.drawTimelineBackground):
2086         * Modules/plugins/QuickTimePluginReplacement.mm:
2087         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
2088         (WebCore::QuickTimePluginReplacement::installReplacement):
2089         * html/HTMLMediaElement.cpp:
2090         (WebCore::HTMLMediaElement::updateCaptionContainer):
2091         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
2092         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
2093         (WebCore::HTMLMediaElement::pageScaleFactorChanged):
2094         * html/HTMLPlugInImageElement.cpp:
2095         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
2096
2097 2015-05-13  Sungmann Cho  <sungmann.cho@navercorp.com>
2098
2099         Fix trivial typos in ApplyBlockElementCommand
2100         https://bugs.webkit.org/show_bug.cgi?id=144984
2101
2102         Reviewed by Alexey Proskuryakov.
2103
2104         No new tests, no behavior change.
2105
2106         * editing/ApplyBlockElementCommand.cpp:
2107         (WebCore::ApplyBlockElementCommand::formatSelection):
2108         (WebCore::ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded):
2109         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded): Deleted.
2110         * editing/ApplyBlockElementCommand.h:
2111
2112 2015-05-13  David Kilzer  <ddkilzer@apple.com>
2113
2114         REGRESION (r179958): Crash in WebCore::DocumentLoader::detachFromFrame when -[id<WebPolicyDelegate> decidePolicyForMIMEType:request:frame:decisionListener:] fails to call -[id<WebPolicyDecisionListener> download|ignore|use]
2115         <http://webkit.org/b/144975>
2116
2117         Reviewed by Andy Estes.
2118
2119         This change reverts r179958.  It changes RELEASE_ASSERT*()
2120         statements back to Debug-only ASSERT*() statements.
2121
2122         * loader/DocumentLoader.cpp:
2123         (WebCore::DocumentLoader::~DocumentLoader):
2124         (WebCore::DocumentLoader::continueAfterContentPolicy):
2125         (WebCore::DocumentLoader::detachFromFrame):
2126
2127 2015-05-13  Antti Koivisto  <antti@apple.com>
2128
2129         Cached CSS image resources don't show up after reloading <http://nightly.webkit.org/start/>
2130         https://bugs.webkit.org/show_bug.cgi?id=144952
2131         rdar://problem/13387307
2132
2133         Reviewed by Oliver Hunt.
2134
2135         This is a symptom of a general problem that we don't revalidate subresources of cached parsed stylesheets.
2136
2137         Fix by tightening the check we perform when choosing to used the cached sheet. If there are expired subresources
2138         we reparse the sheet.
2139
2140         Test: http/tests/cache/stylesheet-sharing.html
2141
2142         * css/CSSCrossfadeValue.cpp:
2143         (WebCore::CSSCrossfadeValue::traverseSubresources):
2144         (WebCore::CSSCrossfadeValue::hasFailedOrCanceledSubresources): Deleted.
2145
2146             Replace hasFailedOrCanceledSubresources with general purpose subresource traversal functions.
2147
2148         * css/CSSCrossfadeValue.h:
2149         * css/CSSFilterImageValue.cpp:
2150         (WebCore::CSSFilterImageValue::traverseSubresources):
2151         (WebCore::CSSFilterImageValue::hasFailedOrCanceledSubresources): Deleted.
2152         * css/CSSFilterImageValue.h:
2153         * css/CSSFontFaceSrcValue.cpp:
2154         (WebCore::CSSFontFaceSrcValue::traverseSubresources):
2155         (WebCore::CSSFontFaceSrcValue::hasFailedOrCanceledSubresources): Deleted.
2156         * css/CSSFontFaceSrcValue.h:
2157         * css/CSSImageSetValue.cpp:
2158         (WebCore::CSSImageSetValue::traverseSubresources):
2159         (WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources): Deleted.
2160         * css/CSSImageSetValue.h:
2161         * css/CSSImageValue.cpp:
2162         (WebCore::CSSImageValue::traverseSubresources):
2163         (WebCore::CSSImageValue::hasFailedOrCanceledSubresources): Deleted.
2164         * css/CSSImageValue.h:
2165         * css/CSSValue.cpp:
2166         (WebCore::CSSValue::traverseSubresources):
2167         (WebCore::CSSValue::hasFailedOrCanceledSubresources): Deleted.
2168         * css/CSSValue.h:
2169         * css/CSSValueList.cpp:
2170         (WebCore::CSSValueList::traverseSubresources):
2171         (WebCore::CSSValueList::hasFailedOrCanceledSubresources): Deleted.
2172         * css/CSSValueList.h:
2173         * css/StyleProperties.cpp:
2174         (WebCore::StyleProperties::traverseSubresources):
2175         (WebCore::StyleProperties::hasFailedOrCanceledSubresources): Deleted.
2176         * css/StyleProperties.h:
2177         * css/StyleSheetContents.cpp:
2178         (WebCore::traverseSubresourcesInRules):
2179         (WebCore::StyleSheetContents::traverseSubresources):
2180         (WebCore::StyleSheetContents::subresourcesAllowReuse):
2181
2182             Disallow reuse if there are expired subresources.
2183
2184         (WebCore::StyleSheetContents::isLoadingSubresources):
2185
2186             Testing support.
2187
2188         (WebCore::childRulesHaveFailedOrCanceledSubresources): Deleted.
2189         (WebCore::StyleSheetContents::hasFailedOrCanceledSubresources): Deleted.
2190         * css/StyleSheetContents.h:
2191         (WebCore::StyleSheetContents::loadCompleted):
2192         * html/HTMLLinkElement.cpp:
2193         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2194         * loader/cache/CachedCSSStyleSheet.cpp:
2195         (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
2196         * loader/cache/CachedCSSStyleSheet.h:
2197         * loader/cache/CachedImage.cpp:
2198         (WebCore::CachedImage::makeRevalidationDecision):
2199         (WebCore::CachedImage::mustRevalidateDueToCacheHeaders): Deleted.
2200
2201             Move the logging code out from this function (it requires frame access this function doesn't otherwise need)
2202             and refactor to return a decision enum.
2203
2204         * loader/cache/CachedImage.h:
2205         * loader/cache/CachedResource.cpp:
2206         (WebCore::CachedResource::makeRevalidationDecision):
2207         (WebCore::logResourceRevalidationReason): Deleted.
2208         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders): Deleted.
2209         * loader/cache/CachedResource.h:
2210         (WebCore::CachedResource::loadFailedOrCanceled):
2211         * loader/cache/CachedResourceLoader.cpp:
2212         (WebCore::logRevalidation):
2213         (WebCore::logResourceRevalidationDecision):
2214         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
2215
2216             Move logging here.
2217
2218         * testing/Internals.cpp:
2219         (WebCore::Internals::isSharingStyleSheetContents):
2220         (WebCore::Internals::isStyleSheetLoadingSubresources):
2221         * testing/Internals.h:
2222         * testing/Internals.idl:
2223
2224 2015-05-13  Ryuan Choi  <ryuan.choi@navercorp.com>
2225
2226         [CoordinatedGraphics] Remove scaleFactor from SurfaceUpdateInfo
2227         https://bugs.webkit.org/show_bug.cgi?id=144935
2228
2229         Reviewed by Darin Adler.
2230
2231         The members of SurfaceUpdateInfo are only used to update tile except scaleFactor.
2232         So, this patch removes scaleFactor from SurfaceUpdateInfo.
2233         In addition, removes unnecessary parameters in createTile() 
2234
2235         No new tests because there is no behavior change.
2236
2237         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2238         (WebCore::CoordinatedGraphicsLayer::createTile):
2239         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2240         * platform/graphics/texmap/coordinated/CoordinatedTile.cpp:
2241         (WebCore::CoordinatedTile::updateBackBuffer):
2242         * platform/graphics/texmap/coordinated/CoordinatedTile.h:
2243         * platform/graphics/texmap/coordinated/SurfaceUpdateInfo.h:
2244
2245 2015-05-13  Sam Weinig  <sam@webkit.org>
2246
2247         Modernize ContainerNode::childElementCount
2248         https://bugs.webkit.org/show_bug.cgi?id=144930
2249
2250         Reviewed by Darin Adler.
2251
2252         * dom/ContainerNode.cpp:
2253         (WebCore::ContainerNode::childElementCount):
2254         Use std::distance to compute the number of child elements.
2255
2256         * dom/ElementChildIterator.h:
2257         Add typedefs to make the child element iterators conform STL standards.
2258
2259 2015-05-13  Ryosuke Niwa  <rniwa@webkit.org>
2260
2261         REGRESSION(r183770): Crash inside WebEditorClient::shouldApplyStyle when applying underline
2262         https://bugs.webkit.org/show_bug.cgi?id=144949
2263         <rdar://problem/20895753>
2264
2265         Reviewed by Darin Adler.
2266
2267         The crash was caused by the variant of applyStyleToSelection that takes EditingStyle passing
2268         a null pointer to shouldApplyStyle when we're only applying text decoration changes so that
2269         m_mutableStyle in the editing style is null. This didn't reproduce in execCommand since we
2270         wouldn't call shouldApplyStyle in that case. It didn't reproduce in my manual testing because
2271         font panel also sets text shadow, which ends up filling up m_mutableStyle.
2272
2273         Fixed the bug by creating a mutable style properties when one is not provided by EditingStyle.
2274         Also fixed the "FIXME" in the function by converting text decoration changes to a corresponding
2275         text decoration value. The values passed to shouldApplyStyle now matches the old behavior prior
2276         to r183770.
2277
2278         Test: editing/style/underline-by-user.html
2279
2280         * editing/EditingStyle.cpp:
2281         (WebCore::EditingStyle::styleWithResolvedTextDecorations): Added.
2282         * editing/EditingStyle.h:
2283         * editing/Editor.cpp:
2284         (WebCore::Editor::applyStyleToSelection): Use styleWithResolvedTextDecorations to avoid the crash.
2285
2286 2015-05-13  Eric Carlson  <eric.carlson@apple.com>
2287
2288         Work around HTMLMediaElement::documentDidResumeFromPageCache being called twice
2289         https://bugs.webkit.org/show_bug.cgi?id=144969
2290
2291         Reviewed by Alexey Proskuryakov.
2292
2293         * dom/Document.cpp:
2294         (WebCore::Document::addPlaybackTargetPickerClient): Replace ASSERT with early 
2295         return to work around https://webkit.org/b/144970.
2296
2297 2015-05-13  Timothy Horton  <timothy_horton@apple.com>
2298
2299         Going back after resizing causes scroll knob to appear in the middle of the page
2300         https://bugs.webkit.org/show_bug.cgi?id=144968
2301         <rdar://problem/18299827>
2302
2303         Reviewed by Beth Dakin.
2304
2305         * history/CachedPage.cpp:
2306         (WebCore::CachedPage::restore):
2307         (WebCore::CachedPage::clear):
2308         * history/CachedPage.h:
2309         (WebCore::CachedPage::markForContentsSizeChanged):
2310         * history/PageCache.cpp:
2311         (WebCore::PageCache::markPagesForContentsSizeChanged):
2312         * history/PageCache.h:
2313         Add a flag that will cause us to call updateContentsSize() after a page
2314         comes out of the page cache, if necessary.
2315
2316         * page/FrameView.cpp:
2317         (WebCore::FrameView::setContentsSize):
2318         * page/FrameView.h:
2319         Mark all cached pages for this frame as needing updateContentsSize()
2320         when setContentsSize happens. This will ensure that scrollbar layers
2321         are repositioned when coming out of the page cache.
2322
2323 2015-05-13  Beth Dakin  <bdakin@apple.com>
2324
2325         Need SPI to set the overlay scroll bar style
2326         https://bugs.webkit.org/show_bug.cgi?id=144928
2327         -and corresponding-
2328         rdar://problem/20143614
2329
2330         Reviewed by Anders Carlsson.
2331
2332         New ChromeClient function preferredScrollbarOverlayStyle() will fetch the 
2333         scrollbar style that was set via the new SPI.
2334         * page/ChromeClient.h:
2335
2336         If the preferredScrollbarOverlayStyle() is anything but None, then use it. None is 
2337         used to indicate that the normal heuristic should compute the appropriate color.
2338         * page/FrameView.cpp:
2339         (WebCore::FrameView::recalculateScrollbarOverlayStyle):
2340         * page/FrameView.h:
2341
2342 2015-05-13  Brent Fulgham  <bfulgham@apple.com>
2343
2344         Scrollbars in overflow regions are not vanishing after scrolling with scroll snap points
2345         https://bugs.webkit.org/show_bug.cgi?id=142521
2346         <rdar://problem/20100706>
2347
2348         Reviewed by Darin Adler.
2349
2350         The scrollbars were not being dismissed because they were not being notified that the wheel
2351         gesture was finished. This was happening because the wheel event 'ended' state has zero
2352         deltaX and deltaY. If the region did not allow stretching, it would exit early, never passing
2353         through the 'handleWheelEventPhase' code that would notify the scrollbar controller that
2354         the gesture had ended.
2355
2356         * platform/ScrollableArea.cpp:
2357         (WebCore::ScrollableArea::mouseExitedContentArea): The wrong ScrollAnimator method was being
2358         called when the mouse exited the content area.
2359         * platform/mac/ScrollAnimatorMac.mm:
2360         (WebCore::ScrollAnimatorMac::handleWheelEvent): Do not early return when the wheel event has
2361         no change in X or Y coordinate.
2362
2363 2015-05-12  David Hyatt  <hyatt@apple.com>
2364
2365         Don't compute selection painting info when we don't have selection.
2366         https://bugs.webkit.org/show_bug.cgi?id=144920
2367         <rdar://problem/20919920>
2368
2369         Reviewed by Simon Fraser.
2370
2371         * rendering/InlineTextBox.cpp:
2372         (WebCore::InlineTextBox::paint):
2373
2374         Just set the selection paint style to the text paint style when we don't have a selection
2375         at all. Computing the selection style takes time in the case where a ::selection pseudo is
2376         used on the page, so we don't want to waste time computing that info unless it's actually
2377         needed.
2378
2379 2015-05-13  Joseph Pecoraro  <pecoraro@apple.com>
2380
2381         Pass String as reference in more places
2382         https://bugs.webkit.org/show_bug.cgi?id=144769
2383
2384         Reviewed by Daniel Bates.
2385
2386         * bindings/js/SerializedScriptValue.cpp:
2387         (WebCore::CloneSerializer::dumpString):
2388         (WebCore::CloneSerializer::dumpStringObject):
2389         * dom/DocumentMarkerController.cpp:
2390         (WebCore::DocumentMarkerController::addMarker):
2391         * dom/DocumentMarkerController.h:
2392         * inspector/InspectorApplicationCacheAgent.cpp:
2393         (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
2394         * inspector/InspectorApplicationCacheAgent.h:
2395         * inspector/InspectorNodeFinder.cpp:
2396         (WebCore::stripCharacters):
2397         (WebCore::InspectorNodeFinder::InspectorNodeFinder):
2398         * inspector/InspectorNodeFinder.h:
2399
2400 2015-05-13  Timothy Horton  <timothy_horton@apple.com>
2401
2402         View scale changes are temporarily lost after restoring a page from the page cache
2403         https://bugs.webkit.org/show_bug.cgi?id=144934
2404
2405         Reviewed by Brady Eidson.
2406
2407         * history/CachedPage.cpp:
2408         (WebCore::CachedPage::CachedPage):
2409         (WebCore::CachedPage::restore):
2410         (WebCore::CachedPage::clear):
2411         * history/CachedPage.h:
2412         (WebCore::CachedPage::markForDeviceOrPageScaleChanged): Renamed.
2413         * history/PageCache.cpp:
2414         (WebCore::PageCache::markPagesForDeviceOrPageScaleChanged): Renamed.
2415         * history/PageCache.h:
2416         Rename PageCache/CachedPage methods to make it more clear that they
2417         will eventually result in calling deviceOrPageScaleFactorChanged().
2418         Also, use modern initialization for CachedPage members.
2419
2420         * loader/HistoryController.cpp:
2421         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
2422         (WebCore::HistoryController::restoreScrollPositionAndViewState):
2423         Store the pageScaleFactor on HistoryItem with the view scale factored out,
2424         because the view scale can change while the page is in the page cache, and
2425         WebCore needs a way - without consulting with WebKit2 - to apply the changed
2426         view scale to the cached page scale.
2427
2428         * page/Page.cpp:
2429         (WebCore::Page::setViewScaleFactor):
2430         (WebCore::Page::setDeviceScaleFactor):
2431         * page/Page.h:
2432         (WebCore::Page::viewScaleFactor):
2433         Keep track of the viewScaleFactor, and mark all pages in the page cache
2434         as needing to call deviceOrPageScaleFactorChanged and do a full style recalc
2435         when they come back from the page cache.
2436
2437         For now, we expect all callers of setPageScaleFactor (including WebKit2 and
2438         HistoryController) to multiply the viewScale in manually, to avoid the
2439         significant amount of change in WebCore that would be required to keep them
2440         totally separately.
2441
2442 2015-05-12  Zan Dobersek  <zdobersek@igalia.com>
2443
2444         Reduce TransformationMatrix copies in MatrixTransformOperation, Matrix3DTransformOperation
2445         https://bugs.webkit.org/show_bug.cgi?id=144797
2446
2447         Reviewed by Darin Adler.
2448
2449         Using std::swap() on TransformationMatrix objects which don't
2450         provide move constructors will result in copies.
2451
2452         Instead, use a helper function in both MatrixTransformOperation
2453         and Matrix3DTransformOperation that calls TransformationMatrix::blend()
2454         and returns the new Matrix(3D)TransformOperation object, and call it
2455         with fromT and toT arguments switched when blending to identity.
2456
2457         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
2458         (WebCore::createOperation):
2459         (WebCore::Matrix3DTransformOperation::blend):
2460         * platform/graphics/transforms/Matrix3DTransformOperation.h: No need
2461         to copy the m_matrix member, it won't change when passed to
2462         TransformationMatrix::multiply().
2463         * platform/graphics/transforms/MatrixTransformOperation.cpp:
2464         (WebCore::createOperation):
2465         (WebCore::MatrixTransformOperation::blend):
2466
2467 2015-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2468
2469         [EGL][X11] XPixmap created in GLContextEGL::createPixmapContext() is leaked
2470         https://bugs.webkit.org/show_bug.cgi?id=144909
2471
2472         Reviewed by Sergio Villar Senin and Žan Doberšek.
2473
2474         The pixmap is created and passed to eglCreatePixmapSurface(), but
2475         never released. eglCreatePixmapSurface() doesn't take the
2476         ownership of the pixmap, so we should explicitly free it when the
2477         GLContextEGL is destroyed.
2478
2479         * platform/graphics/egl/GLContextEGL.cpp:
2480         (WebCore::GLContextEGL::createPixmapContext): Use XUniquePixmap
2481         and transfer the ownership to the context by using the new
2482         constructor that receives a XUniquePixmap&&.
2483         (WebCore::GLContextEGL::createContext): createPixmapContext() is
2484         now only defined for X11.
2485         (WebCore::GLContextEGL::GLContextEGL): New constructor that
2486         receives a XUniquePixmap&&.
2487         * platform/graphics/egl/GLContextEGL.h: Add new constructor and
2488         initialize the cairo device when defined to simplify constructors.
2489
2490 2015-05-12  Sungmann Cho  <sungmann.cho@navercorp.com>
2491
2492         Reindent DIBPixelData.h for consistency.
2493         https://bugs.webkit.org/show_bug.cgi?id=144942
2494
2495         Reviewed by Darin Adler.
2496
2497         No new tests, no behavior change.
2498
2499         * platform/graphics/win/DIBPixelData.h:
2500         (WebCore::DIBPixelData::DIBPixelData):
2501         (WebCore::DIBPixelData::buffer):
2502         (WebCore::DIBPixelData::bufferLength):
2503         (WebCore::DIBPixelData::size):
2504         (WebCore::DIBPixelData::bytesPerRow):
2505         (WebCore::DIBPixelData::bitsPerPixel):
2506
2507 2015-05-12  Commit Queue  <commit-queue@webkit.org>
2508
2509         Unreviewed, rolling out r184224.
2510         https://bugs.webkit.org/show_bug.cgi?id=144946
2511
2512         Made inspector/page/main-frame-resource.html assert every time
2513         (Requested by ap on #webkit).
2514
2515         Reverted changeset:
2516
2517         "Web Inspector: REGRESSION (r181625): Timeline recording
2518         started from console.profile is always empty"
2519         https://bugs.webkit.org/show_bug.cgi?id=144882
2520         http://trac.webkit.org/changeset/184224
2521
2522 2015-05-12  Jer Noble  <jer.noble@apple.com>
2523
2524         [Mac] Hang in MediaPlayerPrivateAVFoundationObjC::audioSourceProvider() - 'tracks' property not yet loaded
2525         https://bugs.webkit.org/show_bug.cgi?id=144937
2526
2527         Reviewed by Eric Carlson.
2528
2529         Querying for the -[AVAsset tracks] property blocks for network loading; and could
2530         block forever if the asset in question is not reachable. Add a "safe" mechanism for
2531         querying the list of audible tracks, and use that when providing the audioSourceProvider()
2532         with an audible track.
2533
2534         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2535         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2536         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
2537         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
2538         (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider):
2539         (WebCore::MediaPlayerPrivateAVFoundationObjC::processLegacyClosedCaptionsTracks):
2540         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeAVAssetTracksForAudibleMedia):
2541
2542 2015-05-12  Ryosuke Niwa  <rniwa@webkit.org>
2543
2544         Mac build fix after r184228.
2545
2546         * bindings/scripts/CodeGeneratorJS.pm:
2547
2548 2015-05-12  Simon Fraser  <simon.fraser@apple.com>
2549
2550         Turn antialiased font dilation off by default
2551         https://bugs.webkit.org/show_bug.cgi?id=144940
2552         rdar://problem/20923031
2553
2554         Reviewed by Sam Weinig.
2555
2556         Turn antialised font dilation off by default.
2557
2558         * page/Settings.cpp:
2559         (WebCore::Settings::Settings):
2560         * platform/graphics/FontCascade.cpp:
2561
2562 2015-05-12  Alex Christensen  <achristensen@webkit.org>
2563
2564         Don't export all JS bindings classes.
2565         https://bugs.webkit.org/show_bug.cgi?id=144932
2566
2567         Reviewed by Dan Bernstein.
2568
2569         This change is good if it compiles and links successfully.
2570
2571         * bindings/scripts/CodeGeneratorJS.pm:
2572         (ExportLabelForClass):
2573         Add a list of the JS bindings classes that need WEBCORE_EXPORT to prevent exporting too many symbols from WebCore.
2574         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2575         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2576         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2577         * bindings/scripts/test/JS/JSTestEventTarget.h:
2578         * bindings/scripts/test/JS/JSTestException.h:
2579         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2580         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2581         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2582         * bindings/scripts/test/JS/JSTestNode.h:
2583         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2584         * bindings/scripts/test/JS/JSTestObj.h:
2585         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2586         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2587         * bindings/scripts/test/JS/JSTestTypedefs.h:
2588         * bindings/scripts/test/JS/JSattribute.h:
2589         * bindings/scripts/test/JS/JSreadonly.h:
2590         Update bindings tests to remove WEBCORE_EXPORT from most of the tests,
2591         but keep one test with WEBCORE_EXPORT and one test with WEBCORE_TESTSUPPORT_EXPORT.
2592
2593 2015-05-12  Brent Fulgham  <bfulgham@apple.com>
2594
2595         [Win] Update DXSDK_DIR settings for build system.
2596
2597         Unreviewed build fix.
2598
2599         * WebCore.vcxproj/WebCore.proj: Add DXSDK_DIR definition for builder.
2600
2601 2015-05-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2602
2603         Return Ref instead of PassRefPtr in create() factory functions of WebCore/dom
2604         https://bugs.webkit.org/show_bug.cgi?id=144904
2605
2606         Reviewed by Andreas Kling.
2607
2608         We return Ref when we're sure if pointer can't be null. If not, we use RefPtr instead PassRefPtr.
2609
2610         No new tests, no behavior changes.
2611
2612         * dom/AutocompleteErrorEvent.h:
2613         * dom/DOMNamedFlowCollection.h:
2614         (WebCore::DOMNamedFlowCollection::create):
2615         * dom/MessageChannel.h:
2616         (WebCore::MessageChannel::create):
2617         * dom/MessagePort.h:
2618         * dom/MutationObserver.cpp:
2619         (WebCore::MutationObserver::create):
2620         * dom/MutationObserver.h:
2621         * dom/NamedFlowCollection.h:
2622         * dom/NodeFilter.h:
2623         (WebCore::NodeFilter::create):
2624         * dom/NodeIterator.h:
2625         (WebCore::NodeIterator::create):
2626         * dom/ProcessingInstruction.cpp:
2627         (WebCore::ProcessingInstruction::create):
2628         * dom/ProcessingInstruction.h:
2629         * dom/ScriptedAnimationController.h:
2630         (WebCore::ScriptedAnimationController::create):
2631         * dom/SecurityPolicyViolationEvent.h:
2632         * dom/StaticNodeList.h:
2633         * dom/TemplateContentDocumentFragment.h:
2634         * dom/Touch.cpp:
2635         (WebCore::Touch::cloneWithNewTarget):
2636         * dom/Touch.h:
2637         (WebCore::Touch::create):
2638         * dom/TouchEvent.h:
2639         * dom/TouchList.h:
2640         (WebCore::TouchList::create):
2641         * dom/TreeWalker.h:
2642         (WebCore::TreeWalker::create):
2643         * dom/WebKitNamedFlow.cpp:
2644         (WebCore::WebKitNamedFlow::create):
2645         * dom/WebKitNamedFlow.h:
2646         * dom/default/PlatformMessagePortChannel.cpp:
2647         (WebCore::PlatformMessagePortChannel::create):
2648         * dom/default/PlatformMessagePortChannel.h:
2649         (WebCore::PlatformMessagePortChannel::MessagePortQueue::create):
2650
2651 2015-05-12  Matt Baker  <mattbaker@apple.com>
2652
2653         Web Inspector: REGRESSION (r181625): Timeline recording started from console.profile is always empty
2654         https://bugs.webkit.org/show_bug.cgi?id=144882
2655
2656         Reviewed by Brian Burg.
2657
2658         A timeline recording will always be stopped before the end of the current run loop is observed. Before
2659         dispatching the recording stopped event, the last run loop record must be completed and sent to the frontend
2660         to prevent it from being discarded.
2661
2662         * inspector/InspectorTimelineAgent.cpp:
2663         (WebCore::InspectorTimelineAgent::internalStop):
2664
2665 2015-05-12  Zalan Bujtas  <zalan@apple.com>
2666
2667         REGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
2668         https://bugs.webkit.org/show_bug.cgi?id=144917
2669         rdar://problem/20545878
2670
2671         Reviewed by Andreas Kling.
2672
2673         This patch ensures that text stroke width value is taken into account while
2674         calculating visual overflow for simple line layout.
2675         Ceiling the text stroke width value matches the normal text layout behaviour.
2676
2677         Test: fast/text/simple-line-layout-text-stroke-width.html
2678
2679         * rendering/SimpleLineLayoutFunctions.cpp:
2680         (WebCore::SimpleLineLayout::paintFlow):
2681         (WebCore::SimpleLineLayout::collectFlowOverflow):
2682
2683 2015-05-12  Alexey Proskuryakov  <ap@apple.com>
2684
2685         Build fix.
2686
2687         * platform/spi/cf/CFNetworkSPI.h:
2688
2689 2015-05-12  Brent Fulgham  <bfulgham@apple.com>
2690
2691         ROLLOUT [Win] Unreviewed build fix for older DirectX build environments.
2692
2693         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2694
2695 2015-05-12  Joanmarie Diggs  <jdiggs@igalia.com>
2696
2697         AX: [ATK] ARIA menu items should not have anonymous block children
2698         https://bugs.webkit.org/show_bug.cgi?id=144653
2699
2700         Reviewed by Chris Fleizach.
2701
2702         Exclude anonymous block children of menu items from the accessible tree
2703         for ATK. Exclude list markers from the accessibility tree if the parent
2704         is not being exposed as an accessible list item.
2705
2706         No new tests. Instead, modified the existing tests to reflect the correct
2707         behavior.
2708
2709         * accessibility/AccessibilityRenderObject.cpp:
2710         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2711         * accessibility/atk/AccessibilityObjectAtk.cpp:
2712         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2713
2714 2015-05-08  Alexey Proskuryakov  <ap@apple.com>
2715
2716         [Mac] Share cookie storage between UI process and secondary processes
2717         https://bugs.webkit.org/show_bug.cgi?id=144820
2718         rdar://problem/20572830
2719
2720         Reviewed by Darin Adler.
2721
2722         * platform/network/mac/CookieJarMac.mm:
2723         * platform/spi/cf/CFNetworkSPI.h:
2724         Moved SPIs into an SPI header, so that WebKit2 could use them too without duplication.
2725
2726 2015-05-12  Chris Dumez  <cdumez@apple.com>
2727
2728         [WK2] Log using diagnostic logging how far back in history we navigate
2729         https://bugs.webkit.org/show_bug.cgi?id=144919
2730         <rdar://problem/20920043>
2731
2732         Reviewed by Gavin Barraclough.
2733
2734         Add diagnostic logging keys for logging back history navigation delta.
2735
2736         * page/DiagnosticLoggingKeys.cpp:
2737         (WebCore::DiagnosticLoggingKeys::deltaKey):
2738         (WebCore::DiagnosticLoggingKeys::backNavigationKey):
2739         * page/DiagnosticLoggingKeys.h:
2740
2741 2015-05-12  Yoav Weiss  <yoav@yoav.ws>
2742
2743         Avoid CSSPrimitiveValue allocation when parsing sizes
2744         https://bugs.webkit.org/show_bug.cgi?id=144910
2745
2746         Reviewed by Darin Adler.
2747
2748         Turn non-calc length calculation logic into a static method,
2749         so that it can be called without a CSSPrimitiveValue object.
2750         Then, call that method to calculate the default source-size length.
2751
2752         No new tests, since no functionality change.
2753
2754         * css/CSSPrimitiveValue.cpp:
2755         (WebCore::CSSPrimitiveValue::computeLengthDouble): Split out the logic for everything that's not calc into a static method.
2756         (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble): Static length computation logic for everything that is not calc.
2757         * css/CSSPrimitiveValue.h:
2758         (WebCore::CSSPrimitiveValue::isFontRelativeLength): Turn into static.
2759         * css/SourceSizeList.cpp:
2760         (WebCore::defaultLength): Use the new static method to compute the length.
2761         (WebCore::computeLength): Use the calc length computation methods directly.
2762
2763 2015-05-12  Brent Fulgham  <bfulgham@apple.com>
2764
2765         [Win] Unreviewed build fix for older DirectX build environments.
2766
2767         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Switch back to our
2768         d3d stub header to avoid build failures on July 2004 DXSDK build environments.
2769
2770 2015-05-12  Eric Carlson  <eric.carlson@apple.com>
2771
2772         [Mac] Refine media playback target client configuration
2773         https://bugs.webkit.org/show_bug.cgi?id=144892
2774
2775         Reviewed by Brent Fulgham.
2776
2777         Client and target picker state changes fequently happen several times in quick succession, so
2778         don't react to immediately so we can batch callbacks to the web process. 
2779         * Modules/mediasession/WebMediaSessionManager.cpp:
2780         (WebCore::ClientState::ClientState): Store the client as a reference rather than a pointer
2781         because it can never be NULL.
2782         (WebCore::ClientState::operator == ): New.
2783         (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): Schedule the initial client 
2784         configuration and a target configuration check.
2785         (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): Schedule a target monitoring
2786         update, and a target configuration check.
2787         (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): Ditto.
2788         (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Schedule a target monitoring update.
2789         (WebCore::WebMediaSessionManager::clientStateDidChange): If the client whose state has changed
2790         can play to a target, tell it to start using the target even if it isn't playing as long as
2791         no other client is actively using a target.
2792         (WebCore::WebMediaSessionManager::setPlaybackTarget): Configure clients after a pause.
2793         (WebCore::WebMediaSessionManager::configureNewClients): New, do new client configuration.
2794         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): New, configure target clients.
2795         (WebCore::WebMediaSessionManager::scheduleDelayedTask): Schedule the timer.
2796         (WebCore::WebMediaSessionManager::taskTimerFired): Execute delayed tasks.
2797         (WebCore::WebMediaSessionManager::find): 
2798         * Modules/mediasession/WebMediaSessionManager.h:
2799
2800         * html/HTMLMediaElement.cpp:
2801         (WebCore::HTMLMediaElement::setMuted): Call updateMediaState.
2802         (WebCore::HTMLMediaElement::setPlaying): Ditto.
2803         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
2804         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Expand logging.
2805         (WebCore::HTMLMediaElement::updateMediaState): New, don't broadcast a media state change
2806         unless something actually changed.
2807         * html/HTMLMediaElement.h:
2808
2809         * html/HTMLMediaSession.cpp:
2810         (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange): Update logging.
2811         (WebCore::HTMLMediaSession::setShouldPlayToPlaybackTarget): Ditto.
2812         (WebCore::HTMLMediaSession::mediaEngineUpdated): Cleanup.
2813
2814         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2815         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Remove the call to
2816         deprecated API and the "-Wdeprecated-declarations".
2817
2818 2015-05-12  Joanmarie Diggs  <jdiggs@igalia.com>
2819
2820         AX: [GTK] Defer to WebCore Accessibility for table exposure
2821         https://bugs.webkit.org/show_bug.cgi?id=144896
2822
2823         Reviewed by Chris Fleizach.
2824
2825         Stop unconditionally exposing all HTMLTableElement nodes as AccessibilityTables
2826         for WebKitGtk.
2827
2828         No new tests. Several existing tests already cover table exposure. They have
2829         been updated accordingly.
2830
2831         * accessibility/AccessibilityTable.cpp:
2832         (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
2833
2834 2015-05-12  Joanmarie Diggs  <jdiggs@igalia.com>
2835
2836         [GTK][WK2] rowAtIndex is not implemented in DRT/WKTR
2837         https://bugs.webkit.org/show_bug.cgi?id=116971
2838
2839         Reviewed by Chris Fleizach.
2840
2841         Because ATK lacks API to directly get an accessible row via its index,
2842         the implementation of rowAtIndex gets a cell in the indexed row and
2843         returns the parent row. The failing test continued to fail because
2844         AccessibilityARIAGridCell::parentTable called parentObjectUnignored at
2845         most twice, the second call in place to handle rows which are included
2846         in the tree. However, given a well-formed ARIA grid with a rowgroup that
2847         is interactive, that rowgroup also needs to be in the tree necessitating
2848         parentObjectUnignored be called a third time to get to the grid. Given a
2849         poorly-formed ARIA grid, there may additional objects which pass the test
2850         for inclusion standing in between the cell and grid necessitating more
2851         calls still. Therefore, ascend the hierarchy to find the parent grid.
2852
2853         No new tests. The failing test now passes.
2854
2855         * accessibility/AccessibilityARIAGridCell.cpp:
2856         (WebCore::AccessibilityARIAGridCell::parentTable):
2857
2858 2015-05-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2859
2860         [X11] Add XUniquePtr and XUniqueResource to automatically free X resources
2861         https://bugs.webkit.org/show_bug.cgi?id=144521
2862
2863         Reviewed by Darin Adler.
2864
2865         Add XUniquePtr as a template alias of std:unique_ptr to handle X
2866         resources using pointers and XUniqueResource as a new class to
2867         handle X resources using a long unsigned identifier. This
2868         simplifies the code and makes it more difficult to leak X resources.
2869
2870         * PlatformEfl.cmake: Add new files to compilation.
2871         * PlatformGTK.cmake: Ditto.
2872         * platform/graphics/cairo/BackingStoreBackendCairoX11.cpp:
2873         (WebCore::BackingStoreBackendCairoX11::BackingStoreBackendCairoX11):
2874         Remove the display member, and use XUnique for Pixmap and GC.
2875         (WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
2876         Remove code to explicitly free Pixmap and GC.
2877         (WebCore::BackingStoreBackendCairoX11::scroll):
2878         * platform/graphics/cairo/BackingStoreBackendCairoX11.h:
2879         * platform/graphics/glx/GLContextGLX.cpp:
2880         (WebCore::GLContextGLX::createWindowContext): Use XUnique and the
2881         new constructor that receives a XID, since there's no longer
2882         conflict with the one receiving a Pbuffer.
2883         (WebCore::GLContextGLX::createPbufferContext): Use XUnique and the
2884         new constructor that receives a XUniqueGLXPbuffer&&.
2885         (WebCore::GLContextGLX::createPixmapContext):
2886         (WebCore::GLContextGLX::createContext):
2887         (WebCore::GLContextGLX::GLContextGLX):
2888         (WebCore::GLContextGLX::~GLContextGLX): Remove code to explicitly
2889         free X resources.
2890         (WebCore::GLContextGLX::makeContextCurrent):
2891         (WebCore::GLContextGLX::cairoDevice):
2892         (WebCore::GLContextGLX::platformContext):
2893         * platform/graphics/glx/GLContextGLX.h:
2894         * platform/graphics/surfaces/egl/EGLXSurface.cpp:
2895         (WebCore::EGLXTransportSurfaceClient::EGLXTransportSurfaceClient):
2896         (WebCore::EGLXTransportSurfaceClient::destroy):
2897         (WebCore::EGLXTransportSurfaceClient::prepareTexture):
2898         * platform/graphics/surfaces/egl/EGLXSurface.h:
2899         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
2900         (WebCore::GLXConfigSelector::findMatchingConfig): Use XUnique
2901         instead of the custom std::unique X11Deleter.
2902         (WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
2903         * platform/graphics/surfaces/glx/GLXSurface.cpp:
2904         (WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
2905         (WebCore::GLXOffScreenSurface::initialize):
2906         * platform/graphics/surfaces/glx/X11Helper.cpp:
2907         (WebCore::X11Helper::createOffScreenWindow): Ditto.
2908         (WebCore::X11Helper::createPixmap): Ditto.
2909         * platform/graphics/surfaces/glx/X11Helper.h:
2910         * platform/graphics/x11/XUniquePtr.h: Remove X11Deleter.
2911         (WebCore::XPtrDeleter::operator()):
2912         * platform/graphics/x11/XUniqueResource.cpp: Added.
2913         (WebCore::XUniqueResource<XResource::Colormap>::deleteXResource):
2914         (WebCore::XUniqueResource<XResource::Damage>::deleteXResource):
2915         (WebCore::XUniqueResource<XResource::Pixmap>::deleteXResource):
2916         (WebCore::XUniqueResource<XResource::Window>::deleteXResource):
2917         (WebCore::XUniqueResource<XResource::GLXPbuffer>::deleteXResource):
2918         (WebCore::XUniqueResource<XResource::GLXPixmap>::deleteXResource):
2919         * platform/graphics/x11/XUniqueResource.h: Added.
2920         (WebCore::XUniqueResource::XUniqueResource):
2921         (WebCore::XUniqueResource::operator=):
2922         (WebCore::XUniqueResource::~XUniqueResource):
2923         (WebCore::XUniqueResource::get):
2924         (WebCore::XUniqueResource::release):
2925         (WebCore::XUniqueResource::reset):
2926         (WebCore::XUniqueResource::operator!):
2927         (WebCore::XUniqueResource::operator UnspecifiedBoolType*):
2928
2929 2015-05-12  Zan Dobersek  <zdobersek@igalia.com>
2930
2931         Move TransformOperation-based classes off of PassRefPtr
2932         https://bugs.webkit.org/show_bug.cgi?id=144876
2933
2934         Reviewed by Darin Adler.
2935
2936         Remove uses of PassRefPtr from the TransformOperation class and its
2937         derivatives, operating on Ref and RefPtr objects instead.
2938
2939         * platform/graphics/transforms/IdentityTransformOperation.h:
2940         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
2941         (WebCore::Matrix3DTransformOperation::blend):
2942         * platform/graphics/transforms/Matrix3DTransformOperation.h:
2943         * platform/graphics/transforms/MatrixTransformOperation.cpp:
2944         (WebCore::MatrixTransformOperation::blend):
2945         * platform/graphics/transforms/MatrixTransformOperation.h:
2946         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
2947         (WebCore::PerspectiveTransformOperation::blend):
2948         * platform/graphics/transforms/PerspectiveTransformOperation.h:
2949         * platform/graphics/transforms/RotateTransformOperation.cpp:
2950         (WebCore::RotateTransformOperation::blend):
2951         * platform/graphics/transforms/RotateTransformOperation.h:
2952         * platform/graphics/transforms/ScaleTransformOperation.cpp:
2953         (WebCore::ScaleTransformOperation::blend):
2954         * platform/graphics/transforms/ScaleTransformOperation.h:
2955         * platform/graphics/transforms/SkewTransformOperation.cpp:
2956         (WebCore::SkewTransformOperation::blend):
2957         * platform/graphics/transforms/SkewTransformOperation.h:
2958         * platform/graphics/transforms/TransformOperation.h:
2959         * platform/graphics/transforms/TransformOperations.cpp:
2960         (WebCore::TransformOperations::blendByMatchingOperations):
2961         * platform/graphics/transforms/TranslateTransformOperation.cpp:
2962         (WebCore::TranslateTransformOperation::blend):
2963         * platform/graphics/transforms/TranslateTransformOperation.h:
2964
2965 2015-05-12  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2966
2967         [Streams API] ReadableStream reader should not be disposable when having pending promises
2968         https://bugs.webkit.org/show_bug.cgi?id=144869
2969
2970         Reviewed by Darin Adler.
2971
2972         Made error promise callback to take a ref to the reader so that the reader is not disposed as long as the promise callback is not resolved.
2973
2974         Covered by tests added to streams/readable-stream-gc.html.
2975
2976         * Modules/streams/ReadableStreamReader.cpp:
2977         (WebCore::ReadableStreamReader::ReadableStreamReader): Moved initialize() call outside constructor as it can ref/unref.
2978         (WebCore::ReadableStreamReader::releaseStreamAndClean): Added protector.
2979         * Modules/streams/ReadableStreamReader.h:
2980         * bindings/js/JSReadableStreamReaderCustom.cpp:
2981         (WebCore::JSReadableStreamReader::closed): Lambda for error now takes a ref to the reader.
2982         * bindings/js/ReadableJSStream.cpp:
2983         (WebCore::ReadableJSStream::Reader::create): Calling initialize() after adoptRef().
2984
2985 2015-05-11  Zan Dobersek  <zdobersek@igalia.com>
2986
2987         Clean up redundant resources in case of failure in GLContextEGL context creation methods
2988         https://bugs.webkit.org/show_bug.cgi?id=144878
2989
2990         Reviewed by Martin Robinson.
2991
2992         GLContextEGL::createWindowContext() and GLContextEGL::createPixmapContext() methods
2993         should clean up the freshly-created resources when prematurely returning due to a
2994         failure.
2995
2996         * platform/graphics/egl/GLContextEGL.cpp:
2997         (WebCore::GLContextEGL::createWindowContext):
2998         (WebCore::GLContextEGL::createPixmapContext):
2999
3000 2015-05-11  Dan Bernstein  <mitz@apple.com>
3001
3002         WebCore part of <rdar://problem/20878075> Trying to navigate to an invalid URL loads about:blank, but -[WKWebView URL] returns the invalid URL
3003
3004         Reviewed by Alexey Proskuryakov.
3005
3006         Test: TestWebKitAPI/Tests/WebKit2Cocoa/ProvisionalURLChange.mm
3007
3008         In some cases, trying to navigate to an invalid URL results in navigation to about:blank.
3009         When the about:blank load is committed, the UI process still thinks that the provisional
3010         URL is the original, invalid URL, and updates its state to reflect that that’s the URL that
3011         has been committed.
3012
3013         The provisional URL changes (1) when a provisional load begins, (2) when a server redirect
3014         happens, (3) when the client changes the request in willSendRequest, and (4) in this
3015         about:blank case. For (1) and (2), there are frame loader client callbacks. (3) is client-
3016         initiated. So this patch addresses (4).
3017
3018         * loader/DocumentLoader.cpp:
3019         (WebCore::DocumentLoader::maybeLoadEmpty): If our request URL is changing to about:blank and
3020         while loading the main resource, call FrameLoaderClient::dispatchDidChangeProvisionalURL.
3021         * loader/FrameLoaderClient.h: Added dispatchDidChangeProvisionalURL with an empty
3022         implementation.
3023
3024 2015-05-11  Zalan Bujtas  <zalan@apple.com>
3025
3026         Text is misplaced when custom font does not have space glyph.
3027         https://bugs.webkit.org/show_bug.cgi?id=144879
3028
3029         Reviewed by Myles C. Maxfield
3030
3031         This patch ensures that we use fallback font for the missing space glyph only when the rendered text has space in it.
3032
3033         If a font does not provide all the glyphs required to render the associated text, we initiate fallback fonts. It is done while
3034         measuring the text at layout time. However due to the fact that we always pre-measure space, a font with no space glyph in it is never sufficient.
3035         (even when the text does not require space at all)
3036         Fallback fonts impact line positions through ascent/descent calculation.
3037
3038         Test: fast/text/font-with-no-space-glyph.html
3039
3040         * rendering/RenderText.cpp:
3041         (WebCore::RenderText::computePreferredLogicalWidths):
3042         * rendering/line/BreakingContext.h:
3043         (WebCore::WordTrailingSpace::WordTrailingSpace):
3044         (WebCore::WordTrailingSpace::width):
3045         (WebCore::BreakingContext::handleText):
3046
3047 2015-05-11  Simon Fraser  <simon.fraser@apple.com>
3048
3049         Small tidyup in animations code
3050         https://bugs.webkit.org/show_bug.cgi?id=144893
3051
3052         Reviewed by Eric Carlson.
3053
3054         Reading progress(1, 0, 0) in callers of AnimationBase::progress() was confusing,
3055         particularly as the last parameter is a TimingFunction*. Put default values 
3056         in the header (with nullptr) and fix the callers. Also fix variable names in
3057         the implementation.
3058
3059         * page/animation/AnimationBase.cpp:
3060         (WebCore::AnimationBase::progress):
3061         * page/animation/AnimationBase.h:
3062         * page/animation/ImplicitAnimation.cpp:
3063         (WebCore::ImplicitAnimation::animate):
3064         (WebCore::ImplicitAnimation::getAnimatedStyle):
3065         (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
3066
3067 2015-05-11  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3068
3069         Purge PassRefPtr in WebCore/rendering
3070         https://bugs.webkit.org/show_bug.cgi?id=144872
3071
3072         Reviewed by Darin Adler.
3073
3074         As a step to remove PassRefPtr, this patch replaces PassRefPtr with Ref in WebCore/rendering.
3075
3076         No new tests, no behavior changes.
3077
3078         * rendering/HitTestingTransformState.h:
3079         (WebCore::HitTestingTransformState::create):
3080         * rendering/RenderLayer.cpp:
3081         (WebCore::ClipRects::create):
3082         * rendering/RenderThemeGtk.cpp:
3083         (WebCore::RenderThemeGtk::create):
3084         (WebCore::RenderTheme::themeForPage):
3085         * rendering/RenderThemeGtk.h:
3086         * rendering/RenderThemeIOS.h:
3087         * rendering/RenderThemeIOS.mm:
3088         (WebCore::RenderTheme::themeForPage):
3089         (WebCore::RenderThemeIOS::create):
3090         * rendering/RenderThemeMac.h:
3091         * rendering/RenderThemeMac.mm:
3092         (WebCore::RenderTheme::themeForPage):
3093         (WebCore::RenderThemeMac::create):
3094         * rendering/RenderThemeSafari.cpp:
3095         (WebCore::RenderThemeSafari::create):
3096         (WebCore::RenderTheme::themeForPage):
3097         * rendering/RenderThemeSafari.h:
3098         * rendering/RenderThemeWin.cpp:
3099         (WebCore::RenderThemeWin::create):
3100         (WebCore::RenderTheme::themeForPage):
3101         * rendering/RenderThemeWin.h:
3102         * rendering/TextAutoSizing.h:
3103         (WebCore::TextAutoSizingValue::create):
3104         * rendering/style/ShapeValue.h:
3105         (WebCore::ShapeValue::createShapeValue):
3106         (WebCore::ShapeValue::createBoxShapeValue):
3107         (WebCore::ShapeValue::createImageValue):
3108         * rendering/style/StyleCachedImage.h:
3109         * rendering/style/StyleCachedImageSet.h:
3110         * rendering/style/StyleGeneratedImage.h:
3111         * rendering/style/StylePendingImage.h:
3112         * rendering/style/StyleReflection.h:
3113         (WebCore::StyleReflection::create):
3114
3115 2015-05-11  Eric Carlson  <eric.carlson@apple.com>
3116
3117         [Mac] Update device picker icon when video tracks change
3118         https://bugs.webkit.org/show_bug.cgi?id=144889
3119         <rdar://problem/20907253>
3120
3121         Reviewed by Brent Fulgham.
3122
3123         * Modules/mediacontrols/mediaControlsApple.js:
3124         (Controller.prototype.updateHasVideo):
3125
3126 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
3127
3128         Scroll snap logic should be triggered when resizing the WebView
3129         https://bugs.webkit.org/show_bug.cgi?id=142590
3130         <rdar://problem/20125088>
3131
3132         Reviewed by Simon Fraser.
3133
3134         Tests coming in a second patch.
3135
3136         Resizing of the main frame or overflow regions was properly recalculating the scroll snap points,
3137         but there was no code to honor these values when window resizing was occurring. The correction was
3138         handled in two ways:
3139         1. Scrolling thread operations that moved to new snap points needed to notify the main thread that
3140            it had shifted to a new snap point, so that the resize code (which happens on the main thread)
3141            could ensure that we stayed clamped to the correct 'tile' in the snap region.
3142         2. Main thread (overflow) resizes were likewise missing code to honor the current snap position
3143            after resizing calculations were complete.
3144
3145         This change also required the addition of two indices to the scrollable area to track which scroll
3146         snap point was currently being used. We don't bother with a 'none' case because you cannot have a
3147         'none' state when you have an active set of scroll snap points, and we do not execute this code
3148         if the scroll snap points are null.
3149
3150         The FrameView code was computing updated snap offsets after it had dispatched frame view layout
3151         information to the scrolling thread, which was wrong. This was also corrected.
3152
3153         I think it might be possible to track all of this state inside the ScrollController, but the current
3154         scroll snap architecture destroys and recreates the state each time a new set of interactions starts.
3155         This should be fixed in the future, which would allow us to remove some of this local state.
3156
3157         * page/FrameView.cpp:
3158         (WebCore::FrameView::performPostLayoutTasks): Make sure 'updateSnapOffsets' is called prior to
3159         calling 'frameViewLayoutUpdated' so the scrolling thread gets correct updated points. Add a new
3160         call to 'scrollToNearestActiveSnapPoint', which will keep us on our current snap point during
3161         resize (if appropriate).
3162         * page/scrolling/AsyncScrollingCoordinator.cpp:
3163         (WebCore::AsyncScrollingCoordinator::updateScrollSnapOffsetIndices): Added. This finds and notifies
3164         the correct scroll region when a new snap position (index) has been selected by user interaction on
3165         the scrolling thread.
3166         (WebCore::AsyncScrollingCoordinator::deferTestsForReason): Added an assertion for 'isMainThread'.
3167         (WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason): Ditto.
3168         * page/scrolling/AsyncScrollingCoordinator.h:
3169         * page/scrolling/AxisScrollSnapOffsets.h:
3170         (WebCore::closestSnapOffset): Modified to also return the selected snap point index so we can track
3171         it to handle resize operations.
3172         * page/scrolling/ScrollingTree.h:
3173         (WebCore::ScrollingTree::updateScrollSnapOffsetIndices):
3174         * page/scrolling/ThreadedScrollingTree.cpp:
3175         (WebCore::ThreadedScrollingTree::updateScrollSnapOffsetIndices): Added method to dispatch the active
3176         horizontal and vertical scroll snap indices back to the main thread.
3177         * page/scrolling/ThreadedScrollingTree.h:
3178         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3179         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): After the scroll controller processes
3180         the current event, notify the main thread of any change in the active scroll snap index.
3181         * platform/ScrollAnimator.cpp:
3182         (WebCore::ScrollAnimator::activeScrollSnapOffsetIndexDidChange): Added method to allow ScrollAnimator
3183         clients to find out about the current scroll snap state, which is only known by the ScrollController.
3184         (WebCore::ScrollAnimator::activeScrollSnapOffsetIndexForAxis): Ditto.
3185         * platform/ScrollAnimator.h:
3186         * platform/ScrollView.cpp:
3187         (WebCore::ScrollView::scrollToNearestActiveSnapPoint): Added method that allows us to set scroll position
3188         to one of our active scroll snap offsets.
3189         * platform/ScrollView.h:
3190         * platform/ScrollableArea.cpp:
3191         (WebCore::ScrollableArea::handleWheelEvent): If the active scroll snap offset has changed, make sure we
3192         keep track of the new values for potential resize operations.
3193         (WebCore::ScrollableArea::clearHorizontalSnapOffsets): Make sure to also clear out the current snap index.
3194         (WebCore::ScrollableArea::clearVerticalSnapOffsets): Ditto.
3195         (WebCore::ScrollableArea::nearestActiveSnapPoint): New method that returns an updated IntPoint reflecting
3196         the proper scroll position based on the active scroll snap offset.
3197         * platform/ScrollableArea.h:
3198         (WebCore::ScrollableArea::currentHorizontalSnapPointIndex): Added.
3199         (WebCore::ScrollableArea::setCurrentHorizontalSnapPointIndex): Added.
3200         (WebCore::ScrollableArea::currentVerticalSnapPointIndex): Added.
3201         (WebCore::ScrollableArea::setCurrentVerticalSnapPointIndex): Added.
3202         (WebCore::ScrollableArea::scrollToNearestActiveSnapPoint): Added.
3203         * platform/cocoa/ScrollController.h:
3204         (WebCore::ScrollControllerClient::activeScrollOffsetIndex): Added new method for clients to implement.
3205         (WebCore::ScrollController::activeScrollSnapOffsetIndexDidChange): Added.
3206         (WebCore::ScrollController::setScrollSnapOffsetIndexDidChange): Added.
3207         * platform/cocoa/ScrollController.mm:
3208         (WebCore::ScrollController::activeScrollSnapOffsetIndexForAxis): Helper method to return current active
3209         index (if applicable).
3210         (WebCore::ScrollController::setActiveScrollSnapOffsetIndexForAxis): Helper function to safely set
3211         the current active index.
3212         (WebCore::ScrollController::beginScrollSnapAnimation): Updated to keep track of the new active scroll snap
3213         index, as well as whether the current animation actually changed the active snap point offset.
3214         * platform/cocoa/ScrollSnapAnimatorState.h: Revise to use modern C++ initializers, and to track a new index
3215         that represents the current scroll snap offset.
3216         * platform/cocoa/ScrollSnapAnimatorState.mm:
3217         (WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState): Update for modern C++ syntax.
3218         * rendering/RenderLayer.cpp:
3219         (WebCore::RenderLayer::scrollToNearestActiveSnapPoint): New method to set scroll position to be one of our
3220         active scroll snap points.
3221         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Add a new call to 'scrollToNearestActiveSnapPoint' so that
3222         we stay on the current scroll snap offset during resizing.
3223         * rendering/RenderLayer.h:
3224
3225 2015-05-11  Myles C. Maxfield  <mmaxfield@apple.com>
3226
3227         Addressing post-review comments after r184037.
3228
3229         Unreviewed.
3230
3231         No new tests because there is no behavior change.
3232
3233         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3234         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
3235
3236 2015-05-11  Brent Fulgham  <bfulgham@apple.com>
3237
3238         [Win] Move Windows build target to Windows 7 (or newer)
3239         https://bugs.webkit.org/show_bug.cgi?id=144890
3240         <rdar://problem/20707307>
3241
3242         Reviewed by Anders Carlsson.
3243
3244         Update linked SDK and minimal Windows level to be compatible with
3245         Windows 7 or newer.
3246
3247         * WebCore.vcxproj/WebCore.vcxproj:
3248         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
3249         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
3250         * WebCorePrefix.h:
3251         * config.h:
3252         * testing/js/WebCoreTestSupportPrefix.h:
3253
3254 2015-05-11  Joanmarie Diggs  <jdiggs@igalia.com>
3255
3256         AX: [ATK] Always include rows in the tree of accessible tables
3257         https://bugs.webkit.org/show_bug.cgi?id=144885
3258
3259         Reviewed by Chris Fleizach.
3260
3261         Remove the code that excluded rows from the tree of accessible tables for
3262         Gtk and Efl, the latter of which inherited the exclusion from the former.
3263
3264         No new tests. We already have several tests which cover table hierarchy.
3265         The associated expectations have been updated as part of this fix.
3266
3267         * accessibility/AccessibilityTable.cpp:
3268         (WebCore::AccessibilityTable::addChildrenFromSection):
3269         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3270         (webkitAccessibleGetParent):
3271
3272 2015-05-11  Matt Baker  <mattbaker@apple.com>
3273
3274         Web Inspector: REGRESSION (r175203): No profile information is shown in Inspector
3275         https://bugs.webkit.org/show_bug.cgi?id=144808
3276
3277         Reviewed by Darin Adler.
3278
3279         Profiles started from the console should always use the Inspector environment's shared stopwatch.
3280
3281         * inspector/InspectorTimelineAgent.cpp:
3282         (WebCore::InspectorTimelineAgent::startFromConsole):
3283
3284 2015-05-11  Alex Christensen  <achristensen@webkit.org>
3285
3286         [Content Extensions] Support domain-specific rules and exceptions.
3287         https://bugs.webkit.org/show_bug.cgi?id=144833
3288
3289         Reviewed by Darin Adler.
3290
3291         Test: http/tests/contentextensions/domain-rules.html
3292         (And lots of API tests)
3293
3294         This patch adds if-domain and unless-domain to the trigger in the JSON format.
3295         if-domain makes the rule apply only to domains in the list.
3296         unless-domain makes the rule apply to domains that are not in the list.
3297         
3298         All rules without if-domain or unless-domain are compiled into a set of DFAs.  This behavior is unchanged.
3299         All rules with if-domain or unless-domain are compiled into a separate set of DFAs.
3300         The domains are also compiled into another set of DFAs.  This makes 3 arrays of DFA bytecode instead of 1.
3301         
3302         If there are no domain specific rules, there is no change in behavior.
3303         If there are domain specific rules, the URL will be checked for matches in both
3304         filtersWithoutDomainsBytecode and filtersWithDomainsBytecode.  If there are matches from 
3305         filtersWithDomainsBytecode then the domain of the main document will be checked with 
3306         domainFiltersBytecode to see which of the matches applies to this domain.
3307
3308         * contentextensions/CombinedURLFilters.cpp:
3309         (WebCore::ContentExtensions::CombinedURLFilters::isEmpty):
3310         (WebCore::ContentExtensions::CombinedURLFilters::addDomain):
3311         * contentextensions/CombinedURLFilters.h:
3312         Added addDomain, which adds characters from a domain to the prefix tree directly without using YARR.
3313         * contentextensions/CompiledContentExtension.cpp:
3314         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
3315         * contentextensions/CompiledContentExtension.h:
3316         * contentextensions/ContentExtensionCompiler.cpp:
3317         (WebCore::ContentExtensions::serializeActions):
3318         (WebCore::ContentExtensions::compileRuleList):
3319         Separate the rules into rules with domains and rules without domains and compile to bytecode.
3320         * contentextensions/ContentExtensionCompiler.h:
3321         Updated compiler interface to reflect the slightly more complicated structure.
3322         * contentextensions/ContentExtensionError.cpp:
3323         (WebCore::ContentExtensions::contentExtensionErrorCategory):
3324         * contentextensions/ContentExtensionError.h:
3325         Added new parsing errors.
3326         * contentextensions/ContentExtensionParser.cpp:
3327         (WebCore::ContentExtensions::getDomainList):
3328         (WebCore::ContentExtensions::loadTrigger):
3329         (WebCore::ContentExtensions::loadEncodedRules):
3330         * contentextensions/ContentExtensionRule.h:
3331         (WebCore::ContentExtensions::Trigger::operator==):
3332         Parse the new domain structures from JSON into the Trigger structure.
3333         * contentextensions/ContentExtensionsBackend.cpp:
3334         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
3335         Interpret as much bytecode as necessary to determine which rules apply to this URL and domain.
3336         * contentextensions/DFABytecode.h:
3337         (WebCore::ContentExtensions::instructionSizeWithArguments):
3338         * contentextensions/DFABytecodeCompiler.cpp:
3339         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
3340         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTestFlagsAndAppendAction):
3341         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
3342         * contentextensions/DFABytecodeCompiler.h:
3343         * contentextensions/DFABytecodeInterpreter.cpp:
3344         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
3345         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
3346         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
3347         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3348         * contentextensions/DFABytecodeInterpreter.h:
3349         * loader/ResourceLoadInfo.h:
3350         Keep track of which actions have an if-domain trigger.  If an action is in the 
3351         filtersWithDomainsBytecode, then it either has an if-domain or an unless-domain in its trigger.
3352         This requires additional information in the bytecode, so there are two new bytecode types.
3353
3354 2015-05-11  Yoav Weiss  <yoav@yoav.ws>
3355
3356         Add srcset, sizes and picture to the features json
3357         https://bugs.webkit.org/show_bug.cgi?id=144862
3358
3359         Reviewed by Benjamin Poulain.
3360
3361         Add the srcset w descriptor and sizes attribute as a new feature in the JSON file,
3362         as well as adding the picture element and srcset's x descriptor as seperate features.
3363
3364         No new tests, since no new functionality added.
3365
3366         * features.json:
3367
3368 2015-05-11  Chris Dumez  <cdumez@apple.com>
3369
3370         Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate()
3371         https://bugs.webkit.org/show_bug.cgi?id=144873
3372
3373         Reviewed by Simon Fraser.
3374
3375         Fix checkingLogicalHeight initialization in Document::updateLayoutIfDimensionsOutOfDate().
3376         checkingLogicalHeight should only be initialized to true when
3377         "dimensionsCheck & WidthDimensionsCheck" if isVertical is true.
3378
3379         * dom/Document.cpp:
3380         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
3381
3382 2015-05-11  Daniel Bates  <dabates@apple.com>
3383
3384         [iOS] Close all open databases in expiration handler of process assertion
3385         https://bugs.webkit.org/show_bug.cgi?id=144661
3386         <rdar://problem/20845052>
3387
3388         Reviewed by Darin Adler.
3389
3390         Expose functionality in WebCore to close all open databases. Closing a SQLite database
3391         will interrupt any in-progress database transactions.
3392
3393         * Modules/webdatabase/AbstractDatabaseServer.h:
3394         * Modules/webdatabase/DatabaseManager.cpp:
3395         (WebCore::DatabaseManager::closeAllDatabases): Added; turns around and calls DatabaseServer::closeAllDatabases().
3396         * Modules/webdatabase/DatabaseManager.h: Export DatabaseManager::closeAllDatabases() so that
3397         we can call in from WebKit2.
3398         * Modules/webdatabase/DatabaseServer.cpp:
3399         (WebCore::DatabaseServer::closeAllDatabases): Added; turns around and calls DatabaseTracker::closeAllDatabases().
3400         * Modules/webdatabase/DatabaseServer.h:
3401         * Modules/webdatabase/DatabaseTracker.cpp:
3402         (WebCore::DatabaseTracker::closeAllDatabases): Added; closes all open databases.
3403         * Modules/webdatabase/DatabaseTracker.h: Export DatabaseTracker::closeAllDatabases() so that
3404         we can call in from Legacy WebKit.
3405
3406 2015-05-11  Antti Koivisto  <antti@apple.com>
3407
3408         WebContent crash under com.apple.WebCore: WebCore::WebKitCSSResourceValue::isCSSValueNone const + 6
3409         https://bugs.webkit.org/show_bug.cgi?id=144870
3410         rdar://problem/20727702
3411
3412         Reviewed by Simon Fraser.
3413
3414         No repro but we are seeing null pointer crashes like this:
3415
3416         Thread 0 Crashed:: Dispatch queue: com.apple.main-thread