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