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