Remove scrolling tree dependency on wheel event handler counts, and use fast scrollin...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-31  Simon Fraser  <simon.fraser@apple.com>
2
3         Remove scrolling tree dependency on wheel event handler counts, and use fast scrolling even when there are wheel handlers
4         https://bugs.webkit.org/show_bug.cgi?id=143288
5         rdar://problem/16049624
6
7         Reviewed by Beth Dakin.
8
9         Remove the wheel event counting that Document does, and passes into the scrolling tree.
10         The ScrollingTree now just uses the non-fast scrollable region to determine when to
11         fast scroll on pages with wheel event handlers.
12         
13         If a handler includes position:fixed renderers, we just cover the whole document
14         with the slow-scrolling region currently. This could be improved.
15         
16         * dom/Document.cpp:
17         (WebCore::Document::Document):
18         (WebCore::Document::didBecomeCurrentDocumentInFrame):
19         (WebCore::Document::wheelEventHandlersChanged):
20         (WebCore::Document::didAddWheelEventHandler):
21         (WebCore::Document::didRemoveWheelEventHandler):
22         (WebCore::Document::wheelEventHandlerCount):
23         (WebCore::Document::touchEventHandlerCount):
24         (WebCore::Document::absoluteRegionForEventTargets): Changed to return a pair<Region, bool>
25         where the bool indicates whether any handler includes position:fixed content.
26         (WebCore::pageWheelEventHandlerCountChanged): Deleted.
27         (WebCore::wheelEventHandlerCountChanged): Deleted.
28         * dom/Document.h:
29         (WebCore::Document::wheelEventHandlerCount): Deleted.
30         * loader/EmptyClients.h:
31         * page/ChromeClient.h:
32         * page/DebugPageOverlays.cpp:
33         (WebCore::MouseWheelRegionOverlay::updateRegion):
34         * page/scrolling/AsyncScrollingCoordinator.cpp:
35         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
36         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView): Deleted.
37         * page/scrolling/AsyncScrollingCoordinator.h:
38         * page/scrolling/ScrollingCoordinator.cpp:
39         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
40         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
41         (WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount): Deleted.
42         (WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged): Deleted.
43         * page/scrolling/ScrollingCoordinator.h:
44         (WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView): Deleted.
45         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
46         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
47         (WebCore::ScrollingStateFrameScrollingNode::setWheelEventHandlerCount): Deleted.
48         * page/scrolling/ScrollingStateFrameScrollingNode.h:
49         * page/scrolling/ScrollingTree.cpp:
50         (WebCore::ScrollingTree::ScrollingTree):
51         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
52         (WebCore::ScrollingTree::commitNewTreeState):
53         * page/scrolling/ScrollingTree.h:
54         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
55         (WebCore::ScrollingCoordinatorMac::updateTiledScrollingIndicator):
56         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
57         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
58         (WebCore::logWheelEventHandlerCountChanged): Deleted.
59         * testing/Internals.cpp:
60         (WebCore::Internals::touchEventHandlerCount):
61
62 2015-04-01  David Hyatt  <hyatt@apple.com>
63
64         [New Block-Inside-Inline Model] Floats need to be allowed to intrude into anonymous inline-blocks.
65         https://bugs.webkit.org/show_bug.cgi?id=143307
66
67         Reviewed by Dean Jackson.
68
69         Added fast/block/inside-inlines/basic-float-intrusion.html
70
71         * rendering/InlineFlowBox.cpp:
72         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
73         Make sure to exclude the margins of an anonymous inline-block when considering the height of the line.
74
75         * rendering/RenderBlock.cpp:
76         (WebCore::RenderBlock::lineHeight):
77         (WebCore::RenderBlock::baselinePosition):
78         Anonymous inline-block lines ignore line-height and just return the height of the block. For baseline position, the baseline
79         is considered to be at the bottom border edge of the anonymous inline-block.
80
81         * rendering/RenderBlockFlow.cpp:
82         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
83         (WebCore::RenderBlockFlow::addIntrudingFloats):
84         * rendering/RenderBlockFlow.h:
85         Patch float intrusion to handle the case of anonymous inline-blocks. Instead of collecting the floats from our parent(), we
86         collect them from the containingBlock() in the anonymous inline-block case. Patch addIntrudingFloats to pass in the container
87         that acts as the "parent", since it is not the parent() in the anonymous inline-block case.
88
89         * rendering/RenderBlockLineLayout.cpp:
90         (WebCore::updateLogicalInlinePositions):
91         Make sure to use the full available width for content always in the anonymous inline-block case, since we don't avoid the
92         floats, but instead let them intrude into the inline-block.
93
94         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
95         Patch callers of updateLogicalInlinePositions to pass in the root line box that we're checking for.
96
97         (WebCore::RenderBlockFlow::layoutLineBoxes):
98         Defer the layout of anonymous inline-blocks, since they need to only lay out once the vertical position to lay them out
99         at is known.
100
101         * rendering/RenderBox.cpp:
102         (WebCore::RenderBox::createsNewFormattingContext):
103         (WebCore::RenderBox::avoidsFloats):
104         Anonymous inline-blocks do not establish a new block formatting context, nor do they avoid floats.
105
106         * rendering/line/BreakingContext.h:
107         (WebCore::BreakingContext::handleReplaced):
108         Add code to do a just-in-time layout of the anonymous inline-block at the time it is being examined (after the break before
109         it was handled).
110
111 2015-04-01  Eric Carlson  <eric.carlson@apple.com>
112
113         [Mac] Do not include route button if element does not support target playback
114         https://bugs.webkit.org/show_bug.cgi?id=143251
115
116         Reviewed by Jer Noble.
117
118         * Modules/mediacontrols/mediaControlsApple.js:
119         (Controller.prototype.currentPlaybackTargetIsWireless): Return false if target playback is disabled.
120         (Controller.prototype.updateWirelessTargetAvailable): Do not show the picker if target 
121             playback is disabled.
122         (Controller.prototype.handleWirelessPlaybackChange): Call updateWirelessTargetAvailable.
123
124         * dom/Document.cpp:
125         (WebCore::Document::showPlaybackTargetPicker): Update for Page::showPlaybackTargetPicker change.
126         (WebCore::Document::didChoosePlaybackTarget): Notify clients in vector-order, lower level code
127             now tracks which one requested the picker.
128
129         * html/HTMLMediaElement.cpp:
130         (WebCore::HTMLMediaElement::loadResource): Don't call applyMediaPlayerRestrictions, it is done
131             in mediaPlayerEngineFailedToLoad.
132         (WebCore::HTMLMediaElement::setReadyState): Enqueue a target availability event if there are
133             listeners readyState reaches HAVE_METADATA so controls are setup correctly.
134         (WebCore::HTMLMediaElement::mediaPlayerEngineFailedToLoad): Call applyMediaPlayerRestrictions.
135         (WebCore::HTMLMediaElement::clearMediaPlayer): Enqueue a target availability event in so controls
136             have a chance to hide the picker.
137         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsSupported): New, passthrough to the
138             media engine.
139         (WebCore::HTMLMediaElement::canPlayToWirelessPlaybackTarget): Ditto.
140         (WebCore::HTMLMediaElement::startPlayingToPlaybackTarget): Ditto.
141         (WebCore::HTMLMediaElement::stopPlayingToPlaybackTarget): Ditto.
142         * html/HTMLMediaElement.h:
143         * html/HTMLMediaElement.idl:
144
145         * html/HTMLMediaSession.cpp:
146         (WebCore::HTMLMediaSession::HTMLMediaSession): Initialize m_playbackTarget.
147         (WebCore::HTMLMediaSession::currentPlaybackTargetIsSupported): New.
148         (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Pull logic from showingPlaybackTargetPickerPermitted 
149             inline. Don't refuse to show a picker if the element doesn't support target playback, it is up
150             to script to decide which elements can display a picker.
151         (WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Return true if there is no player.
152         (WebCore::HTMLMediaSession::didChoosePlaybackTarget): Call startPlayingToPlaybackTarget or 
153             stopPlayingToPlaybackTarget because setWirelessPlaybackTarget doesn't apply the target.
154         (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange): Add logging.
155         (WebCore::HTMLMediaSession::showingPlaybackTargetPickerPermitted): Deleted.
156         * html/HTMLMediaSession.h:
157
158         * page/Page.cpp:
159         (WebCore::Page::Page): Initialize m_playbackTarget.
160         (WebCore::Page::showPlaybackTargetPicker): Don't set m_documentRequestingPlaybackTargetPicker.
161         (WebCore::Page::didChoosePlaybackTarget): Notify Pages in vector-order, lower level code
162             now tracks which one requested the picker.
163         (WebCore::Page::configurePlaybackTargetMonitoring): Don't track m_requiresPlaybackTargetMonitoring, it
164             is too easy for it to get out of sync with the UI process state.
165         * page/Page.h:
166
167         * platform/audio/MediaSession.cpp:
168         (WebCore::MediaSession::canPlayToWirelessPlaybackTarget): New, client passthrough.
169         (WebCore::MediaSession::startPlayingToPlaybackTarget): Ditto.
170         (WebCore::MediaSession::stopPlayingToPlaybackTarget): Ditto.
171         * platform/audio/MediaSession.h:
172         (WebCore::MediaSessionClient::canPlayToWirelessPlaybackTarget):
173         (WebCore::MediaSessionClient::startPlayingToPlaybackTarget):
174         (WebCore::MediaSessionClient::stopPlayingToPlaybackTarget):
175
176         * platform/audio/MediaSessionManager.cpp:
177         (WebCore::MediaSessionManager::sessionWillBeginPlayback): Call startPlayingToPlaybackTarget &
178             stopPlayingToPlaybackTarget as necessary.
179         * platform/audio/MediaSessionManager.h:
180
181         * platform/graphics/MediaPlaybackTarget.h:
182         (WebCore::MediaPlaybackTarget::hasActiveRoute): New.
183         * platform/graphics/MediaPlaybackTargetPickerClient.h:
184         * platform/graphics/MediaPlayer.cpp:
185         (WebCore::MediaPlayer::isCurrentPlaybackTargetSupported): New, engine passthrough.
186         (WebCore::MediaPlayer::canPlayToWirelessPlaybackTarget): Ditto.
187         (WebCore::MediaPlayer::startPlayingToPlaybackTarget): Ditto.
188         (WebCore::MediaPlayer::stopPlayingToPlaybackTarget): Ditto.
189         * platform/graphics/MediaPlayer.h:
190         * platform/graphics/MediaPlayerPrivate.h:
191         (WebCore::MediaPlayerPrivateInterface::isCurrentPlaybackTargetSupported):
192         (WebCore::MediaPlayerPrivateInterface::wirelessVideoPlaybackDisabled):
193         (WebCore::MediaPlayerPrivateInterface::canPlayToWirelessPlaybackTarget):
194         (WebCore::MediaPlayerPrivateInterface::startPlayingToPlaybackTarget):
195         (WebCore::MediaPlayerPrivateInterface::stopPlayingToPlaybackTarget):
196
197         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
198         (WebCore::MediaPlaybackTarget::hasActiveRoute): New.
199
200         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
201         (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayToWirelessPlaybackTarget):
202         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
203         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Use playerKVOProperties. Drive-by
204             code cleanup.
205         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Use playerKVOProperties.
206         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetName): Implement for Mac.
207         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled): Delay callbacks
208             while setting AVPlayer property.
209         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): Add logging. Don't set
210             the AVPlayer outputContext immediately.
211         (WebCore::MediaPlayerPrivateAVFoundationObjC::startPlayingToPlaybackTarget): New.
212         (WebCore::MediaPlayerPrivateAVFoundationObjC::stopPlayingToPlaybackTarget): New.
213         (WebCore::playerKVOProperties): New.
214         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Notify when
215             allowsExternalPlayback changes.
216
217         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
218         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
219         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetSupported): New.
220         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setWirelessPlaybackTarget): Ditto.
221         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::togglePlayingToPlaybackTarget): Ditto.
222         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startPlayingToPlaybackTarget): Ditto.
223         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::stopPlayingToPlaybackTarget): Ditto.
224
225         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
226         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
227         (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetSupported): Ditto.
228         (WebCore::MediaPlayerPrivateQTKit::setWirelessPlaybackTarget): Ditto.
229         (WebCore::MediaPlayerPrivateQTKit::togglePlayingToPlaybackTarget): Ditto.
230         (WebCore::MediaPlayerPrivateQTKit::startPlayingToPlaybackTarget): Ditto.
231         (WebCore::MediaPlayerPrivateQTKit::stopPlayingToPlaybackTarget): Ditto.
232
233 2015-04-01  Alex Christensen  <achristensen@webkit.org>
234
235         [Content Extensions] Properly handle regexes that match everything.
236         https://bugs.webkit.org/show_bug.cgi?id=143281
237
238         Reviewed by Benjamin Poulain.
239
240         * contentextensions/ContentExtensionCompiler.cpp:
241         (WebCore::ContentExtensions::compileRuleList):
242         Make sure we always have at least one NFA for rule lists with triggers that all match everything.
243         * contentextensions/DFABytecodeInterpreter.cpp:
244         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
245         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
246         Add helper functions to reduce duplicate code.
247         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
248         Get all actions without flags from the DFA root.
249         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
250         Remove branches when interpreting.
251         * contentextensions/DFABytecodeInterpreter.h:
252         Add helper functions to reduce duplicate code.
253
254 2015-04-01  Myles C. Maxfield  <mmaxfield@apple.com>
255
256         Addressing post-review comments.
257         https://bugs.webkit.org/show_bug.cgi?id=143292
258
259         Unreviewed.
260
261         * platform/graphics/FontCascade.cpp:
262         (WebCore::FontCascade::leadingExpansionOpportunity):
263         (WebCore::FontCascade::trailingExpansionOpportunity):
264
265 2015-04-01  Per Arne Vollan  <peavo@outlook.com>
266
267         [WinCairo] Link errors, unresolved texture mapper methods.
268         https://bugs.webkit.org/show_bug.cgi?id=143308
269
270         Reviewed by Alex Christensen.
271
272         New texture mapper files should be included in the project.
273
274         * WebCore.vcxproj/WebCore.vcxproj:
275         * WebCore.vcxproj/WebCore.vcxproj.filters:
276
277 2015-04-01  Myles C. Maxfield  <mmaxfield@apple.com>
278
279         Support forcing expansion opportunities at the beginning and ending of a run
280         https://bugs.webkit.org/show_bug.cgi?id=143292
281
282         Reviewed by David Hyatt.
283
284         Migrate ExpansionBehavior to an enum comprised of two values: one for leading behavior
285         and one for trailing behavior. Each of these two values can take on a value of
286         "force," "forbid," and neither. All calls that interact with justification are
287         migrated to use this new structure.
288
289         Note that in this terminology, "leading" and "trailing" are with respect to the order
290         that elements get laid out in a line. Therefore, leading is always on the left, since
291         lines get laid out that way regardless of their bidi attributes.
292
293         This is getting ready for https://bugs.webkit.org/show_bug.cgi?id=142608
294
295         No new tests because there is no behavior change.
296
297         * platform/graphics/FontCascade.cpp:
298         (WebCore::FontCascade::expansionOpportunityCountInternal): Migrate to these new
299         values.
300         (WebCore::FontCascade::expansionOpportunityCount): Ditto.
301         (WebCore::FontCascade::leadingExpansionOpportunity): Returns whether one is present
302         or not.
303         (WebCore::FontCascade::trailingExpansionOpportunity): Ditto.
304         * platform/graphics/FontCascade.h:
305         * platform/graphics/GlyphBuffer.h: New leading expansion field.
306         (WebCore::GlyphBuffer::setLeadingExpansion):
307         (WebCore::GlyphBuffer::leadingExpansion):
308         * platform/graphics/TextRun.h: m_expansionBehavior needs more bits.
309         (WebCore::TextRun::expansionBehavior):
310         (WebCore::TextRun::allowsLeadingExpansion): Deleted.
311         (WebCore::TextRun::allowsTrailingExpansion): Deleted.
312         * platform/graphics/WidthIterator.cpp: Update to support new type.
313         (WebCore::WidthIterator::WidthIterator):
314         (WebCore::expansionLocation): Where should we insert expansions?
315         (WebCore::WidthIterator::advanceInternal): Use expansionLocation()
316         * platform/graphics/cocoa/FontCascadeCocoa.mm:
317         (WebCore::FontCascade::adjustSelectionRectForComplexText):
318         (WebCore::FontCascade::getGlyphsAndAdvancesForComplexText):
319         * platform/graphics/mac/ComplexTextController.cpp: Same as WidthIterator
320         (WebCore::ComplexTextController::ComplexTextController):
321         (WebCore::ComplexTextController::advance):
322         (WebCore::expansionLocation):
323         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
324         * platform/graphics/mac/ComplexTextController.h:
325         (WebCore::ComplexTextController::leadingExpansion):
326         * platform/text/TextFlags.h: Add new enum values
327         * rendering/InlineBox.h: Update to include new values.
328         (WebCore::InlineBox::InlineBoxBitfields::InlineBoxBitfields):
329         (WebCore::InlineBox::canHaveTrailingExpansion):
330         (WebCore::InlineBox::setCanHaveTrailingExpansion):
331         (WebCore::InlineBox::setForceTrailingExpansion):
332         (WebCore::InlineBox::forceTrailingExpansion):
333         (WebCore::InlineBox::setForceLeadingExpansion):
334         (WebCore::InlineBox::forceLeadingExpansion):
335         * rendering/InlineTextBox.h:
336         * rendering/RenderBlockLineLayout.cpp: Update to use new FontCascade signatures.
337         (WebCore::expansionBehaviorForInlineTextBox):
338         (WebCore::applyExpansionBehavior):
339         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
340
341 2015-04-01  Zalan Bujtas  <zalan@apple.com>
342
343         Lots of time spent querying table cell borders, when there are none.
344         https://bugs.webkit.org/show_bug.cgi?id=143277
345
346         Reviewed by Simon Fraser.
347
348         This patch speeds up collapsed border queries by using existing collapsed border
349         cache to calculate repaint rects and by introducing a fast path for zero width collapsed borders.
350
351         It reduces the number of calls to recompute collapsed borders from 36 000 to 1 600, while loading a page with a table of 400 rows (1 cell per row).
352         When scrolling the same page all the way down to the bottom, the number of calls to recompute collapsed borders falls from 290 000 to 0.
353
354         Covered by existing tests.
355
356         * rendering/RenderTable.cpp:
357         (WebCore::RenderTable::styleDidChange): This moves invalidation time from RenderTable::layout() to styleDidChange(). 
358         (WebCore::RenderTable::invalidateCollapsedBorders):
359         (WebCore::RenderTable::recalcCollapsedBorders):
360         * rendering/RenderTable.h:
361         (WebCore::RenderTable::collapsedBordersAreValid):
362         (WebCore::RenderTable::invalidateCollapsedBorders): Deleted.
363         * rendering/RenderTableCell.cpp:
364         (WebCore::RenderTableCell::RenderTableCell):
365         (WebCore::RenderTableCell::willBeRemovedFromTree): Invalidate caches so that when repaint rect is calculated, we don't end up using stale values.
366         (WebCore::RenderTableCell::styleDidChange): Same as willBeRemovedFromTree.
367         (WebCore::RenderTableCell::collapsedStartBorder): Check if collapsed border is zero -also query cache. 
368         (WebCore::RenderTableCell::collapsedEndBorder):
369         (WebCore::RenderTableCell::collapsedBeforeBorder):
370         (WebCore::RenderTableCell::collapsedAfterBorder):
371         (WebCore::RenderTableCell::cachedCollapsedLeftBorder):
372         (WebCore::RenderTableCell::cachedCollapsedRightBorder):
373         (WebCore::RenderTableCell::cachedCollapsedTopBorder):
374         (WebCore::RenderTableCell::cachedCollapsedBottomBorder):
375         (WebCore::RenderTableCell::paintCollapsedBorders):
376         (WebCore::RenderTableCell::cellAtLeft): Deleted.
377         (WebCore::RenderTableCell::cellAtRight): Deleted.
378         (WebCore::RenderTableCell::cellAtTop): Deleted.
379         (WebCore::RenderTableCell::cellAtBottom): Deleted.
380         * rendering/RenderTableCell.h:
381         (WebCore::RenderTableCell::invalidateHasEmptyCollapsedBorders):
382         * rendering/RenderTableCol.cpp:
383         (WebCore::RenderTableCol::styleDidChange):
384         * rendering/RenderTableRow.cpp:
385         (WebCore::RenderTableRow::styleDidChange):
386         (WebCore::RenderTableRow::addChild):
387         * rendering/RenderTableSection.cpp:
388         (WebCore::RenderTableSection::styleDidChange):
389         (WebCore::RenderTableSection::clearCachedCollapsedBorders): This is just an extra safety to invalidate collapsed border cache. This is always
390         called together with RenderTable::invalidateCollapsedBorders() -and that should prevent the RenderCells to use the cache.  
391         (WebCore::RenderTableSection::removeCachedCollapsedBorders):
392         (WebCore::RenderTableSection::setCachedCollapsedBorder):
393         (WebCore::RenderTableSection::cachedCollapsedBorder):
394         * rendering/RenderTableSection.h:
395
396 2015-04-01  Carlos Alberto Lopez Perez  <clopez@igalia.com>
397
398         [CMake][GTK] Use the right variable to include the Wayland headers.
399         https://bugs.webkit.org/show_bug.cgi?id=143304
400
401         Reviewed by Carlos Garcia Campos.
402
403         No new tests, no behavior changes.
404
405         * PlatformGTK.cmake: Use the right variable WAYLAND_INCLUDE_DIRS.
406
407 2015-03-30  Philippe Normand  <pnormand@igalia.com>
408
409         [GStreamer] Move synchronous message handler to MediaPlayerPrivateGStreamerBase
410         https://bugs.webkit.org/show_bug.cgi?id=143218
411
412         Reviewed by Carlos Garcia Campos.
413
414         Moved the pipeline pointer to the base class, sub-classes should
415         now invoke setPipeline() when loading a resource. The base class
416         now takes care of configuring the GL shared context, this is more
417         logical because video rendering is also managed by this class.
418
419         No new tests, this is only a code refactoring.
420
421         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
422         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
423         (WebCore::MediaPlayerPrivateGStreamer::load):
424         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
425         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
426         (WebCore::MediaPlayerPrivateGStreamer::pause):
427         (WebCore::MediaPlayerPrivateGStreamer::duration):
428         (WebCore::MediaPlayerPrivateGStreamer::currentTime):
429         (WebCore::MediaPlayerPrivateGStreamer::seek):
430         (WebCore::MediaPlayerPrivateGStreamer::doSeek):
431         (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
432         (WebCore::MediaPlayerPrivateGStreamer::paused):
433         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
434         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
435         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
436         (WebCore::MediaPlayerPrivateGStreamer::setRate):
437         (WebCore::MediaPlayerPrivateGStreamer::buffered):
438         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
439         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
440         (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress):
441         (WebCore::MediaPlayerPrivateGStreamer::sourceChanged):
442         (WebCore::MediaPlayerPrivateGStreamer::cancelLoad):
443         (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
444         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
445         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
446         (WebCore::MediaPlayerPrivateGStreamer::cacheDuration):
447         (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
448         (WebCore::MediaPlayerPrivateGStreamer::audioSink):
449         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
450         (WebCore::MediaPlayerPrivateGStreamer::simulateAudioInterruption):
451         (WebCore::mediaPlayerPrivateSyncMessageCallback): Deleted.
452         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): Deleted.
453         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): Deleted.
454         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
455         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
456         (WebCore::mediaPlayerPrivateNeedContextMessageCallback):
457         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
458         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline):
459         (WebCore::MediaPlayerPrivateGStreamerBase::handleNeedContextMessage):
460         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
461         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
462
463 2015-03-24  Philippe Normand  <philn@igalia.com>
464
465         [GStreamer] GstGL support in the video sink
466         https://bugs.webkit.org/show_bug.cgi?id=138562
467
468         Use GStreamer's glimagesink for video rendering instead of our
469         custom video sink if a recent-enough version of GstGL is found
470         during the build. When glimagesink is used it passes a texture to
471         the media player which then wraps it inside a TextureMapper
472         texture later used for actual rendering.
473
474         Using this new code path will allow us to remove our custom sink
475         entirely in the long term.
476
477         Reviewed by Carlos Garcia Campos.
478
479         No new test, existing media tests cover video rendering already.
480
481         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
482         (WebCore::mediaPlayerPrivateDrawCallback): client-draw signal callback.
483         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
484         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
485         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize): Better
486         check for sample validity.
487         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Ditto.
488         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): Trigger a
489         repaint and wait its completion.
490         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
491         Extract texture ID and video dimensions from the sample and do actual paint.
492         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink): Use
493         glimagesink if GstGL is available.
494         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
495
496 2015-04-01  Joonghun Park  <jh718.park@samsung.com>
497
498         nullptr cleanup in StyleResolver
499         https://bugs.webkit.org/show_bug.cgi?id=143260
500
501         Reviewed by Ryosuke Niwa.
502
503         No new tests, no behavior changes
504
505         * css/StyleResolver.cpp:
506         (WebCore::StyleResolver::State::initForStyleResolve):
507         (WebCore::StyleResolver::locateCousinList):
508         (WebCore::StyleResolver::locateSharedStyle):
509         (WebCore::StyleResolver::keyframeStylesForAnimation):
510         (WebCore::StyleResolver::pseudoStyleForElement):
511         (WebCore::StyleResolver::pseudoStyleRulesForElement):
512         (WebCore::StyleResolver::findFromMatchedPropertiesCache):
513         (WebCore::StyleResolver::applyMatchedProperties):
514         (WebCore::StyleResolver::applyPropertyToStyle):
515         (WebCore::StyleResolver::MatchedProperties::MatchedProperties):
516         * css/StyleResolver.h:
517         (WebCore::PseudoStyleRequest::PseudoStyleRequest):
518         (WebCore::StyleResolverParentPusher::StyleResolverParentPusher):
519
520 2015-03-31  Simon Fraser  <simon.fraser@apple.com>
521
522         Make it possible to compute a region for elements on the page that have wheel event handlers
523         https://bugs.webkit.org/show_bug.cgi?id=142807
524
525         Reviewed by David Hyatt.
526         
527         Make it possible to compute a region that covers the elements on the page that have
528         a wheel event handler. This region may overestimate, but must not underestimate the area.
529         
530         Elements with wheel handlers are registered on the document, and when a document gains
531         its first wheel handler, it registers the ownerElement in the parent document. Thus, on 
532         the main frame, the region encompasses elements with handlers, and iframes whose subdocuments
533         have handlers.
534         
535         Element gains some functions that allow it to return a rect which is the bounds of the element's
536         renderer, and renders for its descendant elements, which is the size or larger than the event
537         handling region for that element. Some configurations (e.g. position:fixed) require special
538         treatment.
539         
540         Document::absoluteRegionForEventTargets() can then iterate over all elements in the given set,
541         and build a Region for those (short-circuiting if the document itself has a handler).
542         
543         The new code is exercised for the debug MouseWheelRegionOverlay, and also added to the
544         non-fast scrollable region, used by threaded scrolling.
545
546         Tests: platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/handlers-in-iframes.html
547                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-fixed-child.html
548                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-columns.html
549                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-in-region.html
550                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-inside-fixed.html
551                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-document.html
552                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-on-fixed.html
553                platform/mac-wk2/tiled-drawing/scrolling/non-fast-region/wheel-handler-region-basic.html
554
555         * dom/ContainerNode.h:
556         (WebCore::ContainerNode::absoluteEventHandlerBounds): Base class implementation; returns empty rect.
557         * dom/Document.cpp:
558         (WebCore::Document::prepareForDestruction): Unregister from the parent document.
559         (WebCore::Document::didAddWheelEventHandler): Add to the wheel handler set. Tell the parent
560         document if we are adding wheel handlers for the first time. Eventually the wheelEventHandlerCountChanged()
561         code will be removed, now we have the set. Tell debug overlays that we changed.
562         (WebCore::Document::didRemoveWheelEventHandler): Remove from the set, and unregister with the parent
563         document if necessary. Tell debug overlays that we changed.
564         (WebCore::Document::didAddTouchEventHandler): Minor cleanup.
565         (WebCore::Document::didRemoveTouchEventHandler): Ditto.
566         (WebCore::Document::didRemoveEventTargetNode): Remove from wheel targets.
567         (WebCore::Document::absoluteEventHandlerBounds): Implementation of the ContainerNode
568         function, just return the document bounds.
569         (WebCore::Document::absoluteRegionForEventTargets): Iterate over the given event targets,
570         and call absoluteEventHandlerBounds() on each.
571         * dom/Document.h:
572         (WebCore::Document::wheelEventTargets):
573         * dom/Element.cpp:
574         (WebCore::layoutOverflowRectContainsAllDescendants): Return true if we can determine that the
575         layoutOverflow bounds of the given renderer contains the renderers of all descendant elements.
576         (WebCore::Element::eventBounds): Get the "event handling" bounds of this element (excluding
577         descendants), and while doing so, compute whether any descendants are position:fixed, and whether
578         these bounds are known to include descendants.
579         (WebCore::Element::eventBoundsOfElementAndDescendants): Recursive function that short-circuits
580         if it can determine that descendants are enclosed by the bounds.
581         (WebCore::Element::absoluteEventHandlerBounds):
582         * dom/Element.h:
583         * page/DebugPageOverlays.cpp:
584         (WebCore::MouseWheelRegionOverlay::updateRegion): Ask the document for the region of wheel
585         event handlers.
586         * page/scrolling/ScrollingCoordinator.cpp:
587         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Add the wheel handler region
588         to the non-fast scrollable region.
589         * rendering/RenderLayer.cpp:
590         (WebCore::RenderLayer::scrollTo): Overflow scrolling needs to dirty event regions.
591         * rendering/RenderObject.cpp:
592         (WebCore::RenderObject::absoluteBoundingBoxRect): Need to pass the "wasFixed" flag out
593         of this function.
594         (WebCore::RenderObject::localToAbsolute): Ditto.
595         * rendering/RenderObject.h:
596
597 2015-03-31  Alexey Proskuryakov  <ap@apple.com>
598
599         Fix bindings tests results after <http://trac.webkit.org/changeset/182205>.
600
601         * bindings/scripts/test/JS/JSTestObj.cpp:
602         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
603         (WebCore::setJSTestObjConditionalAttr4Constructor):
604         (WebCore::setJSTestObjConditionalAttr5Constructor):
605         (WebCore::setJSTestObjConditionalAttr6Constructor):
606         (WebCore::setJSTestObjReplaceableAttribute):
607
608 2015-03-31  Benjamin Poulain  <bpoulain@apple.com>
609
610         Content Extensions: split the state machines to minimize prefix states
611         https://bugs.webkit.org/show_bug.cgi?id=143253
612
613         Reviewed by Alex Christensen.
614
615         With this patch, we refine how the URLs are partitioned to make
616         multiple small machines instead of a big one.
617
618         Here, considering each pattern as a language, I took the simplest
619         partitioning: take the union minimizing the states
620         that differentiate languages.
621
622         The idea is the following: every time a subgraph can be skipped
623         or repeated, it is an opportunity for a merged language to start
624         with a distinguishable state.
625         To avoid accumulating those differences, we only merge languages
626         that share the exact same "variable" subgraph as a prefix.
627
628         A side effect is that we could create as many machines as we have patterns.
629         We'll have to address that in a follow-up by merging small machines
630         until they reach a certain size.
631         In the common cases, patterns look very much alike so that is not a problem
632         at the moment.
633
634         * WebCore.xcodeproj/project.pbxproj:
635         * contentextensions/CombinedURLFilters.cpp: Added.
636         I moved the prefix tree and graph construction out of URLFilterParser for clarity.
637
638         CombinedURLFilters maintain the term prefix tree. Instead of generating on the fly
639         as we build the prefix tree, we first generate the entire tree of terms, then generate
640         NFAs for each branch without a variable prefix.
641
642         (WebCore::ContentExtensions::CombinedURLFilters::CombinedURLFilters):
643         (WebCore::ContentExtensions::CombinedURLFilters::~CombinedURLFilters):
644
645         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
646         Note here that we keep track of which subtree contains a any variable length term.
647         Instead of anotating the edges, the destination vertex is anotated with the information
648         from the edge.
649
650         The flag "inVariableLengthPrefix" is there to simplify traversal.
651
652         (WebCore::ContentExtensions::generateNFAForSubtree):
653         (WebCore::ContentExtensions::CombinedURLFilters::createNFAs):
654         Since we are traversing a tree generated by string, using the stack for recursion
655         is out of the question.
656
657         Fortunately, the entire state is very simple when going depth first: we only need
658         the active vertex and edge, and traverse the edges in order.
659
660         To do keep track of the edges, I used the HashTable iterator on the current term.
661         Since no vertex is modified for generation, storing the iterators is safe.
662
663         * contentextensions/CombinedURLFilters.h:
664         * contentextensions/ContentExtensionCompiler.cpp:
665         (WebCore::ContentExtensions::compileRuleList):
666         * contentextensions/NFA.cpp:
667         (WebCore::ContentExtensions::NFA::setActions):
668         (WebCore::ContentExtensions::NFA::debugPrintDot):
669         (WebCore::ContentExtensions::NFA::setFinal): Deleted.
670         (WebCore::ContentExtensions::NFA::addRuleId): Deleted.
671         * contentextensions/NFA.h:
672         * contentextensions/NFAGraphBuilder.cpp: Added.
673         * contentextensions/NFAGraphBuilder.h: Added.
674         * contentextensions/NFANode.h:
675         * contentextensions/Term.h: Added.
676         Move the Term to its own file since it is now shared between the parser
677         and the CombinedURLFilters.
678
679         (WebCore::ContentExtensions::Term::CharacterSet::operator==):
680         (WebCore::ContentExtensions::Term::CharacterSet::hash):
681         (WebCore::ContentExtensions::Term::Group::operator==):
682         (WebCore::ContentExtensions::Term::Group::hash):
683         (WebCore::ContentExtensions::TermHash::hash):
684         (WebCore::ContentExtensions::TermHash::equal):
685         (WebCore::ContentExtensions::Term::Term):
686         (WebCore::ContentExtensions::Term::~Term):
687         (WebCore::ContentExtensions::Term::isValid):
688         (WebCore::ContentExtensions::Term::addCharacter):
689         (WebCore::ContentExtensions::Term::extendGroupSubpattern):
690         (WebCore::ContentExtensions::Term::quantify):
691         (WebCore::ContentExtensions::Term::Term::generateGraph):
692         (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
693         (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
694         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString):
695         (WebCore::ContentExtensions::Term::hasFixedLength):
696         (WebCore::ContentExtensions::Term::operator=):
697         (WebCore::ContentExtensions::Term::operator==):
698         (WebCore::ContentExtensions::Term::hash):
699         (WebCore::ContentExtensions::Term::isEmptyValue):
700         (WebCore::ContentExtensions::Term::isDeletedValue):
701         (WebCore::ContentExtensions::Term::isUniversalTransition):
702         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
703         (WebCore::ContentExtensions::Term::destroy):
704         * contentextensions/URLFilterParser.cpp:
705         (WebCore::ContentExtensions::PatternParser::PatternParser):
706         (WebCore::ContentExtensions::PatternParser::finalize):
707         (WebCore::ContentExtensions::PatternParser::assertionBOL):
708         (WebCore::ContentExtensions::URLFilterParser::URLFilterParser):
709         (WebCore::ContentExtensions::URLFilterParser::addPattern):
710         (WebCore::ContentExtensions::Term::Term): Deleted.
711         (WebCore::ContentExtensions::Term::~Term): Deleted.
712         (WebCore::ContentExtensions::Term::isValid): Deleted.
713         (WebCore::ContentExtensions::Term::addCharacter): Deleted.
714         (WebCore::ContentExtensions::Term::extendGroupSubpattern): Deleted.
715         (WebCore::ContentExtensions::Term::quantify): Deleted.
716         (WebCore::ContentExtensions::Term::generateGraph): Deleted.
717         (WebCore::ContentExtensions::Term::isEndOfLineAssertion): Deleted.
718         (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter): Deleted.
719         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString): Deleted.
720         (WebCore::ContentExtensions::Term::operator=): Deleted.
721         (WebCore::ContentExtensions::Term::operator==): Deleted.
722         (WebCore::ContentExtensions::Term::hash): Deleted.
723         (WebCore::ContentExtensions::Term::isEmptyValue): Deleted.
724         (WebCore::ContentExtensions::Term::isDeletedValue): Deleted.
725         (WebCore::ContentExtensions::Term::isUniversalTransition): Deleted.
726         (WebCore::ContentExtensions::Term::generateSubgraphForAtom): Deleted.
727         (WebCore::ContentExtensions::Term::destroy): Deleted.
728         (WebCore::ContentExtensions::Term::CharacterSet::operator==): Deleted.
729         (WebCore::ContentExtensions::Term::CharacterSet::hash): Deleted.
730         (WebCore::ContentExtensions::Term::Group::operator==): Deleted.
731         (WebCore::ContentExtensions::Term::Group::hash): Deleted.
732         (WebCore::ContentExtensions::TermHash::hash): Deleted.
733         (WebCore::ContentExtensions::TermHash::equal): Deleted.
734         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder): Deleted.
735         (WebCore::ContentExtensions::GraphBuilder::finalize): Deleted.
736         (WebCore::ContentExtensions::GraphBuilder::assertionBOL): Deleted.
737         * contentextensions/URLFilterParser.h:
738
739 2015-03-31  Myles C. Maxfield  <mmaxfield@apple.com>
740
741         Move ExpansionBehaviorFlags and TextDirection to their own file
742         https://bugs.webkit.org/show_bug.cgi?id=143273
743
744         Reviewed by Simon Fraser.
745
746         This is a mechanical change. It just moves code around.
747
748         This is getting ready for https://bugs.webkit.org/show_bug.cgi?id=142608
749
750         No new tests because there is no behavior change.
751
752         * Modules/notifications/Notification.h:
753         * WebCore.vcxproj/WebCore.vcxproj:
754         * WebCore.vcxproj/WebCore.vcxproj.filters:
755         * WebCore.xcodeproj/project.pbxproj:
756         * css/CSSPrimitiveValueMappings.h:
757         * css/CSSProperty.h:
758         * dom/Position.h:
759         * editing/VisiblePosition.h:
760         * editing/VisibleUnits.h:
761         * editing/htmlediting.h:
762         * html/canvas/CanvasRenderingContext2D.cpp:
763         (WebCore::CanvasRenderingContext2D::drawTextInternal):
764         * html/canvas/CanvasRenderingContext2D.h:
765         * platform/LengthBox.h:
766         * platform/PopupMenuStyle.h:
767         * platform/graphics/FontCascade.h:
768         * platform/graphics/LayoutBoxExtent.h:
769         * platform/graphics/TextRun.h:
770         * platform/ios/SelectionRect.h:
771         * platform/text/BidiResolver.h:
772         * platform/text/StringWithDirection.h:
773         * platform/text/TextHelpers.h: Renamed from Source/WebCore/platform/text/TextDirection.h.
774         (WebCore::isLeftToRightDirection):
775         * platform/win/PopupMenuWin.cpp:
776         (WebCore::PopupMenuWin::paint):
777         * rendering/EllipsisBox.cpp:
778         (WebCore::EllipsisBox::paint):
779         (WebCore::EllipsisBox::selectionRect):
780         (WebCore::EllipsisBox::paintSelection):
781         * rendering/HitTestLocation.h:
782         * rendering/HitTestResult.h:
783         * rendering/InlineBox.h:
784         * rendering/InlineTextBox.h:
785         (WebCore::InlineTextBox::expansionBehavior):
786         * rendering/RenderBlock.cpp:
787         (WebCore::constructTextRunInternal):
788         (WebCore::RenderBlock::constructTextRun):
789         * rendering/RenderBlock.h:
790         * rendering/RenderFileUploadControl.cpp:
791         (WebCore::RenderFileUploadControl::paintObject):
792         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
793         * rendering/RenderListBox.cpp:
794         (WebCore::RenderListBox::updateFromElement):
795         (WebCore::RenderListBox::paintItemForeground):
796         * rendering/RenderListMarker.cpp:
797         (WebCore::RenderListMarker::computePreferredLogicalWidths):
798         (WebCore::RenderListMarker::getRelativeMarkerRect):
799         * rendering/RenderMenuList.cpp:
800         (RenderMenuList::updateOptionsWidth):
801         * rendering/RenderTextControl.cpp:
802         (WebCore::RenderTextControl::getAverageCharWidth):
803         * rendering/RenderThemeIOS.mm:
804         * rendering/style/RenderStyle.h:
805         * rendering/svg/SVGInlineTextBox.cpp:
806         (WebCore::SVGInlineTextBox::constructTextRun):
807         * rendering/svg/SVGTextMetrics.cpp:
808         (WebCore::SVGTextMetrics::constructTextRun):
809
810 2015-03-31  Yusuke Suzuki  <utatane.tea@gmail.com>
811
812         Clean up Identifier factories to clarify the meaning of StringImpl*
813         https://bugs.webkit.org/show_bug.cgi?id=143146
814
815         Reviewed by Filip Pizlo.
816
817         Just change Identifier creations.
818
819         1. If the code creates Identifier from StringImpl*
820         which is treated as symbol or string(unique id), use Identifier::fromUid.
821         2. If the code creates Identifier from string, use Identifier::fromString.
822
823         * Modules/plugins/QuickTimePluginReplacement.mm:
824         (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected):
825         (WebCore::QuickTimePluginReplacement::installReplacement):
826         * bindings/js/IDBBindingUtilities.cpp:
827         (WebCore::get):
828         (WebCore::set):
829         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
830         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames):
831         * bindings/js/JSCallbackData.cpp:
832         (WebCore::JSCallbackData::invokeCallback):
833         * bindings/js/JSCommandLineAPIHostCustom.cpp:
834         (WebCore::getJSListenerFunctions):
835         (WebCore::JSCommandLineAPIHost::getEventListeners):
836         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
837         (WebCore::JSCryptoAlgorithmBuilder::add):
838         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
839         (WebCore::getProperty):
840         (WebCore::getHashAlgorithm):
841         * bindings/js/JSCryptoKeySerializationJWK.cpp:
842         (WebCore::getJSArrayFromJSON):
843         (WebCore::getStringFromJSON):
844         (WebCore::getBooleanFromJSON):
845         (WebCore::addToJSON):
846         (WebCore::buildJSONForRSAComponents):
847         (WebCore::addBoolToJSON):
848         (WebCore::addUsagesToJSON):
849         * bindings/js/JSCustomXPathNSResolver.cpp:
850         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
851         * bindings/js/JSDOMStringMapCustom.cpp:
852         (WebCore::JSDOMStringMap::getOwnPropertyNames):
853         * bindings/js/JSDOMWindowCustom.cpp:
854         (WebCore::JSDOMWindow::defineOwnProperty):
855         (WebCore::JSDOMWindow::setLocation):
856         (WebCore::DialogHandler::dialogCreated):
857         (WebCore::DialogHandler::returnValue):
858         * bindings/js/JSDeviceMotionEventCustom.cpp:
859         (WebCore::readAccelerationArgument):
860         (WebCore::readRotationRateArgument):
861         (WebCore::createAccelerationObject):
862         (WebCore::createRotationRateObject):
863         * bindings/js/JSDictionary.cpp:
864         (WebCore::JSDictionary::tryGetProperty):
865         * bindings/js/JSEventListener.cpp:
866         (WebCore::JSEventListener::handleEvent):
867         * bindings/js/JSHTMLAllCollectionCustom.cpp:
868         (WebCore::callHTMLAllCollection):
869         (WebCore::JSHTMLAllCollection::item):
870         (WebCore::JSHTMLAllCollection::namedItem):
871         * bindings/js/JSHTMLDocumentCustom.cpp:
872         (WebCore::JSHTMLDocument::all):
873         (WebCore::JSHTMLDocument::setAll):
874         (WebCore::JSHTMLDocument::open):
875         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
876         (WebCore::JSHTMLFormControlsCollection::namedItem):
877         * bindings/js/JSIDBDatabaseCustom.cpp:
878         (WebCore::JSIDBDatabase::createObjectStore):
879         * bindings/js/JSIDBObjectStoreCustom.cpp:
880         (WebCore::JSIDBObjectStore::createIndex):
881         * bindings/js/JSImageDataCustom.cpp:
882         (WebCore::toJS):
883         * bindings/js/JSInspectorFrontendHostCustom.cpp:
884         (WebCore::populateContextMenuItems):
885         * bindings/js/JSLazyEventListener.cpp:
886         (WebCore::JSLazyEventListener::initializeJSFunction):
887         * bindings/js/JSNodeFilterCondition.cpp:
888         (WebCore::JSNodeFilterCondition::acceptNode):
889         * bindings/js/JSSQLResultSetRowListCustom.cpp:
890         (WebCore::JSSQLResultSetRowList::item):
891         * bindings/js/JSStorageCustom.cpp:
892         (WebCore::JSStorage::getOwnPropertyNames):
893         * bindings/js/ReadableStreamJSSource.cpp:
894         (WebCore::setInternalSlotToObject):
895         (WebCore::getInternalSlotFromObject):
896         * bindings/js/ScriptGlobalObject.cpp:
897         (WebCore::ScriptGlobalObject::set):
898         (WebCore::ScriptGlobalObject::get):
899         (WebCore::ScriptGlobalObject::remove):
900         * bindings/js/SerializedScriptValue.cpp:
901         (WebCore::CloneSerializer::CloneSerializer):
902         (WebCore::CloneSerializer::write):
903         (WebCore::CloneDeserializer::deserialize):
904         * bindings/objc/WebScriptObject.mm:
905         (-[WebScriptObject callWebScriptMethod:withArguments:]):
906         (-[WebScriptObject setValue:forKey:]):
907         (-[WebScriptObject valueForKey:]):
908         (-[WebScriptObject removeWebScriptKey:]):
909         (-[WebScriptObject hasWebScriptKey:]):
910         * bindings/scripts/CodeGeneratorJS.pm:
911         (GenerateImplementation):
912         * bindings/scripts/test/JS/JSFloat64Array.cpp:
913         (WebCore::JSFloat64Array::getOwnPropertyNames):
914         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
915         (WebCore::JSTestEventTarget::getOwnPropertyNames):
916         * bindings/scripts/test/JS/JSTestObj.cpp:
917         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
918         (WebCore::setJSTestObjConditionalAttr4Constructor):
919         (WebCore::setJSTestObjConditionalAttr5Constructor):
920         (WebCore::setJSTestObjConditionalAttr6Constructor):
921         (WebCore::setJSTestObjReplaceableAttribute):
922         * bridge/c/c_utility.cpp:
923         (JSC::Bindings::identifierFromNPIdentifier):
924         * bridge/objc/objc_runtime.mm:
925         (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
926         * bridge/testbindings.cpp:
927         (main):
928         * bridge/testbindings.mm:
929         (main):
930         * contentextensions/ContentExtensionParser.cpp:
931         (WebCore::ContentExtensions::loadTrigger):
932         (WebCore::ContentExtensions::loadAction):
933         * html/HTMLMediaElement.cpp:
934         (WebCore::HTMLMediaElement::parseAttribute):
935         * html/HTMLPlugInImageElement.cpp:
936         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
937         * testing/js/WebCoreTestSupport.cpp:
938         (WebCoreTestSupport::injectInternalsObject):
939
940 2015-03-31  Jer Noble  <jer.noble@apple.com>
941
942         [Mac] Songza.com fails to play; QTKit path reports it is always "seeking".
943         https://bugs.webkit.org/show_bug.cgi?id=143274
944
945         Rubber-stamped by Eric Carlson.
946
947         MediaTime::invalidTime() is always greater than any valid time. So when
948         checking to see if MediaPlayerPrivateQTKit is seeking, first check if the
949         m_seekTo time is valid before checking whether it's > 0.
950
951         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
952         (WebCore::MediaPlayerPrivateQTKit::seeking):
953
954 2015-03-31  Said Abou-Hallawa  <sabouhallawa@apple.com>
955
956         border-image with 'fill' keyword does not fill the middle area unless the border width is greater than zero.
957         https://bugs.webkit.org/show_bug.cgi?id=142650.
958
959         Reviewed by Simon Fraser.
960
961         The decoration of a RenderBox, a RenderTable or an InlineFlowBox should be
962         drawn if its RenderStyle has a non-zero width border or the border-image
963         has the keyword fill.
964
965         Tests: fast/borders/border-image-fill-inline-no-border.html
966                fast/borders/border-image-fill-no-border.html
967
968         * rendering/InlineFlowBox.cpp:
969         (WebCore::InlineFlowBox::paintBoxDecorations):
970         * rendering/RenderBox.cpp:
971         (WebCore::RenderBox::paintBoxDecorations):
972         * rendering/RenderBoxModelObject.cpp:
973         (WebCore::RenderBoxModelObject::hasBoxDecorationStyle):
974         * rendering/RenderTable.cpp:
975         (WebCore::RenderTable::paintBoxDecorations):
976         * rendering/style/BorderData.h:
977         (WebCore::BorderData::hasFill):
978         * rendering/style/RenderStyle.h:
979
980 2015-03-31  Alex Christensen  <achristensen@webkit.org>
981
982         [Win] Unreviewed build fix.
983
984         * WebCore.vcxproj/WebCore.vcxproj:
985         Don't include inspector files twice in debug builds.
986         InspectorAllInOne.cpp is now used on debug builds.
987
988 2015-03-31  David Hyatt  <hyatt@apple.com>
989
990         [New Block-Inside-Inline Model] Anonymous inline-blocks should size as though they are block-level.
991         https://bugs.webkit.org/show_bug.cgi?id=143271
992
993         Reviewed by Dean Jackson.
994
995         Added fast/block/inside-inlines/block-width-check.html.
996
997         * rendering/RenderBox.cpp:
998         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
999         Return false when an anonymous inline-block is encountered, since we want to treat it like a regular
1000         block instead.
1001
1002 2015-03-31  Commit Queue  <commit-queue@webkit.org>
1003
1004         Unreviewed, rolling out r182186.
1005         https://bugs.webkit.org/show_bug.cgi?id=143270
1006
1007         it crashes all the WebGL tests on the Debug bots (Requested by
1008         dino on #webkit).
1009
1010         Reverted changeset:
1011
1012         "Web Inspector: add 2D/WebGL canvas instrumentation
1013         infrastructure"
1014         https://bugs.webkit.org/show_bug.cgi?id=137278
1015         http://trac.webkit.org/changeset/182186
1016
1017 2015-03-31  Myles C. Maxfield  <mmaxfield@apple.com>
1018
1019         Crash in CGContextShowGlyphsWithAdvances when passing kCGFontIndexInvalid
1020         https://bugs.webkit.org/show_bug.cgi?id=143114
1021
1022         This is a workaround for <rdar://problem/20230073>. Please remove when it is no longer necessary.
1023
1024         Reviewed by Alexey Proskuryakov.
1025
1026         Covered by:
1027         compositing/regions/floated-region-with-transformed-child.html
1028         compositing/regions/floated-region-with-transformed-child-expected.html
1029         fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-005.html
1030         fast/regions/counters/extract-ordered-lists-in-regions-explicit-counters-005-expected.html
1031         fast/regions/overflow/overflow-content-transform-rotate.html
1032         fast/regions/overflow/overflow-content-transform-rotate-expected.html
1033
1034         * platform/graphics/GlyphBuffer.h:
1035         (WebCore::GlyphBuffer::shrink): Performing shaping may remove glyphs, so we need to shrink the GlyphBuffer.
1036         * platform/graphics/WidthIterator.cpp:
1037         (WebCore::applyFontTransforms): Filter out kCGFontIndexInvalid.
1038         (WebCore::WidthIterator::advanceInternal): Moved code into applyFontTransforms, and trigger the
1039         shrink of the GlyphBuffer.
1040
1041 2015-03-31  Beth Dakin  <bdakin@apple.com>
1042
1043         REGRESSION (r173484): Reducing content of scrollable region does not reset scroll 
1044         position
1045         https://bugs.webkit.org/show_bug.cgi?id=138525
1046         -and corresponding-
1047         rdar://problem/18166043
1048
1049         Reviewed by Simon Fraser.
1050
1051         The change that caused this regression was correct. That change does not allow 
1052         RenderLayer to update scroll position after a layout if a rubber-band is currently 
1053         happening. The change caused this regression because all of the member variables 
1054         in ScrollController that attempt to keep track of the current state of the scroll 
1055         gesture (m_inScrollGesture, m_momentumScrollInProgress, and 
1056         m_snapRubberbandTimerIsActive) all indicated that a momentum scroll gesture was 
1057         still in action for this div even though it very much is not when the bug happens. 
1058         Those variables were never properly re-set because the 
1059         PlatformWheelEventPhaseEnded events never got dispatched to the ScrollController, 
1060         which brought the investigation back to Element.
1061
1062         We must still dispatch events that have zero delta so that the default event 
1063         handlers can handle them, but we should stopPropagation() so that these events are 
1064         not sent to the DOM. Websites will break if they get wheel events with no delta.
1065         * dom/Element.cpp:
1066         (WebCore::Element::dispatchWheelEvent):
1067
1068 2015-03-31  Alex Christensen  <achristensen@webkit.org>
1069
1070         [Win] Unreviewed debug build fix after r182186.
1071
1072         * WebCore.vcxproj/WebCore.vcxproj:
1073         Include InspectorAllInOne.cpp in debug builds.
1074
1075 2015-03-30  David Hyatt  <hyatt@apple.com>
1076
1077         [New Block-Inside-Inline Model] Make sure line breaks occur before and after the anonymous inline-block.
1078         https://bugs.webkit.org/show_bug.cgi?id=143238.
1079
1080         Reviewed by Dean Jackson.
1081
1082         Added fast/blocks/inside-inlines/breaking-behavior.html (and new-model equivalent).
1083
1084         * rendering/InlineFlowBox.h:
1085         (WebCore::InlineFlowBox::InlineFlowBox):
1086         (WebCore::InlineFlowBox::hasAnonymousInlineBlock):
1087         (WebCore::InlineFlowBox::setHasAnonymousInlineBlock):
1088         Add a bit to root line boxes (stored in the InlineFlowBox since it has free bits) that indicates whether
1089         or not a line is an anonymous inline-block line.
1090
1091         * rendering/RenderBlockFlow.cpp:
1092         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
1093         Patch the preferred logical width computation to break both before and after an anonymous inline-block.
1094         Also make sure to strip trailing spaces from the line before the anonymous inline-block.
1095
1096         * rendering/RenderBlockLineLayout.cpp:
1097         (WebCore::RenderBlockFlow::constructLine):
1098         Patch line construction so that no intermediate boxes are constructed between the InlineBox for the anonymous
1099         inline-block and the root line box.
1100
1101         * rendering/RootInlineBox.cpp:
1102         (WebCore::RootInlineBox::ascentAndDescentForBox):
1103         The height of a "line" that holds an anonymous inline-block should ignore line-box-contain and also make sure
1104         that the margins of the replaced element are "outside" the line, since those margins will collapse.
1105
1106         * rendering/line/BreakingContext.h:
1107         (WebCore::BreakingContext::handleReplaced):
1108         Patch handleReplaced to make sure breaks occur both before and after an anonymous inline-block. In the case of
1109         a break after the block, we setPreviousLineBrokeCleanly to true so that <br>s that follow the anonymous inline-block
1110         are respected.
1111
1112 2015-03-31  Csaba Osztrogonác  <ossy@webkit.org>
1113
1114         [EFL] Add nullptr check to GraphicsContext3D::makeContextCurrent()
1115         https://bugs.webkit.org/show_bug.cgi?id=143214
1116
1117         Reviewed by Žan Doberšek.
1118
1119         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1120         (WebCore::GraphicsContext3D::makeContextCurrent):
1121
1122 2015-03-31  Matt Baker  <mattbaker@apple.com>
1123
1124         Web Inspector: add 2D/WebGL canvas instrumentation infrastructure
1125         https://bugs.webkit.org/show_bug.cgi?id=137278
1126
1127         Reviewed by Timothy Hatcher.
1128
1129         Added backend agent for canvas inspection. A canvas is instrumented once its CanvasRenderingContext has been
1130         created. WebGLRenderingContext is instrumented to track the lifetime of shader program objects.
1131
1132         To instrument off-screen rendering contexts (CSS canvases and detached canvas elements), the canvas agent must
1133         track all CanvasRenderingContexts as they are created, even in the absense of the frontend. As far as I know,
1134         there is no practical way to identify rendering contexts belonging to a frame that are not in the DOM. In the
1135         absence of the inspector frontend the agent does only the minimum required to track the lifetime of rendering
1136         contexts and their resources, to avoid creating a negative performance impact.
1137
1138         Tests: inspector/canvas/canvas-add-remove-events.html
1139                inspector/canvas/canvas-context-attributes.html
1140                inspector/canvas/canvas-css-name.html
1141
1142         * CMakeLists.txt:
1143         * WebCore.xcodeproj/project.pbxproj:
1144
1145         * dom/Document.cpp:
1146         (WebCore::Document::getCSSCanvasElement):
1147         Instrumentation for CSS canvases.
1148
1149         * html/HTMLCanvasElement.cpp:
1150         (WebCore::HTMLCanvasElement::getContext):
1151         Instrumentation for context creation.
1152
1153         * html/canvas/WebGLRenderingContextBase.cpp:
1154         (WebCore::WebGLRenderingContextBase::attachShader):
1155         (WebCore::WebGLRenderingContextBase::createProgram):
1156         (WebCore::WebGLRenderingContextBase::deleteProgram):
1157         (WebCore::WebGLRenderingContextBase::detachShader):
1158         Instrumentation for programs and shaders.
1159
1160         * inspector/InspectorAllInOne.cpp:
1161
1162         * inspector/InspectorCanvasAgent.cpp: Added.
1163         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
1164         (WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
1165         (WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
1166         (WebCore::InspectorCanvasAgent::frameNavigated):
1167         (WebCore::InspectorCanvasAgent::didCreateCSSCanvas):
1168         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
1169         (WebCore::InspectorCanvasAgent::didAttachShader):
1170         (WebCore::InspectorCanvasAgent::didDetachShader):
1171         (WebCore::InspectorCanvasAgent::didCreateProgram):
1172         (WebCore::InspectorCanvasAgent::didDeleteProgram):
1173         (WebCore::InspectorCanvasAgent::getCanvases):
1174         (WebCore::InspectorCanvasAgent::canvasDestroyed):
1175         (WebCore::InspectorCanvasAgent::canvasDestroyedTimerFired):
1176         (WebCore::InspectorCanvasAgent::reset):
1177         (WebCore::InspectorCanvasAgent::getCanvasEntry):
1178         (WebCore::InspectorCanvasAgent::getProgramEntry):
1179         (WebCore::InspectorCanvasAgent::removeShaderFromShaderMap):
1180         (WebCore::InspectorCanvasAgent::contextTypeJson):
1181         (WebCore::InspectorCanvasAgent::buildObjectForCanvas):
1182         * inspector/InspectorCanvasAgent.h: Added.
1183         New backend agent.
1184
1185         * inspector/InspectorController.cpp:
1186         (WebCore::InspectorController::InspectorController):
1187         Support for new backend agent.
1188
1189         * inspector/InspectorInstrumentation.cpp:
1190         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
1191         (WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl):
1192         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl):
1193         (WebCore::InspectorInstrumentation::didAttachShaderImpl):
1194         (WebCore::InspectorInstrumentation::didDetachShaderImpl):
1195         (WebCore::InspectorInstrumentation::didCreateProgramImpl):
1196         (WebCore::InspectorInstrumentation::didDeleteProgramImpl):
1197         (WebCore::InspectorInstrumentation::instrumentingAgentsForRenderingContext):
1198         Plumbing for canvas instrumentation.
1199
1200         * inspector/InspectorInstrumentation.h:
1201         (WebCore::InspectorInstrumentation::didCreateCSSCanvas):
1202         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext):
1203         (WebCore::InspectorInstrumentation::didAttachShader):
1204         (WebCore::InspectorInstrumentation::didDetachShader):
1205         (WebCore::InspectorInstrumentation::didCreateProgram):
1206         (WebCore::InspectorInstrumentation::didDeleteProgram):
1207
1208         * inspector/InstrumentingAgents.cpp:
1209         (WebCore::InstrumentingAgents::InstrumentingAgents):
1210         (WebCore::InstrumentingAgents::reset):
1211         * inspector/InstrumentingAgents.h:
1212         (WebCore::InstrumentingAgents::inspectorCanvasAgent):
1213         (WebCore::InstrumentingAgents::setInspectorCanvasAgent):
1214         Support for new backend agent.
1215
1216 2015-03-31  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1217
1218         [Streams API] Implement a barebone ReadableStreamReader interface
1219         https://bugs.webkit.org/show_bug.cgi?id=142866
1220
1221         Reviewed by Benjamin Poulain.
1222
1223         This patch implements a barebone ReadableStreamReader as described in https://streams.spec.whatwg.org/#reader-class.
1224         It implements the IDL without implementing most of the functionality behind.
1225         It implements ReadableStreamReader JS constructor and the link with ReadableStream.getReader:
1226         - Raise an error if stream is already locked
1227         - Set the stream reader to the newly created ReadableStreamReader instance.
1228
1229         Test: streams/readablestreamreader-constructor.html
1230
1231         * CMakeLists.txt: Adding ReadableStreamReader files.
1232         * DerivedSources.cpp: Ditto.
1233         * DerivedSources.make: Ditto.
1234         * Modules/streams/ReadableStream.cpp:
1235         (WebCore::ReadableStream::createReader): Used by JS binding to get access to the reader.
1236         * Modules/streams/ReadableStream.h: Declaration of createReader, reader and lock.
1237         (WebCore::ReadableStream::reader):
1238         (WebCore::ReadableStream::lock):
1239         * Modules/streams/ReadableStream.idl: Cleaning-up the IDL.
1240         * Modules/streams/ReadableStreamReader.cpp: Added.
1241         (WebCore::ReadableStreamReader::create):
1242         (WebCore::ReadableStreamReader::ReadableStreamReader):
1243         (WebCore::ReadableStreamReader::~ReadableStreamReader):
1244         (WebCore::ReadableStreamReader::closed):
1245         (WebCore::ReadableStreamReader::activeDOMObjectName):
1246         (WebCore::ReadableStreamReader::canSuspend):
1247         * Modules/streams/ReadableStreamReader.h: Added.
1248         (WebCore::ReadableStreamReader::stream):
1249         * Modules/streams/ReadableStreamReader.idl: Added.
1250         * WebCore.vcxproj/WebCore.vcxproj:
1251         * WebCore.vcxproj/WebCore.vcxproj.filters:
1252         * WebCore.xcodeproj/project.pbxproj:
1253         * bindings/js/JSBindingsAllInOne.cpp:
1254         * bindings/js/JSReadableStreamCustom.cpp:
1255         (WebCore::JSReadableStream::getReader):
1256         * bindings/js/JSReadableStreamReaderCustom.cpp: Added.
1257         (WebCore::JSReadableStreamReader::read):
1258         (WebCore::getOrCreatePromiseDeferredFromObject):
1259         (WebCore::closedPromiseSlotName):
1260         (WebCore::JSReadableStreamReader::closed):
1261         (WebCore::JSReadableStreamReader::cancel):
1262         (WebCore::JSReadableStreamReader::releaseLock):
1263         (WebCore::constructJSReadableStreamReader):
1264
1265 2015-03-31  Carlos Garcia Campos  <cgarcia@igalia.com>
1266
1267         [GTK] DnD icon/widget has odd background
1268         https://bugs.webkit.org/show_bug.cgi?id=143217
1269
1270         Reviewed by Martin Robinson.
1271
1272         Remove DragIcon class since it's no longer needed with GTK+3 and
1273         the GTK+2 code there is unused. GTK+ knows what to do with a cairo
1274         surface, I guess we migrated the GTK+2 code to GTK+3 without
1275         realizing that using the surface was enough.
1276
1277         * PlatformGTK.cmake:
1278         * platform/gtk/DragIcon.cpp: Removed.
1279         * platform/gtk/DragIcon.h: Removed.
1280
1281 2015-03-30  Alex Christensen  <achristensen@webkit.org>
1282
1283         Unreviewed build fix after r182168.
1284
1285         * contentextensions/ContentExtensionsBackend.cpp:
1286         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1287         Explicitly cast to unsigned.
1288
1289 2015-03-30  Alex Christensen  <achristensen@webkit.org>
1290
1291         [Content Extensions] Correctly handle regular expressions matching everything
1292         https://bugs.webkit.org/show_bug.cgi?id=143235
1293
1294         Reviewed by Benjamin Poulain.
1295
1296         Test: http/tests/contentextensions/whitelist.html
1297
1298         * contentextensions/CompiledContentExtension.cpp:
1299         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
1300         Global actions can have non-css actions.  Only put the selectors into the list of selectors.
1301         * contentextensions/ContentExtensionCompiler.cpp:
1302         (WebCore::ContentExtensions::serializeSelector):
1303         (WebCore::ContentExtensions::serializeActions):
1304         Merge sequential css selectors with identical triggers (usually .*) into one action to reduce the number of actions.
1305         (WebCore::ContentExtensions::compileRuleList):
1306         Fail if a regular expression matches everything after ignore-previous-rules.
1307         * contentextensions/ContentExtensionError.cpp:
1308         (WebCore::ContentExtensions::contentExtensionErrorCategory):
1309         * contentextensions/ContentExtensionError.h:
1310         Add more failure cases.
1311         * contentextensions/ContentExtensionRule.h:
1312         (WebCore::ContentExtensions::Trigger::operator==):
1313         Allow comparing of Triggers to determine if sequential triggers are equal.
1314         * contentextensions/ContentExtensionsBackend.cpp:
1315         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1316         Put non-css actions that match everything into the list of actions if ignore-previous-rules was not hit.
1317         These actions will be out of order, but order only matters when determining if ignore-previous-rules, and this case is handled correctly.
1318         * contentextensions/DFABytecodeInterpreter.cpp:
1319         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1320         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1321         Added an assertion that all actions that match everything should be in the first DFA root.
1322         We should catch them all with URLFilterParser::MatchesEverything.
1323
1324 2015-03-30  Myles C. Maxfield  <mmaxfield@apple.com>
1325
1326         Allow building on Windows without Cygwin
1327         https://bugs.webkit.org/show_bug.cgi?id=143219
1328
1329         Reviewed by Brent Fulgham.
1330
1331         * AVFoundationSupport.py: Renamed from Source/WebCore/WebCore.vcxproj/MigrateScripts.
1332         Move logic from DerivedSources.make to its own script
1333         (lookFor):
1334         * DerivedSources.make: Paths like /usr/bin don't exist on Windows.
1335         Windows uses del instead of rm -f
1336         Windows doesn't have printf
1337         * WebCore.vcxproj/WebCoreGenerated.make: Pass the CC executable to
1338         build-generated-files.pl
1339         * WebCore.vcxproj/build-generated-files.pl: Export the CC executable as an environment
1340         variable. Don't use /usr/bin.
1341         * WebCore.vcxproj/migrate-scripts.pl: Deleted the MigrateScripts makefile. We don't
1342         need a whole Makefile just to copy 5 files. Moved this logic into migrate-scripts.pl.
1343         (copyFile):
1344         * bindings/scripts/preprocessor.pm:
1345         (applyPreprocessor): Support passing preprocessing flags to the Visual Studio
1346         compiler.
1347         * dom/make_names.pl: Ditto.
1348
1349 2015-03-30  Alexey Proskuryakov  <ap@apple.com>
1350
1351         Build fix.
1352
1353         * platform/spi/mac/AVFoundationSPI.h:
1354
1355 2015-03-30  Sam Weinig  <sam@webkit.org>
1356
1357         [Content Extensions] Flesh out the UserContentExtensionStore
1358         https://bugs.webkit.org/show_bug.cgi?id=143123
1359
1360         Reviewed by Benjamin Poulain.
1361
1362         - Adds a variant of getFileSize() that takes a PlatformFileHandle.
1363         - Adds a new file system function, rename() which operates as the POSIX
1364           rename function does.
1365
1366         * platform/FileSystem.h:
1367         Add new functions.
1368
1369         * platform/posix/FileSystemPOSIX.cpp:
1370         (WebCore::renameFile):
1371         (WebCore::getFileSize):
1372         Add implementations.
1373
1374         * platform/gtk/FileSystemGtk.cpp:
1375         (WebCore::renameFile):
1376         (WebCore::getFileSize):
1377         * platform/win/FileSystemWin.cpp:
1378         (WebCore::getFileSize):
1379         (WebCore::renameFile):
1380         Add stubs.
1381
1382 2015-03-30  Per Arne Vollan  <peavo@outlook.com>
1383
1384         [WinCairo] Crash when closing window while video is loading
1385         https://bugs.webkit.org/show_bug.cgi?id=143088
1386
1387         Reviewed by Mark Lam.
1388
1389         When the media player is destroyed, we have to cancel possible calls on the
1390         main thread made by a worker thread. Otherwise the destroyed media player
1391         will be accessed when performing the call.
1392
1393         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1394         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
1395         (WebCore::MediaPlayerPrivateMediaFoundation::endCreatedMediaSource):
1396         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
1397         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
1398         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSourceCallback):
1399         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySetCallback):
1400         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1401
1402 2015-03-30  Gwang Yoon Hwang  <yoon@igalia.com>
1403
1404         [Threaded Compositor] Crash when animation changes frequently.
1405         https://bugs.webkit.org/show_bug.cgi?id=143213
1406
1407         Reviewed by Simon Fraser.
1408
1409         CompositingCoordinator copies CoordinatedGraphicsLayerState when
1410         flushing GraphicsLayer changes, and ThreadedCoordinatedCompositor passes
1411         it to compositing thread.
1412
1413         To ensure thread-safety, we need to provide copy constructor to copy
1414         Animation object in TextureMapperAnimation instead of referencing it.
1415
1416         Since TimingFunction and TransformOperation used by KeyframeValueList are
1417         not ThreadSafeRefCounted, these should be cloned also.
1418
1419         No new tests needed.
1420
1421         * platform/graphics/GraphicsLayer.h:
1422         (WebCore::AnimationValue::AnimationValue):
1423         (WebCore::FloatAnimationValue::FloatAnimationValue):
1424         (WebCore::TransformAnimationValue::TransformAnimationValue):
1425         (WebCore::FilterAnimationValue::FilterAnimationValue):
1426         Adds deep copy constructor.
1427
1428         * platform/graphics/texmap/TextureMapperAnimation.cpp:
1429         (WebCore::TextureMapperAnimation::TextureMapperAnimation):
1430         Because the name of the animation can be AtomicString, we need to create
1431         isolated version of string to ensure thread safty.
1432
1433         * platform/graphics/texmap/TextureMapperAnimation.h:
1434         * platform/graphics/transforms/IdentityTransformOperation.h:
1435         * platform/graphics/transforms/Matrix3DTransformOperation.h:
1436         * platform/graphics/transforms/MatrixTransformOperation.h:
1437         * platform/graphics/transforms/PerspectiveTransformOperation.h:
1438         * platform/graphics/transforms/RotateTransformOperation.h:
1439         * platform/graphics/transforms/ScaleTransformOperation.h:
1440         * platform/graphics/transforms/SkewTransformOperation.h:
1441         * platform/graphics/transforms/TransformOperation.h:
1442         * platform/graphics/transforms/TranslateTransformOperation.h:
1443         Adds TransformOperation::clone() for threadsafety.
1444
1445 2015-03-30  Chris Dumez  <cdumez@apple.com>
1446
1447         Cached "Expires" header is not updated upon successful resource revalidation
1448         https://bugs.webkit.org/show_bug.cgi?id=143228
1449         <rdar://problem/20348059>
1450
1451         Reviewed by Antti Koivisto.
1452
1453         Cached "Expires" header was not updated upon successful resource
1454         revalidation. This affected both our disk cache and our memory cache.
1455         This was caused by shouldUpdateHeaderAfterRevalidation() in
1456         CacheValidation.cpp returning false for the "Expires" header.
1457
1458         There is a comment there stating that the list of ignored headers
1459         matches Chromium's net library but that's not the case, at least not
1460         anymore:
1461         http://osxr.org/android/source/external/chromium/net/http/http_response_headers.cc
1462
1463         HTTP servers such as Apache return an "Expires" header in their 304
1464         responses and the "Expires" header is potentially a new one. However,
1465         our caches were ignoring the updated expiration date and kept using the
1466         old one, which meant that the cached resource expired sooner than it
1467         should have.
1468
1469         See the following Apache bugs that explain the issue:
1470         https://bz.apache.org/bugzilla/show_bug.cgi?id=24884
1471         https://bz.apache.org/bugzilla/show_bug.cgi?id=25123
1472
1473         Test: http/tests/cache/disk-cache/disk-cache-revalidation-new-expire-header.html
1474
1475         * platform/network/CacheValidation.cpp:
1476
1477 2015-03-30  Antti Koivisto  <antti@apple.com>
1478
1479         Don't cache resources that are very unlikely to be reused
1480         https://bugs.webkit.org/show_bug.cgi?id=143226
1481         <rdar://problem/20347160>
1482
1483         Reviewed by Geoff Garen.
1484
1485         Allow overriding resource load priorities via Internals for testing.
1486
1487         * loader/FrameLoader.cpp:
1488         (WebCore::FrameLoader::addExtraFieldsToRequest):
1489         (WebCore::FrameLoader::clearTestingOverrides):
1490         * loader/FrameLoader.h:
1491         (WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting):
1492         (WebCore::FrameLoader::clearOverrideCachePolicyForTesting): Deleted.
1493         * page/DiagnosticLoggingKeys.cpp:
1494         (WebCore::DiagnosticLoggingKeys::unlikelyToReuseKey):
1495         * page/DiagnosticLoggingKeys.h:
1496
1497             Add a key.
1498
1499         * testing/Internals.cpp:
1500         (WebCore::Internals::resetToConsistentState):
1501         (WebCore::stringToResourceLoadPriority):
1502         (WebCore::Internals::setOverrideResourceLoadPriority):
1503         * testing/Internals.h:
1504         * testing/Internals.idl:
1505
1506 2015-03-30  Javier Fernandez  <jfernandez@igalia.com>
1507
1508         [CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
1509         https://bugs.webkit.org/show_bug.cgi?id=133359
1510
1511         Reviewed by David Hyatt.
1512
1513         From Blink r164817 and r165264 by <jchaffraix@chromium.org>
1514
1515         Broaden justify-self's parsing name
1516
1517         This is in preparation of migrating align-self, align-items
1518         and justify-items to the CSS 3 Alignment syntax.
1519
1520         The current naming was too tied to justify-self and needs to
1521         be broadened. This will reduce the follow-up implementations'
1522         patches.
1523
1524         Upgrade align-self and align-items parsing to CSS 3
1525
1526         This change migrates the 2 properties to the CSS 3 Alignment
1527         parsing. The new parsing is identical to how we parse
1528         'justify-self'. The 2 properties need to be migrated together
1529         as they are used in tandem in CSSComputedStyleDeclaration.
1530
1531         This change also removes EAlignItems as it is now unused.
1532
1533         Tests: css3/parse-align-items.html
1534                css3/parse-align-self.html
1535
1536         * css/CSSComputedStyleDeclaration.cpp:
1537         (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties.
1538         (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
1539         (WebCore::ComputedStyleExtractor::propertyValue):
1540         * css/CSSParser.cpp:
1541          (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items.
1542         (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items.
1543         (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value.
1544         (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
1545         (WebCore::CSSParser::parseJustifySelf): Deleted.
1546         (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
1547         * css/CSSParser.h:
1548         * css/CSSPrimitiveValueMappings.h:
1549         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added.
1550         (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
1551         (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
1552         (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
1553         (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
1554         (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
1555         * css/CSSPropertyNames.in:
1556         * css/CSSValueKeywords.in:
1557         * css/StyleBuilderCustom.h:
1558         (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added.
1559         (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added.
1560         (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added.
1561         (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added.
1562         (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added.
1563         (WebCore::StyleBuilderCustom::applyValueAlignItems): Added.
1564         (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added.
1565         (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added.
1566         (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added.
1567         (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted.
1568         * css/StyleResolver.cpp:
1569         (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function.
1570         (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle.
1571         (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle.
1572         (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle.
1573         * rendering/RenderBox.cpp:
1574         (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum.
1575         * rendering/RenderFlexibleBox.cpp:
1576         (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum.
1577         (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum.
1578         (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum.
1579         (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum.
1580         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum.
1581         (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum.
1582         (WebCore::resolveAlignment): Deleted. Moved to RenderStyle.
1583         * rendering/RenderFlexibleBox.h:
1584         * rendering/RenderFullScreen.cpp:
1585         (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum.
1586         * rendering/RenderMenuList.cpp:
1587         (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum.
1588         * rendering/mathml/RenderMathMLRoot.cpp:
1589         (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum.
1590         * rendering/mathml/RenderMathMLScripts.cpp:
1591         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum.
1592         (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum.
1593         * rendering/style/ContentData.h:
1594         * rendering/style/RenderStyle.cpp:
1595         (WebCore::RenderStyle::resolveAlignment): Added.
1596         * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum.
1597         * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum.
1598         * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum.
1599         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum.
1600         (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum.
1601         * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum.
1602         * style/StyleResolveTree.cpp:
1603         (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach.
1604
1605 2015-03-27  David Hyatt  <hyatt@apple.com>
1606
1607         [New Block-Inside-Inline Model] Create anonymous inline blocks to hold blocks-inside-inlines.
1608         https://bugs.webkit.org/show_bug.cgi?id=143145
1609
1610         Reviewed by Dean Jackson.
1611
1612         Added fast/block/inside-inlines/ tests.
1613
1614         * rendering/RenderBlock.cpp:
1615         (WebCore::RenderBlock::renderName):
1616         Add support for labeling anonymous inline-blocks when dumped by the render tree.
1617
1618         * rendering/RenderInline.cpp:
1619         (WebCore::RenderInline::addChildIgnoringContinuation):
1620         When the pref is set to use the new block-inside-inline model, create an anonymous inline block to
1621         hold block children of RenderInlines instead of splitting flows or creating continuations.
1622
1623         * rendering/RenderObject.h:
1624         (WebCore::RenderObject::isAnonymousInlineBlock):
1625         Add the definition of isAnonymousInlineBlock (note the exclusion of Ruby, since Ruby creates anonymous
1626         inline-blocks also).
1627
1628 2015-03-30  Chris Dumez  <cdumez@apple.com>
1629
1630         [WK2][NetworkCache] Add support for "Cache-Control: max-stale" request header
1631         https://bugs.webkit.org/show_bug.cgi?id=143159
1632         <rdar://problem/20333296>
1633
1634         Reviewed by Antti Koivisto.
1635
1636         Add support for "Cache-Control: max-stale" request header:
1637         https://tools.ietf.org/html/rfc7234#section-5.2.1.2
1638
1639         Test: http/tests/cache/disk-cache/disk-cache-request-max-stale.html
1640
1641         * platform/network/CacheValidation.cpp:
1642         (WebCore::parseCacheControlDirectives):
1643         * platform/network/CacheValidation.h:
1644
1645 2015-03-30  Simon Fraser  <simon.fraser@apple.com>
1646
1647         Fix iOS internal build after r182132.
1648
1649         * page/scrolling/ScrollingCoordinator.cpp:
1650         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
1651
1652 2015-03-30  Jer Noble  <jer.noble@apple.com>
1653
1654         [iOS] When Web Audio is interrupted by a phone call, it cannot be restarted.
1655         https://bugs.webkit.org/show_bug.cgi?id=143190
1656
1657         Reviewed by Darin Adler.
1658
1659         Tests: webaudio/audiocontext-state-interrupted.html
1660                webaudio/audiocontext-state.html
1661
1662         Implement the following methods and properties from the Web Audio spec:
1663         close(), suspend(), resume(), onstatechange.
1664
1665         AudioContext will take more responsibility for tracking state and interruptions (and
1666         AudioDestination will give up that responsibility). This means AudioContext must be a
1667         MediaSessionClient, and own its own MediaSession. In return, AudioDestinationIOS and 
1668         AudioDestinationMac relinquish both.
1669
1670         * Modules/webaudio/AudioContext.cpp:
1671         (WebCore::AudioContext::AudioContext): Set default values in header.
1672         (WebCore::AudioContext::uninitialize): Call setState() instead of setting m_state.
1673         (WebCore::AudioContext::addReaction): Added. Append the callback to the appropriate vector for the state.
1674         (WebCore::AudioContext::setState): Added. Fire events and resolve the appropriate reaction callbacks for the new state.
1675         (WebCore::AudioContext::state): Return a string representing the context's state.
1676         (WebCore::AudioContext::stop): Close the event queue.
1677         (WebCore::AudioContext::startRendering): Call setState().
1678         (WebCore::AudioContext::fireCompletionEvent): Call setState().
1679         (WebCore::AudioContext::suspendContext): Added. Add reaction callback and call suspend() on the destination node.
1680         (WebCore::AudioContext::resumeContext): Added. Add reaction callback and call resume() on the destination node.
1681         (WebCore::AudioContext::closeContext): Added. Add reaction callback and call close() on the destination node.
1682         (WebCore::AudioContext::suspendPlayback): Added. Suspend playback and set state to interrupted.
1683         (WebCore::AudioContext::mayResumePlayback): Added. Conditionally resume playback.
1684         * bindings/js/JSAudioContextCustom.cpp:
1685         (WebCore::JSAudioContext::suspend): Added. Create and return a new Promise object.
1686         (WebCore::JSAudioContext::resume): Ditto.
1687         (WebCore::JSAudioContext::close): Ditto.
1688         * Modules/webaudio/AudioContext.idl: Add new methods and properties.
1689
1690         Extensive organizational changes were made to AudioContext.h to group instance
1691         variables together and add C++11 initializers in their declarations:
1692
1693         * Modules/webaudio/AudioContext.h:
1694         (WebCore::AudioContext::mediaType): Moved from AudioDestinationNode.
1695         (WebCore::AudioContext::presentationType): Ditto.
1696         (WebCore::AudioContext::canReceiveRemoteControlCommands): Ditto.
1697         (WebCore::AudioContext::didReceiveRemoteControlCommand): Ditto.
1698         (WebCore::AudioContext::overrideBackgroundPlaybackRestriction): Ditto.
1699         
1700         Other changes to support the new AudioContext methods:
1701
1702         * Modules/webaudio/AudioDestinationNode.h:
1703         (WebCore::AudioDestinationNode::resume): Add empty default virtual method.
1704         (WebCore::AudioDestinationNode::suspend): Ditto.
1705         (WebCore::AudioDestinationNode::close): Ditto.
1706         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
1707         (WebCore::DefaultAudioDestinationNode::resume): Added. Pass to AudioDestination.
1708         (WebCore::DefaultAudioDestinationNode::suspend): Ditto.
1709         (WebCore::DefaultAudioDestinationNode::close): Ditto.
1710         * Modules/webaudio/DefaultAudioDestinationNode.h:
1711         * bindings/js/JSDOMPromise.h:
1712         (WebCore::DeferredWrapper::resolve): Add an overload for a nullptr resolve value.
1713         * dom/EventNames.h: Added 'statechange'.
1714         * dom/ScriptExecutionContext.h:
1715         (WebCore::ScriptExecutionContext::Task::Task): Add a constructor which takes a void() callback.
1716
1717         Modify MediaSession, AudioSession, and MediaSessionManager to support the new
1718         interruption behavior.
1719
1720         * html/HTMLMediaElement.cpp:
1721         (WebCore::HTMLMediaElement::suspendPlayback): Renamed from pausePlayback().
1722         (WebCore::HTMLMediaElement::mayResumePlayback): Renamed from resumePlayback().
1723         * html/HTMLMediaElement.h:
1724         * platform/audio/AudioSession.cpp:
1725         (WebCore::AudioSession::tryToSetActive): Renamed from setActive. Return true by default.
1726         (WebCore::AudioSession::setActive): Deleted.
1727         * platform/audio/AudioSession.h:
1728         * platform/audio/MediaSession.cpp:
1729         (WebCore::MediaSession::beginInterruption): pausePlayback() was renamed to suspendPlayback().
1730         (WebCore::MediaSession::endInterruption): Always notify the client, telling it whether to resume.
1731         (WebCore::MediaSession::clientWillBeginPlayback): Bail early if reentrant.  Check the (new) 
1732             return value of sessionWillBeginPlayback() and remember to resume once the interruption ends.
1733         (WebCore::MediaSession::clientWillPausePlayback): Bail early if reentrant.
1734         (WebCore::MediaSession::pauseSession): pausePlayback() was renamed to suspendPlayback().
1735         * platform/audio/MediaSession.h:
1736         * platform/audio/MediaSessionManager.cpp:
1737         (WebCore::MediaSessionManager::sessionWillBeginPlayback): Return false if not allowed to break interruption or 
1738             if activating the audio session failed. Otherwise, end the interruption.
1739         * platform/audio/MediaSessionManager.h:
1740         * platform/audio/ios/AudioDestinationIOS.cpp:
1741         (WebCore::AudioDestinationIOS::AudioDestinationIOS): m_mediaSession was removed.
1742         (WebCore::AudioDestinationIOS::start): Ditto.
1743         * platform/audio/ios/AudioDestinationIOS.h:
1744         * platform/audio/ios/AudioSessionIOS.mm:
1745         (WebCore::AudioSession::tryToSetActive): Renamed from setActive. Return false if the AVAudioSession could not be activated.
1746         (WebCore::AudioSession::setActive): Deleted.
1747         * platform/audio/ios/MediaSessionManagerIOS.h:
1748         * platform/audio/ios/MediaSessionManagerIOS.mm:
1749         (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Do not update the now playing info if session playback was blocked.
1750         * platform/audio/mac/AudioDestinationMac.cpp:
1751         (WebCore::AudioDestinationMac::AudioDestinationMac): m_mediaSession was removed.
1752         * platform/audio/mac/AudioDestinationMac.h:
1753         * platform/audio/mac/AudioSessionMac.cpp:
1754         (WebCore::AudioSession::tryToSetActive): Renamed from setActive(). Return true by default.
1755         (WebCore::AudioSession::setActive): Deleted.
1756         * platform/audio/mac/MediaSessionManagerMac.cpp:
1757         (MediaSessionManager::updateSessionState): No longer attempt to activate the session, as this is done
1758             MediaSessionManager::sessionWillBeginPlayback().
1759         * testing/Internals.cpp:
1760         (WebCore::Internals::setMediaSessionRestrictions): Add "InterruptedPlaybackNotPermitted".
1761
1762 2015-03-25 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1763
1764         [Streams API] Error storage should be moved from source to stream/reader
1765         https://bugs.webkit.org/show_bug.cgi?id=143048
1766
1767         Reviewed by Benjamin Poulain.
1768
1769         This patch removes error storage from the source as it should be stored at the stream level as error access goes through the reader.
1770         It removes abstract ReadableStreamSource::isErrored and the storage of JavaScript errors from ReadableStreamJSSource.
1771
1772         Existing tests cover most of the changes.
1773         Added test case for creating readable stream from empty JS object.
1774
1775         * Modules/streams/ReadableStreamSource.h: Removing isErrored().
1776         * bindings/js/JSReadableStreamCustom.cpp:
1777         (WebCore::constructJSReadableStream): Added JS stream constructor parameters checking.
1778         * bindings/js/ReadableStreamJSSource.cpp:
1779         (WebCore::ReadableStreamJSSource::ReadableStreamJSSource): Removed JS stream constructor parameters checking.
1780         (WebCore::ReadableStreamJSSource::start): Changed prototype of start so that start can throw errors directly.
1781         (WebCore::ReadableStreamJSSource::setInternalError): Deleted.
1782         * bindings/js/ReadableStreamJSSource.h: Removed m_error, setInternalError and updated start declaration.
1783
1784 2015-03-30  Philippe Normand  <pnormand@igalia.com>
1785
1786         [GStreamer] More GL shared context fixes
1787         https://bugs.webkit.org/show_bug.cgi?id=143216
1788
1789         Reviewed by Carlos Garcia Campos.
1790
1791         Moved the GLX/EGL context tests to be done at runtime rather than
1792         using build-time macros because in the GTK port at least, both EGL
1793         and GLX support are mutually exclusive. Also fixed a couple wrong
1794         defines (USE(GLES2) doesn't exist).
1795
1796         * platform/graphics/GLContext.h: Simple utility method to check if
1797         the platform context is compatible with EGL APIs or not.
1798         * platform/graphics/egl/GLContextEGL.h:
1799         (WebCore::GLContextEGL::isEGLContext):
1800         * platform/graphics/glx/GLContextGLX.h:
1801         (WebCore::GLContextGLX::isEGLContext):
1802         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1803         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): Do
1804         runtime checks and properly ensure GLES2/GL API usage.
1805
1806 2015-03-30  Marcos Chavarría Teijeiro  <chavarria1991@gmail.com>
1807
1808         Add support for deleting emoji on GTK
1809         https://bugs.webkit.org/show_bug.cgi?id=141419
1810
1811         Reviewed by Gustavo Noronha Silva.
1812
1813         The code for deleting special group of characters was specific for
1814         COCOA and EFL platforms. The fix consists on add GTK to the #if
1815         preprocessor directive.
1816
1817         * rendering/RenderText.cpp:
1818         (WebCore::RenderText::previousOffsetForBackwardDeletion):
1819
1820 2015-03-30  Benjamin Poulain  <benjamin@webkit.org>
1821
1822         Start the features.json files
1823         https://bugs.webkit.org/show_bug.cgi?id=143207
1824
1825         Reviewed by Darin Adler.
1826
1827         * features.json: Added.
1828
1829 2015-03-29  Simon Fraser  <simon.fraser@apple.com>
1830
1831         Convert arguments to ScrollingCoordinator functions to references
1832         https://bugs.webkit.org/show_bug.cgi?id=143198
1833
1834         Reviewed by Darin Adler.
1835
1836         Convert all the FrameView* and ScrollableArea* arguments to ScrollingCoordinator functions to
1837         references, and use references in a few other places.
1838
1839         * dom/Document.cpp:
1840         (WebCore::wheelEventHandlerCountChanged):
1841         * loader/HistoryController.cpp:
1842         (WebCore::HistoryController::restoreScrollPositionAndViewState):
1843         * page/DebugPageOverlays.cpp:
1844         (WebCore::NonFastScrollableRegionOverlay::updateRegion):
1845         * page/Frame.cpp:
1846         (WebCore::Frame::willDetachPage):
1847         * page/FrameView.cpp:
1848         (WebCore::FrameView::prepareForDetach):
1849         (WebCore::FrameView::addSlowRepaintObject):
1850         (WebCore::FrameView::removeSlowRepaintObject):
1851         (WebCore::FrameView::addViewportConstrainedObject):
1852         (WebCore::FrameView::removeViewportConstrainedObject):
1853         (WebCore::FrameView::requestScrollPositionUpdate):
1854         (WebCore::FrameView::performPostLayoutTasks):
1855         (WebCore::FrameView::scrollableAreaSetChanged):
1856         (WebCore::FrameView::wheelEvent):
1857         * page/Page.cpp:
1858         (WebCore::Page::nonFastScrollableRects):
1859         * page/Page.h:
1860         * page/scrolling/AsyncScrollingCoordinator.cpp:
1861         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1862         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
1863         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
1864         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
1865         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
1866         (WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
1867         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
1868         (WebCore::AsyncScrollingCoordinator::updateMainFrameScrollLayerPosition):
1869         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
1870         * page/scrolling/AsyncScrollingCoordinator.h:
1871         * page/scrolling/ScrollingCoordinator.cpp:
1872         (WebCore::ScrollingCoordinator::pageDestroyed):
1873         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
1874         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
1875         (WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged):
1876         (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
1877         (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
1878         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea):
1879         (WebCore::ScrollingCoordinator::scrollLayerForFrameView):
1880         (WebCore::ScrollingCoordinator::headerLayerForFrameView):
1881         (WebCore::ScrollingCoordinator::footerLayerForFrameView):
1882         (WebCore::ScrollingCoordinator::counterScrollingLayerForFrameView):
1883         (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
1884         (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
1885         (WebCore::ScrollingCoordinator::rootContentLayerForFrameView):
1886         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
1887         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
1888         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
1889         (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
1890         (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
1891         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
1892         (WebCore::ScrollingCoordinator::replaySessionStateDidChange):
1893         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
1894         * page/scrolling/ScrollingCoordinator.h: Align the bitmask enums to make mistakes easier to spot.
1895         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
1896         (WebCore::ScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
1897         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
1898         (WebCore::ScrollingCoordinator::handleWheelEvent):
1899         (WebCore::ScrollingCoordinator::willDestroyScrollableArea):
1900         (WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
1901         (WebCore::ScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
1902         (WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
1903         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
1904         (WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange):
1905         (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
1906         (WebCore::ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate):
1907         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
1908         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
1909         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1910         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1911         (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
1912         * rendering/RenderLayer.cpp:
1913         (WebCore::RenderLayer::~RenderLayer):
1914         * rendering/RenderLayerBacking.cpp:
1915         (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
1916         * rendering/RenderLayerCompositor.cpp:
1917         (WebCore::RenderLayerCompositor::updateBacking):
1918         (WebCore::RenderLayerCompositor::hasCoordinatedScrolling):
1919         (WebCore::RenderLayerCompositor::scrollingLayerDidChange):
1920         (WebCore::RenderLayerCompositor::updateLayerForHeader):
1921         (WebCore::RenderLayerCompositor::updateLayerForFooter):
1922         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1923         (WebCore::RenderLayerCompositor::destroyRootLayer):
1924         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
1925         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1926         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
1927         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
1928         * testing/Internals.cpp:
1929         (WebCore::Internals::nonFastScrollableRects):
1930
1931 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
1932
1933         Use :matches() instead of :-webkit-any() for the sections and headings default style
1934         https://bugs.webkit.org/show_bug.cgi?id=143197
1935
1936         Reviewed by Darin Adler.
1937
1938         We no longer need to use the :-webkit-any() hack in the default stylesheet.
1939
1940         The pseudo class :matches() also support correct specificity. This is not observable
1941         since those selector do not conflict with any other rule in the default stylesheet.
1942
1943         * css/CSSSelector.h:
1944         * css/SelectorChecker.cpp:
1945         (WebCore::SelectorChecker::determineLinkMatchType):
1946         * css/html.css:
1947         (:matches(article, aside, nav, section) h1):
1948         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1949         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1950         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1951         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
1952         (:-webkit-any(article,aside,nav,section) h1): Deleted.
1953         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1954         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1955         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1956         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
1957
1958 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
1959
1960         `currentColor` computes to the same colour on all elements, even if 'color' is inherited differently
1961         https://bugs.webkit.org/show_bug.cgi?id=133420
1962
1963         Reviewed by Darin Adler.
1964
1965         When resolving a style with the help of the property cache, we were
1966         completely ignoring currentColor.
1967
1968         Since you can set currentColor on properties that are not inherited,
1969         those properties would just be copied from the cached style, which
1970         may have a completely different inherited color.
1971
1972         This pacth fixes the issue by preventing any MatchResult from hitting
1973         the cache if it contains any non-inherited property that would require
1974         resolution by the cache:
1975         -Using the inherit value.
1976         -Using the currentColor value.
1977
1978         Tests: fast/css/currentColor-on-before-after-pseudo-elements.html
1979                fast/css/currentColor-style-update-reftest.html
1980                fast/css/currentColor-value-style-update.html
1981
1982         * css/ElementRuleCollector.cpp:
1983         (WebCore::ElementRuleCollector::addElementStyleProperties):
1984         (WebCore::ElementRuleCollector::matchAuthorRules):
1985         (WebCore::ElementRuleCollector::matchUserRules):
1986         (WebCore::ElementRuleCollector::matchUARules):
1987         * css/StyleResolver.cpp:
1988         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
1989         (WebCore::StyleResolver::styleForKeyframe):
1990         (WebCore::StyleResolver::pseudoStyleForElement):
1991         (WebCore::StyleResolver::styleForPage):
1992         (WebCore::StyleResolver::findFromMatchedPropertiesCache):
1993         (WebCore::StyleResolver::addToMatchedPropertiesCache):
1994         (WebCore::extractDirectionAndWritingMode):
1995         (WebCore::StyleResolver::applyMatchedProperties):
1996         (WebCore::StyleResolver::CascadedProperties::addStyleProperties):
1997         (WebCore::StyleResolver::CascadedProperties::addMatches):
1998         * css/StyleResolver.h:
1999         (WebCore::StyleResolver::MatchResult::matchedProperties):
2000
2001 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
2002
2003         Enable :any-link by default
2004         https://bugs.webkit.org/show_bug.cgi?id=143201
2005
2006         Reviewed by Sam Weinig.
2007
2008         The pseudo class :any-link has been stable for a while. This patch enables
2009         it by default and remove the -webkit- prefix on the default style.
2010
2011         * css/CSSDefaultStyleSheets.cpp:
2012         * css/CSSSelector.cpp:
2013         (WebCore::CSSSelector::selectorText):
2014         * css/CSSSelector.h:
2015         * css/RuleSet.cpp:
2016         (WebCore::RuleSet::addRule):
2017         * css/SelectorChecker.cpp:
2018         (WebCore::SelectorChecker::checkOne):
2019         * css/SelectorChecker.h:
2020         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
2021         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
2022         * css/html.css:
2023         (a:any-link):
2024         (a:any-link:active):
2025         (:any-link img):
2026         (a:-webkit-any-link): Deleted.
2027         (a:-webkit-any-link:active): Deleted.
2028         (:-webkit-any-link img): Deleted.
2029         * cssjit/SelectorCompiler.cpp:
2030         (WebCore::SelectorCompiler::addPseudoClassType):
2031         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
2032
2033 2015-03-29  Joonghun Park  <jh718.park@samsung.com>
2034
2035         nullptr cleanup in RenderFooBox classes
2036         https://bugs.webkit.org/show_bug.cgi?id=143182
2037
2038         Reviewed by Ryosuke Niwa.
2039
2040         No new tests, no behavior changes
2041
2042         Replace 0 with nullptr in RenderFooBox classes.
2043
2044         * rendering/RenderBox.cpp:
2045         (WebCore::RenderBox::RenderBox):
2046         (WebCore::RenderBox::paintFillLayer):
2047         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2048         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
2049         (WebCore::RenderBox::renderBoxRegionInfo):
2050         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2051         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2052         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
2053         (WebCore::RenderBox::positionForPoint):
2054         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2055         * rendering/RenderBox.h:
2056         (WebCore::RenderBox::setMarginBefore):
2057         (WebCore::RenderBox::setMarginAfter):
2058         (WebCore::RenderBox::setMarginStart):
2059         (WebCore::RenderBox::setMarginEnd):
2060         (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
2061         (WebCore::RenderBox::setInlineBoxWrapper):
2062         * rendering/RenderBoxModelObject.cpp:
2063         (WebCore::RenderBoxModelObject::willBeDestroyed):
2064         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
2065         (WebCore::RenderBoxModelObject::paintBorderSides):
2066         (WebCore::RenderBoxModelObject::firstLetterRemainingText):
2067         * rendering/RenderBoxModelObject.h:
2068         (WebCore::RenderBoxModelObject::moveChildTo):
2069         (WebCore::RenderBoxModelObject::moveAllChildrenTo):
2070         (WebCore::RenderBoxModelObject::moveChildrenTo):
2071         * rendering/RenderDeprecatedFlexibleBox.cpp:
2072         (WebCore::FlexBoxIterator::reset):
2073         (WebCore::FlexBoxIterator::next):
2074         * rendering/RenderDeprecatedFlexibleBox.h:
2075         * rendering/RenderFlexibleBox.cpp:
2076         (WebCore::RenderFlexibleBox::firstLineBaseline):
2077         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
2078         * rendering/RenderLineBoxList.cpp:
2079         (WebCore::RenderLineBoxList::deleteLineBoxTree):
2080         (WebCore::RenderLineBoxList::extractLineBox):
2081         (WebCore::RenderLineBoxList::deleteLineBoxes):
2082         (WebCore::RenderLineBoxList::checkConsistency):
2083         * rendering/RenderLineBoxList.h:
2084         (WebCore::RenderLineBoxList::RenderLineBoxList):
2085         * rendering/RenderListBox.cpp:
2086         (WebCore::RenderListBox::enclosingScrollableArea):
2087         (WebCore::RenderListBox::setHasVerticalScrollbar):
2088         * rendering/RenderListBox.h:
2089
2090 2015-03-29  Darin Adler  <darin@apple.com>
2091
2092         HTMLCollection caches incorrect length if item(0) is called before length on an empty collection
2093         https://bugs.webkit.org/show_bug.cgi?id=143203
2094         rdar://problem/18460462
2095
2096         Reviewed by Antti Koivisto.
2097
2098         Test: fast/dom/htmlcollection-length-after-item-2.html
2099
2100         * dom/CollectionIndexCache.h:
2101         (CollectionIndexCache::nodeAt): If we hit the end looking for index 0, cache a length
2102         of 0, not a length of 1.
2103
2104 2015-03-29  Darin Adler  <darin@apple.com>
2105
2106         Remove unneeded SVG code, including most isSupportedAttribute functions
2107         https://bugs.webkit.org/show_bug.cgi?id=143194
2108
2109         Reviewed by Antti Koivisto.
2110
2111         - Removed most implementations of isSupportedAttribute. Others can be removed in
2112           future patches. The ones left behind are now all private static member functions.
2113           It's dangerous for them to be public because they tend to indicate which attributes
2114           are supported at a particular level in the class hierarchy and they are not virtual
2115           functions; might want to rethink the function name if we keep any of these long term.
2116
2117         - Removed unneeded includes, especially of Attr.h and Attribute.h.
2118
2119         - Changed most parseAttribute and svgAttributeChanged functions so they no longer
2120           rely on checking attribute names against a set. Also removed lots of unneeded calls
2121           to SVGLangSpace::parseAttribute, which is called by SVGElement::parseAttribute and
2122           need not be called by derived classes.
2123
2124         - Removed return values from parseAttribute functions. Skipping other parseAttribute
2125           logic is not an important optimization and makes functions needlessly complex.
2126
2127         - Moved use of InstanceInvalidationGuard closer to where they are needed. Eventually
2128           we may be able to remove many of these.
2129
2130         - Used auto in a few places where the same type is repeated twice on the same line of
2131           code, and auto makes it a bit smaller.
2132
2133         - Got rid of protected sections in some final classes; doesn't make sense to combine
2134           these two. Also moved a few functions from protected to private in other classes.
2135
2136         - Made a number of functions into static member functions in the base classes such
2137           as SVGLangSpace; they were not making any use of the object, and so it was wasteful
2138           to compile them as non-static member functions.
2139
2140         * rendering/svg/RenderSVGImage.cpp: Removed unneeded includes.
2141         * svg/SVGAElement.cpp: Removed unneeded includes.
2142         (WebCore::SVGAElement::isSupportedAttribute): Deleted.
2143         (WebCore::SVGAElement::parseAttribute): Don't use isSupportedAttribute.
2144         (WebCore::SVGAElement::svgAttributeChanged): Don't use isSupportedAttribute.
2145         * svg/SVGAElement.h: Removed isSupportedAttribute.
2146         * svg/SVGAnimateMotionElement.cpp: Removed unneeded includes.
2147         (WebCore::SVGAnimateMotionElement::isSupportedAttribute): Deleted.
2148         (WebCore::SVGAnimateMotionElement::parseAttribute): Don't use isSupportedAttribute.
2149         * svg/SVGAnimateMotionElement.h: Removed isSupportedAttribute.
2150         * svg/SVGAnimateTransformElement.cpp:
2151         (WebCore::SVGAnimateTransformElement::isSupportedAttribute): Deleted.
2152         (WebCore::SVGAnimateTransformElement::parseAttribute): Don't use isSupportedAttribute.
2153         * svg/SVGAnimateTransformElement.h: Removed isSupportedAttribute.
2154         * svg/SVGAnimationElement.cpp:
2155         (WebCore::SVGAnimationElement::parseAttribute): Don't use isSupportedAttribute.
2156         * svg/SVGCircleElement.cpp:
2157         (WebCore::SVGCircleElement::isSupportedAttribute): Deleted.
2158         (WebCore::SVGCircleElement::parseAttribute): Don't use isSupportedAttribute.
2159         (WebCore::SVGCircleElement::svgAttributeChanged): Don't use isSupportedAttribute.
2160         * svg/SVGCircleElement.h: Removed isSupportedAttribute.
2161         * svg/SVGClipPathElement.cpp: Removed unneeded includes.
2162         (WebCore::SVGClipPathElement::parseAttribute): Don't use isSupportedAttribute.
2163         * svg/SVGComponentTransferFunctionElement.cpp:
2164         (WebCore::SVGComponentTransferFunctionElement::parseAttribute): Don't use isSupportedAttribute.
2165         * svg/SVGCursorElement.cpp: Removed unneeded includes.
2166         (WebCore::SVGCursorElement::parseAttribute): Don't use isSupportedAttribute.
2167         (WebCore::SVGCursorElement::svgAttributeChanged): Don't use isSupportedAttribute.
2168         * svg/SVGElement.cpp: Removed unneeded includes.
2169         * svg/SVGEllipseElement.cpp: Removed unneeded includes.
2170         (WebCore::SVGEllipseElement::isSupportedAttribute): Deleted.
2171         (WebCore::SVGEllipseElement::parseAttribute): Don't use isSupportedAttribute.
2172         (WebCore::SVGEllipseElement::svgAttributeChanged): Don't use isSupportedAttribute.
2173         * svg/SVGEllipseElement.h: Removed isSupportedAttribute.
2174         * svg/SVGExternalResourcesRequired.cpp: Removed unneeded includes.
2175         (WebCore::SVGExternalResourcesRequired::parseAttribute): Don't return a boolean.
2176         * svg/SVGExternalResourcesRequired.h: Don't return a boolean.
2177         * svg/SVGFEBlendElement.cpp: Removed unneeded includes.
2178         (WebCore::SVGFEBlendElement::isSupportedAttribute): Deleted.
2179         (WebCore::SVGFEBlendElement::parseAttribute): Don't use isSupportedAttribute.
2180         (WebCore::SVGFEBlendElement::svgAttributeChanged): Don't use isSupportedAttribute.
2181         * svg/SVGFEBlendElement.h: Removed isSupportedAttribute.
2182         * svg/SVGFEColorMatrixElement.cpp: Removed unneeded includes.
2183         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute): Deleted.
2184         (WebCore::SVGFEColorMatrixElement::parseAttribute): Don't use isSupportedAttribute.
2185         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
2186         * svg/SVGFEColorMatrixElement.h: Removed isSupportedAttribute.
2187         * svg/SVGFEComponentTransferElement.cpp: Removed unneeded includes.
2188         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute): Deleted.
2189         (WebCore::SVGFEComponentTransferElement::parseAttribute): Don't use isSupportedAttribute.
2190         * svg/SVGFEComponentTransferElement.h: Removed unneeded includes.
2191         * svg/SVGFECompositeElement.cpp: Removed unneeded includes.
2192         (WebCore::SVGFECompositeElement::isSupportedAttribute): Deleted.
2193         (WebCore::SVGFECompositeElement::parseAttribute): Don't use isSupportedAttribute.
2194         (WebCore::SVGFECompositeElement::svgAttributeChanged): Don't use isSupportedAttribute.
2195         * svg/SVGFECompositeElement.h:
2196         * svg/SVGFEConvolveMatrixElement.cpp: Removed unneeded includes.
2197         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute): Deleted.
2198         (WebCore::SVGFEConvolveMatrixElement::parseAttribute): Don't use isSupportedAttribute.
2199         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
2200         * svg/SVGFEConvolveMatrixElement.h:
2201         * svg/SVGFEDiffuseLightingElement.cpp: Removed unneeded includes.
2202         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute): Deleted.
2203         (WebCore::SVGFEDiffuseLightingElement::parseAttribute): Don't use isSupportedAttribute.
2204         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
2205         * svg/SVGFEDiffuseLightingElement.h:
2206         * svg/SVGFEDisplacementMapElement.cpp: Removed unneeded includes.
2207         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute): Deleted.
2208         (WebCore::SVGFEDisplacementMapElement::parseAttribute): Don't use isSupportedAttribute.
2209         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Don't use isSupportedAttribute.
2210         * svg/SVGFEDisplacementMapElement.h:
2211         * svg/SVGFEDropShadowElement.cpp: Removed unneeded includes.
2212         (WebCore::SVGFEDropShadowElement::isSupportedAttribute): Deleted.
2213         (WebCore::SVGFEDropShadowElement::parseAttribute): Don't use isSupportedAttribute.
2214         (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Don't use isSupportedAttribute.
2215         * svg/SVGFEDropShadowElement.h:
2216         * svg/SVGFEFloodElement.cpp: Removed unneeded includes.
2217         * svg/SVGFEGaussianBlurElement.cpp: Removed unneeded includes.
2218         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute): Deleted.
2219         (WebCore::SVGFEGaussianBlurElement::parseAttribute): Don't use isSupportedAttribute.
2220         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Don't use isSupportedAttribute.
2221         * svg/SVGFEGaussianBlurElement.h:
2222         * svg/SVGFEImageElement.cpp: Removed unneeded includes.
2223         (WebCore::SVGFEImageElement::isSupportedAttribute): Deleted.
2224         (WebCore::SVGFEImageElement::parseAttribute): Don't use isSupportedAttribute.
2225         (WebCore::SVGFEImageElement::svgAttributeChanged): Don't use isSupportedAttribute.
2226         * svg/SVGFEImageElement.h:
2227         * svg/SVGFELightElement.cpp: Removed unneeded includes.
2228         (WebCore::SVGFELightElement::isSupportedAttribute): Deleted.
2229         (WebCore::SVGFELightElement::parseAttribute): Don't use isSupportedAttribute.
2230         (WebCore::SVGFELightElement::svgAttributeChanged): Don't use isSupportedAttribute.
2231         * svg/SVGFELightElement.h:
2232         * svg/SVGFEMergeNodeElement.cpp: Removed unneeded includes.
2233         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute): Deleted.
2234         (WebCore::SVGFEMergeNodeElement::parseAttribute): Don't use isSupportedAttribute.
2235         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Don't use isSupportedAttribute.
2236         * svg/SVGFEMergeNodeElement.h:
2237         * svg/SVGFEMorphologyElement.cpp: Removed unneeded includes.
2238         (WebCore::SVGFEMorphologyElement::isSupportedAttribute): Deleted.
2239         (WebCore::SVGFEMorphologyElement::parseAttribute): Don't use isSupportedAttribute.
2240         (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Don't use isSupportedAttribute.
2241         * svg/SVGFEMorphologyElement.h:
2242         * svg/SVGFEOffsetElement.cpp: Removed unneeded includes.
2243         (WebCore::SVGFEOffsetElement::isSupportedAttribute): Deleted.
2244         (WebCore::SVGFEOffsetElement::parseAttribute): Don't use isSupportedAttribute.
2245         (WebCore::SVGFEOffsetElement::svgAttributeChanged): Don't use isSupportedAttribute.
2246         * svg/SVGFEOffsetElement.h:
2247         * svg/SVGFESpecularLightingElement.cpp: Removed unneeded includes.
2248         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute): Deleted.
2249         (WebCore::SVGFESpecularLightingElement::parseAttribute): Don't use isSupportedAttribute.
2250         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
2251         * svg/SVGFESpecularLightingElement.h:
2252         * svg/SVGFETileElement.cpp: Removed unneeded includes.
2253         (WebCore::SVGFETileElement::isSupportedAttribute): Deleted.
2254         (WebCore::SVGFETileElement::parseAttribute): Don't use isSupportedAttribute.
2255         (WebCore::SVGFETileElement::svgAttributeChanged): Don't use isSupportedAttribute.
2256         * svg/SVGFETileElement.h:
2257         * svg/SVGFETurbulenceElement.cpp: Removed unneeded includes.
2258         (WebCore::SVGFETurbulenceElement::isSupportedAttribute): Deleted.
2259         (WebCore::SVGFETurbulenceElement::parseAttribute): Don't use isSupportedAttribute.
2260         (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Don't use isSupportedAttribute.
2261         * svg/SVGFETurbulenceElement.h:
2262         * svg/SVGFilterElement.cpp: Removed unneeded includes.
2263         (WebCore::SVGFilterElement::parseAttribute): Don't use isSupportedAttribute.
2264         * svg/SVGFilterPrimitiveStandardAttributes.cpp: Removed unneeded includes.
2265         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute): Don't use isSupportedAttribute.
2266         * svg/SVGFilterPrimitiveStandardAttributes.h: Removed isSupportedAttribute and also moved a
2267         couple functions out of the class definition.
2268         * svg/SVGFitToViewBox.cpp: Removed unneeded includes.
2269         * svg/SVGFontFaceElement.cpp: Removed unneeded includes.
2270         * svg/SVGFontFaceUriElement.cpp: Removed unneeded includes.
2271         * svg/SVGForeignObjectElement.cpp: Removed unneeded includes.
2272         (WebCore::SVGForeignObjectElement::parseAttribute): Don't use isSupportedAttribute.
2273         * svg/SVGGElement.cpp: Removed unneeded includes.
2274         (WebCore::SVGGElement::parseAttribute): Don't use isSupportedAttribute.
2275         * svg/SVGGlyphElement.cpp: Removed unneeded includes.
2276         * svg/SVGGlyphRefElement.cpp: Removed unneeded includes.
2277         (WebCore::SVGGlyphRefElement::hasValidGlyphElement): Rewrote to use is<> instead of hasTagName.
2278         (WebCore::SVGGlyphRefElement::parseAttribute): Don't use return value from SVGURIReference::parseAttribute.
2279         * svg/SVGGradientElement.cpp: Removed unneeded includes.
2280         (WebCore::SVGGradientElement::parseAttribute): Don't use isSupportedAttribute.
2281         * svg/SVGGraphicsElement.cpp: Removed unneeded includes.
2282         (WebCore::SVGGraphicsElement::parseAttribute): Don't use isSupportedAttribute.
2283         * svg/SVGImageElement.cpp: Removed unneeded includes.
2284         (WebCore::SVGImageElement::parseAttribute): Don't use isSupportedAttribute.
2285         * svg/SVGLangSpace.cpp: Removed unneeded includes.
2286         (WebCore::SVGLangSpace::parseAttribute): Removed the return value.
2287         * svg/SVGLangSpace.h: Converted functions to static member functions and removed the
2288         return value from parseAttribute.
2289         * svg/SVGLineElement.cpp: Removed unneeded includes.
2290         (WebCore::SVGLineElement::parseAttribute): Don't use isSupportedAttribute.
2291         * svg/SVGLinearGradientElement.cpp: Removed unneeded includes.
2292         (WebCore::SVGLinearGradientElement::parseAttribute): Don't use isSupportedAttribute.
2293         * svg/SVGMPathElement.cpp: Removed unneeded includes.
2294         (WebCore::SVGMPathElement::isSupportedAttribute): Deleted.
2295         (WebCore::SVGMPathElement::parseAttribute): Don't use isSupportedAttribute.
2296         (WebCore::SVGMPathElement::svgAttributeChanged): Don't use isSupportedAttribute.
2297         * svg/SVGMPathElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
2298         private instead of protected.
2299         * svg/SVGMarkerElement.cpp: Removed unneeded includes.
2300         (WebCore::SVGMarkerElement::parseAttribute): Don't use isSupportedAttribute.
2301         * svg/SVGMaskElement.cpp: Removed unneeded includes.
2302         (WebCore::SVGMaskElement::parseAttribute): Don't use isSupportedAttribute.
2303         * svg/SVGPathElement.cpp: Removed unneeded includes.
2304         (WebCore::SVGPathElement::parseAttribute): Don't use isSupportedAttribute.
2305         * svg/SVGPatternElement.cpp: Removed unneeded includes.
2306         (WebCore::SVGPatternElement::parseAttribute): Don't use isSupportedAttribute.
2307         * svg/SVGPolyElement.cpp: Removed unneeded includes.
2308         (WebCore::SVGPolyElement::isSupportedAttribute): Deleted.
2309         (WebCore::SVGPolyElement::parseAttribute): Don't use isSupportedAttribute.
2310         (WebCore::SVGPolyElement::svgAttributeChanged): Don't use isSupportedAttribute.
2311         * svg/SVGPolyElement.h:
2312         * svg/SVGRadialGradientElement.cpp: Removed unneeded includes.
2313         (WebCore::SVGRadialGradientElement::parseAttribute): Don't use isSupportedAttribute.
2314         * svg/SVGRectElement.cpp: Removed unneeded includes.
2315         (WebCore::SVGRectElement::isSupportedAttribute): Deleted.
2316         (WebCore::SVGRectElement::parseAttribute): Don't use isSupportedAttribute.
2317         (WebCore::SVGRectElement::svgAttributeChanged): Don't use isSupportedAttribute.
2318         * svg/SVGRectElement.h:
2319         * svg/SVGSVGElement.cpp: Removed unneeded includes.
2320         (WebCore::SVGSVGElement::parseAttribute): Don't use isSupportedAttribute.
2321         * svg/SVGScriptElement.cpp: Removed unneeded includes.
2322         * svg/SVGStopElement.cpp: Removed unneeded includes.
2323         (WebCore::SVGStopElement::isSupportedAttribute): Deleted.
2324         (WebCore::SVGStopElement::parseAttribute): Don't use isSupportedAttribute.
2325         (WebCore::SVGStopElement::svgAttributeChanged): Don't use isSupportedAttribute.
2326         * svg/SVGStopElement.h: Removed isSupportedAttribute.
2327         * svg/SVGStyleElement.cpp: Removed unneeded includes.
2328         (WebCore::SVGStyleElement::isSupportedAttribute): Deleted.
2329         (WebCore::SVGStyleElement::parseAttribute): Don't use isSupportedAttribute.
2330         * svg/SVGStyleElement.h: Removed isSupportedAttribute.
2331         * svg/SVGSymbolElement.cpp: Removed unneeded includes.
2332         (WebCore::SVGSymbolElement::isSupportedAttribute): Deleted.
2333         (WebCore::SVGSymbolElement::parseAttribute): Don't use isSupportedAttribute.
2334         (WebCore::SVGSymbolElement::svgAttributeChanged): Don't use isSupportedAttribute.
2335         * svg/SVGSymbolElement.h: Removed isSupportedAttribute.
2336         * svg/SVGTRefElement.cpp: Removed unneeded includes.
2337         (WebCore::SVGTRefElement::isSupportedAttribute): Deleted.
2338         (WebCore::SVGTRefElement::parseAttribute): Don't use isSupportedAttribute.
2339         (WebCore::SVGTRefElement::svgAttributeChanged): Don't use isSupportedAttribute.
2340         * svg/SVGTRefElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
2341         private instead of protected.
2342         * svg/SVGTests.cpp: Removed unneeded includes.
2343         (WebCore::SVGTests::parseAttribute): Removed return value.
2344         * svg/SVGTests.h: Removed return value of parseAttribute.
2345         * svg/SVGTextContentElement.cpp: Removed unneeded includes.
2346         (WebCore::SVGTextContentElement::collectStyleForPresentationAttribute): Don't use
2347         isSupportedAttribute. Also removed global to optimize comparing attribute value against
2348         the string "preserve".
2349         (WebCore::SVGTextContentElement::parseAttribute): Don't use isSupportedAttribute.
2350         (WebCore::SVGTextContentElement::svgAttributeChanged): Don't use isSupportedAttribute.
2351         * svg/SVGTextContentElement.h: Made isSupportedAttribute private instead of protected.
2352         * svg/SVGTextElement.cpp: Removed unneeded includes.
2353         * svg/SVGTextPathElement.cpp: Removed unneeded includes.
2354         (WebCore::SVGTextPathElement::parseAttribute): Don't use isSupportedAttribute.
2355         * svg/SVGTextPositioningElement.cpp: Removed unneeded includes.
2356         (WebCore::SVGTextPositioningElement::isSupportedAttribute): Deleted.
2357         (WebCore::SVGTextPositioningElement::parseAttribute): Don't use isSupportedAttribute.
2358         (WebCore::SVGTextPositioningElement::svgAttributeChanged): Don't use isSupportedAttribute.
2359         * svg/SVGTextPositioningElement.h: Removed isSupportedAttribute and made some functions
2360         private insetad of protected.
2361         * svg/SVGURIReference.cpp: Removed unneeded includes.
2362         (WebCore::SVGURIReference::parseAttribute): Don't use isSupportedAttribute.
2363         * svg/SVGURIReference.h:
2364         (WebCore::SVGURIReference::isExternalURIReference):
2365         * svg/SVGUseElement.cpp: Removed unneeded includes.
2366         (WebCore::SVGUseElement::parseAttribute): Don't use isSupportedAttribute.
2367         * svg/SVGViewElement.h: Removed isSupportedAttribute.
2368         * svg/animation/SVGSMILElement.cpp: Removed unneeded includes.
2369
2370 2015-03-29  Darin Adler  <darin@apple.com>
2371
2372         Remove unneeded includes of "Attribute.h"
2373         https://bugs.webkit.org/show_bug.cgi?id=143195
2374
2375         Reviewed by Antti Koivisto.
2376
2377         * css/StyleResolver.cpp:
2378         * html/HTMLAnchorElement.cpp:
2379         * html/HTMLAreaElement.cpp:
2380         * html/HTMLBRElement.cpp:
2381         * html/HTMLBaseElement.cpp:
2382         * html/HTMLBodyElement.cpp:
2383         * html/HTMLButtonElement.cpp:
2384         * html/HTMLCanvasElement.cpp:
2385         * html/HTMLDivElement.cpp:
2386         * html/HTMLElement.cpp:
2387         * html/HTMLEmbedElement.cpp:
2388         * html/HTMLFontElement.cpp:
2389         * html/HTMLFormControlElement.cpp:
2390         * html/HTMLFormElement.cpp:
2391         * html/HTMLFrameElement.cpp:
2392         * html/HTMLFrameElementBase.cpp:
2393         * html/HTMLFrameSetElement.cpp:
2394         * html/HTMLHRElement.cpp:
2395         * html/HTMLIFrameElement.cpp:
2396         * html/HTMLImageElement.cpp:
2397         * html/HTMLOListElement.cpp:
2398         * html/HTMLOptionElement.cpp:
2399         * html/HTMLParagraphElement.cpp:
2400         * html/HTMLParamElement.cpp:
2401         * html/HTMLPlugInElement.cpp:
2402         * html/HTMLPreElement.cpp:
2403         * html/HTMLProgressElement.cpp:
2404         * html/HTMLScriptElement.cpp:
2405         * html/HTMLSelectElement.cpp:
2406         * html/HTMLStyleElement.cpp:
2407         * html/HTMLTableCaptionElement.cpp:
2408         * html/HTMLTableCellElement.cpp:
2409         * html/HTMLTableColElement.cpp:
2410         * html/HTMLTableElement.cpp:
2411         * html/HTMLTablePartElement.cpp:
2412         * html/HTMLTextAreaElement.cpp:
2413         * html/HTMLTextFormControlElement.cpp:
2414         * html/HTMLUListElement.cpp:
2415         * html/HTMLVideoElement.cpp:
2416         * html/parser/HTMLScriptRunner.cpp:
2417         * inspector/InspectorNodeFinder.cpp:
2418         Removed includes of "Attribute.h".
2419
2420 2015-03-28  Eric Carlson  <eric.carlson@apple.com>
2421
2422         [Mac] Update for output device API change
2423         https://bugs.webkit.org/show_bug.cgi?id=143187
2424
2425         Reviewed by Zalan Bujtas.
2426
2427         The API used for output device is being deprecated, update to the replacement.
2428
2429         * WebCore.xcodeproj/project.pbxproj: Add SPI headers.
2430
2431         * platform/graphics/MediaPlaybackTarget.h:
2432         (WebCore::MediaPlaybackTarget::MediaPlaybackTarget): Update for API change.
2433         (WebCore::MediaPlaybackTarget::setDevicePickerContext):
2434         (WebCore::MediaPlaybackTarget::devicePickerContext):
2435
2436         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
2437         (WebCore::MediaPlaybackTarget::encode):
2438         (WebCore::MediaPlaybackTarget::decode):
2439
2440         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
2441         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2442         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):
2443         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac):
2444         (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired):
2445         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
2446         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange):
2447         (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets):
2448         (-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
2449         (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Deleted.
2450
2451         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2452         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2453         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2454         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2455         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
2456         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2457
2458         * platform/spi/cocoa/AVKitSPI.h: Copied from Source/WebCore/platform/spi/ios/AVKitSPI.h. Moved
2459             from ios directory, added Mac includes and prototypes.
2460         * platform/spi/ios/AVKitSPI.h: Removed.
2461
2462         * platform/spi/mac/AVFoundationSPI.h: Added.
2463
2464 2015-03-28  Simon Fraser  <simon.fraser@apple.com>
2465
2466         Optimize RenderLayer::intersectsDamageRect() slightly
2467         https://bugs.webkit.org/show_bug.cgi?id=143186
2468
2469         Reviewed by Zalan Bujtas.
2470
2471         We can early return from RenderLayer::intersectsDamageRect() if the
2472         damageRect is empty, since nothing will intersect with the empty rect.
2473         
2474         Slight performance gain when scrolling overflow-scroll with lots of nested,
2475         clipping layers.
2476
2477         * rendering/RenderLayer.cpp:
2478         (WebCore::RenderLayer::calculateClipRects):
2479
2480 2015-03-28  Anders Carlsson  <andersca@apple.com>
2481
2482         Remove an unused SPI method from WebKitLegacy
2483         https://bugs.webkit.org/show_bug.cgi?id=143185
2484
2485         Reviewed by Sam Weinig.
2486
2487         * loader/appcache/ApplicationCacheStorage.cpp:
2488         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Deleted.
2489         * loader/appcache/ApplicationCacheStorage.h:
2490
2491 2015-03-28  Joonghun Park  <jh718.park@samsung.com>
2492
2493         nullptr cleanup in InlineFooBox classes
2494         https://bugs.webkit.org/show_bug.cgi?id=143178
2495
2496         Reviewed by Csaba Osztrogonác.
2497
2498         No new tests, no behavior changes
2499
2500         Replace 0 with nullptr in InlineFooBox classes.
2501
2502         * rendering/InlineBox.cpp:
2503         (WebCore::InlineBox::prevLeafChildIgnoringLineBreak):
2504         * rendering/InlineFlowBox.cpp:
2505         (WebCore::InlineFlowBox::removeChild):
2506         (WebCore::InlineFlowBox::deleteLine):
2507         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
2508         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
2509         * rendering/InlineFlowBox.h:
2510         (WebCore::InlineFlowBox::InlineFlowBox):
2511         * rendering/InlineTextBox.h:
2512         (WebCore::InlineTextBox::InlineTextBox):
2513         * rendering/RootInlineBox.cpp:
2514         (WebCore::RootInlineBox::getLogicalStartBoxWithNode):
2515         (WebCore::RootInlineBox::getLogicalEndBoxWithNode):
2516         * rendering/RootInlineBox.h:
2517         * rendering/svg/SVGInlineTextBox.cpp:
2518         (WebCore::SVGInlineTextBox::SVGInlineTextBox):
2519         (WebCore::SVGInlineTextBox::releasePaintingResource):
2520         (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
2521         * rendering/svg/SVGRootInlineBox.cpp:
2522         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
2523         (WebCore::findFirstAndLastAttributesInVector):
2524         * rendering/svg/SVGRootInlineBox.h:
2525
2526 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
2527
2528         More modern loops in RenderLayer.cpp
2529         https://bugs.webkit.org/show_bug.cgi?id=143175
2530
2531         Reviewed by Ryosuke Niwa.
2532
2533         Use modern loops in more places in RenderLayer.app.
2534
2535         * rendering/RenderLayer.cpp:
2536         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
2537         (WebCore::RenderLayer::paint):
2538         (WebCore::performOverlapTests):
2539         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
2540         (WebCore::RenderLayer::paintList):
2541         (WebCore::RenderLayer::collectFragments):
2542         (WebCore::RenderLayer::updatePaintingInfoForFragments):
2543         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
2544         (WebCore::RenderLayer::calculateClipRects):
2545
2546 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
2547
2548         nullptr cleanup in RenderLayer
2549         https://bugs.webkit.org/show_bug.cgi?id=143174
2550
2551         Reviewed by Ryosuke Niwa.
2552
2553         Replace 0 with nullptr in RenderLayer.cpp.
2554
2555         * rendering/RenderLayer.cpp:
2556         (WebCore::RenderLayer::filterRenderer):
2557         (WebCore::RenderLayer::updateLayerPositionsAfterLayout):
2558         (WebCore::RenderLayer::updateLayerPositionsAfterOverflowScroll):
2559         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
2560         (WebCore::RenderLayer::enclosingOverflowClipLayer):
2561         (WebCore::RenderLayer::enclosingCompositingLayer):
2562         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
2563         (WebCore::RenderLayer::enclosingFilterLayer):
2564         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
2565         (WebCore::RenderLayer::clippingRootForPainting):
2566         (WebCore::RenderLayer::transparentPaintingAncestor):
2567         (WebCore::transparencyClipBox):
2568         (WebCore::RenderLayer::removeChild):
2569         (WebCore::RenderLayer::removeOnlyThisLayer):
2570         (WebCore::RenderLayer::insertOnlyThisLayer):
2571         (WebCore::accumulateOffsetTowardsAncestor):
2572         (WebCore::RenderLayer::enclosingScrollableArea):
2573         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
2574         (WebCore::RenderLayer::enclosingElement):
2575         (WebCore::RenderLayer::enclosingFlowThreadAncestor):
2576         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
2577         (WebCore::RenderLayer::hitTestLayer):
2578         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
2579         (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
2580         (WebCore::RenderLayer::hitTestList):
2581         (WebCore::RenderLayer::updateClipRects):
2582         (WebCore::RenderLayer::clipRects):
2583         (WebCore::RenderLayer::calculateClipRects):
2584
2585 2015-03-27  Gwang Yoon Hwang  <yoon@igalia.com>
2586
2587         [TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
2588         https://bugs.webkit.org/show_bug.cgi?id=142386
2589
2590         Reviewed by Žan Doberšek.
2591
2592         TextureMapper and TextureMapperGL are bloated and tightly coupled with
2593         BitmapTexture. We should move these classes to seperated file of their own.
2594         Also, this patch removes friend relationship from TextureMapperGL and  its
2595         subsidiary classes.
2596
2597         The main purpose of this refactoring is to expose BitmapTexturePool to
2598         renderers of platformlayers like Video and Canvas. By doing this, each
2599         renderer can acquire textures from the global texture pool to paint
2600         their contents directly.
2601
2602         No new tests needed.
2603
2604         * PlatformEfl.cmake:
2605         * PlatformGTK.cmake:
2606         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2607         Include BitmapTextureGL and BitmapTexturePool explicitly
2608
2609         * platform/graphics/texmap/BitmapTexture.cpp: Added.
2610         * platform/graphics/texmap/BitmapTexture.h: Added.
2611         (WebCore::BitmapTexture::updateContents):
2612         Exclude BitmapTexture class from TextureMapper
2613
2614         * platform/graphics/texmap/BitmapTextureGL.cpp: Added.
2615         * platform/graphics/texmap/BitmapTextureGL.h: Added.
2616         Exclude BitmapTextureGL class from TextureMapperGL
2617         (WebCore::BitmapTextureGL::clipStack): Added.
2618         Add the getter for clipStack for TextureMapperGL
2619         (WebCore::BitmapTextureGL::Bind): Deleted.
2620         (WebCore::BitmapTextureGL::BindAsSurface): Added.
2621         Bind used TextureMapperGL's internal data directly to compute projection matrix as a friend class,
2622         However, TextureMapperGL can compute projection matrix itself after binding job, so this
2623         friend ship is not needed. Also, this patch renames Bind to BindAsSurface to remove ambiguity.
2624
2625         * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Added.
2626         * platform/graphics/texmap/BitmapTextureImageBuffer.h: Added.
2627         Exclude BitmapTextureImageBuffer class from TextureMapperImageBuffer
2628
2629         * platform/graphics/texmap/BitmapTexturePool.cpp: Added.
2630         * platform/graphics/texmap/BitmapTexturePool.h: Added.
2631         Exclude BitmapTexturePool class from TextureMapperGL
2632         (WebCore::BitmapTexturePool::acquireTexture):
2633         Modified to use passed GraphicsContext3D instead of TextureMapperGL to remove redundant coupling
2634
2635         * platform/graphics/texmap/TextureMapper.cpp:
2636         * platform/graphics/texmap/TextureMapper.h:
2637         Remove BitmapTexturePool and BitmapTexture from its implementation.
2638
2639         * platform/graphics/texmap/TextureMapperGL.cpp:
2640         * platform/graphics/texmap/TextureMapperGL.h:
2641         Remove BitmapTextureGL from its implementation.
2642         (WebCore::TextureMapperGL::TextureMapperGL):
2643         (WebCore::TextureMapperGL::clipStack):
2644         (WebCore::TextureMapperGL::bindSurface):
2645         (WebCore::TextureMapperGL::currentSurface):
2646         Add a getter of the current surface for filtering operation in BitmapTextureGL.
2647         It would be clear to move filtering operation from BitmapTextureGL to TextureMapperGL later.
2648
2649         (WebCore::TextureMapperGL::ClipStack):
2650         Move inner class declaration to public.
2651
2652         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2653         * platform/graphics/texmap/TextureMapperImageBuffer.h:
2654         Remove BitmapTextureImageBuffer from its implementation.
2655
2656 2015-03-27  Tim Horton  <timothy_horton@apple.com>
2657
2658         WebProcess started by editable WKWebView spends 15% of its initialization time loading DataDetectors
2659         https://bugs.webkit.org/show_bug.cgi?id=143142
2660         <rdar://problem/20324495>
2661
2662         Reviewed by Anders Carlsson.
2663
2664         Calling DataDetectorsLibrary() is expensive; we should avoid doing it
2665         until actually necessary. When loading a page that makes a caret selection,
2666         ServicesOverlayController was calling DataDetectorsLibrary() (ignoring the fact
2667         that a caret selection can't have any services associated with it) to avoid
2668         crashing on systems where DataDetectors is not available. Instead, we should
2669         first check if there's anything to do, and then check for the existence
2670         of DataDetectors.
2671
2672         * page/mac/ServicesOverlayController.mm:
2673         (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
2674         Build the list of phone number ranges, and bail (clearing the potential highlights)
2675         if it is empty, before calling DataDetectorsLibrary().
2676
2677         (WebCore::ServicesOverlayController::buildSelectionHighlight):
2678         Check the list of selection rects, and bail (clearing the potential highlights)
2679         if it is empty, before calling DataDetectorsLibrary().
2680
2681 2015-03-27  Jer Noble  <jer.noble@apple.com>
2682
2683         [Mac] Safari fails to fire page "load" event with video[preload=none]
2684         https://bugs.webkit.org/show_bug.cgi?id=143147
2685
2686         Reviewed by Simon Fraser.
2687
2688         Test: media/video-page-load-preload-none.html
2689
2690         When told to load() when preload == None, set the networkState to Idle.
2691         This causes HTMLMediaElement to set the shouldDelayLoadEvent flag to
2692         false, and allows the page's 'load' event to fire.
2693
2694         Drive-by fix: add setNetworkState() and setReadyState() methods to
2695         MediaPlayerPrivateAVFoundation, reducing a bunch of code duplication.
2696
2697         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2698         (WebCore::MediaPlayerPrivateAVFoundation::load):
2699         (WebCore::MediaPlayerPrivateAVFoundation::setNetworkState):
2700         (WebCore::MediaPlayerPrivateAVFoundation::setReadyState):
2701         (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
2702         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2703
2704 2015-03-27  Alexey Proskuryakov  <ap@apple.com>
2705
2706         Calling crypto.webkitSubtle.generateKey causes page memory to never be released
2707         https://bugs.webkit.org/show_bug.cgi?id=143151
2708         rdar://problem/18940687
2709
2710         Reviewed by Tim Horton.
2711
2712         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair): Don't.
2713
2714 2015-03-27  Brent Fulgham  <bfulgham@apple.com>
2715
2716         Null dereference in InbandMetadataTextTrack handling
2717         https://bugs.webkit.org/show_bug.cgi?id=143144
2718         <rdar://problem/18983250>
2719
2720         Reviewed by Eric Carlson.
2721
2722         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
2723         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): Check for null return value from
2724         'client()', just like we do in all other methods.
2725
2726 2015-03-27  Oliver Hunt  <oliver@apple.com>
2727
2728         Forward additional CFNetwork ATS information to child processes
2729         https://bugs.webkit.org/show_bug.cgi?id=143136
2730
2731         Reviewed by Anders Carlsson.
2732
2733         Declare SPI.
2734
2735         * platform/spi/cf/CFNetworkSPI.h:
2736
2737 2015-03-27  Chris Dumez  <cdumez@apple.com>
2738
2739         [WK2][NetworkCache] We only cache responses with status codes that are cacheable by default
2740         https://bugs.webkit.org/show_bug.cgi?id=143125
2741         <rdar://problem/20321172>
2742
2743         Reviewed by Antti Koivisto.
2744
2745         Export a couple of extra symbols.
2746
2747         * platform/network/ResourceResponseBase.h:
2748
2749 2015-03-27  Jer Noble  <jer.noble@apple.com>
2750
2751         HTMLMediaElement will fire 'seeked' before seek completes, leading to currentTime discontinuities.
2752         https://bugs.webkit.org/show_bug.cgi?id=143132
2753
2754         Reviewed by Eric Carlson.
2755
2756         When seeking, if the ready state rises to >= HAVE_CURRENT_DATA, we will fire the 'seeked'
2757         event and continue playback. However, if a media engine updates the ready state before its
2758         seek operation actually completes, the currentTime it returns may still be the time before
2759         the seek.
2760
2761         Wait until both the ready state rises to HAVE_CURRENT_DATA and m_player->seeking() returns
2762         false before firing the 'seeked' event.
2763
2764         * html/HTMLMediaElement.cpp:
2765         (WebCore::HTMLMediaElement::parseAttribute):
2766
2767 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
2768
2769         Make some more objects use FastMalloc
2770         https://bugs.webkit.org/show_bug.cgi?id=143122
2771
2772         Reviewed by Csaba Osztrogonác.
2773
2774         * Modules/geolocation/GeolocationController.h:
2775         * Modules/geolocation/NavigatorGeolocation.h:
2776         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
2777         * Modules/notifications/NotificationController.h:
2778         * Modules/webdatabase/DatabaseServer.h:
2779         * css/CSSFontFaceSource.h:
2780         * html/HTMLMediaSession.h:
2781         * inspector/InspectorIndexedDBAgent.h:
2782         * inspector/InspectorReplayAgent.h:
2783         * page/CaptionUserPreferencesMediaAF.h:
2784         * page/PageConsoleClient.h:
2785         * page/PageDebuggable.h:
2786         * page/animation/CSSPropertyAnimation.cpp:
2787         * page/mac/ServicesOverlayController.h:
2788         * platform/RemoteCommandListener.h:
2789         * platform/Timer.h:
2790         * platform/audio/MediaSessionManager.h:
2791         * platform/mac/SystemSleepListenerMac.h:
2792         * platform/mac/ThemeMac.h:
2793         * rendering/svg/RenderSVGResourceSolidColor.h:
2794         * replay/ReplayController.h:
2795
2796 2015-03-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
2797
2798         FEMorphology::platformApplyGeneric() should bail out if the radius is less than or equal to zero.
2799         https://bugs.webkit.org/show_bug.cgi?id=142885.
2800
2801         Reviewed by Dean Jackson.
2802
2803         FEMorphology class implementation code clean up.
2804         
2805         Tests: svg/filters/feMorphology-radius-cases.svg
2806
2807         * platform/graphics/filters/FEMorphology.cpp:
2808         (WebCore::shouldSupersedeExtremum): Reuse code instead of repeating it and
2809         use < and > instead of =< and >=.
2810         
2811         (WebCore::pixelArrayIndex): Returns the array index of a pixel in an image
2812         buffer, given: position(x, y), image width and the color channel.
2813         
2814         (WebCore::columnExtremum): Returns the extremum of a column of pixels.
2815         
2816         (WebCore::kernelExtremum): Returns the extremum of a filter kernel.
2817         
2818         (WebCore::FEMorphology::platformApplyGeneric): Apply some code clean-up.
2819         The kernel size should be equal to radius of the filter. The extra pixel
2820         was causing the resulted image to be asymmetric in some cases.
2821         
2822         (WebCore::FEMorphology::platformApplyDegenerate):
2823         (WebCore::FEMorphology::platformApplySoftware): After applying scaling, we
2824         still need to check the resulted radius is negative (overflow case) or less
2825         than one (zero radius case) and treat these cases differently.
2826         
2827         (WebCore::FEMorphology::morphologyOperator): Deleted.
2828         (WebCore::FEMorphology::radiusX): Deleted.
2829         (WebCore::FEMorphology::radiusY): Deleted.
2830         * platform/graphics/filters/FEMorphology.h:
2831         (WebCore::FEMorphology::morphologyOperator):
2832         (WebCore::FEMorphology::radiusX):
2833         (WebCore::FEMorphology::radiusY):
2834         Move a single line functions from the source file to the header file.
2835
2836 2015-03-27  Antti Koivisto  <antti@apple.com>
2837
2838         Move CacheValidation to platform
2839         https://bugs.webkit.org/show_bug.cgi?id=143133
2840
2841         Reviewed by Chris Dumez.
2842
2843         It deals with platform types only and is currently violating layering.
2844
2845         * WebCore.xcodeproj/project.pbxproj:
2846         * loader/cache/CacheValidation.cpp: Removed.
2847         * loader/cache/CacheValidation.h: Removed.
2848         * platform/network/CacheValidation.cpp: Copied from Source/WebCore/loader/cache/CacheValidation.cpp.
2849         * platform/network/CacheValidation.h: Copied from Source/WebCore/loader/cache/CacheValidation.h.
2850
2851 2015-03-27  Commit Queue  <commit-queue@webkit.org>
2852
2853         Unreviewed, rolling out r177896.
2854         https://bugs.webkit.org/show_bug.cgi?id=142978
2855
2856         Loading libgstclutter.so in-process hangs web process
2857         (Requested by mcatanzaro on #webkit).
2858
2859         Reverted changeset:
2860
2861         "[GStreamer] Disable gst-plugin-scanner if seccomp filters are
2862         enabled"
2863         https://bugs.webkit.org/show_bug.cgi?id=140069
2864         http://trac.webkit.org/changeset/177896
2865
2866 2015-03-26  Antti Koivisto  <antti@apple.com>
2867
2868         Respect cache-control directives in request
2869         https://bugs.webkit.org/show_bug.cgi?id=143121
2870         rdar://problem/19714040
2871
2872         Reviewed by Chris Dumez.
2873
2874         Test: http/tests/cache/disk-cache/disk-cache-request-headers.html
2875
2876         * loader/cache/CacheValidation.cpp:
2877         (WebCore::isCacheHeaderSeparator):
2878         (WebCore::isControlCharacter):
2879         (WebCore::trimToNextSeparator):
2880         (WebCore::parseCacheHeader):
2881         (WebCore::parseCacheControlDirectives):
2882
2883             Factor Cache-control parsing here so it can be used for both requests and responses.
2884
2885         * loader/cache/CacheValidation.h:
2886         * platform/network/ResourceRequestBase.h:
2887         * platform/network/ResourceResponseBase.cpp:
2888         (WebCore::ResourceResponseBase::ResourceResponseBase):
2889         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2890         (WebCore::ResourceResponseBase::cacheControlContainsNoCache):
2891         (WebCore::ResourceResponseBase::cacheControlContainsNoStore):
2892         (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate):
2893         (WebCore::ResourceResponseBase::cacheControlMaxAge):
2894         (WebCore::isCacheHeaderSeparator): Deleted.
2895         (WebCore::isControlCharacter): Deleted.
2896         (WebCore::trimToNextSeparator): Deleted.
2897         (WebCore::parseCacheHeader): Deleted.
2898         * platform/network/ResourceResponseBase.h:
2899
2900 2015-03-27  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2901
2902         [GStreamer] share GL context in pipeline, part 2
2903         https://bugs.webkit.org/show_bug.cgi?id=143049
2904
2905         Reviewed by Carlos Garcia Campos.
2906
2907         This patch, instead of cluttering the GstGL attributes creation in
2908         ::handleSyncMessage(), creates a new method ::ensureGstGLContext(),
2909         where those attributes are defined. This method is guarded by
2910         USE(GSTREAMER_GL)
2911
2912         ::handlSyncMessage() shall return nothing, according to GStreamer
2913         documentation, not a boolean.
2914
2915         The GstGL attributes are now GRefPtr<> to avoid memory leaks.
2916
2917         The GstGLAPI and GstGLPlatform are now set given by the pre-processor
2918         directives, and the code in ::ensureGstGLContext() is simpler.
2919
2920         No new tests because this is platform specific and it depends in the
2921         run-time availability and configurations of GstGL elements.
2922
2923         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2924         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
2925         Don't initialise the GstGL attributes since are GRefPtr<>
2926         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): Changed the
2927         signature to use void instead of gboolean.
2928         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): New method.
2929         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2930
2931 2015-03-26  Jeremy Jones  <jeremyj@apple.com>
2932
2933         Optimized Fullscreen fails to cleanup because of no longer necessary release of m_playerController in exitFullscreen()
2934         https://bugs.webkit.org/show_bug.cgi?id=143120
2935
2936         Reviewed by Eric Carlson.
2937
2938         We used to release m_playerController in WebVideoFullscreenInterfaceAVKit::exitFullscreen() in order to make sure 
2939         media state was reset. This is no longer necessary as we now have a way the model can explicitly request resetting the
2940         media state via resetMediaState(). m_playerController is already released in 
2941         WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal(). Releasing it prematurely can actually prevent the exit
2942         fullscreen process from completing successfully.
2943
2944         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2945         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
2946
2947 2015-03-26  Zalan Bujtas  <zalan@apple.com>
2948
2949         Inline continuation code should not take anonymous containing wrapper granted.
2950         https://bugs.webkit.org/show_bug.cgi?id=133312
2951
2952         Reviewed by Dave Hyatt.
2953
2954         It's wrong to assume that when RenderInline is part of an inline continuation, its containing block
2955         is an anonymous wrapper and its sibling might be a block level renderer.
2956         When the inline continuation is no longer needed, for example when the block level renderer that initiated the continuation
2957         is detached from the render tree, the inline renderes still continue to form continuation.(however they no longer require
2958         anonymous wrappers)
2959
2960         Test: fast/inline/crash-when-position-property-is-changed-and-no-longer-in-continuation.html
2961
2962         * rendering/RenderInline.cpp:
2963         (WebCore::updateStyleOfAnonymousBlockContinuations):
2964         (WebCore::RenderInline::styleDidChange):
2965
2966 2015-03-26  Tim Horton  <timothy_horton@apple.com>
2967
2968         REGRESSION (r181358 and r181507): Lots of sites think that we support touch events on OS X
2969         https://bugs.webkit.org/show_bug.cgi?id=142888
2970         <rdar://problem/20227304>
2971
2972         Reviewed by Beth Dakin.
2973
2974         * dom/Document.idl:
2975         * dom/Element.idl:
2976         * html/HTMLBodyElement.idl:
2977         * html/HTMLFrameSetElement.idl:
2978         * page/DOMWindow.idl:
2979         Re-conditionalize a lot of event listeners; sites test ("ontouchstart" in window), which
2980         is not covered by NotEnumerable, and so r181358 and r181507 broke a bunch of sites
2981         (apple.com, blaze.com, anything using nicescroll.js, etc.) by causing them to think
2982         that (Mac) Safari was touch-enabled.
2983
2984 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
2985
2986         "lineNo" does not match WebKit coding style guidelines
2987         https://bugs.webkit.org/show_bug.cgi?id=143119
2988
2989         Reviewed by Michael Saboff.
2990
2991         We can afford to use whole words.
2992
2993         * bindings/js/JSLazyEventListener.cpp:
2994         (WebCore::JSLazyEventListener::initializeJSFunction):
2995         * bindings/js/JSMainThreadExecStateInstrumentation.h:
2996         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
2997         * inspector/InspectorDOMAgent.cpp:
2998         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2999         * testing/Internals.cpp:
3000         (WebCore::Internals::parserMetaData):
3001
3002 2015-03-26  Roger Fong  <roger_fong@apple.com>
3003
3004         Apply blur effect to media control background.
3005         https://bugs.webkit.org/show_bug.cgi?id=143116.
3006         <rdar://problem/20316964>.
3007
3008         Reviewed by Brent Fulgham.
3009
3010         There are still a few issues, like the borders of the controls being blurred with black,
3011         and the volume slider background not showing the blur effect. Will fix those separately.
3012
3013         Add CSS for new divs to create blur effect using back drop filters and blend modes.
3014         * Modules/mediacontrols/mediaControlsApple.css:
3015         (audio::-webkit-media-controls-panel):
3016         (audio::-webkit-media-controls-panel-tint):
3017         (audio::-webkit-media-controls-panel-background):
3018         (audio::-webkit-media-controls-panel .volume-box):
3019         (audio::-webkit-media-controls-volume-slider-container-background):
3020         (audio::-webkit-media-controls-volume-slider-container-tint):
3021         (audio::-webkit-media-controls-toggle-closed-captions-button): Adjust fill.
3022         (audio::-webkit-media-controls-fullscreen-button): Adjust fill.
3023         (audio::-webkit-media-controls-fullscreen-button.exit): Adjust fill.
3024         (video:-webkit-full-screen::-webkit-media-controls-panel):
3025         (audio:-webkit-full-screen::-webkit-media-controls-panel-tint):
3026         (audio:-webkit-full-screen::-webkit-media-controls-panel-background):
3027         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
3028         (video:-webkit-full-screen::-webkit-media-controls-play-button):
3029         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
3030         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
3031         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
3032         (video:-webkit-full-screen::-webkit-media-controls-status-display):
3033         (audio::-webkit-media-controls-panel .volume-box:active): Deleted.
3034         * Modules/mediacontrols/mediaControlsApple.js:
3035         (Controller.prototype.createControls):
3036         (Controller.prototype.configureInlineControls): Add new divs for blurred background effect.
3037         (Controller.prototype.configureFullScreenControls): Ditto.
3038         (Controller.prototype.handlePanelMouseDown): The tint div is now in front.
3039         (Controller.prototype.drawTimelineBackground): Adjust colors to make border look better with new background.
3040         (Controller.prototype.drawVolumeBackground): Ditto.
3041
3042 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
3043
3044         Assertion firing in JavaScriptCore/parser/parser.h for statesman.com site
3045         https://bugs.webkit.org/show_bug.cgi?id=142974
3046
3047         Reviewed by Joseph Pecoraro.
3048
3049         * bindings/js/JSLazyEventListener.cpp:
3050         (WebCore::JSLazyEventListener::initializeJSFunction): Use the new override
3051         line number API to guarantee that errors will map to the .html file locations
3052         that we like.
3053
3054         * bindings/js/ScriptController.cpp:
3055         (WebCore::ScriptController::eventHandlerPosition): Added a FIXME to cover
3056         some cases where our line and column numbers are still nonsense.
3057
3058 2015-03-26  Beth Dakin  <bdakin@apple.com>
3059
3060         Relevant repainted objects callback is inaccurate and inconsistent for PDF 
3061         documents
3062         https://bugs.webkit.org/show_bug.cgi?id=143118
3063         -and corresponding-
3064         rdar://problem/13371582
3065
3066         Reviewed by Tim Horton.
3067
3068         Investigating this bug resulted in finding two things that should change for the 
3069         relevant repainted objects heuristic. First, we should not count any objects 
3070         painted while updating control tints. And secondly, we should not use it at all 
3071         for plugin documents. In other documents, we count the plugin area as “painted” 
3072         when we get to paint whether or not the plugin has actually loaded. This is 
3073         intentional because it allows us to account for chunks of the page that will be 
3074         filled in by possibly slow-loading ads. However, if the plugin is the whole 
3075         document, then the heuristic just doesn’t make any sense and it leads to 
3076         inconsistent behavior at different window sizes. So we’ll only count plugins when 
3077         the document is not a plugin document. 
3078
3079         Don’t count objects during this paint!
3080         * page/FrameView.cpp:
3081         (WebCore::FrameView::updateControlTints):
3082         * page/Page.h:
3083         (WebCore::Page::setIsCountingRelevantRepaintedObjects):
3084
3085         Make sure the document is not a plugin document.
3086         * rendering/RenderEmbeddedObject.cpp:
3087         (WebCore::RenderEmbeddedObject::paint):
3088
3089 2015-03-26  Alex Christensen  <achristensen@webkit.org>
3090
3091         Progress towards CMake on Mac.
3092         https://bugs.webkit.org/show_bug.cgi?id=143112
3093
3094         Reviewed by Chris Dumez.
3095
3096         * CMakeLists.txt:
3097         * PlatformEfl.cmake:
3098         * PlatformGTK.cmake:
3099         * PlatformMac.cmake:
3100         * platform/graphics/mac/IconMac.mm:
3101
3102 2015-03-26  Jer Noble  <jer.noble@apple.com>
3103
3104         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
3105         https://bugs.webkit.org/show_bug.cgi?id=142970
3106
3107         Reviewed by Eric Carlson.
3108
3109         isMainThread() will (ironically) return true if called from the web thread. Rather than dispatch
3110         synchronously to the main thread to allocate the _volumeView, dispatch asynchronously and handle
3111         the case where the MPVolumeView has not yet been created.
3112
3113         * platform/audio/ios/MediaSessionManagerIOS.mm:
3114         (-[WebMediaSessionHelper allocateVolumeView]): Dispatch to the main thread to allocate. Move notification
3115             registration to -setVolumeView:.
3116         (-[WebMediaSessionHelper setVolumeView:]): Added. Register/Unregister for route availablitiy notifications.
3117         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Handle the possibility of a nil _volumeView.
3118
3119 2015-03-26  Benjamin Poulain  <bpoulain@apple.com>
3120
3121         Fix state maching debugging after r181964
3122         https://bugs.webkit.org/show_bug.cgi?id=143082
3123
3124         Reviewed by Alex Christensen.
3125
3126         * contentextensions/ContentExtensionCompiler.cpp:
3127         (WebCore::ContentExtensions::compileRuleList):
3128
3129 2015-03-25  David Hyatt  <hyatt@apple.com>
3130
3131         Improve the offsetWidth/Height layout optimization
3132         https://bugs.webkit.org/show_bug.cgi?id=143008
3133
3134         Reviewed by Zalan Bujtas.
3135
3136         * dom/Document.cpp:
3137         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
3138         * dom/Document.h:
3139         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
3140         the positioning restrictions on the optimization check.
3141
3142         * dom/Element.cpp:
3143         (WebCore::Element::offsetWidth):
3144         (WebCore::Element::offsetHeight):
3145         Change to use Element& instead of Element*.
3146
3147         (WebCore::Element::clientWidth):
3148         (WebCore::Element::clientHeight):
3149         (WebCore::Element::scrollWidth):
3150         (WebCore::Element::scrollHeight):
3151         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
3152
3153 2015-03-26  Brady Eidson  <beidson@apple.com>
3154
3155         Apply ContentExtension actions after redirects.
3156         <rdar://problem/20062613> and https://bugs.webkit.org/show_bug.cgi?id=143055
3157
3158         Reviewed by Alex Christensen.
3159
3160         Tests: http/tests/contentextensions/loading/main-resource-redirect-blocked.php
3161                http/tests/contentextensions/subresource-redirect-blocked.html
3162
3163         This patch moves the "run a URL against the content extension" code from CachedResourceLoader to
3164         the ContentExtensionsBackend.
3165
3166         That allows it to be shared between the CachedResourceLoader where loads are initiated and 
3167         ResourceLoader where redirects are handled.
3168
3169         * contentextensions/ContentExtension.cpp:
3170         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
3171
3172         * contentextensions/ContentExtensionsBackend.cpp:
3173         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
3174         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
3175         * contentextensions/ContentExtensionsBackend.h:
3176
3177         * loader/NetscapePlugInStreamLoader.cpp:
3178         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
3179
3180         * loader/ResourceLoadInfo.h:
3181
3182         * loader/ResourceLoader.cpp:
3183         (WebCore::ResourceLoader::ResourceLoader):
3184         (WebCore::ResourceLoader::willSendRequest):
3185         * loader/ResourceLoader.h:
3186
3187         * loader/SubresourceLoader.cpp:
3188         (WebCore::SubresourceLoader::SubresourceLoader):
3189
3190         * loader/cache/CachedResourceLoader.cpp:
3191         (WebCore::CachedResourceLoader::requestResource):
3192
3193         * page/UserContentController.cpp:
3194         (WebCore::UserContentController::processContentExtensionRulesForLoad):
3195         (WebCore::UserContentController::actionsForResourceLoad): Deleted.
3196         (WebCore::UserContentController::globalDisplayNoneStyleSheet): Deleted.
3197         (WebCore::UserContentController::displayNoneCSSRule): Deleted.
3198         * page/UserContentController.h:
3199
3200 2015-03-26  Myles C. Maxfield  <mmaxfield@apple.com>
3201
3202         Crash when laying out (char)0
3203         https://bugs.webkit.org/show_bug.cgi?id=143103
3204
3205         Reviewed by Dean Jackson.
3206
3207         We currently cache a character -> Font mapping in a HashMap.
3208         However, keys in Hashmaps can't be 0. This patch simply skips
3209         the cache in this case.
3210
3211         No new tests, for now. I'm having trouble creating a test because
3212         the site that causes this bug generates their page using script,
3213         and the script is all minified, and difficult to understand. I
3214         will contact the owner of the site and ask for and unminified
3215         version of their sources. However, I don't want to that to block
3216         this tiny fix from going in.
3217
3218         * platform/graphics/Font.cpp:
3219         (WebCore::Font::systemFallbackFontForCharacter):
3220
3221 2015-03-26  Jer Noble  <jer.noble@apple.com>
3222
3223         [Mac][EME] Crash at com.apple.WebCore: WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys + 177
3224         https://bugs.webkit.org/show_bug.cgi?id=143080
3225
3226         Reviewed by Eric Carlson.
3227
3228         Null-check m_certificate before dereferencing.
3229
3230         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3231         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
3232
3233 2015-03-26  Chris Fleizach  <cfleizach@apple.com>
3234
3235         AX: [role="button"][aria-pressed] should be exposed as AXCheckbox:AXToggleButton, with role description of "toggle button"
3236         https://bugs.webkit.org/show_bug.cgi?id=115298
3237
3238         Reviewed by Mario Sanchez Prada.
3239
3240         A role=button + aria-pressed object should be exposed as AXCheckbox on Mac now. It should also convert the
3241         aria-pressed state into a 0, 1, 2 number value for the Mac.
3242
3243         Test: platform/mac/accessibility/aria-pressed-button-attributes.html
3244
3245         * accessibility/AccessibilityObject.cpp:
3246         (WebCore::AccessibilityObject::checkboxOrRadioValue):
3247         * accessibility/AccessibilityObject.h:
3248         (WebCore::AccessibilityObject::isToggleButton):
3249         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3250         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
3251         (createAccessibilityRoleMap):
3252         (-[WebAccessibilityObjectWrapper subrole]):
3253         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3254
3255 2015-03-25  Dean Jackson  <dino@apple.com>
3256
3257         CSS blend modes do not parse when in the shadow tree
3258         https://bugs.webkit.org/show_bug.cgi?id=143067
3259         <rdar://problem/20302662>
3260
3261         Reviewed by Anders Carlson.
3262
3263         The media controls style sheets are injected as UA stylesheets
3264         when we come across a <video> or <audio> element. These stylesheets
3265         have a different parsing context than the document stylesheets -
3266         one that uses the default constructor, which initializes some
3267         features like cssCompositingEnabled to false without checking
3268         the runtime state.
3269
3270         The easy fix is to use the global state to initialize the context.
3271
3272         Unfortunately we can't test this since it only occurs in the shadow
3273         tree.
3274
3275         * css/CSSParser.cpp:
3276         (WebCore::CSSParserContext::CSSParserContext): Check the state
3277         of RuntimeEnabledFeatures to initialize CSS Regions and
3278         CSS Compositing (Blending).
3279
3280 2015-03-25  Chris Fleizach  <cfleizach@apple.com>
3281
3282         AX: table cells that use display:block render the table inaccessible to VoiceOver
3283         https://bugs.webkit.org/show_bug.cgi?id=143007
3284
3285         Reviewed by Mario Sanchez Prada.
3286
3287         When display:block is used on a table cell, it was being ignored because it was anonymous.
3288         This is still a valid scenario however if it's still inside of a valid table.
3289
3290         Test: accessibility/table-cell-display-block.html
3291
3292         * accessibility/AccessibilityTableCell.cpp:
3293         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
3294
3295 2015-03-25  Tim Horton  <timothy_horton@apple.com>
3296
3297         Add a preference to prevent "user-scalable=no" from having any effect
3298         https://bugs.webkit.org/show_bug.cgi?id=143032
3299
3300         Reviewed by Sam Weinig.
3301
3302         * page/ViewportConfiguration.cpp:
3303         (WebCore::ViewportConfiguration::ViewportConfiguration):
3304         (WebCore::ViewportConfiguration::allowsUserScaling):
3305         * page/ViewportConfiguration.h:
3306         (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
3307         If forceAlwaysUserScalable is set to true, force "user-scalable=yes".
3308
3309 2015-03-25  Dan Bernstein  <mitz@apple.com>
3310
3311         Another attempt to get the iOS EWS building again.
3312
3313         * WebCore.xcodeproj/project.pbxproj:
3314
3315 2015-03-25  Alex Christensen  <achristensen@webkit.org>
3316
3317         Add case-insensitive checks to DFA bytecode.
3318         https://bugs.webkit.org/show_bug.cgi?id=142977
3319
3320         Reviewed by Benjamin Poulain.
3321
3322         * contentextensions/DFABytecode.h:
3323         (WebCore::ContentExtensions::instructionSizeWithArguments):
3324         * contentextensions/DFABytecodeCompiler.cpp:
3325         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
3326         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
3327         Add case-insensitive bytecode.
3328         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
3329         Check to see if case-insensitive bytecodes can be used.
3330         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
3331         * contentextensions/DFABytecodeCompiler.h:
3332         (WebCore::ContentExtensions::DFABytecodeCompiler::Range::Range):
3333         Added Range structure to be able to count the ranges in a future patch deciding if we want to use jump tables.
3334         * contentextensions/DFABytecodeInterpreter.cpp:
3335         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3336         Interpret case-insensitive bytecodes.
3337
3338 2015-03-25  Sam Weinig  <sam@webkit.org>
3339
3340         Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
3341
3342         * contentextensions/ContentExtensionCompiler.cpp:
3343         (WebCore::ContentExtensions::compileRuleList):
3344         * contentextensions/ContentExtensionCompiler.h:
3345         * contentextensions/ContentExtensionParser.cpp:
3346         (WebCore::ContentExtensions::getTypeFlags):