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