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