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