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