Unreviewed, remove empty directories.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-02-13  Csaba Osztrogonác  <ossy@webkit.org>
2
3         Unreviewed, remove empty directories.
4
5         * loader/icon/wince: Removed.
6         * platform/graphics/wince: Removed.
7         * storage/wince: Removed.
8
9 2015-02-12  Timothy Horton  <timothy_horton@apple.com>
10
11         Crashes under detectItemAroundHitTestResult when DataDetectors is not available
12         https://bugs.webkit.org/show_bug.cgi?id=141549
13         <rdar://problem/19180955>
14
15         Reviewed by Dan Bernstein.
16
17         * editing/mac/DataDetection.mm:
18         (WebCore::DataDetection::detectItemAroundHitTestResult):
19         Bail out from data detection if either of the relevant frameworks aren't loaded.
20
21 2015-02-12  Dean Jackson  <dino@apple.com>
22
23         [iOS Media] Audio should hide timeline scrubber until playback starts
24         https://bugs.webkit.org/show_bug.cgi?id=141542
25         <rdar://problem/19820685>
26
27         Reviewed by Eric Carlson.
28
29         We regressed from the system behaviour in iOS 7, where the timeline
30         scrubber for an audio element is not shown until the user starts
31         playback.
32
33         * Modules/mediacontrols/mediaControlsiOS.css:
34         (video::-webkit-media-controls-panel): Fix the alignment of the flexbox.
35         (audio::-webkit-media-controls-status-display): Add the style for the status display.
36         * Modules/mediacontrols/mediaControlsiOS.js:
37         (ControllerIOS.prototype.configureInlineControls): Start hidden if we are an <audio>.
38         (ControllerIOS.prototype.configureFullScreenControls): Drive by comment change.
39         (ControllerIOS.prototype.setPlaying): Unhide the timeline.
40
41 2015-02-12  Chris Dumez  <cdumez@apple.com>
42
43         Drop the quirks-mode exception for CSS MIME types
44         https://bugs.webkit.org/show_bug.cgi?id=141501
45
46         Reviewed by Alexey Proskuryakov.
47
48         Drop the quirks-mode exception for CSS MIME types.
49         This matches Firefox's behavior.
50
51         This patch is based on the following Blink revision:
52         http://src.chromium.org/viewvc/blink?view=revision&revision=189669
53
54         Tests:
55         - http/tests/misc/css-accept-any-type.html
56         - http/tests/security/cross-origin-css.html
57
58         * css/StyleSheetContents.cpp:
59         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
60         * dom/ProcessingInstruction.cpp:
61         (WebCore::ProcessingInstruction::setCSSStyleSheet):
62         * inspector/InspectorPageAgent.cpp:
63         (WebCore::InspectorPageAgent::cachedResourceContent):
64         * loader/cache/CachedCSSStyleSheet.cpp:
65         (WebCore::CachedCSSStyleSheet::sheetText):
66         (WebCore::CachedCSSStyleSheet::canUseSheet):
67         * loader/cache/CachedCSSStyleSheet.h:
68
69 2015-02-12  Beth Dakin  <bdakin@apple.com>
70
71         REGRESSION: Should not send wheel events with a delta of 0
72         https://bugs.webkit.org/show_bug.cgi?id=141537
73         -and corresponding-
74         rdar://problem/18903118
75
76         Reviewed by Simon Fraser.
77
78         This code should not have been removed entirely to accommodate rubber-banding, it 
79         just needs to return false instead of true in order to allow the MayBegin and 
80         Ended phases to be handled by the ElasticityController.
81         * dom/Element.cpp:
82         (WebCore::Element::dispatchWheelEvent):
83
84 2015-02-12  Dean Jackson  <dino@apple.com>
85
86         [iOS Media] Implement 3-style media timeline (buffered, played, unavailable)
87         https://bugs.webkit.org/show_bug.cgi?id=141526
88         <rdar://problem/19603337>
89
90         Reviewed by Eric Carlson and Antoine Quint.
91
92         Implement a 3-style media scrubber for iOS. This draws white for
93         the region that has been played (before the playhead), black
94         for the region that is buffered, and is hollow for the rest.
95
96         * Modules/mediacontrols/mediaControlsApple.js:
97         (Controller.prototype.updateProgress): Update progress is now completely
98         shared between OS X and iOS. This calls the implementation specific
99         drawTimelineBackground.
100         (Controller.prototype.drawTimelineBackground): Move the OS X code to here.
101         * Modules/mediacontrols/mediaControlsiOS.css:
102         (audio::-webkit-media-controls-timeline): New styles for the timeline. Updated thumb image, etc.
103         (video::-webkit-media-controls-timeline::-webkit-slider-runnable-track):
104         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
105         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb:active):
106         (video::-webkit-media-controls-time-remaining-display):
107         * Modules/mediacontrols/mediaControlsiOS.js:
108         (ControllerIOS): Create a globally unique canvas context name in the constructor.
109         (ControllerIOS.prototype.createControls): Set the background of the timeline to a canvas.
110         (ControllerIOS.prototype.addRoundedRect): Helper function.
111         (ControllerIOS.prototype.drawTimelineBackground): Draw the 3-style content.
112         (ControllerIOS.prototype.updateProgress): Deleted.
113
114 2015-02-12  Daniel Bates  <dabates@apple.com>
115
116         Fix some Mac linker warnings
117         https://bugs.webkit.org/show_bug.cgi?id=141522
118
119         Reviewed by Alex Christensen.
120
121         Following <https://trac.webkit.org/changeset/179945>, the linker warns about the following hidden WebCore symbols:
122         
123         ld: warning: cannot export hidden symbol __ZN7WebCore20LogNotYetImplementedE from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/Logging.o
124         ld: warning: cannot export hidden symbol _wkCreateURLPasteboardFlavorTypeName from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCoreSystemInterface.o
125         ld: warning: cannot export hidden symbol _wkCreateURLNPasteboardFlavorTypeName from /.../OpenSource/WebKitBuild/WebCore.build/Debug/WebCore.build/Objects-normal/x86_64/WebCoreSystemInterface.o
126
127         * WebCore.exp.in: Remove symbols for functions wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName.
128         * platform/Logging.h: Export WTFLogChannel for LogNotYetImplemented, which is referenced from
129         notImplementedLoggingChannel() in file NotImplemented.cpp. We make use of the associated
130         header, NotImplemented.h, in both WebKit and WebKit2.
131         * platform/mac/WebCoreSystemInterface.mm: Remove declarations for functions
132         wkCreateURLPasteboardFlavorTypeName and wkCreateURLNPasteboardFlavorTypeName that
133         were inadvertently not removed in r25494.
134
135 2015-02-12  Joseph Pecoraro  <pecoraro@apple.com>
136
137         Web Inspector: Crash inspecting styles of element with mutated stylesheet
138         https://bugs.webkit.org/show_bug.cgi?id=141451
139
140         Reviewed by Timothy Hatcher.
141
142         Test: inspector/css/stylesheet-with-mutations.html
143
144         * css/CSSStyleSheet.h:
145         * css/CSSStyleSheet.cpp:
146         (WebCore::CSSStyleSheet::CSSStyleSheet):
147         (WebCore::CSSStyleSheet::didMutateRules):
148         Keep a flag on the CSSStyleSheet to know when it has had a rule
149         mutation from the contents.
150
151         * inspector/InspectorStyleSheet.h:
152         * inspector/InspectorStyleSheet.cpp:
153         (WebCore::InspectorStyleSheet::reparseStyleSheet):
154         When completely replacing the stylesheet's contents, we will have
155         destroyed any previous rules, so clear the has mutations flag.
156
157         (WebCore::selectorsFromSource):
158         Previously there was a mismatch between the rules the parsed
159         SourceData had, and the actual CSSSelectors we were iterating.
160         We use the SourceData so we can get the exact user authored
161         text instead of generated longhands from actualy selector objects.
162         Add an ASSERT and bail to catch and more gracefully handle
163         any possible mismatches in the future.
164
165         (WebCore::InspectorStyleSheet::styleSheetMutated):
166         (WebCore::InspectorStyleSheet::ensureParsedDataReady):
167         When a CSSStyleSheet has been mutated beyond the inspector's
168         knowledge right now, fall back to readonly generated selectors.
169         We should better handle this in the future:
170         <https://webkit.org/b/141450> Web Inspector: Better support for CSSOM StyleSheet mutations (insertRule/deleteRule)
171
172 2015-02-12  Commit Queue  <commit-queue@webkit.org>
173
174         Unreviewed, rolling out r179987.
175         https://bugs.webkit.org/show_bug.cgi?id=141525
176
177         caused debug tests to fail (Requested by alexchristensen on
178         #webkit).
179
180         Reverted changeset:
181
182         "[CSS Grid Layout] Invalid initialization of track sizes with
183         non spanning grid items"
184         https://bugs.webkit.org/show_bug.cgi?id=140763
185         http://trac.webkit.org/changeset/179987
186
187 2015-02-12  Brian J. Burg  <burg@cs.washington.edu>
188
189         REGRESSION(r178060): empty arguments are passed when logging to system console
190         https://bugs.webkit.org/show_bug.cgi?id=141511
191
192         Reviewed by Timothy Hatcher.
193
194         * page/PageConsoleClient.cpp:
195         (WebCore::PageConsoleClient::messageWithTypeAndLevel): Change premature move to copyRef.
196
197 2015-02-12  Alex Christensen  <achristensen@webkit.org>
198
199         [Win] Unreviewed debug build fix after r179980.
200
201         * svg/SVGSVGElement.cpp:
202         (WebCore::SVGSVGElement::currentViewportSize):
203         Explicitly call constructor.
204
205 2015-01-23  Sergio Villar Senin  <svillar@igalia.com>
206
207         [CSS Grid Layout] Invalid initialization of track sizes with non spanning grid items
208         https://bugs.webkit.org/show_bug.cgi?id=140763
209
210         Reviewed by Antti Koivisto.
211
212         Content sized tracks with non-spanning grid items were not
213         properly sized because the growth limit was sometimes infinity
214         (-1) after calling resolveContentBasedTrackSizingFunctions() when
215         it should not. This patch adds an special initialization phase for
216         non-spanning grid items as the new track sizing algorithm
217         describes.
218
219         Granted, that was handled in the old algorithm in
220         distributeSpaceToTracks() as a special case. The problem is that
221         it regressed after the optimization added in r173868 because that
222         method is no longer called when the space to distribute is 0.
223
224         That's why we could fix this by allowing calls to
225         distributeSpaceToTracks() with spaceToDistribute>=0 but by fixing
226         it with an explicit initialization our implementation becomes
227         closer to the new algorithm and the initialization is now explicit
228         in the code instead of a side effect of calling
229         distributeSpaceToTracks() with no space to be distributed. It also
230         brings a slight performance improvement as we save sorts and hash
231         lookups.
232
233         I also took the change to add caching to several GridTrackSize
234         methods that were hot on the profiler (each one accounted for ~1%
235         of the total time, now they account for ~0.3% each).
236
237         Test: fast/css-grid-layout/grid-initialize-span-one-items.html
238
239         * rendering/RenderGrid.cpp:
240         (WebCore::GridItemWithSpan::span): New helper method for ASSERTs.
241         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
242         Exclude non spanning grid items from the calls to
243         resolveContentBasedTrackSizingFunctionsForItems().
244         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
245         New method to resolve track sizes only using non-spanning grid
246         items.
247         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
248         Ensure that it isn't called for non-spanning grid items.
249         * rendering/RenderGrid.h:
250         * rendering/style/GridTrackSize.h:
251         (WebCore::GridTrackSize::GridTrackSize): Cache return values.
252         (WebCore::GridTrackSize::setLength): Ditto.
253         (WebCore::GridTrackSize::setMinMax): Ditto.
254         (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes): New method
255         that caches the return values for hasXXXTrackBreadth() methods.
256         (WebCore::GridTrackSize::hasMinOrMaxContentMinTrackBreadth): Use
257         the cached return value.
258         (WebCore::GridTrackSize::hasMaxContentMaxTrackBreadth): Ditto.
259         (WebCore::GridTrackSize::hasMinContentMaxTrackBreadth): Ditto.
260         (WebCore::GridTrackSize::hasMinOrMaxContentMaxTrackBreadth): Ditto.
261         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadth): Ditto.
262         (WebCore::GridTrackSize::hasMinContentMinTrackBreadth): Ditto.
263         (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
264         Ditto.
265         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
266         Ditto.
267
268 2015-02-12  Zan Dobersek  <zdobersek@igalia.com>
269
270         Remove the USE(ACCELERATED_COMPOSITING) guard from the
271         MediaPlayerPrivateGStreamerBase destructor.
272
273         The guard was removed in r163079. It was still defined through CMake
274         for the EFL and GTK ports when the guarded code was introduced in
275         r172828. In r171741 the macro was finally removed for the GTK and EFL
276         ports as well, but the guards for the affected code weren't updated
277         so TextureMapperPlatformLayer::Client::platformLayerWillBeDestroyed()
278         wasn't being called anymore.
279
280         Rubber-stamped by Philippe Normand.
281
282         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
283         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
284
285 2015-02-11  Darin Adler  <darin@apple.com>
286
287         Streamline and simplify SVGSVGElement and related classes
288         https://bugs.webkit.org/show_bug.cgi?id=141463
289
290         Reviewed by Antti Koivisto.
291
292         * dom/Document.cpp: Removed unneeded include of SVGSVGElement.h.
293         * loader/FrameLoader.cpp: Ditto.
294         * rendering/RenderBoxModelObject.cpp: Ditto.
295         * rendering/svg/RenderSVGForeignObject.cpp: Ditto.
296         * svg/SVGImageElement.cpp: Ditto.
297         * svg/SVGMarkerElement.cpp: Ditto.
298         * svg/SVGPathElement.cpp: Ditto.
299         * svg/SVGPatternElement.cpp: Ditto.
300         * svg/SVGTransform.cpp: Ditto.
301
302         * page/FrameView.cpp:
303         (WebCore::FrameView::scrollToAnchor): Updated to call the SVGSVGElement function
304         named scrollToAnchor (was setupInitialView). Also refactored to avoid repeating
305         the expression frame().document() so often.
306
307         * platform/graphics/FloatSize.h: Added operator/.
308
309         * svg/SVGDocument.cpp:
310         (WebCore::SVGDocument::rootElement): Rearranged to use early return.
311         (WebCore::SVGDocument::zoomAndPanEnabled): Ditto.
312         (WebCore::SVGDocument::startPan): Ditto. Also used FloatPoint math instead
313         of breaking things apart into x and y.
314         (WebCore::SVGDocument::updatePan): Ditto.
315
316         * svg/SVGDocument.h: Removed some unneeded includes and forward declarations.
317         Moved function bodies out of the class to make it more readable. Renamed
318         m_translate to m_panningOffset and made it a FloatSize instead of FloatPoint.
319
320         * svg/SVGDocumentExtensions.cpp:
321         (WebCore::SVGDocumentExtensions::startAnimations): Use a modern for loop
322         and update since timeContainer() now returns a reference.
323
324         * svg/SVGSVGElement.cpp: Removed many unneeded includes.
325         (WebCore::SVGSVGElement::SVGSVGElement): Moved initialization of scalars to
326         the class definition. Updated since m_timerContainer is a Ref (later should
327         change it to be a std::unique_ptr or just directly contained in SVGSVGElement).
328         (WebCore::SVGSVGElement::~SVGSVGElement): Removed comment that doesn't say much,
329         but is worded in a confusing way.
330         (WebCore::SVGSVGElement::contentScriptType): Use NeverDestroyed instead of
331         DEPRECATED_DEFINE_STATIC_LOCAL.
332         (WebCore::SVGSVGElement::contentStyleType): Ditto.
333         (WebCore::SVGSVGElement::viewport): Streamlined a bit.
334         (WebCore::SVGSVGElement::pixelUnitToMillimeterX): Ditto.
335         (WebCore::SVGSVGElement::pixelUnitToMillimeterY): Ditto.
336         (WebCore::SVGSVGElement::currentView): Changed to return a reference.
337         (WebCore::SVGSVGElement::frameForCurrentScale): Added. Helper for the two
338         functions below.
339         (WebCore::SVGSVGElement::currentScale): Updated to use frameForCurrentScale.
340         (WebCore::SVGSVGElement::setCurrentScale): Ditto.
341         (WebCore::SVGSVGElement::setCurrentTranslate): Optimized the case where there
342         is no change to the translation. Also changed the data member's name to
343         m_currentTranslate to more directly match the DOM API naming.
344         (WebCore::SVGSVGElement::parseAttribute): Simplified the parsing a bit, and
345         changed to pass a reference to SVGZoomAndPan::parseAttribute.
346         (WebCore::SVGSVGElement::svgAttributeChanged): Tweaked formatting and removed
347         code that converts the renderer pointer to a RenderObject* unnecessarily.
348         (WebCore::SVGSVGElement::suspendRedraw): Removed FIXME about implementing this,
349         since we don't really plan to do that.
350         (WebCore::SVGSVGElement::unsuspendRedraw): Ditto.
351         (WebCore::SVGSVGElement::unsuspendRedrawAll): Ditto.
352         (WebCore::SVGSVGElement::forceRedraw): Ditto.
353         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList): Changed return
354         type to Ref, and pass in a function instead of an enumeration value.
355         (WebCore::SVGSVGElement::getIntersectionList): Updated for above.
356         (WebCore::SVGSVGElement::getEnclosureList): Ditto.
357         (WebCore::SVGSVGElement::checkIntersection): Use && instead of early return
358         for the null check.
359         (WebCore::SVGSVGElement::checkEnclosure): Ditto.
360         (WebCore::SVGSVGElement::createSVGLength): Use initialization list syntax
361         for greater brevity.
362         (WebCore::SVGSVGElement::createSVGAngle): Ditto.
363         (WebCore::SVGSVGElement::createSVGPoint): Ditto.
364         (WebCore::SVGSVGElement::createSVGMatrix): Ditto.
365         (WebCore::SVGSVGElement::createSVGRect): Ditto.
366         (WebCore::SVGSVGElement::createSVGTransform): Removed unneeded explicit
367         constructor invocation.
368         (WebCore::SVGSVGElement::createSVGTransformFromMatrix): Removed unneeded cast.
369         (WebCore::SVGSVGElement::insertedInto): Updated since timeContainer() now
370         returns a reference.
371         (WebCore::SVGSVGElement::setCurrentTime): Use isfinite instead of isnan, so
372         we won't store infinity as the current time.
373         (WebCore::SVGSVGElement::currentViewBoxRect): Renamed locals and changed
374         to use initializer lists for brevity.
375         (WebCore::SVGSVGElement::currentViewportSize): Streamlined code by using
376         initializer lists, using local variables only for things used more than once,
377         and using the / operator defined above.
378         (WebCore::SVGSVGElement::viewBoxToViewTransform): Use the concatenate function
379         in a way that is more straightforward, rather than doing it with a temporary.
380         (WebCore::SVGSVGElement::scrollToAnchor): Renamed this from
381         setupInitialView.
382         (WebCore::SVGSVGElement::inheritViewAttributes): Changed this to work with
383         references rather than pointers.
384         (WebCore::SVGSVGElement::getElementById): Use getAllElementsById as the
385         FIXME comment suggested for better efficiency when there are a lot of descendants
386         of the <svg> element at the cost of making it less efficient if there are
387         a lot of elements all with the desired ID, but not inside the <svg> element.
388         (WebCore::SVGSVGElement::isValid): Moved here from the header.
389
390         * svg/SVGSVGElement.h: Removed unneeded forward declarations. Moved the
391         animated properties to the top of the file, then other DOM, the other
392         public members. Changed return types to references and Ref. Moved
393         function bodies out of the class definition. Made createSVGNumber inline.
394
395         * svg/SVGViewElement.cpp: Removed unneeded includes.
396         (WebCore::SVGViewElement::isSupportedAttribute): Deleted.
397         (WebCore::SVGViewElement::parseAttribute): Changed to not rely on
398         isSupportedAttribute. Eventually I will do this in all the SVG classes.
399
400         * svg/SVGViewSpec.cpp: Removed unneeded include of SVGSVGElement.h.
401         (WebCore::SVGViewSpec::parseViewSpec): Updated for change in the name
402         of the parse function in the SVGZoomAndPan class.
403
404         * svg/SVGZoomAndPan.cpp:
405         (WebCore::SVGZoomAndPan::isKnownAttribute): Deleted.
406         (WebCore::SVGZoomAndPan::addSupportedAttributes): Deleted.
407         (WebCore::SVGZoomAndPan::parse): Renamed from parseZoomAndPan since
408         this is a member of the SVGZoomAndPan class and also has an argument
409         of SVGZoomAndPanType.
410         (WebCore::SVGZoomAndPan::parseAttributeValue): Added. Helper so the
411         template function is not so big. Also write it in a simpler way.
412         (WebCore::SVGZoomAndPan::ref): Deleted.
413         (WebCore::SVGZoomAndPan::deref): Deleted.
414         (WebCore::SVGZoomAndPan::setZoomAndPan): Deleted.
415
416         * svg/SVGZoomAndPan.h: Removed unneeded includes. Reformatted the enum.
417         Moved function bodies out of the class definition. Removed many unneeded
418         functions.
419
420         * svg/animation/SVGSMILElement.cpp:
421         (WebCore::SVGSMILElement::insertedInto): Updated since timeContainer
422         now returns a reference rather than a pointer.
423
424 2015-02-11  Darin Adler  <darin@apple.com>
425
426         SVGUseElement follow-up improvements
427         https://bugs.webkit.org/show_bug.cgi?id=141382
428
429         Reviewed by Antti Koivisto.
430
431         * loader/cache/CachedSVGDocumentClient.h: Removed unneeded forward declaration.
432
433         * page/EventHandler.cpp: Removed unneeded include of SVGUseElement.h.
434         * rendering/svg/RenderSVGViewportContainer.cpp: Ditto.
435
436         * svg/SVGDocumentExtensions.cpp:
437         (WebCore::SVGDocumentExtensions::clearTargetDependencies): Removed too-specific
438         check that assumed that SVG elements in shadow trees are always for <use> elements.
439         This amounted to an unneeded optimization that could be removed with no bad effect.
440
441         * svg/SVGElement.cpp:
442         (WebCore::SVGElement::correspondingElement): Removed the assertions so this could
443         be used more freely outside of cases where the shadow tree state is fully consistent.
444         It's fine to have this just be a mechanical getter; there's nothing super-tricky
445         here that needs to be caught by the assertion.
446         (WebCore::SVGElement::title): Removed unneeded special handling for titles inside
447         the shadow tree.
448
449         * svg/SVGGElement.cpp:
450         (WebCore::SVGGElement::create): Added an overload that doesn't require explicitly
451         passing in the tag name.
452         * svg/SVGGElement.h: Ditto.
453         * svg/SVGSVGElement.cpp:
454         (WebCore::SVGSVGElement::create): Ditto.
455         * svg/SVGSVGElement.h: Ditto.
456
457         * svg/SVGUseElement.cpp: Removed a lot of unneeded includes.
458         (WebCore::SVGUseElement::SVGUseElement): Removed code to initialize some booleans.
459         We do that in the class definition now.
460         (WebCore::SVGUseElement::create): Removed the code that calls the
461         ensureUserAgentShadowRoot function unconditionally. That's properly done when
462         needed; no need to do it here.
463         (WebCore::SVGUseElement::~SVGUseElement): Removed unneeded code to destroy the
464         shadow tree (that happens automatically) and simplified the code to stop loading
465         the external document.
466         (WebCore::SVGUseElement::isSupportedAttribute): Deleted.
467         (WebCore::SVGUseElement::parseAttribute): Simplified this. Removed assumptions
468         about the intersection of various sets of attributes, and also removed the
469         isSupportedAttribute function. This seems to serve no purpose here, or in any
470         other SVG element class. I plan to remove it everywhere over time.
471         (WebCore::isWellFormedDocument): Deleted.
472         (WebCore::SVGUseElement::insertedInto): Simplified code by removing all the
473         special cases during initial parsing, and did the invalidation here rather than
474         deferring it to didNotifySubtreeInsertions. Added a call to the new function,
475         updateExternalDocument, since that won't do anything when the element is not
476         in a document.
477         (WebCore::SVGUseElement::didNotifySubtreeInsertions): Deleted.
478         (WebCore::SVGUseElement::removedFrom): Added code to call clearShadowTree and
479         updateExternalDocument. Both are efficient when doing nothing, and both are
480         appropriate since the element is no longer in a document.
481         (WebCore::SVGUseElement::referencedDocument): Deleted. No longer needed.
482         (WebCore::SVGUseElement::externalDocument): Streamlined the logic here, removing
483         multiple unneeded checks.
484         (WebCore::SVGUseElement::transferSizeAttributesToTargetClone): Renamed since
485         "target clone" is clear enough within this class, without explicitly stating
486         "shadow tree". All the clones are in the shadow tree.
487         (WebCore::SVGUseElement::svgAttributeChanged): Removed unneeded code calling
488         isSupportedAttribute. Changed the code that detects changes in href to just
489         call updateExternalDocument (for the document URL) and invalidateShadowTree
490         (for the fragment). Also updated the transferSizeAttributesToTargetClone logic
491         to only trigger on width and height and updated names.
492         (WebCore::SVGUseElement::willAttachRenderers): Updated for the new name of
493         m_shouldRebuildShadowTree and added a call through to the base class.
494         (WebCore::createAllowedElementSet): Added. A more efficient way to implement
495         the initialization of the set for isDisallowedElement.
496         (WebCore::isDisallowedElement): Simplified this by using the function above,
497         and also overloaded for both SVGElement and Element for a tiny efficiency boost.
498         (WebCore::SVGUseElement::clearShadowTree): Renamed form clearResourceReferences.
499         This is a much more straightforward name. Also deleted the code that sets the
500         m_needsShadowTreeRecreation flag to false. That should be done by the build
501         function, not here.
502         (WebCore::SVGUseElement::buildPendingResource): Made this just invalidate the
503         shadow tree now instead of explicitly building it.
504         (WebCore::SVGUseElement::updateShadowTree): Moved the code to create a shadow
505         tree here from buildPendingResource. ALso changed the logic so that we
506         always blow away the old shadow tree. Moved the comment about rebuilding things
507         every time here. Updated the code to use the findTarget and cloneTarget functions,
508         eliminating the buildShadowTree function entirely. Moved the call to
509         transferSizeAttributesToShadowTreeTargetClone inside cloneTarget. Also updated
510         for the name change for m_shouldRebuildShadowTree.
511         (WebCore::SVGUseElement::targetClone): Renamed from shadowTreeTargetClone.
512         No need to emphasize "shadow tree" since that's where all clones are.
513         (WebCore::isDirectReference): Streamlined a bit using "using namespace".
514         (WebCore::SVGUseElement::toClipPath): Rewrote to use early return and updated
515         for name changes. Also used ASCIILiteral.
516         (WebCore::SVGUseElement::rendererClipChild): Changed local variable names.
517         (WebCore::removeDisallowedElementsFromSubtree): Wrote the iteration in a
518         slightly more idiomatic style.
519         (WebCore::SVGUseElement::findTarget): Added. This new function implements
520         the rule for finding a valid target for a use element. This replaces logic
521         that was duplicated in two different places and it also includes all the
522         rules that were formerly in the isValidTarget function. Also, this implements
523         a correct check for a cycle that handles cases the code in isValidTarget did not.
524         (WebCore::SVGUseElement::isValidTarget): Deleted.
525         (WebCore::SVGUseElement::cloneTarget): Added. Helper function used both when
526         cloning the target of the top level <use> elements and for other <use> elements
527         inside the shadow tree.
528         (WebCore::cloneDataAndChildren): Added. Helper function that allows both the
529         <use> and <symbol> element expanding functions to be shorter and share more code.
530         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Removed unneeded checks
531         of cachedDocumentIsStillLoading. Used the new findTarget function, which handles
532         finding the target cross-document correctly. Removed the incorrect use of
533         referencedDocument when creating new elements and finding targets. Refactored
534         to use the new cloneDataAndChildren function and also moved the code that removes
535         the special attributes here, replacing the transferAttributesToShadowTreeReplacement
536         function. Made a few other simplifications.
537         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Ditto, just like the
538         <use> changes only simpler.
539         (WebCore::SVGUseElement::transferEventListenersToShadowTree): Made this const.
540         Removed unneeded assertions.
541         (WebCore::SVGUseElement::invalidateShadowTree): Updated for name change.
542         (WebCore::SVGUseElement::invalidateDependentShadowTrees): Removed assertion.
543         (WebCore::SVGUseElement::transferAttributesToShadowTreeReplacement): Deleted.
544         (WebCore::SVGUseElement::selfHasRelativeLengths): Tweaked names.
545         (WebCore::SVGUseElement::notifyFinished): Removed the inDocument check, since
546         this function will only be called for elements that are in a document.
547         (WebCore::SVGUseElement::cachedDocumentIsStillLoading): Deleted.
548         (WebCore::SVGUseElement::finishParsingChildren): Removed the code that calls
549         buildPendingResource here. Shadow tree updating is driven solely by renderer
550         generation now.
551         (WebCore::SVGUseElement::updateExternalDocument): Replaced setCachedDocument
552         with this. This function knows how to load a different document if the URL
553         has changed, or leave it alone if not, and also stop the load if it should.
554         (WebCore::SVGUseElement::isValid): Moved this here from the header, since it's
555         always being called virtually.
556         (WebCore::SVGUseElement::haveLoadedRequiredResources): Ditto.
557         (WebCore::SVGUseElement::setHaveFiredLoadEvent): Ditto.
558         (WebCore::SVGUseElement::haveFiredLoadEvent): Ditto.
559         (WebCore::SVGUseElement::svgLoadEventTimer): Ditto.
560
561         * svg/SVGUseElement.h: Removed unneeded include. Moved the animated properties
562         to the top of the class because they are public DOM API and so are logical to
563         list first. I'd like to do that for other classes too over time. Changed to
564         derive privately from CachedSVGDocumentClient. Made the function
565         invalidateDependentShadowTrees private. Removed didNotifySubtreeInsertions,
566         isSupportedAttribute, clearResourceReferences, buildShadowTree,
567         transferAttributesToShadowTreeReplacement, isParserInserted, and
568         m_wasInsertedByParser. Added updateExternalDocument, cloneTarget, targetClone,
569         updateShadowTree, and clearShadowTree. Also did a couple other renames,
570         including renaming m_cachedDocument to m_externalDocument.
571
572         * svg/svgtags.in: Removed constructorNeedsCreatedByParser from the <use>
573         element since we don't have to handle constructing by the parser specially.
574
575 2015-02-11  Dhi Aurrahman  <diorahman@rockybars.com>
576
577         CSS selector JIT compilation support for :lang()
578         https://bugs.webkit.org/show_bug.cgi?id=140818
579
580         Reviewed by Benjamin Poulain.
581
582         Add the JIT support for :lang(), to ensure :lang() no longer force the engine to
583         the slow path.
584
585         Test: fast/selectors/lang-chained-multiple.html
586
587         * cssjit/SelectorCompiler.cpp:
588         (WebCore::SelectorCompiler::addPseudoClassType):
589         Get rid of the FunctionType::CannotCompile
590         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
591         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
592
593 2015-02-11  Alex Christensen  <achristensen@webkit.org>
594
595         Fix more weak external symbol errors.
596
597         * bindings/scripts/CodeGeneratorJS.pm:
598         (GenerateHeader):
599         * page/make_settings.pl:
600         (printGetterAndSetter):
601         Remove some WEBCORE_EXPORT macros.
602
603 2015-02-11  Alex Christensen  <achristensen@webkit.org>
604
605         Do not export functions defined in headers.
606         This prevents weak external symbol errors in some configurations.
607
608         * dom/Range.h:
609         (WebCore::Range::startContainer):
610         (WebCore::Range::startOffset):
611         (WebCore::Range::endContainer):
612         (WebCore::Range::endOffset):
613         * inspector/InspectorController.h:
614         * page/Settings.h:
615         (WebCore::Settings::setMediaKeysStorageDirectory):
616         * page/make_settings.pl:
617         (printGetterAndSetter):
618         * platform/network/cocoa/ProtectionSpaceCocoa.h:
619         (WebCore::ProtectionSpace::encodingRequiresPlatformData):
620         * platform/text/TextEncoding.h:
621         (WebCore::TextEncoding::decode):
622         Removed WEBCORE_EXPORT macros.
623
624 2015-02-11  Chris Dumez  <cdumez@apple.com>
625
626         [WK2] Add logging to validate the network cache efficacy (Part 2)
627         https://bugs.webkit.org/show_bug.cgi?id=141345
628         <rdar://problem/19632080>
629
630         Reviewed by Sam Weinig.
631
632         Add a few more diagnostic logging keys for the network cache efficacy
633         logging.
634
635 2015-02-11  Sam Weinig  <sam@webkit.org>
636
637         REGRESSION(r179166): Crash when accessing document.dir on a document with no elements
638         <rdar://problem/19804351>
639         https://bugs.webkit.org/show_bug.cgi?id=141480
640
641         Reviewed by Chris Dumez.
642
643         Test: fast/dom/document-dir-empty-document-crash.html
644
645         * html/HTMLDocument.cpp:
646         (WebCore::HTMLDocument::dir):
647         Don't unnecessarily dereference the documentElement. is<HTMLHtmlElement>() will handle null just fine.
648
649 2015-02-11  Mark Rowe  <mrowe@apple.com>
650
651         <https://webkit.org/b/141492> extract-localizable-strings.pl shouldn't update the target file if the contents haven't changed
652
653         Avoid updating the target file if the contents haven't changed. This prevents Xcode from copying the identical
654         file into the framework and resigning it, which avoids the resulting relinking of all targets that depend on
655         the framework.
656
657         Reviewed by Dan Bernstein.
658
659         * extract-localizable-strings.pl: Write our output to a temporary file. If the output differs from the
660         existing contents of the target file, move the temporary file over the target file. Otherwise, delete
661         the temporary file.
662
663 2015-02-11  Chris Dumez  <cdumez@apple.com>
664
665         Turn recent assertions into release assertions to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
666         https://bugs.webkit.org/show_bug.cgi?id=141484
667         <rdar://problem/13811738>
668
669         Reviewed by Andy Estes.
670
671         Turn recent assertions into release assertions to help track down crash in
672         DocumentLoader::stopLoadingForPolicyChange(). This should increase the
673         likelyhood of tripping them so that we better understand why this happens.
674
675         * loader/DocumentLoader.cpp:
676         (WebCore::DocumentLoader::~DocumentLoader):
677         (WebCore::DocumentLoader::detachFromFrame):
678
679 2015-02-11  Jer Noble  <jer.noble@apple.com>
680
681         [MSE] SampleMap::addRange() returns an inverted iterator_range, possibly causing a crash when that iterator_range is traversed.
682         https://bugs.webkit.org/show_bug.cgi?id=141479
683         rdar://problem/19067597
684
685         Reviewed by Chris Dumez.
686
687         When looking backwards through a presentationOrder map to find samples, we then reverse our iterators
688         and put them in an iterator_range to return to the caller. But in addition to reversing the iterators
689         themselves, we also need to put them in the iterator_range in reverse order, so that when the caller
690         iterates from iterator_range.first -> iterator_range.second, they don't end up off the end of the
691         the underlying storage.
692
693         * Modules/mediasource/SampleMap.cpp:
694         (WebCore::PresentationOrderSampleMap::findSamplesWithinPresentationRangeFromEnd):
695
696 2015-02-11  Simon Fraser  <simon.fraser@apple.com>
697
698         Improve the showFrameTree() output slightly
699         https://bugs.webkit.org/show_bug.cgi?id=141482
700
701         Reviewed by Zalan Bujtas.
702
703         Have showFrameTree() show the Frame's RenderView so it can be correlated with
704         layer dumps, and show styleRecalc and needsLayout state.
705
706         * page/FrameTree.cpp:
707         (printFrames):
708         * page/FrameView.cpp:
709         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): Add an explanatory
710         comment about why we don't walk the Frame tree.
711
712 2015-02-11  Alex Christensen  <achristensen@webkit.org>
713
714         Stop using WebCore.exp.in on Mac and iOS.
715         https://bugs.webkit.org/show_bug.cgi?id=141413
716
717         Reviewed by Dan Bates.
718
719         * Configurations/Base.xcconfig:
720         Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
721         * platform/PlatformExportMacros.h:
722         Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
723
724 2015-02-11  ChangSeok Oh  <changseok.oh@collabora.com>
725
726         Div having contentEditable and display:flex cannot be edited if it is empty.
727         https://bugs.webkit.org/show_bug.cgi?id=141218
728
729         Reviewed by Ryosuke Niwa.
730
731         RenderFlexibleBox should be treated as a candidate for visible position. Visible selection
732         in an editable area is recalculated whenever an inner value of div is changed. If the inner value
733         is empty, the visible selection recalculated with DeleteSelectionCommand::m_endingPostion
734         is not correct. Because RenderBlockFlow is only considered but not RenderFlexibleBox
735         in Position::isCandidate so that a calculated ending VisiblePosition for an editable div
736         having "display : flex" goes weird and VisibleSelection is empty accordingly.
737
738         Test: fast/events/key-events-in-editable-flexbox.html
739
740         * dom/Position.cpp:
741         (WebCore::Position::isCandidate):
742
743 2015-02-11  ChangSeok Oh  <changseok.oh@collabora.com>
744
745         Activate ReliefLogger of a memory pressure handler for linux system.
746         https://bugs.webkit.org/show_bug.cgi?id=123611
747
748         Reviewed by Anders Carlsson.
749
750         Put more logs for the time when a system goes under memory pressure or viceversa.
751
752         No new tests since no engine behavior changed.
753
754         * platform/linux/MemoryPressureHandlerLinux.cpp:
755         (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent): Wait a memory pressure event
756         from cgroup in a seperated thread. Once a pressure event happens, respondToMemoryPressure()
757         would be called to get back some resources.
758         (WebCore::MemoryPressureHandler::install): Install memoryPressureHandler module
759         to make it work.
760
761 2015-02-11  Alex Christensen  <achristensen@webkit.org>
762
763         Final preparations to switch to WEBCORE_EXPORT.
764
765         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
766         Export the vtable and a function.
767
768 2015-02-11  Sam Weinig  <sam@webkit.org>
769
770         performance.now can crash if accessed from a window that has navigated
771         <rdar://problem/16892506>
772         https://bugs.webkit.org/show_bug.cgi?id=141478
773
774         Reviewed by Alexey Proskuryakov.
775
776         Test: fast/performance/performance-now-crash-on-navigated-window.html
777
778         * page/Performance.cpp:
779         (WebCore::Performance::now):
780         Check for a null frame, which can happen when the window has been navigated.
781
782 2015-02-10  Alexey Proskuryakov  <ap@apple.com>
783
784         URL::setUser and URL::setPass don't percent encode
785         https://bugs.webkit.org/show_bug.cgi?id=141453
786         rdar://problem/14844503&16551802&19623145
787
788         Reviewed by Darin Adler.
789
790         Tests: fast/url/url-credentials-escaping.html
791                http/tests/xmlhttprequest/basic-auth-credentials-escaping.html
792
793         Start adding some code that performs escaping in a way that matches the URL Standard.
794         Right now, it's only used where we failed to do any escaping at all, and over time,
795         we'll be moving towards a new implementation.
796
797         * html/URLUtils.h:
798         (WebCore::URLUtils<T>::username):
799         (WebCore::URLUtils<T>::password):
800         * platform/URL.cpp:
801         (WebCore::isSchemeFirstChar):
802         (WebCore::URL::user):
803         (WebCore::URL::pass):
804         (WebCore::URL::encodedUser):
805         (WebCore::URL::encodedPass):
806         (WebCore::URL::setUser):
807         (WebCore::URL::setPass):
808         (WebCore::encodeWithURLEscapeSequences):
809         * platform/URL.h:
810
811 2015-02-11  Alex Christensen  <achristensen@webkit.org>
812
813         Add a few more WEBCORE_EXPORT macros for debug and iOS builds.
814
815         * page/EventHandler.h:
816         * page/ios/WebEventRegion.h:
817         * platform/sql/SQLiteDatabaseTracker.h:
818
819 2015-02-11  Darin Adler  <darin@apple.com>
820
821         REGRESSION(r179476): It broke the !ENABLE(PICTURE_SIZES) build
822         https://bugs.webkit.org/show_bug.cgi?id=141327
823
824         Reviewed by Csaba Osztrogonác.
825
826         * html/parser/HTMLPreloadScanner.cpp:
827         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
828         Put #if around use of m_sizesAttribute.
829
830 2015-02-11  Commit Queue  <commit-queue@webkit.org>
831
832         Unreviewed, rolling out r179921.
833         https://bugs.webkit.org/show_bug.cgi?id=141473
834
835         caused about 30 test failures on yosemite and mavericks
836         (Requested by alexchristensen on #webkit).
837
838         Reverted changeset:
839
840         "Div having contentEditable and display:flex cannot be edited
841         if it is empty."
842         https://bugs.webkit.org/show_bug.cgi?id=141218
843         http://trac.webkit.org/changeset/179921
844
845 2015-02-11  ChangSeok Oh  <changseok.oh@collabora.com>
846
847         Div having contentEditable and display:flex cannot be edited if it is empty.
848         https://bugs.webkit.org/show_bug.cgi?id=141218
849
850         Reviewed by Ryosuke Niwa.
851
852         RenderFlexibleBox should be treated as a candidate for visible position. Visible selection
853         in an editable area is recalculated whenever an inner value of div is changed. If the inner value
854         is empty, the visible selection recalculated with DeleteSelectionCommand::m_endingPostion
855         is not correct. Because RenderBlockFlow is only considered but not RenderFlexibleBox
856         in Position::isCandidate so that a calculated ending VisiblePosition for an editable div
857         having "display : flex" goes weird and VisibleSelection is empty accordingly.
858
859         Test: fast/events/key-events-in-editable-flexbox.html
860
861         * dom/Position.cpp:
862         (WebCore::Position::isCandidate):
863
864 2015-02-11  Commit Queue  <commit-queue@webkit.org>
865
866         Unreviewed, rolling out r179910.
867         https://bugs.webkit.org/show_bug.cgi?id=141464
868
869         Caused assertions on debug bots (Requested by ap on #webkit).
870
871         Reverted changeset:
872
873         "[WK2] Add logging to validate the network cache efficacy
874         (Part 2)"
875         https://bugs.webkit.org/show_bug.cgi?id=141345
876         http://trac.webkit.org/changeset/179910
877
878 2015-02-10  Chris Dumez  <cdumez@apple.com>
879
880         Optimize MutableStyleProperties::removePropertiesInSet()
881         https://bugs.webkit.org/show_bug.cgi?id=141460
882
883         Reviewed by Andreas Kling.
884
885         Optimize MutableStyleProperties::removePropertiesInSet() by doing an
886         in-place removal of the vector properties, using the new and efficient
887         Vector::removalAllMatching().
888
889         I see a ~11% speed-up on CSS/CSSPropertySetterGetter.html performance
890         test.
891
892         This change was inspired by the following Blink revision:
893         https://src.chromium.org/viewvc/blink?view=rev&revision=189387
894
895         Test: PerformanceTests/CSS/CSSPropertySetterGetter.html
896
897         * css/StyleProperties.cpp:
898         (WebCore::MutableStyleProperties::removePropertiesInSet):
899
900 2015-02-10  Alex Christensen  <achristensen@webkit.org>
901
902         [Win] Fix debug build after r179807.
903         https://bugs.webkit.org/show_bug.cgi?id=141461
904
905         Reviewed by Benjamin Poulain.
906
907         * dom/TypedElementDescendantIterator.h:
908         Explicitly call Iterator constructor to reduce complexity when iterating descendantsOfType.
909
910 2015-02-10  Chris Dumez  <cdumez@apple.com>
911
912         [WK2] Add logging to validate the network cache efficacy (Part 2)
913         https://bugs.webkit.org/show_bug.cgi?id=141345
914
915         Reviewed by Antti Koivisto.
916
917         Add a few more diagnostic logging keys for the network cache efficacy
918         logging.
919
920 2015-02-10  Commit Queue  <commit-queue@webkit.org>
921
922         Unreviewed, rolling out r179896.
923         https://bugs.webkit.org/show_bug.cgi?id=141452
924
925         broke linking debug builds (Requested by thorton on #webkit).
926
927         Reverted changeset:
928
929         "Stop using WebCore.exp.in on Mac and iOS."
930         https://bugs.webkit.org/show_bug.cgi?id=141413
931         http://trac.webkit.org/changeset/179896
932
933 2015-02-10  Alex Christensen  <achristensen@webkit.org>
934
935         Fix bindings tests after r179886.
936
937         * bindings/scripts/test/ObjC/DOMFloat64Array.h:
938         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
939         * bindings/scripts/test/ObjC/DOMTestCallback.h:
940         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
941         * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
942         * bindings/scripts/test/ObjC/DOMTestEventTarget.h:
943         * bindings/scripts/test/ObjC/DOMTestException.h:
944         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
945         * bindings/scripts/test/ObjC/DOMTestInterface.h:
946         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
947         * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
948         * bindings/scripts/test/ObjC/DOMTestNode.h:
949         * bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
950         * bindings/scripts/test/ObjC/DOMTestObj.h:
951         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
952         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
953         * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
954         * bindings/scripts/test/ObjC/DOMattribute.h:
955         * bindings/scripts/test/ObjC/DOMreadonly.h:
956
957 2015-02-10  Alex Christensen  <achristensen@webkit.org>
958
959         Stop using WebCore.exp.in on Mac and iOS.
960         https://bugs.webkit.org/show_bug.cgi?id=141413
961
962         Reviewed by Dan Bates.
963
964         * Configurations/Base.xcconfig:
965         Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
966         * platform/PlatformExportMacros.h:
967         Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
968
969 2015-02-10  Chris Dumez  <cdumez@apple.com>
970
971         Add another assertion to help track down crash in DocumentLoader::stopLoadingForPolicyChange()
972         https://bugs.webkit.org/show_bug.cgi?id=141447
973         <rdar://problem/13811738>
974
975         Reviewed by Alexey Proskuryakov.
976
977         Add another assertion to help track down crash in
978         DocumentLoader::stopLoadingForPolicyChange().
979
980         The trace seems to hint that frameLoader() returns null when
981         stopLoadingForPolicyChange() is called. frameLoader() can only return
982         null after DocumentLoader::detachFromFrame() has been called.
983         Also, stopLoadingForPolicyChange() here is called from the
984         DocumentLoader::continueAfterContentPolicy() policy callback which
985         requires m_waitingForContentPolicy to be true. Therefore, we should
986         assert that m_waitingForContentPolicy is false when m_frame is cleared
987         in DocumentLoader::detachFromFrame().
988
989         * loader/DocumentLoader.cpp:
990         (WebCore::DocumentLoader::detachFromFrame):
991
992 2015-02-10  Alex Christensen  <achristensen@webkit.org>
993
994         Stop using WebCore.exp.in on Mac and iOS.
995         https://bugs.webkit.org/show_bug.cgi?id=141413
996
997         Reviewed by Dan Bates.
998
999         * Configurations/Base.xcconfig:
1000         Make symbols hidden by default unless exported by WEBCORE_EXPORT macros.
1001         * platform/PlatformExportMacros.h:
1002         Start using WEBCORE_EXPORT on Mac and iOS (but not Windows yet).
1003
1004 2015-02-10  Alex Christensen  <achristensen@webkit.org>
1005
1006         Add more WEBCORE_EXPORT macros for iOS.
1007         https://bugs.webkit.org/show_bug.cgi?id=141430
1008
1009         Reviewed by Tim Horton.
1010
1011         * bindings/objc/WebScriptObject.h:
1012         * bindings/scripts/CodeGeneratorObjC.pm:
1013         (GenerateHeader):
1014         * dom/Event.h:
1015         * dom/Node.h:
1016         * editing/FrameSelection.h:
1017         * html/HTMLFormControlElement.h:
1018         * html/HTMLMediaSession.h:
1019         * page/Frame.h:
1020         * page/FrameView.h:
1021         * platform/ScrollView.h:
1022         * platform/ios/PasteboardIOS.mm:
1023         * platform/ios/wak/WAKAppKitStubs.h:
1024         * platform/ios/wak/WAKClipView.h:
1025         * platform/ios/wak/WAKScrollView.h:
1026         * platform/ios/wak/WAKView.h:
1027         * platform/ios/wak/WAKWindow.h:
1028         * platform/ios/wak/WAKWindow.mm:
1029         * platform/ios/wak/WKContentObservation.h:
1030         * platform/ios/wak/WKGraphics.h:
1031         * platform/ios/wak/WebCoreThread.h:
1032         * platform/ios/wak/WebCoreThread.mm:
1033         * platform/ios/wak/WebCoreThreadRun.h:
1034         * platform/ios/wak/WebCoreThreadSystemInterface.h:
1035         * platform/network/ios/QuickLook.h:
1036         * platform/text/TextBreakIterator.h:
1037
1038 2015-02-09  David Hyatt  <hyatt@apple.com>
1039
1040         text-underline-position: under is broken
1041         https://bugs.webkit.org/show_bug.cgi?id=141400
1042         <rdar://problem/18569583>
1043
1044         Reviewed by Simon Fraser.
1045
1046         Added fast/text/text-underline-position-under.html
1047
1048         * rendering/InlineFlowBox.cpp:
1049         (WebCore::InlineFlowBox::computeMaxLogicalBottom):
1050         (WebCore::InlineFlowBox::computeMaxLogicalTop): Deleted.
1051         * rendering/InlineFlowBox.h:
1052         Switch to using the bottom to compute the offset. Using the top is incorrect, since
1053         the heights of boxes can vary.
1054
1055         Fix a bug where the y() of the box was being used instead of the logical value, making the result
1056         wrong for vertical text.
1057
1058         * rendering/RootInlineBox.cpp:
1059         (WebCore::RootInlineBox::maxLogicalBottom):
1060         (WebCore::RootInlineBox::maxLogicalTop): Deleted.
1061         Switch to using the bottom instead of the top. Make sure the root box contributes its own bottom,
1062         since the old code just ignored the root's placement.
1063
1064         * rendering/RootInlineBox.h:
1065         * style/InlineTextBoxStyle.cpp:
1066         (WebCore::computeUnderlineOffset):
1067         Call the bottom function now instead of the top.
1068
1069 2015-02-10  Chris Dumez  <cdumez@apple.com>
1070
1071         Add assertion to help track down WebCore::DocumentLoader::stopLoadingForPolicyChange() crash
1072         https://bugs.webkit.org/show_bug.cgi?id=141441
1073         <rdar://problem/13811738>
1074
1075         Reviewed by Alexey Proskuryakov.
1076
1077         Add assertion to help track down a crash in
1078         WebCore::DocumentLoader::stopLoadingForPolicyChange().
1079
1080         * loader/DocumentLoader.cpp:
1081         (WebCore::DocumentLoader::~DocumentLoader):
1082         Make sure the DocumentLoader is not waiting for a content policy
1083         response when it is destroyed. If this were to happen, then the
1084         lambda function passed to PolicyChecker::checkContentPolicy()
1085         would outlive the DocumentLoader. This is an issue because
1086         that lambda function captures [this], which is the DocumentLoader.
1087         This would cause DocumentLoader::continueAfterContentPolicy() to
1088         be called after the DocumentLoader has been destroyed, which would
1089         explain the crash.
1090
1091 2015-02-07  Zalan Bujtas  <zalan@apple.com>
1092
1093         REGRESSION (r168046): Crash in WebCore::InlineBox::renderer / WebCore::RenderFlowThread::checkLinesConsistency
1094         https://bugs.webkit.org/show_bug.cgi?id=133462
1095
1096         Reviewed by David Hyatt.
1097
1098         RenderFlowThread::m_lineToRegionMap stores pointers to the root inlineboxes in the block flow.
1099         Normally root inlineboxes remove themselves from this map in their dtors. However when collapsing an anonymous block,
1100         we detach the inline tree first and destroy them after. The detached root boxes can't access
1101         the flowthread containing block and we end up with dangling pointers in this map.
1102         Call removeFlowChildInfo() before detaching the subtree to ensure proper pointer removal.
1103
1104         Test: fast/multicol/newmulticol/crash-when-switching-to-floating.html
1105
1106         * rendering/RenderBlock.cpp:
1107         (WebCore::RenderBlock::collapseAnonymousBoxChild):
1108
1109 2015-02-10  Julien Isorce  <j.isorce@samsung.com>
1110
1111         Render: properly update body's background image
1112         https://bugs.webkit.org/show_bug.cgi?id=140183
1113
1114         When HTML and BODY renderers are both composited the
1115         skipBodyBackground condition should also take into account
1116         if the HTML's layer can draw its contents.
1117
1118         Reviewed by Darin Adler.
1119
1120         Test: animations/animation-background-image.html
1121
1122         * rendering/RenderBox.cpp:
1123         (WebCore::skipBodyBackground): Do not skip
1124         if document's layer cannot draw its content.
1125         Previously both body and html did not paint the background
1126         when they are both composited.
1127
1128         * rendering/RenderLayerBacking.cpp:
1129         (WebCore::RenderLayerBacking::contentChanged): Also redisplay
1130         the content.
1131
1132 2015-02-10  Eric Carlson  <eric.carlson@apple.com>
1133
1134         [iOS] don't get out of sync when interrupt/resume calls are not balanced
1135         https://bugs.webkit.org/show_bug.cgi?id=141310
1136
1137         Reviewed by Jer Noble.
1138
1139         No new tests, updated media/video-interruption-with-resume-allowing-play.html.
1140
1141         * platform/audio/MediaSession.cpp:
1142         (WebCore::MediaSession::beginInterruption): Count interruptions.
1143         (WebCore::MediaSession::endInterruption): Ignore calls when m_interruptionCount is already zero.
1144         * platform/audio/MediaSession.h:
1145
1146 2015-02-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1147
1148         [GTK] GMutexLocker build issue
1149         https://bugs.webkit.org/show_bug.cgi?id=141381
1150
1151         Reviewed by Žan Doberšek.
1152
1153         Use always WTF::GMutexLocker because newer glib versions have a
1154         GMutexLocker in the public API.
1155
1156         * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
1157         (WebCore::AudioSourceProviderGStreamer::provideInput):
1158         (WebCore::AudioSourceProviderGStreamer::handleAudioBuffer):
1159         (WebCore::AudioSourceProviderGStreamer::clearAdapters):
1160         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1161         (WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
1162         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
1163         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
1164         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1165         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1166         (webkitVideoSinkTimeoutCallback):
1167         (webkitVideoSinkRender):
1168         (unlockSampleMutex):
1169         (webkitVideoSinkUnlockStop):
1170         (webkitVideoSinkStart):
1171         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1172         (webKitWebSrcGetProperty):
1173         (webKitWebSrcStop):
1174         (webKitWebSrcStart):
1175         (webKitWebSrcChangeState):
1176         (webKitWebSrcQueryWithParent):
1177         (webKitWebSrcGetUri):
1178         (webKitWebSrcSetUri):
1179         (webKitWebSrcNeedDataMainCb):
1180         (webKitWebSrcNeedDataCb):
1181         (webKitWebSrcEnoughDataMainCb):
1182         (webKitWebSrcEnoughDataCb):
1183         (webKitWebSrcSeekDataCb):
1184         (webKitWebSrcSetMediaPlayer):
1185         (StreamingClient::createReadBuffer):
1186         (StreamingClient::handleResponseReceived):
1187         (StreamingClient::handleDataReceived):
1188         (StreamingClient::handleNotifyFinished):
1189         (ResourceHandleStreamingClient::wasBlocked):
1190         (ResourceHandleStreamingClient::cannotShowURL):
1191
1192 2015-02-09  Alex Christensen  <achristensen@webkit.org>
1193
1194         Update WEBCORE_EXPORT to prepare to start using it.
1195         https://bugs.webkit.org/show_bug.cgi?id=141409
1196
1197         Reviewed by Tim Horton.
1198
1199         * bindings/js/JSDOMGlobalObject.h:
1200         * bindings/objc/DOMInternal.h:
1201         * bindings/objc/ExceptionHandlers.mm:
1202         * bindings/objc/WebScriptObjectPrivate.h:
1203         * bindings/scripts/CodeGeneratorJS.pm:
1204         (GenerateHeader):
1205         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1206         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1207         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1208         * bindings/scripts/test/JS/JSTestEventTarget.h:
1209         * bindings/scripts/test/JS/JSTestException.h:
1210         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1211         * bindings/scripts/test/JS/JSTestInterface.h:
1212         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1213         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1214         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1215         * bindings/scripts/test/JS/JSTestObj.h:
1216         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1217         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1218         * bindings/scripts/test/JS/JSTestTypedefs.h:
1219         * bindings/scripts/test/JS/JSattribute.h:
1220         * bindings/scripts/test/JS/JSreadonly.h:
1221         * css/StyleProperties.h:
1222         * dom/DeviceMotionData.h:
1223         * dom/Node.h:
1224         * dom/Position.h:
1225         * dom/ScriptExecutionContext.h:
1226         * editing/Editor.h:
1227         * editing/htmlediting.h:
1228         * html/HTMLInputElement.h:
1229         * html/TimeRanges.h:
1230         * loader/FrameLoader.h:
1231         * loader/cache/CacheValidation.h:
1232         * loader/cache/MemoryCache.h:
1233         * loader/icon/IconDatabase.h:
1234         * page/DatabaseProvider.h:
1235         * page/DiagnosticLoggingKeys.h:
1236         * page/EventHandler.h:
1237         * page/FrameSnapshotting.h:
1238         * page/MainFrame.h:
1239         * page/PageConsoleClient.h:
1240         * page/PageOverlay.h:
1241         * platform/CrossThreadCopier.h:
1242         * platform/FileSystem.h:
1243         * platform/PlatformSpeechSynthesizer.h:
1244         * platform/RemoteCommandListener.h:
1245         * platform/RuntimeApplicationChecks.h:
1246         * platform/graphics/Font.h:
1247         * platform/graphics/FontCache.h:
1248         * platform/graphics/FontGlyphs.h:
1249         * platform/graphics/FontRanges.h:
1250         * platform/graphics/GeometryUtilities.h:
1251         * platform/graphics/GlyphPage.h:
1252         * platform/graphics/Region.h:
1253         * platform/graphics/ca/PlatformCALayer.h:
1254         * platform/graphics/ca/TileController.h:
1255         * platform/graphics/transforms/TransformationMatrix.h:
1256         * platform/mac/WebCoreFullScreenWarningView.h:
1257         * platform/network/BlobDataFileReference.h:
1258         * platform/network/ResourceRequestBase.h:
1259         * platform/network/ResourceResponseBase.h:
1260         * platform/network/create-http-header-name-table:
1261         * platform/network/mac/WebCoreURLResponse.h:
1262         * platform/sql/SQLiteDatabaseTracker.h:
1263         * platform/sql/SQLiteStatement.h:
1264         * rendering/HitTestLocation.h:
1265         * rendering/HitTestResult.h:
1266         * storage/StorageEventDispatcher.h:
1267         Added WEBCORE_EXPORT macros.
1268
1269 2015-02-09  Chris Dumez  <cdumez@apple.com>
1270
1271         Check for self-assignment in Length::operator=(const Length&)
1272         https://bugs.webkit.org/show_bug.cgi?id=141402
1273
1274         Reviewed by Andreas Kling.
1275
1276         Check for self-assignment in Length::operator=(const Length&) as
1277         calling memcpy() with the same source and destination addresses has
1278         undefined behavior.
1279
1280         * platform/Length.h:
1281         (WebCore::Length::operator=):
1282
1283 2015-02-09  Roger Fong  <roger_fong@apple.com>
1284
1285         WebGL: Update 1.0.2 conformance layout tests and address new failure.
1286         https://bugs.webkit.org/show_bug.cgi?id=141408.
1287         <rdar://problem/19773236>
1288
1289         Reviewed by Dean Jackson.
1290
1291         Tests covered by updated 1.0.2 conformance tests.
1292
1293         * html/canvas/WebGLRenderingContextBase.cpp: 
1294         Return null string instead of empty string if parameter validation fails.
1295         (WebCore::WebGLRenderingContextBase::getProgramInfoLog):
1296         (WebCore::WebGLRenderingContextBase::getShaderInfoLog):
1297         (WebCore::WebGLRenderingContextBase::getShaderSource):
1298
1299 2015-02-09  Timothy Horton  <timothy_horton@apple.com>
1300
1301         Avoid using a HashMap for DisplayRefreshMonitorManager, which rarely has more than one item
1302         https://bugs.webkit.org/show_bug.cgi?id=141353
1303
1304         Reviewed by Anders Carlsson.
1305
1306         No new tests, because there's no behavior change.
1307
1308         * platform/graphics/DisplayRefreshMonitorManager.cpp:
1309         (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
1310         (WebCore::DisplayRefreshMonitorManager::unregisterClient):
1311         (WebCore::DisplayRefreshMonitorManager::displayDidRefresh):
1312         * platform/graphics/DisplayRefreshMonitorManager.h:
1313         Use a Vector of RefPtr<DisplayRefreshMonitor> instead of a HashMap
1314         from uint64_t to RefPtr<DisplayRefreshMonitor>. There's usually only one
1315         display, so there's usually only one DisplayRefreshMonitor. Linear search
1316         on the Vector will be faster than the hash lookup in all conceivable cases.
1317         This also avoids the situation mentioned in the comments in DisplayRefreshMonitorManager.h
1318         where we don't know enough about PlatformDisplayID to safely hash it.
1319
1320 2015-02-09  Jer Noble  <jer.noble@apple.com>
1321
1322         [Mac] Disable the currentTime estimation code in HTMLMediaElement for Yosemite+
1323         https://bugs.webkit.org/show_bug.cgi?id=141399
1324
1325         Reviewed by Eric Carlson.
1326
1327         Apparenty -[AVPlayer rate] means different things for HLS and progressive content; for progressive,
1328         the -rate is the actual rate of playback. For HLS, the -rate is the requested rate, and will return
1329         the requested value even if time is not progressing.
1330
1331         We added the currentTime estimation engine because asking AVFoundation for its -currentTime used to
1332         be expensive, but we've been assured that in recent iOS and OS X releases, -currentTime should be
1333         very fast. That, in combination with the HLS behavior of -rate and how it breaks the currentTime
1334         estimation, means we should probably turn it off for iOS and Yosemite.
1335
1336         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1337         (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Move implementation to .mm.
1338         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1339         (WebCore::MediaPlayerPrivateAVFoundationObjC::maximumDurationToCacheMediaTime): Disable on iOS and >=10.10.
1340
1341 2015-02-07  Roger Fong  <roger_fong@apple.com>
1342
1343         WebGL 2: Texture call format, internal format, and type validation.
1344         https://bugs.webkit.org/show_bug.cgi?id=141318.
1345         <rdar://problem/19733828>
1346
1347         Reviewed by Brent Fulgham.
1348
1349         Tests will be covered by WebGL2 conformance tests.
1350
1351         * html/canvas/WebGL2RenderingContext.cpp:
1352         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Add missing ExceptionCode argument.
1353         (WebCore::WebGL2RenderingContext::copyTexImage2D): Validate texture formats based on GLES3 spec.
1354         (WebCore::WebGL2RenderingContext::texSubImage2DBase): Validate using internal format from texture target.
1355         (WebCore::WebGL2RenderingContext::texSubImage2DImpl): Validate using internal format from texture target.
1356         (WebCore::WebGL2RenderingContext::texSubImage2D): Validate using internal format from texture target.
1357         (WebCore::WebGL2RenderingContext::validateTexFuncParameters): Do extra validation for copyTexImage2D.
1358         (WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Validate internal format, format and type combination.
1359         (WebCore::WebGL2RenderingContext::validateTexFuncData): Validate new data types.
1360         This method now accepts an internal format argument.
1361         (WebCore::WebGL2RenderingContext::baseInternalFormatFromInternalFormat):
1362         Helper method to convert internal format to base internal format.
1363         * html/canvas/WebGL2RenderingContext.h:
1364
1365         * html/canvas/WebGLRenderingContext.cpp:
1366         (WebCore::WebGLRenderingContext::copyTexImage2D): Moved from WebGLRenderingContextBase.
1367         (WebCore::WebGLRenderingContext::texSubImage2DBase): Ditto.
1368         (WebCore::WebGLRenderingContext::texSubImage2DImpl): Ditto.
1369         (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
1370         (WebCore::WebGLRenderingContext::validateTexFuncParameters): Ditto.
1371         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType): Ditto.
1372         (WebCore::WebGLRenderingContext::validateTexFuncData): Ditto.
1373         * html/canvas/WebGLRenderingContext.h:
1374
1375         * html/canvas/WebGLRenderingContextBase.cpp:
1376         (WebCore::WebGLRenderingContextBase::texImage2DBase):
1377         (WebCore::WebGLRenderingContextBase::validateTexFunc):
1378         (WebCore::WebGLRenderingContextBase::texImage2D):
1379         (WebCore::WebGLRenderingContextBase::copyTexImage2D): Deleted.
1380         (WebCore::WebGLRenderingContextBase::texSubImage2DBase): Deleted.
1381         (WebCore::WebGLRenderingContextBase::texSubImage2DImpl): Deleted.
1382         (WebCore::WebGLRenderingContextBase::texSubImage2D): Deleted.
1383         (WebCore::WebGLRenderingContextBase::validateTexFuncFormatAndType): Deleted.
1384         (WebCore::WebGLRenderingContextBase::validateTexFuncParameters): Deleted.
1385         (WebCore::WebGLRenderingContextBase::validateTexFuncData): Deleted.
1386         * html/canvas/WebGLRenderingContextBase.h: Modify validation type enums to differentiate between CopyImage, TexImage and TexSubImage calls.
1387         (WebCore::ScopedDrawingBufferBinder::ScopedDrawingBufferBinder):  Moved from WebGLRenderingContextBase.
1388         (WebCore::ScopedDrawingBufferBinder::~ScopedDrawingBufferBinder): Ditto.
1389         (WebCore::clip1D): Ditto.
1390         (WebCore::clip2D): Ditto.
1391         * platform/graphics/GraphicsContext3D.h: Rename a typo'ed enum.
1392
1393 2015-02-09  Commit Queue  <commit-queue@webkit.org>
1394
1395         Unreviewed, rolling out r179494.
1396         https://bugs.webkit.org/show_bug.cgi?id=141395
1397
1398         Caused slowdown in a WebKit client test scenario (Requested by
1399         kling on #webkit).
1400
1401         Reverted changeset:
1402
1403         "[Cocoa] Make decoded image data purgeable ASAP."
1404         https://bugs.webkit.org/show_bug.cgi?id=140298
1405         http://trac.webkit.org/changeset/179494
1406
1407 2015-02-09  Jer Noble  <jer.noble@apple.com>
1408
1409         [WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate.
1410         https://bugs.webkit.org/show_bug.cgi?id=140955
1411
1412         Reviewed by Eric Carlson.
1413
1414         Tests: webaudio/audiobuffersource-negative-playbackrate-interpolated.html
1415                webaudio/audiobuffersource-negative-playbackrate.html
1416
1417         Add support for playing an AudioBufferSourceNode at a negative playbackRate. Change the meaning of
1418         start() to set the initial playback position at the end of the play range if the rate of playback
1419         is negtive.
1420
1421         * Modules/webaudio/AudioBufferSourceNode.cpp:
1422         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): Allow the playbackRate AudioParam to range from [-32, 32].
1423         (WebCore::AudioBufferSourceNode::renderFromBuffer): Change variable names from "start" and "end" to "min" and "max"
1424             for clarity. Add a non-interpolated and interpolated render step for negative playback.
1425         (WebCore::AudioBufferSourceNode::start): Drive-by fix: default value of grainDuration is not 0.02.
1426         (WebCore::AudioBufferSourceNode::startPlaying): Start playing at the end of the buffer for negative playback.
1427         (WebCore::AudioBufferSourceNode::totalPitchRate): Allow the pitch to be negative.
1428
1429 2015-02-09  Darin Adler  <darin@apple.com>
1430
1431         Try to fix build on platforms that use SVG "all in one" file (Windows).
1432
1433         * svg/SVGAElement.cpp: Don't do "using namespace HTMLNames;" outside of
1434         function boundaries, because that will be inherited by other files.
1435         (WebCore::SVGAElement::isURLAttribute): Use XLinkNames directly here
1436         instead of using HTMLNames implicitly.
1437
1438         * svg/SVGElement.cpp: Don't do "using namespace HTMLNames;" outside of
1439         function boundaries, because that will be inherited by other files.
1440         (WebCore::populateAttributeNameToCSSPropertyIDMap): Instead do it in here.
1441         (WebCore::populateAttributeNameToAnimatedPropertyTypeMap): And here.
1442         (WebCore::populateCSSPropertyWithSVGDOMNameToAnimatedPropertyTypeMap): And here.
1443         (WebCore::SVGElement::parseAttribute): And use HTMLNames directly here
1444         instead of implicitly.
1445
1446 2015-02-09  Eric Carlson  <eric.carlson@apple.com>
1447
1448         [iOS] exit from fullscreen when player view controller calls delegate
1449         https://bugs.webkit.org/show_bug.cgi?id=141350
1450
1451         Reviewed by Jer Noble.
1452
1453         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1454         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): New, ask delegate
1455             to exit from fullscreen.
1456
1457 2015-02-06  Sergio Villar Senin  <svillar@igalia.com>
1458
1459         ASSERTION FAILED: resolvedInitialPosition <= resolvedFinalPosition in WebCore::GridSpan::GridSpan
1460         https://bugs.webkit.org/show_bug.cgi?id=141328
1461
1462         Reviewed by Darin Adler.
1463
1464         Whenever
1465         GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition()
1466         was trying to place an item with span, it was completely ignoring
1467         the resolvedInitialPosition returned by
1468         GridResolvedPosition::resolveGridPositionAgainstOppositePosition()
1469         and only using the finalResolvedPosition. This works with an
1470         unlimited grid which can indefinitely grow. But if the item spans
1471         over the grid track limits, then it might happen that the final
1472         resolved position is placed before the initial resolved position,
1473         something that is forbidden.
1474
1475         The solution is to directly use the GridSpan returned by
1476         GridResolvedPosition::resolveGridPositionAgainstOppositePosition(), if the item
1477         does not surpass the track limits then the returned initialResolvedPosition
1478         is identical to the provided one, otherwise it's properly corrected to respect
1479         track boundaries.
1480
1481         * rendering/style/GridResolvedPosition.cpp:
1482         (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
1483
1484 2015-01-22  Sergio Villar Senin  <svillar@igalia.com>
1485
1486         [CSS Grid Layout] Tracks' growth limits must be >= base sizes
1487         https://bugs.webkit.org/show_bug.cgi?id=140540
1488
1489         Reviewed by Antti Koivisto.
1490
1491         The track sizing algorithm is supposed to avoid those situations
1492         but they easily (specially when we mix absolute lengths and
1493         intrinsic lengths in min and max track sizing functions) and
1494         frequently appear. In those cases the outcome from the algorithm
1495         is wrong, tracks are not correctly sized.
1496
1497         In order to fulfill the restriction, m_usedBreadth and
1498         m_maxBreadth are now private members of GridTrack and the class
1499         now provides a couple of methods to modify them respecting the
1500         growthLimit >= baseSize precondition.
1501
1502         Apart from that, the members and methods of GridTrack were also
1503         renamed to match the ones used in the recent algorithm rewrite:
1504         usedBreadth became baseSize and maxBreadth is now growthLimit.
1505
1506         Although the algorithm was not modified at all, this change
1507         detected and fixed several invalid results (tracks and/or grids
1508         bigger than expected).
1509
1510         * rendering/RenderGrid.cpp:
1511         (WebCore::GridTrack::GridTrack): Renamed fields and methods. Added
1512         assertions.
1513         (WebCore::GridTrack::baseSize): Renamed from usedBreadth.
1514         (WebCore::GridTrack::growthLimit): Renamed from maxBreadth.
1515         (WebCore::GridTrack::setBaseSize):
1516         (WebCore::GridTrack::setGrowthLimit):
1517         (WebCore::GridTrack::growBaseSize): Renamed from growUsedBreadth.
1518         (WebCore::GridTrack::growGrowthLimit): Renamed from growMaxBreadth.
1519         (WebCore::GridTrack::growthLimitIsInfinite): New helper method.
1520         (WebCore::GridTrack::growthLimitIfNotInfinite): Renamed from
1521         maxBreadthIfNotInfinite.
1522         (WebCore::GridTrack::isGrowthLimitBiggerThanBaseSize): New helper
1523         method to verify ASSERTs are true.
1524         (WebCore::GridTrack::ensureGrowthLimitIsBiggerThanBaseSize): Ditto.
1525         (WebCore::GridTrackForNormalization::GridTrackForNormalization):
1526         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1527         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
1528         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
1529         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1530         (WebCore::sortByGridTrackGrowthPotential):
1531         (WebCore::RenderGrid::distributeSpaceToTracks):
1532         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
1533         (WebCore::RenderGrid::layoutGridItems):
1534         (WebCore::RenderGrid::gridAreaBreadthForChild):
1535         (WebCore::RenderGrid::populateGridPositions):
1536         (WebCore::GridTrack::growUsedBreadth): Renamed to growBaseSize.
1537         (WebCore::GridTrack::usedBreadth): Renamed to baseSize.
1538         (WebCore::GridTrack::growMaxBreadth): Renamed to growGrowthLimit.
1539         (WebCore::GridTrack::maxBreadthIfNotInfinite): Renamed to
1540         growthLimitIfNotInfinite.
1541         * rendering/RenderGrid.h:
1542
1543 2015-02-08  Chris Fleizach  <cfleizach@apple.com>
1544
1545         AX: VoiceOver appears unresponsive when JavaScript alerts are triggered via focus or blur events
1546         https://bugs.webkit.org/show_bug.cgi?id=140485
1547
1548         Reviewed by Anders Carlsson.
1549
1550         If setting an accessibility attribute results in a modal alert being displayed, it can cause VoiceOver
1551         to hang. A simple solution is perform the actual work after a short delay, which will ensure the call
1552         returns without hanging.
1553
1554         Test: platform/mac/accessibility/setting-attributes-is-asynchronous.html
1555
1556         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1557         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1558         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
1559
1560 2015-02-08  Benjamin Poulain  <benjamin@webkit.org>
1561
1562         Add parsing support for CSS Selector L4's case-insensitive attribute
1563         https://bugs.webkit.org/show_bug.cgi?id=141373
1564
1565         Reviewed by Darin Adler.
1566
1567         This patch adds parsing for the case-insensitive attribute value
1568         matching of CSS Selectors Level 4: http://dev.w3.org/csswg/selectors-4/#attribute-case
1569         Excuse of a grammar: http://dev.w3.org/csswg/selectors-4/#grammar
1570
1571         This patch also covers serialization for CSSOM. The serialization
1572         is defined here: http://dev.w3.org/csswg/cssom/#serializing-selectors
1573
1574         Matching is completely ignored in this patch. All the simple selectors
1575         are treated as regular attribute selectors.
1576
1577         Tests: fast/css/parsing-css-attribute-case-insensitive-value-1.html
1578                fast/css/parsing-css-attribute-case-insensitive-value-2.html
1579                fast/css/parsing-css-attribute-case-insensitive-value-3.html
1580                fast/css/parsing-css-attribute-case-insensitive-value-4.html
1581
1582         * css/CSSGrammar.y.in:
1583         * css/CSSParserValues.h:
1584         (WebCore::CSSParserSelector::setAttributeValueMatchingIsCaseInsensitive):
1585         * css/CSSSelector.cpp:
1586         (WebCore::CSSSelector::CSSSelector):
1587         (WebCore::CSSSelector::selectorText):
1588         * css/CSSSelector.h:
1589         (WebCore::CSSSelector::CSSSelector):
1590         (WebCore::CSSSelector::setAttributeValueMatchingIsCaseInsensitive):
1591         (WebCore::CSSSelector::attributeValueMatchingIsCaseInsensitive):
1592
1593 2015-02-08  Darin Adler  <darin@apple.com>
1594
1595         Fix CMake-based build.
1596
1597         * CMakeLists.txt: Added a dependency on the CMakeLists.txt itself, analogous
1598         to the one I added in DerivedSources.make.
1599
1600 2015-02-08  Darin Adler  <darin@apple.com>
1601
1602         Fix debug build.
1603
1604         * bindings/js/JSEventListener.h: Removed a call to forwardEventListeners.
1605
1606 2015-02-08  Darin Adler  <darin@apple.com>
1607
1608         Remove the SVG instance tree
1609         https://bugs.webkit.org/show_bug.cgi?id=140602
1610
1611         Reviewed by Dean Jackson.
1612
1613         * CMakeLists.txt: Removed SVGElementInstance source files.
1614         * DerivedSources.cpp: Ditto.
1615         * DerivedSources.make: Ditto.
1616         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1617         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1618         * WebCore.xcodeproj/project.pbxproj: Ditto.
1619         * bindings/js/JSBindingsAllInOne.cpp: Ditto.
1620
1621         * bindings/js/JSEventListener.cpp:
1622         (WebCore::forwardsEventListeners): Deleted. Only returned true for JSSVGElementInstance.
1623         (WebCore::correspondingElementWrapper): Deleted. Only used for JSSVGElementInstance.
1624         (WebCore::createJSEventListenerForAttribute): Deleted. Argument type was JSSVGElementInstance.
1625         (WebCore::createJSEventListenerForAdd): Removed most of the code; later we can delete this entirely.
1626
1627         * bindings/js/JSEventListener.h: Removed the overload of createJSEventListenerForAttribute
1628         that takes a JSSVGElementInstance.
1629
1630         * bindings/js/JSSVGElementInstanceCustom.cpp: Removed.
1631
1632         * dom/ContainerNodeAlgorithms.h: Updated comment to reflect the fact that
1633         this code is really now only used for ContainerNode and no longer needs to
1634         exist in a generic form.
1635
1636         * dom/EventTarget.h: Removed forward declaration of SVGElementInstance.
1637         * svg/SVGElement.h: Ditto.
1638
1639         * dom/EventTargetFactory.in: Removed SVGElementInstance.
1640
1641         * svg/SVGElementInstance.cpp: Removed.
1642         * svg/SVGElementInstance.h: Removed.
1643         * svg/SVGElementInstance.idl: Removed.
1644
1645         * svg/SVGUseElement.cpp:
1646         (WebCore::SVGUseElement::insertedInto): Removed obsolete comment.
1647         (WebCore::SVGUseElement::instanceTreeIsLoading): Deleted. Unused
1648         function that I forgot to delete in my last patch. It also had a
1649         glaring mistake, a missing "return" before the recursive call to
1650         itself that would cause it to return false when it should return true.
1651
1652         * svg/SVGUseElement.h: Removed instanceTreeIsLoading.
1653
1654         * dom/EventDispatcher.cpp: Removed include of SVGElementInstance.h.
1655         * page/EventHandler.cpp: Ditto.
1656         * rendering/svg/RenderSVGViewportContainer.cpp: Ditto.
1657         * svg/SVGAElement.cpp: Ditto.
1658         * svg/SVGAllInOne.cpp: Ditto.
1659         * svg/SVGAnimateMotionElement.cpp: Ditto.
1660         * svg/SVGAnimatedTypeAnimator.h: Ditto.
1661         * svg/SVGAnimationElement.cpp: Ditto.
1662         * svg/SVGCircleElement.cpp: Ditto.
1663         * svg/SVGClipPathElement.cpp: Ditto.
1664         * svg/SVGComponentTransferFunctionElement.cpp: Ditto.
1665         * svg/SVGCursorElement.cpp: Ditto.
1666         * svg/SVGElement.cpp: Ditto.
1667         * svg/SVGEllipseElement.cpp: Ditto.
1668         * svg/SVGFEBlendElement.cpp: Ditto.
1669         * svg/SVGFEColorMatrixElement.cpp: Ditto.
1670         * svg/SVGFECompositeElement.cpp: Ditto.
1671         * svg/SVGFEConvolveMatrixElement.cpp: Ditto.
1672         * svg/SVGFEDiffuseLightingElement.cpp: Ditto.
1673         * svg/SVGFEDisplacementMapElement.cpp: Ditto.
1674         * svg/SVGFEDropShadowElement.cpp: Ditto.
1675         * svg/SVGFEGaussianBlurElement.cpp: Ditto.
1676         * svg/SVGFEImageElement.cpp: Ditto.
1677         * svg/SVGFELightElement.cpp: Ditto.
1678         * svg/SVGFEMergeNodeElement.cpp: Ditto.
1679         * svg/SVGFEMorphologyElement.cpp: Ditto.
1680         * svg/SVGFEOffsetElement.cpp: Ditto.
1681         * svg/SVGFESpecularLightingElement.cpp: Ditto.
1682         * svg/SVGFETileElement.cpp: Ditto.
1683         * svg/SVGFETurbulenceElement.cpp: Ditto.
1684         * svg/SVGFilterElement.cpp: Ditto.
1685         * svg/SVGFilterPrimitiveStandardAttributes.cpp: Ditto.
1686         * svg/SVGForeignObjectElement.cpp: Ditto.
1687         * svg/SVGGElement.cpp: Ditto.
1688         * svg/SVGGradientElement.cpp: Ditto.
1689         * svg/SVGGraphicsElement.cpp: Ditto.
1690         * svg/SVGImageElement.cpp: Ditto.
1691         * svg/SVGLineElement.cpp: Ditto.
1692         * svg/SVGLinearGradientElement.cpp: Ditto.
1693         * svg/SVGMarkerElement.cpp: Ditto.
1694         * svg/SVGMaskElement.cpp: Ditto.
1695         * svg/SVGPathElement.cpp: Ditto.
1696         * svg/SVGPatternElement.cpp: Ditto.
1697         * svg/SVGPolyElement.cpp: Ditto.
1698         * svg/SVGRadialGradientElement.cpp: Ditto.
1699         * svg/SVGRectElement.cpp: Ditto.
1700         * svg/SVGSVGElement.cpp: Ditto.
1701         * svg/SVGScriptElement.cpp: Ditto.
1702         * svg/SVGStopElement.cpp: Ditto.
1703         * svg/SVGSymbolElement.cpp: Ditto.
1704         * svg/SVGTRefElement.cpp: Ditto.
1705         * svg/SVGTextContentElement.cpp: Ditto.
1706         * svg/SVGTextElement.cpp: Ditto.
1707         * svg/SVGTextPathElement.cpp: Ditto.
1708         * svg/SVGTextPositioningElement.cpp: Ditto.
1709
1710 2015-02-07  Dean Jackson  <dino@apple.com>
1711
1712         Tweak inline playback controls to match system spec
1713         https://bugs.webkit.org/show_bug.cgi?id=141375
1714         <rdar://problem/19760754>
1715
1716         Reviewed by Sam Weinig.
1717
1718         Rework the UI of the inline media controls on iOS, to
1719         better match the system specification. I've batched a
1720         few changes into one patch because many of them are
1721         inter-dependent, and not very aggressive. Changes are:
1722
1723         - updated artwork for the buttons.
1724         - separate artwork for normal and active states.
1725         - background images are now explicitly sized and positioned
1726           in the middle of the element, allowing audio and video
1727           to use the same glyphs even though the elements are
1728           different sizes.
1729         - use plus-darker blend mode on the button glyphs.
1730         - rearranged some of the rules to group things in a
1731           logical order.
1732         - time should front-pad a "0" character, if less than 10.
1733         - no need for an "active" class on the Airplay button (although
1734           I won't be surprised if this changes back).
1735
1736         * Modules/mediacontrols/mediaControlsiOS.css:
1737         (::-webkit-media-controls):
1738         (video::-webkit-media-controls-wireless-playback-picker-button.active): Deleted.
1739         (audio::-webkit-media-controls-wireless-playback-picker-button.active): Deleted.
1740         (audio::-webkit-media-controls-play-button:active): Deleted.
1741         (audio::-webkit-media-controls-play-button.paused): Deleted.
1742         (video::-webkit-media-controls-timeline): Deleted.
1743         * Modules/mediacontrols/mediaControlsiOS.js:
1744         (ControllerIOS.prototype.updateWirelessPlaybackStatus): No need
1745         for the "active" class.
1746         (ControllerIOS.prototype.formatTime): Pad with a leading zero.
1747
1748 2015-02-08  Darin Adler  <darin@apple.com>
1749
1750         Make SVGUseElement work without creating any SVGElementInstance objects
1751         https://bugs.webkit.org/show_bug.cgi?id=141374
1752
1753         Reviewed by Sam Weinig.
1754
1755         * dom/ElementIterator.h: Changed the * and -> operators to be const.
1756         There is no need for the iterator itself to be modified just to dereference it.
1757
1758         * dom/TypedElementDescendantIterator.h: Added DoubleTypedElementDescendantIterator.
1759         This allows callers to call descendantsOfType on two elements, as long as the caller
1760         can guarantee that both have the same number of descendants of that type. It's handy
1761         for walking a tree of cloned elements to set up something between each original and
1762         its clone. In the future we might instead change the cloning machinery so it can do
1763         this work as we clone, and if so, we could consider deleting this.
1764
1765         * svg/SVGElement.cpp:
1766         (WebCore::SVGElement::correspondingElement): Made this const.
1767         (WebCore::SVGElement::invalidateInstances): Got rid of the rule that said "this can
1768         only be done for an element in a document", since it's useful to do this on an element
1769         that has just been removed from a document. Removed the "updateStyleIfNeeded" call
1770         here now that the other changes make it no longer needed. Removed an unimportant
1771         assertion that we only invalidate use elements that are in a document; that's not
1772         a necessary restriction. Streamlined the logic a bit.
1773
1774         * svg/SVGElement.h: Made correspondingElement const.
1775
1776         * svg/SVGUseElement.cpp:
1777         (WebCore::SVGUseElement::insertedInto): Removed an assertion about
1778         m_targetElementInstance since that's gone now.
1779         (WebCore::SVGUseElement::svgAttributeChanged): Changed code that transfers
1780         size attributes to the shadow tree to use shadowTreeTargetClone instead of
1781         m_targetElementInstance.
1782         (WebCore::SVGUseElement::clearResourceReferences): Removed code to detach
1783         m_targetElementInstance, and also the call to removeAllTargetReferencesForElement,
1784         because we no longer use those.
1785         (WebCore::SVGUseElement::buildPendingResource): Moved the code to build the
1786         shadow tree in here and deleted the buildShadowAndInstanceTree function.
1787         Also changed logic so that we use a pending resource any time the target is not
1788         a valid one. That helps us correctly handle cases where we initially have an
1789         invalid target, but later get a value one
1790         (WebCore::SVGUseElement::buildShadowAndInstanceTree): Deleted. The code here
1791         was greatly simplified and moved into buildPendingResource.
1792         (WebCore::SVGUseElement::buildInstanceTree): Deleted.
1793         (WebCore::SVGUseElement::hasCycleUseReferencing): Deleted. Cycles are now
1794         detected by the new isValidTarget function and so there's no need for a
1795         separate explicit check for a cycle.
1796         (WebCore::associateClonesWithOriginals): Added. Helper that makes
1797         functions that build the shadow tree simpler and easier to read.
1798         (WebCore::associateReplacementCloneWithOriginal): Added. Helper to
1799         make associateReplacementClonesWithOriginals simple.
1800         (WebCore::associateReplacementClonesWithOriginals): Added. Helper that
1801         makes functions that build the shadow tree simpler and easier to read.
1802         (WebCore::SVGUseElement::buildShadowTree): Call associateClonesWithOriginals
1803         since associateInstancesWithShadowTreeElements no longer does this.
1804         (WebCore::SVGUseElement::isValidTarget): Added. Covers all the different
1805         reasons a target might not be valid: type of element, reference cycles, and
1806         also "not in document" (refactored in here; not sure when that can happen
1807         in practice, might be possible to remove it later).
1808         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Add checks for
1809         documents that are still loading; this used to be checked when building the
1810         instance tree. Added calls to associateReplacementClonesWithOriginals and
1811         associateClonesWithOriginals; that used to be done by later in the
1812         associateInstancesWithShadowTreeElements function. Use isValidTarget so
1813         we handle cycles as well as invalid target types.
1814         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree): Added a call to
1815         associateReplacementClonesWithOriginals, since we can no longer do that in
1816         associateInstancesWithShadowTreeElements.
1817         (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): Deleted.
1818         (WebCore::SVGUseElement::instanceForShadowTreeElement): Deleted.
1819         (WebCore::SVGUseElement::invalidateDependentShadowTrees): Removed a comment
1820         that simply restated the name of the function.
1821
1822         * svg/SVGUseElement.h: Removed instanceForShadowTreeElement,
1823         buildShadowAndInstanceTree, detachInstance, buildInstanceTree,
1824         hasCycleUseReferencing, associateInstancesWithShadowTreeElements,
1825         instanceForShadowTreeElement, and m_targetElementInstance. Added isValidTarget.
1826
1827 2015-02-08  Chris Dumez  <cdumez@apple.com>
1828
1829         [WK2] Add logging to validate the network cache efficacy (Part 1)
1830         https://bugs.webkit.org/show_bug.cgi?id=141269
1831         <rdar://problem/19632080>
1832
1833         Reviewed by Antti Koivisto.
1834
1835         Export an extra symbol.
1836
1837         * WebCore.exp.in:
1838
1839 2015-02-07  Chris Fleizach  <cfleizach@apple.com>
1840
1841         AX: The input element with type="search" has no default focus outline
1842         https://bugs.webkit.org/show_bug.cgi?id=140326
1843
1844         Reviewed by Darin Adler.
1845
1846         The platform RenderTheme takes care of the search field, and that code
1847         was missing a check for whether the element was focused.
1848
1849         Test: fast/css/focus-ring-exists-for-search-field.html
1850
1851         * rendering/RenderThemeMac.mm:
1852         (WebCore::RenderThemeMac::paintSearchField):
1853
1854 2015-02-07  Tim Horton  <timothy_horton@apple.com>
1855
1856         Add some dictionary lookup tests
1857         https://bugs.webkit.org/show_bug.cgi?id=141355
1858
1859         Reviewed by Darin Adler.
1860
1861         Tests: platform/mac/editing/dictionary-lookup/dictionary-lookup-input.html
1862                platform/mac/editing/dictionary-lookup/dictionary-lookup-inside-selection.html
1863                platform/mac/editing/dictionary-lookup/dictionary-lookup-outside-selection.html
1864                platform/mac/editing/dictionary-lookup/dictionary-lookup-rtl.html
1865                platform/mac/editing/dictionary-lookup/dictionary-lookup.html
1866
1867         * WebCore.exp.in:
1868         Remove an unneeded export.
1869
1870         * editing/mac/DictionaryLookup.h:
1871         Use OBJC_CLASS instead of @class so that this can be included in pure-C++ files.
1872
1873         * testing/Internals.cpp:
1874         (WebCore::Internals::rangeForDictionaryLookupAtLocation):
1875         * testing/Internals.h:
1876         * testing/Internals.idl:
1877         Expose rangeForDictionaryLookupAtHitTestResult fairly directly to JavaScript.
1878
1879 2015-02-07  Chris Dumez  <cdumez@apple.com>
1880
1881         Add Vector::removeFirstMatching() / removeAllMatching() methods taking lambda functions
1882         https://bugs.webkit.org/show_bug.cgi?id=141321
1883
1884         Reviewed by Darin Adler.
1885
1886         Use new Vector::removeFirstMatching() / removeAllMatching() methods.
1887
1888 2015-02-07  Darin Adler  <darin@apple.com>
1889
1890         Stop dispatching events to with SVGElementInstance objects as their targets
1891         https://bugs.webkit.org/show_bug.cgi?id=141108
1892
1893         Reviewed by Anders Carlsson.
1894
1895         Test: svg/custom/use-event-retargeting.html
1896
1897         * dom/EventDispatcher.cpp:
1898         (WebCore::eventTargetRespectingTargetRules): Replaced the code that retargeted
1899         events at SVGElementInstance objects with code that retargets them at the use
1900         element instead. Also wrote the code in a simpler way.
1901
1902 2015-02-07  Jer Noble  <jer.noble@apple.com>
1903
1904         [Mac] Set -contentsScale on AVPlayerLayer to allow AVPlayer to select the appropriate HLS variant.
1905         https://bugs.webkit.org/show_bug.cgi?id=141354
1906         rdar://problem/19717591
1907
1908         Reviewed by Darin Adler.
1909
1910         AVPlayer will try to determine the correct HLS variant based on the bounds of an AVPlayerLayer.
1911         When not in a layer tree, AVFoundation is not able to determine the correct mapping from logical
1912         units to pixel values. To provide AVPlayer with that scaling value, set -contentsScale based on
1913         both the current device scale and the current page scale.
1914
1915         Since this needs to be set at initialization time, before the AVPlayer is has any AVPlayerItems,
1916         add some plumbing up from MediaPlayer to as the HTMLMediaElement for the appropriate contents
1917         scale.
1918
1919         * html/HTMLMediaElement.cpp:
1920         (WebCore::HTMLMediaElement::mediaPlayerContentsScale):
1921         * html/HTMLMediaElement.h:
1922         * platform/graphics/MediaPlayer.h:
1923         (WebCore::MediaPlayerClient::mediaPlayerContentsScale):
1924         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1925         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
1926         * platform/graphics/ca/GraphicsLayerCA.cpp:
1927         (WebCore::GraphicsLayerCA::updateContentsScale):
1928
1929 2015-02-07  Alexey Proskuryakov  <ap@apple.com>
1930
1931         ASan complains about plugins/snapshotting/snapshot-plugin-not-quite-blocked-by-image.html
1932         https://bugs.webkit.org/show_bug.cgi?id=141352
1933         rdar://problem/19717490
1934
1935         Reviewed by Anders Carlsson.
1936
1937         * dom/Document.cpp: (WebCore::Document::ensurePlugInsInjectedScript): This string
1938         is not null terminated.
1939
1940 2015-02-06  Zalan Bujtas  <zalan@apple.com>
1941
1942         ASSERT repaintContainer->hasLayer() in WebCore::RenderObject::repaintUsingContainer
1943         https://bugs.webkit.org/show_bug.cgi?id=140750
1944
1945         Reviewed by Simon Fraser.
1946
1947         There's a short period of time when RenderObject::layer() still returns a valid pointer
1948         even though we already cleared the hasLayer() flag.
1949         Do not use the layer as repaint container in such cases.
1950
1951         Test: compositing/repaint-container-assertion-when-toggling-compositing.html
1952
1953         * rendering/RenderObject.cpp:
1954         (WebCore::RenderObject::enclosingLayer):
1955
1956 2015-02-06  Chris Dumez  <cdumez@apple.com>
1957
1958         Have SQLiteStatement::database() return a reference
1959         https://bugs.webkit.org/show_bug.cgi?id=141348
1960
1961         Reviewed by Andreas Kling.
1962
1963         Have SQLiteStatement::database() return a reference as it can never
1964         return null.
1965
1966         * loader/icon/IconDatabase.cpp:
1967         (WebCore::readySQLiteStatement):
1968         * platform/sql/SQLiteStatement.h:
1969         (WebCore::SQLiteStatement::database):
1970
1971 2015-02-06  Brent Fulgham  <bfulgham@apple.com>
1972
1973         Add youtube-nocookie URL to isYouTubeURL predicate 
1974         https://bugs.webkit.org/show_bug.cgi?id=141347
1975         <rdar://problem/19430657>
1976
1977         Reviewed by Eric Carlson.
1978
1979         * Modules/plugins/YouTubePluginReplacement.cpp:
1980         (WebCore::isYouTubeURL): Update for additional youtube-nocookie site.
1981
1982 2015-02-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
1983
1984         Invalid cast in WebCore::SVGAnimateElement::calculateAnimatedValue.
1985         https://bugs.webkit.org/show_bug.cgi?id=135171.
1986
1987         Reviewed by Dean Jackson.
1988
1989         The bug happens when an SVG element is animated by <animateMotion> followed by an
1990         <animateColor> or an <animate> and the values of the "attributeName" in both elements
1991         are the same. The problem is <animateMotion> should not have an attribute to animate.
1992         If it does by fuzz or by mistake, then we assume the <animateMotion> and the <animate>
1993         animate the same attribute for the same element target. Therefore we schedule them in
1994         the same AnimationVector in SMILTimeContainer::schedule(). When we call
1995         SVGAnimateElementBase::calculateAnimatedValue() for an SVGAnimateColorElement and the
1996         resultElement is SVGAnimateMotionElement, we fail to cast it to SVGAnimateElementBase
1997         because SVGAnimateMotionElement is derived from SVGAnimationElement which is the base
1998         class of all animate elements including SVGAnimateElementBase.
1999
2000         The fix is to nullify setting "attributeName" of an SVGAnimationElement. By doing so,
2001         "attributeName" and its value will be ignored from the <animateMotion> which is correct.
2002         
2003         Tests: svg/animations/animate-montion-invalid-attribute.svg.
2004
2005         * svg/SVGAnimateElementBase.cpp:
2006         (WebCore::SVGAnimateElementBase::setAttributeName):
2007         Do not call SVGAnimationElement::setAttributeName() since SVGAnimationElement should
2008         not have an attribute to animate. We prevent this by bypassing the parent in the class 
2009         hierarchy: SVGAnimationElement and calling SVGSMILElement::setAttributeName() directly.
2010         
2011         * svg/SVGAnimationElement.cpp:
2012         (WebCore::SVGAnimationElement::setAttributeName): Deleted.
2013         * svg/SVGAnimationElement.h:
2014         SVGAnimationElement should not have an attribute to animate. So implement its
2015         setAttributeName() as a null function.
2016
2017 2015-02-06  Simon Fraser  <simon.fraser@apple.com>
2018
2019         Convert the compositing overlap map to use LayoutRects
2020         https://bugs.webkit.org/show_bug.cgi?id=141346
2021         rdar://problem/18206365
2022
2023         Reviewed by Zalan Bujtas.
2024         
2025         If two compositing layers were adjoining but not overlapping, but happened to
2026         have non-integral offsets, then using enclosing IntRects in the overlap map
2027         would cause us to think they are overlapping, and create unnecessary backing store.
2028         
2029         Fix by converting the overlap map to use LayoutRects.
2030
2031         Test: compositing/layer-creation/subpixel-adjacent-layers-overlap.html
2032
2033         * rendering/RenderLayerCompositor.cpp:
2034         (WebCore::OverlapMapContainer::add):
2035         (WebCore::OverlapMapContainer::overlapsLayers):
2036         (WebCore::RenderLayerCompositor::OverlapMap::add):
2037         (WebCore::RenderLayerCompositor::OverlapMap::overlapsLayers):
2038         (WebCore::RenderLayerCompositor::OverlapMap::RectList::append):
2039         (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
2040         (WebCore::RenderLayerCompositor::logLayerInfo):
2041         (WebCore::RenderLayerCompositor::addToOverlapMap):
2042         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
2043         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2044         * rendering/RenderLayerCompositor.h:
2045
2046 2015-02-06  Andreas Kling  <akling@apple.com>
2047
2048         Ref-ify various getters that return HTMLCollection.
2049         <https://webkit.org/b/141336>
2050
2051         Reviewed by Anders Carlsson.
2052
2053         Make all the getters that return HTMLCollection objects (and never return nullptr)
2054         return Ref instead of RefPtr.
2055
2056         Removed a couple of useless null checks that were exposed by this change.
2057
2058         * accessibility/AccessibilityRenderObject.cpp:
2059         (WebCore::AccessibilityRenderObject::getDocumentLinks):
2060         * bindings/js/JSDOMWindowCustom.cpp:
2061         (WebCore::namedItemGetter):
2062         * bindings/js/JSHTMLDocumentCustom.cpp:
2063         (WebCore::JSHTMLDocument::nameGetter):
2064         * dom/Document.cpp:
2065         (WebCore::Document::ensureCachedCollection):
2066         (WebCore::Document::images):
2067         (WebCore::Document::applets):
2068         (WebCore::Document::embeds):
2069         (WebCore::Document::plugins):
2070         (WebCore::Document::scripts):
2071         (WebCore::Document::links):
2072         (WebCore::Document::forms):
2073         (WebCore::Document::anchors):
2074         (WebCore::Document::all):
2075         (WebCore::Document::windowNamedItems):
2076         (WebCore::Document::documentNamedItems):
2077         (WebCore::Document::iconURLs):
2078         * dom/Document.h:
2079         * dom/Element.cpp:
2080         (WebCore::Element::ensureCachedHTMLCollection):
2081         * dom/Element.h:
2082         * html/ColorInputType.cpp:
2083         (WebCore::ColorInputType::suggestions):
2084         * html/HTMLDataListElement.cpp:
2085         (WebCore::HTMLDataListElement::options):
2086         * html/HTMLDataListElement.h:
2087         * html/HTMLElement.cpp:
2088         (WebCore::HTMLElement::children):
2089         * html/HTMLElement.h:
2090         * html/HTMLFieldSetElement.cpp:
2091         (WebCore::HTMLFieldSetElement::elements):
2092         * html/HTMLFieldSetElement.h:
2093         * html/HTMLFormElement.cpp:
2094         (WebCore::HTMLFormElement::elements):
2095         * html/HTMLFormElement.h:
2096         * html/HTMLInputElement.cpp:
2097         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
2098         * html/HTMLMapElement.cpp:
2099         (WebCore::HTMLMapElement::areas):
2100         * html/HTMLMapElement.h:
2101         * html/HTMLSelectElement.cpp:
2102         (WebCore::HTMLSelectElement::selectedOptions):
2103         (WebCore::HTMLSelectElement::options):
2104         * html/HTMLSelectElement.h:
2105         * html/HTMLTableElement.cpp:
2106         (WebCore::HTMLTableElement::rows):
2107         (WebCore::HTMLTableElement::tBodies):
2108         * html/HTMLTableElement.h:
2109         * html/HTMLTableRowElement.cpp:
2110         (WebCore::HTMLTableRowElement::insertCell):
2111         (WebCore::HTMLTableRowElement::deleteCell):
2112         (WebCore::HTMLTableRowElement::cells):
2113         * html/HTMLTableRowElement.h:
2114         * html/HTMLTableSectionElement.cpp:
2115         (WebCore::HTMLTableSectionElement::insertRow):
2116         (WebCore::HTMLTableSectionElement::deleteRow):
2117         (WebCore::HTMLTableSectionElement::rows):
2118         * html/HTMLTableSectionElement.h:
2119         * html/RangeInputType.cpp:
2120         (WebCore::RangeInputType::updateTickMarkValues):
2121         * rendering/RenderTheme.cpp:
2122         (WebCore::RenderTheme::paintSliderTicks):
2123
2124 2015-02-06  Brent Fulgham  <bfulgham@apple.com>
2125
2126         [iOS] Implement audio track selection in fullscreen.
2127         https://bugs.webkit.org/show_bug.cgi?id=131236
2128         <rdar://problem/16552632>
2129
2130         Reviewed by Eric Carlson.
2131
2132         * platform/ios/WebVideoFullscreenModelVideoElement.h:
2133         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
2134         (WebVideoFullscreenModelVideoElement::selectAudioMediaOption): Provide implementation.
2135         (WebVideoFullscreenModelVideoElement::updateLegibleOptions): Add audio track information
2136         to menu displayed to user.
2137
2138 2015-02-06  Bartlomiej Gajda  <b.gajda@samsung.com>
2139
2140         [MSE] Implement Append Error algorithm.
2141         https://bugs.webkit.org/show_bug.cgi?id=139439
2142
2143         Reviewed by Jer Noble.
2144
2145         If Source Buffer has not received first init segment, then it shall call endOfStream after receiving
2146         Media Segment, as per Media Source spec. (from 17 July 2014) in paragraph 3.5.1 point 6.1.
2147
2148         Based this change on Editor's Draft 12 December 2014, as it clarifies order of events.
2149
2150         Test: media/media-source/media-source-append-media-segment-without-init.html
2151
2152         * Modules/mediasource/MediaSource.cpp:
2153         (WebCore::MediaSource::streamEndedWithError):
2154         * Modules/mediasource/MediaSource.h:
2155         * Modules/mediasource/SourceBuffer.cpp:
2156         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
2157         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
2158         (WebCore::SourceBuffer::validateInitializationSegment):
2159         (WebCore::SourceBuffer::appendError):
2160         * Modules/mediasource/SourceBuffer.h:
2161
2162 2015-02-06  Timothy Horton  <timothy_horton@apple.com>
2163
2164         REGRESSION: Lookup doesn't work in RTL
2165         https://bugs.webkit.org/show_bug.cgi?id=141338
2166         <rdar://problem/19738407>
2167
2168         Reviewed by Dan Bernstein.
2169
2170         * editing/Editor.cpp:
2171         (WebCore::Editor::scanSelectionForTelephoneNumbers):
2172         * editing/mac/DictionaryLookup.mm:
2173         (WebCore::rangeExpandedAroundPositionByCharacters):
2174         Positions are independent of writing direction, so we don't
2175         need to (and shouldn't) do anything special for RTL here.
2176
2177 2015-02-06  Maciej Stachowiak  <mjs@apple.com>
2178
2179         REGRESSION(r179706): Caused memory corruption on some tests (Requested by _ap_ on #webkit).
2180         https://bugs.webkit.org/show_bug.cgi?id=141324
2181
2182         Reviewed by Alexey Proskuryakov.
2183
2184         No new tests. This is caught by existing tests under ASAN, and I don't know how to reproduce
2185         it without ASAN.
2186
2187         * rendering/RenderLineBoxList.cpp:
2188         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Give up
2189         and just always invalidate the next line. It's too hard to come up
2190         with the condition that catches all needed cases, doesn't itself
2191         cause a crash, and isn't overzealous. And we do this for the
2192         previous line anyway.  Also clean up the code a bit since it
2193         confusingly reuses a variable, and declares it uninitialized, for
2194         no good reason.
2195
2196 2015-02-05  Dhi Aurrahman  <diorahman@rockybars.com>
2197
2198         Remove duplicate loop after r179532
2199         https://bugs.webkit.org/show_bug.cgi?id=141300
2200
2201         Reviewed by Benjamin Poulain.
2202
2203         No new tests, no behavior changed.
2204
2205         * css/SelectorCheckerTestFunctions.h:
2206         (WebCore::matchesLangPseudoClass):
2207
2208 2015-02-05  Commit Queue  <commit-queue@webkit.org>
2209
2210         Unreviewed, rolling out r179725.
2211         https://bugs.webkit.org/show_bug.cgi?id=141320
2212
2213         caused 2 layout tests to fail (Requested by zalan on #webkit).
2214
2215         Reverted changeset:
2216
2217         "[MSE] Implement Append Error algorithm."
2218         https://bugs.webkit.org/show_bug.cgi?id=139439
2219         http://trac.webkit.org/changeset/179725
2220
2221 2015-02-05  Andreas Kling  <akling@apple.com>
2222
2223         [iOS] Run a full garbage collection on memory warning.
2224         <https://webkit.org/b/141313>
2225         <rdar://problem/19738024>
2226
2227         Reviewed by Chris Dumez.
2228
2229         Make sure that we run a full GC when trying to free up memory, as this might
2230         be our last chance to execute before the kernel suspends this process.
2231
2232         This aligns WebKit2 with the old WebKit1 behavior.
2233
2234         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2235         (WebCore::MemoryPressureHandler::platformReleaseMemory):
2236
2237
2238 2015-02-05  Hyungwook Lee  <hyungwook.lee@navercorp.com>
2239
2240         Fix ASSERTION FAILED: !root->needsLayout() in FrameView::layout()
2241         https://bugs.webkit.org/show_bug.cgi?id=141032
2242
2243         Reviewed by Darin Adler.
2244
2245         This patch moves the !root->needsLayout() assert statement above
2246         updateLayerPositionsAfterLayout() that can modify dirty bit system
2247         when we have RenderMarquee.
2248
2249         * page/FrameView.cpp:
2250         (WebCore::FrameView::layout):
2251
2252 2015-02-05  Bartlomiej Gajda  <b.gajda@samsung.com>
2253
2254         [MSE] Implement Append Error algorithm.
2255         https://bugs.webkit.org/show_bug.cgi?id=139439
2256
2257         Reviewed by Jer Noble.
2258
2259         If Source Buffer has not received first init segment, then it shall call endOfStream after receiving
2260         Media Segment, as per Media Source spec. (from 17 July 2014) in paragraph 3.5.1 point 6.1.
2261
2262         Based this change on Editor's Draft 12 December 2014, as it clarifies order of events.
2263
2264         Test: media/media-source/media-source-append-media-segment-without-init.html
2265
2266         * Modules/mediasource/MediaSource.cpp:
2267         (WebCore::MediaSource::streamEndedWithError):
2268         * Modules/mediasource/MediaSource.h:
2269         * Modules/mediasource/SourceBuffer.cpp:
2270         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete):
2271         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
2272         (WebCore::SourceBuffer::validateInitializationSegment):
2273         (WebCore::SourceBuffer::appendError):
2274         * Modules/mediasource/SourceBuffer.h:
2275
2276 2015-02-05  Maciej Stachowiak  <mjs@apple.com>
2277
2278         Crash due to failing to dirty a removed text node's line box
2279         https://bugs.webkit.org/show_bug.cgi?id=136544
2280
2281         Reviewed by David Hyatt.
2282         
2283         Test: fast/text/remove-text-node-linebox-not-dirty-crash.html
2284
2285         * rendering/RenderLineBoxList.cpp:
2286         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Make the check for dirtying the next
2287         line box a bit more inclusive to avoid a case of a line box for a destroyed render object not
2288         being dirtied. In particular, when the text node's parent has no line boxes but contains BRs.
2289
2290 2015-02-05  Chris Dumez  <cdumez@apple.com>
2291
2292         Free memory read under MemoryCache::pruneLiveResourcesToSize()
2293         https://bugs.webkit.org/show_bug.cgi?id=141292
2294         <rdar://problem/19725522>
2295
2296         Reviewed by Antti Koivisto.
2297
2298         In MemoryCache::pruneLiveResourcesToSize(), we were iterating over the
2299         m_liveDecodedResources ListHashSet and possibly calling
2300         CachedResource::destroyDecodedData() on the current value. Doing so
2301         would cause a call to ListHashSet::remove() to remove the value pointed
2302         by the current iterator, thus invalidating our iterator.
2303
2304         In this patch, we increment the ListHashSet iterator *before* calling
2305         CachedResource::destroyDecodedData(), while the current iterator is
2306         still valid. Note that this is safe because unlike iteration of most
2307         WTF Hash data structures, iteration is guaranteed safe against mutation
2308         of the ListHashSet, except for removal of the item currently pointed to
2309         by a given iterator.
2310
2311         Test: http/tests/cache/memory-cache-pruning.html
2312
2313         * loader/cache/MemoryCache.cpp:
2314         (WebCore::MemoryCache::pruneLiveResourcesToSize):
2315
2316 2015-02-05  Jer Noble  <jer.noble@apple.com>
2317
2318         [Mac] HLS <video> will not fire 'progress' events, only 'stalled'.
2319         https://bugs.webkit.org/show_bug.cgi?id=141284
2320
2321         Reviewed by Brent Fulgham.
2322
2323         Test: http/tests/media/hls/hls-progress.html
2324
2325         totalBytes() will always return 0 for HLS streams, which will cause didLoadingProgress() to always
2326         return false. Skip this optimization. 
2327
2328         Drive-by fix: duration() will always return 0 for this class as well. Use durationMediaTime() instead.
2329
2330         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2331         (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress):
2332
2333 2015-02-05  Darin Adler  <darin@apple.com>
2334
2335         Move InstanceInvalidationGuard/UpdateBlocker to SVGElement from SVGElementInstance
2336         https://bugs.webkit.org/show_bug.cgi?id=141148
2337
2338         Reviewed by Brent Fulgham and Anders Carlsson.
2339
2340         Inspired by this change Rob Buis made in Blink:
2341
2342             http://src.chromium.org/viewvc/blink?view=revision&revision=173343
2343
2344         I actually wrote the whole thing and then discovered we did it almost identically.
2345
2346         * svg/SVGAnimatedTypeAnimator.cpp:
2347         (WebCore::SVGElementAnimatedPropertyList::setInstanceUpdatesBlocked): Added this
2348         helper function to get around a circular header dependency.
2349         * svg/SVGAnimatedTypeAnimator.h:
2350         (WebCore::SVGAnimatedTypeAnimator::executeAction): Use setInstanceUpdatesBlocked.
2351
2352         * svg/SVGElement.cpp:
2353         (WebCore::SVGElement::removedFrom): Use invalidateInstances.
2354         (WebCore::SVGElement::finishParsingChildren): Ditto.
2355         (WebCore::SVGElement::svgAttributeChanged): Ditto.
2356         (WebCore::SVGElement::childrenChanged): Ditto.
2357         (WebCore::SVGElement::setInstanceUpdatesBlocked): Added an assertion that will
2358         catch anyone who nests InstanceUpdateBlocker by accident.
2359         (WebCore::SVGElement::invalidateInstances): Moved this here from
2360         SVGElementInstance::invalidateAllInstancesOfElement. I had already modified this
2361         so it had nothing to do with SVGElementInstance, so it was a simple matter of
2362         converting this into a member function. Added a FIXME about the mysterious
2363         updateStyleIfNeeded that makes multiple tests fail if it's removed.
2364
2365         * svg/SVGElement.h: Added public InstanceUpdateBlocker class, protected
2366         InstanceInvalidationGuard class, and private invalidateInstances function.
2367         Unlike the ones in SVGElementInstance these use references so they are then
2368         not copyable without using the WTF_MAKE_NONCOPYABLE macro.
2369
2370         * svg/SVGElementInstance.cpp:
2371         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Deleted.
2372         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker): Deleted.
2373         (WebCore::SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker): Deleted.
2374         * svg/SVGElementInstance.h: Removed InvalidationGuard, InstanceUpdateBlocker, and
2375         invalidateAllInstancesOfElement. Didn't do any further cleanup since we soon will
2376         delete this entire file.
2377
2378         * svg/SVGAElement.cpp:
2379         (WebCore::SVGAElement::svgAttributeChanged): Updated to use new name and reference
2380         instead of pointer.
2381         * svg/SVGAnimateElementBase.cpp:
2382         (WebCore::applyCSSPropertyToTargetAndInstances): Ditto.
2383         (WebCore::removeCSSPropertyFromTargetAndInstances): Ditto.
2384         (WebCore::notifyTargetAndInstancesAboutAnimValChange): Ditto.
2385         * svg/SVGAnimatedPath.cpp:
2386         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Ditto.
2387         * svg/SVGCircleElement.cpp:
2388         (WebCore::SVGCircleElement::svgAttributeChanged): Ditto.
2389         * svg/SVGClipPathElement.cpp:
2390         (WebCore::SVGClipPathElement::svgAttributeChanged): Ditto.
2391         * svg/SVGComponentTransferFunctionElement.cpp:
2392         (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged): Ditto.
2393         * svg/SVGCursorElement.cpp:
2394         (WebCore::SVGCursorElement::svgAttributeChanged): Ditto.
2395         * svg/SVGEllipseElement.cpp:
2396         (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto.
2397         * svg/SVGFEBlendElement.cpp:
2398         (WebCore::SVGFEBlendElement::svgAttributeChanged): Ditto.
2399         * svg/SVGFEColorMatrixElement.cpp:
2400         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Ditto.
2401         * svg/SVGFECompositeElement.cpp:
2402         (WebCore::SVGFECompositeElement::svgAttributeChanged): Ditto.
2403         * svg/SVGFEConvolveMatrixElement.cpp:
2404         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Ditto.
2405         * svg/SVGFEDiffuseLightingElement.cpp:
2406         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Ditto.
2407         * svg/SVGFEDisplacementMapElement.cpp:
2408         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Ditto.
2409         * svg/SVGFEDropShadowElement.cpp:
2410         (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Ditto.
2411         * svg/SVGFEGaussianBlurElement.cpp:
2412         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Ditto.
2413         * svg/SVGFEImageElement.cpp:
2414         (WebCore::SVGFEImageElement::svgAttributeChanged): Ditto.
2415         * svg/SVGFELightElement.cpp:
2416         (WebCore::SVGFELightElement::svgAttributeChanged): Ditto.
2417         * svg/SVGFEMergeNodeElement.cpp:
2418         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Ditto.
2419         * svg/SVGFEMorphologyElement.cpp:
2420         (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Ditto.
2421         * svg/SVGFEOffsetElement.cpp:
2422         (WebCore::SVGFEOffsetElement::svgAttributeChanged): Ditto.
2423         * svg/SVGFESpecularLightingElement.cpp:
2424         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Ditto.
2425         * svg/SVGFETileElement.cpp:
2426         (WebCore::SVGFETileElement::svgAttributeChanged): Ditto.
2427         * svg/SVGFETurbulenceElement.cpp:
2428         (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Ditto.
2429         * svg/SVGFilterElement.cpp:
2430         (WebCore::SVGFilterElement::svgAttributeChanged): Ditto.
2431         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2432         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged): Ditto.
2433         * svg/SVGForeignObjectElement.cpp:
2434         (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto.
2435         * svg/SVGGElement.cpp:
2436         (WebCore::SVGGElement::svgAttributeChanged): Ditto.
2437         * svg/SVGGradientElement.cpp:
2438         (WebCore::SVGGradientElement::svgAttributeChanged): Ditto.
2439         * svg/SVGGraphicsElement.cpp:
2440         (WebCore::SVGGraphicsElement::svgAttributeChanged): Ditto.
2441         * svg/SVGImageElement.cpp:
2442         (WebCore::SVGImageElement::svgAttributeChanged): Ditto.
2443         * svg/SVGLineElement.cpp:
2444         (WebCore::SVGLineElement::svgAttributeChanged): Ditto.
2445         * svg/SVGLinearGradientElement.cpp:
2446         (WebCore::SVGLinearGradientElement::svgAttributeChanged): Ditto.
2447         * svg/SVGMPathElement.cpp:
2448         (WebCore::SVGMPathElement::svgAttributeChanged): Ditto.
2449         * svg/SVGMarkerElement.cpp:
2450         (WebCore::SVGMarkerElement::svgAttributeChanged): Ditto.
2451         * svg/SVGMaskElement.cpp:
2452         (WebCore::SVGMaskElement::svgAttributeChanged): Ditto.
2453         * svg/SVGPathElement.cpp:
2454         (WebCore::SVGPathElement::svgAttributeChanged): Ditto.
2455         * svg/SVGPatternElement.cpp:
2456         (WebCore::SVGPatternElement::svgAttributeChanged): Ditto.
2457         * svg/SVGPolyElement.cpp:
2458         (WebCore::SVGPolyElement::svgAttributeChanged): Ditto.
2459         * svg/SVGRadialGradientElement.cpp:
2460         (WebCore::SVGRadialGradientElement::svgAttributeChanged): Ditto.
2461         * svg/SVGRectElement.cpp:
2462         (WebCore::SVGRectElement::svgAttributeChanged): Ditto.
2463         * svg/SVGSVGElement.cpp:
2464         (WebCore::SVGSVGElement::svgAttributeChanged): Ditto.
2465         * svg/SVGScriptElement.cpp:
2466         (WebCore::SVGScriptElement::svgAttributeChanged): Ditto.
2467         * svg/SVGStopElement.cpp:
2468         (WebCore::SVGStopElement::svgAttributeChanged): Ditto.
2469         * svg/SVGSymbolElement.cpp:
2470         (WebCore::SVGSymbolElement::svgAttributeChanged): Ditto.
2471         * svg/SVGTRefElement.cpp:
2472         (WebCore::SVGTRefElement::svgAttributeChanged): Ditto.
2473         * svg/SVGTextContentElement.cpp:
2474         (WebCore::SVGTextContentElement::svgAttributeChanged): Ditto.
2475         * svg/SVGTextPathElement.cpp:
2476         (WebCore::SVGTextPathElement::svgAttributeChanged): Ditto.
2477         * svg/SVGTextPositioningElement.cpp:
2478         (WebCore::SVGTextPositioningElement::svgAttributeChanged): Ditto.
2479         * svg/SVGUseElement.cpp:
2480         (WebCore::SVGUseElement::svgAttributeChanged): Ditto.
2481         * svg/animation/SVGSMILElement.cpp:
2482         (WebCore::SVGSMILElement::svgAttributeChanged): Ditto.
2483
2484 2015-02-05  Brent Fulgham  <bfulgham@apple.com>
2485
2486         Remind ourselves to remove work-around code
2487         https://bugs.webkit.org/show_bug.cgi?id=141289
2488
2489         Unreviewed gardening: Add a reminder FIXME to CSSParser
2490         so we can remove the MSVC-specific hack in the future.
2491
2492         * css/CSSParser.cpp:
2493
2494 2015-02-05  Zalan Bujtas  <zalan@apple.com>
2495
2496         Do not destroy RenderQuote's text fragment child when quotation mark string is changing.
2497         https://bugs.webkit.org/show_bug.cgi?id=141271
2498         rdar://problem/18169375
2499
2500         Reviewed by Antti Koivisto.
2501
2502         Similar approach as https://codereview.chromium.org/679593004/
2503
2504         This patch ensures that laying out a RenderQuote does not force a sibling RenderQuote's
2505         child renderer(RenderText) to be destroyed.
2506         BreakingContext holds a pointer to the next renderer on the line (BreakingContext::m_nextObject).
2507         While laying out the line, initiated by BreakingContext, placing the current renderer could end up destroying the "next" renderer.
2508         This happens when the pseudo after quotation mark(RenderQuote) becomes floated, the sibling <q>'s pseudo
2509         before text needs to be changed (from " to ') so that we don't end up with 2 sets of the same opening
2510         strings.
2511         The fix is to reuse the RenderTextFragment object instead of destroy/recreate it.
2512
2513         Test: fast/css/content/quote-crash-when-floating.html
2514
2515         * rendering/RenderQuote.cpp:
2516         (WebCore::RenderQuote::RenderQuote):
2517         (WebCore::fragmentChild):
2518         (WebCore::RenderQuote::updateText):
2519         * rendering/RenderQuote.h:
2520         * rendering/RenderTextFragment.cpp:
2521         (WebCore::RenderTextFragment::setText):
2522         (WebCore::RenderTextFragment::setContentString):
2523         * rendering/RenderTextFragment.h:
2524
2525 2015-02-04  Dean Jackson  <dino@apple.com>
2526
2527         [Media iOS] Add a debug setting to always show the optimized fullscreen button
2528         https://bugs.webkit.org/show_bug.cgi?id=141277
2529         <rdar://problem/19724471>
2530
2531         Reviewed by Eric Carlson.
2532
2533         Add a debug option so that we can test the optimized fullscreen
2534         control on media that doesn't support it.
2535
2536         * Modules/mediacontrols/mediaControlsiOS.js: Add gSimulateOptimizedFullscreenAvailable.
2537         (ControllerIOS.prototype.createControls): Check the setting.
2538         (ControllerIOS.prototype.configureInlineControls): Ditto.
2539         (ControllerIOS.prototype.formatTime): Drive-by whitespace cleanup.
2540         (ControllerIOS.prototype.handleBaseGestureChange):
2541         (ControllerIOS.prototype.handleWrapperTouchStart):
2542         (ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd):
2543         (ControllerIOS.prototype.handlePresentationModeChange): Drive-by variable renaming.
2544
2545 2015-02-05  Youenn Fablet  <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar <calvaris@igalia.com>
2546
2547         [Streams API] Implement a barebone ReadableStream interface
2548         https://bugs.webkit.org/show_bug.cgi?id=141045
2549
2550         Reviewed by Benjamin Poulain.
2551
2552         This patch implements the ReadableStream IDL (https://streams.spec.whatwg.org/#rs-model).
2553         No functionality is yet added.
2554         ReadableStreamSource is expected to be implemented for native sources (such as HTTP sources)
2555         as well as JavaScript source through ReadableStreamJSSource.
2556
2557         Test: streams/readablestream-constructor.html
2558
2559         * CMakeLists.txt:
2560         * Configurations/FeatureDefines.xcconfig:
2561         * DerivedSources.cpp:
2562         * DerivedSources.make:
2563         * Modules/streams/ReadableStream.cpp: Added.
2564         (WebCore::ReadableStream::create):
2565         (WebCore::ReadableStream::ReadableStream):
2566         (WebCore::ReadableStream::~ReadableStream):
2567         (WebCore::ReadableStream::state):
2568         (WebCore::ReadableStream::closed):
2569         (WebCore::ReadableStream::ready):
2570         * Modules/streams/ReadableStream.h: Added.
2571         * Modules/streams/ReadableStream.idl: Added.
2572         * Modules/streams/ReadableStreamSource.h: Added.
2573         * WebCore.vcxproj/WebCore.vcxproj:
2574         * WebCore.vcxproj/WebCore.vcxproj.filters:
2575         * WebCore.vcxproj/WebCoreCommon.props:
2576         * WebCore.xcodeproj/project.pbxproj:
2577         * bindings/js/JSBindingsAllInOne.cpp:
2578         * bindings/js/JSReadableStreamCustom.cpp: Added.
2579         (WebCore::JSReadableStream::read):
2580         (WebCore::JSReadableStream::ready):
2581         (WebCore::JSReadableStream::closed):
2582         (WebCore::JSReadableStream::cancel):
2583         (WebCore::JSReadableStream::pipeTo):
2584         (WebCore::JSReadableStream::pipeThrough):
2585         (WebCore::constructJSReadableStream):
2586         * bindings/js/ReadableStreamJSSource.cpp: Added.
2587         (WebCore::ReadableStreamJSSource::create):
2588         (WebCore::ReadableStreamJSSource::ReadableStreamJSSource):
2589         (WebCore::ReadableStreamJSSource::setInternalError):
2590         * bindings/JSReadableStreamJSSource.h: Added.
2591
2592 2015-02-04  Brent Fulgham  <bfulgham@apple.com>
2593
2594         [Win] Unreviewed project file corrections.
2595
2596         Correct some parsing errors caused by recent manual editing of
2597         the project files.
2598
2599         * WebCore.vcxproj/WebCore.vcxproj:
2600         * WebCore.vcxproj/WebCore.vcxproj.filters:
2601
2602 2015-02-04  Eric Carlson  <eric.carlson@apple.com>
2603
2604         [iOS] add method to toggle playback when in the background
2605         https://bugs.webkit.org/show_bug.cgi?id=141270
2606
2607         Reviewed by Dean Jackson.
2608
2609         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2610         (-[WebAVPlayerController togglePlaybackEvenWhenInBackground:]): Added.
2611
2612 2015-02-04  Jer Noble  <jer.noble@apple.com>
2613
2614         [Mac][EME] Support ClearKey encryption with AES128-encrypted HLS
2615         https://bugs.webkit.org/show_bug.cgi?id=140825
2616
2617         Reviewed by Eric Carlson.
2618
2619         Test: http/tests/media/clearkey/clear-key-hls-aes128.html
2620
2621         Add support for ClearKey encryption when used with an AES-128 encrypted HLS stream.
2622
2623         * Modules/encryptedmedia/CDM.cpp:
2624         (WebCore::installedCDMFactories): Add the CDMPrivateClearKey factory.
2625         * Modules/encryptedmedia/CDMPrivateClearKey.cpp:
2626         (WebCore::CDMPrivateClearKey::supportsKeySystem): Support the "org.w3c.clearkey" key system.
2627         (WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType): Ditto.
2628         (WebCore::CDMPrivateClearKey::supportsMIMEType): Ditto.
2629         (WebCore::CDMPrivateClearKey::createSession): Create a CDMSessionClearKey.
2630         * Modules/encryptedmedia/CDMPrivateClearKey.h:
2631         (WebCore::CDMPrivateClearKey::create): Simple factory.
2632         (WebCore::CDMPrivateClearKey::~CDMPrivateClearKey): Virtual destructor.
2633         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey): Simple destructor.
2634         * Modules/encryptedmedia/CDMSessionClearKey.cpp: Added.
2635         (WebCore::clearKeyVM): Static method returning the VM to be used by JSON parsing.
2636         (WebCore::CDMSessionClearKey::CDMSessionClearKey): Simple constructor.
2637         (WebCore::CDMSessionClearKey::~CDMSessionClearKey): Simple destructor.
2638         (WebCore::CDMSessionClearKey::generateKeyRequest): Store the initData, ensure that it consists of a UTF8-encoded key
2639             URI, and return same.
2640         (WebCore::CDMSessionClearKey::releaseKeys): Purged all cached keys.
2641         (WebCore::CDMSessionClearKey::update): Parse raw JSON-encoded JWK keys, rejecting non-AES, non-oct keys.
2642         (WebCore::CDMSessionClearKey::cachedKeyForKeyID): Return cached keys.
2643         * Modules/encryptedmedia/CDMSessionClearKey.h:
2644
2645         Add support for the "org.w3c.clearkey" CDM to MediaPlayerPrivateAVFoundationObjC, and do so in a platform-agnostic
2646         way by simply asking for raw key data from MediaPlayerClient when notified that a key has been added.
2647
2648         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2649         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2650         (WebCore::keySystemIsSupported):
2651         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
2652         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
2653         (WebCore::fulfillRequestWithKeyData): Added utility method.
2654         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
2655         (WebCore::MediaPlayerPrivateAVFoundationObjC::keyAdded):
2656
2657         Pipe a keyAdded() notification down to MediaPlayer and a cachedKeyForKeyId() request up to CDMSessionClearKey:
2658
2659         * Modules/encryptedmedia/MediaKeySession.cpp:
2660         (WebCore::MediaKeySession::cachedKeyForKeyId):
2661         (WebCore::MediaKeySession::addKeyTimerFired):
2662         * Modules/encryptedmedia/MediaKeySession.h:
2663         * Modules/encryptedmedia/MediaKeys.cpp:
2664         (WebCore::MediaKeys::keyAdded):
2665         (WebCore::MediaKeys::cachedKeyForKeyId):
2666         * Modules/encryptedmedia/MediaKeys.h:
2667         * html/HTMLMediaElement.cpp:
2668         (WebCore::HTMLMediaElement::keyAdded):
2669         * html/HTMLMediaElement.h:
2670         * platform/graphics/CDMSession.h:
2671         (WebCore::CDMSession::cachedKeyForKeyID):
2672         * platform/graphics/MediaPlayer.cpp:
2673         (WebCore::MediaPlayer::keyAdded):
2674         (WebCore::MediaPlayer::cachedKeyForKeyId):
2675         * platform/graphics/MediaPlayer.h:
2676         (WebCore::MediaPlayerClient::mediaPlayerCachedKeyForKeyId):
2677         * platform/graphics/MediaPlayerPrivate.h:
2678         (WebCore::MediaPlayerPrivateInterface::keyAdded):
2679
2680         Add new files to project:
2681
2682         * WebCore.xcodeproj/project.pbxproj:
2683         * CMakeLists.txt:
2684         * WebCore.vcxproj/WebCore.vcxproj:
2685         * WebCore.vcxproj/WebCore.vcxproj.filters:
2686
2687 2015-02-04  Commit Queue  <commit-queue@webkit.org>
2688
2689         Unreviewed, rolling out r179618.
2690         https://bugs.webkit.org/show_bug.cgi?id=141263
2691
2692         Off-by-one error causing flaky behavior in webaudio
2693         /audiobuffersource-negative-playbackrate.html (Requested by
2694         jernoble_ on #webkit).
2695
2696         Reverted changeset:
2697
2698         "[WebAudio] AudioBufferSourceNodes should accurately play
2699         backwards if given a negative playbackRate."
2700         https://bugs.webkit.org/show_bug.cgi?id=140955
2701         http://trac.webkit.org/changeset/179618
2702
2703 2015-02-03  David Hyatt  <hyatt@apple.com>
2704
2705         Tables don't repaginate properly when the pagination height changes or the pagination offset changes.
2706         https://bugs.webkit.org/show_bug.cgi?id=141207
2707         <rdar://problem/18387659>
2708
2709         Reviewed by Dean Jackson.
2710
2711         Added fast/multicol/table-dynamic-movement.html
2712
2713         Change markForPaginationRelayoutIfNeeded to be called always and to check needsLayout inside it.
2714
2715         Make RenderTable override markForPaginationRelayoutIfNeeded and also dirty the sections if the table
2716         ended up getting marked for relayout.
2717
2718         Make sure rows do the right thing as well.
2719
2720         * rendering/RenderBlock.cpp:
2721         (WebCore::RenderBlock::layoutPositionedObjects):
2722         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
2723         * rendering/RenderBlock.h:
2724         * rendering/RenderBlockFlow.cpp:
2725         (WebCore::RenderBlockFlow::layoutBlockChild):
2726         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
2727         (WebCore::RenderBlockFlow::positionNewFloats):
2728         * rendering/RenderDeprecatedFlexibleBox.cpp:
2729         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2730         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2731         * rendering/RenderTable.cpp:
2732         (WebCore::RenderTable::markForPaginationRelayoutIfNeeded):
2733         * rendering/RenderTable.h:
2734         * rendering/RenderTableRow.cpp:
2735         (WebCore::RenderTableRow::layout):
2736         * rendering/RenderTableSection.cpp:
2737         (WebCore::RenderTableSection::layout):
2738
2739 2015-02-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
2740
2741         When using SVG as an image, we should load datauri images when these images are not in the image cache.
2742         https://bugs.webkit.org/show_bug.cgi?id=99677.
2743
2744         Reviewed by Darin Adler.
2745         
2746         Data URI sub-resources are not loaded because the networking context of FrameLoader
2747         attached to the SubResourceLoader is set to null. This is done intentionally to
2748         disallow any resource from loading external sub-resources. For example if an <img>
2749         tag has its 'src' attribute points to an svg file, this svg is not allowed to load
2750         an external image through the 'xlink' attribute of an <image> element. This restriction
2751         is not valid if the value of the 'xlink' attribute is a data URI. In this case the image 
2752         should be loaded into memory since there is no network traffic involved. All we need
2753         to do is to decode the data part of the URI.
2754         
2755         The fix is to pass the root FrameLoader, which has a valid NetworkingContext, through
2756         the FrameLoaderClient, to the ResourceHandle::create() which uses the NetworkingContext
2757         to decode the data and fire the load events of the data URI resources.
2758
2759         Tests:  svg/as-image/svg-image-with-data-uri-background.html
2760                 svg/as-image/svg-image-with-data-uri-from-canvas.html
2761                 svg/as-image/svg-image-with-data-uri-images-disabled.html
2762                 svg/as-image/svg-image-with-data-uri-reloading.html
2763                 svg/as-image/svg-image-with-data-uri-use-data-uri.svg
2764                 svg/as-image/svg-image-with-svg-data-uri.html
2765
2766         * accessibility/AccessibilityRenderObject.cpp:
2767         Remove unreferenced header file.
2768
2769         * loader/FrameLoaderClient.h:
2770         Define the null virtual function dataProtocolLoader() which should return the FrameLoader
2771         for loading data URI resources.
2772
2773         * loader/ResourceLoader.cpp:
2774         (WebCore::ResourceLoader::start):
2775         (WebCore::ResourceLoader::dataProtocolFrameLoader):
2776         * loader/ResourceLoader.h:
2777         Add ResourceLoader::dataProtocolFrameLoader() which returns the root FrameLoader. The
2778         root FrameLoader is used to get a valid NetworkingContext which can be passed to
2779         ResourceHandle::create() when url().protocolIsData().
2780
2781         * loader/cache/CachedImage.cpp:
2782         (WebCore::CachedImage::load):
2783         (WebCore::CachedImage::finishLoading):
2784         * loader/cache/CachedResourceLoader.cpp:
2785         (WebCore::CachedResourceLoader::shouldPerformImageLoad):
2786         (WebCore::CachedResourceLoader::shouldDeferImageLoad):
2787         * loader/cache/CachedResourceLoader.h:
2788         Allow loading data URI sub-resources as long as loading images is not disabled. Also we
2789         need to call setDataProtocolLoader() before calling setData() for the isSVGImage case, 
2790         setData() will create a page by calling Page::createPageFromBuffer() via SVGImage::dataChanged(),
2791         and we need to pass the correct FrameLoaderClient to the created FrameLoader of the main
2792          frame of this page.
2793
2794         * svg/graphics/SVGImage.cpp:
2795         (WebCore::SVGImage::SVGImage):
2796         (WebCore::SVGImage::dataChanged):
2797         * svg/graphics/SVGImage.h:
2798         Create a new FrameLoaderClient of type SVGFrameLoaderClient and set it in pageConfiguration
2799         which is used when creating the page from the SVG data URI.
2800
2801         * WebCore.xcodeproj/project.pbxproj:
2802         * svg/graphics/SVGImageChromeClient.h: Removed.
2803         * svg/graphics/SVGImageClients.h: Added.
2804         Add a new class SVGImageChromeClient which overrides the function dataProtocolLoader().
2805         Rename the header file SVGImageChromeClient.h to be SVGImageClients.h since it now 
2806         includes the classes SVGImageChromeClient and SVGFrameLoaderClient.
2807
2808 2015-02-04  Timothy Horton  <timothy_horton@apple.com>
2809
2810         Fix a misplaced include in CaptionUserPreferencesMediaAF
2811         https://bugs.webkit.org/show_bug.cgi?id=141239
2812
2813         Reviewed by Jer Noble.
2814
2815         * page/CaptionUserPreferencesMediaAF.cpp:
2816         CoreText is a system header, and there's already a good spot for it!
2817
2818 2015-02-04  Jer Noble  <jer.noble@apple.com>
2819
2820         [WebAudio] AudioBufferSourceNodes should accurately play backwards if given a negative playbackRate.
2821         https://bugs.webkit.org/show_bug.cgi?id=140955
2822
2823         Reviewed by Eric Carlson.
2824
2825         Tests: webaudio/audiobuffersource-negative-playbackrate-interpolated.html
2826                webaudio/audiobuffersource-negative-playbackrate.html
2827
2828         Add support for playing an AudioBufferSourceNode at a negative playbackRate. Change the meaning of
2829         start() to set the initial playback position at the end of the play range if the rate of playback
2830         is negtive.
2831
2832         * Modules/webaudio/AudioBufferSourceNode.cpp:
2833         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): Allow the playbackRate AudioParam to range from [-32, 32].
2834         (WebCore::AudioBufferSourceNode::renderFromBuffer): Change variable names from "start" and "end" to "min" and "max"
2835             for clarity. Add a non-interpolated and interpolated render step for negative playback.
2836         (WebCore::AudioBufferSourceNode::start): Drive-by fix: default value of grainDuration is not 0.02.
2837         (WebCore::AudioBufferSourceNode::startPlaying): Start playing at the end of the buffer for negative playback.
2838         (WebCore::AudioBufferSourceNode::totalPitchRate): Allow the pitch to be negative.
2839
2840 2015-02-04  Eric Carlson  <eric.carlson@apple.com>
2841
2842         video.attribute should not return true just because of fullscreen
2843         https://bugs.webkit.org/show_bug.cgi?id=141219
2844
2845         Reviewed by Dean Jackson.
2846
2847         No new tests, updated media/video-fullscreeen-only-controls.html
2848
2849         * Modules/mediacontrols/mediaControlsApple.js:
2850         (Controller.prototype.shouldHaveControls):
2851         * Modules/mediacontrols/mediaControlsiOS.js:
2852         (ControllerIOS.prototype.isFullScreen):
2853
2854         * html/HTMLMediaElement.cpp:
2855         (WebCore::HTMLMediaElement::controls): Don't consider fullscreen status.
2856         (WebCore::HTMLMediaElement::configureMediaControls): Create controls if a video element
2857             isn't allowed to play inline, or if it is in fullscreen.
2858
2859 2015-02-04  Mark Lam  <mark.lam@apple.com>
2860
2861         Remove concept of makeUsableFromMultipleThreads().
2862         <https://webkit.org/b/141221>
2863
2864         Reviewed by Mark Hahnenberg.
2865
2866         No new tests.
2867
2868         * bindings/js/JSDOMWindowBase.cpp:
2869         (WebCore::JSDOMWindowBase::commonVM):
2870
2871 2015-02-04  Simon Fraser  <simon.fraser@apple.com>
2872
2873         [iOS WK2] Assert in ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren() on tab switching
2874         https://bugs.webkit.org/show_bug.cgi?id=141223
2875         rdar://problem/18458993
2876
2877         Reviewed by Tim Horton.
2878         
2879         It's possible to submit a RemoteLayerTree transaction that contains data
2880         about a created layer, but doesn't have any properties for that layer. This
2881         happens when the newly created layer isn't reached during the traversal that
2882         gathers layer properties (i.e. it's not rooted). However, whether we create
2883         a scrolling layer or not requires having properties; they are missing, so we
2884         create a normal layer, but then the scrolling tree commit asserts that we
2885         should have a scrolling layer.
2886         
2887         Fix by making scrolling layers have a corresponding layer type, which is
2888         stored in layer creation properties. This required exposing layer types
2889         up through GraphicsLayer, but that allows for some nice cleanup:
2890         
2891         1. No need to have the hokey shouldUseTiledBacking() GraphicsLayerClient hack
2892            for creating the page tiled layer.
2893         2. The notion of "custom behaviors" can be removed from GraphicsLayer entirely.
2894
2895         Not testable because it requires tab switching.
2896
2897         * WebCore.exp.in:
2898         * platform/graphics/GraphicsLayer.cpp:
2899         (WebCore::GraphicsLayer::GraphicsLayer):
2900         * platform/graphics/GraphicsLayer.h:
2901         (WebCore::GraphicsLayer::initialize):
2902         (WebCore::GraphicsLayer::setCustomBehavior): Deleted.
2903         (WebCore::GraphicsLayer::customBehavior): Deleted.
2904         * platform/graphics/GraphicsLayerClient.h:
2905         (WebCore::GraphicsLayerClient::shouldUseTiledBacking): Deleted.
2906         * platform/graphics/GraphicsLayerFactory.h:
2907         * platform/graphics/ca/GraphicsLayerCA.cpp:
2908         (WebCore::GraphicsLayer::create):
2909         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2910         (WebCore::GraphicsLayerCA::initialize):
2911         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2912         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
2913         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2914         (WebCore::GraphicsLayerCA::updateCustomBehavior): Deleted.
2915         (WebCore::GraphicsLayerCA::setCustomBehavior): Deleted.
2916         * platform/graphics/ca/GraphicsLayerCA.h:
2917         (WebCore::GraphicsLayerCA::moveAnimations):
2918         (WebCore::GraphicsLayerCA::copyAnimations):
2919         * platform/graphics/ca/PlatformCALayer.h:
2920         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2921         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2922         (PlatformCALayerMac::PlatformCALayerMac):
2923         (PlatformCALayerMac::commonInit):
2924         (PlatformCALayerMac::updateCustomBehavior): Deleted.
2925         * rendering/RenderLayerBacking.cpp:
2926         (WebCore::RenderLayerBacking::createGraphicsLayer):
2927         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2928         (WebCore::RenderLayerBacking::updateScrollingLayers):
2929         (WebCore::RenderLayerBacking::shouldUseTiledBacking): Deleted.
2930         * rendering/RenderLayerBacking.h:
2931
2932 2015-02-04  Dean Jackson  <dino@apple.com>
2933
2934         [Media] Fullscreen button should always come last in inline controls (141245)
2935         https://bugs.webkit.org/show_bug.cgi?id=141245
2936         <rdar://problem/19714622>
2937
2938         Reviewed by Eric Carlson.
2939
2940         Make sure the optimizedFullscreen button is inserted before the
2941         normal fullscreen button.
2942
2943         * Modules/mediacontrols/mediaControlsiOS.js:
2944         (ControllerIOS.prototype.configureInlineControls):
2945
2946 2015-02-04  Dean Jackson  <dino@apple.com>
2947
2948         REGRESSION: AirPlay button not visible but present in inline toolbar
2949         https://bugs.webkit.org/show_bug.cgi?id=141244
2950         <rdar://problem/19328322>
2951
2952         Reviewed by Eric Carlson.
2953
2954         Replace the use of mask-image with a background-image (which matches
2955         what the other buttons are doing).
2956
2957         * Modules/mediacontrols/mediaControlsiOS.css:
2958         (::-webkit-media-controls):
2959         (video::-webkit-media-controls-wireless-playback-picker-button):
2960         (audio::-webkit-media-controls-wireless-playback-picker-button):
2961         (video::-webkit-media-controls-wireless-playback-picker-button.active):
2962         (audio::-webkit-media-controls-wireless-playback-picker-button.active):
2963
2964 2015-02-04  Chris Dumez  <cdumez@apple.com>
2965
2966         Add removeFirst(value) / removeAll(value) methods to WTF::Vector
2967         https://bugs.webkit.org/show_bug.cgi?id=141192
2968
2969         Reviewed by Benjamin Poulain.
2970
2971         Use new Vector::removeFirst(value) / removeAll(value) API to simplify the
2972         code a bit.
2973
2974         * css/StyleSheetContents.cpp:
2975         (WebCore::StyleSheetContents::unregisterClient):
2976         * html/HTMLFormElement.cpp:
2977         (WebCore::HTMLFormElement::removeFormElement):
2978         (WebCore::HTMLFormElement::removeImgElement):
2979         (WebCore::removeFromVector): Deleted.
2980         * page/Chrome.cpp:
2981         (WebCore::Chrome::unregisterPopupOpeningObserver):
2982         * page/PageOverlayController.cpp:
2983         (WebCore::PageOverlayController::uninstallPageOverlay):
2984         * page/SecurityPolicy.cpp:
2985         (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
2986         * platform/graphics/GraphicsLayer.cpp:
2987         (WebCore::GraphicsLayer::removeFromParent):
2988         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2989         (WebCore::TextureMapperAnimations::remove):
2990         * rendering/RenderSearchField.cpp:
2991         (WebCore::RenderSearchField::addSearchResult):
2992         * rendering/RenderTable.cpp:
2993         (WebCore::RenderTable::removeCaption):
2994         * rendering/svg/RenderSVGText.cpp:
2995         (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
2996         * svg/SVGDocumentExtensions.cpp:
2997         (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget):
2998         * svg/animation/SMILTimeContainer.cpp:
2999         (WebCore::SMILTimeContainer::unschedule):
3000
3001 2015-02-03  Maciej Stachowiak  <mjs@apple.com>
3002
3003         Crash when printing snapshotted plugins
3004         https://bugs.webkit.org/show_bug.cgi?id=141212
3005
3006         Reviewed by Simon Fraser.
3007
3008         Test: plugins/snapshotting/print-snapshotted-plugin.html
3009
3010         * html/HTMLPlugInImageElement.cpp:
3011         (WebCore::HTMLPlugInImageElement::childShouldCreateRenderer): New
3012         method. If the current renderer is a snapshotted plugin, only
3013         allow children to create renderers if they are part of the
3014         snapshot shadow dom. Otherwise RenderEmbeddedObject invariants
3015         will be violated. This DOM class can have many other renderers, but they
3016         can just follow their own rules.
3017         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay): Make this
3018         const-correct, and don't create UA shadow DOM as a side effect if it doesn't
3019         already exist.
3020         * html/HTMLPlugInImageElement.h:
3021
3022 2015-02-03  Chris Dumez  <cdumez@apple.com>
3023
3024         Regression(r179584): Assertion hit in toResourceLoadPriority() on Yosemite
3025         https://bugs.webkit.org/show_bug.cgi?id=141230
3026
3027         Reviewed by Alexey Proskuryakov.
3028
3029         Handle -1 priority value again in toResourceLoadPriority() as it seems to
3030         be returned by CFNetwork on some configurations.
3031
3032         No new tests, already covered by existing tests.
3033
3034         * platform/network/cf/ResourceRequestCFNet.h:
3035         (WebCore::toResourceLoadPriority):
3036
3037 2015-02-03  Chris Dumez  <cdumez@apple.com>
3038
3039         Drop ResourceLoadPriorityUnresolved resource load priority and use Optional<> instead
3040         https://bugs.webkit.org/show_bug.cgi?id=141186
3041
3042         Reviewed by Antti Koivisto.
3043
3044         Drop ResourceLoadPriorityUnresolved resource load priority value and use
3045         Optional<ResourceLoadPriority> when needed instead. If the Optional
3046         doesn't have a value, then it means it is unresolved. Having
3047         ResourceLoadPriorityUnresolved in ResourceLoadPriority was confusing
3048         because this value is only valid in CachedResourceRequest, it is not
3049         a valid value in CachedResource or in ResourceRequest. After this
3050         refactoring, it now becomes more obvious.
3051
3052 2015-02-03  Chris Dumez  <cdumez@apple.com>
3053
3054         REGRESSION(176609): Very high memory usage in Canvas/reuse.html performance test
3055         https://bugs.webkit.org/show_bug.cgi?id=139812
3056
3057         Reviewed by Geoffrey Garen.
3058
3059         Update DOMTimerFireState.elementsChangedOutsideViewport to keep only
3060         weak pointers to the Elements, instead of ref'ing them, so as to not
3061         extend their life unnecessarily (by preventing garbage-collection).
3062         The same approach was already adopted in r176496 for
3063         DOMTimer.m_elementsCausingThrottling to address the same issue.
3064
3065         No new tests, already covered by Canvas/reuse.html performance test.
3066
3067         * page/DOMTimer.cpp:
3068         (WebCore::DOMTimerFireState::setScriptMadeNonUserObservableChangesToElement):
3069         (WebCore::DOMTimerFireState::elementsChangedOutsideViewport):
3070
3071 2015-02-03  Jer Noble  <jer.noble@apple.com>
3072
3073         [MSE] Setting timestampOffset does not change the timestamps in the actual sample, leading to visual and audible errors.
3074         https://bugs.webkit.org/show_bug.cgi?id=140929
3075
3076         Reviewed by Alexey Proskuryakov.
3077
3078         Fixes http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html.
3079
3080         Only apply the timestamp offset to the actual sample after step 1.6, where we may loop back to
3081         the top, to avoid double-offsetting the same sample.
3082
3083         * Modules/mediasource/SourceBuffer.cpp:
3084         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
3085
3086 2015-02-03  Jeremy Jones  <jeremyj@apple.com>
3087
3088         Restore interface before exiting optimized fullscreen mode.
3089         https://bugs.webkit.org/show_bug.cgi?id=141167
3090
3091         Reviewed by Simon Fraser.
3092
3093         This change allows the user interface to be restored before exiting optimized fullscreen mode.
3094
3095         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Add declaration.
3096         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
3097         (-[WebAVPlayerController playerViewController:restoreUserInterfaceForOptimizedFullscreenStopWithCompletionHandler:]): Added.
3098         (WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline): Added.
3099         * platform/spi/ios/AVKitSPI.h: Add new SPI.
3100
3101 2015-02-03  Jeremy Jones  <jeremyj@apple.com>
3102
3103         Prevent flicker when exiting fullscreen by synchronizing transactions.
3104         https://bugs.webkit.org/show_bug.cgi?id=140897
3105
3106         Reviewed by Tim Horton.
3107
3108         Synchronize across CAContexts when moving the video layer between layer hierarchies.
3109         Normally transactions involving multiple CAContexts are not synchronized.
3110
3111         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3112         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
3113         * platform/spi/cocoa/QuartzCoreSPI.h: add additional CAContext SPI declarations.
3114
3115 2015-02-03  Ryosuke Niwa  <rniwa@webkit.org>
3116
3117         Smart quoting could move the caret backwards in some configurations
3118         https://bugs.webkit.org/show_bug.cgi?id=141203
3119         <rdar://problem/17452543>
3120
3121         Reviewed by Enrica Casucci.
3122
3123         The bug was caused by markAndReplaceFor not running the code to preserve the selection after
3124         text replacement only when smart quote is enabled. Furthermore, when smart link was disabled,
3125         we never applied smart quote due to the following condition at line 2502:
3126
3127         if (!(shouldPerformReplacement || shouldCheckForCorrection || shouldMarkLink) || !doReplacement)
3128             continue;
3129
3130         This condition prevented the code to apply smart quote from running when both continuous
3131         spellchecking, smart link, and text replacement are disabled.
3132
3133         Fixed the bug by treating smart quotes and smart dashes like any other text replacement and set
3134         shouldPerformReplacement to true whenever either one of those text checking options are present.
3135
3136         Smart link didn't have this issue due to the explicit check for shouldMarkLink.
3137
3138         Smart dashes didn't suffer this problem either because dashes replacement happens only once
3139         the caret has moved past the dashes but his patch makes go through the same code path to preserve
3140         the selection as well for consistency.
3141
3142         Test: editing/inserting/smart-quote-with-all-configurations.html
3143
3144         * editing/Editor.cpp:
3145         (WebCore::Editor::markAndReplaceFor):
3146
3147 2015-02-02  Enrica Casucci  <enrica@apple.com>
3148
3149         Additional emoji support.
3150         https://bugs.webkit.org/show_bug.cgi?id=141047
3151         rdar://problem/19045135
3152
3153         Reviewed by Darin Adler.
3154
3155         Adds support for emoji modifiers and group emoji.
3156
3157         Test: editing/deleting/delete-emoji.html
3158
3159         * platform/graphics/FontCascade.cpp:
3160         (WebCore::FontCascade::characterRangeCodePath):
3161         * platform/text/TextBreakIterator.cpp:
3162         (WebCore::cursorMovementIterator):
3163         * rendering/RenderText.cpp:
3164         (WebCore::isEmojiGroupCandidate):
3165         (WebCore::isEmojiModifier):
3166         (WebCore::RenderText::previousOffsetForBackwardDeletion):
3167
3168 2015-02-03  Jer Noble  <jer.noble@apple.com>
3169
3170         Passing invalid values to OfflineAudioContext's constructor should not crash.
3171         https://bugs.webkit.org/show_bug.cgi?id=141197
3172
3173         Reviewed by Darin Adler.
3174
3175         Test: webaudio/offlineaudiocontext-constructor.html
3176
3177         Throw a SYNTAX_ERR exception if passed in a zero for channelCount or numberOfSamples. This avoids
3178         a crash where OfflineAudioDestinationNode is passed a null renderTarget.
3179
3180         * Modules/webaudio/OfflineAudioContext.cpp:
3181         (WebCore::OfflineAudioContext::create):
3182
3183 2015-02-03  Jer Noble  <jer.noble@apple.com>
3184
3185         [MSE] Setting timestampOffset does not change the timestamps in the actual sample, leading to visual and audible errors.
3186         https://bugs.webkit.org/show_bug.cgi?id=140929
3187
3188         Reviewed by Darin Adler.
3189
3190         Test: media/media-source/media-source-timeoffset.html
3191
3192         Changing timestampOffset will correctly offset the presentation and decode times within SourceBuffer and
3193         will correctly modify things like buffered ranges. But those changes need to be reflected in the underlying
3194         MediaSample for decoders to decode and display the samples at the correct times.
3195
3196         Add a method to MediaSample which allows the caller to offset timestamps of the underlying PlatformMediaSample.
3197
3198         * Modules/mediasource/SourceBuffer.cpp:
3199         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Call offsetTimestampsBy() on the sample.
3200         * platform/MediaSample.h:
3201         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3202         (WebCore::MediaSampleAVFObjC::offsetTimestampsBy): Create a new sample with the same underlying data
3203             but with a new timing info array, each timing info offset by the requested amount.
3204         * platform/mock/mediasource/MockBox.h:
3205         (WebCore::MockBox::offsetTimestampsBy): Offset m_presentationTimestamp and m_decodeTimestamp;
3206         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
3207         (WebCore::MockMediaSample::offsetTimestampsBy): Pass to MockBox.
3208
3209 2015-02-03  Jer Noble  <jer.noble@apple.com>
3210
3211         [Mac][EME] Crash in CDMSessionMediaSourceAVFObjC::layerDidReceiveError() - NSError not KVO compliant for key NSUnderlyingError.
3212         https://bugs.webkit.org/show_bug.cgi?id=140529
3213
3214         Reviewed by Darin Adler.
3215
3216         The underlying error should be fetched from the userInfo dictionary, not the error itself.
3217
3218         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3219         (WebCore::systemCodeForError):
3220
3221 2015-02-03  Commit Queue  <commit-queue@webkit.org>
3222
3223         Unreviewed, rolling out r179548.
3224         https://bugs.webkit.org/show_bug.cgi?id=141201
3225
3226         Hits debug assertions in 50+ SVG tests (Requested by brrian on
3227         #webkit).
3228
3229         Reverted changeset:
3230
3231         "Move InstanceInvalidationGuard/UpdateBlocker to SVGElement
3232         from SVGElementInstance"
3233         https://bugs.webkit.org/show_bug.cgi?id=141148
3234         http://trac.webkit.org/changeset/179548
3235
3236 2015-02-03  Jer Noble  <jer.noble@apple.com>
3237
3238         [Mac] HLS audio is not correctly selected according to system language
3239         https://bugs.webkit.org/show_bug.cgi?id=140398
3240         rdar://problem/19218487
3241
3242         Reviewed by Darin Adler.
3243
3244         Test: http/tests/media/hls/hls-audio-tracks-locale-selection.html
3245
3246         When AVMediaSelectionOptions come and go and no explicit track selection choice has
3247         been made, automatically pick the most appropriate track according to the user's
3248         current preferred locale settings.
3249
3250         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
3251         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
3252         (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC): Set m_shouldSelectOptionAutomatically
3253             to true by default.
3254         (WebCore::MediaSelectionGroupAVFObjC::updateOptions): If m_shouldSelectOptionAutomatically is set
3255             pick the most appropriate media selection option.
3256         (WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set m_shouldSelectOptionAutomatically to false.
3257         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3258         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Remove these automatic selection
3259             requests as they are ineffective when -appliesMediaSelectionCriteriaAutomatically is NO.
3260
3261 2015-02-03  Darin Adler  <darin@apple.com>
3262
3263         Move InstanceInvalidationGuard/UpdateBlocker to SVGElement from SVGElementInstance
3264         https://bugs.webkit.org/show_bug.cgi?id=141148
3265
3266         Reviewed by Brent Fulgham.
3267
3268         Inspired by this change Rob Buis made in Blink:
3269
3270             http://src.chromium.org/viewvc/blink?view=revision&revision=173343
3271
3272         I actually wrote the whole thing and then discovered we did it almost identically.
3273
3274         * svg/SVGAnimatedTypeAnimator.cpp:
3275         (WebCore::SVGElementAnimatedPropertyList::setInstanceUpdatesBlocked): Added this
3276         helper function to get around a circular header dependency.
3277         * svg/SVGAnimatedTypeAnimator.h:
3278         (WebCore::SVGAnimatedTypeAnimator::executeAction): Use setInstanceUpdatesBlocked.
3279
3280         * svg/SVGElement.cpp:
3281         (WebCore::SVGElement::removedFrom): Use invalidateInstances.
3282         (WebCore::SVGElement::finishParsingChildren): Ditto.
3283         (WebCore::SVGElement::svgAttributeChanged): Ditto.
3284         (WebCore::SVGElement::childrenChanged): Ditto.
3285         (WebCore::SVGElement::setInstanceUpdatesBlocked): Added an assertion that will
3286         catch anyone who nests InstanceUpdateBlocker by accident.
3287         (WebCore::SVGElement::invalidateInstances): Moved this here from
3288         SVGElementInstance::invalidateAllInstancesOfElement. I had already modified this
3289         so it had nothing to do with SVGElementInstance, so it was a simple matter of
3290         converting this into a member function. Added a FIXME about the mysterious
3291         updateStyleIfNeeded that makes multiple tests fail if it's removed.
3292
3293         * svg/SVGElement.h: Added public InstanceUpdateBlocker class, protected
3294         InstanceInvalidationGuard class, and private invalidateInstances function.
3295         Unlike the ones in SVGElementInstance these use references so they are then
3296         not copyable without using the WTF_MAKE_NONCOPYABLE macro.
3297
3298         * svg/SVGElementInstance.cpp:
3299         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement): Deleted.
3300         (WebCore::SVGElementInstance::InstanceUpdateBlocker::InstanceUpdateBlocker): Deleted.
3301         (WebCore::SVGElementInstance::InstanceUpdateBlocker::~InstanceUpdateBlocker): Deleted.
3302         * svg/SVGElementInstance.h: Removed InvalidationGuard, InstanceUpdateBlocker, and
3303         invalidateAllInstancesOfElement. Didn't do any further cleanup since we soon will
3304         delete this entire file.
3305
3306         * svg/SVGAElement.cpp:
3307         (WebCore::SVGAElement::svgAttributeChanged): Updated to use new name and reference
3308         instead of pointer.
3309         * svg/SVGAnimateElementBase.cpp:
3310         (WebCore::applyCSSPropertyToTargetAndInstances): Ditto.
3311         (WebCore::removeCSSPropertyFromTargetAndInstances): Ditto.
3312         (WebCore::notifyTargetAndInstancesAboutAnimValChange): Ditto.
3313         * svg/SVGAnimatedPath.cpp:
3314         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Ditto.
3315         * svg/SVGCircleElement.cpp:
3316         (WebCore::SVGCircleElement::svgAttributeChanged): Ditto.
3317         * svg/SVGClipPathElement.cpp:
3318         (WebCore::SVGClipPathElement::svgAttributeChanged): Ditto.
3319         * svg/SVGComponentTransferFunctionElement.cpp:
3320         (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged): Ditto.
3321         * svg/SVGCursorElement.cpp:
3322         (WebCore::SVGCursorElement::svgAttributeChanged): Ditto.
3323         * svg/SVGEllipseElement.cpp:
3324         (WebCore::SVGEllipseElement::svgAttributeChanged): Ditto.
3325         * svg/SVGFEBlendElement.cpp:
3326         (WebCore::SVGFEBlendElement::svgAttributeChanged): Ditto.
3327         * svg/SVGFEColorMatrixElement.cpp:
3328         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Ditto.
3329         * svg/SVGFECompositeElement.cpp:
3330         (WebCore::SVGFECompositeElement::svgAttributeChanged): Ditto.
3331         * svg/SVGFEConvolveMatrixElement.cpp:
3332         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Ditto.
3333         * svg/SVGFEDiffuseLightingElement.cpp:
3334         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Ditto.
3335         * svg/SVGFEDisplacementMapElement.cpp:
3336         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Ditto.
3337         * svg/SVGFEDropShadowElement.cpp:
3338         (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Ditto.
3339         * svg/SVGFEGaussianBlurElement.cpp:
3340         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Ditto.
3341         * svg/SVGFEImageElement.cpp:
3342         (WebCore::SVGFEImageElement::svgAttributeChanged): Ditto.
3343         * svg/SVGFELightElement.cpp:
3344         (WebCore::SVGFELightElement::svgAttributeChanged): Ditto.
3345         * svg/SVGFEMergeNodeElement.cpp:
3346         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Ditto.
3347         * svg/SVGFEMorphologyElement.cpp:
3348         (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Ditto.
3349         * svg/SVGFEOffsetElement.cpp:
3350         (WebCore::SVGFEOffsetElement::svgAttributeChanged): Ditto.
3351         * svg/SVGFESpecularLightingElement.cpp:
3352         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Ditto.
3353         * svg/SVGFETileElement.cpp:
3354         (WebCore::SVGFETileElement::svgAttributeChanged): Ditto.
3355         * svg/SVGFETurbulenceElement.cpp:
3356         (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Ditto.
3357         * svg/SVGFilterElement.cpp:
3358         (WebCore::SVGFilterElement::svgAttributeChanged): Ditto.
3359         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3360         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged): Ditto.
3361         * svg/SVGForeignObjectElement.cpp:
3362         (WebCore::SVGForeignObjectElement::svgAttributeChanged): Ditto.
3363         * svg/SVGGElement.cpp:
3364         (WebCore::SVGGElement::svgAttributeChanged): Ditto.
3365         * svg/SVGGradientElement.cpp:
3366         (WebCore::SVGGradientElement::svgAttributeChanged): Ditto.
3367         * svg/SVGGraphicsElement.cpp:
3368         (WebCore::SVGGraphicsElement::svgAttributeChanged): Ditto.
3369         * svg/SVGImageElement.cpp:
3370         (WebCore::SVGImageElement::svgAttributeChanged): Ditto.
3371         * svg/SVGLineElement.cpp:
3372         (WebCore::SVGLineElement::svgAttributeChanged): Ditto.
3373         * svg/SVGLinearGradientElement.cpp:
3374         (WebCore::SVGLinearGradientElement::svgAttributeChanged): Ditto.
3375         * svg/SVGMPathElement.cpp:
3376         (WebCore::SVGMPathElement::svgAttributeChanged): Ditto.
3377         * svg/SVGMarkerElement.cpp:
3378         (WebCore::SVGMarkerElement::svgAttributeChanged): Ditto.
3379         * svg/SVGMaskElement.cpp:
3380         (WebCore::SVGMaskElement::svgAttributeChanged): Ditto.
3381         * svg/SVGPathElement.cpp:
3382         (WebCore::SVGPathElement::svgAttributeChanged): Ditto.
3383         * svg/SVGPatternElement.cpp:
3384         (WebCore::SVGPatternElement::svgAttributeChanged): Ditto.
3385         * svg/SVGPolyElement.cpp:
3386         (WebCore::SVGPolyElement::svgAttributeChanged): Ditto.
3387         * svg/SVGRadialGradientElement.cpp:
3388         (WebCore::SVGRadialGradientElement::sv