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