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