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