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