d157d6c06006c3ff177655b4bff13fa5b5ae75fb
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-04-30  Nate Chapin  <japhet@chromium.org>
2
3         Move more of committing and starting to write a Document
4         to DocumentLoader.
5         https://bugs.webkit.org/show_bug.cgi?id=83908
6
7         Reviewed by Adam Barth.
8
9         No new tests, refactor only.
10
11         * loader/DocumentLoader.cpp:
12         (WebCore::DocumentLoader::commitIfReady): Ignore m_gotFirstByte here, since
13             it was always true here anyway.
14         (WebCore::DocumentLoader::finishedLoading): If we are finishing an empty
15             document, create the document now, so that FrameLoaderClient doesn't
16             have to do it later (FrameLoaderClient code will be removed in a later
17             patch).
18         (WebCore::DocumentLoader::commitData): Call receivedFirstData() directly and
19             do some work receivedFirstData() used to do, setEncoding() only once per
20             load.
21         (WebCore::DocumentLoader::receivedData):
22         (WebCore::DocumentLoader::maybeCreateArchive):
23         * loader/DocumentLoader.h:
24         * loader/DocumentWriter.cpp:
25         (WebCore::DocumentWriter::setEncoding):
26         * loader/FrameLoader.cpp:
27         (WebCore::FrameLoader::receivedFirstData): Move DocumentLoader calls
28             to DocumentLoader.
29         * loader/FrameLoader.h: Remove m_hasReceivedFirstData and willSetEncoding(),
30             allow hasReceivedData() to be called directly.
31         (FrameLoader):
32
33 2012-04-30  Kentaro Hara  <haraken@chromium.org>
34
35         Unreviewed. Fix test crashes in Win/Linux debug builds.
36
37         * bindings/v8/V8LazyEventListener.cpp:
38         (WebCore::V8LazyEventListener::V8LazyEventListener):
39         (WebCore::V8LazyEventListener::prepareListenerObject):
40         * bindings/v8/V8LazyEventListener.h:
41         (V8LazyEventListener):
42
43 2012-04-30  Tommy Widenflycht  <tommyw@google.com>
44
45         MediaStream API: Change LocalMediaStream::stop to be synchronous
46         https://bugs.webkit.org/show_bug.cgi?id=84942
47
48         Reviewed by Dimitri Glazkov.
49
50         Since I changed LocalMediaStream to be a ActiveDOMObject recently the stop()
51         behaviour needs to change since it is no longer a good idea to start a timer when called.
52
53         Not possible to write a test for this.
54
55         * Modules/mediastream/LocalMediaStream.cpp:
56         (WebCore::LocalMediaStream::LocalMediaStream):
57         (WebCore::LocalMediaStream::stop):
58         * Modules/mediastream/LocalMediaStream.h:
59         (LocalMediaStream):
60
61 2012-04-28  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
62
63         Add ENABLE_SUBPIXEL_LAYOUT controlling FractionalLayoutUnit denominator
64         https://bugs.webkit.org/show_bug.cgi?id=85146
65
66         Reviewed by Eric Seidel.
67
68         Add a new flag for controlling the fixed point denominator in
69         FractionalLayoutUnit. Controls whether the denominator is set to 60 or 1.
70         Until we change the LayoutUnit typedef this change will have no effect.
71
72         No new tests, no change in functionality.
73
74         * platform/FractionalLayoutUnit.h:
75         (WebCore):
76         (WebCore::FractionalLayoutUnit::operator++):
77         (WebCore::operator/):
78         (WebCore::operator+):
79         Add ++, / double and and + double operators. These are needed when
80         ENABLE_SUBPIXEL_LAYOUT is not enabled.
81         
82         * platform/graphics/FractionalLayoutRect.cpp:
83         (WebCore::enclosingFractionalLayoutRect):
84
85 2012-04-30  Justin Schuh  <jschuh@chromium.org>
86
87         loadOrRedirectSubframe should return the owner element's frame
88         https://bugs.webkit.org/show_bug.cgi?id=84780
89
90         Reviewed by Nate Chapin.
91
92         Test: fast/loader/javascript-url-iframe-remove-on-navigate.html
93
94         * loader/SubframeLoader.cpp:
95         (WebCore::SubframeLoader::loadOrRedirectSubframe):
96
97 2012-04-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
98
99         Use Vector<Attribute> directly instead of encapsulating it in AttributeVector
100         https://bugs.webkit.org/show_bug.cgi?id=84413
101
102         Reviewed by Andreas Kling.
103
104         As commented in https://bugs.webkit.org/show_bug.cgi?id=79963#c16 we do not
105         usually subclass basic types like Vector. This patch changes code to use
106         Vector<Attribute> directly and move around the functionality of the former
107         methods to more specific helper functions or inline code at the callers.
108
109         * dom/Element.cpp:
110         (WebCore::Element::parserSetAttributes):
111         (WebCore::Element::normalizeAttributes):
112         * dom/Element.h:
113         (Element):
114         * dom/ElementAttributeData.cpp:
115         * dom/ElementAttributeData.h:
116         (WebCore::findAttributeInVector):
117         (WebCore::ElementAttributeData::getAttributeItem):
118         (ElementAttributeData):
119         (WebCore::ElementAttributeData::attributeVector):
120         (WebCore::ElementAttributeData::clonedAttributeVector):
121         (WebCore::ElementAttributeData::getAttributeItemIndex):
122         (WebCore):
123         * html/parser/HTMLConstructionSite.cpp:
124         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
125         * html/parser/HTMLToken.h:
126         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
127         * html/parser/HTMLTreeBuilder.cpp:
128         (WebCore::HTMLTreeBuilder::processFakeStartTag):
129         (WebCore::HTMLTreeBuilder::attributesForIsindexInput): Loop through the attributes
130         backwards so we can remove items without affecting the rest of the loop run.
131         * html/parser/HTMLTreeBuilder.h:
132         * html/parser/TextDocumentParser.cpp:
133         (WebCore::TextDocumentParser::insertFakePreElement):
134         * xml/XMLErrors.cpp:
135         (WebCore::createXHTMLParserErrorHeader):
136         (WebCore::XMLErrors::insertErrorMessageBlock):
137         * xml/parser/MarkupTokenBase.h:
138         (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
139         (WebCore::AtomicMarkupTokenBase::getAttributeItem):
140         (WebCore::AtomicMarkupTokenBase::attributes):
141         (AtomicMarkupTokenBase):
142         (WebCore::::initializeAttributes):
143         * xml/parser/XMLToken.h:
144         (WebCore::AtomicXMLToken::AtomicXMLToken):
145
146 2012-04-30  Mark Pilgrim  <pilgrim@chromium.org>
147
148         [Chromium] Remove PlatformSupport::loadPlatformAudioResource, call loadResource directly
149         https://bugs.webkit.org/show_bug.cgi?id=85193
150
151         Reviewed by Kentaro Hara.
152
153         Part of a refactoring series. See tracking bug 82948.
154
155         * platform/audio/chromium/AudioBusChromium.cpp:
156         (WebCore::AudioBus::loadPlatformResource):
157         * platform/chromium/PlatformSupport.h:
158         (PlatformSupport):
159
160 2012-04-30  Mark Pilgrim  <pilgrim@chromium.org>
161
162         [Chromium] Call defaultLocale directly
163         https://bugs.webkit.org/show_bug.cgi?id=85192
164
165         Reviewed by Kentaro Hara.
166
167         Part of a refactoring series. See tracking bug 82948.
168
169         * platform/chromium/LanguageChromium.cpp:
170         (WebCore::platformLanguage):
171         * platform/chromium/PlatformSupport.h:
172         (PlatformSupport):
173
174 2012-04-30  Beth Dakin  <bdakin@apple.com>
175
176         https://bugs.webkit.org/show_bug.cgi?id=82922
177         border-image with image-set does not render correctly when viewed at 
178         2x
179         -and corresponding-
180         <rdar://problem/11167820>
181
182         Reviewed by Dan Bernstein.
183
184         StyleImage::computeIntrinsicDimensions() is only called from one 
185         place: RenderBoxModelObject::calculateIntrinsicDimensions(), and that 
186         is only used for background images and border images. In my original 
187         image-set work, I decided that 
188         StyleCachedImageSet::computeIntrinsicDimensions() would compute 
189         "intrinsic" dimensions, meaning that they would compute the dimensions 
190         that the image resource was pretending to be rather than the actual 
191         dimensions of the resource. I chose to do this because it made 
192         background images work great without changing the call-site. But border 
193         images need to know the actual intrinsic dimensions, so this design 
194         decision (which was admittedly questionable from the start) won't 
195         stick.
196         
197         This patch makes StyleImage::computeIntrinsicDimensions() return 
198         actual intrinsic dimensions. Then the border-image and background-
199         image code is very lightly patched to account for the image's scale 
200         factor.
201
202         These functions no longer need the scale factor parameter.
203         * loader/cache/CachedImage.cpp:
204         (WebCore::CachedImage::computeIntrinsicDimensions):
205         * loader/cache/CachedImage.h:
206         (CachedImage):
207         * platform/graphics/GeneratedImage.h:
208         (GeneratedImage):
209         * platform/graphics/GeneratorGeneratedImage.cpp:
210         (WebCore::GeneratedImage::computeIntrinsicDimensions):
211         * platform/graphics/Image.cpp:
212         (WebCore::Image::computeIntrinsicDimensions):
213         * platform/graphics/Image.h:
214         (Image):
215         * platform/graphics/cg/PDFDocumentImage.cpp:
216         (WebCore::PDFDocumentImage::computeIntrinsicDimensions):
217         * platform/graphics/cg/PDFDocumentImage.h:
218         (PDFDocumentImage):
219         * svg/graphics/SVGImage.cpp:
220         (WebCore::SVGImage::computeIntrinsicDimensions):
221         * svg/graphics/SVGImage.h:
222         (SVGImage):
223         * rendering/style/StyleCachedImageSet.cpp:
224         (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
225         
226         New function on StyleImage returns the image's scale factor. 
227         * rendering/style/StyleCachedImageSet.h:
228         (WebCore::StyleCachedImageSet::imageScaleFactor):
229         * rendering/style/StyleImage.h:
230         (WebCore::StyleImage::imageScaleFactor):
231
232         Scale the intrinsic size of the background image down by the scale 
233         factor.
234         * rendering/RenderBoxModelObject.cpp:
235         (WebCore::RenderBoxModelObject::calculateFillTileSize):
236         
237         Slices should be multiplied by the image's scale factor since they are 
238         always expected to the specified in the 1x image's coordinate space.
239         (WebCore::RenderBoxModelObject::paintNinePieceImage):
240
241 2012-04-30  Arko Saha  <arko@motorola.com>
242
243         Remove custom bindings code in JSHTMLCollectionCustom.cpp for HTMLPropertiesCollection.
244         https://bugs.webkit.org/show_bug.cgi?id=85172
245
246         Reviewed by Kentaro Hara.
247
248         Use [JSGenerateToJSObject] in HTMLPropertiesCollection.idl, so that it can generate toJS()
249         in JSHTMLPropertiesCollection.cpp automatically.
250
251         * bindings/js/JSHTMLCollectionCustom.cpp:
252         (WebCore::toJS):
253         * html/HTMLPropertiesCollection.idl:
254
255 2012-04-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
256
257         [Texmap] TextureMapperLayer uses intermediate surfaces too eagerly
258         https://bugs.webkit.org/show_bug.cgi?id=85103
259
260         Reviewed by Kenneth Rohde Christiansen.
261
262         Instead of automatically using an intermediate surface for layers with opacity and
263         children, we limit surface usage for layers with more than one child and for layers with
264         one child and contents of its own.
265
266         This prevents us from using intermediate surfaces in cases where a single layer with
267         opacity has a single descendant with content, in which case normal blending can be used.
268
269         Covered by existing compositing layout tests.
270
271         * platform/graphics/texmap/TextureMapperLayer.cpp:
272         (WebCore):
273         * platform/graphics/texmap/TextureMapperLayer.h:
274
275 2012-04-30  Yi Shen  <yi.4.shen@nokia.com>
276
277         Inserting a paragraph between quoted lines in editing/deleting/delete-4038408-fix.html doesn't work
278         https://bugs.webkit.org/show_bug.cgi?id=78193
279
280         Reviewed by Ryosuke Niwa.
281
282         When pasting a copied portion of a blockquote with a newline at the end into an unquoted area,
283         the newline is inserted after the blockquote since we don't want it also to be quoted. However,
284         this behavior has also applied when we insert a paragraph between quoted lines, which is incorrect.
285         To figure out the right place to insert a paragraph, we need providing more information to the
286         InsertParagraphSeparatorCommand by introducing a boolean parameter "pasteBlockqutoeIntoUnquotedArea".
287
288         Tests: editing/inserting/insert-paragraph-separator-in-blockquote.html
289                editing/pasteboard/paste-wrapped-blockquote-into-nonblockquote.html
290
291         * editing/CompositeEditCommand.cpp:
292         (WebCore::CompositeEditCommand::insertParagraphSeparator):
293         * editing/CompositeEditCommand.h:
294         (CompositeEditCommand):
295         * editing/InsertParagraphSeparatorCommand.cpp:
296         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
297         (WebCore::InsertParagraphSeparatorCommand::doApply):
298         * editing/InsertParagraphSeparatorCommand.h:
299         (WebCore::InsertParagraphSeparatorCommand::create):
300         (InsertParagraphSeparatorCommand):
301         * editing/ReplaceSelectionCommand.cpp:
302         (WebCore::ReplaceSelectionCommand::doApply):
303
304 2012-04-30  Antti Koivisto  <antti@apple.com>
305
306         Protect current element in HTMLLinkElement::setCSSStyleSheet
307         https://bugs.webkit.org/show_bug.cgi?id=85166
308
309         Reviewed by Andreas Kling.
310         
311         Stylesheet loading can trigger script execution.
312         
313         Test: fast/css/cached-sheet-restore-crash.html
314
315         * html/HTMLLinkElement.cpp:
316         (WebCore::HTMLLinkElement::setCSSStyleSheet):
317
318 2012-04-29  Keishi Hattori  <keishi@webkit.org>
319
320         Build fix for LocalizedDateMac.mm
321         https://bugs.webkit.org/show_bug.cgi?id=85164
322
323         Reviewed by Kent Tamura.
324
325         * platform/text/mac/LocalizedDateMac.mm:
326         (WebCore::monthLabels):
327
328 2012-04-29  Luke Macpherson  <macpherson@chromium.org>
329
330         Initialize member variables in CSSParser's constructor.
331         https://bugs.webkit.org/show_bug.cgi?id=84377
332
333         Reviewed by Kentaro Hara.
334
335         It is good practice not to leave member variables uninitialized. They make debugging more difficult by reducing
336         repeatability, and in some cases lead to the possibility of information leakage occuring. This patch simply adds
337         initialization of m_numParsedPropertiesBeforeMarginBox to CSSParser's constructor to INVALID_NUM_PARSED_PROPERTIES
338         so that the initial state is the same as the state after the properties are cleared.
339
340         No tests added because this is a code style fix, not an actual bug so long as the bison generated code calls
341         startDeclarationsForMarginBox() and endDeclarationsForMarginBox() symmetrically. The lack of initialization was
342         originally detected by coverity.
343
344         * css/CSSParser.cpp:
345         (WebCore::CSSParser::CSSParser):
346
347 2012-04-29  Kent Tamura  <tkent@chromium.org>
348
349         [Mac] Add LocalizedDateMac
350         https://bugs.webkit.org/show_bug.cgi?id=85039
351
352         Reviewed by Kentaro Hara.
353
354         A date shown <input type=date> should be formatted for user's OS
355         settings. Chromium-Mac used LocalizedDateICU.cpp to format/parse visible
356         date strings and it didn't reflect user-settings.
357
358         Test: covered by fast/forms/date/date-appearance.html
359
360         * WebCore.gyp/WebCore.gyp:
361         Use LocalizedDateMac.mm for OS X instead of LocalizedDateICU.cpp.
362         * WebCore.gypi: Add LocalizedDateMac.mm
363         * platform/text/mac/LocalizedDateMac.mm: Added.
364         (WebCore::createShortDateFormatter):
365         Creates a NSDateFormatter with desired settings.
366         (WebCore::parseLocalizedDate): Impelment for tyep=date.
367         (WebCore::formatLocalizedDate): ditto.
368         (WebCore::isYearSymbol): A readability helper for format string parsing.
369         (WebCore::isMonthSymbol): ditto.
370         (WebCore::isDaySymbol): ditto.
371         (WebCore::localizeDateFormat):
372         Parse a format string, and replace symbols with user-friendly labels.
373         (WebCore::localizedDateFormatText):
374         Gets a format string, and apply localizeDateFormat().
375         (WebCore::monthLabels): Obtain month names from the system.
376         (WebCore::weekDayShortLabels): Obtain week day symbols from the system.
377         (WebCore::firstDayOfWeek): Obtain first day of week from the system.
378         * platform/text/ICULocale.cpp:
379         (WebCore::createFallbackMonthLabels): Uses WTF::monthFullName.
380
381 2012-04-29  Sam Weinig  <sam@webkit.org>
382
383         Add support for the Blob constructor (Part 2)
384         https://bugs.webkit.org/show_bug.cgi?id=84555
385
386         Address additional feedback on Blob construction.
387         - Add exception when the dictionary is not an object.
388         - Ensure the proper ordering of dictionary access. Tested via
389           throwing exceptions in toString, and ensuring correct one is
390           fired first.
391         - Changed type of exception throw for invalid enumeration to a
392           TypeError.
393
394         Reviewed by Kentaro Hara.
395
396         Updated fast/files/blob-constructor.html to be more comprehensive.
397
398         * bindings/js/JSBlobCustom.cpp:
399         (WebCore::JSBlobConstructor::constructJSBlob):
400         * bindings/v8/custom/V8BlobCustom.cpp:
401         (WebCore::V8Blob::constructorCallback):
402
403 2012-04-29  No'am Rosenthal  <noam.rosenthal@nokia.com>
404
405         [Texmap] Leaves demo: wrong geometry when opacity animation kicks in
406         https://bugs.webkit.org/show_bug.cgi?id=85096
407
408         Reviewed by Kenneth Rohde Christiansen.
409
410         We should use combined() instead of combinedForChildren() since we don't allow
411         intermediate surfaces for preserves-3d. Also, we should apply the offset before
412         multiplying the transforms, otherwise the transform-origin is incorrect.
413
414         Covered by existing compositing tests.
415
416         * platform/graphics/texmap/TextureMapperLayer.cpp:
417         (WebCore::TextureMapperLayer::paintSelf):
418         (WebCore::TextureMapperLayer::paintRecursive):
419
420 2012-04-29  Mark Pilgrim  <pilgrim@chromium.org>
421
422         [Chromium] Call highUsageDeltaMB directly
423         https://bugs.webkit.org/show_bug.cgi?id=84844
424
425         Reviewed by Kentaro Hara.
426
427         Part of a refactoring series. See tracking bug 82948.
428
429         * bindings/v8/V8GCController.cpp:
430         (WebCore::V8GCController::checkMemoryUsage):
431         * platform/MemoryUsageSupport.cpp:
432         (WebCore):
433         (WebCore::MemoryUsageSupport::highUsageDeltaMB):
434         * platform/MemoryUsageSupport.h:
435         (MemoryUsageSupport):
436         * platform/chromium/MemoryUsageSupportChromium.cpp:
437         (WebCore::MemoryUsageSupport::highUsageDeltaMB):
438         (WebCore):
439         * platform/chromium/PlatformSupport.h:
440         (PlatformSupport):
441
442 2012-04-29  Kentaro Hara  <haraken@chromium.org>
443
444         REGRESSION(r113086): onresize event handler can be deleted in popup window
445         https://bugs.webkit.org/show_bug.cgi?id=84908
446
447         Reviewed by Ojan Vafai.
448
449         In a nutshell, an onresize event handler in the popup window
450         can be non-deterministically deleted. For more details, please
451         look at Chromium issue 123642:
452         http://code.google.com/p/chromium/issues/detail?id=123642
453
454         I confirmed that this bug is the regression caused by r113086.
455
456         r113086 introduced the following code:
457
458         void V8LazyEventListener::prepareListenerObject(...) {
459             if (hasExistingListenerObject())
460                 return;
461             ...;
462             // Since we only parse once, there's no need to keep data
463             // used for parsing around anymore.
464             m_functionName = String();
465             m_code = String();
466             m_eventParameterName = String();
467             m_sourceURL = String();
468
469             setListenerObject(wrappedFunction);
470         }
471
472         This is not correct. The parsing can be done more than once,
473         and thus we cannot clear data. This patch removes the above code.
474
475         Consider the following situation:
476
477         (1) Assume '<body onresize="f()"></body>'.
478         (2) prepareListenerObject() runs.
479         (3) Since this is the first parsing, hasExistingListenerObject()
480         returns false. After the parsing, the listener object is set
481         by setListenerObject().
482         (4) GC runs. Since there is no strong reference to the listener
483         object, weakEventListenerCallback() is called back, and the listener
484         object is disposed.
485         (5) A resize event is triggered.
486         (6) prepareListenerObject() is called again. Since the listener object
487         is already disposed, hasExistingListenerObject() returns false,
488         and the second parsing starts.
489
490         In my investigation, the above situation is happening in the reported
491         Chromium bug. Anyway, I am sure that potentially the parsing can be
492         done more than once, and thus we must keep m_xxxx data.
493
494         However, this is just a temporary fix. We should fix the code so that
495         an alive event listener object is never reclaimed.
496         See https://bugs.webkit.org/show_bug.cgi?id=85152 for more details.
497
498         No tests: I tried hard to create a DRT test, but could not.
499         The bug depends on the behavior of GC, and thus the reported bug is
500         non-deterministic. For example, (as explained in the Chromium issue,)
501         the bug does not happen if we load an HTML from network because
502         the network latency hides the bug. Also the bug happens in the
503         popup window only. If we open the reported HTML in the main window,
504         we cannot reproduce the bug.
505
506         * bindings/v8/V8LazyEventListener.cpp:
507         (WebCore::V8LazyEventListener::prepareListenerObject):
508
509 2012-04-28  Sam Weinig  <sam@webkit.org>
510
511         Smooth scrolling needs a new key
512         <rdar://problem/11331632>
513
514         Reviewed by Geoffrey Garen.
515
516         * platform/mac/ScrollAnimatorMac.mm:
517         (WebCore::scrollAnimationEnabledForSystem):
518         (WebCore::ScrollAnimatorMac::scroll):
519         Update for new key.
520
521 2012-04-28  Li Yin  <li.yin@intel.com>
522
523         MessagePort must set m_closed to be true at the end of MessagePort::close function
524         https://bugs.webkit.org/show_bug.cgi?id=85139
525
526         In the function MessagePort::close, the "m_closed = true" must be executed at the end, not at the beginning.
527         Or, the m_entangledChannel->close() will not be executed.
528         And it resulted in the failure of MS bench mark messagechannel_close.htm.
529         http://samples.msdn.microsoft.com/ietestcenter/WebWorkers/messagechannel_close.htm
530
531         Reviewed by Kentaro Hara.
532
533         Test: fast/events/message-port-close.html
534
535         * dom/MessagePort.cpp:
536         (WebCore::MessagePort::close):
537
538 2012-04-28  Sam Weinig  <sam@webkit.org>
539
540         And again.
541
542         * bindings/v8/custom/V8BlobCustom.cpp:
543         (WebCore::V8Blob::constructorCallback):
544
545 2012-04-28  Sam Weinig  <sam@webkit.org>
546
547         Once again, try to make these puppies work.
548
549         * bindings/v8/custom/V8BlobCustom.cpp:
550
551 2012-04-28  Sam Weinig  <sam@webkit.org>
552
553         Fix the Chromium build.
554
555         * bindings/v8/custom/V8BlobCustom.cpp:
556         (WebCore::V8Blob::constructorCallback):
557
558 2012-04-27  Sam Weinig  <sam@webkit.org>
559
560         Add support for the Blob constructor
561         https://bugs.webkit.org/show_bug.cgi?id=84555
562
563         Reviewed by Maciej Stachowiak.
564
565         Test: fast/files/blob-constructor.html
566
567         This adds an implementation of the Blob constructor that willfully
568         violates the W3C Editor’s Draft 29 February 2012 in the following ways:
569         - Elements in the parts array are coerced to DOMStrings https://www.w3.org/Bugs/Public/show_bug.cgi?id=16721 
570         - Don't throw for invalid key in the dictionary https://www.w3.org/Bugs/Public/show_bug.cgi?id=16727
571         - Values for the endings property are treated as enums https://www.w3.org/Bugs/Public/show_bug.cgi?id=16729 
572
573         * bindings/js/JSBlobCustom.cpp:
574         (WebCore::JSBlobConstructor::constructJSBlob):
575         Implement blob constructor.
576
577         * bindings/v8/custom/V8BlobCustom.cpp:
578         (WebCore::V8Blob::constructorCallback):
579         Implement blob constructor.
580
581         * fileapi/Blob.idl:
582         Add constructor to IDL.
583
584         * workers/WorkerContext.idl:
585         Add Blob constructor to the worker global object.
586
587 2012-04-28  Igor Oliveira  <igor.o@sisa.samsung.com>
588
589         Move PropertyWrapper out of the  AnimationBase
590         https://bugs.webkit.org/show_bug.cgi?id=84978
591
592         Reviewed by Dean Jackson.
593
594         AnimationBase is a complex class. It has a state machine and a bunch of
595         property handlers. This patch moves the property handlers to a separate
596         class making AnimationBase simpler.
597
598         * CMakeLists.txt:
599         * GNUmakefile.list.am:
600         * Target.pri:
601         * WebCore.gypi:
602         * WebCore.vcproj/WebCore.vcproj:
603         * WebCore.xcodeproj/project.pbxproj:
604         * page/animation/AnimationBase.cpp:
605         * page/animation/AnimationBase.h:
606         (AnimationBase):
607         * page/animation/AnimationController.cpp:
608         (WebCore::AnimationController::supportsAcceleratedAnimationOfProperty):
609         * page/animation/CSSPropertyAnimation.cpp: Added.
610         (WebCore):
611         (WebCore::blendFunc):
612         (WebCore::crossfadeBlend):
613         (AnimationPropertyWrapperBase):
614         (WebCore::AnimationPropertyWrapperBase::AnimationPropertyWrapperBase):
615         (WebCore::AnimationPropertyWrapperBase::~AnimationPropertyWrapperBase):
616         (WebCore::AnimationPropertyWrapperBase::isShorthandWrapper):
617         (WebCore::AnimationPropertyWrapperBase::property):
618         (WebCore::AnimationPropertyWrapperBase::animationIsAccelerated):
619         (WebCore::addPropertyWrapper):
620         (WebCore::wrapperForProperty):
621         (PropertyWrapperGetter):
622         (WebCore::PropertyWrapperGetter::PropertyWrapperGetter):
623         (WebCore::PropertyWrapperGetter::equals):
624         (PropertyWrapper):
625         (WebCore::PropertyWrapper::PropertyWrapper):
626         (WebCore::PropertyWrapper::blend):
627         (RefCountedPropertyWrapper):
628         (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
629         (WebCore::RefCountedPropertyWrapper::blend):
630         (StyleImagePropertyWrapper):
631         (WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
632         (WebCore::StyleImagePropertyWrapper::equals):
633         (PropertyWrapperColor):
634         (WebCore::PropertyWrapperColor::PropertyWrapperColor):
635         (WebCore::PropertyWrapperColor::blend):
636         (PropertyWrapperAcceleratedOpacity):
637         (WebCore::PropertyWrapperAcceleratedOpacity::PropertyWrapperAcceleratedOpacity):
638         (WebCore::PropertyWrapperAcceleratedOpacity::animationIsAccelerated):
639         (WebCore::PropertyWrapperAcceleratedOpacity::blend):
640         (PropertyWrapperAcceleratedTransform):
641         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
642         (WebCore::PropertyWrapperAcceleratedTransform::animationIsAccelerated):
643         (WebCore::PropertyWrapperAcceleratedTransform::blend):
644         (PropertyWrapperAcceleratedFilter):
645         (WebCore::PropertyWrapperAcceleratedFilter::PropertyWrapperAcceleratedFilter):
646         (WebCore::PropertyWrapperAcceleratedFilter::animationIsAccelerated):
647         (WebCore::PropertyWrapperAcceleratedFilter::blend):
648         (WebCore::shadowListLength):
649         (WebCore::shadowForBlending):
650         (PropertyWrapperShadow):
651         (WebCore::PropertyWrapperShadow::PropertyWrapperShadow):
652         (WebCore::PropertyWrapperShadow::equals):
653         (WebCore::PropertyWrapperShadow::blend):
654         (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
655         (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
656         (PropertyWrapperMaybeInvalidColor):
657         (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor):
658         (WebCore::PropertyWrapperMaybeInvalidColor::equals):
659         (WebCore::PropertyWrapperMaybeInvalidColor::blend):
660         (PropertyWrapperVisitedAffectedColor):
661         (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
662         (WebCore::PropertyWrapperVisitedAffectedColor::equals):
663         (WebCore::PropertyWrapperVisitedAffectedColor::blend):
664         (FillLayerAnimationPropertyWrapperBase):
665         (WebCore::FillLayerAnimationPropertyWrapperBase::FillLayerAnimationPropertyWrapperBase):
666         (WebCore::FillLayerAnimationPropertyWrapperBase::~FillLayerAnimationPropertyWrapperBase):
667         (FillLayerPropertyWrapperGetter):
668         (WebCore::FillLayerPropertyWrapperGetter::FillLayerPropertyWrapperGetter):
669         (WebCore::FillLayerPropertyWrapperGetter::equals):
670         (FillLayerPropertyWrapper):
671         (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
672         (WebCore::FillLayerPropertyWrapper::blend):
673         (FillLayerRefCountedPropertyWrapper):
674         (WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper):
675         (WebCore::FillLayerRefCountedPropertyWrapper::blend):
676         (FillLayerStyleImagePropertyWrapper):
677         (WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper):
678         (WebCore::FillLayerStyleImagePropertyWrapper::equals):
679         (FillLayersPropertyWrapper):
680         (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
681         (WebCore::FillLayersPropertyWrapper::equals):
682         (WebCore::FillLayersPropertyWrapper::blend):
683         (ShorthandPropertyWrapper):
684         (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper):
685         (WebCore::ShorthandPropertyWrapper::isShorthandWrapper):
686         (WebCore::ShorthandPropertyWrapper::equals):
687         (WebCore::ShorthandPropertyWrapper::blend):
688         (WebCore::ShorthandPropertyWrapper::propertyWrappers):
689         (PropertyWrapperFlex):
690         (WebCore::PropertyWrapperFlex::PropertyWrapperFlex):
691         (WebCore::PropertyWrapperFlex::equals):
692         (WebCore::PropertyWrapperFlex::blend):
693         (PropertyWrapperSVGPaint):
694         (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):
695         (WebCore::PropertyWrapperSVGPaint::equals):
696         (WebCore::PropertyWrapperSVGPaint::blend):
697         (WebCore::addShorthandProperties):
698         (WebCore::CSSPropertyAnimation::ensurePropertyMap):
699         (WebCore::gatherEnclosingShorthandProperties):
700         (WebCore::CSSPropertyAnimation::blendProperties):
701         (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
702         (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
703         (WebCore::CSSPropertyAnimation::propertiesEqual):
704         (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
705         (WebCore::CSSPropertyAnimation::getNumProperties):
706         * page/animation/CSSPropertyAnimation.h: Added.
707         (WebCore):
708         (CSSPropertyAnimation):
709         * page/animation/CompositeAnimation.cpp:
710         (WebCore::CompositeAnimation::updateTransitions):
711         (WebCore::CompositeAnimation::pauseTransitionAtTime):
712         * page/animation/ImplicitAnimation.cpp:
713         (WebCore::ImplicitAnimation::animate):
714         (WebCore::ImplicitAnimation::getAnimatedStyle):
715         (WebCore::ImplicitAnimation::isTargetPropertyEqual):
716         (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
717         (WebCore::ImplicitAnimation::timeToNextService):
718         * page/animation/KeyframeAnimation.cpp:
719         (WebCore::KeyframeAnimation::animate):
720         (WebCore::KeyframeAnimation::getAnimatedStyle):
721         (WebCore::KeyframeAnimation::timeToNextService):
722         * rendering/style/RenderStyle.h:
723
724 2012-04-28  Geoffrey Garen  <ggaren@apple.com>
725
726         Clarified JSGlobalData (JavaScript VM) lifetime
727         https://bugs.webkit.org/show_bug.cgi?id=85142
728
729         Reviewed by Anders Carlsson.
730
731         * bindings/js/WorkerScriptController.cpp:
732         (WebCore::WorkerScriptController::~WorkerScriptController): Slightly 
733         simpler than before. We can't just rely on our default destructor 
734         because we need to hold the JSLock when we tear down the VM.
735
736         * bridge/NP_jsobject.cpp:
737         (_NPN_InvokeDefault):
738         (_NPN_Invoke):
739         (_NPN_Evaluate):
740         (_NPN_Construct): Don't RefPtr<> the JSGlobalData because it makes it 
741         seem like you know something the rest of our code doesn't know. The 
742         plugin JSGlobalData is immortal, anyway.
743
744         I also removed some timeout checker related code because that feature 
745         doesn't work anymore, so it was effectively dead code.
746
747 2012-04-28  Ilya Tikhonovsky  <loislo@chromium.org>
748
749         Web Inspector: InspectorFrontendHost.append has to be implemented for saving heap snapshots.
750         https://bugs.webkit.org/show_bug.cgi?id=85137
751
752         We can save a file with help of InspectorFrontendHost.save method,
753         but it is suitable only for relatively small portions of data and
754         can't process the 6Gb heap snapshot.
755         These methods just pass the url and content into embedder.
756
757         Reviewed by Yury Semikhatsky.
758
759         * inspector/InspectorFrontendClient.h:
760         (InspectorFrontendClient):
761         * inspector/InspectorFrontendClientLocal.h:
762         (WebCore::InspectorFrontendClientLocal::append):
763         * inspector/InspectorFrontendHost.cpp:
764         (WebCore::InspectorFrontendHost::append):
765         (WebCore):
766         * inspector/InspectorFrontendHost.h:
767         (InspectorFrontendHost):
768         * inspector/InspectorFrontendHost.idl:
769
770 2012-04-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
771
772         [Qt][Texmap] Error of cross-compiling webkit with Qt 4.8.1
773         https://bugs.webkit.org/show_bug.cgi?id=84321
774
775         Speculative build-fix for Qt 4.8.
776         Use QGLContext for Qt 4.x instead of the platform-specific context.
777
778         Reviewed by Simon Hausmann.
779
780         No new tests, build fix.
781
782         * platform/graphics/texmap/TextureMapperGL.cpp:
783         (SharedGLData):
784         (WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):
785
786 2012-04-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
787
788         [Texmap] Falling leaves demo missing opacity fade out animation
789         https://bugs.webkit.org/show_bug.cgi?id=83691
790
791         Reviewed by Martin Robinson.
792
793         The bug originated from clearing an intermediate surface with glClear while the scissor
794         state was wrong.
795         When using intermediate surfaces, maintain a clip-stack for each surface, rather than
796         a single clip-stack for the whole scene. When a surface is bound, its clip stack should
797         be applied.
798
799         Covered by existing compositing tests.
800
801         * platform/graphics/texmap/TextureMapperGL.cpp:
802         (SharedGLData):
803         (WebCore::TextureMapperGL::ClipStack::push):
804         (WebCore):
805         (WebCore::TextureMapperGL::ClipStack::pop):
806         (WebCore::scissorClip):
807         (WebCore::TextureMapperGL::ClipStack::apply):
808         (WebCore::TextureMapperGL::clipStack):
809         (WebCore::TextureMapperGL::beginPainting):
810         (WebCore::TextureMapperGL::drawTexture):
811         (WebCore::BitmapTextureGL::didReset):
812         (WebCore::BitmapTextureGL::clearIfNeeded):
813         (WebCore::BitmapTextureGL::createFboIfNeeded):
814         (WebCore::BitmapTextureGL::bind):
815         (WebCore::TextureMapperGL::bindDefaultSurface):
816         (WebCore::TextureMapperGL::bindSurface):
817         (WebCore::TextureMapperGL::beginScissorClip):
818         (WebCore::TextureMapperGL::beginClip):
819         (WebCore::TextureMapperGL::endClip):
820         * platform/graphics/texmap/TextureMapperGL.h:
821         (TextureMapperGL):
822         (ClipState):
823         (WebCore::TextureMapperGL::ClipState::ClipState):
824         (ClipStack):
825         (WebCore::TextureMapperGL::ClipStack::current):
826         (WebCore::TextureMapperGL::ClipStack::clear):
827         (BitmapTextureGL):
828         (WebCore::BitmapTextureGL::BitmapTextureGL):
829
830 2012-04-26  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
831
832         Move Length and CSS length computation to float
833         https://bugs.webkit.org/show_bug.cgi?id=84801
834
835         Reviewed by Eric Seidel.
836
837         Change Length and CSS length computation to floating point. This gets us
838         closer to the goal of supporting subpixel layout and improves precision
839         for SVG which already uses floating point for its layout.
840
841         This change makes computedStyle return fractional values for pixel values
842         if a fraction is specified. It also changes the result of computations
843         where two or more values with fractional precision. Prior to this change
844         the result of Length(2.9) + Length(2.9) would be 4 as each value would be
845         floored. With this change the result is 5 as the addition is done with
846         floating point precision and then the result will be floored. Once we
847         enable subpixel layout the resulting value in this example would be 5.8.
848
849         Updated existing layout tests.
850
851         * css/CSSComputedStyleDeclaration.cpp:
852         (WebCore::zoomAdjustedPixelValue):
853         * css/CSSPrimitiveValue.cpp:
854         (WebCore::CSSPrimitiveValue::computeLength):
855         * css/CSSPrimitiveValue.h:
856         (WebCore):
857         (WebCore::roundForImpreciseConversion):
858         Add specialized float version of roundForImpreciseConversion that matches
859         the int versions rounding logic.
860         
861         If a value is sufficiently close to the next integer round it up to
862         ensure that a style rule such as "width: 4.999px" evaluates to 5px
863         instead of 4px. This is needed as, although Lengths are using floating
864         point, the layout system still uses integer precision and floors the
865         Length values.
866         This will change once we move to FractionalLayoutUnits but for now this
867         is needed to ensure compatibility with the existing system and tests.
868         
869         Without this specialized rounding logic we fail a handful of tests
870         including acid3.
871         
872         * platform/Length.h:
873         (WebCore::Length::value):
874         (Length):
875         (WebCore::Length::intValue):
876         * rendering/RenderTableCell.cpp:
877         (WebCore::RenderTableCell::styleOrColLogicalWidth):
878
879 2012-04-28  Alexander Pavlov  <apavlov@chromium.org>
880
881         Web Inspector: Enable touch events feature fails touch feature detection
882         https://bugs.webkit.org/show_bug.cgi?id=84397
883
884         Whenever the touch emulation is enabled, Inspector adds a script to evaluate on load,
885         that adds ontouch(start|end|move|cancel) properties to window.__proto__ and document.__proto__.
886
887         Reviewed by Pavel Feldman.
888
889         * inspector/front-end/DOMAgent.js:
890         (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.get if):
891         (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.scriptAddedCallback):
892         (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged):
893         * inspector/front-end/inspector.js:
894
895 2012-04-28  Eugene Klyuchnikov  <eustas.bug@gmail.com>
896
897         Web Inspector: Shortcuts screen UI polish
898         https://bugs.webkit.org/show_bug.cgi?id=84708
899
900           1) remove inconsistent shadow;
901           2) reduce border radius;
902           3) vertically center the “X” button;
903           4) replace unreadable symbolic shortcuts with text;
904           5) gaps / colors / opacity adjustments;
905           6) section-to-column distribution algorithm is replaced with a fair one.
906
907         Reviewed by Pavel Feldman.
908
909         This is a UI polising patch, so no new tests added.
910
911         * English.lproj/localizedStrings.js: added keyboars arrow keys items
912         * inspector/front-end/KeyboardShortcut.js: replace unreadable symbolic shortcuts with text
913         * inspector/front-end/ShortcutsScreen.js:
914         (WebInspector.ShortcutsScreen):
915         (WebInspector.ShortcutsScreen.prototype.show): remove redundant parameter
916         (WebInspector.ShortcutsScreen.prototype._buildTable): change section distributing algorithm
917         (WebInspector.ShortcutsSection.prototype.renderSection): render colon with margins
918         (WebInspector.ShortcutsSection.prototype._renderHeader): apply classname to th elements
919         * inspector/front-end/helpScreen.css:
920         (.help-window-main): reduce radius, remove shadow; tune color and opacity
921         (.help-window-caption): fix spacing; add ruler
922         (.help-window-title): fix spacing; remove ruler
923         (.help-content): fix spacing
924         (.help-close-button): fix spacing; adjust background color
925         (.help-column-table): fix spacing
926         (.help-table > tr > th): fix color
927         (.help-key): fix color
928         (.help-combine-keys, .help-key-delimiter): extract common style
929         (.help-combine-keys): remove dupe
930         (.help-section-title): add space between sections
931
932 2012-04-28  Noel Gordon  <noel.gordon@gmail.com>
933
934         Remove PlatformTouchPointQt.cpp PlatformTouchEventQt.cpp from the gyp projects
935         https://bugs.webkit.org/show_bug.cgi?id=85132
936
937         Unreviewed VS2010 gyp project generation fix.
938
939         PlatformTouchPointQt.cpp and PlatformTouchEventQt.cpp were removed in r115312,
940         so remove them from the gyp projects.
941
942         * WebCore.gypi:
943
944 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
945
946         <animateTransform type="scale"> should use '0' as effective from value not '1', if no base value is specified and from is not given
947         https://bugs.webkit.org/show_bug.cgi?id=85133
948
949         It should start from scale=0. I had that fixed before, but it got lost during merging. Restore the fix.
950         See bug 85051, for more context why this is correct.
951
952         Tests: svg/animations/animateTransform-by-scale-1-expected.svg
953                svg/animations/animateTransform-by-scale-1.svg
954
955         * svg/SVGAnimatedTransformList.cpp:
956         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
957
958 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
959
960         SVGAnimateColorElement doesn't support by/to animations properly
961         https://bugs.webkit.org/show_bug.cgi?id=36704
962
963         Reviewed by Antti Koivisto.
964
965         Switch AnimatedColorAnimator to use the standard animateAdditiveNumber() method, taking progress & repeatCount into account.
966         This gives us accumulation/repeatCount support for free.
967
968         We just animate the four color components on their own now and clamp once at the end after addition/accumulation finished.
969         Import <animateColor> tests from Dr. Olaf Hoffmanns SVG Animation test suite, which all pass now.
970
971         While I was at it, remove the includeSMILProperties boolean from computeCSSPropertyValue - we always use the computed style
972         without SMIL effects included, whenever we want to retrieve the "base value", or handle "inherit/currentColor".
973
974         Tests: svg/animations/animateColor-additive-2a-expected.svg
975                svg/animations/animateColor-additive-2a.svg
976                svg/animations/animateColor-additive-2b-expected.svg
977                svg/animations/animateColor-additive-2b.svg
978                svg/animations/animateColor-additive-2c-expected.svg
979                svg/animations/animateColor-additive-2c.svg
980                svg/animations/animateColor-additive-2d-expected.svg
981                svg/animations/animateColor-additive-2d.svg
982
983         * svg/ColorDistance.cpp:
984         (WebCore::ColorDistance::clampColor):
985         (WebCore::ColorDistance::addColors):
986         (WebCore::ColorDistance::addToColor):
987         * svg/ColorDistance.h:
988         (ColorDistance):
989         * svg/SVGAnimateElement.cpp:
990         (WebCore::SVGAnimateElement::resetToBaseValue):
991         * svg/SVGAnimatedColor.cpp:
992         (WebCore::SVGAnimatedColorAnimator::addAnimatedTypes):
993         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
994         * svg/SVGAnimationElement.cpp:
995         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
996         (WebCore::SVGAnimationElement::adjustForInheritance):
997         * svg/SVGAnimationElement.h:
998         (SVGAnimationElement):
999
1000 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
1001
1002         Not reviewed. Fix Qt build -- I was too quick.
1003
1004         * rendering/svg/SVGPathData.cpp: Add back Path.h include.
1005
1006 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
1007
1008         Rename SVGPathParserFactory to SVGPathUtilities and remove the obsolete singleton
1009         https://bugs.webkit.org/show_bug.cgi?id=85129
1010
1011         SVGPathParserFactory implements the singleton pattern, but stores no members.
1012         Remove the singleton and move all functions to free-functions into SVGPathUtilities.h.
1013
1014         Makes the code easier to read - doesn't affect any tests.
1015
1016         * CMakeLists.txt:
1017         * GNUmakefile.list.am:
1018         * Target.pri:
1019         * WebCore.gypi:
1020         * WebCore.vcproj/WebCore.vcproj:
1021         * WebCore.xcodeproj/project.pbxproj:
1022         * rendering/svg/SVGPathData.cpp:
1023         (WebCore::updatePathFromPathElement):
1024         * rendering/svg/SVGRenderTreeAsText.cpp:
1025         (WebCore::operator<<):
1026         * svg/SVGAllInOne.cpp:
1027         * svg/SVGAnimateMotionElement.cpp:
1028         (WebCore::SVGAnimateMotionElement::parseAttribute):
1029         * svg/SVGAnimatedPath.cpp:
1030         (WebCore::SVGAnimatedPathAnimator::constructFromString):
1031         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
1032         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
1033         (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes):
1034         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
1035         * svg/SVGAnimatedType.cpp:
1036         * svg/SVGGlyphElement.cpp:
1037         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
1038         * svg/SVGPathBlender.cpp: Fix typo s/;;/;/
1039         * svg/SVGPathElement.cpp:
1040         (WebCore::SVGPathElement::getTotalLength):
1041         (WebCore::SVGPathElement::getPointAtLength):
1042         (WebCore::SVGPathElement::getPathSegAtLength):
1043         (WebCore::SVGPathElement::parseAttribute):
1044         (WebCore::SVGPathElement::svgAttributeChanged):
1045         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
1046         (WebCore::SVGPathElement::pathSegListChanged):
1047         * svg/SVGPathParserFactory.h: Removed.
1048         * svg/SVGPathSegList.cpp:
1049         (WebCore::SVGPathSegList::valueAsString):
1050         * svg/SVGPathUtilities.cpp: Renamed from Source/WebCore/svg/SVGPathParserFactory.cpp.
1051         (WebCore):
1052         (WebCore::globalSVGPathBuilder):
1053         (WebCore::globalSVGPathSegListBuilder):
1054         (WebCore::globalSVGPathByteStreamBuilder):
1055         (WebCore::globalSVGPathStringBuilder):
1056         (WebCore::globalSVGPathTraversalStateBuilder):
1057         (WebCore::globalSVGPathParser):
1058         (WebCore::globalSVGPathBlender):
1059         (WebCore::buildPathFromString):
1060         (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
1061         (WebCore::buildPathFromByteStream):
1062         (WebCore::buildSVGPathSegListFromByteStream):
1063         (WebCore::buildStringFromByteStream):
1064         (WebCore::buildStringFromSVGPathSegList):
1065         (WebCore::buildSVGPathByteStreamFromString):
1066         (WebCore::buildAnimatedSVGPathByteStream):
1067         (WebCore::addToSVGPathByteStream):
1068         (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
1069         (WebCore::getTotalLengthOfSVGPathByteStream):
1070         (WebCore::getPointAtLengthOfSVGPathByteStream):
1071         * svg/SVGPathUtilities.h: Added.
1072         (WebCore):
1073         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
1074         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
1075
1076 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
1077
1078         Fix repetitions & by animation support for path animations
1079         https://bugs.webkit.org/show_bug.cgi?id=85071
1080
1081         Rubber-stamped by Antti Koivisto.
1082
1083         Cleanup SVGPathBlender, to make it more readable.
1084
1085         * svg/SVGPathBlender.cpp:
1086         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
1087         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
1088         (WebCore::SVGPathBlender::blendArcToSegment):
1089         (WebCore::SVGPathBlender::blendAnimatedPath):
1090
1091 2012-04-28  Yury Semikhatsky  <yurys@chromium.org>
1092
1093         Unreviewed. Qt build fix: added new exported symbols.
1094
1095         * WebCore.exp.in:
1096
1097 2012-04-28  Yury Semikhatsky  <yurys@chromium.org>
1098
1099         Unreviewed. Fix Qt minimal build after r115553.
1100
1101         * inspector/InspectorConsoleAgent.h:
1102
1103 2012-04-27  Nikolas Zimmermann  <nzimmermann@rim.com>
1104
1105         Fix repetitions & by animation support for path animations
1106         https://bugs.webkit.org/show_bug.cgi?id=85071
1107
1108         Reviewed by Antti Koivisto.
1109
1110         Implement additive="sum" / by-animation support for path animations, eg.
1111         <path d="M 10 10 L 10 100 Z">
1112             <animate attributeName="d" begin="0s" dur="4s" by="M 0 0 L 90 0 Z"/>
1113         <path>
1114
1115         animates the d attribute to "M 10 10 L 100 100 0 Z".
1116
1117         Now only <animateColor> and <animateMotion> are left to be fixed, all other types are working as expected now in all additive/accumulate/from-by/by/from-to animations.
1118
1119         Tests: svg/animations/path-animation-expected.svg
1120                svg/animations/repeating-path-animation-expected.svg
1121                svg/animations/repeating-path-animation.svg
1122
1123         * svg/SVGAnimatedPath.cpp:
1124         (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes): Implemented, to support by-animations, instead of falling back to to-animations.
1125         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue): Handle repetitions, accumulation & addition.
1126         * svg/SVGPathBlender.cpp: Allow empty from source everywhere, use default values if no from value is specified, needed for by-animations.
1127         (WebCore::SVGPathBlender::SVGPathBlender):
1128         (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
1129         (WebCore::SVGPathBlender::blendAnimatedFloatPoint):
1130         (WebCore::SVGPathBlender::blendMoveToSegment):
1131         (WebCore::SVGPathBlender::blendLineToSegment):
1132         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
1133         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
1134         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
1135         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
1136         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
1137         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
1138         (WebCore::SVGPathBlender::blendArcToSegment):
1139         (WebCore::SVGPathBlender::addAnimatedPath):
1140         (WebCore::SVGPathBlender::blendAnimatedPath):
1141         * svg/SVGPathBlender.h: Add new addAnimatedPath function.
1142         (SVGPathBlender):
1143         * svg/SVGPathByteStream.h:
1144         (SVGPathByteStream): Make SVGPathByteStreams copyable, needed for SVGAnimatedPathAnimator.
1145         (WebCore::SVGPathByteStream::size): Returns size of the SVGPathByteStream.
1146         * svg/SVGPathParserFactory.cpp:
1147         (WebCore::SVGPathParserFactory::buildAnimatedSVGPathByteStream): Allow empty from streams, needed for by animations. 
1148         (WebCore::SVGPathParserFactory::addToSVGPathByteStream): Add 'byStream' 'repeatCount' times to 'toStream'. Both streams must match in size.
1149         * svg/SVGPathParserFactory.h: Add new addToSVGPathByteStream function.
1150         * svg/SVGPointList.cpp: Remove dead code.
1151         * svg/SVGPointList.h: Ditto.
1152         (SVGPointList):
1153
1154 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
1155
1156         SVGAnimateMotion does not handle accumulation
1157         https://bugs.webkit.org/show_bug.cgi?id=18564
1158
1159         Reviewed by Antti Koivisto.
1160
1161         Implement accumulation for <animateMotion>. Add lots of new
1162         reftests, verifying additive/accumulate behavior is correct.
1163
1164         Tests: svg/animations/animateMotion-additive-1-expected.svg
1165                svg/animations/animateMotion-additive-1.svg
1166                svg/animations/animateMotion-additive-2a-expected.svg
1167                svg/animations/animateMotion-additive-2a.svg
1168                svg/animations/animateMotion-additive-2b-expected.svg
1169                svg/animations/animateMotion-additive-2b.svg
1170                svg/animations/animateMotion-additive-2c-expected.svg
1171                svg/animations/animateMotion-additive-2c.svg
1172                svg/animations/animateMotion-additive-2d-expected.svg
1173                svg/animations/animateMotion-additive-2d.svg
1174                svg/animations/mozilla/animateMotion-by-1-expected.svg
1175                svg/animations/mozilla/animateMotion-by-1.svg
1176                svg/animations/mozilla/animateMotion-from-to-1-expected.svg
1177                svg/animations/mozilla/animateMotion-from-to-1.svg
1178                svg/animations/mozilla/animateMotion-indefinite-to-1-expected.svg
1179                svg/animations/mozilla/animateMotion-indefinite-to-1.svg
1180                svg/animations/mozilla/animateMotion-indefinite-to-2-expected.svg
1181                svg/animations/mozilla/animateMotion-indefinite-to-2.svg
1182                svg/animations/mozilla/animateMotion-mpath-pathLength-1-expected.svg
1183                svg/animations/mozilla/animateMotion-mpath-pathLength-1.svg
1184                svg/animations/mozilla/animateMotion-mpath-targetChange-1-expected.svg
1185                svg/animations/mozilla/animateMotion-mpath-targetChange-1.svg
1186                svg/animations/mozilla/animateMotion-to-overridden-1-expected.svg
1187                svg/animations/mozilla/animateMotion-to-overridden-1.svg
1188
1189         * svg/SVGAnimateMotionElement.cpp:
1190         (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
1191         (WebCore::SVGAnimateMotionElement::buildTransformForProgress):
1192         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
1193         * svg/SVGAnimateMotionElement.h:
1194
1195 2012-04-27  Yury Semikhatsky  <yurys@chromium.org>
1196
1197         ScriptStateProtectedPtr should not keep a strong reference to the context
1198         https://bugs.webkit.org/show_bug.cgi?id=85009
1199
1200         Delete console message arguments when DOMWindow where the messages were created
1201         is reset on its frame.
1202
1203         Reviewed by Pavel Feldman.
1204
1205         Test: http/tests/inspector-enabled/console-clear-arguments-on-frame-navigation.html
1206
1207         * inspector/ConsoleMessage.cpp:
1208         (WebCore::ConsoleMessage::addToFrontend):
1209         (WebCore::ConsoleMessage::windowCleared):
1210         (WebCore::ConsoleMessage::argumentCount):
1211         (WebCore):
1212         * inspector/ConsoleMessage.h:
1213         (ConsoleMessage):
1214         * inspector/InspectorConsoleAgent.cpp:
1215         (WebCore::InspectorConsoleAgent::consoleMessageArgumentCounts):
1216         (WebCore):
1217         * inspector/InspectorConsoleAgent.h:
1218         (InspectorConsoleAgent):
1219         * page/Frame.cpp:
1220         (WebCore::Frame::clearDOMWindow):
1221         (WebCore::Frame::setDOMWindow):
1222         * testing/Internals.cpp:
1223         (WebCore):
1224         (WebCore::Internals::consoleMessageArgumentCounts):
1225         * testing/Internals.h:
1226         (Internals):
1227         * testing/Internals.idl:
1228
1229 2012-04-27  Jochen Eisinger  <jochen@chromium.org>
1230
1231         Ensure that there's always a provisional document loader if the frame loader is in provisional state
1232         https://bugs.webkit.org/show_bug.cgi?id=83894
1233
1234         Reviewed by Nate Chapin.
1235
1236         We're still seeing crashes in the FrameLoader where the FrameLoader's
1237         state is "provisional" but there is no provisional document loader. I
1238         added code to update the FrameLoader's state everytime the provisional
1239         document loader is cleared, and added checks that the FrameLoader's
1240         state can't be set to provisional without a provisional loader.
1241
1242         If the crashes go away, or the newly added checks reveal the culprit,
1243         we should relex the checks to use ASSERT() instead of CRASH().
1244
1245         * loader/FrameLoader.cpp:
1246         (WebCore::FrameLoader::init):
1247         (WebCore::FrameLoader::setupForReplace):
1248         (WebCore::FrameLoader::stopAllLoaders):
1249         (WebCore::FrameLoader::clearProvisionalLoad):
1250         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
1251         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1252
1253 2012-04-27  Geoffrey Garen  <ggaren@apple.com>
1254
1255         Try to fix the Qt build.
1256
1257         * bridge/qt/qt_runtime.cpp:
1258         (JSC::Bindings::QtRuntimeMethod::finishCreation):
1259
1260 2012-04-27  Geoffrey Garen  <ggaren@apple.com>
1261
1262         Made WeakSet::allocate() static and removed its JSGlobalData argument
1263         https://bugs.webkit.org/show_bug.cgi?id=85128
1264
1265         Reviewed by Anders Carlsson.
1266
1267         Mechanically removed JSGlobalData arguments from PassWeak<T> and Weak<T> allocation.
1268
1269         * bindings/js/JSDOMBinding.cpp:
1270         (WebCore::jsStringSlowCase):
1271         * bindings/js/JSEventListener.h:
1272         (WebCore::JSEventListener::setWrapper):
1273         * bindings/js/JSNodeFilterCondition.cpp:
1274         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
1275         * bindings/js/ScriptWrappable.h:
1276         (WebCore::ScriptWrappable::setWrapper):
1277         * bridge/jsc/BridgeJSC.cpp:
1278         (JSC::Bindings::Instance::createRuntimeObject):
1279         * bridge/qt/qt_runtime.cpp:
1280         (JSC::Bindings::QtRuntimeMethod::finishCreation):
1281         * bridge/runtime_root.cpp:
1282         (JSC::Bindings::RootObject::addRuntimeObject):
1283
1284 2012-04-27  Mark Rowe  <mrowe@apple.com>
1285
1286         <rdar://problem/11313710> Leaks under WebCore::CSSImageSetValue::cachedImageSet when running tests
1287
1288         There was a reference cycle between CSSImageSetValue and StyleCachedImageSet via
1289         CSSImageSetValue::m_imageSet / StyleCachedImageSet::m_imageSetValue. Break the cycle
1290         by having StyleCachedImageSet hold a weak reference to the CSSImageSetValue rather
1291         than a strong reference.
1292
1293         Reviewed by Geoff Garen.
1294
1295         * rendering/style/StyleCachedImageSet.cpp:
1296         (WebCore::StyleCachedImageSet::StyleCachedImageSet):
1297         * rendering/style/StyleCachedImageSet.h:
1298         (StyleCachedImageSet):
1299
1300 2012-04-27  Mark Rowe  <mrowe@apple.com>
1301
1302         <rdar://problem/10346980> REGRESSION: Cannot enter text in Dashboard widget fields that have placeholder attribute
1303
1304         Remove a dashboard backwards compatibility quirk that was in place to support an old version
1305         of the Stocks widget. It prevented the pointer-events property from being applied in Dashboard
1306         widgets, which caused -webkit-input-placeholder elements to eat mouse clicks rather than giving
1307         focus to the containing input elements. The offending widget has long since been fixed.
1308
1309         Reviewed by Dan Bernstein.
1310
1311         * css/StyleResolver.cpp:
1312         (WebCore::StyleResolver::collectMatchingRulesForList):
1313
1314 2012-04-27  Dean Jackson  <dino@apple.com>
1315
1316         Support reverse and alternate-reverse in CA animations
1317         https://bugs.webkit.org/show_bug.cgi?id=78041
1318
1319         Reviewed by Beth Dakin.
1320
1321         CoreAnimation does not natively support reverse and alternate-reverse
1322         animation directions so we need to flip the animation values (keyframe
1323         keys and timing functions) that we send to GraphicsLayerCA. Unfortunately
1324         this code adds a lot of conditionals because it isn't as simple as
1325         reversing the order of keys. You also now have a different alignment of
1326         timing functions to the reversed list.
1327
1328         New tests to cover the two new directions, making sure the timing
1329         functions are correctly inverted, and exercising fill modes.
1330
1331         Tests: animations/animation-direction-reverse-fill-mode-hardware.html
1332                animations/animation-direction-reverse-fill-mode.html
1333                animations/animation-direction-reverse-hardware-opacity.html
1334                animations/animation-direction-reverse-hardware.html
1335                animations/animation-direction-reverse-non-hardware.html
1336                animations/animation-direction-reverse-timing-functions-hardware.html
1337                animations/animation-direction-reverse-timing-functions.html
1338
1339         * platform/graphics/ca/GraphicsLayerCA.cpp:
1340           Handle the previously unsupported animation directions, reversing
1341           the list of values and keytimes that would be used to create
1342           the CA Animation.
1343         (WebCore::GraphicsLayerCA::addAnimation):
1344           Do not create an animation if on Windows and using a reverse
1345           direction.
1346         (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
1347         (WebCore::GraphicsLayerCA::setupAnimation):
1348         (WebCore::GraphicsLayerCA::setAnimationEndpoints):
1349         (WebCore::GraphicsLayerCA::setAnimationKeyframes):
1350         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
1351         (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
1352         (WebCore::GraphicsLayerCA::setFilterAnimationEndpoints):
1353         (WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
1354         * platform/graphics/ca/PlatformCAAnimation.h:
1355         (PlatformCAAnimation): Pass through a flag that tells the CA Animation
1356         that it should invert the timing functions.
1357         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1358         (toCAMediaTimingFunction): Add a parameter that will invert the timing
1359         function coefficients if necessary.
1360         (PlatformCAAnimation::setTimingFunction):
1361         (PlatformCAAnimation::setTimingFunctions):
1362         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
1363         (toCACFTimingFunction):
1364           New unused parameter.
1365
1366 2012-04-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1367
1368         Unreviewed, rolling out r115407.
1369         http://trac.webkit.org/changeset/115407
1370         https://bugs.webkit.org/show_bug.cgi?id=85126
1371
1372         Caused heap use after free (Requested by keishi_ on #webkit).
1373
1374         * html/HTMLFormControlElement.cpp:
1375         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1376         (WebCore::HTMLFormControlElement::updateFieldSetAndLegendAncestor):
1377         (WebCore::HTMLFormControlElement::insertedInto):
1378         (WebCore::HTMLFormControlElement::removedFrom):
1379         (WebCore::HTMLFormControlElement::disabled):
1380         (WebCore::HTMLFormControlElement::recalcWillValidate):
1381         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
1382         * html/HTMLFormControlElement.h:
1383         (HTMLFormControlElement):
1384
1385 2012-04-27  Kentaro Hara  <haraken@chromium.org>
1386
1387         [JSC] Implement a helper method createNotEnoughArgumentsError()
1388         https://bugs.webkit.org/show_bug.cgi?id=85102
1389
1390         Reviewed by Geoffrey Garen.
1391
1392         In bug 84787, kbr@ requested to avoid hard-coding
1393         createTypeError(exec, "Not enough arguments") here and there.
1394         This patch implements createNotEnoughArgumentsError(exec)
1395         and uses it in JSC bindings.
1396
1397         c.f. a corresponding bug for V8 bindings is bug 85097.
1398
1399         Test: bindings/scripts/test/TestObj.idl
1400
1401         * bindings/scripts/CodeGeneratorJS.pm: Modified as described above.
1402         (GenerateArgumentsCountCheck):
1403
1404         * bindings/js/JSDataViewCustom.cpp: Ditto.
1405         (WebCore::getDataViewMember):
1406         (WebCore::setDataViewMember):
1407         * bindings/js/JSDeprecatedPeerConnectionCustom.cpp:
1408         (WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection):
1409         * bindings/js/JSDirectoryEntryCustom.cpp:
1410         (WebCore::JSDirectoryEntry::getFile):
1411         (WebCore::JSDirectoryEntry::getDirectory):
1412         * bindings/js/JSSharedWorkerCustom.cpp:
1413         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
1414         * bindings/js/JSWebKitMutationObserverCustom.cpp:
1415         (WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
1416         (WebCore::JSWebKitMutationObserver::observe):
1417         * bindings/js/JSWorkerCustom.cpp:
1418         (WebCore::JSWorkerConstructor::constructJSWorker):
1419
1420         * bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests.
1421         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
1422         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1423         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
1424         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
1425         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1426         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
1427         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1428         (WebCore::jsTestEventTargetPrototypeFunctionItem):
1429         (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
1430         (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
1431         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
1432         * bindings/scripts/test/JS/JSTestInterface.cpp:
1433         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
1434         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
1435         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1436         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
1437         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1438         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
1439         * bindings/scripts/test/JS/JSTestObj.cpp:
1440         (WebCore::JSTestObjConstructor::constructJSTestObj):
1441         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1442         (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
1443         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1444         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
1445         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
1446         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
1447         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
1448         (WebCore::jsTestObjPrototypeFunctionIdbKey):
1449         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
1450         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
1451         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
1452         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
1453         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
1454         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
1455         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
1456         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
1457         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1458         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
1459         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1460         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
1461         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
1462         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
1463         (WebCore::jsTestObjConstructorFunctionClassMethod2):
1464         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
1465         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
1466         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongArray):
1467         (WebCore::jsTestObjPrototypeFunctionConvert1):
1468         (WebCore::jsTestObjPrototypeFunctionConvert2):
1469         (WebCore::jsTestObjPrototypeFunctionConvert3):
1470         (WebCore::jsTestObjPrototypeFunctionConvert4):
1471         (WebCore::jsTestObjPrototypeFunctionConvert5):
1472         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
1473         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1474         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
1475         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
1476
1477 2012-04-27  Mark Pilgrim  <pilgrim@chromium.org>
1478
1479         [Chromium] Call highMemoryUsageMB directly
1480         https://bugs.webkit.org/show_bug.cgi?id=84841
1481
1482         Reviewed by Kentaro Hara.
1483
1484         Part of a refactoring series. See tracking bug 82948.
1485
1486         * bindings/v8/V8GCController.cpp:
1487         (WebCore::V8GCController::checkMemoryUsage):
1488         * platform/MemoryUsageSupport.cpp:
1489         (WebCore::MemoryUsageSupport::highMemoryUsageMB):
1490         (WebCore):
1491         * platform/MemoryUsageSupport.h:
1492         (MemoryUsageSupport):
1493         * platform/chromium/MemoryUsageSupportChromium.cpp:
1494         (WebCore::MemoryUsageSupport::highMemoryUsageMB):
1495         (WebCore):
1496         * platform/chromium/PlatformSupport.h:
1497         (PlatformSupport):
1498
1499 2012-04-27  Geoffrey Garen  <ggaren@apple.com>
1500
1501         Only allow non-null pointers in the WeakSet
1502         https://bugs.webkit.org/show_bug.cgi?id=85119
1503
1504         Reviewed by Darin Adler.
1505
1506         * bridge/jsc/BridgeJSC.cpp:
1507         (JSC::Bindings::Instance::Instance): Don't allocate a WeakImpl just to
1508         store null. This was needless, and is now a compile error. Instead,
1509         rely on the default constructor, which will produce a cheap null.
1510
1511 2012-04-27  Kentaro Hara  <haraken@chromium.org>
1512
1513         "Not enough arguments" error should be TypeError
1514         https://bugs.webkit.org/show_bug.cgi?id=84628
1515
1516         Reviewed by Darin Adler.
1517
1518         Currently, some custom bindings implement "Not enough arguments"
1519         error as SyntaxError. The Web IDL spec requires that it should be
1520         TypeError: http://www.w3.org/TR/WebIDL/#dfn-overload-resolution-algorithm
1521         Thus, this patch changes SyntaxError to TypeError.
1522
1523         Tests: http/tests/websocket/tests/hixie76/url-parsing.html:
1524                http/tests/websocket/tests/hybi/url-parsing.html:
1525                http/tests/xmlhttprequest/exceptions.html:
1526                svg/dom/SVGLength.html:
1527                webaudio/audionode.html:
1528
1529         * bindings/js/JSAudioContextCustom.cpp:
1530         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
1531         * bindings/js/JSSVGLengthCustom.cpp:
1532         (WebCore::JSSVGLength::convertToSpecifiedUnits):
1533         * bindings/js/JSWebSocketCustom.cpp:
1534         (WebCore::JSWebSocketConstructor::constructJSWebSocket):
1535         (WebCore::JSWebSocket::send):
1536         * bindings/js/JSXMLHttpRequestCustom.cpp:
1537         (WebCore::JSXMLHttpRequest::open):
1538         * bindings/v8/custom/V8AudioContextCustom.cpp:
1539         (WebCore::V8AudioContext::constructorCallback):
1540         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1541         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
1542         * bindings/v8/custom/V8WebSocketCustom.cpp:
1543         (WebCore::V8WebSocket::constructorCallback):
1544         (WebCore::V8WebSocket::sendCallback):
1545         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1546         (WebCore::V8XMLHttpRequest::openCallback):
1547
1548 2012-04-27  Kenneth Russell  <kbr@google.com>
1549
1550         Remove SHADER_COMPILER constant
1551         https://bugs.webkit.org/show_bug.cgi?id=85115
1552
1553         Reviewed by Darin Adler.
1554
1555         Removed constant which was previously removed from spec. Updated
1556         layout test and expected results.
1557
1558         * html/canvas/WebGLRenderingContext.idl:
1559
1560 2012-04-27  Arvid Nilsson  <anilsson@rim.com>
1561
1562         [BlackBerry] Fixed background is scrolling in http://www.nieuwecode.nl
1563         https://bugs.webkit.org/show_bug.cgi?id=85109
1564
1565         Reviewed by Antonio Gomes.
1566
1567         Since the BlackBerry port uses very similar fixed position acceleration
1568         as the Qt WebKit2 port, the same fix that worked for them in bug 83980
1569         works for us.
1570
1571         Fixed by opting in to the FIXED_POSITION_CREATES_STACKING_CONTEXT
1572         mechanism.
1573
1574         Covered by existing manual test fixed-position-no-z-index.html.
1575
1576         * css/StyleResolver.cpp:
1577
1578 2012-04-27  Nat Duca  <nduca@chromium.org>
1579
1580         Expose high-resolution on requestAnimationFrame callback
1581         https://bugs.webkit.org/show_bug.cgi?id=66683
1582
1583         This changes requestAnimationFrame's animationStartTime argument
1584         to be a high resolution DOM timestamp, per disucssion here:
1585         http://lists.w3.org/Archives/Public/public-web-perf/2012Apr/0004.html
1586
1587         Reviewed by James Robinson.
1588
1589         Covered by existing requestAnimationFrame tests.
1590
1591         * dom/Document.cpp:
1592         (WebCore::Document::serviceScriptedAnimations):
1593         * dom/Document.h:
1594         (Document):
1595         * dom/ScriptedAnimationController.cpp:
1596         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
1597         (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
1598         (WebCore):
1599         (WebCore::ScriptedAnimationController::windowScreenDidChange):
1600         (WebCore::ScriptedAnimationController::scheduleAnimation):
1601         (WebCore::ScriptedAnimationController::animationTimerFired):
1602         (WebCore::ScriptedAnimationController::displayRefreshFired):
1603         * dom/ScriptedAnimationController.h:
1604         (ScriptedAnimationController):
1605         * page/FrameView.cpp:
1606         (WebCore::FrameView::serviceScriptedAnimations):
1607         * page/FrameView.h:
1608         (FrameView):
1609         * platform/graphics/DisplayRefreshMonitor.cpp:
1610         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
1611         (WebCore::DisplayRefreshMonitor::notifyClients):
1612         * platform/graphics/DisplayRefreshMonitor.h:
1613         (DisplayRefreshMonitor):
1614         * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
1615         (WebCore::DisplayRefreshMonitor::displayLinkFired):
1616         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
1617         (WebCore):
1618         (WebCore::DisplayRefreshMonitor::requestRefreshCallback):
1619         (WebCore::DisplayRefreshMonitor::displayLinkFired):
1620
1621 2012-04-27  Kentaro Hara  <haraken@chromium.org>
1622
1623         [V8] Implement a helper method V8Proxy::throwNotEnoughArgumentsError()
1624         https://bugs.webkit.org/show_bug.cgi?id=85097
1625
1626         Reviewed by Kenneth Russell.
1627
1628         In bug 84787, kbr requested to avoid hard-coding
1629         throwError("Not enough arguments", V8Proxy::TypeError) here and there.
1630         This patch implements V8Proxy::throwNotEnoughArgumentsError()
1631         and uses it in V8 bindings.
1632
1633         No tests. No change in behavior.
1634
1635         * bindings/scripts/CodeGeneratorV8.pm:
1636         (GenerateArgumentsCountCheck):
1637         (GenerateEventConstructorCallback):
1638         * bindings/v8/V8Proxy.cpp:
1639         (WebCore::V8Proxy::throwNotEnoughArgmentsError):
1640         (WebCore):
1641         * bindings/v8/V8Proxy.h:
1642         (V8Proxy):
1643         * bindings/v8/custom/V8DataViewCustom.cpp:
1644         (WebCore::V8DataView::getInt8Callback):
1645         (WebCore::V8DataView::getUint8Callback):
1646         (WebCore::V8DataView::setInt8Callback):
1647         (WebCore::V8DataView::setUint8Callback):
1648         * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
1649         (WebCore::V8DirectoryEntry::getDirectoryCallback):
1650         (WebCore::V8DirectoryEntry::getFileCallback):
1651         * bindings/v8/custom/V8IntentConstructor.cpp:
1652         (WebCore::V8Intent::constructorCallback):
1653         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
1654         (WebCore::V8WebKitMutationObserver::constructorCallback):
1655         (WebCore::V8WebKitMutationObserver::observeCallback):
1656
1657         Test: bindings/scripts/test/TestObj.idl
1658
1659         * bindings/scripts/CodeGeneratorV8.pm: Modified as described above.
1660         (GenerateArgumentsCountCheck):
1661         (GenerateEventConstructorCallback):
1662
1663         * bindings/v8/V8Proxy.cpp: Ditto.
1664         (WebCore::V8Proxy::throwNotEnoughArgumentsError):
1665         (WebCore):
1666         * bindings/v8/V8Proxy.h:
1667         (V8Proxy):
1668         * bindings/v8/custom/V8DataViewCustom.cpp:
1669         (WebCore::V8DataView::getInt8Callback):
1670         (WebCore::V8DataView::getUint8Callback):
1671         (WebCore::V8DataView::setInt8Callback):
1672         (WebCore::V8DataView::setUint8Callback):
1673         * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
1674         (WebCore::V8DirectoryEntry::getDirectoryCallback):
1675         (WebCore::V8DirectoryEntry::getFileCallback):
1676         * bindings/v8/custom/V8IntentConstructor.cpp:
1677         (WebCore::V8Intent::constructorCallback):
1678         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
1679         (WebCore::V8WebKitMutationObserver::constructorCallback):
1680         (WebCore::V8WebKitMutationObserver::observeCallback):
1681
1682         * bindings/scripts/test/V8/V8Float64Array.cpp: Updated run-bindings-tests.
1683         (WebCore::Float64ArrayV8Internal::fooCallback):
1684         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1685         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
1686         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
1687         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1688         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
1689         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1690         (WebCore::V8TestEventConstructor::constructorCallback):
1691         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1692         (WebCore::TestEventTargetV8Internal::itemCallback):
1693         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
1694         * bindings/scripts/test/V8/V8TestInterface.cpp:
1695         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
1696         (WebCore::V8TestInterface::constructorCallback):
1697         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1698         (WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
1699         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1700         (WebCore::V8TestNamedConstructorConstructorCallback):
1701         * bindings/scripts/test/V8/V8TestObj.cpp:
1702         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
1703         (WebCore::TestObjV8Internal::intMethodWithArgsCallback):
1704         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
1705         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
1706         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
1707         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
1708         (WebCore::TestObjV8Internal::serializedValueCallback):
1709         (WebCore::TestObjV8Internal::idbKeyCallback):
1710         (WebCore::TestObjV8Internal::optionsObjectCallback):
1711         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
1712         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
1713         (WebCore::TestObjV8Internal::methodWithCallbackArgCallback):
1714         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
1715         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
1716         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
1717         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
1718         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
1719         (WebCore::TestObjV8Internal::overloadedMethod5Callback):
1720         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
1721         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
1722         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
1723         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
1724         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
1725         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
1726         (WebCore::TestObjV8Internal::convert1Callback):
1727         (WebCore::TestObjV8Internal::convert2Callback):
1728         (WebCore::TestObjV8Internal::convert3Callback):
1729         (WebCore::TestObjV8Internal::convert4Callback):
1730         (WebCore::TestObjV8Internal::convert5Callback):
1731         (WebCore::TestObjV8Internal::strictFunctionCallback):
1732         (WebCore::V8TestObj::constructorCallback):
1733         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1734         (WebCore::TestSerializedScriptValueInterfaceV8Internal::acceptTransferListCallback):
1735         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
1736
1737 2012-04-27  Mark Pilgrim  <pilgrim@chromium.org>
1738
1739         [Chromium] Call lowMemoryUsageMB directly
1740         https://bugs.webkit.org/show_bug.cgi?id=84840
1741
1742         Reviewed by Kentaro Hara.
1743
1744         Part of a refactoring series. See tracking bug 82948.
1745
1746         * bindings/v8/V8GCController.cpp:
1747         (WebCore::V8GCController::checkMemoryUsage):
1748         * platform/MemoryUsageSupport.cpp:
1749         (WebCore::MemoryUsageSupport::lowMemoryUsageMB):
1750         (WebCore):
1751         * platform/MemoryUsageSupport.h:
1752         (MemoryUsageSupport):
1753         * platform/chromium/MemoryUsageSupportChromium.cpp:
1754         (WebCore::MemoryUsageSupport::lowMemoryUsageMB):
1755         (WebCore):
1756         * platform/chromium/PlatformSupport.h:
1757         (PlatformSupport):
1758
1759 2012-04-27  Yi Shen  <yi.4.shen@nokia.com>
1760
1761         REGRESSION(113723): Pressing enter in this list example deletes the whole list
1762         https://bugs.webkit.org/show_bug.cgi?id=85016
1763
1764         Reviewed by Enrica Casucci.
1765
1766         The bug was caused by CompositeEditCommand::breakOutOfEmptyListItem, which calls isListItem
1767         on the empty list's siblings to decide which part of the list should get removed. However,
1768         the check fails when the empty list's sibling is a text node, or a list element (e.g. ul, ol).
1769         Fixed it by skipping empty list's non-element sibling and calling isListElement to do further
1770         check.
1771
1772         Test: added new test cases in the existing test (break-out-of-empty-list-item.html)
1773
1774         * editing/CompositeEditCommand.cpp:
1775         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
1776
1777 2012-04-27  Ian Vollick  <vollick@chromium.org>
1778
1779         [chromium] Add pause and resume support for accelerated css animations.
1780         https://bugs.webkit.org/show_bug.cgi?id=84601
1781
1782         Reviewed by James Robinson.
1783
1784         Tested in:
1785         CCLayerAnimationControllerTest.syncPauseResume
1786         CCActiveAnimationTest.TrimTimeTimeOffset
1787         CCActiveAnimationTest.TrimTimeSuspendResume
1788         CCActiveAnimationTest.IsFinishedNeedsSynchronizedStartTime
1789         CCActiveAnimationTest.RunStateChangesIgnoredWhileSuspended
1790
1791         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1792         (WebCore::GraphicsLayerChromium::suspendAnimations):
1793         (WebCore::GraphicsLayerChromium::resumeAnimations):
1794         * platform/graphics/chromium/GraphicsLayerChromium.h:
1795         (GraphicsLayerChromium):
1796         * platform/graphics/chromium/LayerChromium.cpp:
1797         (WebCore::LayerChromium::suspendAnimations):
1798         (WebCore::LayerChromium::resumeAnimations):
1799         * platform/graphics/chromium/LayerChromium.h:
1800         (LayerChromium):
1801         * platform/graphics/chromium/cc/CCActiveAnimation.cpp:
1802         (WebCore::CCActiveAnimation::CCActiveAnimation):
1803         (WebCore::CCActiveAnimation::setRunState):
1804         (WebCore::CCActiveAnimation::suspend):
1805         (WebCore::CCActiveAnimation::resume):
1806         (WebCore::CCActiveAnimation::isFinishedAt):
1807         (WebCore::CCActiveAnimation::trimTimeToCurrentIteration):
1808         (WebCore::CCActiveAnimation::cloneForImplThread):
1809         (WebCore::CCActiveAnimation::pushPropertiesTo):
1810         * platform/graphics/chromium/cc/CCActiveAnimation.h:
1811         (CCActiveAnimation):
1812         (WebCore::CCActiveAnimation::setStartTime):
1813         (WebCore::CCActiveAnimation::timeOffset):
1814         (WebCore::CCActiveAnimation::setTimeOffset):
1815         (WebCore::CCActiveAnimation::isFinished):
1816         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
1817         (WebCore::CCLayerAnimationController::addAnimation):
1818         (WebCore::CCLayerAnimationController::pauseAnimation):
1819         (WebCore::CCLayerAnimationController::suspendAnimations):
1820         (WebCore::CCLayerAnimationController::resumeAnimations):
1821         (WebCore::CCLayerAnimationController::pushAnimationUpdatesTo):
1822         (WebCore::CCLayerAnimationController::getActiveAnimation):
1823         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
1824         (WebCore::CCLayerAnimationController::removeAnimationsCompletedOnMainThread):
1825         (WebCore::CCLayerAnimationController::pushPropertiesToImplThread):
1826         (WebCore):
1827         (WebCore::CCLayerAnimationController::tickAnimations):
1828         * platform/graphics/chromium/cc/CCLayerAnimationController.h:
1829         (CCLayerAnimationController):
1830
1831 2012-04-27  Tim Horton  <timothy_horton@apple.com>
1832
1833         SMIL animation causes leak of the related Document (and many elements)
1834         https://bugs.webkit.org/show_bug.cgi?id=83856
1835         <rdar://problem/11216047>
1836
1837         Reviewed by Dean Jackson.
1838
1839         The SVGAnimatedProperty cache was previously holding a reference to the properties it contained;
1840         said references were cleared in the SVGAnimatedProperty destructor (which was never called because
1841         there was always one remaining reference from the cache).
1842
1843         The SVGAnimatedProperty cache now holds raw pointers instead of RefPtrs; the SVGAnimateElement now
1844         owns its own SVGAnimatedProperties, both for itself and for any <use/> instances of itself. They're
1845         cleared and destroyed within SVGAnimateElement::targetElementWillChange, at which time they're removed
1846         from the cache.
1847
1848         SVGPropertyTearOffs now keep a reference to their SVGElement (m_contextElement) instead of their SVGAnimatedProperty;
1849         this way, there is no reference cycle, but the animated property (owned by the element) and the element itself are
1850         kept alive until the TearOff is garbage collected.
1851
1852         Tests: svg/animations/smil-leak-dynamically-added-element-instances.svg
1853                svg/animations/smil-leak-elements.svg
1854                svg/animations/smil-leak-element-instances-noBaseValRef.svg
1855                svg/animations/smil-leak-element-instances.svg
1856                svg/animations/svglength-element-removed-crash.svg
1857
1858         * svg/SVGAnimateElement.cpp:
1859         (WebCore::SVGAnimateElement::calculateAnimatedValue):
1860         (WebCore::propertyTypesAreConsistent):
1861         (WebCore::SVGAnimateElement::resetToBaseValue):
1862         (WebCore::SVGAnimateElement::applyResultsToTarget):
1863         (WebCore::SVGAnimateElement::targetElementWillChange):
1864         * svg/SVGAnimateElement.h:
1865         (SVGAnimateElement):
1866         * svg/SVGAnimatedAngle.cpp:
1867         (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation):
1868         (WebCore::SVGAnimatedAngleAnimator::stopAnimValAnimation):
1869         (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
1870         (WebCore::SVGAnimatedAngleAnimator::animValWillChange):
1871         (WebCore::SVGAnimatedAngleAnimator::animValDidChange):
1872         * svg/SVGAnimatedAngle.h:
1873         (SVGAnimatedAngleAnimator):
1874         * svg/SVGAnimatedBoolean.cpp:
1875         (WebCore::SVGAnimatedBooleanAnimator::startAnimValAnimation):
1876         (WebCore::SVGAnimatedBooleanAnimator::stopAnimValAnimation):
1877         (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
1878         (WebCore::SVGAnimatedBooleanAnimator::animValWillChange):
1879         (WebCore::SVGAnimatedBooleanAnimator::animValDidChange):
1880         * svg/SVGAnimatedBoolean.h:
1881         (SVGAnimatedBooleanAnimator):
1882         * svg/SVGAnimatedColor.h:
1883         (WebCore::SVGAnimatedColorAnimator::startAnimValAnimation):
1884         (WebCore::SVGAnimatedColorAnimator::stopAnimValAnimation):
1885         (WebCore::SVGAnimatedColorAnimator::resetAnimValToBaseVal):
1886         (WebCore::SVGAnimatedColorAnimator::animValWillChange):
1887         (WebCore::SVGAnimatedColorAnimator::animValDidChange):
1888         * svg/SVGAnimatedEnumeration.cpp:
1889         (WebCore::SVGAnimatedEnumerationAnimator::startAnimValAnimation):
1890         (WebCore::SVGAnimatedEnumerationAnimator::stopAnimValAnimation):
1891         (WebCore::SVGAnimatedEnumerationAnimator::resetAnimValToBaseVal):
1892         (WebCore::SVGAnimatedEnumerationAnimator::animValWillChange):
1893         (WebCore::SVGAnimatedEnumerationAnimator::animValDidChange):
1894         * svg/SVGAnimatedEnumeration.h:
1895         (SVGAnimatedEnumerationAnimator):
1896         * svg/SVGAnimatedInteger.cpp:
1897         (WebCore::SVGAnimatedIntegerAnimator::startAnimValAnimation):
1898         (WebCore::SVGAnimatedIntegerAnimator::stopAnimValAnimation):
1899         (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
1900         (WebCore::SVGAnimatedIntegerAnimator::animValWillChange):
1901         (WebCore::SVGAnimatedIntegerAnimator::animValDidChange):
1902         * svg/SVGAnimatedInteger.h:
1903         (SVGAnimatedIntegerAnimator):
1904         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
1905         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation):
1906         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::stopAnimValAnimation):
1907         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
1908         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValWillChange):
1909         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValDidChange):
1910         * svg/SVGAnimatedIntegerOptionalInteger.h:
1911         (SVGAnimatedIntegerOptionalIntegerAnimator):
1912         * svg/SVGAnimatedLength.cpp:
1913         (WebCore::SVGAnimatedLengthAnimator::startAnimValAnimation):
1914         (WebCore::SVGAnimatedLengthAnimator::stopAnimValAnimation):
1915         (WebCore::SVGAnimatedLengthAnimator::resetAnimValToBaseVal):
1916         (WebCore::SVGAnimatedLengthAnimator::animValWillChange):
1917         (WebCore::SVGAnimatedLengthAnimator::animValDidChange):
1918         * svg/SVGAnimatedLength.h:
1919         (SVGAnimatedLengthAnimator):
1920         * svg/SVGAnimatedLengthList.cpp:
1921         (WebCore::SVGAnimatedLengthListAnimator::startAnimValAnimation):
1922         (WebCore::SVGAnimatedLengthListAnimator::stopAnimValAnimation):
1923         (WebCore::SVGAnimatedLengthListAnimator::resetAnimValToBaseVal):
1924         (WebCore::SVGAnimatedLengthListAnimator::animValWillChange):
1925         (WebCore::SVGAnimatedLengthListAnimator::animValDidChange):
1926         * svg/SVGAnimatedLengthList.h:
1927         (SVGAnimatedLengthListAnimator):
1928         * svg/SVGAnimatedNumber.cpp:
1929         (WebCore::SVGAnimatedNumberAnimator::startAnimValAnimation):
1930         (WebCore::SVGAnimatedNumberAnimator::stopAnimValAnimation):
1931         (WebCore::SVGAnimatedNumberAnimator::resetAnimValToBaseVal):
1932         (WebCore::SVGAnimatedNumberAnimator::animValWillChange):
1933         (WebCore::SVGAnimatedNumberAnimator::animValDidChange):
1934         * svg/SVGAnimatedNumber.h:
1935         (SVGAnimatedNumberAnimator):
1936         * svg/SVGAnimatedNumberList.cpp:
1937         (WebCore::SVGAnimatedNumberListAnimator::startAnimValAnimation):
1938         (WebCore::SVGAnimatedNumberListAnimator::stopAnimValAnimation):
1939         (WebCore::SVGAnimatedNumberListAnimator::resetAnimValToBaseVal):
1940         (WebCore::SVGAnimatedNumberListAnimator::animValWillChange):
1941         (WebCore::SVGAnimatedNumberListAnimator::animValDidChange):
1942         * svg/SVGAnimatedNumberList.h:
1943         (SVGAnimatedNumberListAnimator):
1944         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1945         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::startAnimValAnimation):
1946         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::stopAnimValAnimation):
1947         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::resetAnimValToBaseVal):
1948         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::animValWillChange):
1949         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::animValDidChange):
1950         * svg/SVGAnimatedNumberOptionalNumber.h:
1951         (SVGAnimatedNumberOptionalNumberAnimator):
1952         * svg/SVGAnimatedPath.cpp:
1953         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
1954         (WebCore::SVGAnimatedPathAnimator::stopAnimValAnimation):
1955         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
1956         (WebCore::SVGAnimatedPathAnimator::animValWillChange):
1957         (WebCore::SVGAnimatedPathAnimator::animValDidChange):
1958         * svg/SVGAnimatedPath.h:
1959         (SVGAnimatedPathAnimator):
1960         * svg/SVGAnimatedPointList.cpp:
1961         (WebCore::SVGAnimatedPointListAnimator::startAnimValAnimation):
1962         (WebCore::SVGAnimatedPointListAnimator::stopAnimValAnimation):
1963         (WebCore::SVGAnimatedPointListAnimator::resetAnimValToBaseVal):
1964         (WebCore::SVGAnimatedPointListAnimator::animValWillChange):
1965         (WebCore::SVGAnimatedPointListAnimator::animValDidChange):
1966         * svg/SVGAnimatedPointList.h:
1967         (SVGAnimatedPointListAnimator):
1968         * svg/SVGAnimatedPreserveAspectRatio.cpp:
1969         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::startAnimValAnimation):
1970         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::stopAnimValAnimation):
1971         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal):
1972         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::animValWillChange):
1973         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::animValDidChange):
1974         * svg/SVGAnimatedPreserveAspectRatio.h:
1975         (SVGAnimatedPreserveAspectRatioAnimator):
1976         * svg/SVGAnimatedRect.cpp:
1977         (WebCore::SVGAnimatedRectAnimator::startAnimValAnimation):
1978         (WebCore::SVGAnimatedRectAnimator::stopAnimValAnimation):
1979         (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal):
1980         (WebCore::SVGAnimatedRectAnimator::animValWillChange):
1981         (WebCore::SVGAnimatedRectAnimator::animValDidChange):
1982         * svg/SVGAnimatedRect.h:
1983         (SVGAnimatedRectAnimator):
1984         * svg/SVGAnimatedString.cpp:
1985         (WebCore::SVGAnimatedStringAnimator::startAnimValAnimation):
1986         (WebCore::SVGAnimatedStringAnimator::stopAnimValAnimation):
1987         (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
1988         (WebCore::SVGAnimatedStringAnimator::animValWillChange):
1989         (WebCore::SVGAnimatedStringAnimator::animValDidChange):
1990         * svg/SVGAnimatedString.h:
1991         (SVGAnimatedStringAnimator):
1992         * svg/SVGAnimatedTransformList.cpp:
1993         (WebCore::SVGAnimatedTransformListAnimator::startAnimValAnimation):
1994         (WebCore::SVGAnimatedTransformListAnimator::stopAnimValAnimation):
1995         (WebCore::SVGAnimatedTransformListAnimator::resetAnimValToBaseVal):
1996         (WebCore::SVGAnimatedTransformListAnimator::animValWillChange):
1997         (WebCore::SVGAnimatedTransformListAnimator::animValDidChange):
1998         * svg/SVGAnimatedTransformList.h:
1999         (SVGAnimatedTransformListAnimator):
2000         * svg/SVGAnimatedTypeAnimator.h:
2001         (SVGAnimatedTypeAnimator):
2002         (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
2003         (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesFromInstancesForAttributeName):
2004         (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue):
2005         (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue):
2006         (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimationForType):
2007         (WebCore::SVGAnimatedTypeAnimator::animValDidChangeForType):
2008         (WebCore::SVGAnimatedTypeAnimator::animValWillChangeForType):
2009         (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues):
2010         (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues):
2011         (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimationForTypes):
2012         (WebCore::SVGAnimatedTypeAnimator::animValDidChangeForTypes):
2013         (WebCore::SVGAnimatedTypeAnimator::animValWillChangeForTypes):
2014         (WebCore::SVGAnimatedTypeAnimator::castAnimatedPropertyToActualType):
2015         (WebCore::SVGAnimatedTypeAnimator::executeAction):
2016         * svg/properties/SVGAnimatedProperty.h:
2017         (SVGAnimatedProperty):
2018         * svg/properties/SVGPropertyTearOff.h:
2019         (WebCore::SVGPropertyTearOff::animatedProperty):
2020         (SVGPropertyTearOff):
2021
2022 2012-04-27  Adam Klein  <adamk@chromium.org>
2023
2024         Remove misspelled, unused, unimplemented method from V8Proxy
2025         https://bugs.webkit.org/show_bug.cgi?id=85091
2026
2027         Reviewed by Dimitri Glazkov.
2028
2029         * bindings/v8/V8Proxy.h:
2030         (V8Proxy):
2031
2032 2012-04-24  Jeffrey Pfau  <jpfau@apple.com>
2033
2034         Disable RTF in JavaScript drag-and-drop
2035         https://bugs.webkit.org/show_bug.cgi?id=76597
2036
2037         Reviewed by Maciej Stachowiak.
2038
2039         Test: fast/events/drag-and-drop-subframe-dataTransfer.html
2040
2041         * platform/mac/ClipboardMac.mm:
2042         (WebCore::cocoaTypeFromHTMLClipboardType):
2043
2044 2012-04-26  James Robinson  <jamesr@chromium.org>
2045
2046         [chromium] Separate IOSurface layer type from texture layers
2047         https://bugs.webkit.org/show_bug.cgi?id=85030
2048
2049         Reviewed by Adrienne Walker.
2050
2051         Adds a new layer type for IOSurface layers and pipes through a separate path through to rendering. IOSurface
2052         layers are very simple - they have an IOSurface id and size, nothing else. All IOSurface layers are "flipped" in
2053         our terminology.
2054
2055         * WebCore.gypi:
2056         * platform/graphics/chromium/IOSurfaceLayerChromium.cpp:
2057         (WebCore):
2058         (WebCore::IOSurfaceLayerChromium::create):
2059         (WebCore::IOSurfaceLayerChromium::IOSurfaceLayerChromium):
2060         (WebCore::IOSurfaceLayerChromium::~IOSurfaceLayerChromium):
2061         (WebCore::IOSurfaceLayerChromium::setIOSurfaceProperties):
2062         (WebCore::IOSurfaceLayerChromium::createCCLayerImpl):
2063         (WebCore::IOSurfaceLayerChromium::drawsContent):
2064         (WebCore::IOSurfaceLayerChromium::pushPropertiesTo):
2065         * platform/graphics/chromium/IOSurfaceLayerChromium.h:
2066         (WebCore):
2067         (IOSurfaceLayerChromium):
2068         * platform/graphics/chromium/LayerRendererChromium.cpp:
2069         (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
2070         (WebCore::LayerRendererChromium::cleanupSharedObjects):
2071         * platform/graphics/chromium/LayerRendererChromium.h:
2072         (LayerRendererChromium):
2073         * platform/graphics/chromium/TextureLayerChromium.cpp:
2074         (WebCore::TextureLayerChromium::TextureLayerChromium):
2075         (WebCore::TextureLayerChromium::drawsContent):
2076         (WebCore::TextureLayerChromium::pushPropertiesTo):
2077         * platform/graphics/chromium/TextureLayerChromium.h:
2078         (TextureLayerChromium):
2079         * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp:
2080         (WebCore::CCIOSurfaceDrawQuad::create):
2081         (WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad):
2082         * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h:
2083         (CCIOSurfaceDrawQuad):
2084         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
2085         (WebCore):
2086         (WebCore::CCIOSurfaceLayerImpl::CCIOSurfaceLayerImpl):
2087         (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
2088         (WebCore::CCIOSurfaceLayerImpl::willDraw):
2089         (WebCore::CCIOSurfaceLayerImpl::appendQuads):
2090         (WebCore::CCIOSurfaceLayerImpl::dumpLayerProperties):
2091         (WebCore::CCIOSurfaceLayerImpl::didLoseContext):
2092         (WebCore::CCIOSurfaceLayerImpl::setIOSurfaceProperties):
2093         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h:
2094         (WebCore):
2095         (CCIOSurfaceLayerImpl):
2096         (WebCore::CCIOSurfaceLayerImpl::create):
2097         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
2098         (WebCore::CCTextureLayerImpl::CCTextureLayerImpl):
2099         (WebCore::CCTextureLayerImpl::~CCTextureLayerImpl):
2100         (WebCore::CCTextureLayerImpl::appendQuads):
2101         (WebCore::CCTextureLayerImpl::didLoseContext):
2102         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
2103         (CCTextureLayerImpl):
2104
2105 2012-04-27  Arvid Nilsson  <anilsson@rim.com>
2106
2107         [BlackBerry] OpenGL related bug fixes
2108         https://bugs.webkit.org/show_bug.cgi?id=84836
2109
2110         Reviewed by Antonio Gomes.
2111
2112         PR147254, 148933, 149117, 149721, 150228
2113
2114         No new tests, covered by existing BlackBerry browser stress tests
2115
2116         * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
2117         (WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded):
2118         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2119         (WebCore::LayerCompositingThread::drawTextures):
2120         * platform/graphics/blackberry/LayerRenderer.cpp:
2121         (WebCore::LayerRenderer::~LayerRenderer):
2122         (WebCore::LayerRenderer::drawLayers):
2123         (WebCore::LayerRenderer::initializeSharedGLObjects):
2124
2125 2012-04-27  Nat Duca  <nduca@chromium.org>
2126
2127         Implement high-resolution time via window.performance.webkitNow()
2128         https://bugs.webkit.org/show_bug.cgi?id=66684
2129
2130         This implements the high resolution time spec from
2131         http://www.w3.org/TR/hr-time/, giving javascript access to
2132         sub-millisecond timestamps that increase over time instead of being
2133         subject to skewing, for example when the host machine's clock changes.
2134
2135         Reviewed by Tony Gentilcore.
2136
2137         Test: fast/performance/performance-now-timestamps.html
2138
2139         * page/Performance.cpp:
2140         (WebCore::Performance::now):
2141         (WebCore):
2142         * page/Performance.h:
2143         (Performance):
2144         * page/Performance.idl:
2145
2146 2012-04-27  Filip Pizlo  <fpizlo@apple.com>
2147
2148         If you get a list of DOMWrapperWorld*'s and then plan to allocate in the heap, you should ref
2149         the DOMWrapperWorld*'s
2150         https://bugs.webkit.org/show_bug.cgi?id=85098
2151         <rdar://problem/11318170>
2152
2153         Reviewed by Sam Weinig.
2154
2155         No new tests because this addresses hard-to-repro flaky behavior arising from GCs at inconvenient
2156         times.
2157
2158         * bindings/js/ScriptController.cpp:
2159         (WebCore::ScriptController::getAllWorlds):
2160         * bindings/js/ScriptController.h:
2161         (ScriptController):
2162         * bindings/js/WebCoreJSClientData.h:
2163         (WebCore::WebCoreJSClientData::getAllWorlds):
2164         * bindings/v8/ScriptController.cpp:
2165         (WebCore::ScriptController::getAllWorlds):
2166         * bindings/v8/ScriptController.h:
2167         (ScriptController):
2168         * loader/FrameLoader.cpp:
2169         (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
2170         (WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds):
2171
2172 2012-04-27  Geoffrey Garen  <ggaren@apple.com>
2173
2174         Removed the sole use of Weak<Unknown>
2175         https://bugs.webkit.org/show_bug.cgi?id=85099
2176
2177         Reviewed by Sam Weinig.
2178
2179         The semantics and implementation of Weak<Unknown> are unclear because:
2180             - Should you call a finalizer for a non-GC thingy? If so, when?
2181
2182                 * Possible answer: No.
2183
2184             - If WeakImpls for GC thingies live with the GC thingies in the
2185               heap, where do WeakImpls for non-GC thingies live?
2186
2187                 * Possible answer: Directly in the Weak<T>.
2188
2189         Since no clients actually want these behaviors, it's hard to tell if
2190         they're the right behaviors, and it's not worth the implementation
2191         complexity. If we come up with a client that wants these behaviors, we
2192         can always revisit this.
2193
2194         * bindings/js/JSNodeFilterCondition.cpp:
2195         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition): Just leave our
2196         filter NULL if it's not an object -- that's a better way to indicate
2197         "not a valid filter object".
2198
2199         (WebCore::JSNodeFilterCondition::acceptNode): Fixed up some naming to
2200         clarify that the object we're working with is not necessarily a function.
2201
2202         * bindings/js/JSNodeFilterCondition.h:
2203         (JSNodeFilterCondition): Use Weak<JSObject>, since that more closely
2204         matches what we're trying to do.
2205
2206 2012-04-26  Kentaro Hara  <haraken@chromium.org>
2207
2208         [V8] Pass Isolate to getDOMXXXMap()
2209         https://bugs.webkit.org/show_bug.cgi?id=85022
2210
2211         Reviewed by Nate Chapin.
2212
2213         The objective is to pass Isolate around in V8 bindings.
2214         This patch passes Isolate to getDOMXXXMap().
2215
2216         Also this patch removes DOMMap::getDOMDataStore() and
2217         DOMData::getDefalutStore(), since the indirection by the
2218         methods is redundant. This is not for performance
2219         optimization but just for refactoring.
2220
2221         No tests. No change in behavior.
2222
2223         * bindings/v8/DOMData.cpp:
2224         (WebCore::DOMData::getCurrentStore):
2225         * bindings/v8/DOMData.h:
2226         (DOMData):
2227         * bindings/v8/V8DOMMap.cpp:
2228         (WebCore::getDOMNodeMap):
2229         (WebCore::getActiveDOMNodeMap):
2230         (WebCore::getDOMObjectMap):
2231         (WebCore::getActiveDOMObjectMap):
2232         (WebCore::removeAllDOMObjects):
2233         * bindings/v8/V8DOMMap.h:
2234         (WebCore):
2235
2236 2012-04-26  Kentaro Hara  <haraken@chromium.org>
2237
2238         [V8] Pass Isolate to V8BindingPerIsolateData::current()
2239         https://bugs.webkit.org/show_bug.cgi?id=85023
2240
2241         Reviewed by Nate Chapin.
2242
2243         The objective is to pass Isolate around in V8 bindings.
2244         This patch passes Isolate to V8BindingPerIsolateData::current().
2245
2246         No tests. No change in behavior.
2247
2248         * bindings/v8/V8Binding.h:
2249         (WebCore::V8BindingPerIsolateData::current):
2250         (WebCore::v8ExternalString):
2251
2252 2012-04-27  Dimitri Glazkov  <dglazkov@chromium.org>
2253
2254         Unreviewed, rolling out r115484.
2255         http://trac.webkit.org/changeset/115484
2256         https://bugs.webkit.org/show_bug.cgi?id=84555
2257
2258         Broke Chromium compile.
2259
2260         * bindings/js/JSBlobCustom.cpp:
2261         * bindings/v8/custom/V8BlobCustom.cpp:
2262         * fileapi/Blob.cpp:
2263         * fileapi/Blob.h:
2264         (Blob):
2265         * fileapi/Blob.idl:
2266         * workers/WorkerContext.idl:
2267
2268 2012-04-27  Alexandru Chiculita  <achicu@adobe.com>
2269
2270         [CSS Shaders] Implement CSS Animations and Transitions for CSS Shaders
2271         https://bugs.webkit.org/show_bug.cgi?id=71406
2272
2273         Reviewed by Dean Jackson.
2274
2275         I've implemented the blend function for the CustomFilterOperation. This should enable animations for CSS Shaders.
2276         Currently, just floats are implemented. If any of the filter attributes like shader, mesh size or box mode are different, 
2277         the fallback is to use the "to" part of the animation instead. If other shader parameters do not match, it will merge the parameter values
2278         between the "from" and "to" states.
2279
2280         Test: css3/filters/custom/custom-filter-animation.html
2281
2282         * platform/graphics/filters/CustomFilterNumberParameter.h:
2283         (WebCore::CustomFilterNumberParameter::blend):
2284         (CustomFilterNumberParameter):
2285         (WebCore::CustomFilterNumberParameter::operator==):
2286         * platform/graphics/filters/CustomFilterOperation.cpp:
2287         (WebCore::equalCustomFilterParameters):
2288         (WebCore):
2289         (WebCore::checkCustomFilterParametersOrder):
2290         (WebCore::blendCustomFilterParameters):
2291         (WebCore::CustomFilterOperation::CustomFilterOperation):
2292         (WebCore::CustomFilterOperation::blend):
2293         * platform/graphics/filters/CustomFilterOperation.h:
2294         (WebCore):
2295         (CustomFilterOperation):
2296         (WebCore::CustomFilterOperation::operator==):
2297         (WebCore::CustomFilterOperation::operator!=):
2298         * platform/graphics/filters/CustomFilterParameter.h:
2299         (CustomFilterParameter):
2300         (WebCore::CustomFilterParameter::isSameType):
2301         (WebCore::CustomFilterParameter::operator==):
2302         (WebCore::CustomFilterParameter::operator!=):
2303         * platform/graphics/filters/CustomFilterProgram.h:
2304         * rendering/style/StyleCustomFilterProgram.h:
2305         (StyleCustomFilterProgram):
2306         (WebCore::StyleCustomFilterProgram::cachedVertexShader):
2307         (WebCore::StyleCustomFilterProgram::cachedFragmentShader):
2308         (WebCore::StyleCustomFilterProgram::operator==):
2309
2310 2012-04-27  Chris Rogers  <crogers@google.com>
2311
2312         Re-factor scheduling logic from AudioBufferSourceNode into AudioScheduledSourceNode
2313         https://bugs.webkit.org/show_bug.cgi?id=84639
2314
2315         Reviewed by Eric Carlson.
2316
2317         Playback logic involving noteOn(), noteOff(), and playbackState were intertwined with
2318         the AudioBufferSourceNode's buffer playback code.  These are more general concepts and
2319         may be implemented separately in another class called AudioScheduledSourceNode.
2320
2321         No new tests. Covered by existing layout tests.
2322
2323         * GNUmakefile.list.am:
2324         Add AudioScheduledSourceNode files to makefile.
2325
2326         * Modules/webaudio/AudioBufferSourceNode.cpp:
2327         (WebCore):
2328         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
2329         Re-factor some member variables into new base class AudioScheduledSourceNode.
2330
2331         (WebCore::AudioBufferSourceNode::process):
2332         Re-factor scheduling logic into AudioScheduledSourceNode.
2333
2334         * Modules/webaudio/AudioBufferSourceNode.h:
2335         (AudioBufferSourceNode):
2336         Simplify by re-factoring scheduling logic into AudioScheduledSourceNode.
2337
2338         * Modules/webaudio/AudioScheduledSourceNode.cpp: Added.
2339         (WebCore):
2340         (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
2341         (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
2342         Get frame information for the current time quantum.
2343
2344         * Modules/webaudio/AudioScheduledSourceNode.h: Added.
2345         (WebCore::AudioScheduledSourceNode::noteOn):
2346         (WebCore::AudioScheduledSourceNode::noteOff):
2347         (WebCore::AudioScheduledSourceNode::finish):
2348         (WebCore::AudioScheduledSourceNode::playbackState):
2349         (WebCore::AudioScheduledSourceNode::isPlayingOrScheduled):
2350         (WebCore::AudioScheduledSourceNode::hasFinished):
2351         Re-factored from AudioBufferSourceNode.
2352
2353         * WebCore.gypi:
2354         * WebCore.xcodeproj/project.pbxproj:
2355         Add AudioScheduledSourceNode files to makefiles.
2356     
2357 2012-04-26  Sam Weinig  <sam@webkit.org>
2358
2359         Add support for the Blob constructor
2360         https://bugs.webkit.org/show_bug.cgi?id=84555
2361
2362         Reviewed by Maciej Stachowiak.
2363
2364         Test: fast/files/blob-constructor.html
2365
2366         This adds an implementation of the Blob constructor that willfully
2367         violates the W3C Editor’s Draft 29 February 2012 in the following ways:
2368         - Elements in the parts array are coerced to DOMStrings https://www.w3.org/Bugs/Public/show_bug.cgi?id=16721 
2369         - Don't throw for invalid key in the dictionary https://www.w3.org/Bugs/Public/show_bug.cgi?id=16727
2370         - Values for the endings property are treated as enums https://www.w3.org/Bugs/Public/show_bug.cgi?id=16729 
2371
2372         * bindings/js/JSBlobCustom.cpp:
2373         (WebCore::JSBlobConstructor::constructJSBlob):
2374         Implement blob constructor.
2375
2376         * bindings/v8/custom/V8BlobCustom.cpp:
2377         (WebCore::V8Blob::constructorCallback):
2378         Implement blob constructor.
2379
2380         * fileapi/Blob.idl:
2381         Add constructor to IDL.
2382
2383         * workers/WorkerContext.idl:
2384         Add Blob constructor to the worker global object.
2385
2386 2012-04-27  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2387
2388         [Qt] Fix minimal build.
2389         https://bugs.webkit.org/show_bug.cgi?id=85045
2390
2391         Reviewed by Tor Arne Vestbø.
2392
2393         Compile LIBXML XML parser even if ENABLE_XSLT is not set.
2394
2395         * Target.pri:
2396
2397 2012-04-27  Shawn Singh  <shawnsingh@chromium.org>
2398
2399         Infinite backgroundClipRect should not be scrolled.
2400         https://bugs.webkit.org/show_bug.cgi?id=84979
2401
2402         Reviewed by Adrienne Walker.
2403
2404         Test: compositing/iframes/scroll-fixed-transformed-element.html
2405
2406         By accidentally scrolling clipRects that should be considered
2407         "infinite", they were no longer being considered infinite. This
2408         caused a chain of un-intended code paths that caused fixed
2409         position elements to stutter when scrolling in Chromium.
2410
2411         * rendering/RenderLayer.cpp:
2412         (WebCore::RenderLayer::backgroundClipRect):
2413
2414 2012-04-27  Ryosuke Niwa  <rniwa@webkit.org>
2415
2416         FormatBlock crashes when body element is removed prior to the command execution
2417         https://bugs.webkit.org/show_bug.cgi?id=84937
2418
2419         Reviewed by Tony Chang.
2420
2421         The crash was because because DOM had been modified since the last time selection had been "validated",
2422         and therefore frame selection's endpoints are no longer visible when we instantiated visibleStart
2423         and visibleEnd from m_endingSelection of the edit command.
2424
2425         Fixed the bug by checking the nullity and orphanedness of visible start and visible end directly.
2426         I suspect we have similar bugs in other commands. The fundamental problem is that the copy constructor
2427         of VisibleSelection never validates so when a VisibleSelection is passed from one class to another
2428         (e.g. FrameSelection to EditCommand), we may not adjust end points as needed.
2429
2430         Test: editing/execCommand/format-block-without-body-crash.html
2431
2432         * editing/ApplyBlockElementCommand.cpp:
2433         (WebCore::ApplyBlockElementCommand::doApply):
2434
2435 2012-04-27  Enrica Casucci  <enrica@apple.com>
2436
2437         REGRESSION(r96257): Deleting a large amount of text is very slow.
2438         https://bugs.webkit.org/show_bug.cgi?id=83983
2439         <rdar://problem/10826076>
2440         
2441         Reviewed by Ryosuke Niwa.
2442
2443         The change in r96257 did not cause the performance regression per se,
2444         but exposed a problem in the way we calculate the offset in container
2445         node when the anchorType is PositionIsOffsetInAnchor.
2446         The offset was computed as the minimum between the given offset and
2447         lastOffsetInNode. If the container has a very large number of children,
2448         we walk the entire list of child nodes in the container simply to find
2449         out how many they are.
2450         Looking through the entire editing code, I found other 2 cases (one
2451         is only an ASSERT) where we could do a similar optimization.
2452
2453         No new tests. No behavior change, only performance optimization.
2454
2455         * dom/Position.cpp:
2456         (WebCore::Position::computeOffsetInContainerNode):
2457         * dom/Position.h:
2458         (WebCore::minOffsetForNode):
2459         (WebCore::offsetIsBeforeLastNodeOffset):
2460         * editing/ApplyStyleCommand.cpp:
2461         (WebCore::ApplyStyleCommand::removeInlineStyle):
2462         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2463
2464 2012-04-27  Julien Chaffraix  <jchaffraix@webkit.org>
2465
2466         NULL-deref in RenderBox::clippedOverflowRectForRepaint
2467         https://bugs.webkit.org/show_bug.cgi?id=84774
2468
2469         Reviewed by Tony Chang.
2470
2471         Test: fast/inline/crash-new-continuation-with-outline.html
2472
2473         The bug comes from trying to repaint the :after content as part of updateBeforeAfterContent.
2474         The repainting logic would query the yet-to-be-inserted continuation(). Then we would crash in
2475         RenderBox::clippedOverflowRectForRepaint as we didn't have an enclosingLayer() (which any
2476         RenderObject in the tree will have).
2477
2478         The fix is to check in RenderInline::clippedOverflowRectForRepaint that our continuation()
2479         is properly inserted in the tree. We could check that it isRooted() but it's an overkill here.
2480
2481         * rendering/RenderInline.cpp:
2482         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2483
2484 2012-04-27  Antti Koivisto  <antti@apple.com>
2485
2486         Memory cache pruning should be protected against reentering.
2487         https://bugs.webkit.org/show_bug.cgi?id=85077
2488
2489         Reviewed by Alexey Proskuryakov.
2490
2491         MemoryCache::pruneDeadResourcesToSize() has some ad-hock protection against reentering.
2492         This patch adds more complete protection.
2493
2494         * loader/cache/MemoryCache.cpp:
2495         (WebCore::MemoryCache::MemoryCache):
2496         (WebCore::MemoryCache::pruneLiveResourcesToSize):
2497         
2498             Protect live resource pruning too.
2499
2500         (WebCore::MemoryCache::pruneDeadResourcesToSize):
2501         
2502             Remove the existing weak reentrancy handling in favor of full proctection.
2503
2504         * loader/cache/MemoryCache.h:
2505         (MemoryCache):
2506
2507 2012-04-27  Alexander Pavlov  <apavlov@chromium.org>
2508
2509         Web Inspector: Implement the "Disable JavaScript" option in the settings dialog
2510         (re-landing r115417 with a test that should work on Windows.)
2511         https://bugs.webkit.org/show_bug.cgi?id=84946
2512
2513         Reviewed by Yury Semikhatsky.
2514
2515         Test: inspector/debugger/disable-script.html
2516
2517         * inspector/Inspector.json:
2518         * inspector/InspectorPageAgent.cpp:
2519         (PageAgentState):
2520         (WebCore::InspectorPageAgent::enable):
2521         (WebCore::InspectorPageAgent::disable):
2522         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
2523         (WebCore):
2524         (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
2525         * inspector/InspectorPageAgent.h:
2526         * inspector/front-end/Settings.js:
2527         * inspector/front-end/SettingsScreen.js:
2528         (WebInspector.SettingsScreen):
2529         (WebInspector.SettingsScreen.prototype.get _updateScriptDisabledCheckbox):
2530         (WebInspector.SettingsScreen.prototype._javaScriptDisabledChanged):
2531         * inspector/front-end/inspector.js:
2532
2533 2012-04-27  Keishi Hattori  <keishi@webkit.org>
2534
2535         IETC HTML5: verify HTMLDataListElement - instanceof HTMLDataListElement fails.
2536         https://bugs.webkit.org/show_bug.cgi?id=81196
2537
2538         Reviewed by Kent Tamura.
2539
2540         Test: fast/dom/Window/window-properties.html, fast/dom/Window/window-lookup-precedence.html
2541
2542         HTMLDataListElement should be available on DOMWindow.
2543
2544         * page/DOMWindow.idl: Added HTMLDataListElement.
2545
2546 2012-04-27  Dimitri Glazkov  <dglazkov@chromium.org>
2547
2548         Unreviewed, rolling out r115417.
2549         http://trac.webkit.org/changeset/115417
2550         https://bugs.webkit.org/show_bug.cgi?id=84946
2551
2552         Added test is broken on windows.
2553
2554         * inspector/Inspector.json:
2555         * inspector/InspectorPageAgent.cpp:
2556         (WebCore::InspectorPageAgent::enable):
2557         (WebCore::InspectorPageAgent::disable):
2558         * inspector/InspectorPageAgent.h:
2559         * inspector/front-end/Settings.js:
2560         * inspector/front-end/SettingsScreen.js:
2561         (WebInspector.SettingsScreen):
2562         * inspector/front-end/inspector.js:
2563
2564 2012-04-27  Gavin Peters  <gavinp@chromium.org>
2565
2566         Add new ENABLE_LINK_PRERENDER define to control the Prerendering API
2567         https://bugs.webkit.org/show_bug.cgi?id=84871
2568
2569         Reviewed by Adam Barth.
2570
2571         Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering
2572         API separates it from prefetching.  Having separate include guards lets ports enable prefetching,
2573         a relatively easy change, without needing to build the infrastructure for prerendering, which
2574         is considerably more complicated.
2575
2576         * Configurations/FeatureDefines.xcconfig:
2577
2578 2012-04-27  Zan Dobersek  <zandobersek@gmail.com>
2579
2580         [Gtk][DOM Bindings] Feature-protected properties are put under condition guards
2581         https://bugs.webkit.org/show_bug.cgi?id=85068
2582
2583         Reviewed by Martin Robinson.
2584
2585         Generated feature-dependent properties are now present regardless of that
2586         feature being enabled. On getting or setting that property's value a warning
2587         is thrown if the feature is not enabled. Additionally, if the generated
2588         interface is feature-dependant, when getting or setting any property's value
2589         a warning is thrown if the feature is not enabled.
2590
2591         No new tests - covered by existing bindings tests.
2592
2593         * bindings/scripts/CodeGeneratorGObject.pm:
2594         (GenerateProperty):
2595         (GenerateProperties):
2596         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: Rebaseline.
2597         (webkit_dom_test_interface_set_property):
2598         (webkit_dom_test_interface_get_property):
2599         (webkit_dom_test_interface_class_init):
2600         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
2601         (webkit_dom_test_obj_set_property):
2602         (webkit_dom_test_obj_get_property):
2603         (webkit_dom_test_obj_class_init):
2604         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: Ditto.
2605         (webkit_dom_test_serialized_script_value_interface_get_property):
2606
2607 2012-04-27  Zan Dobersek  <zandobersek@gmail.com>
2608
2609         [Gtk][DOM Bindings] Conditional string in implementation file generated in wrong place after 113450
2610         https://bugs.webkit.org/show_bug.cgi?id=85065
2611
2612         Reviewed by Martin Robinson.
2613
2614         Put the condition string in implementation file after the header inclusions. This ensures
2615         that build errors do not occur when disabling the future that applies to the condition string
2616         because of WebCore objects and methods that are still in use despite the feature being disabled.
2617
2618         No new tests - covered by bindings tests.
2619
2620         * bindings/scripts/CodeGeneratorGObject.pm:
2621         (WriteData):
2622         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: Rebaseline generated results.
2623         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: Ditto.
2624         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: Ditto.
2625
2626 2012-04-27  Andreas Kling  <kling@webkit.org>
2627
2628         Avoid mutating Element attribute storage in StepRange constructor.
2629         <http://webkit.org/b/84797>
2630
2631         Reviewed by Antti Koivisto.
2632
2633         Test: fast/selectors/querySelector-in-range-crash.html
2634
2635         * dom/Attribute.h:
2636
2637             Add comment about the volatility of references returned by getters.
2638
2639         * html/StepRange.cpp:
2640         (WebCore::StepRange::StepRange):
2641
2642             Replace hasAttribute/getAttribute pair by a single fastGetAttribute.
2643
2644         * html/HTMLInputElement.cpp:
2645         (WebCore::HTMLInputElement::updateType):
2646         (WebCore::HTMLInputElement::value):
2647
2648             Store the value attribute in an local variable before passing it to sanitizeValue().
2649
2650 2012-04-27  Rob Buis  <rbuis@rim.com>
2651
2652         SVG inline style of 'marker-*' does not override
2653         https://bugs.webkit.org/show_bug.cgi?id=84824
2654
2655         Reviewed by Nikolas Zimmermann.
2656
2657         Properly handle CSSValueNone for clip-path, filter, mask and marker-* properties. Instead
2658         of bailing out, set the none value explicitly, since an earlier match may have set it to
2659         something other than none.
2660
2661         Tests: svg/custom/inline-style-overrides-clipPath-expected.svg
2662                svg/custom/inline-style-overrides-clipPath.svg
2663                svg/custom/inline-style-overrides-filter-expected.svg
2664                svg/custom/inline-style-overrides-filter.svg
2665                svg/custom/inline-style-overrides-markers-expected.svg
2666                svg/custom/inline-style-overrides-markers.svg
2667                svg/custom/inline-style-overrides-mask-expected.svg
2668                svg/custom/inline-style-overrides-mask.svg
2669
2670         * css/SVGCSSStyleSelector.cpp:
2671         (WebCore::StyleResolver::applySVGProperty):
2672
2673 2012-04-27  Christophe Dumez  <christophe.dumez@intel.com>
2674
2675         [EFL] media/video-controls-rendering-toggle-display-none.html is failing
2676         https://bugs.webkit.org/show_bug.cgi?id=84949
2677
2678         Reviewed by Antonio Gomes.
2679
2680         Fix volume slider rendering so that the
2681         media/video-controls-rendering-toggle-display-none.html passes.
2682
2683         * css/mediaControlsEfl.css:
2684         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
2685         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
2686         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
2687
2688 2012-04-27  Nikolas Zimmermann  <nzimmermann@rim.com>
2689
2690         Support values animation mode with just a single value
2691         https://bugs.webkit.org/show_bug.cgi?id=85064
2692
2693         Reviewed by Antti Koivisto.
2694
2695         values="a" is equal to <set to="a"> per SMIL specification.
2696         We currently only support values animation if at least two values are given, fix that.
2697
2698         The reference animations in Dr. Olaf Hoffmanns SVG Animation test suite are mostly using
2699         values animations, sometimes with only a single value given. Lots of the reference animations
2700         are broken in trunk w/o this patch and now work as expected.
2701
2702         See http://hoffmann.bplaced.net/svgtest/index.php?s=en&in=start.
2703
2704         Test: svg/animations/single-values-animation.html
2705
2706         * svg/SVGAnimationElement.cpp:
2707         (WebCore::SVGAnimationElement::calculateKeyTimesForCalcModePaced):
2708         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
2709         (WebCore::SVGAnimationElement::startedActiveInterval):
2710
2711 2012-04-27  Konrad Piascik  <kpiascik@rim.com>
2712
2713         Web Inspector: Allow inspection of Web Socket Frames
2714         https://bugs.webkit.org/show_bug.cgi?id=83282
2715
2716         Reviewed by Pavel Feldman.
2717
2718         Tests: http/tests/inspector/web-socket-frame-error.html
2719                http/tests/inspector/web-socket-frame.html
2720
2721         * English.lproj/localizedStrings.js: Added new Web Inspector front-end UI strings.
2722         * Modules/websockets/WebSocketChannel.cpp:  Added InspectorInstrumentation calls to
2723                                                     the following methods.
2724         (WebCore::WebSocketChannel::fail):
2725         (WebCore::WebSocketChannel::processFrame):
2726         (WebCore::WebSocketChannel::sendFrame):
2727         * WebCore.gypi: Added new Web Inspector resource file.
2728         * WebCore.vcproj/WebCore.vcproj: Added new Web Inspector resource file.
2729         * inspector/Inspector.json: Added new Web Inspector resource file.
2730         * inspector/InspectorInstrumentation.cpp: Added new methods for instrumenting a Web Socket frame or error.
2731         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameImpl):
2732         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameErrorImpl):
2733         (WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):
2734         * inspector/InspectorInstrumentation.h:
2735         (WebCore):
2736         (InspectorInstrumentation):
2737         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
2738         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
2739         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
2740         * inspector/InspectorResourceAgent.cpp:
2741         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrame):
2742         (WebCore):
2743         (WebCore::InspectorResourceAgent::didSendWebSocketFrame):
2744         (WebCore::InspectorResourceAgent::didReceiveWebSocketFrameError):
2745         * inspector/InspectorResourceAgent.h:
2746         (WebCore):
2747         (InspectorResourceAgent):
2748         * inspector/compile-front-end.py: Added new Web Inspector resource file.
2749         * inspector/front-end/NetworkItemView.js: Added a new View for inspecting Web Socket frames and errors.
2750         (WebInspector.NetworkItemView):
2751         * inspector/front-end/NetworkManager.js: Implemented callback called by InspectorResourceAgent for
2752                                                  the new Web Socket frame and error calls.
2753         (WebInspector.NetworkDispatcher.prototype.webSocketFrameReceived):
2754         (WebInspector.NetworkDispatcher.prototype.webSocketFrameSent):
2755         (WebInspector.NetworkDispatcher.prototype.webSocketFrameError):
2756         * inspector/front-end/NetworkRequest.js: Added a frames array to a Resource request along
2757                                                  with accessor and helper methods
2758         (WebInspector.NetworkRequest):
2759         (WebInspector.NetworkRequest.prototype.resource):
2760         (WebInspector.NetworkRequest.prototype.hasFrames):
2761         (WebInspector.NetworkRequest.prototype.frameLength):
2762         (WebInspector.NetworkRequest.prototype.getFrame):
2763         (WebInspector.NetworkRequest.prototype.addFrameError):
2764         (WebInspector.NetworkRequest.prototype.addFrame):
2765         (WebInspector.NetworkRequest.prototype._pushFrame):
2766         * inspector/front-end/ResourceWebSocketFrameView.js: Added to help display Web Socket frame and error data.
2767         (WebInspector.ResourceWebSocketFrameView):
2768         * inspector/front-end/WebKit.qrc: Added new Web Inspector resource file.
2769         * inspector/front-end/inspector.html: Added new Web Inspector resource file.
2770
2771 2012-04-27  Nikolas Zimmermann  <nzimmermann@rim.com>
2772
2773         Fix repetitions & by animation support for SVGAnimateTransformElement
2774         https://bugs.webkit.org/show_bug.cgi?id=85051
2775
2776         Reviewed by Antti Koivisto.
2777
2778         Repetitions are currently handled by adjusting percentage (percentage += repeatCount).
2779         This doesn't work for <animateTransform> as each repetition has to be post-multiplied to the animated transform list. Fix that.
2780
2781         By-animations are equal to values="0;by" animations in SMIL. '0' is the neutral element of addition, which is the _zero_ matrix,
2782         not the identity matrix for SVGTransform. Add a new construction mode to SVGTransform to be able to construct zero transforms.
2783
2784         Tests: svg/animations/animateTransform-accumulation-expected.svg
2785                svg/animations/animateTransform-accumulation.svg
2786                svg/animations/animateTransform-by-scale-expected.svg
2787                svg/animations/animateTransform-by-scale.svg
2788                svg/animations/animateTransform-from-by-from-to-comparision-expected.svg
2789                svg/animations/animateTransform-from-by-from-to-comparision.svg
2790                svg/animations/animateTransform-from-by-scale-additive-sum-expected.svg
2791                svg/animations/animateTransform-from-by-scale-additive-sum.svg
2792                svg/animations/animateTransform-from-by-scale-expected.svg
2793                svg/animations/animateTransform-from-by-scale.svg
2794                svg/animations/animateTransform-rotate-around-point-expected.svg
2795                svg/animations/animateTransform-rotate-around-point.svg
2796                svg/animations/animateTransform-skewX-expected.svg
2797                svg/animations/animateTransform-skewX.svg
2798                svg/animations/animateTransform-skewY-expected.svg
2799                svg/animations/animateTransform-skewY.svg
2800                svg/animations/animateTransform-translate-expected.svg
2801                svg/animations/animateTransform-translate.svg
2802                svg/animations/multiple-animateTransform-additive-sum-expected.svg
2803                svg/animations/multiple-animateTransform-additive-sum.svg
2804
2805         * svg/SVGAnimateTransformElement.cpp:
2806         (WebCore::SVGAnimateTransformElement::parseAttribute):
2807         * svg/SVGAnimatedTransformList.cpp:
2808         (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes):
2809         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
2810         * svg/SVGAnimationElement.h:
2811         (WebCore::SVGAnimationElement::adjustFromToListValues):
2812         * svg/SVGTransform.cpp:
2813         (WebCore::SVGTransform::SVGTransform):
2814         * svg/SVGTransform.h:
2815         * svg/SVGTransformDistance.cpp:
2816         (WebCore::SVGTransformDistance::SVGTransformDistance):
2817         (WebCore::SVGTransformDistance::scaledDistance):
2818         (WebCore::SVGTransformDistance::addSVGTransforms):
2819         (WebCore::SVGTransformDistance::addToSVGTransform):
2820         (WebCore::SVGTransformDistance::distance):
2821         * svg/SVGTransformDistance.h:
2822         (SVGTransformDistance):
2823
2824 2012-04-27  Nikolas Zimmermann  <nzimmermann@rim.com>
2825
2826         SVG Animations update baseVal instead of animVal
2827         https://bugs.webkit.org/show_bug.cgi?id=12437
2828
2829         Reviewed by Dirk Schulze.
2830
2831         Cleanup animation code, remove last remaining crufts of the old setAttribute() animation model.
2832         Now only two animation modes remain: animate SVG DOM animVal properties or CSS properties.
2833
2834         Stop caching base values per string in SMILTimeContainer, as it breaks additive="sum" for CSS
2835         properties if the underlying base value is changed from the outside (eg. when calling
2836         style.fontSize="20px", if font-size was 10px, and we're running an additive by-animation with 50px).
2837
2838         This requires us to cache the computed style of a SVGElement, without SMIL style property changes,
2839         in SVGElementRareData, similar to how the computed style itself is cached in ElementRareData.
2840         To be able to compute the base value for a CSS property at any time, we have to exclude any
2841         previous animation effects residing in the SMIL animated style properties, per SMIL2/3 specs.
2842
2843         NOTE: This doesn't change or affect the way CSS Animations/Transitions are applied, we still
2844               have some bugs in that area, but this patch doesn't address them. The idea is to only
2845               remove the cache, to pave the way for future additive="sum" patches.
2846
2847         Tests: svg/animations/change-css-property-while-animating-fill-freeze.html
2848                svg/animations/change-css-property-while-animating-fill-remove.html
2849
2850         * dom/Element.cpp:
2851         (WebCore::Element::recalcStyle):
2852         * dom/Node.h:
2853         * svg/SVGAnimateElement.cpp:
2854         (WebCore::propertyTypesAreConsistent):
2855         (WebCore::SVGAnimateElement::resetToBaseValue):
2856         (WebCore::SVGAnimateElement::applyResultsToTarget):
2857         * svg/SVGAnimateElement.h:
2858         (SVGAnimateElement):
2859         * svg/SVGAnimateMotionElement.cpp:
2860         (WebCore::SVGAnimateMotionElement::resetToBaseValue):
2861         * svg/SVGAnimateMotionElement.h:
2862         (SVGAnimateMotionElement):
2863         * svg/SVGAnimationElement.cpp:
2864         (WebCore::applyCSSPropertyToTarget):
2865         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedCSSValue):
2866         * svg/SVGAnimationElement.h:
2867         * svg/SVGElement.cpp:
2868         (WebCore::SVGElement::SVGElement):
2869         (WebCore::SVGElement::willRecalcStyle):
2870         (WebCore):
2871         (WebCore::SVGElement::rareSVGData):
2872         (WebCore::SVGElement::ensureRareSVGData):
2873         (WebCore::SVGElement::computedStyle):
2874         (WebCore::SVGElement::isAnimatableAttribute):
2875         * svg/SVGElement.h:
2876         (SVGElement):
2877         * svg/SVGElementRareData.h:
2878         (WebCore::SVGElementRareData::SVGElementRareData):
2879         (WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties):
2880         (WebCore::SVGElementRareData::destroyAnimatedSMILStyleProperties):
2881         (WebCore::SVGElementRareData::overrideComputedStyle):
2882         (WebCore::SVGElementRareData::setUseOverrideComputedStyle):
2883         * svg/animation/SMILTimeContainer.cpp:
2884         (WebCore::SMILTimeContainer::updateAnimations):
2885         * svg/animation/SMILTimeContainer.h:
2886         (SMILTimeContainer):
2887         * svg/animation/SVGSMILElement.h:
2888         (SVGSMILElement):
2889
2890 2012-04-26  Alexander Pavlov  <apavlov@chromium.org>
2891
2892         Web Inspector: Implement the "Disable JavaScript" option in the settings dialog
2893         (re-landing r115323 with a fixed test.)
2894         https://bugs.webkit.org/show_bug.cgi?id=84946
2895
2896         Based on user actions in the Inspector frontend, InspectorPageAgent invokes Settings::setScriptEnabled()
2897         for the associated page to switch the script execution therein.
2898
2899         Reviewed by Yury Semikhatsky.
2900
2901         Test: inspector/debugger/disable-script.html
2902
2903         * inspector/Inspector.json:
2904         * inspector/InspectorPageAgent.cpp:
2905         (PageAgentState):
2906         (WebCore::InspectorPageAgent::enable):
2907         (WebCore::InspectorPageAgent::disable):
2908         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
2909         (WebCore):
2910         (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
2911         * inspector/InspectorPageAgent.h:
2912         * inspector/front-end/Settings.js:
2913         * inspector/front-end/SettingsScreen.js:
2914         (WebInspector.SettingsScreen):
2915         (WebInspector.SettingsScreen.prototype.get _updateScriptDisabledCheckbox):
2916         (WebInspector.SettingsScreen.prototype._javaScriptDisabledChanged):
2917         * inspector/front-end/inspector.js:
2918
2919 2012-04-26  Ryosuke Niwa  <rniwa@webkit.org>
2920
2921         REGRESSION (r94497): Pressing Command+A when inline (Marked Text) is not empty will clean whole content
2922         https://bugs.webkit.org/show_bug.cgi?id=84501
2923
2924         Reviewed by Alexey Proskuryakov.
2925
2926         The bug was caused by setComposition, which is called by cancelComposition, deleting the contents when
2927         the passed text is empty. Fixed it by not deleting text when canceling compositions. This is okay because
2928         as the comment above the line suggests, this particular call to TypingCommand::deleteSelection is only useful
2929         when the confirmed text is empty and the composition text had previously been non-empty.
2930
2931         Test: editing/input/select-all-clear-input-method.html
2932
2933         * editing/Editor.cpp:
2934         (WebCore::Editor::setComposition):
2935
2936 2012-04-26  Keishi Hattori  <keishi@webkit.org>
2937
2938         datalist: Form control in a <datalist> should be barred from constraint validation
2939         https://bugs.webkit.org/show_bug.cgi?id=84359
2940
2941         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-datalist-element
2942         According to this, if an element has a datalist element ancestor, it is barred from constraint validation.
2943
2944         Reviewed by Kent Tamura.
2945
2946         Test: fast/forms/datalist/datalist-child-validation.html
2947
2948         * html/HTMLFormControlElement.cpp:
2949         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2950         (WebCore::HTMLFormControlElement::updateAncestors): Updates the ancestor information.
2951         (WebCore::HTMLFormControlElement::insertedInto): Invalidates the ancestor information and calls setNeedsWillValidateCheck
2952         (WebCore::HTMLFormControlElement::removedFrom): Invalidates the ancestor information and calls setNeedsWillValidateCheck
2953         (WebCore::HTMLFormControlElement::disabled):
2954         (WebCore::HTMLFormControlElement::recalcWillValidate): Returns false if element has a datalist ancestor.
2955         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck): Check if ancestor information is valid too.
2956         * html/HTMLFormControlElement.h:
2957         (HTMLFormControlElement):
2958
2959 2012-04-26  Adrienne Walker  <enne@google.com>
2960
2961         [chromium] Remove unused CCLayerImpl::debugID()
2962         https://bugs.webkit.org/show_bug.cgi?id=85019
2963
2964         Reviewed by James Robinson.
2965
2966         CCLayerSorter used debugID() but it was never set anywhere. Change
2967         the CCLayerSorter LOG messages to use id(), which does get set.
2968
2969         * platform/graphics/chromium/cc/CCLayerImpl.h:
2970         (CCLayerImpl):
2971         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
2972         (WebCore::CCLayerSorter::createGraphNodes):
2973         (WebCore::CCLayerSorter::createGraphEdges):
2974         (WebCore::CCLayerSorter::sort):
2975
2976 2012-04-26  Nico Weber  <thakis@chromium.org>
2977
2978         [chromium] Fix C++ language use.
2979         https://bugs.webkit.org/show_bug.cgi?id=85015
2980
2981         Reviewed by James Robinson.
2982
2983         Even though MSVC allows it, a sizeof followed by a non-parenthesized
2984         typename is not valid C++.
2985
2986         No functionality change.
2987
2988         * rendering/RenderThemeChromiumWin.cpp:
2989         (WebCore):
2990         (WebCore::getNonClientMetrics):
2991
2992 2012-04-24  James Robinson  <jamesr@chromium.org>
2993
2994         [chromium] Move ProgramBinding definitions to LayerRendererChromium and normalize naming
2995         https://bugs.webkit.org/show_bug.cgi?id=84808
2996
2997         Reviewed by Adrienne Walker.
2998
2999         The GL programs used are logically part of LayerRendererChromium and not something specific to a layer type,
3000         since a different renderer would want to use a different thing to render the same layer types. This moves all of
3001         the ProgramBinding definitions into LayerRendererChromium and gives them consistent names. With the exception of
3002         CCRenderSurface (noted by an inline comment), these programs are private to LRC.
3003
3004         This patch also deduplicates programs a bit:
3005         1.) Video's NativeTexture and RGBA programs were the same thing, folded.
3006         2.) The TexStretch and TexTransform shaders are basically the same thing, folded together.
3007
3008         * platform/graphics/chromium/LayerChromium.h:
3009         (LayerChromium):
3010         * platform/graphics/chromium/LayerRendererChromium.cpp:
3011         (WebCore::LayerRendererChromium::drawCheckerboardQuad):
3012         (WebCore::LayerRendererChromium::drawDebugBorderQuad):
3013         (WebCore::LayerRendererChromium::drawSolidColorQuad):
3014         (WebCore::LayerRendererChromium::drawTileQuad):
3015         (WebCore::LayerRendererChromium::drawYUV):
3016         (WebCore::LayerRendererChromium::drawRGBA):
3017         (WebCore::LayerRendererChromium::drawNativeTexture2D):
3018         (WebCore::LayerRendererChromium::drawStreamTexture):
3019         (WebCore::LayerRendererChromium::drawTextureQuad):
3020         (WebCore::LayerRendererChromium::drawHeadsUpDisplay):
3021         (WebCore::LayerRendererChromium::initializeSharedObjects):
3022         (WebCore::LayerRendererChromium::tileCheckerboardProgram):
3023         (WebCore::LayerRendererChromium::solidColorProgram):
3024         (WebCore::LayerRendererChromium::headsUpDisplayProgram):
3025         (WebCore::LayerRendererChromium::renderSurfaceProgram):
3026         (WebCore::LayerRendererChromium::renderSurfaceProgramAA):
3027         (WebCore::LayerRendererChromium::renderSurfaceMaskProgram):
3028         (WebCore::LayerRendererChromium::renderSurfaceMaskProgramAA):
3029         (WebCore::LayerRendererChromium::tileProgram):
3030         (WebCore::LayerRendererChromium::tileProgramOpaque):
3031         (WebCore::LayerRendererChromium::tileProgramAA):
3032         (WebCore::LayerRendererChromium::tileProgramSwizzle):
3033         (WebCore::LayerRendererChromium::tileProgramSwizzleOpaque):
3034         (WebCore::LayerRendererChromium::tileProgramSwizzleAA):
3035         (WebCore::LayerRendererChromium::textureProgramFlip):
3036         (WebCore::LayerRendererChromium::textureTexRectProgram):
3037         (WebCore::LayerRendererChromium::textureTexRectProgramFlip):
3038         (WebCore::LayerRendererChromium::videoRGBAProgram):
3039         (WebCore::LayerRendererChromium::videoYUVProgram):
3040         (WebCore::LayerRendererChromium::videoStreamTextureProgram):
3041         (WebCore::LayerRendererChromium::cleanupSharedObjects):
3042         * platform/graphics/chromium/LayerRendererChromium.h:
3043         (WebCore):
3044         (LayerRendererChromium):
3045         * platform/graphics/chromium/ShaderChromium.cpp:
3046         * platform/graphics/chromium/ShaderChromium.h:
3047         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
3048         (CCHeadsUpDisplay):
3049         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3050         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3051         (WebCore):
3052         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3053         (WebCore::CCRenderSurface::copyTextureToFramebuffer):
3054         (WebCore::CCRenderSurface::drawLayer):
3055         * platform/graphics/chromium/cc/CCRenderSurface.h:
3056         (CCRenderSurface):
3057         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3058         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
3059         (CCTextureLayerImpl):
3060         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3061         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3062         (CCTiledLayerImpl):
3063         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3064         (WebCore):
3065         (CCVideoLayerImpl):
3066
3067 2012-04-26  Jeffrey Pfau  <jpfau@apple.com>
3068
3069         Invalid cast in WebCore::HTMLCollection::isAcceptableElement
3070         https://bugs.webkit.org/show_bug.cgi?id=84626
3071
3072         Reviewed by Darin Adler.
3073
3074         Check if the object is an HTMLElement before casting.
3075
3076         Test: fast/dom/htmlcollection-non-html.html
3077
3078         * html/HTMLCollection.cpp:
3079         (WebCore::HTMLCollection::isAcceptableElement):
3080
3081 2012-04-26  Dana Jansens  <danakj@chromium.org>
3082
3083         [chromium] Some background filters require inflating damage on the surface behind them
3084         https://bugs.webkit.org/show_bug.cgi?id=84479
3085
3086         Reviewed by Adrienne Walker.
3087
3088         A layer with a background blur will expand the damage from pixels in the
3089         surface below it. We extend the damage tracker to expand damage in a
3090         surface below such layers.
3091
3092         Unit test: CCDamageTrackerTest.verifyDamageForBackgroundBlurredChild
3093
3094         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
3095         (WebCore::expandPixelOutsetsWithFilters):
3096         (WebCore):
3097         (WebCore::expandDamageRectInsideRectWithFilters):
3098         (WebCore::expandDamageRectWithFilters):
3099         (WebCore::CCDamageTracker::updateDamageTrackingState):
3100         (WebCore::CCDamageTracker::trackDamageFromActiveLayers):
3101         * platform/graphics/chromium/cc/CCDamageTracker.h:
3102         (CCDamageTracker):
3103
3104 2012-04-26  Simon Fraser  <simon.fraser@apple.com>
3105
3106         Improve compositing logging output
3107         https://bugs.webkit.org/show_bug.cgi?id=85010
3108
3109         Reviewed by Dean Jackson.
3110
3111         In the compositing log channel output, indent the layers
3112         based on z-order tree depth. Tabulate the summary, and
3113         show obligate and secondary backing store area separately.
3114
3115         * rendering/RenderLayer.cpp:
3116         (WebCore::RenderLayer::updateClipRects):
3117         * rendering/RenderLayerCompositor.cpp:
3118         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
3119         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3120         (WebCore::RenderLayerCompositor::logLayerInfo):
3121         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
3122         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
3123         (WebCore::RenderLayerCompositor::reasonForCompositing):
3124         * rendering/RenderLayerCompositor.h:
3125         (RenderLayerCompositor):
3126
3127 2012-04-26  Anders Carlsson  <andersca@apple.com>
3128
3129         REGRESSION (r115163): Unable to scroll article body with trackpad on altdevblogaday.com blog post
3130         https://bugs.webkit.org/show_bug.cgi?id=85024
3131         <rdar://problem/11330758>
3132
3133         Reviewed by Sam Weinig.
3134
3135         Fix broken logic in canHaveScrollbars.
3136
3137         * page/scrolling/ScrollingTreeNode.h:
3138         (WebCore::ScrollingTreeNode::canHaveScrollbars):
3139
3140 2012-04-24  James Robinson  <jamesr@chromium.org>
3141
3142         [chromium] Use different CCDrawQuad types for textures vs IOSurfaces
3143         https://bugs.webkit.org/show_bug.cgi?id=84811
3144
3145         Reviewed by Adrienne Walker.
3146
3147         IOSurface and texture backed layers share few properties (only the flipped bool), so it doesn't make a lot of
3148         sense for them to use the same CCDrawQuad type for both. This splits IOSurfaces out to a dedicated quad type to
3149         make it easier to understand which bits of state apply to each.
3150
3151         The logical next step after this is to split the layer type as well, but that will be awkward until bug 84808 is
3152         resolved.
3153
3154         * WebCore.gypi:
3155         * platform/graphics/chromium/LayerRendererChromium.cpp:
3156         (WebCore::LayerRendererChromium::drawQuad):
3157         (WebCore::LayerRendererChromium::drawTextureQuad):
3158         (WebCore):
3159         (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
3160         * platform/graphics/chromium/LayerRendererChromium.h:
3161         (LayerRendererChromium):
3162         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
3163         (WebCore::CCDrawQuad::toIOSurfaceDrawQuad):
3164         (WebCore):
3165         * platform/graphics/chromium/cc/CCDrawQuad.h:
3166         (WebCore):
3167         (CCDrawQuad):
3168         * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp: Copied from Source/WebCore/platform/graphics/chromium/cc/CCTextureDrawQuad.cpp.
3169         (WebCore):
3170         (WebCore::CCIOSurfaceDrawQuad::create):
3171         (WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad):
3172         * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCTextureDrawQuad.h.
3173         (WebCore):
3174         (CCIOSurfaceDrawQuad):
3175         (WebCore::CCIOSurfaceDrawQuad::flipped):
3176         (WebCore::CCIOSurfaceDrawQuad::ioSurfaceSize):
3177         (WebCore::CCIOSurfaceDrawQuad::ioSurfaceTextureId):
3178         * platform/graphics/chromium/cc/CCTextureDrawQuad.cpp:
3179         (WebCore::CCTextureDrawQuad::create):
3180         (WebCore::CCTextureDrawQuad::CCTextureDrawQuad):
3181         * platform/graphics/chromium/cc/CCTextureDrawQuad.h:
3182         (CCTextureDrawQuad):
3183         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
3184         (WebCore::CCTextureLayerImpl::appendQuads):
3185
3186 2012-04-26  Benjamin Poulain  <bpoulain@apple.com>
3187
3188         Use WebKit types for the cache of ObjcClass::methodsNamed()
3189         https://bugs.webkit.org/show_bug.cgi?id=85012
3190
3191         Reviewed by Geoffrey Garen.
3192
3193         This patch redefines the method cache ObjcClass to avoid memory allocations in the case of positive match.
3194
3195         Instead of using the converted name as the key, the original identifier string is used. This shortcuts
3196         all the other operations when there is a match.
3197
3198         A side effect is a method can appear multiple times in the cache if it is invoked with different names using
3199         the escape character "$". An attaquer could bloat the cache with a few hundreds strings.
3200         In the common case, having each name mapped is an improvment.
3201
3202         * bridge/objc/objc_class.h:
3203         (ObjcClass):
3204         * bridge/objc/objc_class.mm:
3205         (JSC::Bindings::ObjcClass::ObjcClass):
3206         (JSC::Bindings::ObjcClass::methodsNamed):
3207
3208 2012-04-26  Ojan Vafai  <ojan@chromium.org>
3209
3210         Delete dead code in Arena.h/cpp
3211         https://bugs.webkit.org/show_bug.cgi?id=84997
3212
3213         Reviewed by Eric Seidel.
3214
3215         Also cleaned up some style issues. Renamed some single-letter variable names.
3216         Avoided anything other than totally trivial style changes to be 100% sure
3217         that there is no change in behavior.
3218
3219         No new tests. There's no non-style code changes except inlining CLEAR_UNUSED
3220         and CLEAR_ARENA.
3221
3222         * platform/Arena.cpp:
3223         (WebCore):
3224         (WebCore::CeilingLog2):
3225         (WebCore::InitArenaPool):
3226         (WebCore::ArenaAllocate):
3227         (WebCore::FreeArenaList):
3228         (WebCore::FinishArenaPool):
3229         * platform/Arena.h:
3230         (WebCore):
3231
3232 2012-04-26  Shawn Singh  <shawnsingh@chromium.org>
3233
3234         Re-implement backFaceVisibility to avoid dealing with perspective w < 0 problem
3235         https://bugs.webkit.org/show_bug.cgi?id=84059
3236
3237         Reviewed by Adrienne Walker.
3238
3239         Unit tests added to CCMathUtilTest.cpp.
3240
3241         This patch changes the implementation of backFaceIsVisible so that
3242         it doesn't need to deal with the w < 0 problem from of perspective
3243         projections. Instead, it is equally correct to simply use the
3244         inverse-transpose of the matrix, and quickly check the third row,
3245         third column element. Additionally, it was appropriate to move
3246         this function into TransformationMatrix itself.
3247
3248         Making this change fixes some issues related to disappearing
3249         layers in Chromium (where the compositor incorrectly thought that
3250         the back face was visible, and skipped the layer).
3251
3252         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3253         (WebCore::calculateVisibleLayerRect):
3254         (WebCore::layerShouldBeSkipped):
3255         * platform/graphics/transforms/TransformationMatrix.cpp:
3256         (WebCore::TransformationMatrix::isBackFaceVisible):
3257         (WebCore):
3258         * platform/graphics/transforms/TransformationMatrix.h:
3259         (TransformationMatrix):
3260
3261 2012-04-26  Martin Robinson  <mrobinson@igalia.com>
3262
3263         [Cairo] Wrap cairo surfaces in a class when storing native images
3264         https://bugs.webkit.org/show_bug.cgi?id=83611
3265
3266         Reviewed by Alejandro G. Castro.
3267
3268         No new tests. This is just a refactoring. This shouldn't change
3269         functionality.
3270
3271         Added class that wraps Cairo images surfaces to serve as the "native image"
3272         type for the Cairo platform. This will allow the addition of caching resampled
3273         images as well as versions of the image for non-image Cairo backends. Also
3274         split out BitmapImageCairo.cpp from ImageCairo.cpp since these classes are
3275         defined in two headers.
3276
3277         * GNUmakefile.list.am: Added new files.
3278         * platform/graphics/BitmapImage.h: Added a factory method that takes an image surface to
3279         reduce code churn.
3280         * platform/graphics/ImageSource.h: NativeImagePtr is now NativeImageCairo*.
3281         (WebCore):
3282         * platform/graphics/cairo/BitmapImageCairo.cpp: Copied from Source/WebCore/platform/graphics/cairo/ImageCairo.cpp.
3283         * platform/graphics/cairo/GraphicsContext3DCairo.cpp: Updated to reflect use of NativeImageCairo.
3284         * platform/graphics/cairo/ImageCairo.cpp: Ditto.
3285         * platform/graphics/cairo/NativeImageCairo.cpp: Added.
3286         * platform/graphics/cairo/NativeImageCairo.h: Added.
3287         * platform/graphics/cairo/PatternCairo.cpp: Updated to reflect use of NativeImageCairo.
3288         * platform/graphics/gtk/ImageGtk.cpp: Ditto.
3289         * platform/image-decoders/cairo/ImageDecoderCairo.cpp: Ditto.
3290
3291 2012-04-26  Mark Hahnenberg  <mhahnenberg@apple.com>
3292
3293         [GTK] Massive media tests failures since r115288
3294         https://bugs.webkit.org/show_bug.cgi?id=84950
3295
3296         Reviewed by Filip Pizlo.
3297
3298         No new tests.
3299
3300         Since the "cross-platform" WebCore timer is at too high of a level in terms of the layers 
3301         of WebKit for JSC to use, we are not currently able to use it in JSC, thus only those 
3302         platforms that support CoreFoundation can currently take advantage of the new and improved 
3303         GC activity timer. We've restored the old code paths for those platforms that don't have 
3304         CF so that they will at least have the same behavior as before when calling garbageCollectSoon.
3305
3306         * bindings/js/GCController.cpp: Added back the old WebCore timer along with some 
3307         if-defs that do away with the WebCore timer on platforms that support CoreFoundation.
3308         (WebCore::GCController::GCController):
3309         (WebCore::GCController::garbageCollectSoon):
3310         (WebCore):
3311         (WebCore::GCController::gcTimerFired):
3312         * bindings/js/GCController.h: Ditto.
3313         (GCController):
3314
3315 2012-04-26  Adam Klein  <adamk@chromium.org>
3316
3317         Don't include V8Proxy.h in ScriptValue.h when V8GCController is all that's required
3318         https://bugs.webkit.org/show_bug.cgi?id=84986
3319
3320         Reviewed by Kentaro Hara.
3321
3322         This makes it easier to include ScriptValue.h since it greatly reduces
3323         that header's dependencies.
3324
3325         * bindings/v8/ScriptValue.h: Changed to include just V8GCController.h and
3326         removed comment which is redundant with explicit V8GCController references nearby.
3327
3328 2012-04-26  Aaron Colwell  <acolwell@chromium.org>
3329
3330         Fix missing sourceState change on MEDIA_ERR_SOURCE_NOT_SUPPORTED error.
3331         https://bugs.webkit.org/show_bug.cgi?id=84996
3332
3333         Reviewed by Eric Carlson.
3334
3335         No new tests. http/tests/media/media-source/webm/video-media-source-errors.html was updated to verify that webkitSourceState is always SOURCE_CLOSED when the onerror event fires.
3336
3337         * html/HTMLMediaElement.cpp:
3338         (WebCore::HTMLMediaElement::noneSupported):
3339
3340 2012-04-26  Antti Koivisto  <antti@apple.com>
3341
3342         Cache parsed stylesheets
3343         https://bugs.webkit.org/show_bug.cgi?id=85004
3344
3345         Reviewed by Andreas Kling.
3346
3347         CSS parsing is 1-2% of WebKit CPU usage on average pages, more on sites with large stylesheets.
3348         We currently reparse all stylesheets from source text when they are encountered again. In many
3349         browsing scenarios we can eliminate lot of this by caching the parsed stylesheets. For example 
3350         it is very common for subpages of a site to share the stylesheets.
3351         
3352         This patch enables memory caching for stylesheet loaded using the <link> element. Only stylesheets
3353         that have no import rules are cacheable for now.
3354         
3355         Cached stylesheets are copied on restore so there is no sharing (and no memory wins) yet.
3356         In the future we will also be able to share the actual data structures between pages for 
3357         significant memory savings.
3358         
3359         After browsing around for a while <5% of the memory cache data was in parsed stylesheets so this
3360         does not bloat the cache significantly.
3361
3362         * css/CSSStyleSheet.cpp:
3363         (WebCore):
3364         (WebCore::StyleSheetInternal::estimatedSizeInBytes):
3365         
3366             Estimate stylesheet size so we can handle decoded data pruning correctly.
3367
3368         * css/CSSStyleSheet.h:
3369         (StyleSheetInternal):
3370         * css/StylePropertySet.cpp:
3371         (WebCore::StylePropertySet::averageSizeInBytes):
3372         (WebCore):
3373         * css/StylePropertySet.h:
3374         (StylePropertySet):
3375         * css/StyleRule.cpp:
3376         (WebCore::StyleRule::averageSizeInBytes):
3377         (WebCore):
3378         * css/StyleRule.h:
3379         (StyleRule):
3380         * html/HTMLLinkElement.cpp:
3381         (WebCore::HTMLLinkElement::setCSSStyleSheet):
3382         
3383             Save and restore parsed stylesheet. The current CSS parse context must be identical to the cached 
3384             stylesheets. This ensures that the parsing results would be identical.
3385
3386         * loader/cache/CachedCSSStyleSheet.cpp:
3387         (WebCore):
3388         (WebCore::CachedCSSStyleSheet::destroyDecodedData):
3389         (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
3390         (WebCore::CachedCSSStyleSheet::saveParsedStyleSheet):
3391         * loader/cache/CachedCSSStyleSheet.h:
3392         
3393             The parsed stylesheet cache is considered decoded data, similar to the image bitmaps. It uses the
3394             same mechanism for pruning.
3395
3396         (WebCore):
3397         (CachedCSSStyleSheet):
3398
3399 2012-04-26  Anders Carlsson  <andersca@apple.com>
3400
3401         A TileCache should never outlive its WebTileCacheLayer
3402         https://bugs.webkit.org/show_bug.cgi?id=85008
3403         <rdar://problem/11141172>
3404
3405         Reviewed by Andreas Kling.
3406
3407         Since WebTileCacheLayer objects can be destroyed on the scrolling thread, make sure to delete the TileCache layer
3408         when the PlatformCALayer is destroyed. This fixes a crash when the tile revalidation timer fires after the WebTileCacheLayer has
3409         been destroyed, but before the TileCache itself has been destroyed.
3410
3411         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3412         (PlatformCALayer::~PlatformCALayer):
3413         * platform/graphics/ca/mac/WebTileCacheLayer.h:
3414         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
3415         (-[WebTileCacheLayer dealloc]):
3416         (-[WebTileCacheLayer invalidate]):
3417
3418 2012-04-26  Benjamin Poulain  <bpoulain@apple.com>
3419
3420         Use String instead of RefPtr<StringImpl> for the cache of ObjcClass
3421         https://bugs.webkit.org/show_bug.cgi?id=84932
3422
3423         Reviewed by Andreas Kling.
3424
3425         The cache with RefPtr<StringImpl*> was added with r115007.
3426
3427         This patch aims at making the code a little easier to read. By using String,
3428         one would not need to know the Traits for StringImpl.
3429
3430         * bridge/objc/objc_class.h:
3431         (ObjcClass):
3432
3433 2012-04-26  Kentaro Hara  <haraken@chromium.org>
3434
3435         [V8] Pass Isolate to wrap() in SerializedScriptValue.cpp
3436         https://bugs.webkit.org/show_bug.cgi?id=84923
3437
3438         Reviewed by Nate Chapin.
3439
3440         The objective is to pass Isolate around in V8 bindings.
3441         In this bug we pass Isolate to wrap() in SerializedScriptValue.cpp.
3442
3443         No tests. No change in behavior.
3444
3445         * bindings/v8/SerializedScriptValue.cpp:
3446
3447 2012-04-26  Hao Zheng  <zhenghao@chromium.org>
3448
3449         [chromium] Complex text support for Android.
3450         https://bugs.webkit.org/show_bug.cgi?id=84431
3451
3452         Complex text support is different on Android from other platforms.
3453         There are 2 kinds of font on Android: system fonts and fallback fonts.
3454         System fonts have a name, and are accessible in FontPlatformData.
3455         Fallback fonts do not have specific names, so they are not accessible
3456         from WebKit directly. There is one font for each script support.
3457         To feed Harfbuzz, use a trick to get correct SkTypeface based on script.
3458
3459         Reviewed by Tony Chang.
3460
3461         No new tests. Current tests are runnable on Android.
3462
3463         * platform/graphics/FontCache.h:
3464         (FontCache): Make ComplexTextController friend of FontCache on Android.
3465         * platform/graphics/chromium/FontCacheAndroid.cpp:
3466         (WebCore::FontCache::createFontPlatformData):
3467         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
3468         (WebCore::ComplexTextController::getComplexFontPlatformData):
3469         (WebCore):
3470         (WebCore::ComplexTextController::setupFontForScriptRun):
3471         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h:
3472         (ComplexTextController):
3473
3474 2012-04-26  Kentaro Hara  <haraken@chromium.org>
3475
3476         [V8] Pass Isolate to wrap() (Part2)
3477         https://bugs.webkit.org/show_bug.cgi?id=84922
3478
3479         Reviewed by Nate Chapin.
3480
3481         The objective is to pass Isolate around in V8 bindings.
3482         This patch passes Isolate to wrap() in custom bindings.
3483
3484         No tests. No change in behavior.
3485
3486         * bindings/v8/custom/V8LocationCustom.cpp:
3487         (WebCore::toV8):
3488         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
3489         (WebCore::toV8):
3490         * bindings/v8/custom/V8SVGPathSegCustom.cpp:
3491         (WebCore::toV8):
3492         * bindings/v8/custom/V8StyleSheetCustom.cpp:
3493         (WebCore::toV8):
3494         * bindings/v8/custom/V8Uint16ArrayCustom.cpp:
3495         (WebCore::toV8):
3496         * bindings/v8/custom/V8Uint32ArrayCustom.cpp:
3497         (WebCore::toV8):
3498         * bindings/v8/custom/V8Uint8ArrayCustom.cpp:
3499         (WebCore::toV8):
3500         * bindings/v8/custom/V8Uint8ClampedArrayCustom.cpp:
3501         (WebCore::toV8):
3502
3503 2012-04-26  Jon Lee  <jonlee@apple.com>
3504
3505         [WK2] AlternativeTextClient leaks when the page is destroyed
3506         https://bugs.webkit.org/show_bug.cgi?id=84307
3507         <rdar://problem/11328431>
3508
3509         Reviewed by Enrica Casucci.
3510
3511         * page/AlternativeTextClient.h: Add pageDestroyed() call, as in EditorClient.
3512         (AlternativeTextClient):
3513         * page/Page.cpp:
3514         (WebCore::Page::~Page): When the page is destroyed, notify the client if it exists.
3515
3516 2012-04-26  Kentaro Hara  <haraken@chromium.org>
3517
3518         [V8] Pass Isolate to wrap() (Part1)
3519         https://bugs.webkit.org/show_bug.cgi?id=84921
3520
3521         Reviewed by Nate Chapin.
3522
3523         The objective is to pass Isolate around in V8 bindings.
3524         This patch passes Isolate to wrap() in custom bindings.
3525
3526         No tests. No change in behavior.
3527
3528         * bindings/v8/custom/V8BlobCustom.cpp:
3529         (WebCore::toV8):
3530         * bindings/v8/custom/V8CSSRuleCustom.cpp:
3531         (WebCore::toV8):
3532         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp:
3533         (WebCore::toV8):
3534         * bindings/v8/custom/V8CSSValueCustom.cpp:
3535         (WebCore::toV8):
3536         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
3537         (WebCore::toV8):
3538         * bindings/v8/custom/V8DOMTokenListCustom.cpp:
3539         (WebCore::toV8):
3540         * bindings/v8/custom/V8DataViewCustom.cpp:
3541         (WebCore::toV8):
3542         * bindings/v8/custom/V8EventCustom.cpp:
3543         (WebCore::toV8):
3544         * bindings/v8/custom/V8Float32ArrayCustom.cpp:
3545         (WebCore::toV8):
3546         * bindings/v8/custom/V8Float64ArrayCustom.cpp:
3547         (WebCore::toV8):
3548         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
3549         (WebCore::toV8):
3550         * bindings/v8/custom/V8ImageDataCustom.cpp:
3551         (WebCore::toV8):
3552         * bindings/v8/custom/V8Int16ArrayCustom.cpp:
3553         (WebCore::toV8):
3554         * bindings/v8/custom/V8Int32ArrayCustom.cpp:
3555         (WebCore::toV8):
3556         * bindings/v8/custom/V8Int8ArrayCustom.cpp:
3557         (WebCore::toV8):
3558
3559 2012-04-26  Benjamin Poulain  <bpoulain@apple.com>
3560
3561         ObjcClass::methodsNamed() can leak if buffer is dynamically allocated
3562         https://bugs.webkit.org/show_bug.cgi?id=84668
3563
3564         Reviewed by Alexey Proskuryakov.
3565
3566         Change ObjcClass::methodsNamed() to be based on a vector instead of managing
3567         the memory manually.
3568
3569         Tests: platform/mac/plugins/bindings-objc-long-method-name.html
3570                platform/mac/plugins/bindings-objc-method-name-conversion.html
3571
3572         * bridge/objc/objc_class.mm:
3573         (Bindings):
3574         (JSC::Bindings::convertJSMethodNameToObjc):
3575         (JSC::Bindings::ObjcClass::methodsNamed):
3576
3577 2012-04-26  Justin Novosad  <junov@chromium.org>
3578
3579         [Chromium] Single buffered canvas layers with the threaded compositor
3580         https://bugs.webkit.org/show_bug.cgi?id=80540
3581
3582         Reviewed by James Robinson.
3583
3584         Tests:
3585         CCLayerTreeHostTestWriteLayersRedraw
3586         CCLayerTreeHostTestWriteLayersAfterVisible
3587         Canvas2DLayerChromiumTest.testFullLifecycleSingleThreadDeferred
3588         Canvas2DLayerChromiumTest.testFullLifecycleThreadDeferred
3589         CCSchedulerTest.VisibilitySwitchWithTextureAcquisition
3590         CCSchedulerTest.TextureAcquisitionCollision
3591
3592         Disable double buffering and rate limiting on accelerated canvas
3593         when the threaded compositor and deferred canvas are enabled.
3594         Concurrent access to the layer texture by the main renderer thread and
3595         the compositor thread is avoided by enforcing a lock. The state of the
3596         lock is maintained by CCSchedulerStateMachine. Write access by the main
3597         thread is acquired through a signal round trip to the compositor thread,
3598         which may block the main thread in the event that one or more committed
3599         layers need to be protected until the compositor completes the requested
3600         draw. Draws on the impl thread are cancelled if the main thread has
3601         obtained write access to the texture.  The write access is relinquished
3602         by the main thread upon commit completion.  The scheduler state machine
3603         is responsible for preventing the texture lock from causing deadlocks by
3604         detecting and resolving problematic states.
3605
3606         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
3607         (WebCore::Canvas2DLayerChromium::create):
3608         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
3609         (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium):
3610         (WebCore::Canvas2DLayerChromium::drawingIntoImplThreadTexture):
3611         (WebCore):
3612         (WebCore::Canvas2DLayerChromium::setTextureId):
3613         (WebCore::Canvas2DLayerChromium::setNeedsDisplayRect):
3614         (WebCore::Canvas2DLayerChromium::update):
3615         (WebCore::Canvas2DLayerChromium::layerWillDraw):
3616         (WebCore::Canvas2DLayerChromium::pushPropertiesTo):
3617         * platform/graphics/chromium/Canvas2DLayerChromium.h:
3618         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3619         (WebCore::CCLayerTreeHost::acquireLayerTextures):
3620         (WebCore):
3621         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3622         (CCLayerTreeHost):
3623         * platform/graphics/chromium/cc/CCProxy.h:
3624         (CCProxy):
3625         * platform/graphics/chromium/cc/CCScheduler.cpp:
3626         (WebCore::CCScheduler::setMainThreadNeedsLayerTextures):
3627         (WebCore):
3628         (WebCore::CCScheduler::processScheduledActions):
3629         * platform/graphics/chromium/cc/CCScheduler.h:
3630         (CCSchedulerClient):
3631         (CCScheduler):
3632         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
3633         (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
3634         (WebCore::CCSchedulerStateMachine::drawSuspendedUntilCommit):
3635         (WebCore):
3636         (WebCore::CCSchedulerStateMachine::scheduledToDraw):
3637         (WebCore::CCSchedulerStateMachine::shouldDraw):
3638         (WebCore::CCSchedulerStateMachine::shouldAcquireLayerTexturesForMainThread):
3639         (WebCore::CCSchedulerStateMachine::nextAction):
3640         (WebCore::CCSchedulerStateMachine::updateState):
3641         (WebCore::CCSchedulerStateMachine::setMainThreadNeedsLayerTextures):
3642         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
3643         (CCSchedulerStateMachine):
3644         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
3645         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3646         (WebCore::CCThreadProxy::CCThreadProxy):
3647         (WebCore::CCThreadProxy::beginFrame):
3648         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
3649         (WebCore):
3650         (WebCore::CCThreadProxy::acquireLayerTextures):
3651         (WebCore::CCThreadProxy::acquireLayerTexturesForMainThreadOnImplThread):
3652         (WebCore::CCThreadProxy::scheduledActionAcquireLayerTexturesForMainThread):
3653         * platform/graphics/chromium/cc/CCThreadProxy.h:
3654         (CCThreadProxy):
3655         * platform/graphics/skia/ImageBufferSkia.cpp:
3656         (WebCore):
3657         (WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext):
3658         (WebCore::AcceleratedDeviceContext::prepareForDraw):
3659         (AcceleratedDeviceContext):
3660         (WebCore::createAcceleratedCanvas):
3661         (WebCore::ImageBuffer::context):
3662
3663 2012-04-26  Kentaro Hara  <haraken@chromium.org>
3664
3665         [V8] Pass Isolate to toV8() in SerializedScriptValue.cpp
3666         https://bugs.webkit.org/show_bug.cgi?id=84918
3667
3668         Reviewed by Nate Chapin.
3669
3670         This is the last step to pass Isolate around in
3671         SerializedScriptValue.cpp. This patch passes Isolate
3672         to toV8().
3673
3674         No tests. No change in behavior.
3675
3676         * bindings/v8/SerializedScriptValue.cpp:
3677
3678 2012-04-26  Kentaro Hara  <haraken@chromium.org>
3679
3680         [V8] Pass Isolate to wrapSlow()
3681         https://bugs.webkit.org/show_bug.cgi?id=84919
3682
3683         Reviewed by Nate Chapin.
3684
3685         The objective is to pass Isolate around in V8 bindings.
3686         In this bug, we pass Isolate to wrapSlow().
3687
3688         Test: bindings/scripts/test/TestObj.idl etc
3689
3690         * bindings/scripts/CodeGeneratorV8.pm: Modified as described above.
3691         (GenerateHeader):
3692         (GenerateToV8Converters):
3693
3694         * bindings/scripts/test/V8/V8Float64Array.cpp: Updated run-bindings-tests.
3695         (WebCore::V8Float64Array::wrapSlow):
3696         * bindings/scripts/test/V8/V8Float64Array.h:
3697         (V8Float64Array):
3698         (WebCore::V8Float64Array::wrap):
3699         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3700         (WebCore::V8TestActiveDOMObject::wrapSlow):
3701         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
3702         (V8TestActiveDOMObject):
3703         (WebCore::V8TestActiveDOMObject::wrap):
3704         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3705         (WebCore::V8TestCustomNamedGetter::wrapSlow):
3706         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
3707         (V8TestCustomNamedGetter):
3708         (WebCore::V8TestCustomNamedGetter::wrap):
3709         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3710         (WebCore::V8TestEventConstructor::wrapSlow):
3711         * bindings/scripts/test/V8/V8TestEventConstructor.h:
3712         (V8TestEventConstructor):
3713         (WebCore::V8TestEventConstructor::wrap):
3714         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3715         (WebCore::V8TestEventTarget::wrapSlow):
3716         * bindings/scripts/test/V8/V8TestEventTarget.h:
3717         (V8TestEventTarget):
3718         (WebCore::V8TestEventTarget::wrap):
3719         * bindings/scripts/test/V8/V8TestInterface.cpp:
3720         (WebCore::V8TestInterface::wrapSlow):
3721         * bindings/scripts/test/V8/V8TestInterface.h:
3722         (V8TestInterface):
3723         (WebCore::V8TestInterface::wrap):
3724         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3725         (WebCore::V8TestMediaQueryListListener::wrapSlow):
3726         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
3727         (V8TestMediaQueryListListener):
3728         (WebCore::V8TestMediaQueryListListener::wrap):
3729         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3730         (WebCore::V8TestNamedConstructor::wrapSlow):
3731         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
3732         (V8TestNamedConstructor):
3733         (WebCore::V8TestNamedConstructor::wrap):
3734         * bindings/scripts/test/V8/V8TestNode.cpp:
3735         (WebCore::V8TestNode::wrapSlow):
3736         * bindings/scripts/test/V8/V8TestNode.h:
3737         (V8TestNode):
3738         (WebCore::V8TestNode::wrap):
3739         * bindings/scripts/test/V8/V8TestObj.cpp:
3740         (WebCore::V8TestObj::wrapSlow):
3741         * bindings/scripts/test/V8/V8TestObj.h:
3742         (V8TestObj):
3743         (WebCore::V8TestObj::wrap):
3744         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3745         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
3746         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
3747         (V8TestSerializedScriptValueInterface):
3748         (WebCore::V8TestSerializedScriptValueInterface::wrap):
3749
3750 2012-04-25  Antonio Gomes  <agomes@rim.com>
3751
3752         Add ScrollAnimatorBlackBerry as an extension to ScrollAnimatorNone
3753         https://bugs.webkit.org/show_bug.cgi?id=84625
3754
3755         Reviewed by Anders Carlsson.
3756
3757         Patch adds ScrollAnimatorBlackBerry class as an extension to of
3758         ScrollAnimatorNone. The main goal here is extending the later to allow
3759         overscrolling while the animation runs.
3760
3761         Once the animation finishes, the flag gets reseted and
3762         ScrollableArea::constrainsScrollingtoContentEdge is set back to the value
3763         it had before, so this method has to be explicitly called anytime it is wanted.
3764
3765         * CMakeLists.txt:
3766         * platform/ScrollAnimator.h:
3767         (WebCore::ScrollAnimator::animationWillStart):
3768         (WebCore::ScrollAnimator::animationDidFinish):
3769         (ScrollAnimator):
3770         * platform/ScrollAnimatorNone.cpp:
3771         (WebCore):
3772         (WebCore::ScrollAnimatorNone::scroll):
3773         (WebCore::ScrollAnimatorNone::animationTimerFired):
3774         * platform/blackberry/ScrollAnimatorBlackBerry.cpp: Added.
3775         (WebCore):
3776         (WebCore::ScrollAnimator::create):
3777         (WebCore::ScrollAnimatorBlackBerry::ScrollAnimatorBlackBerry):
3778         (WebCore::ScrollAnimatorBlackBerry::animationWillStart):
3779         (WebCore::ScrollAnimatorBlackBerry::animationDidFinish):
3780         (WebCore::ScrollAnimatorBlackBerry::setDisableConstrainsScrollingToContentEdgeWhileAnimating):
3781         * platform/blackberry/ScrollAnimatorBlackBerry.h: Added.
3782         (WebCore):
3783         (ScrollAnimatorBlackBerry):
3784
3785 2012-04-26  Antonio Gomes  <agomes@rim.com>
3786
3787         [BlackBerry] Add smooth_scrolling options to CMAKE and enable it for Blackberry
3788         https://bugs.webkit.org/show_bug.cgi?id=84954
3789
3790         Reviewed by Daniel Bates.
3791
3792         Add the default scroll animator to the build system (ScrollAnimatorNone.cpp)
3793
3794         * CMakeLists.txt:
3795
3796 2012-04-25  Antonio Gomes  <agomes@rim.com>
3797
3798         Make ScrollView::scrollSize scrollbar-independent
3799         https://bugs.webkit.org/show_bug.cgi?id=84873
3800
3801         Reviewed by Anders Carlsson.
3802
3803         For ports that disable scrollbars creation at FrameView creation time
3804         ScrollView::scrollSize should still return the scrollable ammount of
3805         content (if any) if scrolling is not prohibted.
3806
3807         No new test, but it makes ScrollAnimator work for the BlackBerry port.
3808
3809         * platform/ScrollView.cpp:
3810         (WebCore::ScrollView::scrollSize):
3811
3812 2012-04-25  Anders Carlsson  <andersca@apple.com>
3813
3814         The tile cache should know if a frame view can ever have scrollbars
3815         https://bugs.webkit.org/show_bug.cgi?id=84888
3816
3817         Reviewed by Andreas Kling.
3818
3819         If a frame view has overflow: hidden on its body element we know that the document will most
3820         likely never be scrolled. The tile cache should know about this so we can optimize.
3821
3822         * page/FrameView.cpp:
3823         (WebCore::FrameView::performPostLayoutTasks):
3824         * platform/graphics/TiledBacking.h:
3825         (TiledBacking):
3826         * platform/graphics/ca/mac/TileCache.h:
3827         (TileCache):
3828         * platform/graphics/ca/mac/TileCache.mm:
3829         (WebCore::TileCache::TileCache):
3830         (WebCore::TileCache::setCanHaveScrollbars):
3831         (WebCore):
3832         * rendering/RenderLayerBacking.cpp:
3833         (WebCore::RenderLayerBacking::RenderLayerBacking):
3834
3835 2012-04-26  Ken Buchanan  <kenrb@chromium.org>
3836
3837         Crash from removal of line break object after layout
3838         https://bugs.webkit.org/show_bug.cgi?id=75461
3839
3840         Reviewed by David Hyatt.
3841
3842         There is a condition where objects can get removed from underneath
3843         inlines while they represent a line break object in a RootInlineBox
3844         of an ancestor block. If an intermediary inline has already been
3845         marked as needing layout, then the line box will not get dirtied
3846         because dirtyLineFromChangedChild thinks it already has been.
3847
3848         This patch introduces a new set in RenderObject to indicate whether
3849         an ancestral line box corresponding to the current line has been
3850         marked dirty or not. dirtyLinesFromChangedChild() can use this set 
3851         rather than m_selfNeedsLayout, so it will not be confused if a
3852         container was dirtied for some other reason that did not affect the
3853         line box.
3854
3855         * rendering/RenderLineBoxList.cpp:
3856         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Use the new
3857         set rather than m_selfNeedsLayout in the container to determine
3858         whether to continue propagating upward.
3859         * rendering/RenderObject.cpp:
3860         (WebCore::RenderObject::s_ancestorLineboxDirtySet): Instantiate the
3861         static member.
3862         (WebCore::RenderObject::willBeDestroyed): Clears the object from the
3863         linebox set when it is being destroyed.
3864         * rendering/RenderObject.h:
3865         (WebCore::RenderObject::s_ancestorLineboxDirtySet): Added static
3866         member set.
3867         (WebCore::RenderObject::setNeedsLayout): Clears the
3868         object from the linebox set when layout bits are getting cleared.
3869         (WebCore::RenderObject::ancestorLineBoxDirty): Added.
3870         (WebCore::RenderObject::setAncestorLineBoxDirty): Added.
3871
3872 2012-04-26  Christophe Dumez  <christophe.dumez@intel.com>
3873
3874         [EFL] Enable VIDEO_TRACK feature
3875         https://bugs.webkit.org/show_bug.cgi?id=84830
3876
3877         Reviewed by Gustavo Noronha Silva.
3878
3879         Enable support for VIDEO_TRACK feature by default for EFL port.
3880
3881         * UseJSC.cmake:
3882         * bindings/generic/RuntimeEnabledFeatures.cpp:
3883         (WebCore):
3884
3885 2012-04-26  Antti Koivisto  <antti@apple.com>
3886
3887         Implement StyleSheetInternal copying
3888         https://bugs.webkit.org/show_bug.cgi?id=84969
3889
3890         Reviewed by Andreas Kling.
3891
3892         We need to be able to copy stylesheets to cache them. Copying is already implement for
3893         most of the stylesheet data types but StyleSheetInternal::copy() is still missing.
3894         
3895         Preparation for stylesheet caching. The copying code is not used yet.
3896
3897         * css/CSSNamespace.h:
3898         
3899             Instead of making it copyable, remove CSSNamespace class.
3900     
3901         * css/CSSParser.cpp:
3902         (WebCore::operator==):
3903         (WebCore):
3904         (WebCore::CSSParser::addNamespace):
3905         
3906             Avoid ping-ponging to StyleSheetInternal and back to set the default namespace.
3907
3908         * css/CSSParserMode.h:
3909         (WebCore):
3910         (WebCore::operator!=):
3911
3912             Add equality comparison operator to CSSParseMode. This will be needed to determine
3913             if a cached copy can be used.
3914             
3915         * css/CSSStyleSheet.cpp:
3916         (WebCore::StyleSheetInternal::StyleSheetInternal):
3917         (WebCore):
3918         (WebCore::StyleSheetInternal::isCacheable):
3919         (WebCore::StyleSheetInternal::parserAddNamespace):
3920         (WebCore::StyleSheetInternal::determineNamespace):
3921         
3922             Use HashMap instead of iterating a linked list of CSSNamespaces.
3923
3924         (WebCore::StyleSheetInternal::styleSheetChanged):
3925         
3926             Add mutation bit.
3927
3928         * css/CSSStyleSheet.h:
3929         (WebCore):
3930         (StyleSheetInternal):
3931         (WebCore::StyleSheetInternal::copy):
3932         
3933             Copy constructor. It only usable for cacheable stylesheets.
3934
3935 2012-04-26  Philip Rogers  <pdr@google.com>
3936
3937         Fix Skia's SkPathContainsPoint to work with sub-pixel accuracy
3938         https://bugs.webkit.org/show_bug.cgi?id=84117
3939
3940         Reviewed by Eric Seidel.
3941
3942         Because we do hit testing in object-space (i.e., we may see a 0.1px*0.1px path) we
3943         need to support sub-pixel hit testing in Skia. Skia does not provide analytical
3944         path hit testing, so hit tests are done by rasterizing a path and checking if a
3945         specific pixel is drawn. SkPathContainsPoint did not work with sub-pixel values
3946         because this rasterization was sometimes very small which did not give enough
3947         resolution to check if the hit test pixel was drawn.
3948
3949         This patch scales the path to a very large size during hit testing so that Skia's
3950         raster-based hit testing will work properly. Because Skia avoids unnecessary
3951         path rasterization, this is actually inexpensive.
3952
3953         Below is a summary of a performance test on simple and complex paths:
3954                                                  (before patch, after patch)
3955         Skia/Chrome 10,000 hit tests on a simple path:  (229ms, 238ms)
3956         Skia/Chrome 10,000 hit tests on a complex path: (701ms, 704ms)
3957         For comparison, CG/Safari takes 236ms on the simple path and 466ms on the complex path.
3958  
3959         Therefore, this patch introduces small but measurable regression in hit testing
3960         performance due to scaling the path.
3961
3962         Test: svg/hittest/svg-small-path.xhtml
3963
3964         * platform/graphics/skia/SkiaUtils.cpp:
3965         (WebCore::SkPathContainsPoint):
3966
3967 2012-04-26  Sheriff Bot  <webkit.review.bot@gmail.com>
3968
3969         Unreviewed, rolling out r115323.
3970         http://trac.webkit.org/changeset/115323
3971         https://bugs.webkit.org/show_bug.cgi?id=84975
3972
3973         Bad test, breaks all builds (Requested by apavlov1 on
3974         #webkit).
3975
3976         * inspector/Inspector.json:
3977         * inspector/InspectorPageAgent.cpp:
3978         (WebCore::InspectorPageAgent::enable):
3979         (WebCore::InspectorPageAgent::disable):
3980         * inspector/InspectorPageAgent.h:
3981         * inspector/front-end/Settings.js:
3982         * inspector/front-end/SettingsScreen.js:
3983         (WebInspector.SettingsScreen):
3984         * inspector/front-end/inspector.js:
3985
3986 2012-04-26  Douglas Stockwell  <dstockwell@chromium.org>
3987
3988         IndexedDB: cursor does not correctly iterate over keys added and removed during iteration
3989         https://bugs.webkit.org/show_bug.cgi?id=84467
3990
3991         Reviewed by Ojan Vafai.
3992
3993         Ensure that the iterator over the tree of cached adds/removes always points at
3994         the current key, or if the db iterator is current, the next key:
3995         
3996         - When refreshing the tree iterator after a mutation, always seek unless the
3997         tree iterator is current.
3998         
3999         - When handing conflicts and delete markers, only advance the tree iterator as
4000         far as the db iterator.
4001         
4002         Remove the expensive (and now redundant) logic that issued a get() to check
4003         whether an item had been deleted.
4004
4005         Test: storage/indexeddb/cursor-added-bug.html
4006
4007         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
4008         (WebCore):
4009         * platform/leveldb/LevelDBTransaction.cpp:
4010         (WebCore::LevelDBTransaction::TransactionIterator::refreshTreeIterator):
4011         (WebCore::LevelDBTransaction::TransactionIterator::handleConflictsAndDeletes):
4012
4013 2012-04-26  Alexander Pavlov  <apavlov@chromium.org>
4014
4015         Web Inspector: Implement the "Disable JavaScript" option in the settings dialog
4016         https://bugs.webkit.org/show_bug.cgi?id=84946
4017
4018         Based on user actions in the Inspector frontend, InspectorPageAgent invokes Settings::setScriptEnabled()
4019         for the associated page to switch the script execution therein.
4020