1 2012-05-01 James Simonsen <simonjam@chromium.org>
3 Ensure HTMLElementStack fails gracefully if it has a non-Element.
4 https://bugs.webkit.org/show_bug.cgi?id=85167
6 Reviewed by Adam Barth.
8 Test: Added to html5lib/resources/webkit02.dat
10 * html/parser/HTMLElementStack.cpp:
11 (WebCore::HTMLElementStack::oneBelowTop):
12 * html/parser/HTMLTreeBuilder.cpp:
13 (WebCore::HTMLTreeBuilder::processEndTag):
15 2012-05-01 Ryosuke Niwa <rniwa@webkit.org>
17 *Command.h files shouldn't be exported to WebKit layer
18 https://bugs.webkit.org/show_bug.cgi?id=74778
20 Reviewed by Eric Seidel.
22 Remove the dependency on *Command.h files from Mac port's WebKit layer.
23 Also wrapped the call to TypingCommand::insertParagraphSeparatorInQuotedContent in the Editor class
24 so that we can just expose Editor's method instead of directly exposing the said static method.
27 * WebCore.xcodeproj/project.pbxproj:
30 * editing/mac/EditorMac.mm:
31 (WebCore::Editor::insertParagraphSeparatorInQuotedContent):
34 2012-05-01 Julien Chaffraix <jchaffraix@webkit.org>
36 Remove one bit from m_column to pack RenderTableCell bits more
37 https://bugs.webkit.org/show_bug.cgi?id=85291
39 Reviewed by Ojan Vafai.
41 Memory improvement, covered by the existing unit tests.
43 * rendering/RenderTableCell.cpp:
44 * rendering/RenderTableCell.h:
45 Remove one bit from m_column (which should be fine as I wouldn't expect tables above 1 millions
46 columns to render at all anyway) to pack the bitfields in 32 bits. Re-arranged the bits to have the bigger
49 2012-05-01 Anders Carlsson <andersca@apple.com>
51 Slow scrolling on www.sholby.net
52 https://bugs.webkit.org/show_bug.cgi?id=85304
53 <rdar://problem/11138952>
55 Reviewed by Beth Dakin.
57 Fix two performance issues that showed up on the profiles.
59 * loader/FrameLoader.cpp:
60 (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
61 Reset the relevant painted object counter; it's only interesting when loading.
64 (WebCore::Page::startCountingRelevantRepaintedObjects):
65 Set m_isCountingRelevantRepaintedObjects to true after calling reset, since reset now sets it to false.
67 (WebCore::Page::resetRelevantPaintedObjectCounter):
68 Set m_isCountingRelevantRepaintedObjects to false.
70 (WebCore::Page::addRelevantRepaintedObject):
71 Use HashSet::find to avoid an extra hash lookup.
73 * page/scrolling/ScrollingCoordinator.cpp:
74 (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
75 Remove the call to FrameView::updateCompositingLayersAfterLayout now, since FrameView::notifyScrollPositionChanged
76 already calls this and was making us to a lot of work twice.
78 2012-05-01 Silvia Pfeiffer <silviapf@chromium.org>
80 Audio controls have a 1px surplus outline coming from RenderImage::paintReplaced base class,
81 which needs overwriting.
82 https://bugs.webkit.org/show_bug.cgi?id=84570
84 Reviewed by Eric Carlson.
86 No new tests - covered by existing audio rendering tests.
88 * rendering/RenderMedia.cpp:
89 (WebCore::RenderMedia::paintReplaced): Overwrite inherited function.
91 * rendering/RenderMedia.h:
94 2012-05-01 Terry Anderson <tdanderson@chromium.org>
96 Allow a pre-targeted node to be specified when dispatching a GestureTap event
97 https://bugs.webkit.org/show_bug.cgi?id=85296
99 Reviewed by Adam Barth.
101 https://bugs.webkit.org/show_bug.cgi?id=85101
102 The new parameter will be used and tested in this patch.
104 * page/EventHandler.cpp:
105 (WebCore::EventHandler::handleGestureTap):
106 The new preTargetedNode parameter can be used to pass in the Node that is
107 the target of the GestureTap event. If this parameter is used, adjustedPoint
108 is changed to be the center of the Node's bounding rectangle.
109 * page/EventHandler.h:
112 2012-05-01 Jessie Berlin <jberlin@apple.com>
114 Crash calling disconnectFrame on a DOMWindowExtension a second time.
115 https://bugs.webkit.org/show_bug.cgi?id=85301
117 Reviewed by Darin Adler.
119 DOMWindowExtension::disconnectFrame assumed it would only be called when there was a frame
120 to disconnect. However, DOMWindow's destructor invokes disconnectFrame on all its
121 DOMWindowProperties, even if it already did so when it entered the page cache.
123 * page/DOMWindowExtension.cpp:
124 (WebCore::DOMWindowExtension::disconnectFrame):
125 Don't do anything if the frame has already been disconnected.
127 2012-05-01 Aaron Colwell <acolwell@chromium.org>
129 Temporarily remove webkitSourceAddId() & webkitSourceRemoveId() from DOM
130 until the rest of the Media Source v0.5 methods are implemented. This is
131 to prevent ambiguity about whether v0.5 is fully supported or not.
132 https://bugs.webkit.org/show_bug.cgi?id=85295
134 Reviewed by Eric Carlson.
136 No new tests. Removing methods from DOM so relevant tests are removed.
138 * html/HTMLMediaElement.idl:
140 2012-05-01 Douglas Stockwell <dstockwell@chromium.org>
142 IndexedDB: stale index entries may not be removed in some cases
143 https://bugs.webkit.org/show_bug.cgi?id=85224
145 Reviewed by Ojan Vafai.
147 Ensure that stale index entries are removed when the corresponding
148 object store entry no longer exists.
150 No new tests. Addresses a performance / storage leak that is
151 not amenable to verification in a layout test.
153 * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
156 2012-05-01 Igor Oliveira <igor.o@sisa.samsung.com>
158 Use HashMap<OwnPtr> for CounterMap in RenderCounter
159 https://bugs.webkit.org/show_bug.cgi?id=85294
161 Reviewed by Eric Seidel.
163 * rendering/RenderCounter.cpp:
165 (WebCore::makeCounterNode):
166 (WebCore::RenderCounter::destroyCounterNodes):
168 2012-05-01 Philip Rogers <pdr@google.com>
170 Skip building instance tree for disallowed target
171 https://bugs.webkit.org/show_bug.cgi?id=85202
173 Reviewed by Nikolas Zimmermann.
175 When the target of a use is disallowed (e.g., a mask element) we can
176 skip building the instance tree because the shadow tree will be
179 Test: svg/custom/animate-disallowed-mask-element.svg
181 * svg/SVGUseElement.cpp:
182 (WebCore::SVGUseElement::buildInstanceTree):
184 2012-04-29 Nikolas Zimmermann <nzimmermann@rim.com>
186 Accumulation for values-animation is broken
187 https://bugs.webkit.org/show_bug.cgi?id=85158
189 Reviewed by Darin Adler.
192 <rect width="999" height="100" fill="green"/>
193 <animate begin="0s" values="0; 30; 20" accumulate="sum" repeatCount="5" dur="2s"/>
196 The rect should animate like this:
202 2.000s -> 20 (first accumulation, starts accumulating from the last set value, here '20').
207 4.000s -> 40 (second accumulation)
210 This is currently broken for values-animation. The accumulation should happen after a full cycle of the values animation ran (aka. at the end of the duration).
211 A values animation works like this: iterate over the list of values, and calculate a 'from' and 'to' value for a given time. Example for values="0; 30; 20" dur="2s":
212 - 0.0s .. 1.0s -> from=0, to=30
213 - 1.0s .. 2.0s -> from=30, to=20
215 Accumulation currently is taken into account at each interval for a values-animation instead of the end of the cycle. Fix that
216 by passing an additional 'toAtEndOfDuration' type to calculateAnimatedValue() which is used for accumulation instead of the
219 Test: svg/animations/accumulate-values-width-animation.html
221 * svg/SVGAnimateElement.cpp:
222 (WebCore::SVGAnimateElement::calculateAnimatedValue):
223 * svg/SVGAnimateElement.h:
225 * svg/SVGAnimateMotionElement.cpp:
226 (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
227 * svg/SVGAnimateMotionElement.h:
228 (SVGAnimateMotionElement):
229 * svg/SVGAnimatedAngle.cpp:
230 (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
231 * svg/SVGAnimatedAngle.h:
232 (SVGAnimatedAngleAnimator):
233 * svg/SVGAnimatedBoolean.cpp:
234 (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
235 * svg/SVGAnimatedBoolean.h:
236 (SVGAnimatedBooleanAnimator):
237 * svg/SVGAnimatedColor.cpp:
238 (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
239 * svg/SVGAnimatedColor.h:
240 (SVGAnimatedColorAnimator):
241 * svg/SVGAnimatedEnumeration.cpp:
242 (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue):
243 * svg/SVGAnimatedEnumeration.h:
244 (SVGAnimatedEnumerationAnimator):
245 * svg/SVGAnimatedInteger.cpp:
246 (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger):
247 (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
248 * svg/SVGAnimatedInteger.h:
249 (SVGAnimatedIntegerAnimator):
250 * svg/SVGAnimatedIntegerOptionalInteger.cpp:
251 (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
252 * svg/SVGAnimatedIntegerOptionalInteger.h:
253 (SVGAnimatedIntegerOptionalIntegerAnimator):
254 * svg/SVGAnimatedLength.cpp:
255 (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
256 * svg/SVGAnimatedLength.h:
257 (SVGAnimatedLengthAnimator):
258 * svg/SVGAnimatedLengthList.cpp:
259 (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
260 * svg/SVGAnimatedLengthList.h:
261 (SVGAnimatedLengthListAnimator):
262 * svg/SVGAnimatedNumber.cpp:
263 (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue):
264 * svg/SVGAnimatedNumber.h:
265 (SVGAnimatedNumberAnimator):
266 * svg/SVGAnimatedNumberList.cpp:
267 (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
268 * svg/SVGAnimatedNumberList.h:
269 (SVGAnimatedNumberListAnimator):
270 * svg/SVGAnimatedNumberOptionalNumber.cpp:
271 (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
272 * svg/SVGAnimatedNumberOptionalNumber.h:
273 (SVGAnimatedNumberOptionalNumberAnimator):
274 * svg/SVGAnimatedPath.cpp:
275 (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
276 * svg/SVGAnimatedPath.h:
277 (SVGAnimatedPathAnimator):
278 * svg/SVGAnimatedPointList.cpp:
279 (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
280 * svg/SVGAnimatedPointList.h:
281 (SVGAnimatedPointListAnimator):
282 * svg/SVGAnimatedPreserveAspectRatio.cpp:
283 (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
284 * svg/SVGAnimatedPreserveAspectRatio.h:
285 (SVGAnimatedPreserveAspectRatioAnimator):
286 * svg/SVGAnimatedRect.cpp:
287 (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue):
288 * svg/SVGAnimatedRect.h:
289 (SVGAnimatedRectAnimator):
290 * svg/SVGAnimatedString.cpp:
291 (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue):
292 * svg/SVGAnimatedString.h:
293 (SVGAnimatedStringAnimator):
294 * svg/SVGAnimatedTransformList.cpp:
295 (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
296 * svg/SVGAnimatedTransformList.h:
297 (SVGAnimatedTransformListAnimator):
298 * svg/SVGAnimatedTypeAnimator.h:
299 (SVGAnimatedTypeAnimator):
300 * svg/SVGAnimationElement.cpp:
301 (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
302 (WebCore::SVGAnimationElement::updateAnimation):
303 * svg/SVGAnimationElement.h:
304 (WebCore::SVGAnimationElement::animateAdditiveNumber):
305 (SVGAnimationElement):
307 2012-05-01 Beth Dakin <bdakin@apple.com>
309 https://bugs.webkit.org/show_bug.cgi?id=85231
310 Fixed position objects that are removed from the DOM don't kick off
311 fixed position recalculation
313 <rdar://problem/11297916>
315 Reviewed by Darin Adler.
317 * rendering/RenderBox.cpp:
318 (WebCore::RenderBox::willBeDestroyed):
320 2012-05-01 Dana Jansens <danakj@chromium.org>
322 Early-out for subtracting a non-intersecting region
323 https://bugs.webkit.org/show_bug.cgi?id=85258
325 Reviewed by Hajime Morita.
327 Given regions A and B, if the bounds of the regions do not intersect,
328 then the regions themselves do not intersect. If the intersection of
329 A and B is empty, then A subtract B == A.
331 * platform/graphics/Region.cpp:
332 (WebCore::Region::subtract):
334 2012-04-30 Kent Tamura <tkent@chromium.org>
336 [Chromium/Windows] Add LocalizedDateWin
337 https://bugs.webkit.org/show_bug.cgi?id=84935
339 Reviewed by Kentaro Hara.
341 LocalizedDateICU.cpp doesn't reflect system settings. So there were some
342 problems such as <input type=date> doesn't use system's date format.
344 We need to use Windows API to get a date format and calendar parameters.
346 We obtain a date format like "MM/dd/yy" via Windows API, and
347 format/parse dates for the format by our own code because Windows API
348 can't handle years older than 1601 and doesn't have date parsing API.
350 Unit test: Source/WebKit/chromium/tests/LocaleWinTest.cpp
352 * WebCore.gypi: Add LocalizedDateWin.cpp.
353 * WebCore.gyp/WebCore.gyp:
354 For Windows, remove LocalizedDateICU.cpp and add LocalizedDateWin.cpp.
355 All of *Win.cpp files are excluded by default.
357 * platform/text/LocaleWin.cpp: Added.
358 (WebCore::LocaleWin::LocaleWin):
359 (WebCore::LocaleWin::create):
360 (WebCore::LocaleWin::currentLocale):
361 (WebCore::LocaleWin::~LocaleWin):
362 (WebCore::LocaleWin::getLocaleInfoString):
363 A helper function to obtain a string by GetLocaleInfo().
364 (WebCore::LocaleWin::initializeShortMonthLabels):
365 Obtain short month names from Windows.
367 (WebCore::DateFormatToken): A struct to represent a token in a date format.
368 e.g. A format string "MM/dd/yy" generates five DateFormatToken:
369 Month2, Literal, Day2, Literal, Year2.
370 (isEraSymbol): A readability helper function.
371 (isYearSymbol): ditto.
372 (isMonthSymbol): ditto.
373 (isDaySymbol): ditto.
374 (countContinuousLetters):
375 (commitLiteralToken): A helper for parseDateFormat().
377 Parse a format string, and generate a list of DateFormatToken.
379 (WebCore::parseNumber): A helper for parseDate().
380 (WebCore::LocaleWin::parseNumberOrMonth): ditto.
381 (WebCore::LocaleWin::parseDate):
382 Parse a user-provided date string by matching with a DateFormatToken list.
384 (WebCore::appendNumber): A helper for formatDate().
385 (WebCore::appendTwoDigitsNumber): ditto. Write at least two digits.
386 (WebCore::appendFourDigitsNumber): ditto. Write at least four digits.
387 (WebCore::LocaleWin::formatDate):
388 Format a DateComponents by iterating a DateFormatToken list.
390 (WebCore::LocaleWin::initializeShortDateTokens):
391 (WebCore::substituteLabelsIntoFormat):
392 Creates a user-visible format string by iterating a DateFormatToken list.
393 (WebCore::LocaleWin::dateFormatText):
394 (WebCore::LocaleWin::initializeMonthLabels):
395 Creates month names by Windows API.
396 (WebCore::LocaleWin::initializeWeekDayShortLabels):
397 Creates day names by Windows API.
398 (WebCore::LocaleWin::monthLabels):
399 Public accessor function for month names.
400 (WebCore::LocaleWin::weekDayShortLabels):
401 Public accessor function for day names.
402 * platform/text/LocaleWin.h: Added.
404 * platform/text/LocalizedDateWin.cpp:
405 Added. The following functions simply delegate to LocaleWin::currentLocale().
406 (WebCore::parseLocalizedDate):
407 (WebCore::formatLocalizedDate):
408 (WebCore::localizedDateFormatText):
409 (WebCore::monthLabels):
410 (WebCore::weekDayShortLabels):
411 (WebCore::firstDayOfWeek):
413 2012-04-30 Kent Tamura <tkent@chromium.org>
415 REGRESSION(r115600): parseLocalizedDate() should fail for invalid inputs
416 https://bugs.webkit.org/show_bug.cgi?id=85176
418 Reviewed by Kentaro Hara.
420 Test: fast/forms/date/input-date-commit-valid-only.html
422 * platform/text/mac/LocalizedDateMac.mm:
423 (WebCore::parseLocalizedDate):
424 We should check nil for the result of NSDateFormtter::dateFromString.
426 2012-04-30 Mark Rowe <mrowe@apple.com>
428 Fix another leak due to misuse of createCFString.
430 Reviewed by Darin Adler.
432 * plugins/mac/PluginPackageMac.cpp:
433 (WebCore::PluginPackage::fetchInfo): Adopt the result of createCFString.
435 2012-04-30 Mark Rowe <mrowe@apple.com>
437 <rdar://problem/11312198> Many leaks during fast/events/dropzone-002.html
439 Reviewed by Darin Adler.
441 * platform/mac/ClipboardMac.mm:
442 (WebCore::utiTypeFromCocoaType): Adopt the result of createCFString.
444 2012-04-30 Mark Rowe <mrowe@apple.com>
446 <rdar://problem/11352575> Many CGImageRefs leaked during media layout tests
448 Reviewed by Brian Weinstein.
450 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
451 (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect): Adopt the CGImageRef.
453 2012-04-30 Emil A Eklund <eae@chromium.org>
455 Change RenderBoxModelObject::calculateBackgroundImageGeometry to use roundToInt
456 https://bugs.webkit.org/show_bug.cgi?id=85249
458 Reviewed by Eric Seidel.
460 Prepare RenderBoxModelObject for FractionalLayoutUnits by adding rounding
461 logic to calculateBackgroundImageGeometry. Background images, as all
462 images, needs to be layed out on pixel boundaries thus we need to convert
463 it to a integer value.
465 No new tests, no change in functionality.
467 * rendering/RenderBoxModelObject.cpp:
468 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
470 2012-04-30 Ilya Sherman <isherman@chromium.org>
472 Unreviewed, rolling out r113511.
473 http://trac.webkit.org/changeset/113511
474 https://bugs.webkit.org/show_bug.cgi?id=66032
475 https://bugs.webkit.org/show_bug.cgi?id=85150
477 Regression: Many autofilled form fields lack the default
478 autofill background even when authors don’t override the
482 (input:-webkit-autofill): Restore !important modifiers
484 2012-04-30 Julien Chaffraix <jchaffraix@webkit.org>
486 Move RenderTableCell's row index to RenderTableRow
487 https://bugs.webkit.org/show_bug.cgi?id=85229
489 Reviewed by Ojan Vafai.
491 Covered by the existing table tests.
493 Row index is a RenderTableRow concept and as such this change moves
494 the relevant logic into the class.
496 While touching the code, renamed row() -> rowIndex() as now RenderTableCell
497 can return its parent RenderTableRow and we were returning an index, not the row
500 * accessibility/AccessibilityTable.cpp:
501 (WebCore::AccessibilityTable::cellForColumnAndRow):
502 * accessibility/AccessibilityTableCell.cpp:
503 (WebCore::AccessibilityTableCell::rowIndexRange):
504 (WebCore::AccessibilityTableCell::titleUIElement):
505 * rendering/RenderTable.cpp:
506 (WebCore::RenderTable::cellAbove):
507 (WebCore::RenderTable::cellBelow):
508 (WebCore::RenderTable::cellBefore):
509 (WebCore::RenderTable::cellAfter):
510 * rendering/RenderTreeAsText.cpp:
511 (WebCore::RenderTreeAsText::writeRenderObject):
512 Updated after the renaming RenderTableCell::row() -> rowIndex().
514 * rendering/RenderTableCell.cpp:
515 (WebCore::RenderTableCell::RenderTableCell):
516 (WebCore::RenderTableCell::computeCollapsedBeforeBorder):
517 (WebCore::RenderTableCell::computeCollapsedAfterBorder):
518 Updated after m_rowIndex removal and row() -> rowIndex() renaming.
520 (WebCore::RenderTableCell::styleDidChange):
521 Switched the rowWasSet check to an ASSERT. The new logic guarantees that
522 row index was set straight when we insert the row. The previous logic was
523 opened to some race conditions as we could wait for a recalcCells call before
524 setting the index on the rows which made this check necessary.
526 * rendering/RenderTableCell.h:
527 (WebCore::RenderTableCell::row):
528 Added this RenderTableRow getter.
530 (WebCore::RenderTableCell::rowIndex):
533 * rendering/RenderTableRow.cpp:
534 (WebCore::RenderTableRow::RenderTableRow):
535 (WebCore::RenderTableRow::styleDidChange):
536 Updated after adding m_rowIndex / rowIndex().
538 * rendering/RenderTableRow.h:
539 (WebCore::RenderTableRow::setRowIndex):
540 (WebCore::RenderTableRow::rowIndex):
541 Added those getter / setter. Also kept m_rowIndex's smaller size
542 for future optimization and for symmetry with the column index on
545 * rendering/RenderTableSection.cpp:
546 (WebCore::RenderTableSection::addChild):
547 (WebCore::RenderTableSection::recalcCells):
548 Made sure that whenever we insert or update our row index
549 we do call setRowIndex().
551 (WebCore::RenderTableSection::addCell):
552 This logic now doesn't need to query insertionRow as the cell's
553 should have the index of the row in which it is inserted.
555 (WebCore::RenderTableSection::calcRowLogicalHeight):
556 (WebCore::RenderTableSection::layoutRows):
557 (WebCore::compareCellPositionsWithOverflowingCells):
558 More updates after row() -> rowIndex() renaming.
560 * rendering/RenderTableSection.h:
561 Removed rowIndexForRenderer now that the row caches this informatin.
563 2012-04-30 Keishi Hattori <keishi@webkit.org>
565 datalist: Inconsistent behavior of HTMLInputElement::list
566 https://bugs.webkit.org/show_bug.cgi?id=84351
568 Each platform will have a different set of input types that support the datalist UI.
569 This patch makes shouldRespectListAttribute ask the RenderTheme if it supports datalist UI for that input type.
570 Thus making it possible to do feature detection with JS.
572 Reviewed by Kent Tamura.
574 * WebCore.gypi: Added RenderThemeChromiumCommon.{cpp,h}
575 * html/ColorInputType.cpp:
576 (WebCore::ColorInputType::shouldRespectListAttribute):
578 * html/ColorInputType.h:
580 * html/InputType.cpp:
581 (WebCore::InputType::themeSupportsDataListUI): Static method used by TextFieldInputType, RangeInputType, and ColorInputType.
585 * html/RangeInputType.cpp:
586 (WebCore::RangeInputType::shouldRespectListAttribute):
587 * html/TextFieldInputType.cpp:
588 (WebCore::TextFieldInputType::shouldRespectListAttribute):
589 * rendering/RenderTheme.h:
591 (WebCore::RenderTheme::supportsDataListUI): Returns true if the platform can show the datalist suggestions for a given input type.
592 * rendering/RenderThemeChromiumCommon.cpp: Added.
594 (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
595 * rendering/RenderThemeChromiumCommon.h: Added.
597 (RenderThemeChromiumCommon):
598 * rendering/RenderThemeChromiumMac.h:
599 (RenderThemeChromiumMac):
600 * rendering/RenderThemeChromiumMac.mm:
601 (WebCore::RenderThemeChromiumMac::supportsDataListUI):
603 * rendering/RenderThemeChromiumSkia.cpp:
604 (WebCore::RenderThemeChromiumMac::supportsDataListUI):
606 * rendering/RenderThemeChromiumSkia.h:
607 (RenderThemeChromiumSkia):
609 2012-04-30 Levi Weintraub <leviw@chromium.org>
611 RenderObject incorrectly lists maximalOutlineSize as a LayoutUnit
612 https://bugs.webkit.org/show_bug.cgi?id=85248
614 Reviewed by Eric Seidel.
616 Reverting RenderObject::maximalOutlineSize to int. This is a slop value for repaint
617 rects that doesn't affect layout. It also derives its value from RenderView's function
618 of the same name, which is already an integer.
620 No new tests. No change in behavior.
622 * rendering/RenderObject.cpp:
623 (WebCore::RenderObject::maximalOutlineSize):
624 * rendering/RenderObject.h:
627 2012-04-30 Xingnan Wang <xingnan.wang@intel.com>
629 Add multichannel support for input of JavaScriptAudioNode
630 https://bugs.webkit.org/show_bug.cgi?id=84687
632 Reviewed by Chris Rogers.
634 Tests: webaudio/javascriptaudionode-downmix8-2channel-input.html
635 webaudio/javascriptaudionode-upmix2-8channel-input.html
637 * Modules/webaudio/JavaScriptAudioNode.cpp:
638 (WebCore::JavaScriptAudioNode::create):
639 (WebCore::JavaScriptAudioNode::JavaScriptAudioNode):
640 (WebCore::JavaScriptAudioNode::initialize):
641 (WebCore::JavaScriptAudioNode::process):
642 * Modules/webaudio/JavaScriptAudioNode.h:
643 (JavaScriptAudioNode):
645 2012-04-30 Oliver Hunt <oliver@apple.com>
647 Harden arithmetic in ImageBufferDataCG
648 https://bugs.webkit.org/show_bug.cgi?id=61373
650 Reviewed by Gavin Barraclough.
652 We have a checked type that allows us to automate many of the
653 bounds checks we want here, so let's replace the floating point
654 math, and just use Checked<> throughout. We use a non-recording
655 Checked<> as no overflows should reach this point, so we'll take
656 a hard early failure, over the cost of many branches when
657 accessing the raw values in loops.
659 * platform/graphics/cg/ImageBufferDataCG.cpp:
660 (WebCore::ImageBufferData::getData):
661 (WebCore::ImageBufferData::putData):
663 2012-04-30 Levi Weintraub <leviw@chromium.org>
665 Add absoluteValue method for LayoutUnits to allow overloading abs()
666 https://bugs.webkit.org/show_bug.cgi?id=85214
668 Reviewed by Eric Seidel.
670 Adding an absoluteValue free inline function that operates on LayoutUnits, which
671 allows us to have one function signature for ints or FractionalLayoutUnits. We
672 can't simply add a FractionalLayoutUnit flavor of abs because it confuses
673 some compilers due to the implicit FractionalLayoutUnit constructors that take
676 No new tests. No change in behavior.
678 * page/SpatialNavigation.cpp:
679 (WebCore::distanceDataForNode):
680 * rendering/LayoutTypes.h:
681 (WebCore::absoluteValue):
683 * rendering/RenderBlockLineLayout.cpp:
684 (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
685 * rendering/RenderLineBoxList.cpp:
686 (WebCore::RenderLineBoxList::rangeIntersectsRect):
687 * rendering/RenderObject.cpp:
688 (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
690 2012-04-30 Levi Weintraub <leviw@chromium.org>
692 Update LayoutUnit usage in InlineFlowBox and RenderWidget
693 https://bugs.webkit.org/show_bug.cgi?id=85239
695 Reviewed by Eric Seidel.
697 Updating LayoutUnit usage in a pair of remaining functions to minimize the remaining work to switching
698 to FractionalLayoutUnits for layout instead of integers.
700 No new tests. No change in behavior.
702 * rendering/InlineFlowBox.cpp:
703 (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Though stored as a float, the top is always
704 set to an integer value. When we move to sub-pixel, we need to preserve this. Not preserving this
705 behavior affects text decorations, most notably underlines.
706 * rendering/RenderWidget.cpp:
707 (WebCore::RenderWidget::updateWidgetGeometry): Adding pixel snapping for the content box if it's
708 not transformed (absoluteContentBox includes pixel snapping), and properly treating the boundingBox
711 2012-04-30 Levi Weintraub <leviw@chromium.org>
713 Prepare RenderDeprecatedFlexibleBox for sub-pixel layout
714 https://bugs.webkit.org/show_bug.cgi?id=85217
716 Reviewed by Eric Seidel.
718 Bailing from the space distribution loop in layoutHorizontal/VerticalBox when
719 the remaining space falls below one pixel. This has no effect in whole-pixel
720 layout, but avoids unnecessary work/infinite loops in the sub-pixel case.
722 No new tests. No change in behavior.
724 * rendering/RenderDeprecatedFlexibleBox.cpp:
725 (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
726 (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
728 2012-04-30 Ryosuke Niwa <rniwa@webkit.org>
730 NULL ptr in WebCore::Range::getBorderAndTextQuads
731 https://bugs.webkit.org/show_bug.cgi?id=77218
733 Reviewed by Eric Seidel.
735 The crash was caused by a malformed range obtained within an event handler of mutation events
736 (DOMNodeRemovedFromDocument). Because this range wasn't updated per node removal, range functions
737 end up not behaving well.
739 Fixed the bug by changing the order of the notifications in ContainerNode::willRemoveChild.
740 We now fire mutation events first before updating ranges so that any range created inside those
741 event handlers can also be updated prior to the actual node removal.
743 Test: fast/dom/Range/range-created-in-mutation-event-crash.xhtml
745 * dom/ContainerNode.cpp:
746 (WebCore::willRemoveChild):
748 2012-04-30 Anders Carlsson <andersca@apple.com>
750 ScrollingCoordinator::requestScrollPositionUpdate should not update the main frame scroll position
751 https://bugs.webkit.org/show_bug.cgi?id=85240
752 <rdar://problem/11286609>
754 Reviewed by Sam Weinig.
756 The call to updateMainFrameScrollPosition was added to make the WebKit2 find overlay work, since it relies
757 on scroll position updates being synchronous. Change the find code in WebKit2 to handle asynchronous scroll
758 position updates and remove the call to updateMainFrameScrollPosition.
760 * page/scrolling/ScrollingCoordinator.cpp:
761 (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
763 2012-04-30 Anders Carlsson <andersca@apple.com>
765 Add a way to asynchronously call a function once the scroll position of a page has been updated
766 https://bugs.webkit.org/show_bug.cgi?id=85237
768 Reviewed by Sam Weinig.
771 Export functions needed by WebKit2.
773 * page/scrolling/ScrollingCoordinator.h:
774 Make commitTreeStateIfNeeded public.
776 2012-04-30 Kentaro Hara <haraken@chromium.org>
778 WebGLRenderingContext methods should throw TypeError for not enough arguments
779 https://bugs.webkit.org/show_bug.cgi?id=84787
781 Reviewed by Kenneth Russell.
783 Currently, WebGLRenderingcontext methods implement
784 "Not enough arguments" error as SyntaxError. The Web IDL
785 spec requires that it should be TypeError:
786 http://www.w3.org/TR/WebIDL/#dfn-overload-resolution-algorithm
788 This patch changes SyntaxError to TypeError.
790 I wanted to confirm the behavior of Firefox and Opera,
791 but they do not implement WebGL yet.
793 Test: fast/canvas/webgl/webgl-exceptions.html
795 * bindings/js/JSWebGLRenderingContextCustom.cpp:
796 (WebCore::getObjectParameter):
797 (WebCore::JSWebGLRenderingContext::getAttachedShaders):
798 (WebCore::JSWebGLRenderingContext::getExtension):
799 (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
800 (WebCore::JSWebGLRenderingContext::getParameter):
801 (WebCore::JSWebGLRenderingContext::getProgramParameter):
802 (WebCore::JSWebGLRenderingContext::getShaderParameter):
803 (WebCore::JSWebGLRenderingContext::getUniform):
804 (WebCore::dataFunctionf):
805 (WebCore::dataFunctioni):
806 (WebCore::dataFunctionMatrix):
807 * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
808 (WebCore::getObjectParameter):
809 (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
810 (WebCore::V8WebGLRenderingContext::getExtensionCallback):
811 (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
812 (WebCore::V8WebGLRenderingContext::getParameterCallback):
813 (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
814 (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
815 (WebCore::V8WebGLRenderingContext::getUniformCallback):
816 (WebCore::vertexAttribAndUniformHelperf):
817 (WebCore::uniformHelperi):
818 (WebCore::uniformMatrixHelper):
820 2012-04-30 Emil A Eklund <eae@chromium.org>
822 [gtk, qt, chromium, win] Fix usage of LayoutUnits and rounding in platform code
823 https://bugs.webkit.org/show_bug.cgi?id=85222
825 Reviewed by Eric Seidel.
827 Update platform code to use the pixel snapped values for painting rects
828 to line up with device pixels and change platform specific hit testing
829 code to use roundedPoint as hit testing is still mostly done on integer
832 No new tests, no change in functionality.
834 * platform/qt/RenderThemeQt.cpp:
835 (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
836 * platform/win/PopupMenuWin.cpp:
837 (WebCore::PopupMenuWin::paint):
838 * rendering/RenderThemeChromiumSkia.cpp:
839 (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
840 (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
841 (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
843 2012-04-30 Kentaro Hara <haraken@chromium.org>
845 [V8][JSC] Remove hard-coded "Not enough arguments" errors
846 https://bugs.webkit.org/show_bug.cgi?id=85207
848 Reviewed by Sam Weinig.
850 In bug 85022 and bug 85097, we implemented
851 createNotEnoughArgumentsError() in JSC and
852 V8Proxy::throwNotEnoughArgumentsError() in V8 and partially
853 removed hard-coded "Not enough arguments" errors.
854 This patch removes hard-coded "Not enough arguments"
855 errors by using the helper methods.
857 No tests. No change in behavior.
859 * bindings/js/JSAudioContextCustom.cpp:
860 (WebCore::JSAudioContextConstructor::constructJSAudioContext):
861 * bindings/js/JSSVGLengthCustom.cpp:
862 (WebCore::JSSVGLength::convertToSpecifiedUnits):
863 * bindings/js/JSWebSocketCustom.cpp:
864 (WebCore::JSWebSocketConstructor::constructJSWebSocket):
865 (WebCore::JSWebSocket::send):
866 * bindings/js/JSXMLHttpRequestCustom.cpp:
867 (WebCore::JSXMLHttpRequest::open):
868 * bindings/v8/ScriptController.cpp:
869 (WebCore::setValueAndClosePopupCallback):
870 * bindings/v8/custom/V8AudioContextCustom.cpp:
871 (WebCore::V8AudioContext::constructorCallback):
872 * bindings/v8/custom/V8SVGLengthCustom.cpp:
873 (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
874 * bindings/v8/custom/V8WebSocketCustom.cpp:
875 (WebCore::V8WebSocket::constructorCallback):
876 (WebCore::V8WebSocket::sendCallback):
877 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
878 (WebCore::V8XMLHttpRequest::openCallback):
880 2012-04-30 Benjamin Poulain <benjamin@webkit.org>
882 Add String::startsWith() and endsWith() for string literals
883 https://bugs.webkit.org/show_bug.cgi?id=85154
885 Reviewed by Darin Adler.
887 Update WebCore to use the simpler startsWith() and endsWith() taking
891 (WebCore::CSSParser::markPropertyEnd):
892 * css/WebKitCSSKeyframeRule.cpp:
893 (WebCore::StyleKeyframe::parseKeyString):
894 * editing/markup.cpp:
895 (WebCore::createFragmentFromText):
896 * html/HTMLObjectElement.cpp:
897 (WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
898 * html/HTMLTextFormControlElement.cpp:
899 (WebCore::HTMLTextFormControlElement::setInnerTextValue):
900 * inspector/ContentSearchUtils.cpp:
901 (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
902 * inspector/InspectorCSSAgent.cpp:
903 (WebCore::InspectorCSSAgent::SetPropertyTextAction::redo):
904 * loader/MainResourceLoader.cpp:
905 (WebCore::MainResourceLoader::substituteMIMETypeFromPluginDatabase):
906 * loader/appcache/ManifestParser.cpp:
907 (WebCore::parseManifest):
908 * platform/blackberry/CookieManager.cpp:
909 (WebCore::CookieManager::shouldRejectForSecurityReason):
910 * platform/posix/FileSystemPOSIX.cpp:
911 (WebCore::pathByAppendingComponent):
912 * plugins/PluginDatabase.cpp:
913 (WebCore::PluginDatabase::findPlugin):
914 * svg/SVGStopElement.cpp:
915 (WebCore::SVGStopElement::parseAttribute):
916 * svg/animation/SVGSMILElement.cpp:
917 (WebCore::SVGSMILElement::parseOffsetValue):
918 (WebCore::SVGSMILElement::parseCondition):
920 2012-04-30 Abhishek Arya <inferno@chromium.org>
922 Remove positioned float code.
923 https://bugs.webkit.org/show_bug.cgi?id=84795
925 Reviewed by Dan Bernstein.
927 Backout r92004 and some pieces from r91702.
929 Test: fast/block/float/positioned-float-crash.html
932 (WebCore::isValidKeywordPropertyAndValue):
933 * css/CSSPrimitiveValueMappings.h:
934 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
935 (WebCore::CSSPrimitiveValue::operator EFloat):
936 * css/CSSValueKeywords.in:
937 * rendering/RenderBlock.cpp:
938 (WebCore::RenderBlock::RenderBlock):
939 (WebCore::RenderBlock::layoutBlock):
940 (WebCore::RenderBlock::addOverflowFromFloats):
941 (WebCore::RenderBlock::layoutBlockChild):
942 (WebCore::RenderBlock::simplifiedLayout):
943 (WebCore::RenderBlock::layoutPositionedObjects):
944 (WebCore::RenderBlock::insertFloatingObject):
945 (WebCore::RenderBlock::positionNewFloats):
946 (WebCore::RenderBlock::clearFloats):
947 (WebCore::RenderBlock::FloatingObjects::clear):
948 (WebCore::RenderBlock::FloatingObjects::increaseObjectsCount):
949 (WebCore::RenderBlock::FloatingObjects::decreaseObjectsCount):
950 * rendering/RenderBlock.h:
952 (WebCore::RenderBlock::forceLayoutInlineChildren):
954 (WebCore::RenderBlock::FloatingObject::FloatingObject):
955 (WebCore::RenderBlock::hasOverhangingFloats):
956 (WebCore::RenderBlock::FloatingObjects::FloatingObjects):
958 * rendering/RenderBox.cpp:
959 (WebCore::RenderBox::updateBoxModelInfoFromStyle):
960 * rendering/RenderDeprecatedFlexibleBox.cpp:
961 (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
962 * rendering/RenderDeprecatedFlexibleBox.h:
963 (RenderDeprecatedFlexibleBox):
964 * rendering/RenderFlexibleBox.cpp:
965 (WebCore::RenderFlexibleBox::layoutBlock):
966 * rendering/RenderFlexibleBox.h:
968 * rendering/RenderLayer.cpp:
969 (WebCore::RenderLayer::updateScrollbarsAfterLayout):
970 * rendering/style/RenderStyleConstants.h:
972 2012-04-29 Sam Weinig <sam@webkit.org>
975 https://bugs.webkit.org/show_bug.cgi?id=84036
977 Reviewed by Anders Carlsson.
980 * fileapi/WebKitBlobBuilder.idl:
981 * page/DOMWindow.idl:
982 * workers/WorkerContext.idl:
983 Make exposing the WebKitBlobBuilder JS object conditional on a new
984 ENABLE_LEGACY_WEBKIT_BLOB_BUILDER flag. Don't enable this for the Mac,
985 but do for everyone else.
987 2012-04-30 Anders Carlsson <andersca@apple.com>
989 Add a barrier-style dispatch member function to ScrollingThread
990 https://bugs.webkit.org/show_bug.cgi?id=85228
992 Reviewed by Sam Weinig.
994 Add a ScrollingThread::dispatchBarrier function which takes a WTF::Function and dispatches it to the main thread
995 once all the currently scheduled scrolling thread functions have run. This is to be used for synchronization between the
996 scrolling thread and the main thread.
998 * page/scrolling/ScrollingThread.cpp:
999 (WebCore::callFunctionOnMainThread):
1001 (WebCore::ScrollingThread::dispatchBarrier):
1002 * page/scrolling/ScrollingThread.h:
1005 2012-04-30 Min Qin <qinmin@google.com>
1007 Expose a flag so that fullscreen video on android can work with FULLSCREEN_API
1008 https://bugs.webkit.org/show_bug.cgi?id=84414
1010 Reviewed by Darin Fisher.
1012 No tests, just exposing the flag, and will be used by android later.
1013 Sorry, there is a merge error during the previous commit, resolved now
1015 * platform/graphics/MediaPlayer.cpp:
1016 (WebCore::MediaPlayer::setControls):
1018 (WebCore::MediaPlayer::enterFullscreen):
1019 (WebCore::MediaPlayer::exitFullscreen):
1020 * platform/graphics/MediaPlayer.h:
1022 * platform/graphics/MediaPlayerPrivate.h:
1023 (MediaPlayerPrivateInterface):
1024 (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
1026 2012-04-30 Nate Chapin <japhet@chromium.org>
1028 Move more of committing and starting to write a Document
1030 https://bugs.webkit.org/show_bug.cgi?id=83908
1032 Reviewed by Adam Barth.
1034 No new tests, refactor only.
1036 * loader/DocumentLoader.cpp:
1037 (WebCore::DocumentLoader::commitIfReady): Ignore m_gotFirstByte here, since
1038 it was always true here anyway.
1039 (WebCore::DocumentLoader::finishedLoading): If we are finishing an empty
1040 document, create the document now, so that FrameLoaderClient doesn't
1041 have to do it later (FrameLoaderClient code will be removed in a later
1043 (WebCore::DocumentLoader::commitData): Call receivedFirstData() directly and
1044 do some work receivedFirstData() used to do, setEncoding() only once per
1046 (WebCore::DocumentLoader::receivedData):
1047 (WebCore::DocumentLoader::maybeCreateArchive):
1048 * loader/DocumentLoader.h:
1049 * loader/DocumentWriter.cpp:
1050 (WebCore::DocumentWriter::setEncoding):
1051 * loader/FrameLoader.cpp:
1052 (WebCore::FrameLoader::receivedFirstData): Move DocumentLoader calls
1054 * loader/FrameLoader.h: Remove m_hasReceivedFirstData and willSetEncoding(),
1055 allow hasReceivedData() to be called directly.
1058 2012-04-30 Kentaro Hara <haraken@chromium.org>
1060 Unreviewed. Fix test crashes in Win/Linux debug builds.
1062 * bindings/v8/V8LazyEventListener.cpp:
1063 (WebCore::V8LazyEventListener::V8LazyEventListener):
1064 (WebCore::V8LazyEventListener::prepareListenerObject):
1065 * bindings/v8/V8LazyEventListener.h:
1066 (V8LazyEventListener):
1068 2012-04-30 Tommy Widenflycht <tommyw@google.com>
1070 MediaStream API: Change LocalMediaStream::stop to be synchronous
1071 https://bugs.webkit.org/show_bug.cgi?id=84942
1073 Reviewed by Dimitri Glazkov.
1075 Since I changed LocalMediaStream to be a ActiveDOMObject recently the stop()
1076 behaviour needs to change since it is no longer a good idea to start a timer when called.
1078 Not possible to write a test for this.
1080 * Modules/mediastream/LocalMediaStream.cpp:
1081 (WebCore::LocalMediaStream::LocalMediaStream):
1082 (WebCore::LocalMediaStream::stop):
1083 * Modules/mediastream/LocalMediaStream.h:
1086 2012-04-28 Emil A Eklund <eae@chromium.org> and Levi Weintraub <leviw@chromium.org>
1088 Add ENABLE_SUBPIXEL_LAYOUT controlling FractionalLayoutUnit denominator
1089 https://bugs.webkit.org/show_bug.cgi?id=85146
1091 Reviewed by Eric Seidel.
1093 Add a new flag for controlling the fixed point denominator in
1094 FractionalLayoutUnit. Controls whether the denominator is set to 60 or 1.
1095 Until we change the LayoutUnit typedef this change will have no effect.
1097 No new tests, no change in functionality.
1099 * platform/FractionalLayoutUnit.h:
1101 (WebCore::FractionalLayoutUnit::operator++):
1102 (WebCore::operator/):
1103 (WebCore::operator+):
1104 Add ++, / double and and + double operators. These are needed when
1105 ENABLE_SUBPIXEL_LAYOUT is not enabled.
1107 * platform/graphics/FractionalLayoutRect.cpp:
1108 (WebCore::enclosingFractionalLayoutRect):
1110 2012-04-30 Justin Schuh <jschuh@chromium.org>
1112 loadOrRedirectSubframe should return the owner element's frame
1113 https://bugs.webkit.org/show_bug.cgi?id=84780
1115 Reviewed by Nate Chapin.
1117 Test: fast/loader/javascript-url-iframe-remove-on-navigate.html
1119 * loader/SubframeLoader.cpp:
1120 (WebCore::SubframeLoader::loadOrRedirectSubframe):
1122 2012-04-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
1124 Use Vector<Attribute> directly instead of encapsulating it in AttributeVector
1125 https://bugs.webkit.org/show_bug.cgi?id=84413
1127 Reviewed by Andreas Kling.
1129 As commented in https://bugs.webkit.org/show_bug.cgi?id=79963#c16 we do not
1130 usually subclass basic types like Vector. This patch changes code to use
1131 Vector<Attribute> directly and move around the functionality of the former
1132 methods to more specific helper functions or inline code at the callers.
1135 (WebCore::Element::parserSetAttributes):
1136 (WebCore::Element::normalizeAttributes):
1139 * dom/ElementAttributeData.cpp:
1140 * dom/ElementAttributeData.h:
1141 (WebCore::findAttributeInVector):
1142 (WebCore::ElementAttributeData::getAttributeItem):
1143 (ElementAttributeData):
1144 (WebCore::ElementAttributeData::attributeVector):
1145 (WebCore::ElementAttributeData::clonedAttributeVector):
1146 (WebCore::ElementAttributeData::getAttributeItemIndex):
1148 * html/parser/HTMLConstructionSite.cpp:
1149 (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
1150 * html/parser/HTMLToken.h:
1151 (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1152 * html/parser/HTMLTreeBuilder.cpp:
1153 (WebCore::HTMLTreeBuilder::processFakeStartTag):
1154 (WebCore::HTMLTreeBuilder::attributesForIsindexInput): Loop through the attributes
1155 backwards so we can remove items without affecting the rest of the loop run.
1156 * html/parser/HTMLTreeBuilder.h:
1157 * html/parser/TextDocumentParser.cpp:
1158 (WebCore::TextDocumentParser::insertFakePreElement):
1159 * xml/XMLErrors.cpp:
1160 (WebCore::createXHTMLParserErrorHeader):
1161 (WebCore::XMLErrors::insertErrorMessageBlock):
1162 * xml/parser/MarkupTokenBase.h:
1163 (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
1164 (WebCore::AtomicMarkupTokenBase::getAttributeItem):
1165 (WebCore::AtomicMarkupTokenBase::attributes):
1166 (AtomicMarkupTokenBase):
1167 (WebCore::::initializeAttributes):
1168 * xml/parser/XMLToken.h:
1169 (WebCore::AtomicXMLToken::AtomicXMLToken):
1171 2012-04-30 Mark Pilgrim <pilgrim@chromium.org>
1173 [Chromium] Remove PlatformSupport::loadPlatformAudioResource, call loadResource directly
1174 https://bugs.webkit.org/show_bug.cgi?id=85193
1176 Reviewed by Kentaro Hara.
1178 Part of a refactoring series. See tracking bug 82948.
1180 * platform/audio/chromium/AudioBusChromium.cpp:
1181 (WebCore::AudioBus::loadPlatformResource):
1182 * platform/chromium/PlatformSupport.h:
1185 2012-04-30 Mark Pilgrim <pilgrim@chromium.org>
1187 [Chromium] Call defaultLocale directly
1188 https://bugs.webkit.org/show_bug.cgi?id=85192
1190 Reviewed by Kentaro Hara.
1192 Part of a refactoring series. See tracking bug 82948.
1194 * platform/chromium/LanguageChromium.cpp:
1195 (WebCore::platformLanguage):
1196 * platform/chromium/PlatformSupport.h:
1199 2012-04-30 Beth Dakin <bdakin@apple.com>
1201 https://bugs.webkit.org/show_bug.cgi?id=82922
1202 border-image with image-set does not render correctly when viewed at
1205 <rdar://problem/11167820>
1207 Reviewed by Dan Bernstein.
1209 StyleImage::computeIntrinsicDimensions() is only called from one
1210 place: RenderBoxModelObject::calculateIntrinsicDimensions(), and that
1211 is only used for background images and border images. In my original
1212 image-set work, I decided that
1213 StyleCachedImageSet::computeIntrinsicDimensions() would compute
1214 "intrinsic" dimensions, meaning that they would compute the dimensions
1215 that the image resource was pretending to be rather than the actual
1216 dimensions of the resource. I chose to do this because it made
1217 background images work great without changing the call-site. But border
1218 images need to know the actual intrinsic dimensions, so this design
1219 decision (which was admittedly questionable from the start) won't
1222 This patch makes StyleImage::computeIntrinsicDimensions() return
1223 actual intrinsic dimensions. Then the border-image and background-
1224 image code is very lightly patched to account for the image's scale
1227 These functions no longer need the scale factor parameter.
1228 * loader/cache/CachedImage.cpp:
1229 (WebCore::CachedImage::computeIntrinsicDimensions):
1230 * loader/cache/CachedImage.h:
1232 * platform/graphics/GeneratedImage.h:
1234 * platform/graphics/GeneratorGeneratedImage.cpp:
1235 (WebCore::GeneratedImage::computeIntrinsicDimensions):
1236 * platform/graphics/Image.cpp:
1237 (WebCore::Image::computeIntrinsicDimensions):
1238 * platform/graphics/Image.h:
1240 * platform/graphics/cg/PDFDocumentImage.cpp:
1241 (WebCore::PDFDocumentImage::computeIntrinsicDimensions):
1242 * platform/graphics/cg/PDFDocumentImage.h:
1244 * svg/graphics/SVGImage.cpp:
1245 (WebCore::SVGImage::computeIntrinsicDimensions):
1246 * svg/graphics/SVGImage.h:
1248 * rendering/style/StyleCachedImageSet.cpp:
1249 (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
1251 New function on StyleImage returns the image's scale factor.
1252 * rendering/style/StyleCachedImageSet.h:
1253 (WebCore::StyleCachedImageSet::imageScaleFactor):
1254 * rendering/style/StyleImage.h:
1255 (WebCore::StyleImage::imageScaleFactor):
1257 Scale the intrinsic size of the background image down by the scale
1259 * rendering/RenderBoxModelObject.cpp:
1260 (WebCore::RenderBoxModelObject::calculateFillTileSize):
1262 Slices should be multiplied by the image's scale factor since they are
1263 always expected to the specified in the 1x image's coordinate space.
1264 (WebCore::RenderBoxModelObject::paintNinePieceImage):
1266 2012-04-30 Arko Saha <arko@motorola.com>
1268 Remove custom bindings code in JSHTMLCollectionCustom.cpp for HTMLPropertiesCollection.
1269 https://bugs.webkit.org/show_bug.cgi?id=85172
1271 Reviewed by Kentaro Hara.
1273 Use [JSGenerateToJSObject] in HTMLPropertiesCollection.idl, so that it can generate toJS()
1274 in JSHTMLPropertiesCollection.cpp automatically.
1276 * bindings/js/JSHTMLCollectionCustom.cpp:
1278 * html/HTMLPropertiesCollection.idl:
1280 2012-04-30 No'am Rosenthal <noam.rosenthal@nokia.com>
1282 [Texmap] TextureMapperLayer uses intermediate surfaces too eagerly
1283 https://bugs.webkit.org/show_bug.cgi?id=85103
1285 Reviewed by Kenneth Rohde Christiansen.
1287 Instead of automatically using an intermediate surface for layers with opacity and
1288 children, we limit surface usage for layers with more than one child and for layers with
1289 one child and contents of its own.
1291 This prevents us from using intermediate surfaces in cases where a single layer with
1292 opacity has a single descendant with content, in which case normal blending can be used.
1294 Covered by existing compositing layout tests.
1296 * platform/graphics/texmap/TextureMapperLayer.cpp:
1298 * platform/graphics/texmap/TextureMapperLayer.h:
1300 2012-04-30 Yi Shen <yi.4.shen@nokia.com>
1302 Inserting a paragraph between quoted lines in editing/deleting/delete-4038408-fix.html doesn't work
1303 https://bugs.webkit.org/show_bug.cgi?id=78193
1305 Reviewed by Ryosuke Niwa.
1307 When pasting a copied portion of a blockquote with a newline at the end into an unquoted area,
1308 the newline is inserted after the blockquote since we don't want it also to be quoted. However,
1309 this behavior has also applied when we insert a paragraph between quoted lines, which is incorrect.
1310 To figure out the right place to insert a paragraph, we need providing more information to the
1311 InsertParagraphSeparatorCommand by introducing a boolean parameter "pasteBlockqutoeIntoUnquotedArea".
1313 Tests: editing/inserting/insert-paragraph-separator-in-blockquote.html
1314 editing/pasteboard/paste-wrapped-blockquote-into-nonblockquote.html
1316 * editing/CompositeEditCommand.cpp:
1317 (WebCore::CompositeEditCommand::insertParagraphSeparator):
1318 * editing/CompositeEditCommand.h:
1319 (CompositeEditCommand):
1320 * editing/InsertParagraphSeparatorCommand.cpp:
1321 (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
1322 (WebCore::InsertParagraphSeparatorCommand::doApply):
1323 * editing/InsertParagraphSeparatorCommand.h:
1324 (WebCore::InsertParagraphSeparatorCommand::create):
1325 (InsertParagraphSeparatorCommand):
1326 * editing/ReplaceSelectionCommand.cpp:
1327 (WebCore::ReplaceSelectionCommand::doApply):
1329 2012-04-30 Antti Koivisto <antti@apple.com>
1331 Protect current element in HTMLLinkElement::setCSSStyleSheet
1332 https://bugs.webkit.org/show_bug.cgi?id=85166
1334 Reviewed by Andreas Kling.
1336 Stylesheet loading can trigger script execution.
1338 Test: fast/css/cached-sheet-restore-crash.html
1340 * html/HTMLLinkElement.cpp:
1341 (WebCore::HTMLLinkElement::setCSSStyleSheet):
1343 2012-04-29 Keishi Hattori <keishi@webkit.org>
1345 Build fix for LocalizedDateMac.mm
1346 https://bugs.webkit.org/show_bug.cgi?id=85164
1348 Reviewed by Kent Tamura.
1350 * platform/text/mac/LocalizedDateMac.mm:
1351 (WebCore::monthLabels):
1353 2012-04-29 Luke Macpherson <macpherson@chromium.org>
1355 Initialize member variables in CSSParser's constructor.
1356 https://bugs.webkit.org/show_bug.cgi?id=84377
1358 Reviewed by Kentaro Hara.
1360 It is good practice not to leave member variables uninitialized. They make debugging more difficult by reducing
1361 repeatability, and in some cases lead to the possibility of information leakage occuring. This patch simply adds
1362 initialization of m_numParsedPropertiesBeforeMarginBox to CSSParser's constructor to INVALID_NUM_PARSED_PROPERTIES
1363 so that the initial state is the same as the state after the properties are cleared.
1365 No tests added because this is a code style fix, not an actual bug so long as the bison generated code calls
1366 startDeclarationsForMarginBox() and endDeclarationsForMarginBox() symmetrically. The lack of initialization was
1367 originally detected by coverity.
1369 * css/CSSParser.cpp:
1370 (WebCore::CSSParser::CSSParser):
1372 2012-04-29 Kent Tamura <tkent@chromium.org>
1374 [Mac] Add LocalizedDateMac
1375 https://bugs.webkit.org/show_bug.cgi?id=85039
1377 Reviewed by Kentaro Hara.
1379 A date shown <input type=date> should be formatted for user's OS
1380 settings. Chromium-Mac used LocalizedDateICU.cpp to format/parse visible
1381 date strings and it didn't reflect user-settings.
1383 Test: covered by fast/forms/date/date-appearance.html
1385 * WebCore.gyp/WebCore.gyp:
1386 Use LocalizedDateMac.mm for OS X instead of LocalizedDateICU.cpp.
1387 * WebCore.gypi: Add LocalizedDateMac.mm
1388 * platform/text/mac/LocalizedDateMac.mm: Added.
1389 (WebCore::createShortDateFormatter):
1390 Creates a NSDateFormatter with desired settings.
1391 (WebCore::parseLocalizedDate): Impelment for tyep=date.
1392 (WebCore::formatLocalizedDate): ditto.
1393 (WebCore::isYearSymbol): A readability helper for format string parsing.
1394 (WebCore::isMonthSymbol): ditto.
1395 (WebCore::isDaySymbol): ditto.
1396 (WebCore::localizeDateFormat):
1397 Parse a format string, and replace symbols with user-friendly labels.
1398 (WebCore::localizedDateFormatText):
1399 Gets a format string, and apply localizeDateFormat().
1400 (WebCore::monthLabels): Obtain month names from the system.
1401 (WebCore::weekDayShortLabels): Obtain week day symbols from the system.
1402 (WebCore::firstDayOfWeek): Obtain first day of week from the system.
1403 * platform/text/ICULocale.cpp:
1404 (WebCore::createFallbackMonthLabels): Uses WTF::monthFullName.
1406 2012-04-29 Sam Weinig <sam@webkit.org>
1408 Add support for the Blob constructor (Part 2)
1409 https://bugs.webkit.org/show_bug.cgi?id=84555
1411 Address additional feedback on Blob construction.
1412 - Add exception when the dictionary is not an object.
1413 - Ensure the proper ordering of dictionary access. Tested via
1414 throwing exceptions in toString, and ensuring correct one is
1416 - Changed type of exception throw for invalid enumeration to a
1419 Reviewed by Kentaro Hara.
1421 Updated fast/files/blob-constructor.html to be more comprehensive.
1423 * bindings/js/JSBlobCustom.cpp:
1424 (WebCore::JSBlobConstructor::constructJSBlob):
1425 * bindings/v8/custom/V8BlobCustom.cpp:
1426 (WebCore::V8Blob::constructorCallback):
1428 2012-04-29 No'am Rosenthal <noam.rosenthal@nokia.com>
1430 [Texmap] Leaves demo: wrong geometry when opacity animation kicks in
1431 https://bugs.webkit.org/show_bug.cgi?id=85096
1433 Reviewed by Kenneth Rohde Christiansen.
1435 We should use combined() instead of combinedForChildren() since we don't allow
1436 intermediate surfaces for preserves-3d. Also, we should apply the offset before
1437 multiplying the transforms, otherwise the transform-origin is incorrect.
1439 Covered by existing compositing tests.
1441 * platform/graphics/texmap/TextureMapperLayer.cpp:
1442 (WebCore::TextureMapperLayer::paintSelf):
1443 (WebCore::TextureMapperLayer::paintRecursive):
1445 2012-04-29 Mark Pilgrim <pilgrim@chromium.org>
1447 [Chromium] Call highUsageDeltaMB directly
1448 https://bugs.webkit.org/show_bug.cgi?id=84844
1450 Reviewed by Kentaro Hara.
1452 Part of a refactoring series. See tracking bug 82948.
1454 * bindings/v8/V8GCController.cpp:
1455 (WebCore::V8GCController::checkMemoryUsage):
1456 * platform/MemoryUsageSupport.cpp:
1458 (WebCore::MemoryUsageSupport::highUsageDeltaMB):
1459 * platform/MemoryUsageSupport.h:
1460 (MemoryUsageSupport):
1461 * platform/chromium/MemoryUsageSupportChromium.cpp:
1462 (WebCore::MemoryUsageSupport::highUsageDeltaMB):
1464 * platform/chromium/PlatformSupport.h:
1467 2012-04-29 Kentaro Hara <haraken@chromium.org>
1469 REGRESSION(r113086): onresize event handler can be deleted in popup window
1470 https://bugs.webkit.org/show_bug.cgi?id=84908
1472 Reviewed by Ojan Vafai.
1474 In a nutshell, an onresize event handler in the popup window
1475 can be non-deterministically deleted. For more details, please
1476 look at Chromium issue 123642:
1477 http://code.google.com/p/chromium/issues/detail?id=123642
1479 I confirmed that this bug is the regression caused by r113086.
1481 r113086 introduced the following code:
1483 void V8LazyEventListener::prepareListenerObject(...) {
1484 if (hasExistingListenerObject())
1487 // Since we only parse once, there's no need to keep data
1488 // used for parsing around anymore.
1489 m_functionName = String();
1491 m_eventParameterName = String();
1492 m_sourceURL = String();
1494 setListenerObject(wrappedFunction);
1497 This is not correct. The parsing can be done more than once,
1498 and thus we cannot clear data. This patch removes the above code.
1500 Consider the following situation:
1502 (1) Assume '<body onresize="f()"></body>'.
1503 (2) prepareListenerObject() runs.
1504 (3) Since this is the first parsing, hasExistingListenerObject()
1505 returns false. After the parsing, the listener object is set
1506 by setListenerObject().
1507 (4) GC runs. Since there is no strong reference to the listener
1508 object, weakEventListenerCallback() is called back, and the listener
1510 (5) A resize event is triggered.
1511 (6) prepareListenerObject() is called again. Since the listener object
1512 is already disposed, hasExistingListenerObject() returns false,
1513 and the second parsing starts.
1515 In my investigation, the above situation is happening in the reported
1516 Chromium bug. Anyway, I am sure that potentially the parsing can be
1517 done more than once, and thus we must keep m_xxxx data.
1519 However, this is just a temporary fix. We should fix the code so that
1520 an alive event listener object is never reclaimed.
1521 See https://bugs.webkit.org/show_bug.cgi?id=85152 for more details.
1523 No tests: I tried hard to create a DRT test, but could not.
1524 The bug depends on the behavior of GC, and thus the reported bug is
1525 non-deterministic. For example, (as explained in the Chromium issue,)
1526 the bug does not happen if we load an HTML from network because
1527 the network latency hides the bug. Also the bug happens in the
1528 popup window only. If we open the reported HTML in the main window,
1529 we cannot reproduce the bug.
1531 * bindings/v8/V8LazyEventListener.cpp:
1532 (WebCore::V8LazyEventListener::prepareListenerObject):
1534 2012-04-28 Sam Weinig <sam@webkit.org>
1536 Smooth scrolling needs a new key
1537 <rdar://problem/11331632>
1539 Reviewed by Geoffrey Garen.
1541 * platform/mac/ScrollAnimatorMac.mm:
1542 (WebCore::scrollAnimationEnabledForSystem):
1543 (WebCore::ScrollAnimatorMac::scroll):
1546 2012-04-28 Li Yin <li.yin@intel.com>
1548 MessagePort must set m_closed to be true at the end of MessagePort::close function
1549 https://bugs.webkit.org/show_bug.cgi?id=85139
1551 In the function MessagePort::close, the "m_closed = true" must be executed at the end, not at the beginning.
1552 Or, the m_entangledChannel->close() will not be executed.
1553 And it resulted in the failure of MS bench mark messagechannel_close.htm.
1554 http://samples.msdn.microsoft.com/ietestcenter/WebWorkers/messagechannel_close.htm
1556 Reviewed by Kentaro Hara.
1558 Test: fast/events/message-port-close.html
1560 * dom/MessagePort.cpp:
1561 (WebCore::MessagePort::close):
1563 2012-04-28 Sam Weinig <sam@webkit.org>
1567 * bindings/v8/custom/V8BlobCustom.cpp:
1568 (WebCore::V8Blob::constructorCallback):
1570 2012-04-28 Sam Weinig <sam@webkit.org>
1572 Once again, try to make these puppies work.
1574 * bindings/v8/custom/V8BlobCustom.cpp:
1576 2012-04-28 Sam Weinig <sam@webkit.org>
1578 Fix the Chromium build.
1580 * bindings/v8/custom/V8BlobCustom.cpp:
1581 (WebCore::V8Blob::constructorCallback):
1583 2012-04-27 Sam Weinig <sam@webkit.org>
1585 Add support for the Blob constructor
1586 https://bugs.webkit.org/show_bug.cgi?id=84555
1588 Reviewed by Maciej Stachowiak.
1590 Test: fast/files/blob-constructor.html
1592 This adds an implementation of the Blob constructor that willfully
1593 violates the W3C Editor’s Draft 29 February 2012 in the following ways:
1594 - Elements in the parts array are coerced to DOMStrings https://www.w3.org/Bugs/Public/show_bug.cgi?id=16721
1595 - Don't throw for invalid key in the dictionary https://www.w3.org/Bugs/Public/show_bug.cgi?id=16727
1596 - Values for the endings property are treated as enums https://www.w3.org/Bugs/Public/show_bug.cgi?id=16729
1598 * bindings/js/JSBlobCustom.cpp:
1599 (WebCore::JSBlobConstructor::constructJSBlob):
1600 Implement blob constructor.
1602 * bindings/v8/custom/V8BlobCustom.cpp:
1603 (WebCore::V8Blob::constructorCallback):
1604 Implement blob constructor.
1607 Add constructor to IDL.
1609 * workers/WorkerContext.idl:
1610 Add Blob constructor to the worker global object.
1612 2012-04-28 Igor Oliveira <igor.o@sisa.samsung.com>
1614 Move PropertyWrapper out of the AnimationBase
1615 https://bugs.webkit.org/show_bug.cgi?id=84978
1617 Reviewed by Dean Jackson.
1619 AnimationBase is a complex class. It has a state machine and a bunch of
1620 property handlers. This patch moves the property handlers to a separate
1621 class making AnimationBase simpler.
1624 * GNUmakefile.list.am:
1627 * WebCore.vcproj/WebCore.vcproj:
1628 * WebCore.xcodeproj/project.pbxproj:
1629 * page/animation/AnimationBase.cpp:
1630 * page/animation/AnimationBase.h:
1632 * page/animation/AnimationController.cpp:
1633 (WebCore::AnimationController::supportsAcceleratedAnimationOfProperty):
1634 * page/animation/CSSPropertyAnimation.cpp: Added.
1636 (WebCore::blendFunc):
1637 (WebCore::crossfadeBlend):
1638 (AnimationPropertyWrapperBase):
1639 (WebCore::AnimationPropertyWrapperBase::AnimationPropertyWrapperBase):
1640 (WebCore::AnimationPropertyWrapperBase::~AnimationPropertyWrapperBase):
1641 (WebCore::AnimationPropertyWrapperBase::isShorthandWrapper):
1642 (WebCore::AnimationPropertyWrapperBase::property):
1643 (WebCore::AnimationPropertyWrapperBase::animationIsAccelerated):
1644 (WebCore::addPropertyWrapper):
1645 (WebCore::wrapperForProperty):
1646 (PropertyWrapperGetter):
1647 (WebCore::PropertyWrapperGetter::PropertyWrapperGetter):
1648 (WebCore::PropertyWrapperGetter::equals):
1650 (WebCore::PropertyWrapper::PropertyWrapper):
1651 (WebCore::PropertyWrapper::blend):
1652 (RefCountedPropertyWrapper):
1653 (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
1654 (WebCore::RefCountedPropertyWrapper::blend):
1655 (StyleImagePropertyWrapper):
1656 (WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
1657 (WebCore::StyleImagePropertyWrapper::equals):
1658 (PropertyWrapperColor):
1659 (WebCore::PropertyWrapperColor::PropertyWrapperColor):
1660 (WebCore::PropertyWrapperColor::blend):
1661 (PropertyWrapperAcceleratedOpacity):
1662 (WebCore::PropertyWrapperAcceleratedOpacity::PropertyWrapperAcceleratedOpacity):
1663 (WebCore::PropertyWrapperAcceleratedOpacity::animationIsAccelerated):
1664 (WebCore::PropertyWrapperAcceleratedOpacity::blend):
1665 (PropertyWrapperAcceleratedTransform):
1666 (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
1667 (WebCore::PropertyWrapperAcceleratedTransform::animationIsAccelerated):
1668 (WebCore::PropertyWrapperAcceleratedTransform::blend):
1669 (PropertyWrapperAcceleratedFilter):
1670 (WebCore::PropertyWrapperAcceleratedFilter::PropertyWrapperAcceleratedFilter):
1671 (WebCore::PropertyWrapperAcceleratedFilter::animationIsAccelerated):
1672 (WebCore::PropertyWrapperAcceleratedFilter::blend):
1673 (WebCore::shadowListLength):
1674 (WebCore::shadowForBlending):
1675 (PropertyWrapperShadow):
1676 (WebCore::PropertyWrapperShadow::PropertyWrapperShadow):
1677 (WebCore::PropertyWrapperShadow::equals):
1678 (WebCore::PropertyWrapperShadow::blend):
1679 (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
1680 (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
1681 (PropertyWrapperMaybeInvalidColor):
1682 (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor):
1683 (WebCore::PropertyWrapperMaybeInvalidColor::equals):
1684 (WebCore::PropertyWrapperMaybeInvalidColor::blend):
1685 (PropertyWrapperVisitedAffectedColor):
1686 (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
1687 (WebCore::PropertyWrapperVisitedAffectedColor::equals):
1688 (WebCore::PropertyWrapperVisitedAffectedColor::blend):
1689 (FillLayerAnimationPropertyWrapperBase):
1690 (WebCore::FillLayerAnimationPropertyWrapperBase::FillLayerAnimationPropertyWrapperBase):
1691 (WebCore::FillLayerAnimationPropertyWrapperBase::~FillLayerAnimationPropertyWrapperBase):
1692 (FillLayerPropertyWrapperGetter):
1693 (WebCore::FillLayerPropertyWrapperGetter::FillLayerPropertyWrapperGetter):
1694 (WebCore::FillLayerPropertyWrapperGetter::equals):
1695 (FillLayerPropertyWrapper):
1696 (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
1697 (WebCore::FillLayerPropertyWrapper::blend):
1698 (FillLayerRefCountedPropertyWrapper):
1699 (WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper):
1700 (WebCore::FillLayerRefCountedPropertyWrapper::blend):
1701 (FillLayerStyleImagePropertyWrapper):
1702 (WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper):
1703 (WebCore::FillLayerStyleImagePropertyWrapper::equals):
1704 (FillLayersPropertyWrapper):
1705 (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
1706 (WebCore::FillLayersPropertyWrapper::equals):
1707 (WebCore::FillLayersPropertyWrapper::blend):
1708 (ShorthandPropertyWrapper):
1709 (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper):
1710 (WebCore::ShorthandPropertyWrapper::isShorthandWrapper):
1711 (WebCore::ShorthandPropertyWrapper::equals):
1712 (WebCore::ShorthandPropertyWrapper::blend):
1713 (WebCore::ShorthandPropertyWrapper::propertyWrappers):
1714 (PropertyWrapperFlex):
1715 (WebCore::PropertyWrapperFlex::PropertyWrapperFlex):
1716 (WebCore::PropertyWrapperFlex::equals):
1717 (WebCore::PropertyWrapperFlex::blend):
1718 (PropertyWrapperSVGPaint):
1719 (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):
1720 (WebCore::PropertyWrapperSVGPaint::equals):
1721 (WebCore::PropertyWrapperSVGPaint::blend):
1722 (WebCore::addShorthandProperties):
1723 (WebCore::CSSPropertyAnimation::ensurePropertyMap):
1724 (WebCore::gatherEnclosingShorthandProperties):
1725 (WebCore::CSSPropertyAnimation::blendProperties):
1726 (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
1727 (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
1728 (WebCore::CSSPropertyAnimation::propertiesEqual):
1729 (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
1730 (WebCore::CSSPropertyAnimation::getNumProperties):
1731 * page/animation/CSSPropertyAnimation.h: Added.
1733 (CSSPropertyAnimation):
1734 * page/animation/CompositeAnimation.cpp:
1735 (WebCore::CompositeAnimation::updateTransitions):
1736 (WebCore::CompositeAnimation::pauseTransitionAtTime):
1737 * page/animation/ImplicitAnimation.cpp:
1738 (WebCore::ImplicitAnimation::animate):
1739 (WebCore::ImplicitAnimation::getAnimatedStyle):
1740 (WebCore::ImplicitAnimation::isTargetPropertyEqual):
1741 (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
1742 (WebCore::ImplicitAnimation::timeToNextService):
1743 * page/animation/KeyframeAnimation.cpp:
1744 (WebCore::KeyframeAnimation::animate):
1745 (WebCore::KeyframeAnimation::getAnimatedStyle):
1746 (WebCore::KeyframeAnimation::timeToNextService):
1747 * rendering/style/RenderStyle.h:
1749 2012-04-28 Geoffrey Garen <ggaren@apple.com>
1751 Clarified JSGlobalData (JavaScript VM) lifetime
1752 https://bugs.webkit.org/show_bug.cgi?id=85142
1754 Reviewed by Anders Carlsson.
1756 * bindings/js/WorkerScriptController.cpp:
1757 (WebCore::WorkerScriptController::~WorkerScriptController): Slightly
1758 simpler than before. We can't just rely on our default destructor
1759 because we need to hold the JSLock when we tear down the VM.
1761 * bridge/NP_jsobject.cpp:
1762 (_NPN_InvokeDefault):
1765 (_NPN_Construct): Don't RefPtr<> the JSGlobalData because it makes it
1766 seem like you know something the rest of our code doesn't know. The
1767 plugin JSGlobalData is immortal, anyway.
1769 I also removed some timeout checker related code because that feature
1770 doesn't work anymore, so it was effectively dead code.
1772 2012-04-28 Ilya Tikhonovsky <loislo@chromium.org>
1774 Web Inspector: InspectorFrontendHost.append has to be implemented for saving heap snapshots.
1775 https://bugs.webkit.org/show_bug.cgi?id=85137
1777 We can save a file with help of InspectorFrontendHost.save method,
1778 but it is suitable only for relatively small portions of data and
1779 can't process the 6Gb heap snapshot.
1780 These methods just pass the url and content into embedder.
1782 Reviewed by Yury Semikhatsky.
1784 * inspector/InspectorFrontendClient.h:
1785 (InspectorFrontendClient):
1786 * inspector/InspectorFrontendClientLocal.h:
1787 (WebCore::InspectorFrontendClientLocal::append):
1788 * inspector/InspectorFrontendHost.cpp:
1789 (WebCore::InspectorFrontendHost::append):
1791 * inspector/InspectorFrontendHost.h:
1792 (InspectorFrontendHost):
1793 * inspector/InspectorFrontendHost.idl:
1795 2012-04-28 No'am Rosenthal <noam.rosenthal@nokia.com>
1797 [Qt][Texmap] Error of cross-compiling webkit with Qt 4.8.1
1798 https://bugs.webkit.org/show_bug.cgi?id=84321
1800 Speculative build-fix for Qt 4.8.
1801 Use QGLContext for Qt 4.x instead of the platform-specific context.
1803 Reviewed by Simon Hausmann.
1805 No new tests, build fix.
1807 * platform/graphics/texmap/TextureMapperGL.cpp:
1809 (WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):
1811 2012-04-28 No'am Rosenthal <noam.rosenthal@nokia.com>
1813 [Texmap] Falling leaves demo missing opacity fade out animation
1814 https://bugs.webkit.org/show_bug.cgi?id=83691
1816 Reviewed by Martin Robinson.
1818 The bug originated from clearing an intermediate surface with glClear while the scissor
1820 When using intermediate surfaces, maintain a clip-stack for each surface, rather than
1821 a single clip-stack for the whole scene. When a surface is bound, its clip stack should
1824 Covered by existing compositing tests.
1826 * platform/graphics/texmap/TextureMapperGL.cpp:
1828 (WebCore::TextureMapperGL::ClipStack::push):
1830 (WebCore::TextureMapperGL::ClipStack::pop):
1831 (WebCore::scissorClip):
1832 (WebCore::TextureMapperGL::ClipStack::apply):
1833 (WebCore::TextureMapperGL::clipStack):
1834 (WebCore::TextureMapperGL::beginPainting):
1835 (WebCore::TextureMapperGL::drawTexture):
1836 (WebCore::BitmapTextureGL::didReset):
1837 (WebCore::BitmapTextureGL::clearIfNeeded):
1838 (WebCore::BitmapTextureGL::createFboIfNeeded):
1839 (WebCore::BitmapTextureGL::bind):
1840 (WebCore::TextureMapperGL::bindDefaultSurface):
1841 (WebCore::TextureMapperGL::bindSurface):
1842 (WebCore::TextureMapperGL::beginScissorClip):
1843 (WebCore::TextureMapperGL::beginClip):
1844 (WebCore::TextureMapperGL::endClip):
1845 * platform/graphics/texmap/TextureMapperGL.h:
1848 (WebCore::TextureMapperGL::ClipState::ClipState):
1850 (WebCore::TextureMapperGL::ClipStack::current):
1851 (WebCore::TextureMapperGL::ClipStack::clear):
1853 (WebCore::BitmapTextureGL::BitmapTextureGL):
1855 2012-04-26 Emil A Eklund <eae@chromium.org> and Levi Weintraub <leviw@chromium.org>
1857 Move Length and CSS length computation to float
1858 https://bugs.webkit.org/show_bug.cgi?id=84801
1860 Reviewed by Eric Seidel.
1862 Change Length and CSS length computation to floating point. This gets us
1863 closer to the goal of supporting subpixel layout and improves precision
1864 for SVG which already uses floating point for its layout.
1866 This change makes computedStyle return fractional values for pixel values
1867 if a fraction is specified. It also changes the result of computations
1868 where two or more values with fractional precision. Prior to this change
1869 the result of Length(2.9) + Length(2.9) would be 4 as each value would be
1870 floored. With this change the result is 5 as the addition is done with
1871 floating point precision and then the result will be floored. Once we
1872 enable subpixel layout the resulting value in this example would be 5.8.
1874 Updated existing layout tests.
1876 * css/CSSComputedStyleDeclaration.cpp:
1877 (WebCore::zoomAdjustedPixelValue):
1878 * css/CSSPrimitiveValue.cpp:
1879 (WebCore::CSSPrimitiveValue::computeLength):
1880 * css/CSSPrimitiveValue.h:
1882 (WebCore::roundForImpreciseConversion):
1883 Add specialized float version of roundForImpreciseConversion that matches
1884 the int versions rounding logic.
1886 If a value is sufficiently close to the next integer round it up to
1887 ensure that a style rule such as "width: 4.999px" evaluates to 5px
1888 instead of 4px. This is needed as, although Lengths are using floating
1889 point, the layout system still uses integer precision and floors the
1891 This will change once we move to FractionalLayoutUnits but for now this
1892 is needed to ensure compatibility with the existing system and tests.
1894 Without this specialized rounding logic we fail a handful of tests
1897 * platform/Length.h:
1898 (WebCore::Length::value):
1900 (WebCore::Length::intValue):
1901 * rendering/RenderTableCell.cpp:
1902 (WebCore::RenderTableCell::styleOrColLogicalWidth):
1904 2012-04-28 Alexander Pavlov <apavlov@chromium.org>
1906 Web Inspector: Enable touch events feature fails touch feature detection
1907 https://bugs.webkit.org/show_bug.cgi?id=84397
1909 Whenever the touch emulation is enabled, Inspector adds a script to evaluate on load,
1910 that adds ontouch(start|end|move|cancel) properties to window.__proto__ and document.__proto__.
1912 Reviewed by Pavel Feldman.
1914 * inspector/front-end/DOMAgent.js:
1915 (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.get if):
1916 (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.scriptAddedCallback):
1917 (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged):
1918 * inspector/front-end/inspector.js:
1920 2012-04-28 Eugene Klyuchnikov <eustas.bug@gmail.com>
1922 Web Inspector: Shortcuts screen UI polish
1923 https://bugs.webkit.org/show_bug.cgi?id=84708
1925 1) remove inconsistent shadow;
1926 2) reduce border radius;
1927 3) vertically center the “X” button;
1928 4) replace unreadable symbolic shortcuts with text;
1929 5) gaps / colors / opacity adjustments;
1930 6) section-to-column distribution algorithm is replaced with a fair one.
1932 Reviewed by Pavel Feldman.
1934 This is a UI polising patch, so no new tests added.
1936 * English.lproj/localizedStrings.js: added keyboars arrow keys items
1937 * inspector/front-end/KeyboardShortcut.js: replace unreadable symbolic shortcuts with text
1938 * inspector/front-end/ShortcutsScreen.js:
1939 (WebInspector.ShortcutsScreen):
1940 (WebInspector.ShortcutsScreen.prototype.show): remove redundant parameter
1941 (WebInspector.ShortcutsScreen.prototype._buildTable): change section distributing algorithm
1942 (WebInspector.ShortcutsSection.prototype.renderSection): render colon with margins
1943 (WebInspector.ShortcutsSection.prototype._renderHeader): apply classname to th elements
1944 * inspector/front-end/helpScreen.css:
1945 (.help-window-main): reduce radius, remove shadow; tune color and opacity
1946 (.help-window-caption): fix spacing; add ruler
1947 (.help-window-title): fix spacing; remove ruler
1948 (.help-content): fix spacing
1949 (.help-close-button): fix spacing; adjust background color
1950 (.help-column-table): fix spacing
1951 (.help-table > tr > th): fix color
1952 (.help-key): fix color
1953 (.help-combine-keys, .help-key-delimiter): extract common style
1954 (.help-combine-keys): remove dupe
1955 (.help-section-title): add space between sections
1957 2012-04-28 Noel Gordon <noel.gordon@gmail.com>
1959 Remove PlatformTouchPointQt.cpp PlatformTouchEventQt.cpp from the gyp projects
1960 https://bugs.webkit.org/show_bug.cgi?id=85132
1962 Unreviewed VS2010 gyp project generation fix.
1964 PlatformTouchPointQt.cpp and PlatformTouchEventQt.cpp were removed in r115312,
1965 so remove them from the gyp projects.
1969 2012-04-28 Nikolas Zimmermann <nzimmermann@rim.com>
1971 <animateTransform type="scale"> should use '0' as effective from value not '1', if no base value is specified and from is not given
1972 https://bugs.webkit.org/show_bug.cgi?id=85133
1974 It should start from scale=0. I had that fixed before, but it got lost during merging. Restore the fix.
1975 See bug 85051, for more context why this is correct.
1977 Tests: svg/animations/animateTransform-by-scale-1-expected.svg
1978 svg/animations/animateTransform-by-scale-1.svg
1980 * svg/SVGAnimatedTransformList.cpp:
1981 (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
1983 2012-04-28 Nikolas Zimmermann <nzimmermann@rim.com>
1985 SVGAnimateColorElement doesn't support by/to animations properly
1986 https://bugs.webkit.org/show_bug.cgi?id=36704
1988 Reviewed by Antti Koivisto.
1990 Switch AnimatedColorAnimator to use the standard animateAdditiveNumber() method, taking progress & repeatCount into account.
1991 This gives us accumulation/repeatCount support for free.
1993 We just animate the four color components on their own now and clamp once at the end after addition/accumulation finished.
1994 Import <animateColor> tests from Dr. Olaf Hoffmanns SVG Animation test suite, which all pass now.
1996 While I was at it, remove the includeSMILProperties boolean from computeCSSPropertyValue - we always use the computed style
1997 without SMIL effects included, whenever we want to retrieve the "base value", or handle "inherit/currentColor".
1999 Tests: svg/animations/animateColor-additive-2a-expected.svg
2000 svg/animations/animateColor-additive-2a.svg
2001 svg/animations/animateColor-additive-2b-expected.svg
2002 svg/animations/animateColor-additive-2b.svg
2003 svg/animations/animateColor-additive-2c-expected.svg
2004 svg/animations/animateColor-additive-2c.svg
2005 svg/animations/animateColor-additive-2d-expected.svg
2006 svg/animations/animateColor-additive-2d.svg
2008 * svg/ColorDistance.cpp:
2009 (WebCore::ColorDistance::clampColor):
2010 (WebCore::ColorDistance::addColors):
2011 (WebCore::ColorDistance::addToColor):
2012 * svg/ColorDistance.h:
2014 * svg/SVGAnimateElement.cpp:
2015 (WebCore::SVGAnimateElement::resetToBaseValue):
2016 * svg/SVGAnimatedColor.cpp:
2017 (WebCore::SVGAnimatedColorAnimator::addAnimatedTypes):
2018 (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
2019 * svg/SVGAnimationElement.cpp:
2020 (WebCore::SVGAnimationElement::computeCSSPropertyValue):
2021 (WebCore::SVGAnimationElement::adjustForInheritance):
2022 * svg/SVGAnimationElement.h:
2023 (SVGAnimationElement):
2025 2012-04-28 Nikolas Zimmermann <nzimmermann@rim.com>
2027 Not reviewed. Fix Qt build -- I was too quick.
2029 * rendering/svg/SVGPathData.cpp: Add back Path.h include.
2031 2012-04-28 Nikolas Zimmermann <nzimmermann@rim.com>
2033 Rename SVGPathParserFactory to SVGPathUtilities and remove the obsolete singleton
2034 https://bugs.webkit.org/show_bug.cgi?id=85129
2036 SVGPathParserFactory implements the singleton pattern, but stores no members.
2037 Remove the singleton and move all functions to free-functions into SVGPathUtilities.h.
2039 Makes the code easier to read - doesn't affect any tests.
2042 * GNUmakefile.list.am:
2045 * WebCore.vcproj/WebCore.vcproj:
2046 * WebCore.xcodeproj/project.pbxproj:
2047 * rendering/svg/SVGPathData.cpp:
2048 (WebCore::updatePathFromPathElement):
2049 * rendering/svg/SVGRenderTreeAsText.cpp:
2050 (WebCore::operator<<):
2051 * svg/SVGAllInOne.cpp:
2052 * svg/SVGAnimateMotionElement.cpp:
2053 (WebCore::SVGAnimateMotionElement::parseAttribute):
2054 * svg/SVGAnimatedPath.cpp:
2055 (WebCore::SVGAnimatedPathAnimator::constructFromString):
2056 (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
2057 (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
2058 (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes):
2059 (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
2060 * svg/SVGAnimatedType.cpp:
2061 * svg/SVGGlyphElement.cpp:
2062 (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
2063 * svg/SVGPathBlender.cpp: Fix typo s/;;/;/
2064 * svg/SVGPathElement.cpp:
2065 (WebCore::SVGPathElement::getTotalLength):
2066 (WebCore::SVGPathElement::getPointAtLength):
2067 (WebCore::SVGPathElement::getPathSegAtLength):
2068 (WebCore::SVGPathElement::parseAttribute):
2069 (WebCore::SVGPathElement::svgAttributeChanged):
2070 (WebCore::SVGPathElement::lookupOrCreateDWrapper):
2071 (WebCore::SVGPathElement::pathSegListChanged):
2072 * svg/SVGPathParserFactory.h: Removed.
2073 * svg/SVGPathSegList.cpp:
2074 (WebCore::SVGPathSegList::valueAsString):
2075 * svg/SVGPathUtilities.cpp: Renamed from Source/WebCore/svg/SVGPathParserFactory.cpp.
2077 (WebCore::globalSVGPathBuilder):
2078 (WebCore::globalSVGPathSegListBuilder):
2079 (WebCore::globalSVGPathByteStreamBuilder):
2080 (WebCore::globalSVGPathStringBuilder):
2081 (WebCore::globalSVGPathTraversalStateBuilder):
2082 (WebCore::globalSVGPathParser):
2083 (WebCore::globalSVGPathBlender):
2084 (WebCore::buildPathFromString):
2085 (WebCore::buildSVGPathByteStreamFromSVGPathSegList):
2086 (WebCore::buildPathFromByteStream):
2087 (WebCore::buildSVGPathSegListFromByteStream):
2088 (WebCore::buildStringFromByteStream):
2089 (WebCore::buildStringFromSVGPathSegList):
2090 (WebCore::buildSVGPathByteStreamFromString):
2091 (WebCore::buildAnimatedSVGPathByteStream):
2092 (WebCore::addToSVGPathByteStream):
2093 (WebCore::getSVGPathSegAtLengthFromSVGPathByteStream):
2094 (WebCore::getTotalLengthOfSVGPathByteStream):
2095 (WebCore::getPointAtLengthOfSVGPathByteStream):
2096 * svg/SVGPathUtilities.h: Added.
2098 * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
2099 (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
2101 2012-04-28 Nikolas Zimmermann <nzimmermann@rim.com>
2103 Fix repetitions & by animation support for path animations
2104 https://bugs.webkit.org/show_bug.cgi?id=85071
2106 Rubber-stamped by Antti Koivisto.
2108 Cleanup SVGPathBlender, to make it more readable.
2110 * svg/SVGPathBlender.cpp:
2111 (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
2112 (WebCore::SVGPathBlender::blendLineToVerticalSegment):
2113 (WebCore::SVGPathBlender::blendArcToSegment):
2114 (WebCore::SVGPathBlender::blendAnimatedPath):
2116 2012-04-28 Yury Semikhatsky <yurys@chromium.org>
2118 Unreviewed. Qt build fix: added new exported symbols.
2122 2012-04-28 Yury Semikhatsky <yurys@chromium.org>
2124 Unreviewed. Fix Qt minimal build after r115553.
2126 * inspector/InspectorConsoleAgent.h:
2128 2012-04-27 Nikolas Zimmermann <nzimmermann@rim.com>
2130 Fix repetitions & by animation support for path animations
2131 https://bugs.webkit.org/show_bug.cgi?id=85071
2133 Reviewed by Antti Koivisto.
2135 Implement additive="sum" / by-animation support for path animations, eg.
2136 <path d="M 10 10 L 10 100 Z">
2137 <animate attributeName="d" begin="0s" dur="4s" by="M 0 0 L 90 0 Z"/>
2140 animates the d attribute to "M 10 10 L 100 100 0 Z".
2142 Now only <animateColor> and <animateMotion> are left to be fixed, all other types are working as expected now in all additive/accumulate/from-by/by/from-to animations.
2144 Tests: svg/animations/path-animation-expected.svg
2145 svg/animations/repeating-path-animation-expected.svg
2146 svg/animations/repeating-path-animation.svg
2148 * svg/SVGAnimatedPath.cpp:
2149 (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes): Implemented, to support by-animations, instead of falling back to to-animations.
2150 (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue): Handle repetitions, accumulation & addition.
2151 * svg/SVGPathBlender.cpp: Allow empty from source everywhere, use default values if no from value is specified, needed for by-animations.
2152 (WebCore::SVGPathBlender::SVGPathBlender):
2153 (WebCore::SVGPathBlender::blendAnimatedDimensonalFloat):
2154 (WebCore::SVGPathBlender::blendAnimatedFloatPoint):
2155 (WebCore::SVGPathBlender::blendMoveToSegment):
2156 (WebCore::SVGPathBlender::blendLineToSegment):
2157 (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
2158 (WebCore::SVGPathBlender::blendLineToVerticalSegment):
2159 (WebCore::SVGPathBlender::blendCurveToCubicSegment):
2160 (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
2161 (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
2162 (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
2163 (WebCore::SVGPathBlender::blendArcToSegment):
2164 (WebCore::SVGPathBlender::addAnimatedPath):
2165 (WebCore::SVGPathBlender::blendAnimatedPath):
2166 * svg/SVGPathBlender.h: Add new addAnimatedPath function.
2168 * svg/SVGPathByteStream.h:
2169 (SVGPathByteStream): Make SVGPathByteStreams copyable, needed for SVGAnimatedPathAnimator.
2170 (WebCore::SVGPathByteStream::size): Returns size of the SVGPathByteStream.
2171 * svg/SVGPathParserFactory.cpp:
2172 (WebCore::SVGPathParserFactory::buildAnimatedSVGPathByteStream): Allow empty from streams, needed for by animations.
2173 (WebCore::SVGPathParserFactory::addToSVGPathByteStream): Add 'byStream' 'repeatCount' times to 'toStream'. Both streams must match in size.
2174 * svg/SVGPathParserFactory.h: Add new addToSVGPathByteStream function.
2175 * svg/SVGPointList.cpp: Remove dead code.
2176 * svg/SVGPointList.h: Ditto.
2179 2012-04-28 Nikolas Zimmermann <nzimmermann@rim.com>
2181 SVGAnimateMotion does not handle accumulation
2182 https://bugs.webkit.org/show_bug.cgi?id=18564
2184 Reviewed by Antti Koivisto.
2186 Implement accumulation for <animateMotion>. Add lots of new
2187 reftests, verifying additive/accumulate behavior is correct.
2189 Tests: svg/animations/animateMotion-additive-1-expected.svg
2190 svg/animations/animateMotion-additive-1.svg
2191 svg/animations/animateMotion-additive-2a-expected.svg
2192 svg/animations/animateMotion-additive-2a.svg
2193 svg/animations/animateMotion-additive-2b-expected.svg
2194 svg/animations/animateMotion-additive-2b.svg
2195 svg/animations/animateMotion-additive-2c-expected.svg
2196 svg/animations/animateMotion-additive-2c.svg
2197 svg/animations/animateMotion-additive-2d-expected.svg
2198 svg/animations/animateMotion-additive-2d.svg
2199 svg/animations/mozilla/animateMotion-by-1-expected.svg
2200 svg/animations/mozilla/animateMotion-by-1.svg
2201 svg/animations/mozilla/animateMotion-from-to-1-expected.svg
2202 svg/animations/mozilla/animateMotion-from-to-1.svg
2203 svg/animations/mozilla/animateMotion-indefinite-to-1-expected.svg
2204 svg/animations/mozilla/animateMotion-indefinite-to-1.svg
2205 svg/animations/mozilla/animateMotion-indefinite-to-2-expected.svg
2206 svg/animations/mozilla/animateMotion-indefinite-to-2.svg
2207 svg/animations/mozilla/animateMotion-mpath-pathLength-1-expected.svg
2208 svg/animations/mozilla/animateMotion-mpath-pathLength-1.svg
2209 svg/animations/mozilla/animateMotion-mpath-targetChange-1-expected.svg
2210 svg/animations/mozilla/animateMotion-mpath-targetChange-1.svg
2211 svg/animations/mozilla/animateMotion-to-overridden-1-expected.svg
2212 svg/animations/mozilla/animateMotion-to-overridden-1.svg
2214 * svg/SVGAnimateMotionElement.cpp:
2215 (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
2216 (WebCore::SVGAnimateMotionElement::buildTransformForProgress):
2217 (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
2218 * svg/SVGAnimateMotionElement.h:
2220 2012-04-27 Yury Semikhatsky <yurys@chromium.org>
2222 ScriptStateProtectedPtr should not keep a strong reference to the context
2223 https://bugs.webkit.org/show_bug.cgi?id=85009
2225 Delete console message arguments when DOMWindow where the messages were created
2226 is reset on its frame.
2228 Reviewed by Pavel Feldman.
2230 Test: http/tests/inspector-enabled/console-clear-arguments-on-frame-navigation.html
2232 * inspector/ConsoleMessage.cpp:
2233 (WebCore::ConsoleMessage::addToFrontend):
2234 (WebCore::ConsoleMessage::windowCleared):
2235 (WebCore::ConsoleMessage::argumentCount):
2237 * inspector/ConsoleMessage.h:
2239 * inspector/InspectorConsoleAgent.cpp:
2240 (WebCore::InspectorConsoleAgent::consoleMessageArgumentCounts):
2242 * inspector/InspectorConsoleAgent.h:
2243 (InspectorConsoleAgent):
2245 (WebCore::Frame::clearDOMWindow):
2246 (WebCore::Frame::setDOMWindow):
2247 * testing/Internals.cpp:
2249 (WebCore::Internals::consoleMessageArgumentCounts):
2250 * testing/Internals.h:
2252 * testing/Internals.idl:
2254 2012-04-27 Jochen Eisinger <jochen@chromium.org>
2256 Ensure that there's always a provisional document loader if the frame loader is in provisional state
2257 https://bugs.webkit.org/show_bug.cgi?id=83894
2259 Reviewed by Nate Chapin.
2261 We're still seeing crashes in the FrameLoader where the FrameLoader's
2262 state is "provisional" but there is no provisional document loader. I
2263 added code to update the FrameLoader's state everytime the provisional
2264 document loader is cleared, and added checks that the FrameLoader's
2265 state can't be set to provisional without a provisional loader.
2267 If the crashes go away, or the newly added checks reveal the culprit,
2268 we should relex the checks to use ASSERT() instead of CRASH().
2270 * loader/FrameLoader.cpp:
2271 (WebCore::FrameLoader::init):
2272 (WebCore::FrameLoader::setupForReplace):
2273 (WebCore::FrameLoader::stopAllLoaders):
2274 (WebCore::FrameLoader::clearProvisionalLoad):
2275 (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
2276 (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2278 2012-04-27 Geoffrey Garen <ggaren@apple.com>
2280 Try to fix the Qt build.
2282 * bridge/qt/qt_runtime.cpp:
2283 (JSC::Bindings::QtRuntimeMethod::finishCreation):
2285 2012-04-27 Geoffrey Garen <ggaren@apple.com>
2287 Made WeakSet::allocate() static and removed its JSGlobalData argument
2288 https://bugs.webkit.org/show_bug.cgi?id=85128
2290 Reviewed by Anders Carlsson.
2292 Mechanically removed JSGlobalData arguments from PassWeak<T> and Weak<T> allocation.
2294 * bindings/js/JSDOMBinding.cpp:
2295 (WebCore::jsStringSlowCase):
2296 * bindings/js/JSEventListener.h:
2297 (WebCore::JSEventListener::setWrapper):
2298 * bindings/js/JSNodeFilterCondition.cpp:
2299 (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
2300 * bindings/js/ScriptWrappable.h:
2301 (WebCore::ScriptWrappable::setWrapper):
2302 * bridge/jsc/BridgeJSC.cpp:
2303 (JSC::Bindings::Instance::createRuntimeObject):
2304 * bridge/qt/qt_runtime.cpp:
2305 (JSC::Bindings::QtRuntimeMethod::finishCreation):
2306 * bridge/runtime_root.cpp:
2307 (JSC::Bindings::RootObject::addRuntimeObject):
2309 2012-04-27 Mark Rowe <mrowe@apple.com>
2311 <rdar://problem/11313710> Leaks under WebCore::CSSImageSetValue::cachedImageSet when running tests
2313 There was a reference cycle between CSSImageSetValue and StyleCachedImageSet via
2314 CSSImageSetValue::m_imageSet / StyleCachedImageSet::m_imageSetValue. Break the cycle
2315 by having StyleCachedImageSet hold a weak reference to the CSSImageSetValue rather
2316 than a strong reference.
2318 Reviewed by Geoff Garen.
2320 * rendering/style/StyleCachedImageSet.cpp:
2321 (WebCore::StyleCachedImageSet::StyleCachedImageSet):
2322 * rendering/style/StyleCachedImageSet.h:
2323 (StyleCachedImageSet):
2325 2012-04-27 Mark Rowe <mrowe@apple.com>
2327 <rdar://problem/10346980> REGRESSION: Cannot enter text in Dashboard widget fields that have placeholder attribute
2329 Remove a dashboard backwards compatibility quirk that was in place to support an old version
2330 of the Stocks widget. It prevented the pointer-events property from being applied in Dashboard
2331 widgets, which caused -webkit-input-placeholder elements to eat mouse clicks rather than giving
2332 focus to the containing input elements. The offending widget has long since been fixed.
2334 Reviewed by Dan Bernstein.
2336 * css/StyleResolver.cpp:
2337 (WebCore::StyleResolver::collectMatchingRulesForList):
2339 2012-04-27 Dean Jackson <dino@apple.com>
2341 Support reverse and alternate-reverse in CA animations
2342 https://bugs.webkit.org/show_bug.cgi?id=78041
2344 Reviewed by Beth Dakin.
2346 CoreAnimation does not natively support reverse and alternate-reverse
2347 animation directions so we need to flip the animation values (keyframe
2348 keys and timing functions) that we send to GraphicsLayerCA. Unfortunately
2349 this code adds a lot of conditionals because it isn't as simple as
2350 reversing the order of keys. You also now have a different alignment of
2351 timing functions to the reversed list.
2353 New tests to cover the two new directions, making sure the timing
2354 functions are correctly inverted, and exercising fill modes.
2356 Tests: animations/animation-direction-reverse-fill-mode-hardware.html
2357 animations/animation-direction-reverse-fill-mode.html
2358 animations/animation-direction-reverse-hardware-opacity.html
2359 animations/animation-direction-reverse-hardware.html
2360 animations/animation-direction-reverse-non-hardware.html
2361 animations/animation-direction-reverse-timing-functions-hardware.html
2362 animations/animation-direction-reverse-timing-functions.html
2364 * platform/graphics/ca/GraphicsLayerCA.cpp:
2365 Handle the previously unsupported animation directions, reversing
2366 the list of values and keytimes that would be used to create
2368 (WebCore::GraphicsLayerCA::addAnimation):
2369 Do not create an animation if on Windows and using a reverse
2371 (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
2372 (WebCore::GraphicsLayerCA::setupAnimation):
2373 (WebCore::GraphicsLayerCA::setAnimationEndpoints):
2374 (WebCore::GraphicsLayerCA::setAnimationKeyframes):
2375 (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
2376 (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):
2377 (WebCore::GraphicsLayerCA::setFilterAnimationEndpoints):
2378 (WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
2379 * platform/graphics/ca/PlatformCAAnimation.h:
2380 (PlatformCAAnimation): Pass through a flag that tells the CA Animation
2381 that it should invert the timing functions.
2382 * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2383 (toCAMediaTimingFunction): Add a parameter that will invert the timing
2384 function coefficients if necessary.
2385 (PlatformCAAnimation::setTimingFunction):
2386 (PlatformCAAnimation::setTimingFunctions):
2387 * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2388 (toCACFTimingFunction):
2389 New unused parameter.
2391 2012-04-27 Sheriff Bot <webkit.review.bot@gmail.com>
2393 Unreviewed, rolling out r115407.
2394 http://trac.webkit.org/changeset/115407
2395 https://bugs.webkit.org/show_bug.cgi?id=85126
2397 Caused heap use after free (Requested by keishi_ on #webkit).
2399 * html/HTMLFormControlElement.cpp:
2400 (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2401 (WebCore::HTMLFormControlElement::updateFieldSetAndLegendAncestor):
2402 (WebCore::HTMLFormControlElement::insertedInto):
2403 (WebCore::HTMLFormControlElement::removedFrom):
2404 (WebCore::HTMLFormControlElement::disabled):
2405 (WebCore::HTMLFormControlElement::recalcWillValidate):
2406 (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
2407 * html/HTMLFormControlElement.h:
2408 (HTMLFormControlElement):
2410 2012-04-27 Kentaro Hara <haraken@chromium.org>
2412 [JSC] Implement a helper method createNotEnoughArgumentsError()
2413 https://bugs.webkit.org/show_bug.cgi?id=85102
2415 Reviewed by Geoffrey Garen.
2417 In bug 84787, kbr@ requested to avoid hard-coding
2418 createTypeError(exec, "Not enough arguments") here and there.
2419 This patch implements createNotEnoughArgumentsError(exec)
2420 and uses it in JSC bindings.
2422 c.f. a corresponding bug for V8 bindings is bug 85097.
2424 Test: bindings/scripts/test/TestObj.idl
2426 * bindings/scripts/CodeGeneratorJS.pm: Modified as described above.
2427 (GenerateArgumentsCountCheck):
2429 * bindings/js/JSDataViewCustom.cpp: Ditto.
2430 (WebCore::getDataViewMember):
2431 (WebCore::setDataViewMember):
2432 * bindings/js/JSDeprecatedPeerConnectionCustom.cpp:
2433 (WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection):
2434 * bindings/js/JSDirectoryEntryCustom.cpp:
2435 (WebCore::JSDirectoryEntry::getFile):
2436 (WebCore::JSDirectoryEntry::getDirectory):
2437 * bindings/js/JSSharedWorkerCustom.cpp:
2438 (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
2439 * bindings/js/JSWebKitMutationObserverCustom.cpp:
2440 (WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
2441 (WebCore::JSWebKitMutationObserver::observe):
2442 * bindings/js/JSWorkerCustom.cpp:
2443 (WebCore::JSWorkerConstructor::constructJSWorker):
2445 * bindings/scripts/test/JS/JSFloat64Array.cpp: Updated run-bindings-tests.
2446 (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
2447 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2448 (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
2449 (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
2450 * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2451 (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
2452 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2453 (WebCore::jsTestEventTargetPrototypeFunctionItem):
2454 (WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
2455 (WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
2456 (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
2457 * bindings/scripts/test/JS/JSTestInterface.cpp:
2458 (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
2459 (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
2460 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2461 (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
2462 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2463 (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
2464 * bindings/scripts/test/JS/JSTestObj.cpp:
2465 (WebCore::JSTestObjConstructor::constructJSTestObj):
2466 (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
2467 (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs):
2468 (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
2469 (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
2470 (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
2471 (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
2472 (WebCore::jsTestObjPrototypeFunctionSerializedValue):
2473 (WebCore::jsTestObjPrototypeFunctionIdbKey):
2474 (WebCore::jsTestObjPrototypeFunctionOptionsObject):
2475 (WebCore::jsTestObjPrototypeFunctionAddEventListener):
2476 (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
2477 (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
2478 (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
2479 (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
2480 (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
2481 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
2482 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
2483 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
2484 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
2485 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
2486 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
2487 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
2488 (WebCore::jsTestObjConstructorFunctionClassMethod2):
2489 (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
2490 (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
2491 (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongArray):
2492 (WebCore::jsTestObjPrototypeFunctionConvert1):
2493 (WebCore::jsTestObjPrototypeFunctionConvert2):
2494 (WebCore::jsTestObjPrototypeFunctionConvert3):
2495 (WebCore::jsTestObjPrototypeFunctionConvert4):
2496 (WebCore::jsTestObjPrototypeFunctionConvert5):
2497 (WebCore::jsTestObjPrototypeFunctionStrictFunction):
2498 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2499 (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
2500 (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
2502 2012-04-27 Mark Pilgrim <pilgrim@chromium.org>
2504 [Chromium] Call highMemoryUsageMB directly
2505 https://bugs.webkit.org/show_bug.cgi?id=84841
2507 Reviewed by Kentaro Hara.
2509 Part of a refactoring series. See tracking bug 82948.
2511 * bindings/v8/V8GCController.cpp:
2512 (WebCore::V8GCController::checkMemoryUsage):
2513 * platform/MemoryUsageSupport.cpp:
2514 (WebCore::MemoryUsageSupport::highMemoryUsageMB):
2516 * platform/MemoryUsageSupport.h:
2517 (MemoryUsageSupport):
2518 * platform/chromium/MemoryUsageSupportChromium.cpp:
2519 (WebCore::MemoryUsageSupport::highMemoryUsageMB):
2521 * platform/chromium/PlatformSupport.h:
2524 2012-04-27 Geoffrey Garen <ggaren@apple.com>
2526 Only allow non-null pointers in the WeakSet
2527 https://bugs.webkit.org/show_bug.cgi?id=85119
2529 Reviewed by Darin Adler.
2531 * bridge/jsc/BridgeJSC.cpp:
2532 (JSC::Bindings::Instance::Instance): Don't allocate a WeakImpl just to
2533 store null. This was needless, and is now a compile error. Instead,
2534 rely on the default constructor, which will produce a cheap null.
2536 2012-04-27 Kentaro Hara <haraken@chromium.org>
2538 "Not enough arguments" error should be TypeError
2539 https://bugs.webkit.org/show_bug.cgi?id=84628
2541 Reviewed by Darin Adler.
2543 Currently, some custom bindings implement "Not enough arguments"
2544 error as SyntaxError. The Web IDL spec requires that it should be
2545 TypeError: http://www.w3.org/TR/WebIDL/#dfn-overload-resolution-algorithm
2546 Thus, this patch changes SyntaxError to TypeError.
2548 Tests: http/tests/websocket/tests/hixie76/url-parsing.html:
2549 http/tests/websocket/tests/hybi/url-parsing.html:
2550 http/tests/xmlhttprequest/exceptions.html:
2551 svg/dom/SVGLength.html:
2552 webaudio/audionode.html:
2554 * bindings/js/JSAudioContextCustom.cpp:
2555 (WebCore::JSAudioContextConstructor::constructJSAudioContext):
2556 * bindings/js/JSSVGLengthCustom.cpp:
2557 (WebCore::JSSVGLength::convertToSpecifiedUnits):
2558 * bindings/js/JSWebSocketCustom.cpp:
2559 (WebCore::JSWebSocketConstructor::constructJSWebSocket):
2560 (WebCore::JSWebSocket::send):
2561 * bindings/js/JSXMLHttpRequestCustom.cpp:
2562 (WebCore::JSXMLHttpRequest::open):
2563 * bindings/v8/custom/V8AudioContextCustom.cpp:
2564 (WebCore::V8AudioContext::constructorCallback):
2565 * bindings/v8/custom/V8SVGLengthCustom.cpp:
2566 (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
2567 * bindings/v8/custom/V8WebSocketCustom.cpp:
2568 (WebCore::V8WebSocket::constructorCallback):
2569 (WebCore::V8WebSocket::sendCallback):
2570 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2571 (WebCore::V8XMLHttpRequest::openCallback):
2573 2012-04-27 Kenneth Russell <kbr@google.com>
2575 Remove SHADER_COMPILER constant
2576 https://bugs.webkit.org/show_bug.cgi?id=85115
2578 Reviewed by Darin Adler.
2580 Removed constant which was previously removed from spec. Updated
2581 layout test and expected results.
2583 * html/canvas/WebGLRenderingContext.idl:
2585 2012-04-27 Arvid Nilsson <anilsson@rim.com>
2587 [BlackBerry] Fixed background is scrolling in http://www.nieuwecode.nl
2588 https://bugs.webkit.org/show_bug.cgi?id=85109
2590 Reviewed by Antonio Gomes.
2592 Since the BlackBerry port uses very similar fixed position acceleration
2593 as the Qt WebKit2 port, the same fix that worked for them in bug 83980
2596 Fixed by opting in to the FIXED_POSITION_CREATES_STACKING_CONTEXT
2599 Covered by existing manual test fixed-position-no-z-index.html.
2601 * css/StyleResolver.cpp:
2603 2012-04-27 Nat Duca <nduca@chromium.org>
2605 Expose high-resolution on requestAnimationFrame callback
2606 https://bugs.webkit.org/show_bug.cgi?id=66683
2608 This changes requestAnimationFrame's animationStartTime argument
2609 to be a high resolution DOM timestamp, per disucssion here:
2610 http://lists.w3.org/Archives/Public/public-web-perf/2012Apr/0004.html
2612 Reviewed by James Robinson.
2614 Covered by existing requestAnimationFrame tests.
2617 (WebCore::Document::serviceScriptedAnimations):
2620 * dom/ScriptedAnimationController.cpp:
2621 (WebCore::ScriptedAnimationController::ScriptedAnimationController):
2622 (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
2624 (WebCore::ScriptedAnimationController::windowScreenDidChange):
2625 (WebCore::ScriptedAnimationController::scheduleAnimation):
2626 (WebCore::ScriptedAnimationController::animationTimerFired):
2627 (WebCore::ScriptedAnimationController::displayRefreshFired):
2628 * dom/ScriptedAnimationController.h:
2629 (ScriptedAnimationController):
2630 * page/FrameView.cpp:
2631 (WebCore::FrameView::serviceScriptedAnimations):
2634 * platform/graphics/DisplayRefreshMonitor.cpp:
2635 (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
2636 (WebCore::DisplayRefreshMonitor::notifyClients):
2637 * platform/graphics/DisplayRefreshMonitor.h:
2638 (DisplayRefreshMonitor):
2639 * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
2640 (WebCore::DisplayRefreshMonitor::displayLinkFired):
2641 * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
2643 (WebCore::DisplayRefreshMonitor::requestRefreshCallback):
2644 (WebCore::DisplayRefreshMonitor::displayLinkFired):
2646 2012-04-27 Kentaro Hara <haraken@chromium.org>
2648 [V8] Implement a helper method V8Proxy::throwNotEnoughArgumentsError()
2649 https://bugs.webkit.org/show_bug.cgi?id=85097
2651 Reviewed by Kenneth Russell.
2653 In bug 84787, kbr requested to avoid hard-coding
2654 throwError("Not enough arguments", V8Proxy::TypeError) here and there.
2655 This patch implements V8Proxy::throwNotEnoughArgumentsError()
2656 and uses it in V8 bindings.
2658 No tests. No change in behavior.
2660 * bindings/scripts/CodeGeneratorV8.pm:
2661 (GenerateArgumentsCountCheck):
2662 (GenerateEventConstructorCallback):
2663 * bindings/v8/V8Proxy.cpp:
2664 (WebCore::V8Proxy::throwNotEnoughArgmentsError):
2666 * bindings/v8/V8Proxy.h:
2668 * bindings/v8/custom/V8DataViewCustom.cpp:
2669 (WebCore::V8DataView::getInt8Callback):
2670 (WebCore::V8DataView::getUint8Callback):
2671 (WebCore::V8DataView::setInt8Callback):
2672 (WebCore::V8DataView::setUint8Callback):
2673 * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
2674 (WebCore::V8DirectoryEntry::getDirectoryCallback):
2675 (WebCore::V8DirectoryEntry::getFileCallback):
2676 * bindings/v8/custom/V8IntentConstructor.cpp:
2677 (WebCore::V8Intent::constructorCallback):
2678 * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
2679 (WebCore::V8WebKitMutationObserver::constructorCallback):
2680 (WebCore::V8WebKitMutationObserver::observeCallback):
2682 Test: bindings/scripts/test/TestObj.idl
2684 * bindings/scripts/CodeGeneratorV8.pm: Modified as described above.
2685 (GenerateArgumentsCountCheck):
2686 (GenerateEventConstructorCallback):
2688 * bindings/v8/V8Proxy.cpp: Ditto.
2689 (WebCore::V8Proxy::throwNotEnoughArgumentsError):
2691 * bindings/v8/V8Proxy.h:
2693 * bindings/v8/custom/V8DataViewCustom.cpp:
2694 (WebCore::V8DataView::getInt8Callback):
2695 (WebCore::V8DataView::getUint8Callback):
2696 (WebCore::V8DataView::setInt8Callback):
2697 (WebCore::V8DataView::setUint8Callback):
2698 * bindings/v8/custom/V8DirectoryEntryCustom.cpp:
2699 (WebCore::V8DirectoryEntry::getDirectoryCallback):
2700 (WebCore::V8DirectoryEntry::getFileCallback):
2701 * bindings/v8/custom/V8IntentConstructor.cpp:
2702 (WebCore::V8Intent::constructorCallback):
2703 * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
2704 (WebCore::V8WebKitMutationObserver::constructorCallback):
2705 (WebCore::V8WebKitMutationObserver::observeCallback):
2707 * bindings/scripts/test/V8/V8Float64Array.cpp: Updated run-bindings-tests.
2708 (WebCore::Float64ArrayV8Internal::fooCallback):
2709 * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2710 (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
2711 (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
2712 * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2713 (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
2714 * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2715 (WebCore::V8TestEventConstructor::constructorCallback):
2716 * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2717 (WebCore::TestEventTargetV8Internal::itemCallback):
2718 (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
2719 * bindings/scripts/test/V8/V8TestInterface.cpp:
2720 (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
2721 (WebCore::V8TestInterface::constructorCallback):
2722 * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2723 (WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
2724 * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2725 (WebCore::V8TestNamedConstructorConstructorCallback):
2726 * bindings/scripts/test/V8/V8TestObj.cpp:
2727 (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
2728 (WebCore::TestObjV8Internal::intMethodWithArgsCallback):
2729 (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
2730 (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
2731 (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
2732 (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
2733 (WebCore::TestObjV8Internal::serializedValueCallback):
2734 (WebCore::TestObjV8Internal::idbKeyCallback):
2735 (WebCore::TestObjV8Internal::optionsObjectCallback):
2736 (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
2737 (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
2738 (WebCore::TestObjV8Internal::methodWithCallbackArgCallback):
2739 (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
2740 (WebCore::TestObjV8Internal::overloadedMethod1Callback):
2741 (WebCore::TestObjV8Internal::overloadedMethod2Callback):
2742 (WebCore::TestObjV8Internal::overloadedMethod3Callback):
2743 (WebCore::TestObjV8Internal::overloadedMethod4Callback):
2744 (WebCore::TestObjV8Internal::overloadedMethod5Callback):
2745 (WebCore::TestObjV8Internal::overloadedMethod6Callback):
2746 (WebCore::TestObjV8Internal::overloadedMethod7Callback):
2747 (WebCore::TestObjV8Internal::overloadedMethod11Callback):
2748 (WebCore::TestObjV8Internal::overloadedMethod12Callback):
2749 (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
2750 (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
2751 (WebCore::TestObjV8Internal::convert1Callback):
2752 (WebCore::TestObjV8Internal::convert2Callback):
2753 (WebCore::TestObjV8Internal::convert3Callback):
2754 (WebCore::TestObjV8Internal::convert4Callback):
2755 (WebCore::TestObjV8Internal::convert5Callback):
2756 (WebCore::TestObjV8Internal::strictFunctionCallback):
2757 (WebCore::V8TestObj::constructorCallback):
2758 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2759 (WebCore::TestSerializedScriptValueInterfaceV8Internal::acceptTransferListCallback):
2760 (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
2762 2012-04-27 Mark Pilgrim <pilgrim@chromium.org>
2764 [Chromium] Call lowMemoryUsageMB directly
2765 https://bugs.webkit.org/show_bug.cgi?id=84840
2767 Reviewed by Kentaro Hara.
2769 Part of a refactoring series. See tracking bug 82948.
2771 * bindings/v8/V8GCController.cpp:
2772 (WebCore::V8GCController::checkMemoryUsage):
2773 * platform/MemoryUsageSupport.cpp:
2774 (WebCore::MemoryUsageSupport::lowMemoryUsageMB):
2776 * platform/MemoryUsageSupport.h:
2777 (MemoryUsageSupport):
2778 * platform/chromium/MemoryUsageSupportChromium.cpp:
2779 (WebCore::MemoryUsageSupport::lowMemoryUsageMB):
2781 * platform/chromium/PlatformSupport.h:
2784 2012-04-27 Yi Shen <yi.4.shen@nokia.com>
2786 REGRESSION(113723): Pressing enter in this list example deletes the whole list
2787 https://bugs.webkit.org/show_bug.cgi?id=85016
2789 Reviewed by Enrica Casucci.
2791 The bug was caused by CompositeEditCommand::breakOutOfEmptyListItem, which calls isListItem
2792 on the empty list's siblings to decide which part of the list should get removed. However,
2793 the check fails when the empty list's sibling is a text node, or a list element (e.g. ul, ol).
2794 Fixed it by skipping empty list's non-element sibling and calling isListElement to do further
2797 Test: added new test cases in the existing test (break-out-of-empty-list-item.html)
2799 * editing/CompositeEditCommand.cpp:
2800 (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
2802 2012-04-27 Ian Vollick <vollick@chromium.org>
2804 [chromium] Add pause and resume support for accelerated css animations.
2805 https://bugs.webkit.org/show_bug.cgi?id=84601
2807 Reviewed by James Robinson.
2810 CCLayerAnimationControllerTest.syncPauseResume
2811 CCActiveAnimationTest.TrimTimeTimeOffset
2812 CCActiveAnimationTest.TrimTimeSuspendResume
2813 CCActiveAnimationTest.IsFinishedNeedsSynchronizedStartTime
2814 CCActiveAnimationTest.RunStateChangesIgnoredWhileSuspended
2816 * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2817 (WebCore::GraphicsLayerChromium::suspendAnimations):
2818 (WebCore::GraphicsLayerChromium::resumeAnimations):
2819 * platform/graphics/chromium/GraphicsLayerChromium.h:
2820 (GraphicsLayerChromium):
2821 * platform/graphics/chromium/LayerChromium.cpp:
2822 (WebCore::LayerChromium::suspendAnimations):
2823 (WebCore::LayerChromium::resumeAnimations):
2824 * platform/graphics/chromium/LayerChromium.h:
2826 * platform/graphics/chromium/cc/CCActiveAnimation.cpp:
2827 (WebCore::CCActiveAnimation::CCActiveAnimation):
2828 (WebCore::CCActiveAnimation::setRunState):
2829 (WebCore::CCActiveAnimation::suspend):
2830 (WebCore::CCActiveAnimation::resume):
2831 (WebCore::CCActiveAnimation::isFinishedAt):
2832 (WebCore::CCActiveAnimation::trimTimeToCurrentIteration):
2833 (WebCore::CCActiveAnimation::cloneForImplThread):
2834 (WebCore::CCActiveAnimation::pushPropertiesTo):
2835 * platform/graphics/chromium/cc/CCActiveAnimation.h:
2836 (CCActiveAnimation):
2837 (WebCore::CCActiveAnimation::setStartTime):
2838 (WebCore::CCActiveAnimation::timeOffset):
2839 (WebCore::CCActiveAnimation::setTimeOffset):
2840 (WebCore::CCActiveAnimation::isFinished):
2841 * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
2842 (WebCore::CCLayerAnimationController::addAnimation):
2843 (WebCore::CCLayerAnimationController::pauseAnimation):
2844 (WebCore::CCLayerAnimationController::suspendAnimations):
2845 (WebCore::CCLayerAnimationController::resumeAnimations):
2846 (WebCore::CCLayerAnimationController::pushAnimationUpdatesTo):
2847 (WebCore::CCLayerAnimationController::getActiveAnimation):
2848 (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
2849 (WebCore::CCLayerAnimationController::removeAnimationsCompletedOnMainThread):
2850 (WebCore::CCLayerAnimationController::pushPropertiesToImplThread):
2852 (WebCore::CCLayerAnimationController::tickAnimations):
2853 * platform/graphics/chromium/cc/CCLayerAnimationController.h:
2854 (CCLayerAnimationController):
2856 2012-04-27 Tim Horton <timothy_horton@apple.com>
2858 SMIL animation causes leak of the related Document (and many elements)
2859 https://bugs.webkit.org/show_bug.cgi?id=83856
2860 <rdar://problem/11216047>
2862 Reviewed by Dean Jackson.
2864 The SVGAnimatedProperty cache was previously holding a reference to the properties it contained;
2865 said references were cleared in the SVGAnimatedProperty destructor (which was never called because
2866 there was always one remaining reference from the cache).
2868 The SVGAnimatedProperty cache now holds raw pointers instead of RefPtrs; the SVGAnimateElement now
2869 owns its own SVGAnimatedProperties, both for itself and for any <use/> instances of itself. They're
2870 cleared and destroyed within SVGAnimateElement::targetElementWillChange, at which time they're removed
2873 SVGPropertyTearOffs now keep a reference to their SVGElement (m_contextElement) instead of their SVGAnimatedProperty;
2874 this way, there is no reference cycle, but the animated property (owned by the element) and the element itself are
2875 kept alive until the TearOff is garbage collected.
2877 Tests: svg/animations/smil-leak-dynamically-added-element-instances.svg
2878 svg/animations/smil-leak-elements.svg
2879 svg/animations/smil-leak-element-instances-noBaseValRef.svg
2880 svg/animations/smil-leak-element-instances.svg
2881 svg/animations/svglength-element-removed-crash.svg
2883 * svg/SVGAnimateElement.cpp:
2884 (WebCore::SVGAnimateElement::calculateAnimatedValue):
2885 (WebCore::propertyTypesAreConsistent):
2886 (WebCore::SVGAnimateElement::resetToBaseValue):
2887 (WebCore::SVGAnimateElement::applyResultsToTarget):
2888 (WebCore::SVGAnimateElement::targetElementWillChange):
2889 * svg/SVGAnimateElement.h:
2890 (SVGAnimateElement):
2891 * svg/SVGAnimatedAngle.cpp:
2892 (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation):
2893 (WebCore::SVGAnimatedAngleAnimator::stopAnimValAnimation):
2894 (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
2895 (WebCore::SVGAnimatedAngleAnimator::animValWillChange):
2896 (WebCore::SVGAnimatedAngleAnimator::animValDidChange):
2897 * svg/SVGAnimatedAngle.h:
2898 (SVGAnimatedAngleAnimator):
2899 * svg/SVGAnimatedBoolean.cpp:
2900 (WebCore::SVGAnimatedBooleanAnimator::startAnimValAnimation):
2901 (WebCore::SVGAnimatedBooleanAnimator::stopAnimValAnimation):
2902 (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
2903 (WebCore::SVGAnimatedBooleanAnimator::animValWillChange):
2904 (WebCore::SVGAnimatedBooleanAnimator::animValDidChange):
2905 * svg/SVGAnimatedBoolean.h:
2906 (SVGAnimatedBooleanAnimator):
2907 * svg/SVGAnimatedColor.h:
2908 (WebCore::SVGAnimatedColorAnimator::startAnimValAnimation):
2909 (WebCore::SVGAnimatedColorAnimator::stopAnimValAnimation):
2910 (WebCore::SVGAnimatedColorAnimator::resetAnimValToBaseVal):
2911 (WebCore::SVGAnimatedColorAnimator::animValWillChange):
2912 (WebCore::SVGAnimatedColorAnimator::animValDidChange):
2913 * svg/SVGAnimatedEnumeration.cpp:
2914 (WebCore::SVGAnimatedEnumerationAnimator::startAnimValAnimation):
2915 (WebCore::SVGAnimatedEnumerationAnimator::stopAnimValAnimation):
2916 (WebCore::SVGAnimatedEnumerationAnimator::resetAnimValToBaseVal):
2917 (WebCore::SVGAnimatedEnumerationAnimator::animValWillChange):
2918 (WebCore::SVGAnimatedEnumerationAnimator::animValDidChange):
2919 * svg/SVGAnimatedEnumeration.h:
2920 (SVGAnimatedEnumerationAnimator):
2921 * svg/SVGAnimatedInteger.cpp:
2922 (WebCore::SVGAnimatedIntegerAnimator::startAnimValAnimation):
2923 (WebCore::SVGAnimatedIntegerAnimator::stopAnimValAnimation):
2924 (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
2925 (WebCore::SVGAnimatedIntegerAnimator::animValWillChange):
2926 (WebCore::SVGAnimatedIntegerAnimator::animValDidChange):
2927 * svg/SVGAnimatedInteger.h:
2928 (SVGAnimatedIntegerAnimator):
2929 * svg/SVGAnimatedIntegerOptionalInteger.cpp:
2930 (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation):
2931 (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::stopAnimValAnimation):
2932 (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
2933 (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValWillChange):
2934 (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::animValDidChange):
2935 * svg/SVGAnimatedIntegerOptionalInteger.h:
2936 (SVGAnimatedIntegerOptionalIntegerAnimator):
2937 * svg/SVGAnimatedLength.cpp:
2938 (WebCore::SVGAnimatedLengthAnimator::startAnimValAnimation):
2939 (WebCore::SVGAnimatedLengthAnimator::stopAnimValAnimation):
2940 (WebCore::SVGAnimatedLengthAnimator::resetAnimValToBaseVal):
2941 (WebCore::SVGAnimatedLengthAnimator::animValWillChange):
2942 (WebCore::SVGAnimatedLengthAnimator::animValDidChange):
2943 * svg/SVGAnimatedLength.h:
2944 (SVGAnimatedLengthAnimator):
2945 * svg/SVGAnimatedLengthList.cpp:
2946 (WebCore::SVGAnimatedLengthListAnimator::startAnimValAnimation):
2947 (WebCore::SVGAnimatedLengthListAnimator::stopAnimValAnimation):
2948 (WebCore::SVGAnimatedLengthListAnimator::resetAnimValToBaseVal):
2949 (WebCore::SVGAnimatedLengthListAnimator::animValWillChange):
2950 (WebCore::SVGAnimatedLengthListAnimator::animValDidChange):
2951 * svg/SVGAnimatedLengthList.h:
2952 (SVGAnimatedLengthListAnimator):
2953 * svg/SVGAnimatedNumber.cpp:
2954 (WebCore::SVGAnimatedNumberAnimator::startAnimValAnimation):
2955 (WebCore::SVGAnimatedNumberAnimator::stopAnimValAnimation):
2956 (WebCore::SVGAnimatedNumberAnimator::resetAnimValToBaseVal):
2957 (WebCore::SVGAnimatedNumberAnimator::animValWillChange):
2958 (WebCore::SVGAnimatedNumberAnimator::animValDidChange):
2959 * svg/SVGAnimatedNumber.h:
2960 (SVGAnimatedNumberAnimator):
2961 * svg/SVGAnimatedNumberList.cpp:
2962 (WebCore::SVGAnimatedNumberListAnimator::startAnimValAnimation):
2963 (WebCore::SVGAnimatedNumberListAnimator::stopAnimValAnimation):
2964 (WebCore::SVGAnimatedNumberListAnimator::resetAnimValToBaseVal):
2965 (WebCore::SVGAnimatedNumberListAnimator::animValWillChange):
2966 (WebCore::SVGAnimatedNumberListAnimator::animValDidChange):
2967 * svg/SVGAnimatedNumberList.h:
2968 (SVGAnimatedNumberListAnimator):
2969 * svg/SVGAnimatedNumberOptionalNumber.cpp:
2970 (WebCore::SVGAnimatedNumberOptionalNumberAnimator::startAnimValAnimation):
2971 (WebCore::SVGAnimatedNumberOptionalNumberAnimator::stopAnimValAnimation):
2972 (WebCore::SVGAnimatedNumberOptionalNumberAnimator::resetAnimValToBaseVal):
2973 (WebCore::SVGAnimatedNumberOptionalNumberAnimator::animValWillChange):
2974 (WebCore::SVGAnimatedNumberOptionalNumberAnimator::animValDidChange):
2975 * svg/SVGAnimatedNumberOptionalNumber.h:
2976 (SVGAnimatedNumberOptionalNumberAnimator):
2977 * svg/SVGAnimatedPath.cpp:
2978 (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
2979 (WebCore::SVGAnimatedPathAnimator::stopAnimValAnimation):
2980 (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
2981 (WebCore::SVGAnimatedPathAnimator::animValWillChange):
2982 (WebCore::SVGAnimatedPathAnimator::animValDidChange):
2983 * svg/SVGAnimatedPath.h:
2984 (SVGAnimatedPathAnimator):
2985 * svg/SVGAnimatedPointList.cpp:
2986 (WebCore::SVGAnimatedPointListAnimator::startAnimValAnimation):
2987 (WebCore::SVGAnimatedPointListAnimator::stopAnimValAnimation):
2988 (WebCore::SVGAnimatedPointListAnimator::resetAnimValToBaseVal):
2989 (WebCore::SVGAnimatedPointListAnimator::animValWillChange):
2990 (WebCore::SVGAnimatedPointListAnimator::animValDidChange):
2991 * svg/SVGAnimatedPointList.h:
2992 (SVGAnimatedPointListAnimator):
2993 * svg/SVGAnimatedPreserveAspectRatio.cpp:
2994 (WebCore::SVGAnimatedPreserveAspectRatioAnimator::startAnimValAnimation):
2995 (WebCore::SVGAnimatedPreserveAspectRatioAnimator::stopAnimValAnimation):
2996 (WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal):
2997 (WebCore::SVGAnimatedPreserveAspectRatioAnimator::animValWillChange):
2998 (WebCore::SVGAnimatedPreserveAspectRatioAnimator::animValDidChange):
2999 * svg/SVGAnimatedPreserveAspectRatio.h:
3000 (SVGAnimatedPreserveAspectRatioAnimator):
3001 * svg/SVGAnimatedRect.cpp:
3002 (WebCore::SVGAnimatedRectAnimator::startAnimValAnimation):
3003 (WebCore::SVGAnimatedRectAnimator::stopAnimValAnimation):
3004 (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal):
3005 (WebCore::SVGAnimatedRectAnimator::animValWillChange):
3006 (WebCore::SVGAnimatedRectAnimator::animValDidChange):
3007 * svg/SVGAnimatedRect.h:
3008 (SVGAnimatedRectAnimator):
3009 * svg/SVGAnimatedString.cpp:
3010 (WebCore::SVGAnimatedStringAnimator::startAnimValAnimation):
3011 (WebCore::SVGAnimatedStringAnimator::stopAnimValAnimation):
3012 (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
3013 (WebCore::SVGAnimatedStringAnimator::animValWillChange):
3014 (WebCore::SVGAnimatedStringAnimator::animValDidChange):
3015 * svg/SVGAnimatedString.h:
3016 (SVGAnimatedStringAnimator):
3017 * svg/SVGAnimatedTransformList.cpp:
3018 (WebCore::SVGAnimatedTransformListAnimator::startAnimValAnimation):
3019 (WebCore::SVGAnimatedTransformListAnimator::stopAnimValAnimation):
3020 (WebCore::SVGAnimatedTransformListAnimator::resetAnimValToBaseVal):
3021 (WebCore::SVGAnimatedTransformListAnimator::animValWillChange):
3022 (WebCore::SVGAnimatedTransformListAnimator::animValDidChange):
3023 * svg/SVGAnimatedTransformList.h:
3024 (SVGAnimatedTransformListAnimator):
3025 * svg/SVGAnimatedTypeAnimator.h:
3026 (SVGAnimatedTypeAnimator):
3027 (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
3028 (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesFromInstancesForAttributeName):
3029 (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue):
3030 (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue):
3031 (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimationForType):
3032 (WebCore::SVGAnimatedTypeAnimator::animValDidChangeForType):
3033 (WebCore::SVGAnimatedTypeAnimator::animValWillChangeForType):
3034 (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues):
3035 (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues):
3036 (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimationForTypes):
3037 (WebCore::SVGAnimatedTypeAnimator::animValDidChangeForTypes):
3038 (WebCore::SVGAnimatedTypeAnimator::animValWillChangeForTypes):
3039 (WebCore::SVGAnimatedTypeAnimator::castAnimatedPropertyToActualType):
3040 (WebCore::SVGAnimatedTypeAnimator::executeAction):
3041 * svg/properties/SVGAnimatedProperty.h:
3042 (SVGAnimatedProperty):
3043 * svg/properties/SVGPropertyTearOff.h:
3044 (WebCore::SVGPropertyTearOff::animatedProperty):
3045 (SVGPropertyTearOff):
3047 2012-04-27 Adam Klein <adamk@chromium.org>
3049 Remove misspelled, unused, unimplemented method from V8Proxy
3050 https://bugs.webkit.org/show_bug.cgi?id=85091
3052 Reviewed by Dimitri Glazkov.
3054 * bindings/v8/V8Proxy.h:
3057 2012-04-24 Jeffrey Pfau <jpfau@apple.com>
3059 Disable RTF in JavaScript drag-and-drop
3060 https://bugs.webkit.org/show_bug.cgi?id=76597
3062 Reviewed by Maciej Stachowiak.
3064 Test: fast/events/drag-and-drop-subframe-dataTransfer.html
3066 * platform/mac/ClipboardMac.mm:
3067 (WebCore::cocoaTypeFromHTMLClipboardType):
3069 2012-04-26 James Robinson <jamesr@chromium.org>
3071 [chromium] Separate IOSurface layer type from texture layers
3072 https://bugs.webkit.org/show_bug.cgi?id=85030
3074 Reviewed by Adrienne Walker.
3076 Adds a new layer type for IOSurface layers and pipes through a separate path through to rendering. IOSurface
3077 layers are very simple - they have an IOSurface id and size, nothing else. All IOSurface layers are "flipped" in
3081 * platform/graphics/chromium/IOSurfaceLayerChromium.cpp:
3083 (WebCore::IOSurfaceLayerChromium::create):
3084 (WebCore::IOSurfaceLayerChromium::IOSurfaceLayerChromium):
3085 (WebCore::IOSurfaceLayerChromium::~IOSurfaceLayerChromium):
3086 (WebCore::IOSurfaceLayerChromium::setIOSurfaceProperties):
3087 (WebCore::IOSurfaceLayerChromium::createCCLayerImpl):
3088 (WebCore::IOSurfaceLayerChromium::drawsContent):
3089 (WebCore::IOSurfaceLayerChromium::pushPropertiesTo):
3090 * platform/graphics/chromium/IOSurfaceLayerChromium.h:
3092 (IOSurfaceLayerChromium):
3093 * platform/graphics/chromium/LayerRendererChromium.cpp:
3094 (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
3095 (WebCore::LayerRendererChromium::cleanupSharedObjects):
3096 * platform/graphics/chromium/LayerRendererChromium.h:
3097 (LayerRendererChromium):
3098 * platform/graphics/chromium/TextureLayerChromium.cpp:
3099 (WebCore::TextureLayerChromium::TextureLayerChromium):
3100 (WebCore::TextureLayerChromium::drawsContent):
3101 (WebCore::TextureLayerChromium::pushPropertiesTo):
3102 * platform/graphics/chromium/TextureLayerChromium.h:
3103 (TextureLayerChromium):
3104 * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp:
3105 (WebCore::CCIOSurfaceDrawQuad::create):
3106 (WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad):
3107 * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h:
3108 (CCIOSurfaceDrawQuad):
3109 * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
3111 (WebCore::CCIOSurfaceLayerImpl::CCIOSurfaceLayerImpl):
3112 (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
3113 (WebCore::CCIOSurfaceLayerImpl::willDraw):
3114 (WebCore::CCIOSurfaceLayerImpl::appendQuads):
3115 (WebCore::CCIOSurfaceLayerImpl::dumpLayerProperties):
3116 (WebCore::CCIOSurfaceLayerImpl::didLoseContext):
3117 (WebCore::CCIOSurfaceLayerImpl::setIOSurfaceProperties):
3118 * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h:
3120 (CCIOSurfaceLayerImpl):
3121 (WebCore::CCIOSurfaceLayerImpl::create):
3122 * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
3123 (WebCore::CCTextureLayerImpl::CCTextureLayerImpl):
3124 (WebCore::CCTextureLayerImpl::~CCTextureLayerImpl):
3125 (WebCore::CCTextureLayerImpl::appendQuads):
3126 (WebCore::CCTextureLayerImpl::didLoseContext):
3127 * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
3128 (CCTextureLayerImpl):
3130 2012-04-27 Arvid Nilsson <anilsson@rim.com>
3132 [BlackBerry] OpenGL related bug fixes
3133 https://bugs.webkit.org/show_bug.cgi?id=84836
3135 Reviewed by Antonio Gomes.
3137 PR147254, 148933, 149117, 149721, 150228
3139 No new tests, covered by existing BlackBerry browser stress tests
3141 * platform/graphics/blackberry/CanvasLayerWebKitThread.cpp:
3142 (WebCore::CanvasLayerWebKitThread::updateTextureContentsIfNeeded):
3143 * platform/graphics/blackberry/LayerCompositingThread.cpp:
3144 (WebCore::LayerCompositingThread::drawTextures):
3145 * platform/graphics/blackberry/LayerRenderer.cpp:
3146 (WebCore::LayerRenderer::~LayerRenderer):
3147 (WebCore::LayerRenderer::drawLayers):
3148 (WebCore::LayerRenderer::initializeSharedGLObjects):
3150 2012-04-27 Nat Duca <nduca@chromium.org>
3152 Implement high-resolution time via window.performance.webkitNow()
3153 https://bugs.webkit.org/show_bug.cgi?id=66684
3155 This implements the high resolution time spec from
3156 http://www.w3.org/TR/hr-time/, giving javascript access to
3157 sub-millisecond timestamps that increase over time instead of being
3158 subject to skewing, for example when the host machine's clock changes.
3160 Reviewed by Tony Gentilcore.
3162 Test: fast/performance/performance-now-timestamps.html
3164 * page/Performance.cpp:
3165 (WebCore::Performance::now):
3167 * page/Performance.h:
3169 * page/Performance.idl:
3171 2012-04-27 Filip Pizlo <fpizlo@apple.com>
3173 If you get a list of DOMWrapperWorld*'s and then plan to allocate in the heap, you should ref
3174 the DOMWrapperWorld*'s
3175 https://bugs.webkit.org/show_bug.cgi?id=85098
3176 <rdar://problem/11318170>
3178 Reviewed by Sam Weinig.
3180 No new tests because this addresses hard-to-repro flaky behavior arising from GCs at inconvenient
3183 * bindings/js/ScriptController.cpp:
3184 (WebCore::ScriptController::getAllWorlds):
3185 * bindings/js/ScriptController.h:
3187 * bindings/js/WebCoreJSClientData.h:
3188 (WebCore::WebCoreJSClientData::getAllWorlds):
3189 * bindings/v8/ScriptController.cpp:
3190 (WebCore::ScriptController::getAllWorlds):
3191 * bindings/v8/ScriptController.h:
3193 * loader/FrameLoader.cpp:
3194 (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
3195 (WebCore::FrameLoader::dispatchGlobalObjectAvailableInAllWorlds):
3197 2012-04-27 Geoffrey Garen <ggaren@apple.com>
3199 Removed the sole use of Weak<Unknown>
3200 https://bugs.webkit.org/show_bug.cgi?id=85099
3202 Reviewed by Sam Weinig.
3204 The semantics and implementation of Weak<Unknown> are unclear because:
3205 - Should you call a finalizer for a non-GC thingy? If so, when?
3207 * Possible answer: No.
3209 - If WeakImpls for GC thingies live with the GC thingies in the
3210 heap, where do WeakImpls for non-GC thingies live?
3212 * Possible answer: Directly in the Weak<T>.
3214 Since no clients actually want these behaviors, it's hard to tell if
3215 they're the right behaviors, and it's not worth the implementation
3216 complexity. If we come up with a client that wants these behaviors, we
3217 can always revisit this.
3219 * bindings/js/JSNodeFilterCondition.cpp:
3220 (WebCore::JSNodeFilterCondition::JSNodeFilterCondition): Just leave our
3221 filter NULL if it's not an object -- that's a better way to indicate
3222 "not a valid filter object".
3224 (WebCore::JSNodeFilterCondition::acceptNode): Fixed up some naming to
3225 clarify that the object we're working with is not necessarily a function.
3227 * bindings/js/JSNodeFilterCondition.h:
3228 (JSNodeFilterCondition): Use Weak<JSObject>, since that more closely
3229 matches what we're trying to do.
3231 2012-04-26 Kentaro Hara <haraken@chromium.org>
3233 [V8] Pass Isolate to getDOMXXXMap()
3234 https://bugs.webkit.org/show_bug.cgi?id=85022
3236 Reviewed by Nate Chapin.
3238 The objective is to pass Isolate around in V8 bindings.
3239 This patch passes Isolate to getDOMXXXMap().
3241 Also this patch removes DOMMap::getDOMDataStore() and
3242 DOMData::getDefalutStore(), since the indirection by the
3243 methods is redundant. This is not for performance
3244 optimization but just for refactoring.
3246 No tests. No change in behavior.
3248 * bindings/v8/DOMData.cpp:
3249 (WebCore::DOMData::getCurrentStore):
3250 * bindings/v8/DOMData.h:
3252 * bindings/v8/V8DOMMap.cpp:
3253 (WebCore::getDOMNodeMap):
3254 (WebCore::getActiveDOMNodeMap):
3255 (WebCore::getDOMObjectMap):
3256 (WebCore::getActiveDOMObjectMap):
3257 (WebCore::removeAllDOMObjects):
3258 * bindings/v8/V8DOMMap.h:
3261 2012-04-26 Kentaro Hara <haraken@chromium.org>
3263 [V8] Pass Isolate to V8BindingPerIsolateData::current()
3264 https://bugs.webkit.org/show_bug.cgi?id=85023
3266 Reviewed by Nate Chapin.
3268 The objective is to pass Isolate around in V8 bindings.
3269 This patch passes Isolate to V8BindingPerIsolateData::current().
3271 No tests. No change in behavior.
3273 * bindings/v8/V8Binding.h:
3274 (WebCore::V8BindingPerIsolateData::current):
3275 (WebCore::v8ExternalString):
3277 2012-04-27 Dimitri Glazkov <dglazkov@chromium.org>
3279 Unreviewed, rolling out r115484.
3280 http://trac.webkit.org/changeset/115484
3281 https://bugs.webkit.org/show_bug.cgi?id=84555
3283 Broke Chromium compile.
3285 * bindings/js/JSBlobCustom.cpp:
3286 * bindings/v8/custom/V8BlobCustom.cpp:
3291 * workers/WorkerContext.idl:
3293 2012-04-27 Alexandru Chiculita <achicu@adobe.com>
3295 [CSS Shaders] Implement CSS Animations and Transitions for CSS Shaders
3296 https://bugs.webkit.org/show_bug.cgi?id=71406
3298 Reviewed by Dean Jackson.
3300 I've implemented the blend function for the CustomFilterOperation. This should enable animations for CSS Shaders.
3301 Currently, just floats are implemented. If any of the filter attributes like shader, mesh size or box mode are different,
3302 the fallback is to use the "to" part of the animation instead. If other shader parameters do not match, it will merge the parameter values
3303 between the "from" and "to" states.
3305 Test: css3/filters/custom/custom-filter-animation.html
3307 * platform/graphics/filters/CustomFilterNumberParameter.h:
3308 (WebCore::CustomFilterNumberParameter::blend):
3309 (CustomFilterNumberParameter):
3310 (WebCore::CustomFilterNumberParameter::operator==):
3311 * platform/graphics/filters/CustomFilterOperation.cpp:
3312 (WebCore::equalCustomFilterParameters):
3314 (WebCore::checkCustomFilterParametersOrder):
3315 (WebCore::blendCustomFilterParameters):
3316 (WebCore::CustomFilterOperation::CustomFilterOperation):
3317 (WebCore::CustomFilterOperation::blend):
3318 * platform/graphics/filters/CustomFilterOperation.h:
3320 (CustomFilterOperation):
3321 (WebCore::CustomFilterOperation::operator==):
3322 (WebCore::CustomFilterOperation::operator!=):
3323 * platform/graphics/filters/CustomFilterParameter.h:
3324 (CustomFilterParameter):
3325 (WebCore::CustomFilterParameter::isSameType):
3326 (WebCore::CustomFilterParameter::operator==):
3327 (WebCore::CustomFilterParameter::operator!=):
3328 * platform/graphics/filters/CustomFilterProgram.h:
3329 * rendering/style/StyleCustomFilterProgram.h:
3330 (StyleCustomFilterProgram):
3331 (WebCore::StyleCustomFilterProgram::cachedVertexShader):
3332 (WebCore::StyleCustomFilterProgram::cachedFragmentShader):
3333 (WebCore::StyleCustomFilterProgram::operator==):
3335 2012-04-27 Chris Rogers <crogers@google.com>
3337 Re-factor scheduling logic from AudioBufferSourceNode into AudioScheduledSourceNode
3338 https://bugs.webkit.org/show_bug.cgi?id=84639
3340 Reviewed by Eric Carlson.
3342 Playback logic involving noteOn(), noteOff(), and playbackState were intertwined with
3343 the AudioBufferSourceNode's buffer playback code. These are more general concepts and
3344 may be implemented separately in another class called AudioScheduledSourceNode.
3346 No new tests. Covered by existing layout tests.
3348 * GNUmakefile.list.am:
3349 Add AudioScheduledSourceNode files to makefile.
3351 * Modules/webaudio/AudioBufferSourceNode.cpp:
3353 (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
3354 Re-factor some member variables into new base class AudioScheduledSourceNode.
3356 (WebCore::AudioBufferSourceNode::process):
3357 Re-factor scheduling logic into AudioScheduledSourceNode.
3359 * Modules/webaudio/AudioBufferSourceNode.h:
3360 (AudioBufferSourceNode):
3361 Simplify by re-factoring scheduling logic into AudioScheduledSourceNode.
3363 * Modules/webaudio/AudioScheduledSourceNode.cpp: Added.
3365 (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
3366 (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
3367 Get frame information for the current time quantum.
3369 * Modules/webaudio/AudioScheduledSourceNode.h: Added.
3370 (WebCore::AudioScheduledSourceNode::noteOn):
3371 (WebCore::AudioScheduledSourceNode::noteOff):
3372 (WebCore::AudioScheduledSourceNode::finish):
3373 (WebCore::AudioScheduledSourceNode::playbackState):
3374 (WebCore::AudioScheduledSourceNode::isPlayingOrScheduled):
3375 (WebCore::AudioScheduledSourceNode::hasFinished):
3376 Re-factored from AudioBufferSourceNode.
3379 * WebCore.xcodeproj/project.pbxproj:
3380 Add AudioScheduledSourceNode files to makefiles.
3382 2012-04-26 Sam Weinig <sam@webkit.org>
3384 Add support for the Blob constructor
3385 https://bugs.webkit.org/show_bug.cgi?id=84555
3387 Reviewed by Maciej Stachowiak.
3389 Test: fast/files/blob-constructor.html
3391 This adds an implementation of the Blob constructor that willfully
3392 violates the W3C Editor’s Draft 29 February 2012 in the following ways:
3393 - Elements in the parts array are coerced to DOMStrings https://www.w3.org/Bugs/Public/show_bug.cgi?id=16721
3394 - Don't throw for invalid key in the dictionary https://www.w3.org/Bugs/Public/show_bug.cgi?id=16727
3395 - Values for the endings property are treated as enums https://www.w3.org/Bugs/Public/show_bug.cgi?id=16729
3397 * bindings/js/JSBlobCustom.cpp:
3398 (WebCore::JSBlobConstructor::constructJSBlob):
3399 Implement blob constructor.
3401 * bindings/v8/custom/V8BlobCustom.cpp:
3402 (WebCore::V8Blob::constructorCallback):
3403 Implement blob constructor.
3406 Add constructor to IDL.
3408 * workers/WorkerContext.idl:
3409 Add Blob constructor to the worker global object.
3411 2012-04-27 Allan Sandfeld Jensen <allan.jensen@nokia.com>
3413 [Qt] Fix minimal build.
3414 https://bugs.webkit.org/show_bug.cgi?id=85045
3416 Reviewed by Tor Arne Vestbø.
3418 Compile LIBXML XML parser even if ENABLE_XSLT is not set.
3422 2012-04-27 Shawn Singh <shawnsingh@chromium.org>
3424 Infinite backgroundClipRect should not be scrolled.
3425 https://bugs.webkit.org/show_bug.cgi?id=84979
3427 Reviewed by Adrienne Walker.
3429 Test: compositing/iframes/scroll-fixed-transformed-element.html
3431 By accidentally scrolling clipRects that should be considered
3432 "infinite", they were no longer being considered infinite. This
3433 caused a chain of un-intended code paths that caused fixed
3434 position elements to stutter when scrolling in Chromium.
3436 * rendering/RenderLayer.cpp:
3437 (WebCore::RenderLayer::backgroundClipRect):
3439 2012-04-27 Ryosuke Niwa <rniwa@webkit.org>
3441 FormatBlock crashes when body element is removed prior to the command execution
3442 https://bugs.webkit.org/show_bug.cgi?id=84937
3444 Reviewed by Tony Chang.
3446 The crash was because because DOM had been modified since the last time selection had been "validated",
3447 and therefore frame selection's endpoints are no longer visible when we instantiated visibleStart
3448 and visibleEnd from m_endingSelection of the edit command.
3450 Fixed the bug by checking the nullity and orphanedness of visible start and visible end directly.
3451 I suspect we have similar bugs in other commands. The fundamental problem is that the copy constructor
3452 of VisibleSelection never validates so when a VisibleSelection is passed from one class to another
3453 (e.g. FrameSelection to EditCommand), we may not adjust end points as needed.
3455 Test: editing/execCommand/format-block-without-body-crash.html