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