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