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