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