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