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