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