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