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