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