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