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