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