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