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