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