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