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