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