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