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