2fc63d73dd358bf981eebef9aeb225575db8281c
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-14  W. James MacLean  <wjmaclean@chromium.org>
2
3         [chromium] Wire up PlatformGestureCurves for CC, ScrollAnimatorNone.
4         https://bugs.webkit.org/show_bug.cgi?id=80607
5
6         Reviewed by James Robinson.
7
8         Unit tests added. Layout tests to follow.
9
10         Provides implementation of PlatformGestureCurves in Chrome Compositor, and basic
11         support in ScrollAnimatorNone, for fling gestures.
12
13         * GNUmakefile.list.am:
14         * platform/ActivePlatformGestureAnimation.cpp:
15         (WebCore::ActivePlatformGestureAnimation::create):
16         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
17         (WebCore::ActivePlatformGestureAnimation::animate):
18         * platform/ActivePlatformGestureAnimation.h:
19         (ActivePlatformGestureAnimation):
20         * platform/PlatformGestureCurveTarget.h:
21         (PlatformGestureCurveTarget):
22         * platform/ScrollAnimatorNone.cpp:
23         (WebCore::ScrollAnimatorNone::cancelAnimations):
24         (WebCore::ScrollAnimatorNone::animationTimerFired):
25         (WebCore::ScrollAnimatorNone::scrollBy):
26         (WebCore):
27         * platform/ScrollAnimatorNone.h:
28         (WebCore):
29         (ScrollAnimatorNone):
30         * platform/TouchFlingPlatformGestureCurve.cpp:
31         (WebCore::TouchFlingPlatformGestureCurve::apply):
32         * platform/WheelFlingPlatformGestureCurve.cpp:
33         (WebCore::WheelFlingPlatformGestureCurve::apply):
34         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp:
35         (WebCore::CCActiveGestureAnimation::create):
36         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
37         (WebCore::CCActiveGestureAnimation::animate):
38         * platform/graphics/chromium/cc/CCActiveGestureAnimation.h:
39         (CCActiveGestureAnimation):
40         * platform/graphics/chromium/cc/CCGestureCurve.h:
41         (CCGestureCurveTarget):
42         * platform/graphics/chromium/cc/CCInputHandler.h:
43         (WebCore):
44         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
45         (WebCore::CCLayerTreeHostImpl::animate):
46         (WebCore::CCLayerTreeHostImpl::setActiveGestureAnimation):
47         (WebCore):
48         (WebCore::CCLayerTreeHostImpl::animateGestures):
49         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
50         (WebCore):
51         (WebCore::CCLayerTreeHostImpl::activeGestureAnimation):
52         (CCLayerTreeHostImpl):
53
54 2012-03-15  Patrick Gansterer  <paroga@webkit.org>
55
56         [EFL] Make zlib a general build requirement
57         https://bugs.webkit.org/show_bug.cgi?id=80153
58
59         Reviewed by Hajime Morita.
60
61         After r109538 WebSocket module needs zlib to support deflate-frame extension.
62
63         * PlatformEfl.cmake:
64
65 2012-03-15  Robert Kroeger  <rjkroege@chromium.org>
66
67         REGRESSION (r110371): broke platform/gtk/scrollbars/overflow-scrollbar-horizontal-wheel-scroll.html
68         https://bugs.webkit.org/show_bug.cgi?id=80825
69
70         Reviewed by James Robinson.
71
72         * page/EventHandler.cpp:
73         (WebCore::EventHandler::handleWheelEvent): Corrected a typo.
74
75 2012-03-15  Scott Byer  <scottbyer@chromium.org>
76
77         Fix crbug 117957 - get settings scrolling with the wheel again.
78         https://bugs.webkit.org/show_bug.cgi?id=81247
79
80         Reviewed by James Robinson.
81
82         Tests to follow.
83
84         * page/FrameView.cpp:
85         (WebCore::FrameView::serviceScriptedAnimations):
86
87 2012-03-15  David Hyatt  <hyatt@apple.com>
88
89         https://bugs.webkit.org/show_bug.cgi?id=81258
90
91         Add a preference for enabling the new multi-column layout code that will be based on regions.
92
93         Reviewed by Beth Dakin.
94
95         * page/Settings.cpp:
96         (WebCore::Settings::Settings):
97         * page/Settings.h:
98         (WebCore::Settings::setRegionBasedColumnsEnabled):
99         (WebCore::Settings::regionBasedColumnsEnabled):
100         (Settings):
101
102 2012-03-15  Andreas Kling  <kling@webkit.org>
103
104         RenderStyle: Return Color objects by value instead of as const references.
105         <http://webkit.org/b/81180>
106
107         Reviewed by Antti Koivisto.
108
109         Make RenderStyle getters return "Color" rather than "const Color&". This is preparation
110         for storing some color values in a more space-efficient fashion.
111
112         * css/CSSStyleApplyProperty.cpp:
113         (WebCore::ApplyPropertyColor::applyInheritValue):
114         * page/animation/AnimationBase.cpp:
115         (PropertyWrapperColor):
116         (WebCore::PropertyWrapperColor::PropertyWrapperColor):
117         (WebCore::PropertyWrapperColor::blend):
118         (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor):
119         (PropertyWrapperMaybeInvalidColor):
120         (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
121         (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):
122         (PropertyWrapperSVGPaint):
123         * platform/graphics/Color.h:
124         (WebCore::Color::Color):
125         * rendering/style/RenderStyle.h:
126
127 2012-03-15  Jessie Berlin  <jberlin@apple.com>
128
129         Assertion failures in WebCore::Page::goBackOrForward causing multiple "crashes" on Lion Intel
130         Debug WebKit2 testers
131         https://bugs.webkit.org/show_bug.cgi?id=81159
132
133         Rubber-stamped by Brady Eidson.
134
135         It is plausible that history could change in between the time a navigation request is
136         scheduled and the timer is fired, so the request index could be out of the b/f list range.
137         Hence, the assertion is invalid and should be removed.
138
139         * page/Page.cpp:
140         (WebCore::Page::goBackOrForward):
141
142 2012-03-15  Alexey Proskuryakov  <ap@apple.com>
143
144         Assertion failures in checkEncodedString when running WebKit2 tests
145         https://bugs.webkit.org/show_bug.cgi?id=67425
146         <rdar://problem/11043492>
147
148         Reviewed by Anders Carlsson.
149
150         * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::cfError):
151         * platform/network/mac/ResourceErrorMac.mm: (WebCore::ResourceError::nsError):
152         The failing URL is certainly not guaranteed to be valid, so it's not correct to put it back
153         into a URL as if it's been normalized by KURL.
154
155 2012-03-15  Brady Eidson  <beidson@apple.com>
156
157         <rdar://problem/11036900> and https://bugs.webkit.org/show_bug.cgi?id=81079
158         REGRESSION(r107844): Clipboard API only remembers most recent data set on clipboard
159
160         Reviewed by Sam Weinig.
161
162         Test: editing/pasteboard/copy-two-pasteboard-types-both-work.html
163
164         Add the non-destructive "addTypes" to supplement the destructive "setTypes"
165         * platform/PasteboardStrategy.h:
166         (PasteboardStrategy):
167         * platform/PlatformPasteboard.h:
168         (PlatformPasteboard):
169         * platform/mac/PlatformPasteboardMac.mm:
170         (WebCore::PlatformPasteboard::addTypes):
171         * WebCore.exp.in:
172
173         * platform/mac/ClipboardMac.mm:
174         (WebCore::ClipboardMac::setData): Call the non-destructive "addTypes" instead of
175           the destructive "setTypes"
176
177 2012-03-15  Dana Jansens  <danakj@chromium.org>
178
179         [Chromium] REGRESSION(r110596) CCQuadCullerTest.verifyCullChildLinesUpTopLeft fails on Windows
180         https://bugs.webkit.org/show_bug.cgi?id=81083
181
182         Reviewed by Adrienne Walker.
183
184         The surface pointer on the occlusion tracker stack is uninitialized, and
185         can be non-null, but the layer's target surface is null, causing asserts
186         to fail. Fixes the TestCCOcclusionTrackerImpl to initialize the stack's
187         surface to be null.
188
189         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
190         (WebCore::::enterTargetRenderSurface):
191         (WebCore::::unoccludedContentRect):
192         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
193         (WebCore::CCOcclusionTrackerBase::StackObject::StackObject):
194
195 2012-03-15  David Levin  <levin@chromium.org>
196
197         Various autoresize fixes.
198         https://bugs.webkit.org/show_bug.cgi?id=81199
199
200         Reviewed by Darin Fisher.
201
202         Tested by WebViewTest additions.
203
204         * page/FrameView.cpp:
205         (WebCore::FrameView::autoSizeIfEnabled): Fixed a bug that caused a horizontal
206         scrollbar to appear when the size was width was fixed and height overflowed which
207         is one of the tests that was added.
208
209 2012-03-15  Andrey Kosyakov  <caseq@chromium.org>
210
211         Web Inspector: normalize vertical overview bars by longest bar, not by longest frame
212         https://bugs.webkit.org/show_bug.cgi?id=81231
213
214         Reviewed by Vsevolod Vlasov.
215
216         * inspector/front-end/TimelineOverviewPane.js:
217         (WebInspector.TimelineOverviewPane):
218         (WebInspector.TimelineOverviewPane.prototype.reset):
219         (WebInspector.TimelineOverviewPane.prototype.accept):
220         (WebInspector.TimelineOverviewPane.prototype.windowEndTime):
221         (WebInspector.TimelineVerticalOverview.prototype.reset):
222         (WebInspector.TimelineVerticalOverview.prototype.update):
223         (WebInspector.TimelineVerticalOverview.prototype._aggregateFrames):
224         (WebInspector.TimelineVerticalOverview.prototype._aggregateRecords):
225         (WebInspector.TimelineVerticalOverview.prototype.getWindowTimes):
226
227 2012-03-15  Andrey Kosyakov  <caseq@chromium.org>
228
229         Web Inspector: crash in InspectorTimelineAgent when trying to add children to cancelable records
230         https://bugs.webkit.org/show_bug.cgi?id=81245
231
232         Reviewed by Vsevolod Vlasov.
233
234         * inspector/InspectorTimelineAgent.cpp:
235         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
236         (WebCore):
237         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
238         (WebCore::InspectorTimelineAgent::appendRecord):
239         (WebCore::InspectorTimelineAgent::commitCancelableRecords):
240         * inspector/InspectorTimelineAgent.h:
241         (InspectorTimelineAgent):
242
243 2012-03-15  Pavel Podivilov  <podivilov@chromium.org>
244
245         Web Inspector: live locations could be disposed twice.
246         https://bugs.webkit.org/show_bug.cgi?id=81249
247
248         Reviewed by Vsevolod Vlasov.
249
250         * inspector/front-end/ScriptMapping.js:
251         (WebInspector.MainScriptMapping.prototype._unregisterLiveLocation):
252
253 2012-03-15  Carlos Garcia Campos  <cgarcia@igalia.com>
254
255         [GTK] Implement unicode submenu items
256         https://bugs.webkit.org/show_bug.cgi?id=81117
257
258         Reviewed by Martin Robinson.
259
260         * loader/EmptyClients.h:
261         (WebCore::EmptyEditorClient::shouldShowUnicodeMenu): Just return
262         false.
263         * page/ContextMenuController.cpp:
264         (WebCore::insertUnicodeCharacter): Helper function to insert a
265         unicode character.
266         (WebCore::ContextMenuController::contextMenuItemSelected):
267         Implement unicode menu items using insertUnicodeCharacter() to
268         insert the apropriate unicode character.
269         (WebCore::ContextMenuController::createAndAppendUnicodeSubMenu):
270         Create the unicode submenu.
271         (WebCore::ContextMenuController::populate): Add unicode submenu
272         item for editable content.
273         (WebCore::ContextMenuController::checkOrEnableIfNeeded): Add
274         unicode submenu items to the switch.
275         * page/ContextMenuController.h:
276         * page/EditorClient.h:
277         (EditorClient): Add shouldShowUnicodeMenu() for GTK platform.
278         * platform/ContextMenuItem.h:
279         * platform/LocalizedStrings.h:
280         * platform/gtk/LocalizedStringsGtk.cpp:
281         (WebCore::contextMenuItemTagUnicodeInsertLRMMark): Add localized
282         string for the unicode menu item.
283         (WebCore::contextMenuItemTagUnicodeInsertRLMMark): Ditto.
284         (WebCore::contextMenuItemTagUnicodeInsertLREMark): Ditto.
285         (WebCore::contextMenuItemTagUnicodeInsertRLEMark): Ditto.
286         (WebCore::contextMenuItemTagUnicodeInsertLROMark): Ditto.
287         (WebCore::contextMenuItemTagUnicodeInsertRLOMark): Ditto.
288         (WebCore::contextMenuItemTagUnicodeInsertPDFMark): Ditto.
289         (WebCore::contextMenuItemTagUnicodeInsertZWSMark): Ditto.
290         (WebCore::contextMenuItemTagUnicodeInsertZWJMark): Ditto.
291         (WebCore::contextMenuItemTagUnicodeInsertZWNJMark): Ditto.
292
293 2012-03-15  Vsevolod Vlasov  <vsevik@chromium.org>
294
295         Web Inspector: MainScriptMapping should detect snippet scripts by means of sourceURL set before evaluation.
296         https://bugs.webkit.org/show_bug.cgi?id=81031
297
298         Reviewed by Pavel Feldman.
299
300         * inspector/front-end/SnippetsModel.js:
301         (WebInspector.SnippetsModel):
302         (WebInspector.SnippetsModel.prototype._saveSettings):
303         (WebInspector.SnippetsModel.prototype.deleteSnippet):
304         (WebInspector.SnippetsModel.prototype._snippetAdded):
305         (WebInspector.SnippetsModel.prototype._sourceURLForSnippet):
306         (WebInspector.SnippetsModel.prototype.snippetIdForSourceURL):
307         (WebInspector.SnippetsModel.prototype.snippetForSourceURL):
308         (WebInspector.Snippet.prototype.evaluate):
309         (WebInspector.SnippetsScriptMapping):
310         (WebInspector.SnippetsScriptMapping.prototype.uiLocationToRawLocation.get if):
311         (WebInspector.SnippetsScriptMapping.prototype.uiLocationToRawLocation):
312         (WebInspector.SnippetsScriptMapping.prototype._releasedUISourceCodes):
313         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
314         (WebInspector.SnippetsScriptMapping.prototype._snippetWillBeEvaluated):
315         (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved.get this):
316         (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved):
317
318 2012-03-15  Kevin Ollivier  <kevino@theolliviers.com>
319
320         [wx] Unreviewed. Build fixes for Mac and DOM bindings.
321
322         * bindings/cpp/WebDOMEventTarget.cpp:
323         (toWebKit):
324         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
325         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
326
327 2012-03-14  Pavel Podivilov  <podivilov@chromium.org>
328
329         Web Inspector: extract CompilerScriptMapping from RawSourceCode.
330         https://bugs.webkit.org/show_bug.cgi?id=81088
331
332         Reviewed by Vsevolod Vlasov.
333
334         * WebCore.gypi:
335         * WebCore.vcproj/WebCore.vcproj:
336         * inspector/compile-front-end.py:
337         * inspector/front-end/CompilerScriptMapping.js: Added.
338         (WebInspector.CompilerScriptMapping):
339         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
340         (WebInspector.CompilerScriptMapping.prototype.get uiSourceCodeList):
341         (WebInspector.CompilerScriptMapping.prototype.addScript.get this):
342         (WebInspector.CompilerScriptMapping.prototype.addScript):
343         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
344         (WebInspector.CompilerScriptMapping.prototype.reset):
345         * inspector/front-end/RawSourceCode.js:
346         (WebInspector.RawSourceCode):
347         (WebInspector.RawSourceCode.prototype.setFormatted):
348         (WebInspector.RawSourceCode.prototype._resourceFinished):
349         (WebInspector.RawSourceCode.prototype._createUISourceCode):
350         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation):
351         * inspector/front-end/ResourceScriptMapping.js:
352         (WebInspector.ResourceScriptMapping.prototype.addScript):
353         * inspector/front-end/ScriptMapping.js:
354         (WebInspector.MainScriptMapping):
355         * inspector/front-end/WebKit.qrc:
356         * inspector/front-end/inspector.html:
357
358 2012-03-15  Peter Rybin  <peter.rybin@gmail.com>
359
360         Web Inspector: Move all includes behind ENABLE(INSPECTOR) guards
361         https://bugs.webkit.org/show_bug.cgi?id=81132
362
363         Reviewed by Yury Semikhatsky.
364
365         Include directives are moved several lines down in .cpp files and in
366         generator templates.
367
368         * inspector/CodeGeneratorInspector.py:
369         * inspector/ContentSearchUtils.cpp:
370         * inspector/DOMEditor.cpp:
371         * inspector/DOMNodeHighlighter.cpp:
372         * inspector/DOMPatchSupport.cpp:
373         * inspector/IdentifiersFactory.cpp:
374         * inspector/InjectedScript.cpp:
375         * inspector/InjectedScriptHost.cpp:
376         * inspector/InjectedScriptManager.cpp:
377         * inspector/InspectorAgent.cpp:
378         * inspector/InspectorApplicationCacheAgent.cpp:
379         * inspector/InspectorBaseAgent.cpp:
380         * inspector/InspectorCSSAgent.cpp:
381         * inspector/InspectorClient.cpp:
382         * inspector/InspectorConsoleAgent.cpp:
383         * inspector/InspectorController.cpp:
384         * inspector/InspectorCounters.cpp:
385         * inspector/InspectorDOMAgent.cpp:
386         * inspector/InspectorDOMDebuggerAgent.cpp:
387         * inspector/InspectorDOMStorageAgent.cpp:
388         * inspector/InspectorDatabaseAgent.cpp:
389         * inspector/InspectorDatabaseResource.cpp:
390         * inspector/InspectorDebuggerAgent.cpp:
391         * inspector/InspectorFileSystemAgent.cpp:
392         * inspector/InspectorFrontendClientLocal.cpp:
393         * inspector/InspectorFrontendHost.cpp:
394         * inspector/InspectorHistory.cpp:
395         * inspector/InspectorIndexedDBAgent.cpp:
396         * inspector/InspectorInstrumentation.cpp:
397         * inspector/InspectorMemoryAgent.cpp:
398         * inspector/InspectorPageAgent.cpp:
399         * inspector/InspectorProfilerAgent.cpp:
400         * inspector/InspectorResourceAgent.cpp:
401         * inspector/InspectorRuntimeAgent.cpp:
402         * inspector/InspectorState.cpp:
403         * inspector/InspectorStyleSheet.cpp:
404         * inspector/InspectorStyleTextEditor.cpp:
405         * inspector/InspectorTimelineAgent.cpp:
406         * inspector/InspectorValues.cpp:
407         * inspector/InstrumentingAgents.cpp:
408         * inspector/NetworkResourcesData.cpp:
409         * inspector/PageConsoleAgent.cpp:
410         * inspector/PageDebuggerAgent.cpp:
411         * inspector/PageRuntimeAgent.cpp:
412         * inspector/TimelineRecordFactory.cpp:
413         * inspector/WorkerConsoleAgent.cpp:
414         * inspector/WorkerDebuggerAgent.cpp:
415         * inspector/WorkerRuntimeAgent.cpp:
416
417 2012-03-15  Yury Semikhatsky  <yurys@chromium.org>
418
419         Web Inspector: improve HeapSnapshot._buildReversIndex performance
420         https://bugs.webkit.org/show_bug.cgi?id=81224
421
422         Caching node indexes and node count in local variables instead of
423         calling getters each time reduces the method run time by
424         factor of 1.5
425
426         Reviewed by Pavel Feldman.
427
428         * inspector/front-end/HeapSnapshot.js:
429         (WebInspector.HeapSnapshot.prototype._buildReverseIndex):
430
431 2012-03-15  Nikolas Zimmermann  <nzimmermann@rim.com>
432
433         SVG Animations update baseVal instead of animVal
434         https://bugs.webkit.org/show_bug.cgi?id=12437
435
436         Rubber-stamped by Rob Buis.
437
438         Rename constructFromCopy to constructFromVariant, and currentBaseValue to currentBaseValueVariant, to clarify what it actually does.
439
440         * svg/SVGAnimateElement.cpp:
441         (WebCore::SVGAnimateElement::resetToBaseValue):
442         * svg/SVGAnimatedLength.cpp:
443         (WebCore::SVGAnimatedLengthAnimator::constructFromVariant):
444         * svg/SVGAnimatedLength.h:
445         (SVGAnimatedLengthAnimator):
446         * svg/SVGAnimatedLengthList.cpp:
447         (WebCore::SVGAnimatedLengthListAnimator::constructFromVariant):
448         * svg/SVGAnimatedLengthList.h:
449         (SVGAnimatedLengthListAnimator):
450         * svg/SVGAnimatedNumber.cpp:
451         (WebCore::SVGAnimatedNumberAnimator::constructFromVariant):
452         * svg/SVGAnimatedNumber.h:
453         (SVGAnimatedNumberAnimator):
454         * svg/SVGAnimatedNumberList.cpp:
455         (WebCore::SVGAnimatedNumberListAnimator::constructFromVariant):
456         * svg/SVGAnimatedNumberList.h:
457         (SVGAnimatedNumberListAnimator):
458         * svg/SVGAnimatedTransformList.cpp:
459         (WebCore::SVGAnimatedTransformListAnimator::constructFromVariant):
460         * svg/SVGAnimatedTransformList.h:
461         (SVGAnimatedTransformListAnimator):
462         * svg/SVGAnimatedTypeAnimator.h:
463         (WebCore::SVGAnimatedTypeAnimator::constructFromVariant):
464         * svg/properties/SVGAnimatedListPropertyTearOff.h:
465         (WebCore::SVGAnimatedListPropertyTearOff::currentBaseValueVariant):
466         * svg/properties/SVGAnimatedProperty.h:
467         (SVGAnimatedProperty):
468         * svg/properties/SVGAnimatedPropertyTearOff.h:
469         (WebCore::SVGAnimatedPropertyTearOff::currentBaseValueVariant):
470         * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
471         (WebCore::SVGAnimatedStaticPropertyTearOff::currentBaseValueVariant):
472
473 2012-03-15  Nikolas Zimmermann  <nzimmermann@rim.com>
474
475         Enable animVal support for SVGNumberList
476         https://bugs.webkit.org/show_bug.cgi?id=81219
477
478         Reviewed by Rob Buis.
479
480         Enable animVal support for SVGNumberList. Easy patch, we just need to add the missing
481         constructFromCopy() method to SVGAnumatedNumberListAnimator and report AnimatedNumberList
482         as supporting animVal.
483
484         Covered by existing tests.
485
486         * svg/SVGAnimatedNumberList.cpp:
487         (WebCore::SVGAnimatedNumberListAnimator::constructFromCopy):
488         (WebCore):
489         * svg/SVGAnimatedNumberList.h:
490         (WebCore):
491         (SVGAnimatedNumberListAnimator):
492         * svg/SVGAnimatedType.cpp:
493         (WebCore::SVGAnimatedType::supportsAnimVal):
494         (WebCore::SVGAnimatedType::setVariantValue):
495
496 2012-03-15  Rob Buis  <rbuis@rim.com>
497
498         Fix cast-align GCC warnings
499         https://bugs.webkit.org/show_bug.cgi?id=80790
500
501         Reviewed by Nikolas Zimmermann.
502
503         * platform/graphics/WOFFFileFormat.cpp:
504         (WebCore::writeUInt32):
505         (WebCore::writeUInt16):
506         (WebCore::convertWOFFToSfnt):
507
508 2012-03-15  Nikolas Zimmermann  <nzimmermann@rim.com>
509
510         Not reviewed. Forgot to preserve copyrights, per reviewer comment.
511
512         * svg/SVGAnimatedTransformList.cpp:
513
514 2012-03-15  Nikolas Zimmermann  <nzimmermann@rim.com>
515
516         Enable animVal support for SVGNumber
517         https://bugs.webkit.org/show_bug.cgi?id=81212
518
519         Reviewed by Rob Buis.
520
521         Enable animVal support for SVGNumber. This aligns SVGAnimatedStaticPropertyTearOff,
522         with the other SVGListPropertyTearOff & SVGPropertyTearOff, as all support animVal now.
523         Converting the rest of the types can be done in small patches now.
524
525         Test: svg/animations/svgnumber-animation-4.html
526
527         * svg/SVGAnimatedNumber.cpp:
528         (WebCore::SVGAnimatedNumberAnimator::constructFromCopy):
529         (WebCore):
530         * svg/SVGAnimatedNumber.h:
531         (WebCore):
532         (SVGAnimatedNumberAnimator):
533         * svg/SVGAnimatedType.cpp:
534         (WebCore::SVGAnimatedType::supportsAnimVal):
535         (WebCore::SVGAnimatedType::setVariantValue):
536         * svg/properties/SVGAnimatedProperty.h:
537         (SVGAnimatedProperty):
538         * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
539         (WebCore::SVGAnimatedStaticPropertyTearOff::animVal):
540         (WebCore::SVGAnimatedStaticPropertyTearOff::currentAnimatedValue):
541         (SVGAnimatedStaticPropertyTearOff):
542         (WebCore::SVGAnimatedStaticPropertyTearOff::currentBaseValue):
543         (WebCore::SVGAnimatedStaticPropertyTearOff::animationStarted):
544         (WebCore::SVGAnimatedStaticPropertyTearOff::animationEnded):
545         (WebCore::SVGAnimatedStaticPropertyTearOff::animationValueWillChange):
546         (WebCore::SVGAnimatedStaticPropertyTearOff::animationValueDidChange):
547         (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
548
549 2012-03-15  Nikolas Zimmermann  <nzimmermann@rim.com>
550
551         Enable animVal support for SVGTransformList
552         https://bugs.webkit.org/show_bug.cgi?id=80758
553
554         Reviewed by Antti Koivisto.
555
556         Enable animVal support for SVGTransformList. SVGTransformLists are only animatable
557         via <animateTransform>, not via <animate> directly. Still we can handle it in the
558         same framework as all other types used for <animate>, as we also need proper animVal
559         support for <animateTransform>.
560
561         This patch removes the special <animateTransform> implementation, and lets
562         SVGAnimateTransformElement inherit from SVGAnimateElement, just like its done
563         for SVGAnimateColorElement & SVGSetElement.
564
565         All existing code (calculateFromAndToValues/FromAndByValues/etc..) are moved from
566         SVGAnimateTransform right into the SVGAnimatedTransformListAnimator.
567
568         This doesn't change <animateTransform> behavior, it just simplies the code
569         and enables animVal support for SVGTransformLists - all covered by existing tests.
570
571         * CMakeLists.txt:
572         * GNUmakefile.list.am:
573         * Target.pri:
574         * WebCore.gypi:
575         * WebCore.xcodeproj/project.pbxproj:
576         * svg/SVGAllInOne.cpp:
577         * svg/SVGAnimateElement.cpp:
578         (WebCore::SVGAnimateElement::SVGAnimateElement):
579         (WebCore::SVGAnimateElement::determineAnimatedPropertyType):
580         (WebCore::SVGAnimateElement::calculateAnimatedValue):
581         (WebCore::SVGAnimateElement::applyResultsToTarget):
582         * svg/SVGAnimateTransformElement.cpp:
583         (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
584         (WebCore::SVGAnimateTransformElement::hasValidAttributeType):
585         (WebCore::SVGAnimateTransformElement::parseAttribute):
586         * svg/SVGAnimateTransformElement.h:
587         (WebCore::SVGAnimateTransformElement::transformType):
588         (SVGAnimateTransformElement):
589         * svg/SVGAnimatedTransformList.cpp: Added.
590         (WebCore):
591         (WebCore::SVGAnimatedTransformListAnimator::SVGAnimatedTransformListAnimator):
592         (WebCore::SVGAnimatedTransformListAnimator::constructFromString):
593         (WebCore::SVGAnimatedTransformListAnimator::constructFromCopy):
594         (WebCore::SVGAnimatedTransformListAnimator::calculateFromAndToValues):
595         (WebCore::SVGAnimatedTransformListAnimator::calculateFromAndByValues):
596         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
597         (WebCore::SVGAnimatedTransformListAnimator::calculateDistance):
598         * svg/SVGAnimatedTransformList.h:
599         (WebCore):
600         (SVGAnimatedTransformListAnimator):
601         (WebCore::SVGAnimatedTransformListAnimator::~SVGAnimatedTransformListAnimator):
602         * svg/SVGAnimatedType.cpp:
603         (WebCore::SVGAnimatedType::~SVGAnimatedType):
604         (WebCore::SVGAnimatedType::createTransformList):
605         (WebCore):
606         (WebCore::SVGAnimatedType::transformList):
607         (WebCore::SVGAnimatedType::valueAsString):
608         (WebCore::SVGAnimatedType::setValueAsString):
609         (WebCore::SVGAnimatedType::supportsAnimVal):
610         (WebCore::SVGAnimatedType::setVariantValue):
611         * svg/SVGAnimatedType.h:
612         (WebCore):
613         (SVGAnimatedType):
614         * svg/SVGAnimatorFactory.h:
615         (WebCore::SVGAnimatorFactory::create):
616         * svg/SVGGradientElement.cpp:
617         (WebCore::SVGGradientElement::parseAttribute):
618         * svg/SVGPatternElement.cpp:
619         (WebCore::SVGPatternElement::parseAttribute):
620         * svg/SVGStyledTransformableElement.cpp:
621         (WebCore::SVGStyledTransformableElement::parseAttribute):
622         * svg/SVGTextElement.cpp:
623         (WebCore::SVGTextElement::parseAttribute):
624         * svg/SVGTransform.cpp:
625         (WebCore::SVGTransform::transformTypePrefixForParsing):
626         (WebCore):
627         (WebCore::SVGTransform::valueAsString):
628         * svg/SVGTransform.h:
629         (SVGTransform):
630         * svg/SVGTransformList.cpp:
631         (WebCore::SVGTransformList::parse):
632         (WebCore):
633         * svg/SVGTransformList.h:
634         (SVGTransformList):
635         * svg/SVGTransformable.cpp:
636         (WebCore::SVGTransformable::parseTransformType):
637         * svg/SVGTransformable.h:
638         (WebCore):
639         * svg/SVGViewSpec.cpp:
640         (WebCore::SVGViewSpec::setTransform):
641
642 2012-03-13  Nikolas Zimmermann  <nzimmermann@rim.com>
643
644         Enable animVal support for SVGLengthList
645         https://bugs.webkit.org/show_bug.cgi?id=80750
646
647         Reviewed by Zoltan Herczeg.
648
649         Introduce animVal support for generic SVGList types. This aligns SVGListProperty with SVGProperty
650         in terms of animVal/baseVal support. Use this to turn on animVal support for SVGLengthList.
651
652         Extend all existing SVGLengthList tests to correctly differentiate between baseVal/animVal.
653
654         * svg/SVGAnimateElement.cpp:
655         (WebCore::SVGAnimateElement::calculateAnimatedValue):
656         * svg/SVGAnimateTransformElement.cpp:
657         (WebCore::SVGAnimateTransformElement::resetToBaseValue):
658         (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
659         (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
660         * svg/SVGAnimatedLengthList.cpp:
661         (WebCore::SVGAnimatedLengthListAnimator::constructFromCopy):
662         (WebCore):
663         * svg/SVGAnimatedLengthList.h:
664         (WebCore):
665         (SVGAnimatedLengthListAnimator):
666         * svg/SVGAnimatedType.cpp:
667         (WebCore::SVGAnimatedType::supportsAnimVal):
668         (WebCore::SVGAnimatedType::setVariantValue):
669         * svg/SVGAnimatedType.h:
670         * svg/SVGAnimationElement.cpp:
671         (WebCore::SVGAnimationElement::applyAnimatedValue):
672         * svg/properties/SVGAnimatedListPropertyTearOff.h:
673         (SVGAnimatedListPropertyTearOff):
674         (WebCore::SVGAnimatedListPropertyTearOff::baseVal):
675         (WebCore::SVGAnimatedListPropertyTearOff::animVal):
676         (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList):
677         (WebCore::SVGAnimatedListPropertyTearOff::detachListWrappers):
678         (WebCore::SVGAnimatedListPropertyTearOff::currentAnimatedValue):
679         (WebCore::SVGAnimatedListPropertyTearOff::currentBaseValue):
680         (WebCore::SVGAnimatedListPropertyTearOff::animationStarted):
681         (WebCore::SVGAnimatedListPropertyTearOff::animationEnded):
682         (WebCore::SVGAnimatedListPropertyTearOff::synchronizeWrappersIfNeeded):
683         (WebCore::SVGAnimatedListPropertyTearOff::animationValueWillChange):
684         (WebCore::SVGAnimatedListPropertyTearOff::animationValueDidChange):
685         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
686         (WebCore::SVGAnimatedPathSegListPropertyTearOff::baseVal):
687         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animVal):
688         * svg/properties/SVGAnimatedProperty.h:
689         (WebCore::SVGAnimatedProperty::isAnimating):
690         (SVGAnimatedProperty):
691         (WebCore::SVGAnimatedProperty::animationValueWillChange):
692         (WebCore::SVGAnimatedProperty::animationValueDidChange):
693         (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
694         (WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
695         * svg/properties/SVGAnimatedPropertyTearOff.h:
696         (SVGAnimatedPropertyTearOff):
697         (WebCore::SVGAnimatedPropertyTearOff::baseVal):
698         (WebCore::SVGAnimatedPropertyTearOff::animVal):
699         (WebCore::SVGAnimatedPropertyTearOff::currentAnimatedValue):
700         (WebCore::SVGAnimatedPropertyTearOff::animationStarted):
701         (WebCore::SVGAnimatedPropertyTearOff::animationEnded):
702         (WebCore::SVGAnimatedPropertyTearOff::animationValueWillChange):
703         (WebCore::SVGAnimatedPropertyTearOff::animationValueDidChange):
704         (WebCore::SVGAnimatedPropertyTearOff::SVGAnimatedPropertyTearOff):
705         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
706         (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal):
707         (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal):
708         * svg/properties/SVGListProperty.h:
709         (WebCore::SVGListProperty::detachListWrappers):
710         (SVGListProperty):
711         (WebCore::SVGListProperty::setValuesAndWrappers):
712         (WebCore::SVGListProperty::clearValues):
713         (WebCore::SVGListProperty::clearValuesAndWrappers):
714         (WebCore::SVGListProperty::numberOfItems):
715         (WebCore::SVGListProperty::initializeValues):
716         (WebCore::SVGListProperty::initializeValuesAndWrappers):
717         (WebCore::SVGListProperty::canGetItem):
718         (WebCore::SVGListProperty::getItemValues):
719         (WebCore::SVGListProperty::getItemValuesAndWrappers):
720         (WebCore::SVGListProperty::insertItemBeforeValues):
721         (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
722         (WebCore::SVGListProperty::canReplaceItem):
723         (WebCore::SVGListProperty::replaceItemValues):
724         (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
725         (WebCore::SVGListProperty::canRemoveItem):
726         (WebCore::SVGListProperty::removeItemValues):
727         (WebCore::SVGListProperty::removeItemValuesAndWrappers):
728         (WebCore::SVGListProperty::appendItemValues):
729         (WebCore::SVGListProperty::appendItemValuesAndWrappers):
730         (WebCore::SVGListProperty::values):
731         (WebCore::SVGListProperty::wrappers):
732         (WebCore::SVGListProperty::SVGListProperty):
733         * svg/properties/SVGListPropertyTearOff.h:
734         (SVGListPropertyTearOff):
735         (WebCore::SVGListPropertyTearOff::create):
736         (WebCore::SVGListPropertyTearOff::removeItemFromList):
737         (WebCore::SVGListPropertyTearOff::clear):
738         (WebCore::SVGListPropertyTearOff::initialize):
739         (WebCore::SVGListPropertyTearOff::insertItemBefore):
740         (WebCore::SVGListPropertyTearOff::replaceItem):
741         (WebCore::SVGListPropertyTearOff::appendItem):
742         (WebCore::SVGListPropertyTearOff::SVGListPropertyTearOff):
743         (WebCore::SVGListPropertyTearOff::commitChange):
744         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
745         (WebCore::SVGPathSegListPropertyTearOff::clear):
746         (WebCore::SVGPathSegListPropertyTearOff::getItem):
747         (WebCore::SVGPathSegListPropertyTearOff::removeItem):
748         * svg/properties/SVGPathSegListPropertyTearOff.h:
749         (WebCore::SVGPathSegListPropertyTearOff::create):
750         (WebCore::SVGPathSegListPropertyTearOff::removeItemFromList):
751         (SVGPathSegListPropertyTearOff):
752         (WebCore::SVGPathSegListPropertyTearOff::initialize):
753         (WebCore::SVGPathSegListPropertyTearOff::insertItemBefore):
754         (WebCore::SVGPathSegListPropertyTearOff::replaceItem):
755         (WebCore::SVGPathSegListPropertyTearOff::appendItem):
756         (WebCore::SVGPathSegListPropertyTearOff::SVGPathSegListPropertyTearOff):
757         (WebCore::SVGPathSegListPropertyTearOff::commitChange):
758         * svg/properties/SVGPropertyInfo.h:
759         * svg/properties/SVGStaticListPropertyTearOff.h:
760         (SVGStaticListPropertyTearOff):
761         (WebCore::SVGStaticListPropertyTearOff::clear):
762         (WebCore::SVGStaticListPropertyTearOff::initialize):
763         (WebCore::SVGStaticListPropertyTearOff::getItem):
764         (WebCore::SVGStaticListPropertyTearOff::insertItemBefore):
765         (WebCore::SVGStaticListPropertyTearOff::replaceItem):
766         (WebCore::SVGStaticListPropertyTearOff::removeItem):
767         (WebCore::SVGStaticListPropertyTearOff::appendItem):
768         (WebCore::SVGStaticListPropertyTearOff::SVGStaticListPropertyTearOff):
769         (WebCore::SVGStaticListPropertyTearOff::commitChange):
770         * svg/properties/SVGTransformListPropertyTearOff.h:
771         (WebCore::SVGTransformListPropertyTearOff::create):
772         (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
773         (WebCore::SVGTransformListPropertyTearOff::consolidate):
774         (WebCore::SVGTransformListPropertyTearOff::SVGTransformListPropertyTearOff):
775
776 2012-03-14  Chris Fleizach  <cfleizach@apple.com>
777
778         AXDescription for HTML5 footer
779         https://bugs.webkit.org/show_bug.cgi?id=78967
780
781         Return a unique role description for the footer element.
782
783         Reviewed by Beth Dakin.
784
785         Test: platform/mac/accessibility/footer-roledescription.html
786
787         * English.lproj/Localizable.strings:+
788         * accessibility/AccessibilityObject.h:
789         * accessibility/AccessibilityRenderObject.cpp:
790         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
791         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
792         (createAccessibilityRoleMap):
793         (-[WebAccessibilityObjectWrapper subrole]):
794         (-[WebAccessibilityObjectWrapper roleDescription]):
795         * platform/LocalizedStrings.cpp:
796         (WebCore::AXFooterRoleDescriptionText):
797         (WebCore):
798         * platform/LocalizedStrings.h:
799         (WebCore):
800         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
801         (WebCore::AXFooterRoleDescriptionText):
802         (WebCore):
803         * platform/efl/LocalizedStringsEfl.cpp:
804         (WebCore::AXFooterRoleDescriptionText):
805         (WebCore):
806         * platform/gtk/LocalizedStringsGtk.cpp:
807         (WebCore::AXFooterRoleDescriptionText):
808         (WebCore):
809
810 2012-03-14  Mark Rowe  <mrowe@apple.com>
811
812         <http://webkit.org/b/81193> Ensure libWebCoreTestSupport.dylib's library identifier is set appropriately for all configurations.
813
814         Reviewed by Dan Bernstein.
815
816         * Configurations/WebCoreTestSupport.xcconfig: Switch to setting DYLIB_INSTALL_NAME_BASE
817         rather than LD_DYLIB_INSTALL_NAME. The latter is derived from the former. Ensure that
818         DYLIB_INSTALL_NAME_BASE is also set for the Production configuration.
819
820 2012-03-14  Chris Fleizach  <cfleizach@apple.com>
821
822         AXDescription for ARIA role contentinfo incorrect
823         https://bugs.webkit.org/show_bug.cgi?id=78967
824
825         Reviewed by Beth Dakin.
826
827         Test: platform/mac/accessibility/aria-grouping-roles.html
828
829         * English.lproj/Localizable.strings:
830         * platform/LocalizedStrings.cpp:
831         (WebCore::AXARIAContentGroupText):
832
833 2012-03-14  Chris Fleizach  <cfleizach@apple.com>
834
835         AX: ARIA tables need to support selected rows attribute/select rows changed notification
836         https://bugs.webkit.org/show_bug.cgi?id=79821
837
838         Reviewed by Beth Dakin.
839
840         Test: platform/mac/accessibility/selected-rows-table.html
841
842         * accessibility/AccessibilityARIAGrid.h:
843         (WebCore::AccessibilityARIAGrid::isMultiSelectable):
844         (AccessibilityARIAGrid):
845         * accessibility/AccessibilityRenderObject.cpp:
846         (WebCore::AccessibilityRenderObject::ariaSelectedRows):
847         * accessibility/AccessibilityTableRow.cpp:
848         (WebCore::AccessibilityTableRow::observableObject):
849         (WebCore):
850         * accessibility/AccessibilityTableRow.h:
851         (AccessibilityTableRow):
852         * accessibility/mac/AXObjectCacheMac.mm:
853         (WebCore::AXObjectCache::postPlatformNotification):
854
855 2012-03-14  James Robinson  <jamesr@chromium.org>
856
857         Platforms without USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) don't need to query the page's displayID
858         https://bugs.webkit.org/show_bug.cgi?id=81187
859
860         Reviewed by Simon Fraser.
861
862         * dom/Document.cpp:
863         (WebCore::Document::webkitRequestAnimationFrame):
864
865 2012-03-14  Chris Fleizach  <cfleizach@apple.com>
866
867         AX: embedded attachments do not report their parents correctly
868         https://bugs.webkit.org/show_bug.cgi?id=80132
869
870         When a WebHTMLView has embedded attachments in it, the AXParent of those attachments is wrong.
871         It usually points to the AXScrollView of the web area. That's because there has been no way for WebCore to
872         communicate that this attachment view should actually make believe that it's parent is within the WebCore AX tree.
873
874         We can fix that by overriding the AXParent in overriden attributes for items that are attachments.
875
876         Reviewed by Beth Dakin.
877
878         Not able to construct a layout test because the problem only manifests itself when an AX client connects to WebKit
879         through the IPC mechanism.
880
881         * accessibility/AccessibilityObject.cpp:
882         (WebCore::AccessibilityObject::detachFromParent):
883         * accessibility/AccessibilityObject.h:
884         (AccessibilityObject):
885         (WebCore::AccessibilityObject::overrideAttachmentParent):
886         * accessibility/AccessibilityRenderObject.cpp:
887         (WebCore::AccessibilityRenderObject::updateAttachmentViewParents):
888         (WebCore::AccessibilityRenderObject::addChildren):
889         * accessibility/AccessibilityRenderObject.h:
890         (AccessibilityRenderObject):
891         * accessibility/mac/AccessibilityObjectMac.mm:
892         (WebCore::AccessibilityObject::overrideAttachmentParent):
893
894 2012-03-14  Ryosuke Niwa  <rniwa@webkit.org>
895
896         Improve ContainerNode's collectNodes() performance
897         https://bugs.webkit.org/show_bug.cgi?id=80706
898
899         Reviewed by Antti Koivisto.
900
901         Bump up the size of stack allocated buffer from 1 to 11. According to the rough study I conducted,
902         this would cover 99.5% of all node collection.
903
904         Note: the actual code change was made in r110797 but I somehow mangled my patches.
905
906         * dom/ContainerNode.cpp:
907         (WebCore):
908
909 2012-03-14  Seo Sanghyeon  <sh4.seo@samsung.com>
910
911         Cleanup semicolons in IDLs
912         https://bugs.webkit.org/show_bug.cgi?id=81129
913
914         Reviewed by Kentaro Hara.
915
916         No tests. No change in behavior.
917
918         * svg/SVGAnimateColorElement.idl:
919         * svg/SVGAnimateElement.idl:
920         * svg/SVGAnimateTransformElement.idl:
921         * svg/SVGAnimatedRect.idl:
922
923 2012-03-14  Hayato Ito  <hayato@chromium.org>
924
925         Make ShadowRoot.activeElement return null if it does not contain a focused element.
926         https://bugs.webkit.org/show_bug.cgi?id=81097
927
928         Reviewed by Dimitri Glazkov.
929
930         * dom/TreeScope.cpp:
931         (WebCore::TreeScope::activeElement):
932
933 2012-03-14  Matt Falkenhagen  <falken@chromium.org>
934
935         Allow per-script font settings to be specified in layout tests
936         https://bugs.webkit.org/show_bug.cgi?id=78184
937
938         Reviewed by Hajime Morita.
939
940         This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of
941         the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented
942         for Chromium so far.
943
944         Test: changed fast/text/international/locale-sensitive-fonts.html to use InternalSettings
945         instead of overridePreference.
946
947         * WebCore.exp.in: Added symbols.
948         * platform/text/LocaleToScriptMapping.h: Added scriptNameToCode used by InternalSettings.
949         (WebCore):
950         * platform/text/LocaleToScriptMappingDefault.cpp:
951         (WebCore::scriptNameToCode):
952         (WebCore::localeToScriptCodeForFontSelection):
953         * platform/text/LocaleToScriptMappingICU.cpp:
954         (WebCore::scriptNameToCode):
955         (WebCore):
956         * testing/InternalSettings.cpp: Added per-script font settings.
957         (WebCore):
958         (WebCore::setFontFamily):
959         (WebCore::InternalSettings::setStandardFontFamily):
960         (WebCore::InternalSettings::setSerifFontFamily):
961         (WebCore::InternalSettings::setSansSerifFontFamily):
962         (WebCore::InternalSettings::setFixedFontFamily):
963         (WebCore::InternalSettings::setCursiveFontFamily):
964         (WebCore::InternalSettings::setFantasyFontFamily):
965         (WebCore::InternalSettings::setPictographFontFamily):
966         * testing/InternalSettings.h:
967         (InternalSettings):
968         * testing/InternalSettings.idl:
969
970 2012-03-14  Kwonjin Jeong  <gram@company100.net>
971
972         Remove obsolete constructors of CSSPrimitiveValue class.
973         https://bugs.webkit.org/show_bug.cgi?id=80971
974
975         Remove constructors of CSSPrimitiveValue that can't be
976         reached.
977
978         Reviewed by Andreas Kling.
979
980         * css/CSSPrimitiveValueMappings.h:
981
982 2012-03-14  Igor Oliveira  <igor.o@sisa.samsung.com>
983
984         Split the extra logic out of RenderBlock::updateFirstLetter
985         https://bugs.webkit.org/show_bug.cgi?id=80772
986
987         Reviewed by Julien Chaffraix.
988
989         No change in behavior expected.
990
991         * rendering/RenderBlock.cpp:
992         (WebCore::RenderBlock::updateFirstLetterStyle):
993         (WebCore::RenderBlock::createFirstLetterRenderer):
994         (WebCore::RenderBlock::updateFirstLetter):
995         (WebCore):
996         * rendering/RenderBlock.h:
997         (RenderBlock):
998
999 2012-03-14  Anders Carlsson  <andersca@apple.com>
1000
1001         Fix build.
1002
1003         * html/track/TextTrackList.cpp:
1004
1005 2012-03-14  Ryosuke Niwa  <rniwa@webkit.org>
1006
1007         Build fix.
1008
1009         * dom/DynamicNodeList.h:
1010         (DynamicSubtreeNodeList):
1011
1012 2012-03-14  Ryosuke Niwa  <rniwa@webkit.org>
1013
1014         (register|unregister)DynamicSubtreeNodeList should be called only for labels and regions node lists
1015         https://bugs.webkit.org/show_bug.cgi?id=80900
1016
1017         Reviewed by Andreas Kling.
1018
1019         Cleaned up invalidation code for dynamic node lists. It seems like the existing code was utterly confused
1020         about the lifetime of node lists and caches within them. First, register/unregsiterDynamicSubtreeNodeList
1021         are called for all dynamic node lists even though it's only useful for labels and region node lists since
1022         it's a mechanism to allow node lists to be invalidated at a node to which the node list doesn't belong.
1023
1024         Second, some node lists had dedicated member functions on Node to explicitly invalidate caches in
1025         parsedAttribute. However, this is redundant because invalidateNodeListsCacheAfterAttributeChanged should be
1026         able to invalidate caches when the attribute value changes. This patch gets rid of the last instance of such
1027         function in HTMLLabelElement.
1028
1029         And finally, this patch restricts the callers of DynamicSubtreeNodeList::invalidateCache to be member
1030         functions of NodeListsNodeData (now friends of DynamicSubtreeNodeList) to allow futher refactoring.
1031
1032         * dom/DynamicNodeList.cpp:
1033         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Don't register the node list since it's only
1034         useful for labels and region node lists.
1035         (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Ditto.
1036         * dom/DynamicNodeList.h:
1037         (DynamicSubtreeNodeList):
1038         * dom/Node.cpp:
1039         (WebCore):
1040         (WebCore::Node::registerDynamicSubtreeNodeList): The comment about now we have to invalidate caches
1041         when there had no caches is incorrect because registerDynamicSubtreeNodeList is called when a node list
1042         is initially created. Also, if the tree scope didn't have any caches, then this is the first node list
1043         to be added to the list, so there's no point in calling InvalidateCaches (no-op).
1044         (WebCore::Node::unregisterDynamicSubtreeNodeList):
1045         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Take care of "for" content attribute.
1046         Also remove the redundant call to removeNodeListCacheIfPossible since we only invalidates node lists
1047         and never remove entries from NodeListsNodeData in this function.
1048         (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): The call to removeNodeListCacheIfPossible
1049         is also redundant here. Also removed the invalidation of m_listsWithCaches since it's already done in
1050         invalidateCaches via invalidateCachesThatDependOnAttributes.
1051         (WebCore::NodeListsNodeData::invalidateCaches): Removed the invalidation of m_labelsNodeListCache. It's
1052         done in invalidateCachesThatDependOnAttributes.
1053         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes): Invalidate
1054         m_listsInvalidatedAtDocument, which is renamed from m_listsWithCaches.
1055         (WebCore::NodeListsNodeData::isEmpty):
1056         * dom/Node.h:
1057         (Node):
1058         * dom/NodeRareData.h:
1059         (NodeListsNodeData):
1060         * html/HTMLLabelElement.cpp:
1061         (WebCore): Removed parseAttribute since the invalidation labels node list is now done by
1062         invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged.
1063         * html/HTMLLabelElement.h:
1064         (HTMLLabelElement):
1065         * html/LabelsNodeList.cpp:
1066         (WebCore::LabelsNodeList::LabelsNodeList):
1067         (WebCore::LabelsNodeList::~LabelsNodeList):
1068
1069 2012-03-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1070
1071         Unreviewed, rolling out r110565.
1072         http://trac.webkit.org/changeset/110565
1073         https://bugs.webkit.org/show_bug.cgi?id=81173
1074
1075         chromium deps are now far enough along that the original cl
1076         should work (Requested by thakis on #webkit).
1077
1078         * WebCore.gyp/mac/adjust_visibility.sh:
1079
1080 2012-03-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1081
1082         Unreviewed, rolling out r110641.
1083         http://trac.webkit.org/changeset/110641
1084         https://bugs.webkit.org/show_bug.cgi?id=81170
1085
1086         Causes an ASAN failure (Requested by abarth on #webkit).
1087
1088         * Target.pri:
1089         * UseV8.cmake:
1090         * WebCore.gypi:
1091         * bindings/scripts/CodeGeneratorJS.pm:
1092         (GenerateHeader):
1093         (GenerateImplementation):
1094         * bindings/scripts/CodeGeneratorV8.pm:
1095         (GenerateHeader):
1096         (GenerateNamedConstructorCallback):
1097         (GenerateImplementation):
1098         * bindings/scripts/IDLAttributes.txt:
1099         * bindings/scripts/test/V8/V8Float64Array.cpp:
1100         (WebCore):
1101         * bindings/scripts/test/V8/V8Float64Array.h:
1102         (V8Float64Array):
1103         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1104         (WebCore):
1105         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1106         (V8TestActiveDOMObject):
1107         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1108         (WebCore):
1109         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1110         (V8TestCustomNamedGetter):
1111         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1112         (WebCore):
1113         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1114         (V8TestEventConstructor):
1115         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1116         (WebCore):
1117         * bindings/scripts/test/V8/V8TestEventTarget.h:
1118         (V8TestEventTarget):
1119         * bindings/scripts/test/V8/V8TestInterface.cpp:
1120         (WebCore):
1121         * bindings/scripts/test/V8/V8TestInterface.h:
1122         (V8TestInterface):
1123         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1124         (WebCore):
1125         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1126         (V8TestMediaQueryListListener):
1127         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1128         (WebCore):
1129         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1130         (V8TestNamedConstructor):
1131         * bindings/scripts/test/V8/V8TestObj.cpp:
1132         (WebCore):
1133         * bindings/scripts/test/V8/V8TestObj.h:
1134         (V8TestObj):
1135         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1136         (WebCore):
1137         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1138         (V8TestSerializedScriptValueInterface):
1139         * bindings/v8/NPV8Object.cpp:
1140         (WebCore::npObjectTypeInfo):
1141         * bindings/v8/V8GCController.cpp:
1142         (WebCore::GrouperVisitor::visitDOMWrapper):
1143         * bindings/v8/WrapperTypeInfo.h:
1144         (WebCore):
1145         (WrapperTypeInfo):
1146         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp.
1147         (WebCore):
1148         (WebCore::toV8):
1149         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
1150         (WebCore::toV8):
1151         (WebCore):
1152         * bindings/v8/custom/V8DOMTokenListCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp.
1153         (WebCore):
1154         (WebCore::toV8):
1155         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1156         (WebCore):
1157         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
1158         (WebCore::toV8):
1159         (WebCore):
1160         * bindings/v8/custom/V8StyleSheetCustom.cpp:
1161         (WebCore::toV8):
1162         * css/CSSStyleSheet.idl:
1163         * css/StyleSheet.idl:
1164         * dom/DOMStringMap.idl:
1165         * dom/NamedNodeMap.idl:
1166         * html/DOMTokenList.idl:
1167         * html/track/TextTrackList.cpp:
1168         * html/track/TextTrackList.idl:
1169
1170 2012-03-13  Jon Lee  <jonlee@apple.com>
1171
1172         Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
1173         https://bugs.webkit.org/show_bug.cgi?id=80922
1174         <rdar://problem/11035082>
1175
1176         Reviewed by Jian Li.
1177
1178         You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
1179         LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
1180         new API. Therefore, APIs that are common between the two will have:
1181         #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
1182
1183         This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
1184         the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
1185
1186         * bindings/scripts/InFilesCompiler.pm: Update the script to handle the "|" flag in a conditional.
1187         (preferredConditional):
1188         (conditionalStringFromAttributeValue):
1189         (generateInterfacesHeader):
1190         (generateHeadersHeader):
1191
1192         Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
1193         * WebCore.exp.in:
1194         * bindings/cpp/WebDOMEventTarget.cpp:
1195         (toWebKit):
1196         * bindings/js/JSDesktopNotificationsCustom.cpp:
1197         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
1198         * dom/EventTargetFactory.in:
1199         * notifications/Notification.cpp:
1200         * notifications/Notification.h:
1201         * notifications/Notification.idl:
1202         * notifications/NotificationCenter.cpp:
1203         * notifications/NotificationCenter.h:
1204         * notifications/NotificationCenter.idl:
1205         * notifications/NotificationContents.h:
1206         * notifications/NotificationController.cpp:
1207         * notifications/NotificationController.h:
1208         * page/DOMWindow.cpp:
1209         (WebCore::DOMWindow::~DOMWindow):
1210         (WebCore::DOMWindow::willDetachPage):
1211         (WebCore::DOMWindow::disconnectDOMWindowProperties):
1212         (WebCore::DOMWindow::clearDOMWindowProperties):
1213         (WebCore):
1214         * page/DOMWindow.h:
1215         (DOMWindow):
1216         * page/DOMWindow.idl:
1217         * page/Frame.cpp:
1218         (WebCore::Frame::willDetachPage):
1219         (WebCore::Frame::transferChildFrameToNewDocument):
1220         * workers/WorkerContext.cpp:
1221         (WebCore::WorkerContext::~WorkerContext):
1222         (WebCore):
1223         * workers/WorkerContext.h:
1224         (WorkerContext):
1225         * workers/WorkerContext.idl:
1226         * workers/WorkerThread.cpp:
1227         (WebCore::WorkerThread::WorkerThread):
1228         * workers/WorkerThread.h:
1229         (WorkerThread):
1230
1231 2012-03-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1232
1233         Unreviewed, rolling out r110744.
1234         http://trac.webkit.org/changeset/110744
1235         https://bugs.webkit.org/show_bug.cgi?id=81168
1236
1237         Causes many WebAudio tests to crash in debug (Requested by
1238         abarth on #webkit).
1239
1240         * platform/audio/Biquad.cpp:
1241         (WebCore::Biquad::process):
1242
1243 2012-03-14  Brady Eidson  <beidson@apple.com>
1244
1245         <rdar://problem/11045584> and https://bugs.webkit.org/show_bug.cgi?id=81166
1246         Repro crash in compositing/iframes/page-cache-layer-tree.html
1247
1248         Reviewed by Sam Weinig.
1249
1250         No new tests. (Discovered from and covered by existing test)
1251
1252         ScriptCachedFrameData doesn't need to keep a DOMWindow:
1253         * bindings/js/ScriptCachedFrameData.cpp:
1254         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
1255         * bindings/js/ScriptCachedFrameData.h:
1256         (ScriptCachedFrameData):
1257
1258         CachedFrame should grab it off the Frame directly and store it locally:
1259         * history/CachedFrame.cpp:
1260         (WebCore::CachedFrame::CachedFrame):
1261         * history/CachedFrame.h:
1262         (WebCore::CachedFrameBase::domWindow):
1263         (CachedFrameBase):
1264
1265 2012-03-14  Tony Chang  <tony@chromium.org>
1266
1267         fix negative flexing in auto sized columns
1268         https://bugs.webkit.org/show_bug.cgi?id=80069
1269
1270         Reviewed by Ojan Vafai.
1271
1272         New test cases in css3/flexbox/columns-auto-size.html.
1273
1274         * rendering/RenderFlexibleBox.cpp:
1275         (WebCore):
1276         (WebCore::RenderFlexibleBox::computeAvailableFreeSpace): Properly compute this for auto sizing columns. Previously, we would always return 0.
1277         (WebCore::RenderFlexibleBox::layoutFlexItems):
1278         (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithm): Drop an unnecessary check against undefined. isSpecified covers this for us.
1279         * rendering/RenderFlexibleBox.h:
1280         (RenderFlexibleBox):
1281
1282 2012-03-14  Grace Ku  <gracek@codeaurora.org>
1283
1284         Incorrect handling of sizes in "em" when first-line changes font size
1285         https://bugs.webkit.org/show_bug.cgi?id=79526
1286
1287         Reviewed by Eric Seidel.
1288
1289         When a first-line pseudo class changes the font size, the "em" unit is handled incorrectly.
1290         It uses the paragraph's original font size (the size of the rest of the paragraph) rather than
1291         the font-size of the first-line of the paragraph.
1292
1293         This was corrected by checking if the InlineFlowBox was the first line using the existing
1294         InlineFlowBox::isFirstLineStyle() function. The corrected behaviour matches Gecko and Presto.
1295         Trident seems to get it half-wrong in the use case we are testing, painting the correct width for
1296         the border but leaving the wrong amount of space.
1297
1298         The CSS specification doc at the time of this patch specifies that ':first-line' should only support
1299         certain properties, though UAs may choose to apply more properties. Furthermore, the spec does not
1300         define the exact rendering of all cases of ':first-line'. It notes that a more precise definition
1301         may appear in future revisions.
1302
1303         Test: fast/css/pseudo-first-line-border-width.html
1304
1305         * rendering/InlineFlowBox.cpp:
1306         (WebCore::InlineFlowBox::paintBoxDecorations):
1307         * rendering/InlineFlowBox.h:
1308         (WebCore::InlineFlowBox::borderLogicalLeft):
1309         (WebCore::InlineFlowBox::borderLogicalRight):
1310         * rendering/RenderBoxModelObject.cpp:
1311         (WebCore::RenderBoxModelObject::paintBorder):
1312         (WebCore::RenderBoxModelObject::getBorderEdgeInfo):
1313         (WebCore::RenderBoxModelObject::borderObscuresBackgroundEdge):
1314         (WebCore::RenderBoxModelObject::borderObscuresBackground):
1315         * rendering/RenderBoxModelObject.h:
1316         (RenderBoxModelObject):
1317
1318 2012-03-14  Martin Robinson  <mrobinson@igalia.com>
1319
1320         Fix the TextureMapper build for GTK+.
1321
1322         No new tests. This is just a build fix.
1323
1324         * platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
1325         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1326         * platform/graphics/texmap/TextureMapper.h:
1327
1328 2012-03-12  Martin Robinson  <mrobinson@igalia.com>
1329
1330         [GTK] Menulist buttons have separators even when the theme turns them off
1331         https://bugs.webkit.org/show_bug.cgi?id=80668
1332
1333         Reviewed by Daniel Bates.
1334
1335         No new tests. GTK+ theme differences are notoriously difficult
1336         to test, because consistent results depend on having certain themes
1337         and certain versions of themes installed.
1338
1339         Instead of using the GTK_TYPE_BUTTON and GTK_TYPE_SEPARATOR tags to get the
1340         style context, use GTK_TYPE_COMBO_BOX which should provide more accurate theme settings.
1341
1342         * platform/gtk/RenderThemeGtk3.cpp:
1343         (WebCore::getComboBoxMetrics): Get metrics from a GTK_TYPE_COMBO_BOX style context.
1344         (WebCore::RenderThemeGtk::paintMenuList): Get separator settings from the GTK_TYPE_COMBO_BOX style context.
1345
1346 2012-03-14  Levi Weintraub  <leviw@chromium.org>
1347
1348         Implement proper sub-pixel support in RenderFileUploadControl
1349         https://bugs.webkit.org/show_bug.cgi?id=80881
1350
1351         Reviewed by Dimitri Glazkov.
1352
1353         Correcting improper usage of LayoutUnits when interacting with the graphics context
1354         and platform code. Specifically:
1355         - pixel snapping the clip rect and paint offsets before sending values to the
1356           graphics context in paintObject.
1357         - using on-screen (pixel snapped) values to pass off to platform code to determine
1358           the max length of the filename to be drawn.
1359
1360         No new tests. No change in behavior.
1361
1362         * rendering/RenderFileUploadControl.cpp:
1363         (WebCore::nodeWidth):
1364         (WebCore::RenderFileUploadControl::maxFilenameWidth):
1365         (WebCore::RenderFileUploadControl::paintObject):
1366
1367 2012-03-14  Joseph Pecoraro  <pecoraro@apple.com>
1368
1369         [JSC] Web Inspector: CRASH running $0, $1, etc before they are set
1370         https://bugs.webkit.org/show_bug.cgi?id=81082
1371
1372         Don't return an invalid JSValue. Check if the ScriptValue
1373         has no value and return undefined in that case.
1374
1375         Reviewed by Pavel Feldman.
1376
1377         Updated test: inspector/console/command-line-api.html
1378
1379         * bindings/js/JSInjectedScriptHostCustom.cpp:
1380         (WebCore::JSInjectedScriptHost::inspectedObject):
1381
1382 2012-03-14  James Robinson  <jamesr@chromium.org>
1383
1384         [chromium] Remove canRecoverFromContextLoss attribute, it's unused
1385         https://bugs.webkit.org/show_bug.cgi?id=81158
1386
1387         Reviewed by Stephen White.
1388
1389         Canvas accelerated no longer depends on the canRecoverFromContextLoss attribute after r110716.
1390
1391         * platform/graphics/GraphicsContext3D.h:
1392         (WebCore::GraphicsContext3D::Attributes::Attributes):
1393         (Attributes):
1394         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
1395         (WebCore::SharedGraphicsContext3DImpl::get):
1396
1397 2012-03-14  Jer Noble  <jer.noble@apple.com>
1398
1399         Opening a URL in a MediaDocument does not propagate MIME type info to media element
1400         https://bugs.webkit.org/show_bug.cgi?id=81148
1401
1402         Reviewed by Eric Carlson.
1403
1404         Test: http/tests/media/media-document.html
1405
1406         Pass through the mime type from the DocumentLoader into the <source type=""> attribute of the
1407         generated video element. 
1408
1409         * html/MediaDocument.cpp:
1410         (WebCore::MediaDocumentParser::createDocumentStructure):
1411
1412 2012-03-14  Stephen White  <senorblanco@chromium.org>
1413
1414         [chromium] Fix accelerated Canvas2D with threaded compositing.
1415         https://bugs.webkit.org/show_bug.cgi?id=80998
1416
1417         Reviewed by James Robinson.
1418
1419         Covered by unit tests Canvas2DLayerChromiumTest and
1420         TreeSynchronizerTest.
1421
1422         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1423         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
1424         (WebCore):
1425         Delay creation of the front texture for double-buffering until the
1426         first call to paintContentsIfDirty().
1427         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1428         (Canvas2DLayerChromium):
1429         Remove setTextureManager() and setLayerTreeHost(), since their job
1430         has been subsumed by paintContentsIfDirty().
1431         * platform/graphics/chromium/TreeSynchronizer.cpp:
1432         (WebCore::TreeSynchronizer::updateScrollbarLayerPointersRecursive):
1433         Perform an early-out if the passed-in layer is NULL.
1434
1435 2012-03-14  Mark Pilgrim  <pilgrim@chromium.org>
1436
1437         Move EntriesCallback to Modules/filesystem/
1438         https://bugs.webkit.org/show_bug.cgi?id=81032
1439
1440         Reviewed by Adam Barth.
1441
1442         No new tests, all existing tests pass.
1443
1444         * CMakeLists.txt:
1445         * DerivedSources.make:
1446         * DerivedSources.pri:
1447         * GNUmakefile.list.am:
1448         * Modules/filesystem/EntriesCallback.h: Copied from Source/WebCore/fileapi/EntriesCallback.h.
1449         * Modules/filesystem/EntriesCallback.idl: Copied from Source/WebCore/fileapi/EntriesCallback.idl.
1450         * Target.pri:
1451         * WebCore.gypi:
1452         * WebCore.vcproj/WebCore.vcproj:
1453         * WebCore.xcodeproj/project.pbxproj:
1454         * fileapi/EntriesCallback.h: Removed.
1455         * fileapi/EntriesCallback.idl: Removed.
1456
1457 2012-03-14  Tony Chang  <tony@chromium.org>
1458
1459         multiline column flexbox with auto height wrap too much
1460         https://bugs.webkit.org/show_bug.cgi?id=80929
1461
1462         Reviewed by David Hyatt.
1463
1464         Test: css3/flexbox/multiline-column-auto.html
1465
1466         * rendering/RenderBox.cpp:
1467         (WebCore::RenderBox::computeLogicalHeightUsing):
1468         (WebCore):
1469         (WebCore::RenderBox::computeContentLogicalHeightUsing): Pull out into a separate method.
1470         * rendering/RenderBox.h:
1471         (RenderBox):
1472         * rendering/RenderFlexibleBox.cpp:
1473         (WebCore::RenderFlexibleBox::lineBreakLength): Compute the value based on height & max-height for column layout.
1474         (WebCore):
1475         (WebCore::RenderFlexibleBox::computeNextFlexLine):
1476         * rendering/RenderFlexibleBox.h:
1477         (RenderFlexibleBox):
1478
1479 2012-03-14  Xingnan Wang  <xingnan.wang@intel.com>
1480
1481         Optimize the multiply-add in Biquad.cpp::process
1482         https://bugs.webkit.org/show_bug.cgi?id=75528
1483
1484         Reviewed by Chris Rogers.
1485
1486         Pipeline the multiply-add with SSE2 instructions and get about 20% improvement for the function.
1487
1488         * platform/audio/Biquad.cpp:
1489         (WebCore::Biquad::process):
1490
1491 2012-03-14  James Robinson  <jamesr@chromium.org>
1492
1493         [Chromium] Layout Test compositing/repaint/opacity-between-absolute.html is flaky
1494         https://bugs.webkit.org/show_bug.cgi?id=79823
1495
1496         Reviewed by Adrienne Walker.
1497
1498         LayerRendererChromium was storing a weak pointer to the current render surface in m_currentRenderSurface and
1499         using this in useRenderSurface() to avoid rebinding if we called useRenderSurface() multiple times in a row on
1500         the same surface. This pointer was never cleared, so if any subsequent surface landed at the same address this
1501         caching would misbehave and we'd fail to correctly initialize the new render surface. The caching wasn't
1502         actually buying us anything anyway since we only call useRenderSurface() once per surface per frame and we
1503         always set the viewport for the default render surface.
1504
1505         * platform/graphics/chromium/LayerRendererChromium.cpp:
1506         (WebCore::LayerRendererChromium::beginDrawingFrame):
1507         (WebCore::LayerRendererChromium::useRenderSurface):
1508
1509 2012-03-14  Zalan Bujtas  <zbujtas@gmail.com>
1510
1511         Frame flattening ASSERT(!needsLayout()) in FrameView::paintContents()
1512         https://bugs.webkit.org/show_bug.cgi?id=80155
1513
1514         Reviewed by Antti Koivisto.
1515
1516         This patch ensures that an iframe only schedules and calls parent's layout,
1517         when it is going to be flattened. Non-flattened iframe does not affect
1518         parent's layout, so normal layout flow applies. isInSubframeLayoutWithFrameFlattening()
1519         function has been added to test whether a particular child frame is changing
1520         parent's layout. This function also ensures that scheduleRelayout() and layout()
1521         are in sync of checking againts frame flattening.
1522
1523         Test: fast/frames/flattening/iframe-flattening-fixed-width-and-height-no-scrolling-with-js-forced-layout.html
1524
1525         * page/FrameView.cpp:
1526         (WebCore::FrameView::avoidScrollbarCreation):
1527         (WebCore::FrameView::layout):
1528         (WebCore::FrameView::scheduleRelayout):
1529         (WebCore::FrameView::isInChildFrameWithFrameFlattening):
1530         (WebCore):
1531         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
1532         * page/FrameView.h:
1533         (FrameView):
1534         * rendering/RenderIFrame.h:
1535         (RenderIFrame):
1536         (WebCore::RenderIFrame::renderName):
1537
1538 2012-03-14  Anders Carlsson  <andersca@apple.com>
1539
1540         Don't cap the scroll position if layout happens when a FrameView's overhangAmount is non-zero
1541         https://bugs.webkit.org/show_bug.cgi?id=81146
1542         <rdar://problem/10850075>
1543
1544         Reviewed by Beth Dakin.
1545
1546         If layout happens when a page has a non-zero overhang amount, we shouldn't cap the scroll position
1547         to be inside of the valid maximum/minimum scroll offsets because that will cause the page to jump back, which
1548         can look really bad if layout happens in response to the page being scrolled.
1549
1550         * platform/ScrollView.cpp:
1551         (WebCore::ScrollView::updateScrollbars):
1552
1553 2012-03-14  Tommy Widenflycht  <tommyw@google.com>
1554
1555         MediaStream API (JSEP): Introducing IceCandidate
1556         https://bugs.webkit.org/show_bug.cgi?id=80699
1557
1558         Reviewed by Adam Barth.
1559
1560         Patch #2 in a series of patches to change the PeerConnection from ROAP to JSEP,
1561         see bug 80589 for more information.
1562         Adding the JS object IceCandidate and its WebCore/platform sibling IceCandidateDescriptor.
1563         This object will be created both from JS and the embedder.
1564
1565         Not possible to test until the entire JSEP feature is commited.
1566
1567         * GNUmakefile.list.am:
1568         * Modules/mediastream/IceCandidate.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.cpp.
1569         (WebCore):
1570         (WebCore::IceCandidate::create):
1571         (WebCore::IceCandidate::IceCandidate):
1572         (WebCore::IceCandidate::~IceCandidate):
1573         (WebCore::IceCandidate::label):
1574         (WebCore::IceCandidate::candidateLine):
1575         (WebCore::IceCandidate::toSdp):
1576         (WebCore::IceCandidate::descriptor):
1577         * Modules/mediastream/IceCandidate.h: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.cpp.
1578         (WebCore):
1579         (IceCandidate):
1580         * Modules/mediastream/IceCandidate.idl: Added.
1581         * WebCore.gypi:
1582         * platform/mediastream/IceCandidateDescriptor.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.cpp.
1583         (WebCore):
1584         (WebCore::IceCandidateDescriptor::create):
1585         (WebCore::IceCandidateDescriptor::IceCandidateDescriptor):
1586         (WebCore::IceCandidateDescriptor::~IceCandidateDescriptor):
1587         (WebCore::IceCandidateDescriptor::toSdp):
1588         * platform/mediastream/IceCandidateDescriptor.h: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.cpp.
1589         (WebCore):
1590         (IceCandidateDescriptor):
1591         (WebCore::IceCandidateDescriptor::label):
1592         (WebCore::IceCandidateDescriptor::candidateLine):
1593         * platform/mediastream/MediaStreamCenter.cpp:
1594         (WebCore::MediaStreamCenter::constructSdp):
1595         (WebCore):
1596         * platform/mediastream/MediaStreamCenter.h:
1597         (WebCore):
1598         (MediaStreamCenter):
1599
1600 2012-03-14  Simon Fraser  <simon.fraser@apple.com>
1601
1602         background-visibility:hidden should create a RenderLayer
1603         https://bugs.webkit.org/show_bug.cgi?id=81134
1604
1605         Reviewed by Dean Jackson.
1606         
1607         Background-visibility:hidden has to create RenderLayers, because it's implemented
1608         via compositing and/or paint short-circuiting in RenderLayer code.
1609
1610         Test: transforms/3d/general/background-visibility-layers.html
1611
1612         * rendering/RenderBox.h:
1613         * rendering/RenderBoxModelObject.h:
1614         (WebCore::RenderBoxModelObject::requiresLayer):
1615         * rendering/RenderObject.h:
1616         (WebCore::RenderObject::hasHiddenBackface):
1617         * rendering/RenderTableRow.h:
1618
1619 2012-03-14  Raul Hudea  <rhudea@adobe.com>
1620
1621         [CSSRegions][CSSOM] Implement regionLayoutEvent
1622         https://bugs.webkit.org/show_bug.cgi?id=78882
1623
1624         Reviewed by David Hyatt.
1625
1626         Adding the regionLayoutEvent that is dispatch for all regions after each flow-thread layout.
1627
1628         Tests: fast/regions/region-event-add-to-flow.html
1629                fast/regions/region-event-remove-from-dom.html
1630                fast/regions/region-event-remove-from-flow.html
1631                fast/regions/region-event.html
1632
1633         * dom/Document.cpp:
1634         (WebCore::Document::addListenerTypeIfNeeded): Added check for regionLayoutUpdate listeners
1635         * dom/Document.h:
1636         * dom/EventNames.h:
1637         (WebCore):
1638         * dom/Node.cpp:
1639         (WebCore::Node::dispatchRegionLayoutUpdateEvent):
1640         (WebCore):
1641         * dom/Node.h:
1642         (Node):
1643         * rendering/RenderFlowThread.cpp:
1644         (WebCore::RenderFlowThread::RenderFlowThread):
1645         (WebCore::RenderFlowThread::layout): Start the event dispatch timer but only if there are regionLayoutUpdate listeners and there is at least one region that had its layout updated.
1646         (WebCore::RenderFlowThread::computeOverflowStateForRegions): Mark regions that might had a layout update
1647         (WebCore::RenderFlowThread::regionLayoutUpdateEventTimerFired):
1648         (WebCore):
1649         * rendering/RenderFlowThread.h:
1650         * rendering/RenderRegion.cpp:
1651         (WebCore::RenderRegion::RenderRegion):
1652         * rendering/RenderRegion.h:
1653         (WebCore::RenderRegion::setDispatchRegionLayoutUpdateEvent):
1654         (WebCore::RenderRegion::shouldDispatchRegionLayoutUpdateEvent):
1655         (RenderRegion):
1656
1657 2012-03-14  Pierre Rossi  <pierre.rossi@gmail.com>
1658
1659         [Qt] Add support for vertical sliders in mobile theme
1660         https://bugs.webkit.org/show_bug.cgi?id=80179
1661
1662         This makes sliders using the "slider-vertical" appearance more sensible.
1663
1664         Reviewed by Simon Hausmann.
1665
1666         No new tests, since the mobile theme still isn't used in layout tests.
1667
1668         * platform/qt/RenderThemeQtMobile.cpp:
1669         (WebCore):
1670         (WebCore::StylePainterMobile::drawProgress):
1671         (WebCore::RenderThemeQtMobile::paintSliderTrack):
1672         * platform/qt/RenderThemeQtMobile.h:
1673         (StylePainterMobile):
1674
1675 2012-03-14  Jer Noble  <jer.noble@apple.com>
1676
1677         WebProcess spins beneath [QTMovie movieFileTypes:]
1678         https://bugs.webkit.org/show_bug.cgi?id=81133
1679
1680         Reviewed by Eric Carlson.
1681
1682         No new tests; speculative fix for top WebProcess spin.
1683
1684         When checking to see if a given mime type is supported by QuickTime,
1685         immediately exclude all types that do not begin with 'audio/' or 'video/'.
1686         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1687         (WebCore::MediaPlayerPrivateQTKit::supportsType):
1688
1689 2012-03-14  Zalan Bujtas  <zbujtas@gmail.com>
1690
1691         Make RenderIFrame::flattenFrame() return earlier, when frame flattening is disabled.
1692         https://bugs.webkit.org/show_bug.cgi?id=80301
1693
1694         Reviewed by Antti Koivisto.
1695
1696         Reorganize RenderIFrame flattenFrame() code, so that it returns
1697         earlier for the normal use case, when frame flattening is disabled.
1698         It also removes leftover null check.
1699
1700         No new tests, since there's no new functionality.
1701
1702         * rendering/RenderIFrame.cpp:
1703         (WebCore::RenderIFrame::flattenFrame):
1704
1705 2012-03-14  James Robinson  <jamesr@chromium.org>
1706
1707         [chromium] Provide explicit polling API to check if the platform is capable of accelerated 2d canvas
1708         https://bugs.webkit.org/show_bug.cgi?id=80667
1709
1710         Reviewed by Darin Fisher.
1711
1712         Query the platform to see if we can instantiate a context suitable for accelerating 2d canvas. If we can't, for
1713         instance if we're on a system that can't preserve a context when the screensaver comes up, then immediately fall
1714         back to software.
1715
1716         Covered by canvas layout tests in the virtual-gpu mode.
1717
1718         * html/HTMLCanvasElement.cpp:
1719         (WebCore::HTMLCanvasElement::shouldAccelerate):
1720         * platform/chromium/PlatformSupport.h:
1721
1722 2012-03-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1723
1724         [GTK] Handle printing errors in WebKit2
1725         https://bugs.webkit.org/show_bug.cgi?id=77197
1726
1727         Reviewed by Gustavo Noronha Silva.
1728
1729         * platform/gtk/ErrorsGtk.cpp:
1730         (WebCore::printError): Create a generic print error.
1731         (WebCore::printerNotFoundError): Create a print error to notify
1732         that the selected printer could not be found.
1733         (WebCore::invalidPageRangeToPrint): Create a print error when the
1734         selected page range is invalid and there are no pages to print.
1735         * platform/gtk/ErrorsGtk.h:
1736         (WebCore): Add print error doamin.
1737
1738 2012-03-14  Nikolas Zimmermann  <nzimmermann@rim.com>
1739
1740         Make SVGUseElement respect & support externalResourcesRequired
1741         https://bugs.webkit.org/show_bug.cgi?id=81109
1742
1743         Reviewed by Rob Buis.
1744
1745         Generalize the existing externalResourcesRequired support from SVGScriptElement
1746         into SVGExternalResourcesRequired, so it can be shared with SVGUseElement, which
1747         was lacking proper externalResourcesRequired support.
1748
1749         <use xlink:href="external.svg" onload="alert('hi')" externalResourcesRequired="true"/>
1750         The onload handler now fires _after_ the external resources loaded, making it possible
1751         to write reliable tests that switch from internal to external resources or the other
1752         way around. Converted the new tests in svg/dynamic-updates/SVGUseElement* to listen
1753         to SVGLoad events, to make them reliable.
1754
1755         We may be able to generalize this to cover SVGImageElement as well (the only other class which
1756         is currently supporting externalResourcesRequired - but that's more involved, so I left it TODO).
1757
1758         Covered by existing tests and the changes to the new SVGUseElement tests.
1759
1760         * svg/SVGElement.h:
1761         (SVGElement): Make haveLoadedRequiredResources() public so SVGExternalResourcesRequired can call it.
1762         * svg/SVGExternalResourcesRequired.cpp: Refactored code from SVGScriptElement, 1:1 copies w/o changes.
1763         (WebCore::SVGExternalResourcesRequired::handleAttributeChange):
1764         (WebCore::SVGExternalResourcesRequired::dispatchLoadEvent):
1765         (WebCore::SVGExternalResourcesRequired::insertedIntoDocument):
1766         (WebCore::SVGExternalResourcesRequired::finishParsingChildren):
1767         (WebCore::SVGExternalResourcesRequired::haveLoadedRequiredResources):
1768         * svg/SVGExternalResourcesRequired.h: Add new virtual functions, that must be available in classes that inherit from SVGExternalResourcesRequired.
1769         (WebCore::SVGExternalResourcesRequired::setHaveFiredLoadEvent):
1770         (WebCore::SVGExternalResourcesRequired::isParserInserted):
1771         (WebCore::SVGExternalResourcesRequired::haveFiredLoadEvent):
1772         * svg/SVGScriptElement.cpp: Refactored externalResourcesRequired handling into SVGExternalResourcesRequired.
1773         (WebCore::SVGScriptElement::svgAttributeChanged):
1774         (WebCore::SVGScriptElement::insertedIntoDocument):
1775         (WebCore::SVGScriptElement::finishParsingChildren):
1776         * svg/SVGScriptElement.h: Ditto.
1777         (WebCore::SVGScriptElement::haveLoadedRequiredResources):
1778         (WebCore::SVGScriptElement::dispatchLoadEvent):
1779         (WebCore::SVGScriptElement::setHaveFiredLoadEvent):
1780         (WebCore::SVGScriptElement::isParserInserted):
1781         (WebCore::SVGScriptElement::haveFiredLoadEvent):
1782         * svg/SVGTests.cpp: Fix obvious typo, that leads to an assertion. Always return true if we know the attributeName.
1783         (WebCore::SVGTests::handleAttributeChange):
1784         * svg/SVGTests.h:
1785         * svg/SVGTextPathElement.cpp:
1786         (WebCore::SVGTextPathElement::insertedIntoDocument): Remove ambigous call warning.
1787         * svg/SVGUseElement.cpp: Support externalResourcesRequired="true/false" + dynamic changes of it. Covered by existing tests.
1788         (WebCore::SVGUseElement::SVGUseElement):
1789         (WebCore::SVGUseElement::create):
1790         (WebCore::SVGUseElement::insertedIntoDocument):
1791         (WebCore::SVGUseElement::svgAttributeChanged):
1792         (WebCore::SVGUseElement::notifyFinished):
1793         (WebCore::SVGUseElement::finishParsingChildren):
1794         (WebCore):
1795         * svg/SVGUseElement.h: Ditto.
1796         (WebCore::SVGUseElement::haveLoadedRequiredResources):
1797         (WebCore::SVGUseElement::setHaveFiredLoadEvent):
1798         (WebCore::SVGUseElement::isParserInserted):
1799         (WebCore::SVGUseElement::haveFiredLoadEvent):
1800         * svg/svgtags.in: Pass "bool wasInsertedByParser" to SVGUseElement constructor.
1801
1802 2012-03-14  Andrew Lo  <anlo@rim.com>
1803
1804         [BlackBerry] Implement REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR using AnimationFrameRateController
1805         https://bugs.webkit.org/show_bug.cgi?id=81000
1806
1807         Add BlackBerry port for DisplayRefreshMonitor using AnimationFrameRateController.
1808         Moved refreshDisplayOnMainThread to platform independant part of header.
1809
1810         Reviewed by Antonio Gomes.
1811
1812         requestAnimationFrame already covered by tests in LayoutTests/fast/animation.
1813
1814         * PlatformBlackBerry.cmake:
1815         * platform/graphics/DisplayRefreshMonitor.cpp:
1816         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
1817         * platform/graphics/DisplayRefreshMonitor.h:
1818         (WebCore):
1819         (DisplayAnimationClient):
1820         (WebCore::DisplayAnimationClient::~DisplayAnimationClient):
1821         (DisplayRefreshMonitor):
1822         * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp: Added.
1823         (WebCore):
1824         (WebCore::DisplayAnimationClient::DisplayAnimationClient):
1825         (WebCore::DisplayAnimationClient::animationFrameChanged):
1826         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor):
1827         (WebCore::DisplayRefreshMonitor::startAnimationClient):
1828         (WebCore::DisplayRefreshMonitor::stopAnimationClient):
1829         (WebCore::DisplayRefreshMonitor::requestRefreshCallback):
1830         (WebCore::DisplayRefreshMonitor::displayLinkFired):
1831
1832 2012-03-14  Yury Semikhatsky  <yurys@chromium.org>
1833
1834         Web Inspector: use class name indexes instead of class names when evaluating aggregates
1835         https://bugs.webkit.org/show_bug.cgi?id=81100
1836
1837         Class name and type name indexes are now used when calculating class aggregates
1838         in heap snapshots instead of string lookup followed by a string comparison.
1839
1840         Class names like "Window / www.webkit.org" are now left as is in the UI (it used
1841         to be trimed to just "Window").
1842
1843         Reviewed by Pavel Feldman.
1844
1845         * inspector/front-end/HeapSnapshot.js:
1846         (WebInspector.HeapSnapshotNode.prototype.get classNameIndex):
1847         (WebInspector.HeapSnapshotNode.prototype.hasType):
1848         (WebInspector.HeapSnapshot.prototype._init):
1849         (WebInspector.HeapSnapshot.prototype._buildAggregates):
1850
1851 2012-03-14  Andrey Kosyakov  <caseq@chromium.org>
1852
1853         Web Inspector: add didCancelFrame timeline event
1854         https://bugs.webkit.org/show_bug.cgi?id=80994
1855
1856         Reviewed by Pavel Feldman.
1857
1858         - add an ability to cancel certain timeline events, unless they've been followed by other events.
1859         - implement didCancelFrame() event, fired when a platform decides not to render frame after didBeginFrame() was called.
1860
1861         Test: inspector/timeline/timeline-frames.html
1862
1863         * WebCore.exp.in:
1864         * inspector/InspectorInstrumentation.cpp:
1865         (WebCore::InspectorInstrumentation::didCancelFrameImpl):
1866         (WebCore):
1867         * inspector/InspectorInstrumentation.h:
1868         (InspectorInstrumentation):
1869         (WebCore::InspectorInstrumentation::didCancelFrame):
1870         (WebCore):
1871         * inspector/InspectorTimelineAgent.cpp:
1872         (WebCore::InspectorTimelineAgent::didBeginFrame):
1873         (WebCore):
1874         (WebCore::InspectorTimelineAgent::didCancelFrame):
1875         (WebCore::InspectorTimelineAgent::appendRecord):
1876         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
1877         (WebCore::InspectorTimelineAgent::pushCancelableRecord):
1878         (WebCore::InspectorTimelineAgent::commitCancelableRecords):
1879         (WebCore::InspectorTimelineAgent::cancelRecord):
1880         * inspector/InspectorTimelineAgent.h:
1881         (InspectorTimelineAgent):
1882         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
1883         (TimelineRecordEntry):
1884         * testing/Internals.cpp:
1885         (WebCore::Internals::emitInspectorDidBeginFrame):
1886         (WebCore):
1887         (WebCore::Internals::emitInspectorDidCancelFrame):
1888         * testing/Internals.h:
1889         (Internals):
1890         * testing/Internals.idl:
1891
1892 2012-03-14  Dana Jansens  <danakj@chromium.org>
1893
1894         Region can acquire an empty span by subtracting an empty Region
1895         https://bugs.webkit.org/show_bug.cgi?id=81074
1896
1897         Reviewed by Anders Carlsson.
1898
1899         Subtracting an empty Region B from a Region A can cause A to end
1900         up with an empty span. This violates the rule that two Regions
1901         that cover the exact same area should have equal spans and segments.
1902
1903         Unit test: RegionTest.emptySpan
1904
1905         * platform/graphics/Region.cpp:
1906         (WebCore::Region::subtract):
1907
1908 2012-03-14  Simon Hausmann  <simon.hausmann@nokia.com>
1909
1910         [Textmap] Disable driver based BGRA swizzling for OpenGL/ES
1911
1912         Reviewed by Noam Rosenthal.
1913
1914         The current way of detecting swizzling support (check for GL_EXT_texture_format_BGRA8888)
1915         is unfortunately not reliable. We need a better way of detection that (filed bug 81103).
1916         In the meantime this patch reverts back to doing the swizzling in the texture mapper to
1917         get pixels back onto the screen.
1918
1919         * platform/graphics/texmap/TextureMapperGL.cpp:
1920         (WebCore::driverSupportsBGRASwizzling):
1921         (WebCore::BitmapTextureGL::updateContents):
1922
1923 2012-03-14  Leo Yang  <leo.yang@torchmobile.com.cn>
1924
1925         [BlackBerry] Upstream the BlackBerry change to platform/Cursor.h
1926         https://bugs.webkit.org/show_bug.cgi?id=81086
1927
1928         Reviewed by Rob Buis.
1929
1930         * platform/Cursor.h:
1931         (WebCore):
1932         (WebCore::Cursor::Cursor):
1933         Add the BlackBerry specific PlatformCursor.
1934         * platform/blackberry/PageClientBlackBerry.h:
1935         There was an alias named PlatformCursorHandle for PlatformCursor
1936         in the internal version of Cursor.h. But it's not necessary so it's
1937         not included in the upstreaming version of Cursor.h. As a result,
1938         use PlatformCursor directly in this file.
1939         (PageClientBlackBerry):
1940
1941 2012-03-14  Simon Hausmann  <simon.hausmann@nokia.com>
1942
1943         [Qt] RunLoopQt is missing reentrancy guards
1944         https://bugs.webkit.org/show_bug.cgi?id=80982
1945
1946         Reviewed by Tor Arne Vestbø.
1947
1948         Avoid recursive calls to RunLoop::performWork() with a simple
1949         counting mechanism, to avoid out-of-order message dispatching.
1950
1951         * platform/qt/RunLoopQt.cpp:
1952         (WebCore::RunLoop::TimerObject::TimerObject):
1953         (WebCore::RunLoop::TimerObject::performWork):
1954         (RunLoop::TimerObject):
1955
1956 2012-03-14  Ilya Tikhonovsky  <loislo@chromium.org>
1957
1958         Web Inspector: small improvement for HeapSnapshot performance ~12%.
1959         https://bugs.webkit.org/show_bug.cgi?id=81033
1960
1961         Reviewed by Yury Semikhatsky.
1962
1963         * inspector/front-end/HeapSnapshot.js:
1964         (WebInspector.HeapSnapshot.prototype.get nodeCount):
1965         (WebInspector.HeapSnapshot.prototype.get maxNodeId):
1966         (WebInspector.HeapSnapshot.prototype._buildReverseIndex):
1967         (WebInspector.HeapSnapshot.prototype.get nodeIndexes):
1968         (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
1969
1970 2012-03-14  Kentaro Hara  <haraken@chromium.org>
1971
1972         Return null when shouldAllowAccessToNode() fails
1973         https://bugs.webkit.org/show_bug.cgi?id=80205
1974
1975         Reviewed by Adam Barth.
1976
1977         shouldAllowAccessToNode() is used for window.frameElement, HTMLFrameElement.contentDocument,
1978         and getSVGDocument(). The spec of window.frameElement and HTMLFrameElement.contentDocument
1979         requires that they should return null when the security check fails.
1980         Thus this patch changes the return value from undefined to null.
1981
1982         http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#navigating-nested-browsing-contexts-in-the-dom
1983         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#dom-iframe-contentdocument
1984
1985         Tests: http/tests/security/local-iFrame-from-remote.html
1986                http/tests/security/cross-frame-access-frameelement.html
1987                http/tests/security/cross-frame-access-put.html
1988
1989         * bindings/scripts/CodeGeneratorJS.pm:
1990         (GenerateImplementation):
1991         * bindings/scripts/CodeGeneratorV8.pm:
1992         (GenerateNormalAttrGetter):
1993         (GenerateFunctionCallback):
1994
1995         * bindings/scripts/test/JS/JSTestObj.cpp: Updated run-bindings-tests results.
1996         (WebCore::jsTestObjContentDocument):
1997         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
1998         * bindings/scripts/test/V8/V8TestObj.cpp:
1999         (WebCore::TestObjInternal::contentDocumentAttrGetter):
2000         (WebCore::TestObjInternal::getSVGDocumentCallback):
2001
2002 2012-03-14  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
2003
2004         Build error: DNSSoup.cpp:30: fatal error: CString.h: No such file or
2005         directory
2006         https://bugs.webkit.org/show_bug.cgi?id=81093
2007
2008         Reviewed by Philippe Normand.
2009
2010         Fix build error introduced by r110669.
2011
2012         * platform/network/soup/DNSSoup.cpp:
2013
2014 2012-03-14  Marja Hölttä  <marja@google.com>
2015
2016         WebHTTPBody: Keep track of whether the data includes passwords.
2017         https://bugs.webkit.org/show_bug.cgi?id=81003
2018
2019         Reviewed by Darin Fisher.
2020
2021         This change enables Chrome to save HTTP bodies selectively, only
2022         if they don't contain passwords.
2023
2024         * loader/FormSubmission.cpp:
2025         (WebCore::FormSubmission::create): Check if the data contains passwords.
2026         * platform/network/FormData.cpp:
2027         (WebCore::FormData::FormData): Added containsPasswordData, setContainsPasswordData.
2028         * platform/network/FormData.h:
2029         (WebCore::FormData::containsPasswordData): Added.
2030         (WebCore::FormData::setHasPasswordData): Added.
2031         (FormData):
2032
2033 2012-03-14  Vsevolod Vlasov  <vsevik@chromium.org>
2034
2035         Web Inspector: Add snippets tab to scripts navigator.
2036         https://bugs.webkit.org/show_bug.cgi?id=81018
2037
2038         Reviewed by Pavel Feldman.
2039
2040         * English.lproj/localizedStrings.js:
2041         * inspector/front-end/ScriptsNavigator.js:
2042         (WebInspector.ScriptsNavigator):
2043         (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement):
2044         (WebInspector.ScriptsNavigator.prototype.focus):
2045         (WebInspector.ScriptsNavigator.prototype._showScriptFoldersSettingChanged):
2046         (WebInspector.ScriptsNavigator.prototype.reset):
2047         (WebInspector.ScriptsNavigator.prototype._getOrCreateFolderTreeElement):
2048         (WebInspector.ScriptsNavigator.prototype._createFolderTreeElement):
2049         (WebInspector.ScriptsNavigator.prototype._getOrCreateSnippetEvaluationsFolderTreeElement):
2050         (WebInspector.ScriptsNavigator.prototype._scriptFolderIdentifier):
2051         (WebInspector.NavigatorTreeOutline):
2052         * inspector/front-end/ScriptsPanel.js:
2053         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
2054         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
2055         * inspector/front-end/SnippetsModel.js:
2056
2057 2012-03-14  Pavel Feldman  <pfeldman@chromium.org>
2058
2059         Web Inspector: Copy on the Console gives a mangled result.
2060         https://bugs.webkit.org/show_bug.cgi?id=81091
2061
2062         Reviewed by Vsevolod Vlasov.
2063
2064         * inspector/front-end/ConsoleMessage.js:
2065         (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
2066         (WebInspector.ConsoleMessageImpl.prototype._populateStackTraceTreeElement):
2067
2068 2012-03-14  Nikolas Zimmermann  <nzimmermann@rim.com>
2069
2070         External <use> xlink:href references do not work
2071         https://bugs.webkit.org/show_bug.cgi?id=12499
2072
2073         Reviewed by Zoltan Herczeg.
2074
2075         Follow-up fix after r110676.
2076         Assertions are firing due last minute changes in isExternalURIReference.
2077
2078         Fix detecting local resources properly, when the given iri contains a /complex/path.
2079         Use document->completeURL() instead, and compare with the document->url() to decide
2080         if its a local reference or not.
2081
2082         If an external document load fails with an error (eg. file missing) don't assert
2083         in debug builds, instead handle it gracefully.
2084
2085         I decided to clean the code up as well, to make it more safe & obvious.
2086
2087         Test: svg/custom/use-external-crash.svg
2088
2089         * svg/SVGURIReference.cpp:
2090         (WebCore::SVGURIReference::targetElementFromIRIString):
2091         * svg/SVGURIReference.h:
2092         (WebCore::SVGURIReference::isExternalURIReference):
2093         * svg/SVGUseElement.cpp:
2094         (WebCore::SVGUseElement::externalDocument):
2095         (WebCore::SVGUseElement::buildPendingResource):
2096
2097 2012-03-14  Lars Knudsen  <lars.knudsen@nokia.com>
2098
2099         3D transformed surfaces with z>0 gets cropped
2100         https://bugs.webkit.org/show_bug.cgi?id=81009
2101
2102         Reviewed by Noam Rosenthal.
2103
2104         The scissor clipping in TextureMapperGL didn't take 3D transforms 
2105         into account when calculating the clipping region.
2106         Now, it will bail out early if the transform is not affine.
2107
2108         No new tests. Tested by current compositing layout tests.
2109
2110         * platform/graphics/texmap/TextureMapperGL.cpp:
2111         (WebCore::TextureMapperGL::beginScissorClip):
2112
2113 2012-03-14  Hajime Morrita  <morrita@chromium.org>
2114
2115         Unreviewed build fix.
2116
2117         * html/track/TextTrackList.cpp:
2118         (TextTrackList::append):
2119         (TextTrackList::remove):
2120         (TextTrackList::owner): Changed return type from HTMLMediaElement* to Node* and uninlined.
2121         * html/track/TextTrackList.h:
2122         (TextTrackList):
2123
2124 2012-03-13  Vsevolod Vlasov  <vsevik@chromium.org>
2125
2126         Web Inspector: [InspectorIndexedDB] Remote object should be released when data view is removed/updated.
2127         https://bugs.webkit.org/show_bug.cgi?id=81022
2128
2129         Reviewed by Pavel Feldman.
2130
2131         * inspector/front-end/IndexedDBViews.js:
2132         (WebInspector.IDBDataView):
2133         (WebInspector.IDBDataView.prototype._updateData.callback):
2134         (WebInspector.IDBDataView.prototype._updateData):
2135         (WebInspector.IDBDataView.prototype.get statusBarItems):
2136         (WebInspector.IDBDataView.prototype.clear):
2137         * inspector/front-end/ResourcesPanel.js:
2138         (WebInspector.IndexedDBTreeElement.prototype._indexedDBRemoved):
2139         (WebInspector.IDBDatabaseTreeElement.prototype.update):
2140         (WebInspector.IDBDatabaseTreeElement.prototype.onselect):
2141         (WebInspector.IDBDatabaseTreeElement.prototype._objectStoreRemoved):
2142         (WebInspector.IDBDatabaseTreeElement.prototype.clear):
2143         (WebInspector.IDBObjectStoreTreeElement.prototype.update):
2144         (WebInspector.IDBObjectStoreTreeElement.prototype.onselect):
2145         (WebInspector.IDBObjectStoreTreeElement.prototype._indexRemoved):
2146         (WebInspector.IDBObjectStoreTreeElement.prototype.clear):
2147         (WebInspector.IDBIndexTreeElement.prototype.onselect):
2148         (WebInspector.IDBIndexTreeElement.prototype.clear):
2149
2150 2012-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
2151
2152         Web Inspector: Introduce SnippetsScriptMapping.
2153         https://bugs.webkit.org/show_bug.cgi?id=80890
2154
2155         Reviewed by Pavel Feldman.
2156
2157         * inspector/front-end/ScriptMapping.js:
2158         (WebInspector.MainScriptMapping):
2159         (WebInspector.MainScriptMapping.prototype.addScript):
2160         (WebInspector.MainScriptMapping.prototype._mappingForScript):
2161         * inspector/front-end/SnippetsModel.js:
2162         (WebInspector.SnippetsModel.prototype.snippetForId):
2163         (WebInspector.SnippetsModel.prototype.snippetForSourceURL):
2164         (WebInspector.SnippetsScriptMapping):
2165         (WebInspector.SnippetsScriptMapping.prototype.uiSourceCodeList):
2166         (WebInspector.SnippetsScriptMapping.prototype.addScript):
2167         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
2168         (WebInspector.SnippetsScriptMapping.prototype._releaseSnippetScript.get if):
2169         (WebInspector.SnippetsScriptMapping.prototype._releaseSnippetScript):
2170         (WebInspector.SnippetsScriptMapping.prototype._snippetDeleted.get this):
2171         (WebInspector.SnippetsScriptMapping.prototype._snippetDeleted):
2172         (WebInspector.SnippetsScriptMapping.prototype.reset):
2173         (WebInspector.SnippetContentProvider):
2174
2175 2012-03-14  Sheriff Bot  <webkit.review.bot@gmail.com>
2176
2177         Unreviewed, rolling out r110673.
2178         http://trac.webkit.org/changeset/110673
2179         https://bugs.webkit.org/show_bug.cgi?id=81090
2180
2181         "Qt minimal build broken" (Requested by yurys on #webkit).
2182
2183         * inspector/CodeGeneratorInspector.py:
2184         (CommandReturnPassModel.ByPointer.get_set_return_condition):
2185         (TypeModel.Enum.get_optional.EnumOptional.get_command_return_pass_model):
2186         (TypeModel.ValueType.ValueOptional.get_command_return_pass_model):
2187         (Generator.process_event):
2188         (Generator.process_command):
2189         * inspector/ContentSearchUtils.cpp:
2190         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
2191         (WebCore::ContentSearchUtils::searchInTextByLines):
2192         * inspector/ContentSearchUtils.h:
2193         (ContentSearchUtils):
2194         * inspector/InjectedScript.cpp:
2195         (WebCore::InjectedScript::evaluate):
2196         (WebCore::InjectedScript::callFunctionOn):
2197         (WebCore::InjectedScript::evaluateOnCallFrame):
2198         (WebCore::InjectedScript::makeEvalCall):
2199         * inspector/InjectedScript.h:
2200         (InjectedScript):
2201         * inspector/InspectorDOMDebuggerAgent.cpp:
2202         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
2203         (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
2204         (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
2205         (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
2206         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
2207         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
2208         * inspector/InspectorDebuggerAgent.cpp:
2209         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2210         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2211         (WebCore::InspectorDebuggerAgent::searchInContent):
2212         (WebCore::InspectorDebuggerAgent::setScriptSource):
2213         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
2214         (WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement):
2215         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
2216         (WebCore::InspectorDebuggerAgent::didPause):
2217         (WebCore::InspectorDebuggerAgent::breakProgram):
2218         (WebCore::InspectorDebuggerAgent::clearBreakDetails):
2219         * inspector/InspectorDebuggerAgent.h:
2220         (InspectorDebuggerAgent):
2221         * inspector/InspectorPageAgent.cpp:
2222         (WebCore::buildObjectForCookie):
2223         (WebCore::buildArrayForCookies):
2224         (WebCore::InspectorPageAgent::getCookies):
2225         (WebCore::InspectorPageAgent::getResourceTree):
2226         (WebCore::InspectorPageAgent::searchInResource):
2227         (WebCore::InspectorPageAgent::searchInResources):
2228         (WebCore::InspectorPageAgent::buildObjectForFrame):
2229         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2230         * inspector/InspectorPageAgent.h:
2231         * inspector/InspectorRuntimeAgent.cpp:
2232         (WebCore::InspectorRuntimeAgent::evaluate):
2233         (WebCore::InspectorRuntimeAgent::callFunctionOn):
2234
2235 2012-03-14  Renata Hodovan  <reni@webkit.org>
2236
2237         External <use> xlink:href references do not work
2238         https://bugs.webkit.org/show_bug.cgi?id=12499
2239
2240         Reviewed by Nikolas Zimmermann.
2241
2242         This is a follow-up patch after r108785.
2243         In this patch we bind the previously introduced CachedSVGDocument class
2244         into the caching mechanism of SVGUseElement. The mode how external resources
2245         are handled is similar to the processing of internal ones. We build the instance
2246         and shadow tree the same way but we have to keep in mind that the requested resources
2247         maybe not loaded yet. We can check it with cachedDocumentIsStillLoading() function.
2248
2249         SVGURIReference::targetElementFromIRIString() also need to be extended. The baseURI
2250         computation needs to take the referenced documents URL into account, instead of the current documents.
2251
2252         The patch affects a lot of tests which have external resources especially in svg/batik. Because
2253         of the size of that test refactor they will be commited in a follow-up patch.
2254
2255         Tests: svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t.svg
2256                svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t.svg
2257                svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t.svg
2258                svg/custom/use-extern-href.svg
2259                svg/custom/use-referencing-an-image-expected.svg
2260                svg/custom/use-referencing-an-image.svg
2261                svg/custom/use-referencing-indirectly-itself-expected.svg
2262                svg/custom/use-referencing-indirectly-itself.svg
2263                svg/custom/use-referencing-itself-expected.svg
2264                svg/custom/use-referencing-itself.svg
2265                svg/dynamic-updates/SVGUseElement-dom-href1-attr.html
2266                svg/dynamic-updates/SVGUseElement-dom-href2-attr.html
2267                svg/dynamic-updates/SVGUseElement-svgdom-href1-prop.html
2268                svg/dynamic-updates/SVGUseElement-svgdom-href2-prop.html
2269
2270         * loader/cache/CachedResourceLoader.cpp:
2271         (WebCore):
2272         (WebCore::CachedResourceLoader::requestSVGDocument):
2273         * loader/cache/CachedResourceLoader.h:
2274         (WebCore):
2275         (CachedResourceLoader):
2276         * page/ContentSecurityPolicy.h:
2277         * platform/KURL.cpp:
2278         (WebCore::equalIgnoringFragmentIdentifier):
2279         * platform/network/chromium/ResourceRequest.h:
2280         * svg/SVGURIReference.cpp:
2281         (WebCore::urlFromIRIStringWithFragmentIdentifier):
2282         (WebCore):
2283         (WebCore::SVGURIReference::targetElementFromIRIString):
2284         * svg/SVGURIReference.h:
2285         (SVGURIReference):
2286         (WebCore::SVGURIReference::isExternalURIReference):
2287         * svg/SVGUseElement.cpp:
2288         (WebCore::SVGUseElement::SVGUseElement):
2289         (WebCore::SVGUseElement::~SVGUseElement):
2290         (WebCore):
2291         (WebCore::SVGUseElement::referencedDocument):
2292         (WebCore::SVGUseElement::externalDocument):
2293         (WebCore::SVGUseElement::svgAttributeChanged):
2294         (WebCore::dumpInstanceTree):
2295         (WebCore::SVGUseElement::buildPendingResource):
2296         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
2297         (WebCore::SVGUseElement::hasCycleUseReferencing):
2298         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
2299         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
2300         (WebCore::SVGUseElement::notifyFinished):
2301         (WebCore::SVGUseElement::cachedDocumentIsStillLoading):
2302         (WebCore::SVGUseElement::instanceTreeIsLoading):
2303         * svg/SVGUseElement.h:
2304         (WebCore):
2305         (SVGUseElement):
2306
2307 2012-03-14  Peter Rybin  <peter.rybin@gmail.com>
2308
2309         Web Inspector: TypeBuilder: Introduce OptOutput class for optional output parameters
2310         https://bugs.webkit.org/show_bug.cgi?id=80789
2311
2312         Reviewed by Yury Semikhatsky.
2313
2314         OptOutput class is added for optional return parameters.
2315
2316         Strict mode added to Generator that makes all parameter types strict
2317         and drop pre-set default values for return parameters.
2318
2319         Debugger and Page domain is switched to strict mode.
2320
2321
2322         * inspector/CodeGeneratorInspector.py:
2323         (CommandReturnPassModel.ByPointer):
2324         (CommandReturnPassModel):
2325         (CommandReturnPassModel.OptOutput):
2326         (CommandReturnPassModel.OptOutput.__init__):
2327         (CommandReturnPassModel.OptOutput.get_return_var_type):
2328         (CommandReturnPassModel.OptOutput.get_output_argument_prefix):
2329         (CommandReturnPassModel.OptOutput.get_output_to_raw_expression):
2330         (CommandReturnPassModel.OptOutput.get_output_parameter_type):
2331         (CommandReturnPassModel.OptOutput.get_set_return_condition):
2332         (TypeModel.Enum.get_optional.EnumOptional.get_command_return_pass_model):
2333         (TypeModel.ValueType.ValueOptional.get_command_return_pass_model):
2334         (OptOutput):
2335         (Generator.process_event):
2336         (Generator.process_command):
2337         * inspector/ContentSearchUtils.cpp:
2338         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
2339         (WebCore::ContentSearchUtils::searchInTextByLines):
2340         * inspector/ContentSearchUtils.h:
2341         (ContentSearchUtils):
2342         * inspector/InjectedScript.cpp:
2343         (WebCore::InjectedScript::evaluate):
2344         (WebCore::InjectedScript::callFunctionOn):
2345         (WebCore::InjectedScript::evaluateOnCallFrame):
2346         (WebCore::InjectedScript::makeEvalCall):
2347         * inspector/InjectedScript.h:
2348         (InjectedScript):
2349         * inspector/InspectorDOMDebuggerAgent.cpp:
2350         (WebCore):
2351         * inspector/InspectorDebuggerAgent.cpp:
2352         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2353         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2354         (WebCore::InspectorDebuggerAgent::searchInContent):
2355         (WebCore::InspectorDebuggerAgent::setScriptSource):
2356         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
2357         (WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement):
2358         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
2359         (WebCore::InspectorDebuggerAgent::didPause):
2360         (WebCore::InspectorDebuggerAgent::breakProgram):
2361         (WebCore::InspectorDebuggerAgent::clearBreakDetails):
2362         * inspector/InspectorDebuggerAgent.h:
2363         (InspectorDebuggerAgent):
2364         * inspector/InspectorPageAgent.cpp:
2365         (WebCore::buildObjectForCookie):
2366         (WebCore::buildArrayForCookies):
2367         (WebCore::InspectorPageAgent::getCookies):
2368         (WebCore::InspectorPageAgent::getResourceTree):
2369         (WebCore::InspectorPageAgent::searchInResource):
2370         (WebCore::InspectorPageAgent::searchInResources):
2371         (WebCore::InspectorPageAgent::buildObjectForFrame):
2372         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
2373         * inspector/InspectorPageAgent.h:
2374         * inspector/InspectorRuntimeAgent.cpp:
2375         (WebCore::InspectorRuntimeAgent::evaluate):
2376         (WebCore::InspectorRuntimeAgent::callFunctionOn):
2377
2378 2012-03-14  Sergio Villar Senin  <svillar@igalia.com>
2379
2380         Unreviewed. Build fix for EFL after r110669.
2381
2382         * PlatformEfl.cmake: added DNSSoup.cpp
2383
2384 2012-03-13  Sergio Villar Senin  <svillar@igalia.com>
2385
2386         [GTK] Use the same DNS prefetching path than the other ports.
2387         https://bugs.webkit.org/show_bug.cgi?id=80997
2388
2389         Reviewed by Martin Robinson.
2390
2391         This patch basically reverts r56128. There is no need to add an
2392         special code path for GTK+ DNS pre-fetching because the main
2393         reason to do that (some potential changes in libsoup) is not
2394         going to happen. It also reduces the amount of DNS queries by
2395         adding a NULL hostname check.
2396
2397         No need for new tests as this just moves code around.
2398
2399         * GNUmakefile.list.am:
2400         * html/HTMLAnchorElement.cpp:
2401         (WebCore::HTMLAnchorElement::parseAttribute):
2402         * html/HTMLLinkElement.cpp:
2403         * loader/LinkLoader.cpp:
2404         (WebCore::LinkLoader::loadLink):
2405         * page/Chrome.cpp:
2406         (WebCore::Chrome::mouseDidMoveOverElement):
2407         * platform/network/DNS.h:
2408         (WebCore):
2409         * platform/network/ResourceHandle.cpp:
2410         * platform/network/ResourceHandle.h:
2411         (ResourceHandle):
2412         * platform/network/chromium/DNSChromium.cpp:
2413         * platform/network/soup/DNSSoup.cpp: restored.
2414         (WebCore):
2415         (WebCore::prefetchDNS):
2416         * platform/network/soup/ResourceHandleSoup.cpp:
2417
2418 2012-03-14  Kentaro Hara  <haraken@chromium.org>
2419
2420         Return null when shouldAllowAccessToNode() fails
2421         https://bugs.webkit.org/show_bug.cgi?id=80205
2422
2423         Reviewed by Adam Barth.
2424
2425         shouldAllowAccessToNode() is used for window.frameElement, HTMLFrameElement.contentDocument,
2426         and getSVGDocument(). The spec of window.frameElement and HTMLFrameElement.contentDocument
2427         requires that they should return null when the security check fails.
2428         Thus this patch changes the return value from undefined to null.
2429
2430         http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#navigating-nested-browsing-contexts-in-the-dom
2431         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#dom-iframe-contentdocument
2432
2433         Tests: http/tests/security/local-iFrame-from-remote.html
2434                http/tests/security/cross-frame-access-frameelement.html
2435                http/tests/security/cross-frame-access-put.html
2436
2437         * bindings/scripts/CodeGeneratorJS.pm:
2438         (GenerateImplementation):
2439         * bindings/scripts/CodeGeneratorV8.pm:
2440         (GenerateNormalAttrGetter):
2441         (GenerateFunctionCallback):
2442
2443         * bindings/scripts/test/JS/JSTestObj.cpp: Updated run-bindings-tests results.
2444         (WebCore::jsTestObjContentDocument):
2445         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
2446         * bindings/scripts/test/V8/V8TestObj.cpp:
2447         (WebCore::TestObjInternal::contentDocumentAttrGetter):
2448         (WebCore::TestObjInternal::getSVGDocumentCallback):
2449
2450 2012-03-13  Yosifumi Inoue  <yosin@chromium.org>
2451
2452         [Forms] Hidden input element should not have labels. 
2453         https://bugs.webkit.org/show_bug.cgi?id=80403
2454
2455         Reviewed by Kent Tamura.
2456
2457         This patch changes "labels" attribute behavior for hidden input type.
2458         It returns null instead of NodeList of labels or empty node list.
2459
2460         Note: The HTML5 specification isn't clear for non-labelable element's "labels"
2461         attribute return value. Firefox and Opera return empty node list. IE returns null.
2462
2463         No new tests. Existing tests are updated.
2464
2465         * html/HTMLInputElement.cpp:
2466         (WebCore::HTMLInputElement::isLabelable): Added. Dispatch to InputType.
2467         * html/HiddenInputType.h:  Added isLabelable returning false.
2468         * html/InputType.cpp:
2469         (WebCore::InputType::isLabelable): Added. Returning true for all input types except for "hidden" type.
2470         (WebCore):
2471         * html/InputType.h:
2472         (InputType): Added isLabelable declaration.
2473
2474 2012-03-13  Yosifumi Inoue  <yosin@chromium.org>
2475
2476         [Forms] The "output" element should have labels.
2477         https://bugs.webkit.org/show_bug.cgi?id=80466
2478
2479         Reviewed by Kent Tamura.
2480
2481         This patch enables functionality of "labels" attribute for
2482         HTMLOutputElement implemented in LabelableElement which use
2483         isLabelable predicate whether an element can have label or not.
2484
2485         Update existing tests in fast/forms/label/ directory to cover
2486         the "output" element with the "labels" attribute.
2487
2488         * html/HTMLOutputElement.h: Implement virtual method isLabelable.
2489
2490 2012-03-13  Luke Macpherson   <macpherson@chromium.org>
2491
2492         Move opacity clamping into RenderStyle setter.
2493         https://bugs.webkit.org/show_bug.cgi?id=76966
2494
2495         Reviewed by Eric Seidel.
2496
2497         Covered by existing tests.
2498
2499         * css/CSSStyleSelector.cpp:
2500         (WebCore::CSSStyleSelector::applyProperty):
2501         * rendering/style/RenderStyle.h:
2502         (WebCore::RenderStyleBitfields::setOpacity):
2503
2504 2012-03-12  Igor Oliveira  <igor.o@sisa.samsung.com>
2505
2506         Split the extra logic out of RenderObjectChildList::updateBeforeAfterContent
2507         https://bugs.webkit.org/show_bug.cgi?id=80856
2508
2509         Extra part of the generated content handling logic out of RenderObjectChildList::updateBeforeAfterContent
2510
2511         Reviewed by Julien Chaffraix.
2512
2513         No change in behavior expected.
2514
2515         * rendering/RenderObjectChildList.cpp:
2516         (WebCore::RenderObjectChildList::updateBeforeAfterStyle):
2517         (WebCore::createRenderForBeforeAfterContent):
2518         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
2519         * rendering/RenderObjectChildList.h:
2520         (WebCore):
2521         (RenderObjectChildList):
2522
2523 2012-03-13  Simon Fraser  <simon.fraser@apple.com>
2524
2525         Fix potential crash when loading test results
2526         https://bugs.webkit.org/show_bug.cgi?id=81062
2527         <rdar://problem/11041732>
2528         
2529         Reviewed by Dean Jackson.
2530
2531         If RenderLayerBacking::isSimpleContainerCompositingLayer() is called early,
2532         before the document has a documentElement(), then it crashes. Fix with
2533         a null check on documentElement().
2534         
2535         No test because it's timing dependent.
2536
2537         * rendering/RenderLayerBacking.cpp:
2538         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2539
2540 2012-03-13  Dan Bernstein  <mitz@apple.com>
2541
2542         <rdar://problem/11025225> Assertion failure in RenderView::computeRectForRepaint() (!repaintContainer || repaintContainer == this) at store.apple.com
2543         https://bugs.webkit.org/show_bug.cgi?id=81051
2544
2545         Reviewed by Simon Fraser.
2546
2547         Test: ManualTests/inline-repaint-container.html.
2548
2549         * rendering/RenderInline.cpp:
2550         (WebCore::RenderInline::clippedOverflowRectForRepaint): This function was not handling the
2551         case of the repaint container being a descendant of the containing block correctly, leading
2552         to the assertion failure, but also to a correctness bug seen in the new test. If the repaint
2553         container is a descendant of the containing block, just return the rect in the repaint
2554         container coordinates.
2555
2556 2012-03-13  Dan Bernstein  <mitz@apple.com>
2557
2558         <rdar://problem/11025217> [Mac] Assertion failure in collectComplexTextRunsForCharactersCoreText
2559         https://bugs.webkit.org/show_bug.cgi?id=77044
2560
2561         Reviewed by Sam Weinig.
2562
2563         Test: platform/mac/fast/text/core-text-fallback-to-unknown-font.html
2564
2565         Handle the case of Core Text choosing a fallback font that NSFontManager cannot find by name.
2566
2567         * platform/graphics/FontCache.h:
2568         (FontCache): Made ComplexTextController a friend class.
2569         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2570         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Removed the
2571         failing assertion, which was not true, and added code to handle the case where a font
2572         cannot be found by name by using the font as returned from Core Text.
2573
2574 2012-03-13  Erik Arvidsson  <arv@chromium.org>
2575
2576         [V8] Use v8::V8::AddImplicitReferences instead of SetHiddenValue
2577         https://bugs.webkit.org/show_bug.cgi?id=80880
2578
2579         Reviewed by Adam Barth.
2580
2581         We used to add a hidden property in the getter to the returned wrapper.
2582         With this patch we instead handle the liveness of the wrapper in the GC phase by
2583         calling v8::V8::AddHiddenReference.
2584
2585         To reduce the amount of custom code we need, the V8 code generator now supports
2586         GenerateIsReachable (as well as CustomIsReachable) which, even though different
2587         from the JSC attribute, is used in the same cases and takes the same values (even though
2588         at the moment not all JSC values are supported by V8). Interfaces that have *IsReachable
2589         also have a dependent life time (just like if V8DependentLifetime was present).
2590
2591         Second try. This time with an added include in TextTrackList.cpp.
2592
2593         No new tests. Covered by existing tests.
2594
2595         * Target.pri:
2596         * UseV8.cmake:
2597         * WebCore.gypi:
2598         * bindings/scripts/CodeGeneratorJS.pm:
2599         (GetGenerateIsReachable):
2600         (GetCustomIsReachable):
2601         (GenerateHeader):
2602         (GenerateImplementation):
2603         * bindings/scripts/CodeGeneratorV8.pm:
2604         (NeedsToVisitDOMWrapper):
2605         (GetGenerateIsReachable):
2606         (GetCustomIsReachable):
2607         (GenerateVisitDOMWrapper):
2608         (GenerateHeader):
2609         (GenerateNamedConstructorCallback):
2610         (GenerateImplementation):
2611         * bindings/scripts/IDLAttributes.txt:
2612         * bindings/scripts/test/V8/V8Float64Array.cpp:
2613         (WebCore):
2614         * bindings/scripts/test/V8/V8Float64Array.h:
2615         (V8Float64Array):
2616         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2617         (WebCore):
2618         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2619         (V8TestActiveDOMObject):
2620         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2621         (WebCore):
2622         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2623         (V8TestCustomNamedGetter):
2624         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2625         (WebCore):
2626         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2627         (V8TestEventConstructor):
2628         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2629         (WebCore):
2630         * bindings/scripts/test/V8/V8TestEventTarget.h:
2631         (V8TestEventTarget):
2632         * bindings/scripts/test/V8/V8TestInterface.cpp:
2633         (WebCore):
2634         * bindings/scripts/test/V8/V8TestInterface.h:
2635         (V8TestInterface):
2636         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2637         (WebCore):
2638         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2639         (V8TestMediaQueryListListener):
2640         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2641         (WebCore):
2642         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2643         (V8TestNamedConstructor):
2644         * bindings/scripts/test/V8/V8TestObj.cpp:
2645         (WebCore):
2646         * bindings/scripts/test/V8/V8TestObj.h:
2647         (V8TestObj):
2648         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2649         (WebCore):
2650         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2651         (V8TestSerializedScriptValueInterface):
2652         * bindings/v8/NPV8Object.cpp:
2653         (WebCore::npObjectTypeInfo):
2654         * bindings/v8/V8GCController.cpp:
2655         (WebCore::GrouperVisitor::visitDOMWrapper):
2656         * bindings/v8/WrapperTypeInfo.h:
2657         (WebCore):
2658         (WrapperTypeInfo):
2659         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Removed.
2660         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
2661         * bindings/v8/custom/V8DOMTokenListCustom.cpp: Removed.
2662         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2663         (WebCore):
2664         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
2665         * bindings/v8/custom/V8StyleSheetCustom.cpp:
2666         (WebCore::toV8):
2667         * css/CSSStyleSheet.idl:
2668         * css/StyleSheet.idl:
2669         * dom/DOMStringMap.idl:
2670         * dom/NamedNodeMap.idl:
2671         * html/DOMTokenList.idl:
2672         * html/track/TextTrackList.cpp:
2673         * html/track/TextTrackList.idl:
2674
2675 2012-03-13  Jacky Jiang  <zhajiang@rim.com>
2676
2677         MathML crash in WebCore::Node::previousSibling()
2678         https://bugs.webkit.org/show_bug.cgi?id=80773
2679
2680         Reviewed by Julien Chaffraix.
2681
2682         When adding child for msub render, if the child is mtr or mtd render,
2683         we will creat an anonymous render as the container. As the anonymous
2684         render's node is 0, accessing it directly can cause crash.
2685         We should do a valid check of the node before using. In addition to
2686         that, for msub, attach the anonymous render and it's children to render
2687         tree. For msubsup, such kind of situation should never happen based on
2688         the current codebase.
2689
2690         Test: mathml/msub-anonymous-child-render-crash.html
2691
2692         * rendering/mathml/RenderMathMLSubSup.cpp:
2693         (WebCore::RenderMathMLSubSup::addChild):
2694
2695 2012-03-13  Mihnea Ovidenie  <mihnea@adobe.com>
2696
2697         [CSSRegions]NamedFlow::getRegionsByContentNode should not return a live NodeList
2698         https://bugs.webkit.org/show_bug.cgi?id=81021
2699
2700         Reviewed by Ryosuke Niwa.
2701
2702         Reverting the original patch as we need a better solution.
2703
2704         * CMakeLists.txt:
2705         * GNUmakefile.list.am:
2706         * Target.pri:
2707         * WebCore.gypi:
2708         * WebCore.vcproj/WebCore.vcproj:
2709         * WebCore.xcodeproj/project.pbxproj:
2710         * dom/Node.cpp:
2711         (WebCore::NodeListsNodeData::invalidateCaches):
2712         (WebCore::NodeListsNodeData::isEmpty):
2713         * dom/Node.h:
2714         (Node):
2715         * dom/NodeRareData.h:
2716         (NodeListsNodeData):
2717         * dom/RegionNodeList.cpp: Removed.
2718         * dom/RegionNodeList.h: Removed.
2719         * dom/WebKitNamedFlow.cpp:
2720         * dom/WebKitNamedFlow.h:
2721         (WebKitNamedFlow):
2722         * dom/WebKitNamedFlow.idl:
2723         * rendering/RenderFlowThread.cpp:
2724         * rendering/RenderFlowThread.h:
2725         * rendering/RenderRegion.h:
2726         (RenderRegion):
2727
2728 2012-03-13  Shawn Singh  <shawnsingh@chromium.org>
2729
2730         [chromium] wrong transform causing incorrect culling
2731         https://bugs.webkit.org/show_bug.cgi?id=80471
2732
2733         Reviewed by James Robinson.
2734
2735         Unit test added to CCRenderSurfaceTest.cpp
2736
2737         In addition to using originTransform() instead of drawTransform(),
2738         this patch shuffles a bit of code so that a unit test can be
2739         easily added.
2740
2741         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2742         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
2743         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2744         (WebCore::CCRenderSurface::createSharedQuadState):
2745         (WebCore):
2746         * platform/graphics/chromium/cc/CCRenderSurface.h:
2747         (CCRenderSurface):
2748
2749 2012-03-13  Dave Tharp  <dtharp@codeaurora.org>
2750
2751         Alternate xml-stylesheets with no title are loaded, in violation of the CSSOM draft
2752         https://bugs.webkit.org/show_bug.cgi?id=77549
2753
2754         Reviewed by David Hyatt.
2755
2756         Amended code to ignore alternate stylesheets that do not have a title attribute.
2757
2758         Test: fast/css/xml-stylesheet-alternate-no-title.xhtml
2759
2760         * dom/ProcessingInstruction.cpp:
2761         (WebCore::ProcessingInstruction::checkStyleSheet):
2762
2763 2012-03-13  Levi Weintraub  <leviw@chromium.org>
2764
2765         Revert RenderLayer::absoluteBoundingBox to an IntRect
2766         https://bugs.webkit.org/show_bug.cgi?id=81017
2767
2768         Reviewed by Eric Seidel.
2769
2770         Reverting RenderLayer::absoluteBoundingBox to an (pixel snapped) IntRect. Whenever
2771         possible, we use integers representing for absolute coordinates. This is especially
2772         relevant for methods, such as this one, that are exported and used in platform code.
2773
2774         No new tests. No change in behavior.
2775
2776         * rendering/RenderLayer.cpp:
2777         (WebCore::RenderLayer::absoluteBoundingBox):
2778         * rendering/RenderLayer.h:
2779         (RenderLayer):
2780         * rendering/RenderLayerCompositor.cpp:
2781         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): This intersects
2782         the absolute bounding box with the FrameView, which uses all integer values. It's
2783         the only use of absoluteBoundingBox in WebCore.
2784
2785 2012-03-13  Nat Duca  <nduca@chromium.org>
2786
2787         [chromium] vsync ticks are needed in invisible tabs when we are still updating resources
2788         https://bugs.webkit.org/show_bug.cgi?id=80910
2789
2790         Reviewed by James Robinson.
2791
2792         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
2793         (WebCore::CCSchedulerStateMachine::vsyncCallbackNeeded):
2794
2795 2012-03-13  Dave Tharp  <dtharp@codeaurora.org>
2796
2797         Alternate stylesheets (without title attribute) are loaded on refresh
2798         https://bugs.webkit.org/show_bug.cgi?id=24354
2799
2800         Reviewed by David Hyatt.
2801
2802         Alternate stylesheets are now ignored in <link> tags if 
2803         they have no title attribute (per spec).
2804
2805         Tests: fast/css/link-alternate-stylesheet-1.html
2806                fast/css/link-alternate-stylesheet-2.html
2807                fast/css/link-alternate-stylesheet-3.html
2808                fast/css/link-alternate-stylesheet-4.html
2809                fast/css/link-alternate-stylesheet-5.html
2810
2811         * dom/Document.cpp:
2812         (WebCore::Document::collectActiveStylesheets):
2813
2814 2012-03-13  Dana Jansens  <danakj@chromium.org>
2815
2816         Region::contains(IntPoint) is slow
2817         https://bugs.webkit.org/show_bug.cgi?id=81008
2818
2819         Reviewed by Anders Carlsson.
2820
2821         Speed up Region::contains(IntPoint) by directly testing if the point
2822         is inside the Region's shape, rather than using a temporary 1x1 Region
2823         for the test.
2824
2825         Unit test: RegionTest.containsPoint
2826
2827         * platform/graphics/Region.cpp:
2828         (WebCore::Region::contains):
2829
2830 2012-03-13  Adrienne Walker  <enne@google.com>
2831
2832         [chromium] Mark root layer scrollbars as always opaque to disable blending
2833         https://bugs.webkit.org/show_bug.cgi?id=79951
2834
2835         Reviewed by James Robinson.
2836
2837         Now that scrollbar layers exist, mark non-overlay root scrollbars as
2838         opaque. This disables blending for correctness and performance.
2839
2840         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2841         (WebCore::scrollbarLayerDidChange):
2842         (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
2843         (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
2844         * platform/graphics/chromium/LayerRendererChromium.cpp:
2845         (WebCore::LayerRendererChromium::drawTileQuad):
2846
2847 2012-03-13  Gavin Peters  <gavinp@chromium.org>
2848
2849         Remove vestigal abortEvent from image attribute.
2850         https://bugs.webkit.org/show_bug.cgi?id=80795
2851
2852         Reviewed by Adam Barth.
2853
2854         It seems we installed a listener for the abort event on images,
2855         but never ever raised them.  So this patch removes it.  This could
2856         cause different behaviour if the user sends abort events directly
2857         at an image element, although addEventListener will still work.
2858
2859         * html/HTMLImageElement.cpp:
2860         (WebCore::HTMLImageElement::parseAttribute):
2861
2862 2012-03-13  Nate Chapin  <japhet@chromium.org>
2863
2864         Rework how a CachedRawResource decides if it can be reused
2865         for a given ResourceRequest. Ensure method, body, cookie policy,
2866         and all headers match.
2867         http://bugs.webkit.org/show_bug.cgi?id=79325
2868
2869         Reviewed by Oliver Hunt.
2870
2871         Test: http/tests/cache/xhr-body.html
2872
2873         * loader/cache/CachedRawResource.cpp:
2874         (WebCore::CachedRawResource::canReuse):
2875         * loader/cache/CachedRawResource.h: Take a ResourceRequest in canReuse().
2876         * loader/cache/CachedResourceLoader.cpp:
2877         (WebCore::CachedResourceLoader::determineRevalidationPolicy): Remove Range header
2878             check, since it is now redundant.
2879
2880 2012-03-13  Rob Buis  <rbuis@rim.com>
2881
2882         Fix cast-align GCC warning
2883         https://bugs.webkit.org/show_bug.cgi?id=80790
2884
2885         Reviewed by Dan Bates.
2886
2887         This touches unpackOneRowOfBGRA8ToRGBA8.
2888
2889         * platform/graphics/GraphicsContext3D.cpp:
2890         (WebCore):
2891
2892 2012-03-12  Simon Fraser  <simon.fraser@apple.com>
2893
2894         Refactor some code that is used to check whether a layer needs backing store
2895         https://bugs.webkit.org/show_bug.cgi?id=80917
2896
2897         Reviewed by Dean Jackson.
2898
2899         Move some code out of isSimpleContainerCompositingLayer() in two new
2900         methods to make the code more self-descriptive.
2901         
2902         No behavior change, so no tests.
2903
2904         * rendering/RenderLayerBacking.cpp:
2905         (WebCore::RenderLayerBacking::paintsBoxDecorations):
2906         (WebCore::RenderLayerBacking::paintsChildren):
2907         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2908         * rendering/RenderLayerBacking.h:
2909         (RenderLayerBacking):
2910
2911 2012-03-13  Daniel Bates  <dbates@webkit.org>
2912
2913         REGRESSION(r99369): File input button doesn't highlight when pressed
2914         https://bugs.webkit.org/show_bug.cgi?id=79385
2915
2916         Reviewed by Kent Tamura.
2917
2918         Fixes an issue where the file input button doesn't highlight on mouse press.
2919
2920         Currently we always override the active state of the button with whether
2921         a dragged file is being hovered over the file input control (i.e. can the control
2922         receive a dropped file; HTMLInputElement::canReceiveDroppedFiles()).
2923         Instead, we should only override the active state of the button when the state
2924         changes for whether we can receive dropped files (e.g. during a drag) so that
2925         we honor the active state of the button when it is pressed.
2926
2927         Test: fast/forms/file/file-input-pressed-state.html
2928
2929         * rendering/RenderFileUploadControl.cpp:
2930         (WebCore::RenderFileUploadControl::RenderFileUploadControl):
2931         (WebCore::RenderFileUploadControl::updateFromElement):
2932         * rendering/RenderFileUploadControl.h:
2933         (RenderFileUploadControl):
2934
2935 2012-03-13  Dana Jansens  <danakj@chromium.org>
2936
2937         [chromium] Use CCOcclusionTracker for draw culling
2938         https://bugs.webkit.org/show_bug.cgi?id=80743
2939
2940         Reviewed by Adrienne Walker.
2941
2942         In this CL we enable the use of CCOcclusionTracker for draw-side
2943         culling. This means moving from a per-quad culling model to a
2944         per-layer model.
2945
2946         When calculating RenderPasses, we construct the set of passes,
2947         then iterate over layers in front-to-back order. We make
2948         CCQuadCuller instantiable, and pass it to the layer
2949         appendQuads() methods instead of the bare list, where it can
2950         filter quads before the end up in the list.
2951
2952         Covered by existing tests.
2953
2954         * platform/graphics/chromium/LayerRendererChromium.cpp:
2955         (WebCore::LayerRendererChromium::drawRenderPass):
2956         * platform/graphics/chromium/LayerRendererChromium.h:
2957         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
2958         (WebCore::CCCanvasLayerImpl::appendQuads):
2959         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
2960         (CCCanvasLayerImpl):
2961         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2962         (WebCore::CCLayerImpl::appendQuads):
2963         (WebCore::CCLayerImpl::appendGutterQuads):
2964         (WebCore::CCLayerImpl::appendDebugBorderQuad):
2965         * platform/graphics/chromium/cc/CCLayerImpl.h:
2966         (WebCore):
2967         (CCLayerImpl):
2968         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2969         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
2970         (WebCore::CCLayerTreeHostImpl::drawLayers):
2971         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2972         (CCLayerTreeHostImpl):
2973         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
2974         (WebCore::CCPluginLayerImpl::appendQuads):
2975         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
2976         (CCPluginLayerImpl):
2977         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2978         (WebCore::CCQuadCuller::CCQuadCuller):
2979         (WebCore::CCQuadCuller::append):
2980         * platform/graphics/chromium/cc/CCQuadCuller.h:
2981         (WebCore):
2982         (CCQuadCuller):
2983         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2984         (WebCore::CCRenderPass::appendQuadsForLayer):
2985         * platform/graphics/chromium/cc/CCRenderPass.h:
2986         (WebCore):
2987         (CCQuadList):
2988         (WebCore::CCQuadList::backToFrontBegin):
2989         (WebCore::CCQuadList::backToFrontEnd):
2990         (CCRenderPass):
2991         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
2992         (WebCore::CCScrollbarLayerImpl::appendQuads):
2993         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
2994         (CCScrollbarLayerImpl):
2995         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
2996         (WebCore::CCSolidColorLayerImpl::appendQuads):
2997         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
2998         (CCSolidColorLayerImpl):
2999         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3000         (WebCore::CCTiledLayerImpl::appendQuads):
3001         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3002         (CCTiledLayerImpl):
3003         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3004         (WebCore::CCVideoLayerImpl::appendQuads):
3005         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3006         (CCVideoLayerImpl):
3007
3008 2012-03-13  Adam Barth  <abarth@webkit.org> && Benjamin Poulain  <bpoulain@apple.com>
3009
3010         Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
3011         https://bugs.webkit.org/show_bug.cgi?id=78853
3012
3013         Reviewed by Adam Barth.
3014
3015         * CMakeLists.txt:
3016         * Configurations/FeatureDefines.xcconfig:
3017         * GNUmakefile.am:
3018         * GNUmakefile.list.am:
3019         * Modules/geolocation/Geolocation.cpp:
3020         (WebCore):
3021         (WebCore::createPositionError):
3022         (WebCore::Geolocation::Geolocation):
3023         (WebCore::Geolocation::stop):
3024         (WebCore::Geolocation::lastPosition):
3025         (WebCore::Geolocation::requestPermission):
3026         (WebCore::Geolocation::startUpdating):
3027         (WebCore::Geolocation::stopUpdating):
3028         * Modules/geolocation/Geolocation.h:
3029         (WebCore):
3030         (Geolocation):
3031         * Modules/geolocation/GeolocationController.cpp:
3032         * Modules/geolocation/GeolocationController.h:
3033         * Modules/geolocation/GeolocationError.h:
3034         * Modules/geolocation/GeolocationPosition.h:
3035         * Target.pri:
3036         * WebCore.exp.in:
3037         * WebCore.gypi:
3038         * WebCore.vcproj/WebCore.vcproj:
3039         * bindings/js/JSGeolocationCustom.cpp:
3040         * loader/EmptyClients.h:
3041         (EmptyChromeClient):
3042         * page/ChromeClient.h:
3043         (ChromeClient):
3044         * page/Page.cpp:
3045         (WebCore::Page::Page):
3046         * page/Page.h:
3047         (Page):
3048         * platform/GeolocationService.cpp: Removed.
3049         * platform/GeolocationService.h: Removed.
3050         * platform/mock/GeolocationClientMock.cpp:
3051         * platform/mock/GeolocationClientMock.h:
3052         * platform/mock/GeolocationServiceMock.cpp: Removed.
3053         * platform/mock/GeolocationServiceMock.h: Removed.
3054
3055 2012-03-12  Antonio Gomes  <agomes@rim.com>
3056
3057         Convert nodesFromRect tests to use Internals interface
3058         https://bugs.webkit.org/show_bug.cgi?id=80886
3059
3060         Reviewed by Ryosuke Niwa.
3061
3062         Add Internals::nodesFromRect implementation to unify
3063         the codepath for testing Document::nodesFromRect in a
3064         cross port way.
3065
3066         No new tests, since we are improving here the infra-structure
3067         for testing a specific method.
3068
3069         * testing/Internals.cpp:
3070         (WebCore::Internals::nodesFromRect):
3071         (WebCore):
3072         * testing/Internals.h:
3073         (Internals):
3074         * testing/Internals.idl:
3075
3076 2012-03-13  Philip Rogers  <pdr@google.com>
3077
3078         Fix the use of stale text fragments
3079         https://bugs.webkit.org/show_bug.cgi?id=80729
3080
3081         Reviewed by Nikolas Zimmermann.
3082
3083         Previously, we were allowing SVGTextFragments to get out of sync with the
3084         actual text in RenderSVGInlineTextBox. This patch reuses the dirty line
3085         box code in RenderText::setTextWithOffset to force
3086         clearTextFragments() when setTextWithOffset is called, preventing the use
3087         of stale SVGTextFragments.
3088
3089         Test: svg/custom/delete-text-crash.html
3090
3091         * rendering/InlineBox.h:
3092         (InlineBox):
3093         * rendering/svg/SVGInlineTextBox.cpp:
3094         (WebCore::SVGInlineTextBox::dirtyLineBoxes):
3095         (WebCore):
3096         * rendering/svg/SVGInlineTextBox.h:
3097         (SVGInlineTextBox):
3098
3099 2012-03-13  Nikolas Zimmermann  <nzimmermann@rim.com>
3100
3101         SVG Animations update baseVal instead of animVal
3102         https://bugs.webkit.org/show_bug.cgi?id=12437
3103
3104         Reviewed by Dirk Schulze.
3105
3106         Blind fix for some GC related assertions firing on v8.
3107
3108         Assure that animationStarted/animationEnded calls are happening
3109         on the same SVGAnimatedProperty. Always call animationEnded(),
3110         even if we shouldn't do anything for the target element, as its
3111         destructed, as we still have to reset m_isAnimating.
3112
3113         * svg/SVGAnimateElement.cpp:
3114         (WebCore::SVGAnimateElement::SVGAnimateElement):
3115         (WebCore::SVGAnimateElement::resetToBaseValue):
3116         (WebCore::SVGAnimateElement::targetElementWillChange):
3117         * svg/SVGAnimateElement.h:
3118         (SVGAnimateElement):
3119         * svg/properties/SVGAnimatedPropertyTearOff.h:
3120         (WebCore::SVGAnimatedPropertyTearOff::animationEnded):
3121
3122 2012-03-13  Mark Pilgrim  <pilgrim@chromium.org>
3123
3124         Move DirectoryEntry and DirectoryReader to new Modules/filesystem/ directory
3125         https://bugs.webkit.org/show_bug.cgi?id=80625
3126
3127         Reviewed by Adam Barth.
3128
3129         No new tests, all existing tests pass.
3130
3131         * CMakeLists.txt:
3132         * DerivedSources.make:
3133         * DerivedSources.pri:
3134         * GNUmakefile.am:
3135         * GNUmakefile.list.am:
3136         * Modules/filesystem: Added.
3137         * Modules/filesystem/DirectoryEntry.cpp: Copied from Source/WebCore/fileapi/DirectoryEntry.cpp.
3138         * Modules/filesystem/DirectoryEntry.h: Copied from Source/WebCore/fileapi/DirectoryEntry.h.
3139         * Modules/filesystem/DirectoryEntry.idl: Copied from Source/WebCore/fileapi/DirectoryEntry.idl.
3140         * Modules/filesystem/DirectoryEntrySync.cpp: Copied from Source/WebCore/fileapi/DirectoryEntrySync.cpp.
3141         * Modules/filesystem/DirectoryEntrySync.h: Copied from Source/WebCore/fileapi/DirectoryEntrySync.h.
3142         * Modules/filesystem/DirectoryEntrySync.idl: Copied from Source/WebCore/fileapi/DirectoryEntrySync.idl.
3143         * Modules/filesystem/DirectoryReader.cpp: Copied from Source/WebCore/fileapi/DirectoryReader.cpp.
3144         * Modules/filesystem/DirectoryReader.h: Copied from Source/WebCore/fileapi/DirectoryReader.h.
3145         * Modules/filesystem/DirectoryReader.idl: Copied from Source/WebCore/fileapi/DirectoryReader.idl.
3146         * Modules/filesystem/DirectoryReaderBase.h: Copied from Source/WebCore/fileapi/DirectoryReaderBase.h.
3147         * Modules/filesystem/DirectoryReaderSync.cpp: Copied from Source/WebCore/fileapi/DirectoryReaderSync.cpp.
3148         * Modules/filesystem/DirectoryReaderSync.h: Copied from Source/WebCore/fileapi/DirectoryReaderSync.h.
3149         * Modules/filesystem/DirectoryReaderSync.idl: Copied from Source/WebCore/fileapi/DirectoryReaderSync.idl.
3150         * Target.pri:
3151         * WebCore.gyp/WebCore.gyp:
3152         * WebCore.gypi:
3153         * WebCore.pri:
3154         * WebCore.vcproj/WebCore.vcproj:
3155         * WebCore.xcodeproj/project.pbxproj:
3156         * fileapi/DirectoryEntry.cpp: Removed.
3157         * fileapi/DirectoryEntry.h: Removed.
3158         * fileapi/DirectoryEntry.idl: Removed.
3159         * fileapi/DirectoryEntrySync.cpp: Removed.
3160         * fileapi/DirectoryEntrySync.h: Removed.
3161         * fileapi/DirectoryEntrySync.idl: Removed.
3162         * fileapi/DirectoryReader.cpp: Removed.
3163         * fileapi/DirectoryReader.h: Removed.
3164         * fileapi/DirectoryReader.idl: Removed.
3165         * fileapi/DirectoryReaderBase.h: Removed.
3166         * fileapi/DirectoryReaderSync.cpp: Removed.
3167         * fileapi/DirectoryReaderSync.h: Removed.
3168         * fileapi/DirectoryReaderSync.idl: Removed.
3169
3170 2012-03-13  Igor Oliveira  <igor.o@sisa.samsung.com>
3171
3172         animation-iteration-count does not handle floating point values correctly.
3173         https://bugs.webkit.org/show_bug.cgi?id=69531
3174
3175         Implements support for non-integers animation-iteration-count numbers.
3176         Non-integer numbers will cause the animation to end part-way through a cycle.
3177
3178         Reviewed by Dean Jackson.
3179
3180         Tests: animations/fill-mode-iteration-count-non-integer.html
3181                animations/keyframes-iteration-count-non-integer.html
3182
3183         * css/CSSComputedStyleDeclaration.cpp:
3184         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3185         * css/CSSParser.cpp:
3186         (WebCore::CSSParser::parseAnimationIterationCount):
3187         * css/CSSStyleApplyProperty.cpp:
3188         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3189         * css/CSSStyleSelector.cpp:
3190         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3191         * page/animation/AnimationBase.cpp:
3192         (WebCore::AnimationBase::fractionalTime):
3193         (WebCore::AnimationBase::progress):
3194         * page/animation/CompositeAnimation.cpp:
3195         (WebCore::CompositeAnimation::pauseAnimationAtTime):
3196         * platform/animation/Animation.h:
3197         (WebCore::Animation::iterationCount):
3198         (WebCore::Animation::setIterationCount):
3199         (Animation):
3200         (WebCore::Animation::initialAnimationIterationCount):
3201
3202 2012-03-13  Tommy Widenflycht  <tommyw@google.com>
3203
3204         MediaStream API: Rename PeerConnection to DeprecatedPeerConnection
3205         https://bugs.webkit.org/show_bug.cgi?id=80692
3206
3207         Reviewed by Adam Barth.
3208
3209         First patch in a series of patches to change the PeerConnection from ROAP to JSEP,
3210         see bug 80589 for more information.
3211
3212         Patch covered by modified existing tests.
3213
3214         * GNUmakefile.list.am:
3215         * Modules/mediastream/DOMWindowMediaStream.idl:
3216         * Modules/mediastream/DeprecatedPeerConnection.cpp: Renamed from Source/WebCore/Modules/mediastream/PeerConnection.cpp.
3217         (WebCore):
3218         (WebCore::DeprecatedPeerConnection::create):
3219         (WebCore::DeprecatedPeerConnection::DeprecatedPeerConnection):
3220         (WebCore::DeprecatedPeerConnection::~DeprecatedPeerConnection):
3221         (WebCore::DeprecatedPeerConnection::processSignalingMessage):
3222         (WebCore::DeprecatedPeerConnection::readyState):
3223         (WebCore::DeprecatedPeerConnection::send):
3224         (WebCore::DeprecatedPeerConnection::addStream):
3225         (WebCore::DeprecatedPeerConnection::removeStream):
3226         (WebCore::DeprecatedPeerConnection::localStreams):
3227         (WebCore::DeprecatedPeerConnection::remoteStreams):
3228         (WebCore::DeprecatedPeerConnection::close):
3229         (WebCore::DeprecatedPeerConnection::didCompleteICEProcessing):
3230         (WebCore::DeprecatedPeerConnection::didGenerateSDP):
3231         (WebCore::DeprecatedPeerConnection::didReceiveDataStreamMessage):
3232         (WebCore::DeprecatedPeerConnection::didAddRemoteStream):
3233         (WebCore::DeprecatedPeerConnection::didRemoveRemoteStream):
3234         (WebCore::DeprecatedPeerConnection::interfaceName):
3235         (WebCore::DeprecatedPeerConnection::scriptExecutionContext):
3236         (WebCore::DeprecatedPeerConnection::stop):
3237         (WebCore::DeprecatedPeerConnection::eventTargetData):
3238         (WebCore::DeprecatedPeerConnection::ensureEventTargetData):
3239         (WebCore::DeprecatedPeerConnection::scheduleInitialNegotiation):
3240         (WebCore::DeprecatedPeerConnection::initialNegotiationTimerFired):
3241         (WebCore::DeprecatedPeerConnection::ensureStreamChangeScheduled):
3242         (WebCore::DeprecatedPeerConnection::streamChangeTimerFired):
3243         (WebCore::DeprecatedPeerConnection::scheduleReadyStateChange):
3244         (WebCore::DeprecatedPeerConnection::readyStateChangeTimerFired):
3245         (WebCore::DeprecatedPeerConnection::changeReadyState):
3246         * Modules/mediastream/DeprecatedPeerConnection.h: Renamed from Source/WebCore/Modules/mediastream/PeerConnection.h.
3247         (WebCore):
3248         (DeprecatedPeerConnection):
3249         (WebCore::DeprecatedPeerConnection::didChangeState):
3250         (WebCore::DeprecatedPeerConnection::refEventTarget):
3251         (WebCore::DeprecatedPeerConnection::derefEventTarget):
3252         * Modules/mediastream/DeprecatedPeerConnection.idl: Renamed from Source/WebCore/Modules/mediastream/PeerConnection.idl.
3253         * Modules/mediastream/SignalingCallback.h:
3254         (WebCore):
3255         (SignalingCallback):
3256         * Modules/mediastream/SignalingCallback.idl:
3257         * WebCore.gypi:
3258         * bindings/generic/RuntimeEnabledFeatures.h:
3259         (WebCore::RuntimeEnabledFeatures::webkitDeprecatedPeerConnectionEnabled):
3260         * bindings/js/JSDeprecatedPeerConnectionCustom.cpp: Renamed from Source/WebCore/bindings/js/JSPeerConnectionCustom.cpp.
3261         (WebCore):
3262         (WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection):
3263         * dom/EventTarget.h:
3264         (WebCore):
3265         * dom/EventTargetFactory.in:
3266         * platform/mediastream/DeprecatedPeerConnectionHandler.h: Renamed from Source/WebCore/platform/mediastream/PeerConnectionHandler.h.
3267         (WebCore):
3268         (DeprecatedPeerConnectionHandler):
3269         * platform/mediastream/DeprecatedPeerConnectionHandlerClient.h: Renamed from Source/WebCore/platform/mediastream/PeerConnectionHandlerClient.h.
3270         (WebCore):
3271         (DeprecatedPeerConnectionHandlerClient):
3272         (WebCore::DeprecatedPeerConnectionHandlerClient::~DeprecatedPeerConnectionHandlerClient):
3273         * platform/mediastream/gstreamer/DeprecatedPeerConnectionHandler.cpp: Renamed from Source/WebCore/platform/mediastream/gstreamer/PeerConnectionHandler.cpp.
3274         (WebCore):
3275         (WebCore::DeprecatedPeerConnectionHandler::create):
3276         (WebCore::DeprecatedPeerConnectionHandler::DeprecatedPeerConnectionHandler):
3277         (WebCore::DeprecatedPeerConnectionHandler::~DeprecatedPeerConnectionHandler):
3278         (WebCore::DeprecatedPeerConnectionHandler::produceInitialOffer):
3279         (WebCore::DeprecatedPeerConnectionHandler::handleInitialOffer):
3280         (WebCore::DeprecatedPeerConnectionHandler::processSDP):
3281         (WebCore::DeprecatedPeerConnectionHandler::processPendingStreams):
3282         (WebCore::DeprecatedPeerConnectionHandler::sendDataStreamMessage):
3283         (WebCore::DeprecatedPeerConnectionHandler::stop):
3284
3285 2012-03-13  Pavel Feldman  <pfeldman@chromium.org>
3286
3287         Web Inspector: front-end compilation was broken while supporting large arrays.
3288         https://bugs.webkit.org/show_bug.cgi?id=81013
3289
3290         Reviewed by Vsevolod Vlasov.
3291
3292         * inspector/front-end/ExtensionPanel.js:
3293         * inspector/front-end/ObjectPropertiesSection.js:
3294         (WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties.buildObjectFragment):
3295         * inspector/front-end/RemoteObject.js:
3296
3297 2012-03-13  Tony Chang  <tony@chromium.org>
3298
3299         flexbox's computePreferredLogicalWidth needs to take multiline into account
3300         https://bugs.webkit.org/show_bug.cgi?id=80931
3301
3302         Reviewed by Ojan Vafai.
3303
3304         Tests: css3/flexbox/multiline-shrink-to-fit-expected.html
3305                css3/flexbox/multiline-shrink-to-fit.html
3306
3307         * rendering/RenderFlexibleBox.cpp:
3308         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths): Set min/max preferredLogicalWidth based on always breaking or never breaking.
3309         (WebCore::RenderFlexibleBox::computeNextFlexLine): Add a FIXME.
3310         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Don't change the width after computePreferredWidth has been called.
3311
3312 2012-03-13  Sheriff Bot  <webkit.review.bot@gmail.com>
3313
3314         Unreviewed, rolling out r110469.
3315         http://trac.webkit.org/changeset/110469
3316         https://bugs.webkit.org/show_bug.cgi?id=81010
3317
3318         This patch still appears to crash (Requested by abarth on
3319         #webkit).
3320
3321         * page/FrameView.cpp:
3322         (WebCore::FrameView::FrameView):
3323         (WebCore::FrameView::reset):
3324         (WebCore::FrameView::repaintContentRectangle):
3325         (WebCore):
3326         (WebCore::FrameView::endDeferredRepaints):
3327         (WebCore::FrameView::doDeferredRepaints):
3328         (WebCore::FrameView::deferredRepaintTimerFired):
3329         * page/FrameView.h:
3330         (FrameView):
3331         * rendering/RenderView.cpp:
3332         (WebCore::RenderView::shouldRepaint):
3333         * svg/graphics/SVGImage.cpp:
3334         (WebCore::SVGImage::drawSVGToImageBuffer):
3335         (WebCore::SVGImage::draw):
3336         * svg/graphics/SVGImage.h:
3337         * svg/graphics/SVGImageCache.cpp:
3338         (WebCore::SVGImageCache::imageContentChanged):
3339         (WebCore::SVGImageCache::redrawTimerFired):
3340         * svg/graphics/SVGImageCache.h:
3341         (SVGImageCache):
3342
3343 2012-03-13  Max Vujovic  <mvujovic@adobe.com>
3344
3345         Add a method to window.internals to enable testing of inspector highlight rects
3346         https://bugs.webkit.org/show_bug.cgi?id=80338
3347
3348         Reviewed by Pavel Feldman.
3349
3350         Add window.internals.inspectorHighlightRects, a method which makes it possible to test the
3351         positions and sizes of inspector highlight rects.
3352
3353         Test: inspector/elements/highlight-node.html
3354
3355         * WebCore.exp.in: Export symbols.
3356         * testing/Internals.cpp:
3357         (WebCore::Internals::inspectorHighlightRects): Call InspectorController::getHighlight and
3358         return the highlight's quads as a ClientRectList.
3359         (WebCore):
3360         * testing/Internals.h:
3361         (WebCore):
3362         (Internals):
3363         * testing/Internals.idl:
3364
3365             Add inspectorHighlightRects to the window.internals interface.
3366
3367 2012-03-13  Konrad Piascik  <kpiascik@rim.com>
3368
3369         [BlackBerry] Remove sublayers before clamping just in case the layer already exists
3370         https://bugs.webkit.org/show_bug.cgi?id=80989
3371
3372         Reviewed by Antonio Gomes.
3373
3374         Discovered when trying to add a highlight sublayer for web inspector.  Since that layer
3375         may already exist in the tree we need to see if it will be pruned before we clamp on the
3376         size.
3377
3378         This was manually tested during the writing of another patch to add web inspector highlights
3379         to accelrated compositing.
3380
3381         * platform/graphics/blackberry/LayerWebKitThread.cpp:
3382         (WebCore::LayerWebKitThread::insertSublayer):
3383
3384 2012-03-13  Vsevolod Vlasov  <vsevik@chromium.org>
3385
3386         Web Inspector: Add snippets model.
3387         https://bugs.webkit.org/show_bug.cgi?id=80863
3388
3389         Reviewed by Yury Semikhatsky.
3390
3391         Test: inspector/debugger/snippets-model.html
3392
3393         * WebCore.gypi:
3394         * WebCore.vcproj/WebCore.vcproj:
3395         * inspector/compile-front-end.py:
3396         * inspector/front-end/Settings.js:
3397         (WebInspector.ExperimentsSettings):
3398         * inspector/front-end/SnippetsModel.js: Added.
3399         * inspector/front-end/WebKit.qrc:
3400         * inspector/front-end/inspector.html:
3401         * inspector/front-end/inspector.js:
3402
3403 2012-03-13  'Pavel Feldman'  <pfeldman@chromium.org>
3404
3405         Not reviewed: chromium build fix.
3406
3407         * history/CachedFrame.cpp:
3408
3409 2012-03-13  Peter Rybin  <peter.rybin@gmail.com>
3410
3411         Web Inspector: CodeGeneratorInspector.py: refactor copy-paste getter methods
3412         https://bugs.webkit.org/show_bug.cgi?id=80923
3413
3414         Reviewed by Yury Semikhatsky.
3415
3416         Several methods are combined in one using C++ templates.
3417
3418         * inspector/CodeGeneratorInspector.py:
3419
3420 2012-03-13  Rob Buis  <rbuis@rim.com>
3421
3422         [BlackBerry] Fix cast-align warning in QuotesData.cpp
3423         https://bugs.webkit.org/show_bug.cgi?id=80601
3424
3425         Reviewed by Nikolas Zimmermann.
3426
3427         Fix warning by adding variable of correct return type.
3428
3429         * rendering/style/QuotesData.cpp:
3430         (WebCore::QuotesData::create):
3431
3432 2012-03-12  Brady Eidson  <beidson@apple.com>
3433
3434         <rdar://problem/7908830> and https://bugs.webkit.org/show_bug.cgi?id=34679
3435         Location and other objects are dysfunctional after a document gets restored from page cache
3436
3437         Reviewed by Adam Barth.
3438
3439         Test: fast/loader/window-properties-restored-from-page-cache.html
3440
3441         Give DOMWindowProperties the ability to reconnect to their Frame:
3442         * page/DOMWindowProperty.cpp:
3443         (WebCore::DOMWindowProperty::reconnectFrame):
3444         * page/DOMWindowProperty.h:
3445         (DOMWindowProperty):
3446
3447         Let ApplicationCache do some extra work when reconnecting:
3448         * loader/appcache/DOMApplicationCache.cpp:
3449         (WebCore::DOMApplicationCache::reconnectFrame):
3450         (WebCore):
3451         * loader/appcache/DOMApplicationCache.h:
3452         (DOMApplicationCache):
3453
3454         Let IndexDB do some extra work when reconnecting:
3455         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
3456         (WebCore::DOMWindowIndexedDatabase::disconnectFrame):
3457         (WebCore::DOMWindowIndexedDatabase::reconnectFrame):
3458         (WebCore::DOMWindowIndexedDatabase::webkitIndexedDB):
3459         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
3460         (DOMWindowIndexedDatabase):
3461
3462         Tell the DOMWindow to suspend to the page cache:
3463         * history/CachedFrame.cpp:
3464         (WebCore::CachedFrame::CachedFrame):
3465
3466         Tell the DOMWindow to resume from the page cache:
3467         * loader/FrameLoader.cpp:
3468         (WebCore::FrameLoader::open):
3469
3470         * page/DOMWindow.cpp:
3471         (WebCore::DOMWindow::DOMWindow):
3472         (WebCore::DOMWindow::~DOMWindow): Call clearDOMWindowProperties directly instead of clear()
3473         (WebCore::DOMWindow::frameDestroyed): Ditto.
3474         (WebCore::DOMWindow::clear): Only clear if the DOMWindow is not suspended for the page cache.
3475         (WebCore::DOMWindow::suspendForPageCache): Disconnect properties and set the page cache flag.
3476         (WebCore::DOMWindow::resumeFromPageCache): Reconnect properties and revert the page cache flag.
3477         (WebCore::DOMWindow::disconnectDOMWindowProperties): Only disconnect the registered properties.
3478         (WebCore::DOMWindow::reconnectDOMWindowProperties):
3479         (WebCore::DOMWindow::clearDOMWindowProperties): Disconnect the registered properties then clear them out.
3480
3481         For all of the following, if the DOMWindow is not displayed in a frame (i.e., it is suspended), do nothing:
3482         (WebCore::DOMWindow::screen):
3483         (WebCore::DOMWindow::history):
3484         (WebCore::DOMWindow::crypto):
3485         (WebCore::DOMWindow::locationbar):
3486         (WebCore::DOMWindow::menubar):
3487         (WebCore::DOMWindow::personalbar):
3488         (WebCore::DOMWindow::scrollbars):
3489         (WebCore::DOMWindow::statusbar):
3490         (WebCore::DOMWindow::toolbar):
3491         (WebCore::DOMWindow::console):
3492         (WebCore::DOMWindow::applicationCache):
3493         (WebCore::DOMWindow::navigator):
3494         (WebCore::DOMWindow::performance):
3495         (WebCore::DOMWindow::location):
3496         (WebCore::DOMWindow::sessionStorage):
3497         (WebCore::DOMWindow::localStorage):
3498         (WebCore::DOMWindow::webkitNotifications):
3499         (WebCore::DOMWindow::postMessageTimerFired):
3500         (WebCore::DOMWindow::getSelection):
3501         (WebCore::DOMWindow::styleMedia):
3502         (WebCore::DOMWindow::webkitStorageInfo):
3503         * page/DOMWindow.h:
3504
3505 2012-03-13  Dana Jansens  <danakj@chromium.org>
3506
3507         [chromium] Use projectQuad to apply inverse mapRect
3508         https://bugs.webkit.org/show_bug.cgi?id=80741
3509
3510         Reviewed by Adrienne Walker.
3511
3512         Unit test: CCOcclusionTrackerTest3dTransform
3513                    CCOcclusionTrackerTestPerspectiveTransform
3514                    CCOcclusionTrackerTestPerspectiveTransformBehindCamera
3515
3516         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3517         (WebCore::projectQuad):
3518         (WebCore):
3519         (WebCore::computeUnoccludedContentRect):
3520
3521 2012-03-13  Gavin Peters  <gavinp@chromium.org>
3522
3523         New PageCache histogram which counts failures ignoring Settings.
3524         https://bugs.webkit.org/show_bug.cgi?id=80864
3525
3526         Reviewed by Brady Eidson.
3527
3528         Chrome has a command line switch to turn on the page cache.
3529         Currently it doesn't work, but it can cause the PageCache reasons
3530         for failure count to read lower than it should.  Add a new
3531         histogram to report the corrected value.
3532
3533         * history/PageCache.cpp:
3534         (WebCore::logCanCachePageDecision):
3535
3536 2012-03-13  George Staikos  <staikos@webkit.org>
3537
3538         Fix signed/unsigned mismatch compiler warnings.
3539         https://bugs.webkit.org/show_bug.cgi?id=80790
3540
3541         Reviewed by Alexey Proskuryakov.
3542
3543         * loader/icon/IconDatabase.cpp:
3544         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
3545         * platform/network/MIMESniffing.cpp:
3546
3547 2012-03-13  Sheriff Bot  <webkit.review.bot@gmail.com>
3548
3549         Unreviewed, rolling out r110510.
3550         http://trac.webkit.org/changeset/110510
3551         https://bugs.webkit.org/show_bug.cgi?id=80987
3552
3553         depends on chromium r 125700, which isn't rolled into webkit
3554         yet :-/ (Requested by thakis_ on #webkit).
3555
3556         * WebCore.gyp/mac/adjust_visibility.sh:
3557
3558 2012-03-13  Gavin Peters  <gavinp@chromium.org>
3559
3560         Make ApplicationCacheHost::canCacheInPageCache() non-const.
3561         https://bugs.webkit.org/show_bug.cgi?id=80904
3562
3563         Reviewed by Alexey Proskuryakov.
3564
3565         A const pointer to a large object like ApplicationCacheHost is not our standard
3566         practice; so remove this (implicit) one.  See also https://bugs.webkit.org/show_bug.cgi?id=80898
3567
3568         * loader/appcache/ApplicationCacheHost.cpp:
3569         (WebCore::ApplicationCacheHost::canCacheInPageCache):
3570         * loader/appcache/ApplicationCacheHost.h:
3571         (ApplicationCacheHost):
3572
3573 2012-03-13  Stephen Chenney  <schenney@chromium.org>
3574
3575         Crash in WebCore::GraphicsContext::paintingDisabled
3576         https://bugs.webkit.org/show_bug.cgi?id=80669
3577
3578         Reviewed by Nikolas Zimmermann.
3579
3580         The SVGImageBufferTools::clipToImageBuffer method deletes the clip
3581         image when it thinks it is not needed. However, there are cases when
3582         it is in fact still needed, particularly when the clip buffer is
3583         coming from higher up in the stack where it may be needed again.
3584
3585         So this patch adds a flag to only allow deletion of the image buffer
3586         if it was created at the most recent call site.
3587
3588         Tests: svg/custom/circular-clip-path-references-crash-expected.svg
3589                svg/custom/circular-clip-path-references-crash.svg
3590
3591         * rendering/svg/RenderSVGResourceClipper.cpp:
3592         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
3593         * rendering/svg/RenderSVGResourceGradient.cpp:
3594         (WebCore::clipToTextMask):
3595         * rendering/svg/RenderSVGResourceMasker.cpp:
3596         (WebCore::RenderSVGResourceMasker::applyResource):
3597         * rendering/svg/SVGImageBufferTools.cpp:
3598         (WebCore::SVGImageBufferTools::clipToImageBuffer):
3599         * rendering/svg/SVGImageBufferTools.h:
3600         (SVGImageBufferTools):
3601
3602 2012-03-13  Gavin Peters  <gavinp@chromium.org>
3603
3604         Fix an enumeration name in ReasonsFrameCannotBeInPageCache.
3605         https://bugs.webkit.org/show_bug.cgi?id=80849
3606
3607         Reviewed by Brady Eidson.
3608
3609         It seems that somebody goofed, and named one of the
3610         ReasonsFrameCannotBeInPageCache antonymically.
3611
3612         * history/PageCache.cpp:
3613         (WebCore::logCanCacheFrameDecision):
3614
3615 2012-03-12  Kinuko Yasuda  <kinuko@chromium.org>
3616
3617         File upload control should use File.name() rather than File.path() to show chosen filenames
3618         https://bugs.webkit.org/show_bug.cgi?id=80970
3619
3620         In some rare cases (e.g. files from FileSystem API or files created
3621         using the newly added WebKit API) File.name has different displayName
3622         from the basename of file.path, and in the file uploader controller we
3623         should use File.name rather than File.path.
3624
3625         Reviewed by Kent Tamura.
3626
3627         No new tests: existing tests should pass as this should not change
3628         behavior in regular use cases.  (New behavior where File.name differs
3629         from File.path can be only tested in chromeos environment, therefore
3630         not adding new tests for that)
3631
3632         * platform/gtk/RenderThemeGtk.cpp:
3633         (WebCore::RenderThemeGtk::fileListNameForWidth): Updated to handle FileList.
3634         * platform/gtk/RenderThemeGtk.h:
3635         * platform/qt/RenderThemeQt.cpp:
3636         (WebCore::RenderThemeQt::fileListNameForWidth): Updated to handle FileList.
3637         * platform/qt/RenderThemeQt.h:
3638         * rendering/RenderFileUploadControl.cpp:
3639         (WebCore::RenderFileUploadControl::fileTextValue): Changed to pass FileList rather than FileList->paths().
3640         * rendering/RenderTheme.cpp:
3641         (WebCore::RenderTheme::fileListNameForWidth): Updated to handle FileList and use File.name for displaying the file name.
3642         * rendering/RenderTheme.h:
3643         * rendering/RenderThemeMac.h:
3644         * rendering/RenderThemeMac.mm:
3645         (WebCore::RenderThemeMac::fileListNameForWidth): Updated to handle FileList.
3646
3647 2012-03-13  Kinuko Yasuda  <kinuko@chromium.org>
3648
3649         Allow WebFileChooser to return extra file info (like displayName) in addition to mere file paths
3650         https://bugs.webkit.org/show_bug.cgi?id=80719
3651
3652         Reviewed by Kent Tamura.
3653
3654         No new tests: this change itself shouldn't change existing behavior.
3655
3656         * fileapi/File.cpp:
3657         (WebCore::createBlobDataForFileWithName): Renamed from createBlobDataForFileSystemFile.
3658         * fileapi/File.h:
3659         * html/FileInputType.cpp:
3660         (WebCore::FileInputType::saveFormControlState): Updated to handle File.name.
3661         (WebCore::FileInputType::restoreFormControlState): Ditto.
3662         (WebCore::FileInputType::setFileList): Changed the signature to take
3663         FileChooserFileInfo.
3664         (WebCore::FileInputType::filesChosen): Ditto.
3665         (WebCore::FileInputType::receiveDroppedFiles):
3666         * html/FileInputType.h:
3667         (FileInputType):
3668         * platform/FileChooser.cpp:
3669         (WebCore::FileChooser::chooseFiles): Added an overloaded method that
3670         takes FileChooserFileInfo.
3671         (WebCore):
3672         * platform/FileChooser.h:
3673         (WebCore::FileChooserFileInfo::FileChooserFileInfo): Added.
3674         * platform/MIMETypeRegistry.cpp:
3675         (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension): Removed surrouonding ifdefs as this function is now used even if FILE_SYSTEM is not enabled.
3676         * platform/MIMETypeRegistry.h:
3677         (MIMETypeRegistry):
3678
3679 2012-03-13  Vsevolod Vlasov  <vsevik@chromium.org>
3680
3681         Unreviewed inspector compilation module name fix after r110550.
3682
3683         * inspector/compile-front-end.py:
3684
3685 2012-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
3686
3687         Web Inspector: Changes to the list of scripts for front-end compilation should not require update of number of scripts in module.
3688         https://bugs.webkit.org/show_bug.cgi?id=80872
3689
3690         Reviewed by Pavel Feldman.
3691
3692         * inspector/compile-front-end.py: Added.
3693         * inspector/compile-front-end.sh:
3694
3695 2012-03-12  Pavel Podivilov  <podivilov@chromium.org>
3696
3697         Web Inspector: move ResourceScriptMapping to a separate file.
3698         https://bugs.webkit.org/show_bug.cgi?id=80859
3699
3700         Reviewed by Vsevolod Vlasov.
3701
3702         * WebCore.gypi:
3703         * WebCore.vcproj/WebCore.vcproj:
3704         * inspector/compile-front-end.sh:
3705         * inspector/front-end/ResourceScriptMapping.js: Copied from Source/WebCore/inspector/front-end/ScriptMapping.js.
3706         (WebInspector.ResourceScriptMapping):
3707         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
3708         (WebInspector.ResourceScriptMapping.prototype.uiSourceCodeList):
3709         (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeListChanged):
3710         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeListChanged):
3711         (WebInspector.ResourceScriptMapping.prototype._bindScriptToRawSourceCode):
3712         (WebInspector.ResourceScriptMapping.prototype.setFormatSource):
3713         (WebInspector.ResourceScriptMapping.prototype.forceUpdateSourceMapping):
3714         (WebInspector.ResourceScriptMapping.prototype.reset):
3715         * inspector/front-end/ScriptMapping.js:
3716         * inspector/front-end/WebKit.qrc:
3717         * inspector/front-end/inspector.html:
3718
3719 2012-03-12  Kentaro Hara  <haraken@chromium.org>
3720
3721         Rename OptionsObject to Dictionary
3722         https://bugs.webkit.org/show_bug.cgi?id=80802
3723
3724         Reviewed by Adam Barth.
3725
3726         For clarification, rename OptionsObject.{h,cpp} to Dictionary.{h,cpp}.
3727         This patch just renames and sorts alphabetically.
3728
3729         No tests. No change in behavior.
3730
3731         * GNUmakefile.list.am:
3732         * Modules/indexeddb/IDBDatabase.cpp:
3733         (WebCore::IDBDatabase::createObjectStore):
3734         * Modules/indexeddb/IDBDatabase.h:
3735         (WebCore::IDBDatabase::createObjectStore):
3736         (IDBDatabase):
3737         * Modules/indexeddb/IDBDatabase.idl:
3738         * Modules/indexeddb/IDBKeyRange.h:
3739         * Modules/indexeddb/IDBObjectStore.cpp:
3740         (WebCore::IDBObjectStore::createIndex):
3741         * Modules/indexeddb/IDBObjectStore.h:
3742         (WebCore::IDBObjectStore::createIndex):
3743         (IDBObjectStore):
3744         * Modules/indexeddb/IDBObjectStore.idl:
3745         * Target.pri:
3746         * UseV8.cmake:
3747         * WebCore.gypi:
3748         * WebCore.vcproj/WebCore.vcproj:
3749         * bindings/js/Dictionary.h: Renamed from Source/WebCore/bindings/js/OptionsObject.h.
3750         (WebCore):
3751         (Dictionary):
3752         (WebCore::Dictionary::Dictionary):
3753         (WebCore::Dictionary::isObject):
3754         (WebCore::Dictionary::isUndefinedOrNull):
3755         (WebCore::Dictionary::get):
3756         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
3757         * bindings/js/IDBBindingUtilities.cpp:
3758         (WebCore::createDictionaryFromValue):
3759         * bindings/js/IDBBindingUtilities.h:
3760         (WebCore):
3761         * bindings/scripts/CodeGeneratorJS.pm:
3762         (JSValueToNative):
3763         * bindings/scripts/CodeGeneratorV8.pm:
3764         (GenerateHeader):
3765         (GenerateParametersCheck):
3766         (GenerateEventConstructorCallback):
3767         (GetNativeType):
3768         (JSValueToNative):
3769         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
3770         (WebDOMTestObj::optionsObject):
3771         * bindings/scripts/test/CPP/WebDOMTestObj.h:
3772         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3773         (webkit_dom_test_obj_options_object):
3774         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3775         * bindings/scripts/test/JS/JSTestObj.cpp:
3776         (WebCore::jsTestObjPrototypeFunctionIdbKey):
3777         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
3778         * bindings/scripts/test/ObjC/DOMTestObj.h:
3779         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3780         (-[DOMTestObj optionsObject:ooo:]):
3781         * bindings/scripts/test/TestObj.idl:
3782         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3783         (WebCore::V8TestEventConstructor::constructorCallback):
3784         (WebCore::fillTestEventConstructorInit):
3785         * bindings/scripts/test/V8/V8TestEventConstructor.h:
3786         (WebCore):
3787         * bindings/scripts/test/V8/V8TestObj.cpp:
3788         (WebCore::TestObjInternal::optionsObjectCallback):
3789         * bindings/v8/Dictionary.cpp: Renamed from Source/WebCore/bindings/v8/OptionsObject.cpp.
3790         (WebCore):
3791         (WebCore::Dictionary::Dictionary):
3792         (WebCore::Dictionary::~Dictionary):
3793         (WebCore::Dictionary::operator=):
3794         (WebCore::Dictionary::isObject):
3795         (WebCore::Dictionary::isUndefinedOrNull):
3796         (WebCore::Dictionary::getKey):
3797         (WebCore::Dictionary::get):
3798         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
3799         * bindings/v8/Dictionary.h: Renamed from Source/WebCore/bindings/v8/OptionsObject.h.
3800         (WebCore):
3801         (Dictionary):
3802         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
3803         (WebCore::V8WebKitMutationObserver::observeCallback):
3804
3805 2012-03-12  Nikolas Zimmermann  <nzimmermann@rim.com>
3806
3807         SVG Animations update baseVal instead of animVal
3808         https://bugs.webkit.org/show_bug.cgi?id=12437
3809
3810         Reviewed by Dirk Schulze.
3811
3812         Begin implementing the last missing core piece of the SVG DOM: proper animVal support.
3813         Most SVG DOM interfaces exposing eg. lengths use SVGAnimatedLength. eg. from SVGRectElement:
3814         "readonly attribute SVGAnimatedLength x;" SVGAnimatedXXX contains following methods:
3815         "readonly attribute SVGLength baseVal; readonly attribute SVGLength animVal;"
3816         From SVG DOM perspective, animVal and baseVal are two distinctive objects, animVal != baseVal.
3817         Its underlying value is the same though, if no animation is running on that attribute.
3818
3819         As soon as a SMIL animation starts animating an SVGAnimated* target attribute, its
3820         baseVal and animVal may begin to differ. The animVal always reflect the current animated
3821         value (including all effects of additive/accumulated animations) which is shown on screen
3822         when eg animating the width of a <rect>. The baseVal is is equal to the underlying XML
3823         property value / SVG DOM value, but may be influenced through dynamic changes.
3824         (Consider changing rect1.width.baseVal.value while 'width' is animated)
3825
3826         During the last year we prepared our animation code to turn on animVal support.
3827         This patch adds the last missing pieces to turn on animVal support for the SVGLength.
3828         SVGLengthList and all other types will follow, one after the other.
3829
3830         I've decided to write an exhaustive ChangeLog, as this as the base for any future
3831         work in this area - hopefully making this more reviewable.
3832
3833         Tests: svg/animations/additive-from-to-width-animation.html
3834                svg/animations/additive-values-width-animation.html
3835                svg/animations/change-baseVal-while-animating-fill-freeze-2.html
3836                svg/animations/change-baseVal-while-animating-fill-freeze.html
3837                svg/animations/change-baseVal-while-animating-fill-remove-2.html
3838                svg/animations/change-baseVal-while-animating-fill-remove.html
3839                svg/animations/change-target-while-animating-SVG-property.html
3840                svg/animations/multiple-animations-fill-freeze.html
3841                svg/animations/remove-animation-element-while-animation-is-running.html
3842                svg/repaint/repainting-after-animation-element-removal.svg
3843
3844         * svg/SVGAnimateElement.cpp: Remove unnecessary std namespace inclusion.
3845         (WebCore::SVGAnimateElement::SVGAnimateElement): Remove now-obsolete m_aboutToStopAnimation.
3846         (WebCore::SVGAnimateElement::calculateAnimatedValue): Swap assertion order, to test hasTagName() _before_ casting.
3847         (WebCore::SVGAnimateElement::resetToBaseValue):
3848             Stop relying on the cached baseValue (breaking additive="sum"+values animation) for SVG DOM primitive animations.
3849             Avoid any string roundtrips previously needed to reset the SVGAnimatedType to the base value. Just grab the
3850             currentBaseValue() from the associated SVGAnimatedProperty, which includes all dynamic changes to the baseVal
3851             either by SVG DOM or setAttribute() calls - this way we don't need to utilize the buggy cache in SMILTimeContainer,
3852             which can be removed once all SVG DOM primitive types switched to the new animVal concept.
3853
3854             NOTE: When multiple animations of the same attribute are applied to a target element, resetToBaseValue() will be called
3855             for the highest priority SVGSMILElement, on every animation step! Consider two <animate> elements, applied to a target
3856             <rect> which both animate the 'x' attribute, one from 0s to 2s, the other from 4s to 6s. The last <animate> element
3857             will reuse the SVGAnimatedType m_animatedType from the first <animate> element, and never create an own m_animatedType.
3858             When the animation starts the first time at 0s, we update the rect.x.animVals SVGLength* pointer, to point to the
3859             SVGAnimatedType of the first <animate> element, owning the m_animatedType. From that point on each call to rect.x.animVal
3860             will always return the same value as the SVGAnimatedType of the first <animate> element holds. Now after 2s the first
3861             <animate> element becomes inactive, but its m_animatedType remains alive. The bindings don't notice this change at all.
3862             Now at 4s, the second animation element gets active. It reuses the SVGAnimatedType of the first <animate> element, and
3863             applies its animation changes to that SVGAnimatedType, which is immediately reflected in the bindings w/o any additional
3864             work. It's very important for the understanding when animationStarted/animationEnded need to be called.
3865
3866         (WebCore::SVGAnimateElement::applyResultsToTarget): Remove now-obsolete m_aboutToStopAnimation logic. No need to know it at this point.
3867         (WebCore::SVGAnimateElement::targetElementWillChange):
3868             Renamed from targetElementDidChange(). This method is called from SVGSMILElement for following conditions:
3869             - animation element is destructed
3870             - animation element is removed from document
3871             - target element of animation is destructed
3872             - target element of animation is removed from document
3873             - target element of animation changes id
3874
3875             Whenever any of this happens, we need to reset the animVal. Resetting the animVal involves resetting the PropertyType* pointer,
3876             eg. SVGLength*, from the animVal property tear off, belonging to a certain SVGAnimatedProperty (eg. rect.x) to the initial
3877             value again, which is the 'm_x' of the SVGRectElement. This is needed as the SVGAnimatedType the animVal currently points to,
3878             if an animation is/was running, is destructed in targetElementWillChange(), to reset the SVGAnimateElement to the initial
3879             state before it received a target. This is the only place which destructed the m_animatedType, and thus the only place that
3880             needs to take care of resetting the animVal pointers.
3881
3882         * svg/SVGAnimatedLength.cpp:
3883         (WebCore::SVGAnimatedLengthAnimator::constructFromCopy):
3884             Add a new constructFromCopy(SVGGenericAnimatedType) function to SVGAnimatedLengthAnimator.
3885             It takes a type-unsafe SVGGenericAnimatedType - the caller has to guarantee the type matches.
3886             This is strictly enforced for the single caller of constructFromCopy, and guaranteed to be safe.
3887
3888         * svg/SVGAnimatedLength.h: Add new constructFromCopy method, which is used to avoid string-roundtrips when resetting to base values.
3889         * svg/SVGAnimatedType.cpp:
3890         (WebCore::SVGAnimatedType::supportsAnimVal): Only returns true for AnimatedLength, for now.
3891         (WebCore::SVGAnimatedType::setVariantValue): Takes a SVGGenericAnimatedType, assuming the type matches. Callers have to guarantee type-safety!
3892         * svg/SVGAnimatedType.h:
3893         (SVGAnimatedType): Add new static supportsAnimVal(AnimatedPropertyType) function.
3894         (WebCore::SVGAnimatedType::variantValue): Add a generic accessor for all animated types, called variant(). Only one place uses this.
3895         * svg/SVGAnimatedTypeAnimator.h:
3896         (WebCore::SVGAnimatedTypeAnimator::constructFromCopy):
3897             New method to construct an eg. SVGAnimatedLengthAnimator right from a SVGLength, instead of a String.
3898             In that case the SVGAnimatedType just stores a pointer to the underlying SVGLength, no copying and or other roundtrips involved.
3899
3900         * svg/SVGAnimationElement.cpp:
3901         (WebCore::SVGAnimationElement::svgAttributeChanged):
3902             Implement this instead of attributeChanged. The previous implementation reset the animation state to Inactive, causing a full
3903             rebuild, whenever any attribute changes, even though it might not be related for the animation element, eg.
3904             animate.setAttribute("stdDeviationX", "foobar"). Fix that by checking if we support the attribute (keyTimes/keySplines/etc..)
3905             , if not pass it on to SVGSMILElement (which supports begin/end/etc..) to check if it can handle that.
3906
3907         (WebCore::SVGAnimationElement::animationAttributeChanged):
3908             Called from our svgAttributeChanged, and/or from SVGSMILElement::svgAttributeChanged, whenever a _known_ attribute has changed.
3909             This sledgehammer should be used with care, instead of each time attributeChanged() is called :-)
3910
3911         (WebCore::setTargetAttributeAnimatedCSSValue):
3912             Remove support for removing properties from the override style sheet. I've added this optimization too early, we should reevaluate
3913             this once more types support animVal. It currently complexifies the logic too much, requiring setAttributeAnimatedValue to know
3914             if the animation ends (and that's not easy to figure out, at least not using started/endedActiveInterval, as I anticipated).
3915
3916         (WebCore::findMatchingAnimatedProperty):
3917             Add helper functions which retrieves a SVGAnimatedProperty* for a given SVGElement* targetElement, an attributeName, and an attribute
3918             type. eg. findMatchingAnimatedProperty(myRectElement, SVGNames::xAttr, AnimatedLength) returns the SVGAnimatedProperty which is
3919             exposed to JS, that holds: SVGProperty* baseVal, and SVGProperty* animVal. (Lazily created if they got accessed from JS.). This is
3920             used to update the animVal pointing to a new eg. SVGLength* value, once animation has started, to make rect->x() return that new
3921             SVGLength* value (internally), and to reflect the current animated value in rect.x.animVal.value from JS.
3922
3923         (WebCore::SVGAnimationElement::applyAnimatedValue): Refactored from setTargetAttributeAnimatedValue, to simplify the code.
3924         (WebCore::notifyAnimatedPropertyAboutAnimationBeginEnd):
3925             Helper function to share code betweeen animationStarted/animationEnded.
3926             It takes a SVGAnimatedProperty* and a SVGAnimatedType* which may be zero, indicating that the animation ended.
3927             It calls animationStarted/animationEnded on the given SVGAnimatedProperty, to update the animVal state.
3928             It also figures out all instances of the target element, and their SVGAnimatedProperties that may need updating.
3929
3930         (WebCore::SVGAnimationElement::animationStarted): Uses the helper above, passing on the given animatedType.
3931         (WebCore::SVGAnimationElement::animationEnded): Uses the helper above, passing 0 as animatedType.
3932         (WebCore::InstanceUpdateBlocker::InstanceUpdateBlocker):
3933             Added new helper struct, doing element->setInstancesUpdatedBlock(true) on construction and setInstancesUpdatesBlocked(false) on
3934             destruction, making it impossible to forget one. If we ever rewrite svgAttributeChanged & co to auto-update the cloned instances,
3935             this can go away.
3936
3937         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
3938             Now takes an SVGAnimatedType* instead of a String parameter. In order to avoid string-roundtrips for animVal support, let us
3939             decide if we need to construct a String out of it, or not. For animations supporting animVal (only SVGLength) we don't need
3940             to update any attribute or animVal pointer here, that happens automatically! We only need to notify the targetElement eg,
3941             that its xAttr changed! Previously we had to call targetElement->setAttribute("x", "...") on every animation step for
3942             SVGLength animations - that's gone now! The SVGAnimatedType pointers remains the same during the whole animation, so there's
3943             no need to call animationStarted() at each animated step!
3944
3945         (WebCore::SVGAnimationElement::animatedPropertyForType):
3946             Helper function returning a SVGAnimatedProperty* for the current target element & current target attribute, if the
3947             current animation is running on a type supporting animVal (SVGLength), or returning 0. This is needed for SVGAnimateElement.
3948             Reuses the existing findMatchingAnimatedProperty code.
3949
3950         * svg/SVGAnimationElement.h:
3951         * svg/animation/SMILTimeContainer.cpp:
3952         (WebCore::SMILTimeContainer::updateAnimations):
3953             Add comment to clarify why caching baseValues is just wrong. For SVGLength animations the problem is now gone.
3954             This is exercised using the new additive-from-to-width-animation.html & additive-values-width-animation.html tests.
3955
3956         * svg/animation/SVGSMILElement.cpp:
3957         (WebCore::SVGSMILElement::removedFromDocument):
3958             Since animVal requires that the SVGAnimatedProperties are correctly reset if an animation element is removed from the document,
3959             we have to call targetElementWillChange(0) from here. That requires to move the "m_attributeName = anyQName()" line down,
3960             otherwise targetElementWillChange() would early exit, as no valid attributeName was specified.
3961             
3962             This is verified using the new svg/animations/remove-animation-element-while-animation-is-running.html
3963             and svg/repaint/repainting-after-animation-element-removal.svg tests.
3964
3965         (WebCore::SVGSMILElement::isSupportedAttribute): Add function like all SVG*Elements have identifying their supported attributes.
3966         (WebCore::SVGSMILElement::svgAttributeChanged):
3967             Implement svgAttributeChanged instead of attributeChanged. Only take action if the attribute is actually supported.
3968             If one of the common attributes like begin/end/etc. changed, be sure to call animationAttributeChanged() so that our
3969             ancestor-classes get notified about this and can take action as well. NOTE: This is not about animating begin/end attributes,
3970             but about pure DOM changes. begin/end/et.. are not exposed to the SVG DOM, we still reuse the svgAttributeChanged logic
3971             for consistency. (This does NOT make those attributes animatable, nothing this here as it came up while reviewing).
3972     
3973         (WebCore::SVGSMILElement::targetElement): Adapt logic to targetElementDidChange -> targetElementWillChange change.
3974         (WebCore::SVGSMILElement::targetElementWillChange):
3975             Renamed from targetElementDidChange. Added "oldTarget" as parameter as well. Our ancestor-classes like SVGAnimateElement
3976             use this to properly deregister the animVal in the old target, before resetting the SVGAnimatedType, otherwise we'd leave
3977             dangling pointers around (verified manually by guard malloc runs, that none of this happens).
3978
3979             Also add a default implementation here in targetElementWillChange, that ancestor classes have to call.
3980             Now we properly call endedActiveInterval() if the m_activeState is currently Active, so that animations are shut-down
3981             just like if the animation properly ends (use the same cleanup routines, etc.). Not doing that now leads to assertions.
3982
3983         (WebCore::SVGSMILElement::resetTargetElement):
3984             Instead of forcing m_activeState to be inactive, use the standard methods to end the animation.
3985             targetElementWillChange(m_targetElement, 0) and animationAttributeChanged().
3986
3987             resetTargetElement() is only called by SVGDocumentExtensions::removeAllAnimationElementsFromTarget() for following conditions:
3988             - targetElement gets destructed
3989             - targetElement gets removed from the document
3990             - targetElement id changes
3991
3992             If the targetElement gets destructed or removed, no actions need to be taken, as the SVGAnimatedPropertys are teared down
3993             as well. But if only the id changes, we still have to properly disconnect the animVals - this is all handled through
3994             targetElementWillChange now - that's why this has to be called from here as well.
3995             That explains why targetElementWillChange() now needs to check if the targetElement is destructing or not.
3996
3997         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
3998             Pass the AnimatedPropertyType from the SVGPropertyInfo to the SVGAnimatedProperties.
3999             Requires mechanic changes in all SVGAnimated* classes. We need acccess to the AnimatedPropertyType
4000             to verify the SVGAnimatedType objects, passed to animationStarted, match our type. This is to enforce
4001             strict type-checking, whenever SVGGenericAnimatedTypes are passed around.
4002
4003         (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
4004         (WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff):
4005         * svg/properties/SVGAnimatedListPropertyTearOff.h: Ditto.
4006         (WebCore::SVGAnimatedListPropertyTearOff::create):
4007         (WebCore::SVGAnimatedListPropertyTearOff::SVGAnimatedListPropertyTearOff):
4008         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: Ditto.
4009         (WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
4010         (WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
4011         * svg/properties/SVGAnimatedProperty.h: Store AnimatedPropertyType, add accessors.
4012         (WebCore::SVGAnimatedProperty::animatedPropertyType): Add accessor.
4013         (WebCore::SVGAnimatedProperty::animationValueChanged): New animVal related functions to be implemented in the animated tear offs.
4014         (WebCore::SVGAnimatedProperty::animationStarted): Ditto.
4015         (WebCore::SVGAnimatedProperty::animationEnded): Ditto.
4016         (WebCore::SVGAnimatedProperty::currentBaseValue):
4017             Generic accessor for the baseVal: returns a SVGGenericAnimatedType.
4018             It takes an AnimatedPropertyType as input, that's only needed to verify that the type we're returning matches
4019             the expectation of the caller. If not, return 0 to avoid any potential casting mistakes, which would lead to crashes.
4020