Not reviewed: never surround InspectorInstrumentation:: with ENABLED(INSPECTOR)
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-03  'Pavel Feldman'  <pfeldman@chromium.org>
2
3         Not reviewed: never surround InspectorInstrumentation:: with ENABLED(INSPECTOR)
4
5         * dom/ContainerNode.cpp:
6         (WebCore::ContainerNode::insertBefore):
7         (WebCore::ContainerNode::replaceChild):
8         (WebCore::ContainerNode::appendChild):
9         (WebCore::dispatchChildRemovalEvents):
10
11 2012-04-30  Pavel Feldman  <pfeldman@chromium.org>
12
13         Web Inspector: migrate breakpoint manager to live locations.
14         https://bugs.webkit.org/show_bug.cgi?id=85136
15
16         Reviewed by Yury Semikhatsky.
17
18         - Merges Breakpoint and UIBreakpoint to have single instance
19         - Extracts storage from the breakpoint manager
20         - Makes breakpoint manager use source mapping from the script, not the presentation model
21         - Removes breakpoints collection from the UISourceCode
22         Unfortunately, there are too many inter-dependencies that require that these changes are done simultaneously.
23
24         * inspector/front-end/BreakpointManager.js:
25         (WebInspector.BreakpointManager):
26         (WebInspector.BreakpointManager.prototype.setBreakpoint):
27         (WebInspector.BreakpointManager.prototype.breakpoint):
28         (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
29         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
30         (WebInspector.BreakpointManager.prototype.reset):
31         (WebInspector.BreakpointManager.prototype.debuggerReset):
32         (WebInspector.BreakpointManager.prototype._breakpointResolved):
33         (WebInspector.BreakpointManager.prototype._removeBreakpoint):
34         (WebInspector.BreakpointManager.prototype._uiLocationAdded):
35         (WebInspector.BreakpointManager.prototype._uiLocationRemoved):
36         (WebInspector.BreakpointManager.prototype.storage):
37         (WebInspector.BreakpointManager.Breakpoint):
38         (WebInspector.BreakpointManager.Breakpoint.prototype.primaryUILocation):
39         (WebInspector.BreakpointManager.Breakpoint.prototype._addResolvedLocation):
40         (WebInspector.BreakpointManager.Breakpoint.prototype.enabled):
41         (WebInspector.BreakpointManager.Breakpoint.prototype.setEnabled):
42         (WebInspector.BreakpointManager.Breakpoint.prototype.condition):
43         (WebInspector.BreakpointManager.Breakpoint.prototype.setCondition):
44         (WebInspector.BreakpointManager.Breakpoint.prototype._updateBreakpoint):
45         (WebInspector.BreakpointManager.Breakpoint.prototype.remove):
46         (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger.didSetBreakpoint):
47         (WebInspector.BreakpointManager.Breakpoint.prototype._setInDebugger):
48         (WebInspector.BreakpointManager.Breakpoint.prototype._removeFromDebugger):
49         (WebInspector.BreakpointManager.Breakpoint.prototype._resetLocations):
50         (WebInspector.BreakpointManager.Breakpoint.prototype._breakpointStorageId):
51         (WebInspector.BreakpointManager.Breakpoint.prototype._fakeBreakpointAtPrimaryLocation):
52         (WebInspector.BreakpointManager.Storage.get this):
53         (WebInspector.BreakpointManager.Storage):
54         (WebInspector.BreakpointManager.Storage.prototype.restoreBreakpoints):
55         (WebInspector.BreakpointManager.Storage.prototype._updateBreakpoint):
56         (WebInspector.BreakpointManager.Storage.prototype._removeBreakpoint):
57         (WebInspector.BreakpointManager.Storage.prototype._save):
58         (set WebInspector.BreakpointManager.Storage.Item):
59         * inspector/front-end/BreakpointsSidebarPane.js:
60         (WebInspector.JavaScriptBreakpointsSidebarPane):
61         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointAdded.didRequestContent):
62         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointAdded):
63         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointRemoved):
64         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.highlightBreakpoint):
65         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._createBreakpointItemId):
66         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointClicked):
67         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked):
68         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointContextMenu):
69         * inspector/front-end/DebuggerModel.js:
70         (WebInspector.DebuggerModel):
71         (WebInspector.DebuggerModel.prototype.breakpointsActive):
72         (WebInspector.DebuggerModel.prototype.createLiveLocation):
73         * inspector/front-end/DebuggerPresentationModel.js:
74         (WebInspector.DebuggerPresentationModel.prototype._handleUISourceCodeListChanged):
75         (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent):
76         * inspector/front-end/JavaScriptSource.js:
77         (WebInspector.JavaScriptSource):
78         (WebInspector.JavaScriptSource.prototype.consoleMessagesCleared):
79         * inspector/front-end/JavaScriptSourceFrame.js:
80         (WebInspector.JavaScriptSourceFrame):
81         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
82         (WebInspector.JavaScriptSourceFrame.prototype.editContent):
83         (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged):
84         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
85         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
86         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
87         (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
88         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
89         (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition.finishEditing):
90         (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition):
91         (WebInspector.JavaScriptSourceFrame.prototype._breakpointAdded):
92         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
93         (WebInspector.JavaScriptSourceFrame.prototype.onTextViewerContentLoaded):
94         (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint):
95         (WebInspector.JavaScriptSourceFrame.prototype._continueToLine):
96         (WebInspector.JavaScriptSourceFrame.prototype._updateBreakpointsAfterLiveEdit):
97         * inspector/front-end/Script.js:
98         (WebInspector.Script.prototype.rawLocationToUILocation):
99         * inspector/front-end/ScriptsPanel.js:
100         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
101         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
102         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetUILocation):
103         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
104         (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced):
105         * inspector/front-end/UISourceCode.js:
106         (WebInspector.UISourceCode.prototype.contentChanged):
107
108 2012-05-03  Andrey Kosyakov  <caseq@chromium.org>
109
110         Unreviewed attemp to fix chromium win build broken at r115943.
111
112         * notifications/NotificationClient.h:
113         (WebCore):
114
115 2012-05-03  Vivek Galatage  <vivekgalatage@gmail.com>
116
117         Linker warnings due to duplicate symbols for SimplifyMarkupCommand.cpp on Windows
118         https://bugs.webkit.org/show_bug.cgi?id=85467
119
120         Reviewed by Ryosuke Niwa.
121
122         Removed the multiple inclusion of the file SimplifyMarkupCommand.cpp 
123
124         No new tests required.
125
126         * WebCore.vcproj/WebCore.vcproj:
127
128 2012-05-03  Uday Kiran  <udaykiran@motorola.com>
129
130         CSS clip: auto clips to box borders instead of removing clipping
131         https://bugs.webkit.org/show_bug.cgi?id=36772
132
133         Reviewed by Andreas Kling.
134
135         According to CSS 2.1 spec, http://www.w3.org/TR/CSS2/visufx.html#propdef-clip,
136         clip property with value 'auto' the element does not clip.
137         Also getPropertyValue for clip when auto is specified should return "auto"
138         and not "rect(0px 0px 0px 0px)".
139
140         Tests: css2.1/20110323/clip-001-expected.html
141                css2.1/20110323/clip-001.html
142
143         * css/StyleBuilder.cpp:
144         (WebCore::ApplyPropertyClip::applyValue):
145
146 2012-05-02  Antti Koivisto  <antti@apple.com>
147
148         Add temporary feature define for parsed stylesheet caching
149         https://bugs.webkit.org/show_bug.cgi?id=85413
150
151         Rubber-stamped by Nikolas Zimmermann.
152
153         While not an externally visible feature this is still a significant internal change.
154         It is good to have define in case someone has an urgent need to turn it off.
155         
156         Caching is enabled by default on all platforms. The define should be removed after some bake time.
157
158         * html/HTMLLinkElement.cpp:
159         (WebCore::HTMLLinkElement::setCSSStyleSheet):
160
161 2012-05-03  Nikolas Zimmermann  <nzimmermann@rim.com>
162
163         Accumulation for values-animation is broken
164         https://bugs.webkit.org/show_bug.cgi?id=85158
165
166         Reviewed by Zoltan Herczeg.
167
168         Follow-up patch: Add const Foo& foo() const accessors to SVGAnimatedType,
169         to avoid the "Foo& foo = animated->foo()" idiom in all cases where we
170         don't need to mutate 'foo'. Use "const Foo& foo = animated->foo()" instead.
171         Inline all of these methods to avoid the function call overhead.
172
173         For to-animations we actually mutated the from value before, but it wasn't a
174         problem in practive, as we did that on every animation step. Fully avoid these
175         inconsitencies by never mutating the from/to types stored in SVGAnimateElement.
176
177         Cache toAtEndOfDurationType just like m_toType/m_fromType in SVGAnimateElement,
178         to avoid reconstructing it on every animation step.
179
180         No new tests, only design/performance fixes.
181
182         * svg/SVGAnimateElement.cpp:
183         (WebCore::SVGAnimateElement::calculateAnimatedValue):
184         (WebCore::SVGAnimateElement::calculateToAtEndOfDurationValue):
185         (WebCore::SVGAnimateElement::targetElementWillChange):
186         * svg/SVGAnimateElement.h:
187         (SVGAnimateElement):
188         * svg/SVGAnimateMotionElement.cpp:
189         (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
190         (WebCore::SVGAnimateMotionElement::calculateToAtEndOfDurationValue):
191         (WebCore::SVGAnimateMotionElement::calculateFromAndToValues):
192         (WebCore::SVGAnimateMotionElement::calculateFromAndByValues):
193         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
194         * svg/SVGAnimateMotionElement.h:
195         (SVGAnimateMotionElement):
196         * svg/SVGAnimatedAngle.cpp:
197         (WebCore::SVGAnimatedAngleAnimator::addAnimatedTypes):
198         (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
199         * svg/SVGAnimatedBoolean.cpp:
200         (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
201         * svg/SVGAnimatedColor.cpp:
202         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
203         * svg/SVGAnimatedEnumeration.cpp:
204         (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue):
205         * svg/SVGAnimatedInteger.cpp:
206         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
207         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
208         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::addAnimatedTypes):
209         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
210         * svg/SVGAnimatedLength.cpp:
211         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
212         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
213         * svg/SVGAnimatedLengthList.cpp:
214         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
215         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
216         * svg/SVGAnimatedNumber.cpp:
217         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue):
218         * svg/SVGAnimatedNumberList.cpp:
219         (WebCore::SVGAnimatedNumberListAnimator::addAnimatedTypes):
220         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
221         * svg/SVGAnimatedNumberOptionalNumber.cpp:
222         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::addAnimatedTypes):
223         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
224         * svg/SVGAnimatedPath.cpp:
225         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
226         * svg/SVGAnimatedPointList.cpp:
227         (WebCore::SVGAnimatedPointListAnimator::addAnimatedTypes):
228         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
229         * svg/SVGAnimatedPreserveAspectRatio.cpp:
230         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
231         * svg/SVGAnimatedRect.cpp:
232         (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue):
233         * svg/SVGAnimatedString.cpp:
234         (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue):
235         * svg/SVGAnimatedTransformList.cpp:
236         (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes):
237         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
238         * svg/SVGAnimatedType.cpp:
239         * svg/SVGAnimatedType.h:
240         (WebCore::SVGAnimatedType::angleAndEnumeration):
241         (SVGAnimatedType):
242         (WebCore::SVGAnimatedType::boolean):
243         (WebCore::SVGAnimatedType::color):
244         (WebCore::SVGAnimatedType::enumeration):
245         (WebCore::SVGAnimatedType::integer):
246         (WebCore::SVGAnimatedType::integerOptionalInteger):
247         (WebCore::SVGAnimatedType::length):
248         (WebCore::SVGAnimatedType::lengthList):
249         (WebCore::SVGAnimatedType::number):
250         (WebCore::SVGAnimatedType::numberList):
251         (WebCore::SVGAnimatedType::numberOptionalNumber):
252         (WebCore::SVGAnimatedType::path):
253         (WebCore::SVGAnimatedType::pointList):
254         (WebCore::SVGAnimatedType::preserveAspectRatio):
255         (WebCore::SVGAnimatedType::rect):
256         (WebCore::SVGAnimatedType::string):
257         (WebCore::SVGAnimatedType::transformList):
258         * svg/SVGAnimationElement.cpp:
259         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
260         (WebCore::SVGAnimationElement::startedActiveInterval):
261         (WebCore::SVGAnimationElement::updateAnimation):
262         * svg/SVGAnimationElement.h:
263         (WebCore::SVGAnimationElement::adjustFromToListValues):
264         (WebCore::SVGAnimationElement::animateDiscreteType):
265         (SVGAnimationElement):
266
267 2012-05-02  Alexander Færøy  <ahf@0x90.dk>
268
269         Rename deviceDPI to devicePixelRatio
270         https://bugs.webkit.org/show_bug.cgi?id=85049
271
272         Reviewed by Kenneth Rohde Christiansen.
273
274         No new tests added since this is a minor refactoring with no changes
275         that should affect tests.
276
277         * page/Settings.cpp:
278         (WebCore::Settings::Settings):
279         * page/Settings.h:
280         (WebCore::Settings::setDevicePixelRatio):
281         (WebCore::Settings::devicePixelRatio):
282         (Settings):
283
284 2012-05-03  Nikolas Zimmermann  <nzimmermann@rim.com>
285
286         Fix multiple begin values support - especially with seeking through setCurrentTime
287         https://bugs.webkit.org/show_bug.cgi?id=85372
288
289         Reviewed by Zoltan Herczeg.
290
291         Multiple begin values aka. begin="0s; 2s" aren't correctly handled - resulting in broken & unexpected behavior.
292         Supporting seeking properly on documents containing such animations is very important, otherwise we can't reliable
293         test animations using either reftests or the SVG JS animation test framework.
294
295         Testcase:
296         <rect height="100" fill="green">
297             <animate attributeName="width" begin="0s; 2s" dur="8s" from="0" to="100" fill="freeze"/>
298         </rect>
299
300         What's expected?
301         Two times should be contained in the 'begin' times list in SVGSMILElement: m_beginTimes = { 0s, 2s }.
302         The initial first resolved interval is: m_intervalBegin=0.0s, m_intervalEnd=8.0s.
303
304         During t=0s..1.9999s the m_intervalBegin/m_intervalEnd are correct.
305         At t=2s, a new interval can be started. m_intervalEnd should be set to nextBeginTime, where nextBeginTime=2s.
306         The current interval should get cropped to: m_intervalBegin=0s, m_intervalEnd=2s. The following call to
307         resolveNextInterval() sees that elapsed >= m_intervalEnd, and thus moves on to the next interval.
308         m_intervalBegin should be 2s and m_intervalEnd=10s after that.
309
310         In trunk this behavior is only partly implemented and broken. Especially broken together with seeking via SVGSVGElement.setCurrentTime.
311         That's because we don't correctly seek to the right interval in case of multiple begin values, eg. if we sample an animation with
312         begin="0s; 3s" dur="6s" we always remain in the first interval and don't move on.
313
314         Fix all of these issues, making lots more tests work in Dr. Olaf Hofmanns SVG Animation test suite.
315
316         Tests: svg/animations/multiple-begin-additive-animation.html
317                svg/animations/multiple-begin-animation-discrete-expected.svg
318                svg/animations/multiple-begin-animation-discrete.svg
319                svg/animations/multiple-begin-animation-expected.svg
320                svg/animations/multiple-begin-animation.svg
321
322         * svg/animation/SMILTimeContainer.cpp:
323         (WebCore::SMILTimeContainer::begin):
324         (WebCore::SMILTimeContainer::setElapsed):
325         (WebCore::SMILTimeContainer::updateAnimations):
326         * svg/animation/SMILTimeContainer.h:
327         (SMILTimeContainer):
328         * svg/animation/SVGSMILElement.cpp:
329         (WebCore::SVGSMILElement::findInstanceTime):
330         (WebCore::SVGSMILElement::resolveInterval):
331         (WebCore::SVGSMILElement::resolveNextInterval):
332         (WebCore):
333         (WebCore::SVGSMILElement::checkRestart):
334         (WebCore::SVGSMILElement::seekToIntervalCorrespondingToTime):
335         (WebCore::SVGSMILElement::progress):
336         * svg/animation/SVGSMILElement.h:
337         (SVGSMILElement):
338
339 2012-05-03  Dana Jansens  <danakj@chromium.org>
340
341         [chromium] Don't add small opaque areas to the occlusion tracker's Region
342         https://bugs.webkit.org/show_bug.cgi?id=85297
343
344         Reviewed by Adrienne Walker.
345
346         Don't add small opaque areas (smaller than 160x160) to the occlusion
347         tracker's Region objects to avoid high Region::unite() costs.
348
349         We would like Region to just be fast enough that this isn't a concern,
350         and there are patches in flight to do this, but at the moment, small
351         opaque areas add significant cost if there is many of them, for
352         potentially small gains since they do not cover entire tiles.
353
354         Comments in http://code.google.com/p/chromium/issues/detail?id=124687
355         motivate this approach for now, and point to around 160x160 being
356         a reasonable threshold.
357
358         Removes the opaque paint tracking flag while we're here. The flag is
359         no longer used, and was broken when we moved the "paint vs opaque
360         flag" distinction out to the layers.
361
362         Unit test: CCOcclusionTrackerTestMinimumTrackingSize
363
364         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
365         (WebCore::CCLayerTreeHost::paintLayerContents):
366         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
367         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
368         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
369         (WebCore::::CCOcclusionTrackerBase):
370         (WebCore::addOcclusionBehindLayer):
371         (WebCore::::markOccludedBehindLayer):
372         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
373         (WebCore::CCOcclusionTrackerBase::setMinimumTrackingSize):
374         (CCOcclusionTrackerBase):
375         (WebCore::CCOcclusionTrackerBase::preferredMinimumTrackingSize):
376
377 2012-05-02  Jon Lee  <jonlee@apple.com>
378
379         Migrate permission functions to Notification from NotificationCenter
380         https://bugs.webkit.org/show_bug.cgi?id=80485
381         <rdar://problem/10965458>
382
383         Reviewed by Jian Li.
384
385         * notifications/Notification.idl: Add permission functions.
386         * notifications/DOMWindowNotifications.idl: Wrap webkitNotifications as part of legacy API.
387
388         * notifications/Notification.cpp: New permission functions are wrapped with ENABLE(NOTIFICATIONS)
389         (WebCore::Notification::taskTimerFired): Use the new permission functions to determine whether we can show the
390         notification.
391         (WebCore::Notification::permissionLevel):
392         (WebCore::Notification::permissionString): Declare three static locals for each of the values, and return
393         based on the permission enum.
394         (WebCore::Notification::requestPermission): Forward request to client.
395         * notifications/Notification.h:
396
397         * notifications/NotificationPermissionCallback.h: Added.
398         (NotificationPermissionCallback):
399         (WebCore::NotificationPermissionCallback::~NotificationPermissionCallback):
400         * notifications/NotificationPermissionCallback.idl: Added.
401
402         * notifications/NotificationCenter.cpp: Wrap permission functions in ENABLE(LEGACY_NOTIFICATIONS)
403         * notifications/NotificationCenter.h: Wrap permission functions in ENABLE(LEGACY_NOTIFICATIONS)
404         * notifications/NotificationCenter.idl: Refactor conditionals to make the center available only when
405         ENABLE(LEGACY_NOTIFICATIONS) is on.
406         * notifications/NotificationPresenter.h:
407         (WebCore::NotificationPresenter::requestPermission): Add new requestPermission() function for new
408         NotificationPermissionCallback type. Make it a stub implementation until all ports have adopted.
409
410         * notifications/NotificationClient.h: Add another requestPermission() client call, wrapped in
411         ENABLE(NOTIFICATIONS) that accepts the NotificationPermissionCallback. Wrap the original one in
412         ENABLE(LEGACY_NOTIFICATIONS).
413
414         * bindings/js/JSDesktopNotificationsCustom.cpp: Change to include the implementation only in
415         ENABLE(LEGACY_NOTIFICATIONS).
416         * bindings/js/JSNotificationsCustom.cpp: Custom implementation of requestPermission().
417         * bindings/v8/custom/V8NotificationCustom.cpp: Custom implementation of requestPermission().
418
419         * notifications/WorkerContextNotifications.idl: Make webktNotifications available only in legacy API.
420         * CMakeLists.txt: Add new callback idl.
421         * DerivedSources.make: Add new callback idl.
422         * DerivedSources.pri: Add new callback idl.
423         * GNUmakefile.list.am: Add NotificationPermissionCallback files.
424         * Target.pri: Include JSNotificationCustom.cpp, V8NotificationCustom.cpp
425         * UseJSC.cmake: Include JSNotificationCustom.cpp
426         * UseV8.cmake: Include V8NotificationCustom.cpp
427         * WebCore.gypi: Include JSNotificationCustom.cpp, V8NotificationCustom.cpp, JSNotificationPermissionCallback.{h,cpp}
428         * WebCore.vcproj/WebCore.vcproj: Include JSNotificationCustom.cpp, JSNotificationPermissionCallback.{h,cpp}
429         * WebCore.exp.in: Export permissionString().
430         * WebCore.xcodeproj/project.pbxproj: Add callback idl, h, and cpp files.
431
432 2012-05-02  Sheriff Bot  <webkit.review.bot@gmail.com>
433
434         Unreviewed, rolling out r115907.
435         http://trac.webkit.org/changeset/115907
436         https://bugs.webkit.org/show_bug.cgi?id=85458
437
438         It broke all viewport tests on Qt and on GTK (Requested by
439         Ossy on #webkit).
440
441         * dom/ViewportArguments.cpp:
442         (WebCore::computeViewportAttributes):
443         * dom/ViewportArguments.h:
444         (ViewportAttributes):
445
446 2012-05-02  Gustavo Noronha Silva  <gns@gnome.org>
447
448         [GTK] Finish moving modules into libWebCoreModules.la
449         https://bugs.webkit.org/show_bug.cgi?id=85449
450
451         Unreviewed build fix.
452
453         * GNUmakefile.list.am: move remaining modules source files into the
454         libWebCoreModules library, this should fix the problems people had
455         building the 1.9.1 tarball with unpatched make.
456
457 2012-05-02  Dongwoo Im  <dw.im@samsung.com>
458
459         [EFL] Unreviewed, Fix build break when WEB_AUDIO is enabled.
460         https://bugs.webkit.org/show_bug.cgi?id=85443
461
462         Unreviewed build fix.
463
464         Three new files were added in the Modules/webaudio directory.
465         These files should be included into the CMakeLists.txt file.
466
467         * CMakeLists.txt: Add the newly created files into the CMakeLists.txt
468
469 2012-05-02  Eric Seidel  <eric@webkit.org>
470
471         Sort ENABLE_ defines in FeatureDefines.xcconfig files to make them easier to compare with one another (and easier to autogenerate)
472         https://bugs.webkit.org/show_bug.cgi?id=85433
473
474         Reviewed by Adam Barth.
475
476         I have a script which can autogenerate these xcconfig files as well as the
477         vsprops files (and soon the Chromium, cmake, gnumake and qmake) feature lists
478         from a central feature list file.
479         In preparation for posting such a tool, I'm re-sorting these xcconfig files to be
480         alphabetically ordered (currently they're close, but not quite).
481         There is also at least one inconsistency between these files (CSS_LEGACY_PREFIXES) which
482         I will fix in a second pass.  I will also sort the FEATURE_DEFINES = line in a follow-up patch.
483
484         * Configurations/FeatureDefines.xcconfig:
485
486 2012-05-02  Dana Jansens  <danakj@chromium.org>
487
488         [chromium] Don't occlude pixels in a surface that are needed for a background filter blur
489         https://bugs.webkit.org/show_bug.cgi?id=84317
490
491         Reviewed by Adrienne Walker.
492
493         Blur filters move pixels around, so a pixel can influence the value of
494         pixels at some distance away. If a pixel is not occluded, then all
495         pixels within the radius of the blur may influence the value of that
496         pixel, so they should also stay unoccluded.
497
498         For background filters, the pixels are read from the filter's target
499         surface, so we remove occlusion from that target surface from pixels
500         that will blur into visible pixels.
501
502         Unit test: CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilter
503                    CCOcclusionTrackerTestTwoBackgroundFiltersReduceOcclusionTwice
504                    CCOcclusionTrackerTestDontOccludePixelsNeededForBackgroundFilterWithClip
505                    CCOcclusionTrackerTestDontReduceOcclusionBelowBackgroundFilter
506                    CCOcclusionTrackerTestDontReduceOcclusionIfBackgroundFilterIsOccluded
507                    CCOcclusionTrackerTestReduceOcclusionWhenBackgroundFilterIsPartiallyOccluded
508
509         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
510         (WebCore::reduceOcclusion):
511         (WebCore):
512         (WebCore::reduceOcclusionBelowSurface):
513         (WebCore::::leaveToTargetRenderSurface):
514         (WebCore::::unoccludedContributingSurfaceContentRect):
515         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
516         (CCOcclusionTrackerBase):
517         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
518         (WebCore::CCQuadCuller::appendSurface):
519         (WebCore::CCQuadCuller::appendReplica):
520
521 2012-05-02  Levi Weintraub  <leviw@chromium.org>
522
523         Convert FractionalLayoutUnit overflow assertions to stderr warnings
524         https://bugs.webkit.org/show_bug.cgi?id=85393
525
526         Reviewed by Eric Seidel.
527
528         Writing warnings to stderr when FractionalLayoutUnits overflow on debug builds instead of asserting
529         and crashing. It can be very useful to WebKit developers know when overflow is occurring, but it's
530         not always a programming error, so assert wasn't the right action.
531
532         No new tests. No change in behavior.
533
534         * platform/FractionalLayoutUnit.h:
535         (WebCore):
536         (WebCore::FractionalLayoutUnit::FractionalLayoutUnit):
537         (WebCore::FractionalLayoutUnit::toUnsigned):
538         (WebCore::FractionalLayoutUnit::setRawValue):
539
540 2012-04-18  Jon Honeycutt  <jhoneycutt@apple.com>
541
542         FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more
543         information about the form being submitted
544         https://bugs.webkit.org/show_bug.cgi?id=84297
545
546         Reviewed by Andy Estes.
547
548         * html/HTMLFormElement.cpp:
549         (WebCore::HTMLFormElement::prepareForSubmission):
550         Get the form field names and values, and use them to create a FormState
551         object. Pass this object when calling dispatchWillSendSubmitEvent().
552         (WebCore::HTMLFormElement::getTextFieldValues):
553         Loop over the associated elements, looking for <input> elements.
554         Collect their names and values.
555
556         * html/HTMLFormElement.h:
557         Declare getTextFieldData().
558
559         * loader/EmptyClients.h:
560         (WebCore::EmptyFrameLoaderClient::dispatchWillSendSubmitEvent):
561         Updated declaration for new parameter type.
562
563         * loader/FrameLoaderClient.h:
564         Updated declaration of dispatchWillSendSubmitEvent() for new param
565         type.
566
567 2012-04-13  Jon Honeycutt  <jhoneycutt@apple.com>
568
569         Make Page::setDefersLoading() have a call count so that each time
570         loading is deferred, it must be balanced with a call to resume.
571         https://bugs.webkit.org/show_bug.cgi?id=84522
572
573         Reviewed by Andy Estes.
574
575         * page/Page.cpp:
576         (WebCore::Page::Page):
577         Initialize new call count member.
578         (WebCore::Page::setDefersLoading):
579         Check whether the callers wants balanced defer/resume loading behavior.
580         If the call count is not changing from 0 to 1 or 1 to 0, return early.
581         Otherwise, defer or resume loading for frames in this page.
582
583         * page/Page.h:
584         (WebCore::Page::defersLoading):
585         Added a member to hold the call count.
586
587         * page/Settings.cpp:
588         (WebCore::Settings::Settings):
589         Initialized new member m_wantsBalancedSetDefersLoadingBehavior.
590
591         * page/Settings.h:
592         (Settings):
593         Added new member m_wantsBalancedSetDefersLoadingBehavior.
594         (WebCore::Settings::setWantsBalancedSetDefersLoadingBehavior):
595         Setter.
596         (WebCore::Settings::wantsBalancedSetDefersLoadingBehavior):
597         Getter.
598
599 2012-05-02  Ojan Vafai  <ojan@chromium.org>
600
601         Add a histogram for rendertree size
602         https://bugs.webkit.org/show_bug.cgi?id=85226
603
604         Reviewed by Eric Seidel.
605
606         We record it when the page gets hidden, since this is a point
607         at which, in theory, we could kill the rendertree.
608
609         No new tests. This isn't web visible, so there's no way to test it.
610
611         * loader/FrameLoader.cpp:
612         (WebCore::FrameLoader::clear):
613         * page/Page.cpp:
614         (WebCore::Page::renderTreeSize):
615         (WebCore):
616         (WebCore::Page::setVisibilityState):
617         * page/Page.h:
618         (Page):
619         * platform/HistogramSupport.cpp:
620         (WebCore::HistogramSupport::histogramCustomCounts):
621         (WebCore):
622         * platform/HistogramSupport.h:
623         (HistogramSupport):
624         * platform/chromium/HistogramSupportChromium.cpp:
625         (WebCore::HistogramSupport::histogramCustomCounts):
626         (WebCore):
627
628 2012-05-02  Sheriff Bot  <webkit.review.bot@gmail.com>
629
630         Unreviewed, rolling out r115902.
631         http://trac.webkit.org/changeset/115902
632         https://bugs.webkit.org/show_bug.cgi?id=85441
633
634         Compile failure on linux 32 (Requested by zhenyao on #webkit).
635
636         * Modules/indexeddb/IDBBackingStore.h:
637         (IDBBackingStore):
638         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
639         (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
640         * Modules/indexeddb/IDBLevelDBBackingStore.h:
641         (IDBLevelDBBackingStore):
642         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
643         (WebCore::IDBObjectStoreBackendImpl::putInternal):
644         (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
645         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
646         (IDBObjectStoreBackendImpl):
647
648 2012-05-02  Julien Chaffraix  <jchaffraix@webkit.org>
649
650         Add ASSERTs to avoid querying dirtied z-index or normal flow lists on RenderLayer
651         https://bugs.webkit.org/show_bug.cgi?id=84920
652
653         Reviewed by Simon Fraser.
654
655         Covered by existing tests in Debug (at least several time!).
656
657         This change adds some ASSERTs on RenderLayer that prevent any use of its lists if they
658         are dirtied.
659
660         On top of this change, we added an invariant that non-stacking contexts should have their
661         z-index lists NULL (instead of empty or NULL previously). This is enforced at
662         updateZOrderLists time as we now ensure that it is called in a timely manner.
663
664         * rendering/RenderLayer.cpp:
665         (WebCore::RenderLayer::calculateLayerBounds):
666         Added call to updateLayersIfNeeded as we will query them later and there is no guarantee
667         that they are not dirty (we recurse in our children as part of calculateLayerBounds).
668         This was causing the new ASSERTs to trigger on css3/filter/ tests.
669
670         (WebCore::RenderLayer::dirtyZOrderLists):
671         Added a comment as to why we can't ASSERT that we are in a stacking context here.
672
673         (WebCore::RenderLayer::rebuildZOrderLists):
674         Added an ASSERT that we only rebuild z-index lists for dirtied stacking context.
675
676         (WebCore::RenderLayer::updateLayerListsIfNeeded):
677         Updated to ensure that the reflection layer has its layers updated too. This was triggering
678         the new ASSERTs on fast/runins/run-in-layer-not-removed-crash.html.
679
680         (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded):
681         Updated to use the new isDirtyStackingContext function.
682
683         * rendering/RenderLayer.h:
684         (WebCore::RenderLayer::isDirtyStackingContext):
685         New helper function. Also made updateLayerListsIfNeeded() the only way
686         to update layer. That should prevent any misuse.
687
688         (WebCore::RenderLayer::posZOrderList):
689         (WebCore::RenderLayer::negZOrderList):
690         (WebCore::RenderLayer::normalFlowList):
691         ASSERT that we don't query any of the previous lists if they are dirty. Also
692         enforce the invariant that non-stacking contexts should have NULL z-index lists.
693
694         (WebCore::RenderLayer::clearZOrderLists):
695         New function to clearZOrderLists so that we can enfore the previous invariant.
696
697         (WebCore::RenderLayer::updateZOrderLists):
698         Updated to clear the dirty flag and the z-index lists for non-stacking context.
699
700         * rendering/RenderLayerCompositor.cpp:
701         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
702         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
703         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
704         Removed the explicit ASSERTs.
705
706         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
707         (WebCore::RenderLayerCompositor::canBeComposited):
708         Disabled compositing on RenderLayer in flow thread. Because flow thread's
709         RenderLayer are not collected as part of RenderLayer's lists and could be composited,
710         this was causing the new ASSERTs to trigger (e.g. on fast/regions/webkit-flow-renderer-layer.html).
711
712         * rendering/RenderTreeAsText.cpp:
713         (WebCore::writeLayers):
714         Updated to use updateLayerListsIfNeeded().
715
716 2012-05-02  Levi Weintraub  <leviw@chromium.org>
717
718         Remove unused adjustForAbsoluteZoom method in RenderObject.h
719         https://bugs.webkit.org/show_bug.cgi?id=85396
720
721         Reviewed by Eric Seidel.
722
723         We only want to use the integer adjustForAbsoluteZoom method, so this remnant is both unused
724         and potentially confusing.
725
726         No new tests. Removing unused code.
727
728         * rendering/RenderObject.h:
729         (WebCore):
730
731 2012-05-02  Fady Samuel  <fsamuel@chromium.org>
732
733         Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport
734         https://bugs.webkit.org/show_bug.cgi?id=70609
735
736         Reviewed by Kenneth Rohde Christiansen.
737
738         Make ViewportAttributes' layoutSize be a FloatRect to avoid rounding
739         too early, and the occasional off by one fixed layout dimensions.
740
741         * dom/ViewportArguments.cpp:
742         (WebCore::computeViewportAttributes):
743         * dom/ViewportArguments.h:
744         (ViewportAttributes):
745
746 2012-05-02  Joshua Bell  <jsbell@chromium.org>
747
748         IndexedDB: Handle generated keys up to 2^53
749         https://bugs.webkit.org/show_bug.cgi?id=85114
750
751         The spec defines the behavior for generated keys up to 2^53
752         (the maximum integer storable as an ECMAScript number) and
753         the error case when going beyond that. Ensure that we can
754         handle values up to that point and generate errors beyond.
755
756         Reviewed by Tony Chang.
757
758         Test: storage/indexeddb/key-generator.html
759
760         * Modules/indexeddb/IDBBackingStore.h:
761         (IDBBackingStore):
762         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
763         (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
764         * Modules/indexeddb/IDBLevelDBBackingStore.h:
765         (IDBLevelDBBackingStore):
766         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
767         (WebCore::IDBObjectStoreBackendImpl::putInternal):
768         (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
769         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
770         (IDBObjectStoreBackendImpl):
771
772 2012-05-02  Adam Klein  <adamk@chromium.org>
773
774         Childlist mutations in shadow DOM should be observable with MutationObservers
775         https://bugs.webkit.org/show_bug.cgi?id=85402
776
777         Reviewed by Ojan Vafai.
778
779         Though Mutation Events are not supported in Shadow DOM,
780         MutationObservers are supposed to be. Due to a misplacement of the
781         ChildListMutationScope, they were erroneously getting skipped.
782
783         This patch moves code around to properly notify when childlist are
784         mutated in shadow DOM and covers that change with a new test.
785
786         Test: fast/mutation/shadow-dom.html
787
788         * dom/ContainerNode.cpp:
789         (WebCore::willRemoveChild): Handle notification of removal directly.
790         (WebCore::willRemoveChildren): ditto.
791         (WebCore::dispatchChildInsertionEvents): Remove notification of insertion.
792         (WebCore::dispatchChildRemovalEvents): Remove notification of removal.
793         (WebCore::updateTreeAfterInsertion): Handle notification of insertion directly.
794
795 2012-05-02  Eric Carlson  <eric.carlson@apple.com>
796
797         Crash in WebCore::TextTrackList::remove
798         https://bugs.webkit.org/show_bug.cgi?id=85095
799
800         Reviewed by Maciej Stachowiak.
801
802         Test: media/track/track-remove-quickly.html
803
804         * html/HTMLMediaElement.cpp:
805         (WebCore::HTMLMediaElement::willRemoveTrack): Return immediately if the tracks collection
806             has not been allocated yet.
807
808 2012-05-02  David Barton  <dbarton@mathscribe.com>
809
810         After appending MathML with jquery the table renders with overlaps
811         https://bugs.webkit.org/show_bug.cgi?id=52444
812
813         Reviewed by Julien Chaffraix.
814
815         This patch also fixes bugs 72834 and 47781. The main problem is that correct preferred
816         logical widths are affected by operator stretching. Thus we add a call to
817         setNeedsLayoutAndPrefWidthsRecalc() after the stretching code in
818         RenderMathMLOperator.cpp, and change RenderMathMLBlock and RenderMathMLRow to make sure
819         that stretching of children is done before an <mrow>'s preferred logical widths are
820         computed.
821         
822         Test: Added a test to mathml/presentation/mo-stretch.html
823
824         * rendering/mathml/RenderMathMLBlock.cpp:
825         (WebCore::RenderMathMLBlock::RenderMathMLBlock):
826         (WebCore::RenderMathMLBlock::computePreferredLogicalWidths):
827         (WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights):
828         (WebCore::RenderMathMLBlock::preferredLogicalHeightAfterSizing):
829         * rendering/mathml/RenderMathMLBlock.h:
830         (WebCore::RenderMathMLBlock::unembellishedOperator):
831         (WebCore::RenderMathMLBlock::isPreferredLogicalHeightDirty):
832         (WebCore::RenderMathMLBlock::preferredLogicalHeight):
833         (WebCore::RenderMathMLBlock::setPreferredLogicalHeight):
834             - Add m_preferredLogicalHeight and methods to compute and return it.
835             - Remove stretchToHeight() from most classes as it no longer needs to be done
836               recursively. We just call it on the base of an embellished operator, and that
837               calls setNeedsLayoutAndPrefWidthsRecalc() to mark itself and its container
838               chain.
839         
840         * rendering/mathml/RenderMathMLOperator.cpp:
841         (WebCore::RenderMathMLOperator::stretchToHeight):
842             - Don't compare an unexpanded height to an expanded one.
843         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
844         (WebCore::RenderMathMLOperator::updateFromElement):
845             - After stretching, call setNeedsLayoutAndPrefWidthsRecalc().
846         * rendering/mathml/RenderMathMLOperator.h:
847         (RenderMathMLOperator):
848         
849         * rendering/mathml/RenderMathMLRow.cpp:
850         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
851         (WebCore::RenderMathMLRow::layout):
852         * rendering/mathml/RenderMathMLRow.h:
853         (RenderMathMLRow):
854             - Add computePreferredLogicalWidths(), using computeChildrenPreferredLogicalHeights()
855               to compute our children's preferred logical heights if necessary, followed by
856               operator stretching.
857         
858         * rendering/mathml/RenderMathMLSubSup.cpp:
859         * rendering/mathml/RenderMathMLSubSup.h:
860         (RenderMathMLSubSup):
861         * rendering/mathml/RenderMathMLUnderOver.cpp:
862         * rendering/mathml/RenderMathMLUnderOver.h:
863         (RenderMathMLUnderOver):
864
865 2012-05-02  Dana Jansens  <danakj@chromium.org>
866
867         [chromium] Avoid extra Region copies in CCOcclusionTracker
868         https://bugs.webkit.org/show_bug.cgi?id=85257
869
870         Reviewed by Adrienne Walker.
871
872         Instead of making a Region for each layer and then uniting the region
873         with the current occlusion, directly add the rects for the given layer
874         to the current occlusion.
875
876         When subtracting a region from a rect, just subtract the region
877         directly instead of computing the intersecting region.
878
879         Covered by existing tests.
880
881         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
882         (WebCore::addOcclusionBehindLayer):
883         (WebCore::::markOccludedBehindLayer):
884         (WebCore::rectSubtractRegion):
885
886 2012-05-02  Keith Rosenblatt  <keith.rosenblatt@nokia.com>
887
888         [Qt] ASSERT in FontCustomPlatformDataQt.cpp with invalid font in data URI
889         https://bugs.webkit.org/show_bug.cgi?id=85089
890
891         Reviewed by Simon Hausmann.
892
893         Do not return data referencing an invalid QRawFont from createFontCustomPlatformData().  Instead
894         return null.
895
896         Test: fast/css/font-face-data-uri-invalid.html
897
898         * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
899         (WebCore::createFontCustomPlatformData):
900
901 2012-05-02  Michal Mocny  <mmocny@google.com>
902
903         [chromium] Set contents texture manager preferred memory limit based on GpuMemoryManager suggestion.
904         https://bugs.webkit.org/show_bug.cgi?id=84270
905
906         Reviewed by Kenneth Russell.
907
908         Updates the content texture manager memory limits based on GpuMemoryManager memory allocation suggestions.
909
910         The memory allocation size (in bytes) is fed from LayerRendererChromium memory allocation changed callback
911         handler to CCLayerTreeHost.  At that point we adjust the limits, using the existing notions of preferred and
912         max limits.
913
914         On android, the preferred limit is half the maximum (as it has always been), but on all other platforms the
915         preferred limit is now equal to max, in order to allow more agressive prepainting.
916
917         Finally, android has memory constraints dependant on viewportSize, but that logic has been pushed into
918         the GpuMemoryManager.
919
920         * platform/graphics/chromium/LayerRendererChromium.cpp:
921         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChanged):
922         (WebCore::LayerRendererChromium::beginDrawingFrame):
923         * platform/graphics/chromium/LayerRendererChromium.h:
924         (LayerRendererChromiumClient):
925         * platform/graphics/chromium/TextureManager.cpp:
926         (WebCore::TextureManager::setMemoryAllocationLimitBytes):
927         (WebCore):
928         * platform/graphics/chromium/TextureManager.h:
929         (TextureManager):
930         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
931         (WebCore::CCLayerTreeHost::setViewportSize):
932         (WebCore::CCLayerTreeHost::setContentsMemoryAllocationLimitBytes):
933         (WebCore):
934         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
935         (CCLayerTreeHost):
936         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
937         (WebCore::CCLayerTreeHostImpl::setContentsMemoryAllocationLimitBytes):
938         (WebCore):
939         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
940         (CCLayerTreeHostImplClient):
941         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
942         (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
943         (WebCore):
944         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
945         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
946         (WebCore::CCThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
947         (WebCore):
948         (WebCore::CCThreadProxy::setContentsMemoryAllocationLimitBytes):
949         * platform/graphics/chromium/cc/CCThreadProxy.h:
950         (CCThreadProxy):
951
952 2012-05-02  Emil A Eklund  <eae@chromium.org>
953
954         Fix usage of layout types in platform code
955         https://bugs.webkit.org/show_bug.cgi?id=85392
956
957         Reviewed by Eric Seidel.
958
959         No new tests, no change in functionality.
960
961         * page/EventHandler.cpp:
962         (WebCore::EventHandler::handleGestureTap):
963         Use rounded point for gestures as event handling is still mostly int based.
964
965 2012-05-02  Kenneth Russell  <kbr@google.com>
966
967         Don't allocate stencil buffer if stencil flag is false in context creation attributes
968         https://bugs.webkit.org/show_bug.cgi?id=85317
969
970         Reviewed by Dimitri Glazkov.
971
972         Make it appear to WebGL application that there is no stencil
973         buffer even if the underlying GraphicsContext3D allocated one.
974         Verified intended behavior with test case from Mozilla's bug report.
975
976         Updated context-attributes-alpha-depth-stencil-antialias.html test
977         from Khronos repository. Ran WebGL layout tests on Linux in
978         Chrome's DRT and on Mac OS in Safari's.
979
980         * html/canvas/WebGLFramebuffer.cpp:
981         (WebCore::WebGLFramebuffer::hasStencilBuffer): Added query method.
982         (WebCore): Changed desired semantics of isValidRenderbuffer.
983         * html/canvas/WebGLFramebuffer.h:
984         (WebGLFramebuffer): Added hasStencilBuffer.
985         * html/canvas/WebGLRenderingContext.cpp:
986         (WebCore):
987         (WebCore::WebGLRenderingContext::initializeNewContext):
988             Clear new flag.
989         (WebCore::WebGLRenderingContext::bindFramebuffer):
990             Reset stencil test upon framebuffer change.
991         (WebCore::WebGLRenderingContext::disable):
992             Cache flag; reset stencil test.
993         (WebCore::WebGLRenderingContext::enable):
994             Cache flag; reset stencil test.
995         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
996             Reset stencil test upon renderbuffer change.
997         (WebCore::WebGLRenderingContext::getContextAttributes):
998             Force depth and stencil to false if false was requested.
999         (WebCore::WebGLRenderingContext::isEnabled):
1000             Return cached flag.
1001         (WebCore::WebGLRenderingContext::renderbufferStorage):
1002             Reset stencil test upon renderbuffer reallocation.
1003         (WebCore::WebGLRenderingContext::applyStencilTest):
1004             Enable or disable stencil test based on request and availability.
1005         (WebCore::WebGLRenderingContext::enableOrDisable):
1006             Helper function.
1007         * html/canvas/WebGLRenderingContext.h:
1008         (WebGLRenderingContext):
1009             Added cache of STENCIL_TEST flag. Deleted unused m_stencilBits.
1010
1011 2012-05-02  Ryosuke Niwa  <rniwa@webkit.org>
1012
1013         Drag and drop text into table is pasting the text in the next <td> element
1014         https://bugs.webkit.org/show_bug.cgi?id=75004
1015
1016         Reviewed by Darin Adler.
1017
1018         The bug was caused by ReplaceSelectionCommand adjusting the insertion position to be before
1019         of the block element containing the insertion position even when the block element is a table cell.
1020
1021         Fixed the bug by not moving the insertion position before the table cell in this case.
1022
1023         Test: editing/pasteboard/paste-into-table-cell.html
1024
1025         * editing/ReplaceSelectionCommand.cpp:
1026         (WebCore::ReplaceSelectionCommand::doApply):
1027
1028 2012-05-02  Beth Dakin  <bdakin@apple.com>
1029
1030         https://bugs.webkit.org/show_bug.cgi?id=85309
1031         supportsExpandedScrollbars() should check for the method we actually call rather 
1032         than a related method
1033
1034         Reviewed by Anders Carlsson.
1035
1036         Missing colon.
1037         * platform/mac/ScrollbarThemeMac.mm:
1038         (WebCore::supportsExpandedScrollbars):
1039
1040 2012-05-02  Antti Koivisto  <antti@apple.com>
1041
1042         Move title and media queries from StyleSheetInternal to CSSStyleSheet
1043         https://bugs.webkit.org/show_bug.cgi?id=85387
1044
1045         Reviewed by Anders Carlsson.
1046
1047         Stylesheet title and media queries are determined by the owner, not by the stylesheet itself.
1048         The fields belong to CSSStyleSheet.
1049         
1050         This will make it easier to share StyleSheetInternal instances between documents.
1051
1052         * css/CSSStyleSheet.cpp:
1053         (WebCore::StyleSheetInternal::StyleSheetInternal):
1054         (WebCore::StyleSheetInternal::isCacheable):
1055         (WebCore):
1056         (WebCore::CSSStyleSheet::setDisabled):
1057         
1058             Invalidate the document style directly instead of ping-ponging through StyleSheetInternal.
1059
1060         (WebCore::CSSStyleSheet::setMediaQueries):
1061         (WebCore::CSSStyleSheet::media):
1062         * css/CSSStyleSheet.h:
1063         (StyleSheetInternal):
1064         (WebCore::StyleSheetInternal::originalURL):
1065         (WebCore::StyleSheetInternal::hasCharsetRule):
1066         (WebCore::CSSStyleSheet::mediaQueries):
1067         (CSSStyleSheet):
1068         (WebCore::CSSStyleSheet::setTitle):
1069         * css/StyleResolver.cpp:
1070         (WebCore::StyleResolver::appendAuthorStylesheets):
1071         (WebCore::StyleResolver::collectMatchingRulesForList):
1072         * dom/DOMImplementation.cpp:
1073         (WebCore::DOMImplementation::createCSSStyleSheet):
1074         * dom/ProcessingInstruction.cpp:
1075         (WebCore::ProcessingInstruction::setCSSStyleSheet):
1076         * dom/StyleElement.cpp:
1077         (WebCore::StyleElement::createSheet):
1078         * html/HTMLLinkElement.cpp:
1079         (WebCore::HTMLLinkElement::parseAttribute):
1080         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1081         * html/HTMLStyleElement.cpp:
1082         (WebCore::HTMLStyleElement::parseAttribute):
1083         * svg/SVGStyleElement.cpp:
1084         (WebCore::SVGStyleElement::parseAttribute):
1085
1086 2012-05-02  Alexis Menard  <alexis.menard@openbossa.org>
1087
1088         Unreviewed Qt build fix with GCC 4.7.0.
1089
1090         * platform/qt/DeviceMotionProviderQt.h:
1091         (DeviceMotionProviderQt):
1092         * platform/qt/DeviceOrientationProviderQt.cpp:
1093         (WebCore::DeviceOrientationProviderQt::~DeviceOrientationProviderQt):
1094         (WebCore):
1095         * platform/qt/DeviceOrientationProviderQt.h:
1096         (DeviceOrientationProviderQt):
1097
1098 2012-05-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
1099
1100         [Texmap] Enable css filters in TextureMapperGL
1101         https://bugs.webkit.org/show_bug.cgi?id=75778
1102
1103         Unreviewed build fix to greenify the Qt Minimal bot.
1104
1105         * platform/graphics/texmap/TextureMapperShaderManager.h:
1106
1107 2012-05-02  Philippe Normand  <pnormand@igalia.com>
1108
1109         [GTK] Compilation warnings in RenderTheme
1110         https://bugs.webkit.org/show_bug.cgi?id=85286
1111
1112         Reviewed by Martin Robinson.
1113
1114         Removed un-needed code and refactored fileListNameForWidth
1115         accordingly to avoid un-used variable warnings during compilation.
1116
1117         * platform/gtk/RenderThemeGtk.cpp:
1118         (WebCore):
1119         (WebCore::RenderThemeGtk::fileListNameForWidth):
1120
1121 2012-05-02  Ryosuke Niwa  <rniwa@webkit.org>
1122
1123         NULL ptr in WebCore::AppendNodeCommand::AppendNodeCommand
1124         https://bugs.webkit.org/show_bug.cgi?id=75843
1125
1126         Reviewed by Tony Chang.
1127
1128         The crash was caused by indentIntoBlockquote's passing a bad outerBlock to moveParagraphsWithClone.
1129
1130         When the position is created after blockquote in the following DOM:
1131         BODY
1132         * BLOCKQUOTE style=margin: 0 0 0 40px; border: none; padding: 0px;
1133             E
1134                 #text "\nx\n"
1135         VisiblePosition's constructor (of startOfContents) turns the position into a legacy position (blockquote, 0).
1136         The crash occurs because this position doesn't belong in the same paragraph as E, which is the paragraph
1137         we're trying to move into the blockquote.
1138
1139         Fixed bug by calling positionInParentAfterNode instead of positionAfterNode for now. We should eventually be
1140         able to use positionAfterNode here once VisiblePosition's constructor starts handling before/after positions
1141         properly.
1142
1143         Test: editing/execCommand/indent-with-after-content-crash.html
1144
1145         * editing/IndentOutdentCommand.cpp:
1146         (WebCore::IndentOutdentCommand::indentIntoBlockquote):
1147
1148 2012-05-02  Jer Noble  <jer.noble@apple.com>
1149
1150         WebWindowFadeAnimation ignores "duration" parameter.
1151         https://bugs.webkit.org/show_bug.cgi?id=85386
1152
1153         Reviewed by Brady Eidson.
1154
1155         Ignoring the "duration" parameter causes the full screen fade and scale animations
1156         to get out of sync.
1157
1158         * platform/mac/WebWindowAnimation.mm:
1159         (-[WebWindowFadeAnimation initWithDuration:window:initialAlpha:finalAlpha:]):
1160
1161 2012-05-02  Julien Chaffraix  <jchaffraix@webkit.org>
1162
1163         REGRESSION(110072): Clipping is not applied on layers that are animated using platform code
1164         https://bugs.webkit.org/show_bug.cgi?id=83954
1165
1166         Reviewed by Simon Fraser.
1167
1168         Tests: fast/layers/no-clipping-overflow-hidden-added-after-transform-expected.html
1169                fast/layers/no-clipping-overflow-hidden-added-after-transform.html
1170                fast/layers/no-clipping-overflow-hidden-added-after-transition-expected.html
1171                fast/layers/no-clipping-overflow-hidden-added-after-transition.html
1172                fast/layers/no-clipping-overflow-hidden-hardware-acceleration-expected.html
1173                fast/layers/no-clipping-overflow-hidden-hardware-acceleration.html
1174                (and all the tests that will need to be rebaselined)
1175
1176         r110072 changed the way we create layers to lazily allocate overflow: hidden ones
1177         based on layout overflow. However with hardware acceleration, certain operations
1178         do cause overflow without actually calling layout (the test cases added as part
1179         of this change are using transition / animation). This means that those cases
1180         wouldn't properly clip.
1181
1182         Due to the above issue and the other regressions from r110072, the easiest fix is
1183         to just to roll it out.
1184
1185         * rendering/RenderBox.h:
1186         Changed to allocate a layer whenever we have an overflow clip.
1187
1188         * rendering/RenderBox.cpp:
1189         (WebCore::RenderBox::scrolledContentOffset):
1190         (WebCore::RenderBox::cachedSizeForOverflowClip):
1191         Reverted those 2 to avoid using the cached size logic.
1192
1193         * rendering/RenderBlock.cpp:
1194         (WebCore::RenderBlock::updateScrollInfoAfterLayout):
1195         (WebCore::RenderBlock::layoutBlock):
1196         (WebCore::RenderBlock::paint):
1197         (WebCore::RenderBlock::isPointInOverflowControl):
1198         * rendering/RenderBlock.h:
1199         * rendering/RenderBox.cpp:
1200         (WebCore::RenderBox::willBeDestroyed):
1201         (WebCore::RenderBox::styleDidChange):
1202         (WebCore::RenderBox::layout):
1203         (WebCore::RenderBox::scrollWidth):
1204         (WebCore::RenderBox::scrollHeight):
1205         (WebCore::RenderBox::scrollLeft):
1206         (WebCore::RenderBox::scrollTop):
1207         (WebCore::RenderBox::setScrollLeft):
1208         (WebCore::RenderBox::setScrollTop):
1209         (WebCore::RenderBox::includeVerticalScrollbarSize):
1210         (WebCore::RenderBox::includeHorizontalScrollbarSize):
1211         (WebCore::RenderBox::pushContentsClip):
1212         (WebCore::RenderBox::popContentsClip):
1213         (WebCore::RenderBox::addLayoutOverflow):
1214         * rendering/RenderBoxModelObject.cpp:
1215         (WebCore::RenderBoxModelObject::styleDidChange):
1216         * rendering/RenderBoxModelObject.h:
1217         (RenderBoxModelObject):
1218         * rendering/RenderDeprecatedFlexibleBox.cpp:
1219         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
1220         * rendering/RenderFlexibleBox.cpp:
1221         (WebCore::RenderFlexibleBox::layoutBlock):
1222         * rendering/RenderTable.cpp:
1223         (WebCore::RenderTable::layout):
1224         * rendering/RenderTableRow.h:
1225         (RenderTableRow):
1226         * rendering/RenderTableSection.cpp:
1227         (WebCore::RenderTableSection::layout):
1228         Removed the previous scaffolding code and reverted some functions to
1229         being private (as they were prior to r110072).
1230
1231 2012-05-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
1232
1233         [Texmap] Enable css filters in TextureMapperGL
1234         https://bugs.webkit.org/show_bug.cgi?id=75778
1235
1236         Reviewed by Jocelyn Turcotte.
1237
1238         Added support for color filters in TextureMapperGL. Blur and shadow would be done in a
1239         different patch.
1240
1241         Modified BitmapTexture::applyFilters to return a texture, since GL cannot paint a texture
1242         into itself.
1243         Created a shader map for standard filters, since all of them work more or less the same way
1244         with a single uniform. Added the colorization shaders based on the W3C filter spec, as
1245         already implemented in FEFilterRenderer.cpp and FEColorMatrix.cpp.
1246         We use two swapping textures to render the filters.
1247
1248         Covered by tests in css3/filters.
1249
1250         * platform/graphics/texmap/TextureMapper.cpp:
1251         (WebCore::TextureMapper::acquireTextureFromPool):
1252         * platform/graphics/texmap/TextureMapper.h:
1253         (WebCore::BitmapTexture::applyFilters):
1254         * platform/graphics/texmap/TextureMapperGL.cpp:
1255         (WebCore::BitmapTextureGL::updateContents):
1256         (WebCore):
1257         (WebCore::TextureMapperGL::drawFiltered):
1258         (WebCore::BitmapTextureGL::applyFilters):
1259         (WebCore::BitmapTextureGL::bind):
1260         * platform/graphics/texmap/TextureMapperGL.h:
1261         (TextureMapperGL):
1262         (BitmapTextureGL):
1263         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1264         (WebCore::BitmapTextureImageBuffer::applyFilters):
1265         * platform/graphics/texmap/TextureMapperImageBuffer.h:
1266         (BitmapTextureImageBuffer):
1267         * platform/graphics/texmap/TextureMapperLayer.cpp:
1268         (WebCore::applyFilters):
1269         (WebCore::TextureMapperLayer::syncCompositingStateSelf):
1270         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1271         (WebCore::TextureMapperShaderManager::~TextureMapperShaderManager):
1272         (WebCore):
1273         (WebCore::StandardFilterProgram::~StandardFilterProgram):
1274         (WebCore::StandardFilterProgram::StandardFilterProgram):
1275         (WebCore::StandardFilterProgram::create):
1276         (WebCore::StandardFilterProgram::prepare):
1277         (WebCore::TextureMapperShaderManager::getShaderForFilter):
1278         * platform/graphics/texmap/TextureMapperShaderManager.h:
1279         (WebCore):
1280         (StandardFilterProgram):
1281         (WebCore::StandardFilterProgram::vertexAttrib):
1282         (WebCore::StandardFilterProgram::texCoordAttrib):
1283         (WebCore::StandardFilterProgram::textureUniform):
1284         (TextureMapperShaderManager):
1285
1286 2012-05-02  Philippe Normand  <pnormand@igalia.com>
1287
1288         [GTK] media/track/track-cue-rendering-snap-to-lines-not-set.html fails
1289         https://bugs.webkit.org/show_bug.cgi?id=84378
1290
1291         Reviewed by Eric Carlson.
1292
1293         Fix positioning of the controls panel back to relative, as it is
1294         in the parent CSS. Also remove some duplicate CSS attributes.
1295
1296         * css/mediaControlsGtk.css:
1297         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1298
1299 2012-05-02  Beth Dakin  <bdakin@apple.com>
1300
1301         https://bugs.webkit.org/show_bug.cgi?id=85309
1302         supportsExpandedScrollbars() should check for the method we actually call rather 
1303         than a related method
1304         -and corresponding-
1305         <rdar://problem/11065691>
1306
1307         Reviewed by Anders Carlsson.
1308
1309         * platform/mac/ScrollbarThemeMac.mm:
1310         (WebCore::supportsExpandedScrollbars):
1311
1312 2012-05-02  Zalan Bujtas  <zbujtas@gmail.com>
1313
1314         [Qt] Remove redundant updateViewportArguments() call from HTMLBodyElement::didNotifyDescendantInseretions()
1315         https://bugs.webkit.org/show_bug.cgi?id=84241
1316
1317         Reviewed by Kenneth Rohde Christiansen.
1318
1319         No need to update viewport arguments when the body element is inserted into the Document.
1320         Viewport arguments are updated first when the Document is set on the Frame, and later
1321         on any subsequent occurence of the viewport meta tag in the document.
1322         It is sufficient to dispatch viewport update once per main frame, if no viewport meta tag is present.
1323
1324         Also add a flag to be able to track viewport argument update dispatch.
1325
1326         No tests. Currrent viewport tests cover this behaviour.
1327
1328         * dom/Document.cpp:
1329         (WebCore::Document::Document):
1330         (WebCore::Document::updateViewportArguments):
1331         (WebCore::Document::documentWillSuspendForPageCache):
1332         * dom/Document.h:
1333         (Document):
1334         (WebCore::Document::didDispatchViewportPropertiesChanged):
1335         * html/HTMLBodyElement.cpp:
1336         (WebCore::HTMLBodyElement::didNotifyDescendantInseretions):
1337
1338 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
1339
1340         Web Inspector: Cannot read property 'length' of undefined TextEditorModel.js:467
1341         https://bugs.webkit.org/show_bug.cgi?id=85360
1342
1343         Reviewed by Yury Semikhatsky.
1344
1345         Added the undo/redo stack length checks.
1346
1347         * inspector/front-end/TextEditorModel.js:
1348         (WebInspector.TextEditorModel.endsWithBracketRegex.):
1349
1350 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
1351
1352         WebInspector: Scripts panel editor dirty state is cleared when the tab with editor is closed.
1353         https://bugs.webkit.org/show_bug.cgi?id=85361
1354
1355         Reviewed by Yury Semikhatsky.
1356
1357         Added content validation upon script show.
1358
1359         * inspector/front-end/JavaScriptSourceFrame.js:
1360         (WebInspector.JavaScriptSourceFrame.prototype.wasShown):
1361
1362 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
1363
1364         Web Inspector: breakpoints are de-activated only upon the second click.
1365         https://bugs.webkit.org/show_bug.cgi?id=85359
1366
1367         Reviewed by Yury Semikhatsky.
1368
1369         Initial value for activated state is set.
1370
1371         * inspector/front-end/DebuggerModel.js:
1372         (WebInspector.DebuggerModel):
1373
1374 2012-05-02  Pavel Feldman  <pfeldman@chromium.org>
1375
1376         Web Inspector: live edit fails to report error
1377         https://bugs.webkit.org/show_bug.cgi?id=85357
1378
1379         Reviewed by Yury Semikhatsky.
1380
1381         ProtocolError is now a string, not an error object.
1382
1383         * inspector/front-end/DatabaseQueryView.js:
1384         (WebInspector.DatabaseQueryView.prototype._queryError):
1385         * inspector/front-end/SourceFrame.js:
1386         (WebInspector.SourceFrame.prototype.didEditContent):
1387
1388 2012-05-02  Lars Knudsen  <lars.knudsen@nokia.com>
1389
1390         [Qt] Make DeviceMotion and DeviceOrientation work with WebKit2
1391         https://bugs.webkit.org/show_bug.cgi?id=64595
1392
1393         Reviewed by Kenneth Rohde Christiansen.
1394
1395         No new tests added.  This change adds support for WK2
1396         what was in WK1.
1397
1398         Also moving DeviceMotion and DeviceOrientation clients and
1399         providers to WebCore.  This is done to allow clean dependencies
1400         when statically linking WK2.
1401
1402         * Target.pri:
1403         * WebCore.pri:
1404         * platform/qt/DeviceMotionClientQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp.
1405         (WebCore):
1406         (WebCore::DeviceMotionClientQt::~DeviceMotionClientQt):
1407         (WebCore::DeviceMotionClientQt::deviceMotionControllerDestroyed):
1408         (WebCore::DeviceMotionClientQt::setController):
1409         (WebCore::DeviceMotionClientQt::startUpdating):
1410         (WebCore::DeviceMotionClientQt::stopUpdating):
1411         (WebCore::DeviceMotionClientQt::currentDeviceMotion):
1412         * platform/qt/DeviceMotionClientQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h.
1413         (WebCore):
1414         (DeviceMotionClientQt):
1415         (WebCore::DeviceMotionClientQt::DeviceMotionClientQt):
1416         * platform/qt/DeviceMotionProviderQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp.
1417         (WebCore):
1418         (WebCore::DeviceMotionProviderQt::DeviceMotionProviderQt):
1419         (WebCore::DeviceMotionProviderQt::~DeviceMotionProviderQt):
1420         (WebCore::DeviceMotionProviderQt::setController):
1421         (WebCore::DeviceMotionProviderQt::start):
1422         (WebCore::DeviceMotionProviderQt::stop):
1423         (WebCore::DeviceMotionProviderQt::filter):
1424         * platform/qt/DeviceMotionProviderQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h.
1425         (WebCore):
1426         (DeviceMotionProviderQt):
1427         (WebCore::DeviceMotionProviderQt::currentDeviceMotion):
1428         * platform/qt/DeviceOrientationClientQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp.
1429         (WebCore):
1430         (WebCore::DeviceOrientationClientQt::deviceOrientationControllerDestroyed):
1431         (WebCore::DeviceOrientationClientQt::setController):
1432         (WebCore::DeviceOrientationClientQt::startUpdating):
1433         (WebCore::DeviceOrientationClientQt::stopUpdating):
1434         (WebCore::DeviceOrientationClientQt::lastOrientation):
1435         * platform/qt/DeviceOrientationClientQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h.
1436         (WebCore):
1437         (DeviceOrientationClientQt):
1438         * platform/qt/DeviceOrientationProviderQt.cpp: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp.
1439         (WebCore):
1440         (WebCore::DeviceOrientationProviderQt::DeviceOrientationProviderQt):
1441         (WebCore::DeviceOrientationProviderQt::~DeviceOrientationProviderQt):
1442         (WebCore::DeviceOrientationProviderQt::setController):
1443         (WebCore::DeviceOrientationProviderQt::start):
1444         (WebCore::DeviceOrientationProviderQt::stop):
1445         (WebCore::DeviceOrientationProviderQt::filter):
1446         * platform/qt/DeviceOrientationProviderQt.h: Renamed from Source/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h.
1447         (WebCore):
1448         (DeviceOrientationProviderQt):
1449         (WebCore::DeviceOrientationProviderQt::isActive):
1450         (WebCore::DeviceOrientationProviderQt::lastOrientation):
1451         (WebCore::DeviceOrientationProviderQt::hasAlpha):
1452
1453 2012-05-02  Yury Semikhatsky  <yurys@chromium.org>
1454
1455         Web Inspector: exception in console when there are watch expressions
1456         https://bugs.webkit.org/show_bug.cgi?id=85351
1457
1458         Check if script execution is still paused before trying to resolve an
1459         object for script popover because execution may be resumed after popover
1460         showing is scheduled but before we start resolving the object under
1461         the cursor in which case there is no selected call frame any more and
1462         we should hide the popover.
1463
1464         Reviewed by Pavel Feldman.
1465
1466         * inspector/front-end/JavaScriptSourceFrame.js:
1467         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover):
1468
1469 2012-05-02  Tommy Widenflycht  <tommyw@google.com>
1470
1471         MediaStream API: Changing webkitGetUserMedia to take an object instead of a string
1472         https://bugs.webkit.org/show_bug.cgi?id=84850
1473
1474         Reviewed by Dimitri Glazkov.
1475
1476         The standard changed a while back to use an object as a dictionary but since JSC
1477         didn't support the Dictionary class until just recently we have not updated the API until now.
1478
1479         Change covered by existing, and edited, tests.
1480
1481         * Modules/mediastream/NavigatorMediaStream.cpp:
1482         (WebCore::NavigatorMediaStream::webkitGetUserMedia):
1483         * Modules/mediastream/NavigatorMediaStream.h:
1484         (WebCore):
1485         (NavigatorMediaStream):
1486         * Modules/mediastream/NavigatorMediaStream.idl:
1487         * Modules/mediastream/UserMediaRequest.cpp:
1488         (WebCore::UserMediaRequest::create):
1489         (WebCore::UserMediaRequest::UserMediaRequest):
1490         * Modules/mediastream/UserMediaRequest.h:
1491         (WebCore):
1492         (UserMediaRequest):
1493         * platform/mediastream/MediaStreamSourcesQueryClient.h:
1494         (MediaStreamSourcesQueryClient):
1495
1496 2012-05-02  Antti Koivisto  <antti@apple.com>
1497
1498         StyleSheetInternal::parseUserStyleSheet() should be called parseAuthorStyleSheet().
1499
1500         Rubber-stamped by Nikolas Zimmermann.
1501
1502         * css/CSSImportRule.cpp:
1503         (WebCore::StyleRuleImport::setCSSStyleSheet):
1504         * css/CSSStyleSheet.cpp:
1505         (WebCore::StyleSheetInternal::parseAuthorStyleSheet):
1506         * css/CSSStyleSheet.h:
1507         (StyleSheetInternal):
1508         * html/HTMLLinkElement.cpp:
1509         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1510
1511 2012-05-02  Yury Semikhatsky  <yurys@chromium.org>
1512
1513         REGRESSION: Web Inspector doesn't show cookies anymore
1514         https://bugs.webkit.org/show_bug.cgi?id=85349
1515
1516         Pass root node instead of DataGrid object to the "populateNode" method.
1517         Added compiler annotations so that closure compiler catches such errors.
1518
1519         Reviewed by Pavel Feldman.
1520
1521         * inspector/front-end/CookiesTable.js:
1522         (WebInspector.CookiesTable.prototype._rebuildTable):
1523         * inspector/front-end/NetworkRequest.js:
1524         (WebInspector.NetworkRequest.prototype.addFrameError):
1525
1526 2012-05-02  Dongwoo Im  <dw.im@samsung.com>
1527
1528         [EFL] Implement the Web Audio API feature.
1529         https://bugs.webkit.org/show_bug.cgi?id=78688
1530
1531         Reviewed by Philippe Normand.
1532
1533         Implement the Web Audio API feature on the EFL port.
1534         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
1535
1536         * CMakeLists.txt: Add the list of the files which are needed for the Web Audio APi.
1537         * PlatformEfl.cmake: Add the list of the files which are needed for the Web Audio APi.
1538         * UseJSC.cmake: Add the list of the files which are needed for the Web Audio APi.
1539         * platform/audio/HRTFElevation.cpp: Enable the USE_CONCATENATED_IMPULSE_RESPONSES macro.
1540         (WebCore):
1541         * platform/audio/efl/AudioBusEfl.cpp: Added.
1542         (WebCore):
1543         (WebCore::AudioBus::loadPlatformResource): Create the absolute path of the audio resource.
1544
1545 2012-05-01  Kentaro Hara  <haraken@chromium.org>
1546
1547         [V8] Add an Isolate parameter to setJSWrapperForXXX()
1548         https://bugs.webkit.org/show_bug.cgi?id=85329
1549
1550         Reviewed by Adam Barth.
1551
1552         The objective is to pass Isolate around in V8 bindings.
1553         This patch adds an Isolate parameter to setJSWrapperForXXX()
1554         and passes Isolate to setJSWrapperForXXX() in CodeGeneratorV8.pm.
1555         I'll pass Isolate to setJSWrapperForXXX() in custom bindings
1556         in a follow-up patch.
1557
1558         No tests. No change in behavior.
1559
1560         * bindings/scripts/CodeGeneratorV8.pm: Modified as described above.
1561         (GenerateConstructorCallback):
1562         (GenerateEventConstructorCallback):
1563         (GenerateNamedConstructorCallback):
1564         (GenerateToV8Converters):
1565         * bindings/v8/V8DOMWrapper.cpp:
1566         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
1567         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode):
1568         * bindings/v8/V8DOMWrapper.h:
1569         (V8DOMWrapper):
1570         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject):
1571         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject):
1572
1573         * bindings/scripts/test/V8/V8Float64Array.cpp: Updated run-bindings-tests results.
1574         (WebCore::V8Float64Array::wrapSlow):
1575         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1576         (WebCore::V8TestActiveDOMObject::wrapSlow):
1577         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1578         (WebCore::V8TestCustomNamedGetter::wrapSlow):
1579         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1580         (WebCore::V8TestEventConstructor::constructorCallback):
1581         (WebCore::V8TestEventConstructor::wrapSlow):
1582         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1583         (WebCore::V8TestEventTarget::wrapSlow):
1584         * bindings/scripts/test/V8/V8TestInterface.cpp:
1585         (WebCore::V8TestInterface::constructorCallback):
1586         (WebCore::V8TestInterface::wrapSlow):
1587         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1588         (WebCore::V8TestMediaQueryListListener::wrapSlow):
1589         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1590         (WebCore::V8TestNamedConstructorConstructorCallback):
1591         (WebCore::V8TestNamedConstructor::wrapSlow):
1592         * bindings/scripts/test/V8/V8TestNode.cpp:
1593         (WebCore::V8TestNode::constructorCallback):
1594         (WebCore::V8TestNode::wrapSlow):
1595         * bindings/scripts/test/V8/V8TestObj.cpp:
1596         (WebCore::V8TestObj::constructorCallback):
1597         (WebCore::V8TestObj::wrapSlow):
1598         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1599         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
1600         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
1601
1602 2012-05-01  Eric Seidel  <eric@webkit.org>
1603
1604         Add <iframe seamless> navigation code (and pass all the navigation tests)
1605         https://bugs.webkit.org/show_bug.cgi?id=85340
1606
1607         Reviewed by Adam Barth.
1608
1609         This code was primarily written by Adam Barth and then submitted to my
1610         GitHub branch via a pull request:
1611         https://github.com/eseidel/webkit/compare/master...seamless
1612         https://github.com/eseidel/webkit/pull/2
1613         https://github.com/eseidel/webkit/pull/3
1614
1615         I rewrote parts of it to use Docment::shouldDisplaySeamlesslyWithParent.
1616
1617         Other parts of the original change have already been committed to WebKit by Adam
1618         as part of prep-work for making the loader seamless-ready.
1619
1620         * loader/FrameLoader.cpp:
1621         (WebCore::FrameLoader::findFrameForNavigation):
1622
1623 2012-05-01  Vincent Scheib  <scheib@chromium.org>
1624
1625         Fullscreen pop-up logic restored to using processingUserGesture.
1626         https://bugs.webkit.org/show_bug.cgi?id=85105
1627
1628         WebKit was recently updated to the new Fullscreen API:
1629         http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#api
1630         http://trac.webkit.org/changeset/111028
1631
1632         This change reverts back to using processingUserGesture() instead
1633         of DOMWindow::allowPopUp(). This fixes incorrect behavior in
1634         at least the Chromium port and is consistent with the cited
1635         definition of "allowed to show a pop-up":
1636           An algorithm is allowed to show a pop-up if, in the task in which the algorithm is running, either:
1637           - an activation behavior is currently being processed whose click event was trusted, or
1638           - the event listener for a trusted click event is being handled.
1639
1640         Reviewed by Dimitri Glazkov.
1641
1642         No new tests.
1643
1644         * dom/Document.cpp:
1645         (WebCore::Document::requestFullScreenForElement):
1646
1647 2012-05-01  Xiaomei Ji  <xji@chromium.org>
1648
1649         enable ctrl-arrow move by word visually in non-Windows platforms.
1650         https://bugs.webkit.org/show_bug.cgi?id=85017
1651
1652         Reviewed by Ryosuke Niwa.
1653
1654         Enable ctrl-arrow moves caret by word in visual order in non-Windows platforms that use ICU word
1655         break iterator (it is not enabled for WinCE and Qt where ICU is not used). For those platforms, ctrl-arrow
1656         moves caret to word break position before spaces. For example, given a logical text "abc def hij", the word
1657         break positions using ctrl-left-arrow from rightmost position are "|abc |def |hij".
1658         The word break positions using ctrl-right-arrow from leftmost position are "abc| def| hij|".
1659
1660         Test: editing/selection/move-by-word-visually-mac.html
1661
1662         * editing/EditingBehavior.h:
1663         (EditingBehavior):
1664         (WebCore::EditingBehavior::shouldEatSpaceToNextWord): To control different word break positions
1665         (regards to space) for different platforms.
1666         * editing/FrameSelection.cpp:
1667         (WebCore::FrameSelection::modifyMovingRight): Enable visual word movement for all platforms that use ICU.
1668         (WebCore::FrameSelection::modifyMovingLeft):
1669         * editing/visible_units.cpp:
1670         (WebCore::visualWordPosition): Determine the right word break position (regards to space) based on EditingBehavior.
1671         (WebCore::leftWordPosition):
1672         (WebCore::rightWordPosition):
1673         * editing/visible_units.h:
1674
1675 2012-05-01  Raymond Liu  <raymond.liu@intel.com>
1676
1677         Modify RealtimeAnalyserNode pull mechanism
1678         https://bugs.webkit.org/show_bug.cgi?id=77515
1679
1680         Reviewed by Chris Rogers.
1681
1682         Test: webaudio/automatic-pull-node.html
1683
1684         * GNUmakefile.list.am:
1685         * Modules/webaudio/AudioBasicInspectorNode.cpp: Added.
1686         (WebCore):
1687         (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
1688         (WebCore::AudioBasicInspectorNode::pullInputs):
1689         (WebCore::AudioBasicInspectorNode::connect):
1690         (WebCore::AudioBasicInspectorNode::disconnect):
1691         (WebCore::AudioBasicInspectorNode::checkNumberOfChannelsForInput):
1692         (WebCore::AudioBasicInspectorNode::updatePullStatus):
1693         * Modules/webaudio/AudioBasicInspectorNode.h: Added.
1694         (WebCore):
1695         (AudioBasicInspectorNode):
1696         * Modules/webaudio/AudioContext.cpp:
1697         (WebCore::AudioContext::AudioContext):
1698         (WebCore::AudioContext::~AudioContext):
1699         (WebCore::AudioContext::handlePreRenderTasks):
1700         (WebCore::AudioContext::handlePostRenderTasks):
1701         (WebCore::AudioContext::markForDeletion):
1702         (WebCore):
1703         (WebCore::AudioContext::addAutomaticPullNode):
1704         (WebCore::AudioContext::removeAutomaticPullNode):
1705         (WebCore::AudioContext::updateAutomaticPullNodes):
1706         (WebCore::AudioContext::processAutomaticPullNodes):
1707         * Modules/webaudio/AudioContext.h:
1708         (AudioContext):
1709         * Modules/webaudio/AudioDestinationNode.cpp:
1710         (WebCore::AudioDestinationNode::provideInput):
1711         * Modules/webaudio/AudioNode.h:
1712         (AudioNode):
1713         * Modules/webaudio/AudioNodeOutput.h:
1714         (WebCore::AudioNodeOutput::isConnected):
1715         (AudioNodeOutput):
1716         * Modules/webaudio/RealtimeAnalyserNode.cpp:
1717         (WebCore::RealtimeAnalyserNode::RealtimeAnalyserNode):
1718         * Modules/webaudio/RealtimeAnalyserNode.h:
1719         (RealtimeAnalyserNode):
1720         * WebCore.gypi:
1721         * WebCore.xcodeproj/project.pbxproj:
1722
1723 2012-05-01  Keishi Hattori  <keishi@webkit.org>
1724
1725         datalist: Form control in a <datalist> should be barred from constraint validation
1726         https://bugs.webkit.org/show_bug.cgi?id=84359
1727
1728         Reviewed by Kent Tamura.
1729
1730         Tests: fast/forms/datalist/datalist-child-validation.html
1731                fast/forms/form-control-element-crash.html
1732
1733         * html/HTMLFormControlElement.cpp:
1734         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1735         (WebCore::HTMLFormControlElement::updateAncestors): Updates the ancestor information.
1736         (WebCore::HTMLFormControlElement::insertedInto): Invalidate the ancestor information and call setNeedsWillValidateCheck because willValidate might have changed.
1737         (WebCore::HTMLFormControlElement::removedFrom): Ditto.
1738         (WebCore::HTMLFormControlElement::disabled):
1739         (WebCore::HTMLFormControlElement::recalcWillValidate): Returns false if element has a datalist ancestor.
1740         (WebCore::HTMLFormControlElement::willValidate): Check if ancestor information is valid too.
1741         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
1742         * html/HTMLFormControlElement.h:
1743         (HTMLFormControlElement):
1744
1745 2012-05-01  Kent Tamura  <tkent@chromium.org>
1746
1747         Calendar Picker: Close the picker by ESC key
1748         https://bugs.webkit.org/show_bug.cgi?id=85337
1749
1750         Reviewed by Kentaro Hara.
1751
1752         No new tests. Calendar picker is not testable in DRT yet.
1753
1754         * Resources/calendarPicker.js:
1755         (handleGlobalKey): Close the popup by ESC key.
1756
1757 2012-05-01  Noel Gordon  <noel.gordon@gmail.com>
1758
1759         PNGImageDecoder: Handle interlace buffer allocation failure
1760         https://bugs.webkit.org/show_bug.cgi?id=85276
1761
1762         Reviewed by Eric Seidel.
1763
1764         No new tests. Not something we can easily test (malloc failure).
1765
1766         * platform/image-decoders/png/PNGImageDecoder.cpp:
1767         (WebCore::PNGImageDecoder::rowAvailable): Check interlace buffer allocations
1768         and bail via longjmp on failure. Note PNG_INTERLACE_ADAM7 is the only libpng
1769         supported interlace type so test for it explicitly.
1770
1771 2012-05-01  Kent Tamura  <tkent@chromium.org>
1772
1773         Calendar Picker: Too wide in Japanese locale
1774         https://bugs.webkit.org/show_bug.cgi?id=85331
1775
1776         Reviewed by Kentaro Hara.
1777
1778         No new tests. This is a locale-specific behavior.
1779
1780         * Resources/calendarPicker.js:
1781         (formatJapaneseImperialEra):
1782         Do not show an imperial era later than 平成99年 to avoid very long
1783         year string like "275760年(平成273772年)."
1784         (YearMonthController.prototype.attachTo):
1785         - Respect the maximum year specfied by <input max=...>
1786           If <input max="9999-12-31"> is specified, we don't need to
1787           secure space for the year 275,760.
1788         - Check the width for 平成99年 as well as the maximum year because
1789           "2087年(平成99年)" is usually wider than "275760年".
1790
1791 2012-05-01  Noel Gordon  <noel.gordon@gmail.com>
1792
1793         PNGImageDecoder: Add ENABLE(IMAGE_DECODER_DOWN_SAMPLING) guards to rowAvailable
1794         https://bugs.webkit.org/show_bug.cgi?id=85268
1795
1796         Reviewed by Eric Seidel.
1797
1798         PNGImageDecoder supports image downsampling. Add ENABLE guards to show where
1799         downsampling is applied when outputting decoded rows to the frame buffer. Most
1800         ports don't enable the flag: don't penalize them in terms speed in this tight
1801         row pixel write loop. s/y/destY/ to match setRGBA() and amend some comments.
1802
1803         No new tests. No change in behavior.
1804
1805         * platform/image-decoders/png/PNGImageDecoder.cpp:
1806         (WebCore::PNGImageDecoder::rowAvailable):
1807
1808 2012-05-01  Eric Seidel  <eric@webkit.org>
1809
1810         Remove uneeded min/max pref width assignment from RenderView
1811         https://bugs.webkit.org/show_bug.cgi?id=85325
1812
1813         Reviewed by Julien Chaffraix.
1814
1815         This code has been with us since the original import from KDE:
1816         http://trac.webkit.org/browser/trunk/WebCore/khtml/rendering/render_root.cpp?annotate=blame&rev=4#L93
1817         It's never been documented, or explained.  Removing it showed no
1818         effect on my local layout tests run.
1819         However this code blocks proper implementation of <iframe seamless>
1820         as we have to do proper min/max width negotiation across the iframe boundary.
1821
1822         I would remove the whole function, but doing so opens a whole can of worms
1823         as this override is public, yet normally this function is *private* (well protected on RenderBox).
1824         It seems plausible that frame flattening code needs this override since it doesn't always
1825         call the min/maxPreferredWidth() calls which normally automatically call this compute*
1826         function if the pref-widths are dirty.
1827         Instead of trying to track that all down, I'm just removing this line, and we'll go
1828         back and remove the whole function at a later date if possible.
1829
1830         * rendering/RenderView.cpp:
1831         (WebCore::RenderView::computePreferredLogicalWidths):
1832
1833 2012-05-01  Nate Chapin  <japhet@chromium.org>
1834
1835         REGRESSION(r115654): PDFs come up blank
1836         https://bugs.webkit.org/show_bug.cgi?id=85275
1837
1838         Reviewed by Alexey Proskuryakov.
1839
1840         Test: http/tests/loading/pdf-commit-load-callbacks.html
1841
1842         * loader/DocumentLoader.cpp:
1843         (WebCore::DocumentLoader::finishedLoading): The load needs to be
1844             committed before we call finishedLoading on the
1845             FrameLoaderClient.
1846         * loader/FrameLoader.cpp:
1847         (WebCore::FrameLoader::transitionToCommitted): We're guaranteeing
1848             that receivedFirstData() will be called other ways (namely,
1849             DocumentLoader won't finish without doing so). This call now
1850             causes custom representations to double-commit, which is bad.
1851
1852 2012-05-01  Eric Seidel  <eric@webkit.org>
1853
1854         Add support for seamless attribute as well as seamless sandbox flag and default CSS styling
1855         https://bugs.webkit.org/show_bug.cgi?id=85302
1856
1857         Reviewed by Ojan Vafai.
1858
1859         This also adds support for the seamless sandbox flag from HTML 5.
1860         The sandbox flag is not speficially overridable in the current HTML5,
1861         but it is set (like all sandbox flags) by default when sandbox is specified.
1862         Unfortunately this support is not yet observable in this patch, as
1863         this patch adds not observable features of seamless.
1864
1865         This patch also adds the html.css additions for seamless, as specified:
1866         http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#replaced-elements
1867
1868         I noticed that my previous testing did not confirm that iframes marked
1869         for seamless (but not possible to display as seamless due to sandbox, etc.)
1870         were still to have this seamless styling.  I've added additional testing for this case.
1871
1872         I also added another test for the about:blank FIXME added as part of this change.
1873
1874         In order to support srcdoc w/ seamless, we needed to move the srcdoc determination
1875         sooner in the initSecurityContext function (before the should-inherit early return).
1876
1877         The next patch will make seamless actually observable from JS/DOM, this one
1878         just lays down all the plumbing, and separates the security aspects for
1879         easy review.
1880
1881         Test: fast/frames/seamless/seamless-inherited-origin.html
1882
1883         * css/html.css:
1884         (iframe:not([seamless])):
1885         (iframe[seamless]):
1886         * dom/Document.cpp:
1887         (WebCore::isEligibleForSeamless):
1888         (WebCore):
1889         (WebCore::Document::initSecurityContext):
1890         (WebCore::Document::seamlessParentIFrame):
1891         (WebCore::Document::shouldDisplaySeamlesslyWithParent):
1892         * dom/Document.h:
1893         (WebCore):
1894         (Document):
1895         * dom/SecurityContext.cpp:
1896         (WebCore::SecurityContext::SecurityContext):
1897         * dom/SecurityContext.h:
1898         (WebCore::SecurityContext::mayDisplaySeamlessWithParent):
1899         (SecurityContext):
1900         * html/HTMLAttributeNames.in:
1901         * html/HTMLIFrameElement.cpp:
1902         (WebCore::HTMLIFrameElement::shouldDisplaySeamlessly):
1903         (WebCore):
1904         * html/HTMLIFrameElement.h:
1905         (HTMLIFrameElement):
1906         * html/HTMLIFrameElement.idl:
1907
1908 2012-05-01  Min Qin  <qinmin@google.com>
1909
1910         use USE(NATIVE_FULLSCREEN_VIDEO) instead of ENABLE(NATIVE_FULLSCREEN_VIDEO)
1911         https://bugs.webkit.org/show_bug.cgi?id=85316
1912
1913         Reviewed by Kent Tamura.
1914
1915         NATIVE_FULLSCREEN_VIDEO means the fullscreen video is implemented by native
1916         system view instead of webkit.
1917         So it is more appropriate to use USE(NATIVE_FULLSCREEN_VIDEO).
1918         This chagne also disabled the rendering of the fullscreen video element in webkit
1919         when that flag is set.
1920         Just renaming the variable, no new tests.
1921
1922         * dom/Document.cpp:
1923         (WebCore::Document::webkitWillEnterFullScreenForElement):
1924         (WebCore):
1925         * platform/graphics/MediaPlayer.cpp:
1926         (WebCore):
1927         * platform/graphics/MediaPlayer.h:
1928         (MediaPlayer):
1929         * platform/graphics/MediaPlayerPrivate.h:
1930         (MediaPlayerPrivateInterface):
1931
1932 2012-05-01  Jeffrey Pfau  <jpfau@apple.com>
1933
1934         <rdar://problem/10422318> Support for web content filter delegate for filtering https content
1935         https://bugs.webkit.org/show_bug.cgi?id=85300
1936
1937         Reviewed by Alexey Proskuryakov.
1938
1939         No new tests.
1940
1941         * WebCore.exp.in:
1942         * loader/MainResourceLoader.cpp:
1943         (WebCore::MainResourceLoader::MainResourceLoader):
1944         (WebCore::MainResourceLoader::~MainResourceLoader):
1945         (WebCore::MainResourceLoader::didCancel):
1946         (WebCore::MainResourceLoader::didReceiveResponse):
1947         (WebCore::MainResourceLoader::didReceiveData):
1948         (WebCore::MainResourceLoader::didFinishLoading):
1949         (WebCore::MainResourceLoader::didFail):
1950         * loader/MainResourceLoader.h:
1951         (MainResourceLoader):
1952         * platform/mac/WebCoreSystemInterface.h:
1953         * platform/mac/WebCoreSystemInterface.mm:
1954
1955 2012-05-01  Kent Tamura  <tkent@chromium.org>
1956
1957         Calendar Picker: Add capability to add platform-specific style sheet
1958         https://bugs.webkit.org/show_bug.cgi?id=85272
1959
1960         Reviewed by Kentaro Hara.
1961
1962         Add RenderTheme::extraCalendarPickerStyleSheet(). The resultant string
1963         of the function is inserted into the calendar picker page.
1964
1965         No new tests. Calendar picker apperance is not testable yet.
1966
1967         * Resources/calendarPicker.css: Removed styles for year-month buttons.
1968         * Resources/calendarPickerMac.css:
1969         Moved from calendarPicker.css, and adjust styles so that they look
1970         standard Lion buttons.
1971         (.year-month-button):
1972         (.year-month-button:active):
1973         (.year-month-button:disabled):
1974         * WebCore.gyp/WebCore.gyp: Add a rule to produce CalendarPickerMac.{cpp,h}.
1975         * html/shadow/CalendarPickerElement.cpp:
1976         (WebCore::CalendarPickerElement::writeDocument):
1977         Add extraCalendarPickerStyleSheet() result to the document.
1978         * rendering/RenderTheme.cpp:
1979         (WebCore::RenderTheme::extraCalendarPickerStyleSheet):
1980         Added. Returns an empty CString by default.
1981         * rendering/RenderTheme.h:
1982         (RenderTheme): Added extraCalendarPickerStyleSheet().
1983         * rendering/RenderThemeChromiumMac.h: Added extraCalendarPickerStyleSheet().
1984         * rendering/RenderThemeChromiumMac.mm:
1985         (WebCore::RenderThemeChromiumMac::extraCalendarPickerStyleSheet):
1986         Added. Returns the content of Resources/calendarPickerMac.css.
1987
1988 2012-05-01  James Simonsen  <simonjam@chromium.org>
1989
1990         Ensure HTMLElementStack fails gracefully if it has a non-Element.
1991         https://bugs.webkit.org/show_bug.cgi?id=85167
1992
1993         Reviewed by Adam Barth.
1994
1995         Test: Added to html5lib/resources/webkit02.dat
1996
1997         * html/parser/HTMLElementStack.cpp:
1998         (WebCore::HTMLElementStack::oneBelowTop):
1999         * html/parser/HTMLTreeBuilder.cpp:
2000         (WebCore::HTMLTreeBuilder::processEndTag):
2001
2002 2012-05-01  Ryosuke Niwa  <rniwa@webkit.org>
2003
2004         *Command.h files shouldn't be exported to WebKit layer
2005         https://bugs.webkit.org/show_bug.cgi?id=74778
2006
2007         Reviewed by Eric Seidel.
2008
2009         Remove the dependency on *Command.h files from Mac port's WebKit layer.
2010         Also wrapped the call to TypingCommand::insertParagraphSeparatorInQuotedContent in the Editor class
2011         so that we can just expose Editor's method instead of directly exposing the said static method.
2012
2013         * WebCore.exp.in:
2014         * WebCore.xcodeproj/project.pbxproj:
2015         * editing/Editor.h:
2016         (Editor):
2017         * editing/mac/EditorMac.mm:
2018         (WebCore::Editor::insertParagraphSeparatorInQuotedContent):
2019         (WebCore):
2020
2021 2012-05-01  Julien Chaffraix  <jchaffraix@webkit.org>
2022
2023         Remove one bit from m_column to pack RenderTableCell bits more
2024         https://bugs.webkit.org/show_bug.cgi?id=85291
2025
2026         Reviewed by Ojan Vafai.
2027
2028         Memory improvement, covered by the existing unit tests.
2029
2030         * rendering/RenderTableCell.cpp:
2031         * rendering/RenderTableCell.h:
2032         Remove one bit from m_column (which should be fine as I wouldn't expect tables above 1 millions
2033         columns to render at all anyway) to pack the bitfields in 32 bits. Re-arranged the bits to have the bigger
2034         bitfield first.
2035
2036 2012-05-01  Anders Carlsson  <andersca@apple.com>
2037
2038         Slow scrolling on www.sholby.net
2039         https://bugs.webkit.org/show_bug.cgi?id=85304
2040         <rdar://problem/11138952>
2041
2042         Reviewed by Beth Dakin.
2043
2044         Fix two performance issues that showed up on the profiles.
2045
2046         * loader/FrameLoader.cpp:
2047         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2048         Reset the relevant painted object counter; it's only interesting when loading.
2049
2050         * page/Page.cpp:
2051         (WebCore::Page::startCountingRelevantRepaintedObjects):
2052         Set m_isCountingRelevantRepaintedObjects to true after calling reset, since reset now sets it to false.
2053
2054         (WebCore::Page::resetRelevantPaintedObjectCounter):
2055         Set m_isCountingRelevantRepaintedObjects to false.
2056
2057         (WebCore::Page::addRelevantRepaintedObject):
2058         Use HashSet::find to avoid an extra hash lookup.
2059
2060         * page/scrolling/ScrollingCoordinator.cpp:
2061         (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
2062         Remove the call to FrameView::updateCompositingLayersAfterLayout now, since FrameView::notifyScrollPositionChanged
2063         already calls this and was making us to a lot of work twice.
2064
2065 2012-05-01  Silvia Pfeiffer  <silviapf@chromium.org>
2066
2067         Audio controls have a 1px surplus outline coming from RenderImage::paintReplaced base class,
2068         which needs overwriting.
2069         https://bugs.webkit.org/show_bug.cgi?id=84570
2070
2071         Reviewed by Eric Carlson.
2072
2073         No new tests - covered by existing audio rendering tests.
2074
2075         * rendering/RenderMedia.cpp:
2076         (WebCore::RenderMedia::paintReplaced): Overwrite inherited function.
2077         (WebCore):
2078         * rendering/RenderMedia.h:
2079         (RenderMedia):
2080
2081 2012-05-01  Terry Anderson  <tdanderson@chromium.org>
2082
2083         Allow a pre-targeted node to be specified when dispatching a GestureTap event
2084         https://bugs.webkit.org/show_bug.cgi?id=85296
2085
2086         Reviewed by Adam Barth.
2087
2088         https://bugs.webkit.org/show_bug.cgi?id=85101
2089             The new parameter will be used and tested in this patch.
2090
2091         * page/EventHandler.cpp:
2092         (WebCore::EventHandler::handleGestureTap):
2093             The new preTargetedNode parameter can be used to pass in the Node that is
2094             the target of the GestureTap event. If this parameter is used, adjustedPoint
2095             is changed to be the center of the Node's bounding rectangle.
2096         * page/EventHandler.h:
2097         (EventHandler):
2098
2099 2012-05-01  Jessie Berlin  <jberlin@apple.com>
2100
2101         Crash calling disconnectFrame on a DOMWindowExtension a second time.
2102         https://bugs.webkit.org/show_bug.cgi?id=85301
2103
2104         Reviewed by Darin Adler.
2105
2106         DOMWindowExtension::disconnectFrame assumed it would only be called when there was a frame
2107         to disconnect. However, DOMWindow's destructor invokes disconnectFrame on all its
2108         DOMWindowProperties, even if it already did so when it entered the page cache.
2109
2110         * page/DOMWindowExtension.cpp:
2111         (WebCore::DOMWindowExtension::disconnectFrame):
2112         Don't do anything if the frame has already been disconnected.
2113
2114 2012-05-01  Aaron Colwell  <acolwell@chromium.org>
2115
2116         Temporarily remove webkitSourceAddId() & webkitSourceRemoveId() from DOM
2117         until the rest of the Media Source v0.5 methods are implemented. This is
2118         to prevent ambiguity about whether v0.5 is fully supported or not.
2119         https://bugs.webkit.org/show_bug.cgi?id=85295
2120
2121         Reviewed by Eric Carlson.
2122
2123         No new tests. Removing methods from DOM so relevant tests are removed.
2124
2125         * html/HTMLMediaElement.idl:
2126
2127 2012-05-01  Douglas Stockwell  <dstockwell@chromium.org>
2128
2129         IndexedDB: stale index entries may not be removed in some cases
2130         https://bugs.webkit.org/show_bug.cgi?id=85224
2131
2132         Reviewed by Ojan Vafai.
2133
2134         Ensure that stale index entries are removed when the corresponding
2135         object store entry no longer exists.
2136
2137         No new tests. Addresses a performance / storage leak that is
2138         not amenable to verification in a layout test.
2139
2140         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
2141         (WebCore):
2142
2143 2012-05-01  Igor Oliveira  <igor.o@sisa.samsung.com>
2144
2145         Use HashMap<OwnPtr> for CounterMap in RenderCounter
2146         https://bugs.webkit.org/show_bug.cgi?id=85294
2147
2148         Reviewed by Eric Seidel.
2149
2150         * rendering/RenderCounter.cpp:
2151         (WebCore):
2152         (WebCore::makeCounterNode):
2153         (WebCore::RenderCounter::destroyCounterNodes):
2154
2155 2012-05-01  Philip Rogers  <pdr@google.com>
2156
2157         Skip building instance tree for disallowed target
2158         https://bugs.webkit.org/show_bug.cgi?id=85202
2159
2160         Reviewed by Nikolas Zimmermann.
2161
2162         When the target of a use is disallowed (e.g., a mask element) we can
2163         skip building the instance tree because the shadow tree will be
2164         skipped as well.
2165
2166         Test: svg/custom/animate-disallowed-mask-element.svg
2167
2168         * svg/SVGUseElement.cpp:
2169         (WebCore::SVGUseElement::buildInstanceTree):
2170
2171 2012-04-29  Nikolas Zimmermann  <nzimmermann@rim.com>
2172
2173         Accumulation for values-animation is broken
2174         https://bugs.webkit.org/show_bug.cgi?id=85158
2175
2176         Reviewed by Darin Adler.
2177
2178         Example:
2179         <rect width="999" height="100" fill="green"/>
2180             <animate begin="0s" values="0; 30; 20" accumulate="sum" repeatCount="5" dur="2s"/>
2181         </rect>
2182
2183         The rect should animate like this:
2184         0.000s -> 0
2185         0.500s -> 15
2186         1.000s -> 30
2187         1.500s -> 25
2188         1.999s -> 20
2189         2.000s -> 20 (first accumulation, starts accumulating from the last set value, here '20').
2190         2.500s -> 45
2191         3.000s -> 50
2192         3.500s -> 45
2193         3.999s -> 40
2194         4.000s -> 40 (second accumulation)
2195         etc.
2196
2197         This is currently broken for values-animation. The accumulation should happen after a full cycle of the values animation ran (aka. at the end of the duration).
2198         A values animation works like this: iterate over the list of values, and calculate a 'from' and 'to' value for a given time. Example for values="0; 30; 20" dur="2s":
2199             - 0.0s .. 1.0s -> from=0, to=30
2200             - 1.0s .. 2.0s -> from=30, to=20
2201
2202         Accumulation currently is taken into account at each interval for a values-animation instead of the end of the cycle. Fix that
2203         by passing an additional 'toAtEndOfDuration' type to calculateAnimatedValue() which is used for accumulation instead of the
2204         current 'to' value.
2205
2206         Test: svg/animations/accumulate-values-width-animation.html
2207
2208         * svg/SVGAnimateElement.cpp:
2209         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2210         * svg/SVGAnimateElement.h:
2211         (SVGAnimateElement):
2212         * svg/SVGAnimateMotionElement.cpp:
2213         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
2214         * svg/SVGAnimateMotionElement.h:
2215         (SVGAnimateMotionElement):
2216         * svg/SVGAnimatedAngle.cpp:
2217         (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
2218         * svg/SVGAnimatedAngle.h:
2219         (SVGAnimatedAngleAnimator):
2220         * svg/SVGAnimatedBoolean.cpp:
2221         (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
2222         * svg/SVGAnimatedBoolean.h:
2223         (SVGAnimatedBooleanAnimator):
2224         * svg/SVGAnimatedColor.cpp:
2225         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
2226         * svg/SVGAnimatedColor.h:
2227         (SVGAnimatedColorAnimator):
2228         * svg/SVGAnimatedEnumeration.cpp:
2229         (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue):
2230         * svg/SVGAnimatedEnumeration.h:
2231         (SVGAnimatedEnumerationAnimator):
2232         * svg/SVGAnimatedInteger.cpp:
2233         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedInteger):
2234         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
2235         * svg/SVGAnimatedInteger.h:
2236         (SVGAnimatedIntegerAnimator):
2237         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
2238         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
2239         * svg/SVGAnimatedIntegerOptionalInteger.h:
2240         (SVGAnimatedIntegerOptionalIntegerAnimator):
2241         * svg/SVGAnimatedLength.cpp:
2242         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
2243         * svg/SVGAnimatedLength.h:
2244         (SVGAnimatedLengthAnimator):
2245         * svg/SVGAnimatedLengthList.cpp:
2246         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
2247         * svg/SVGAnimatedLengthList.h:
2248         (SVGAnimatedLengthListAnimator):
2249         * svg/SVGAnimatedNumber.cpp:
2250         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue):
2251         * svg/SVGAnimatedNumber.h:
2252         (SVGAnimatedNumberAnimator):
2253         * svg/SVGAnimatedNumberList.cpp:
2254         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
2255         * svg/SVGAnimatedNumberList.h:
2256         (SVGAnimatedNumberListAnimator):
2257         * svg/SVGAnimatedNumberOptionalNumber.cpp:
2258         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
2259         * svg/SVGAnimatedNumberOptionalNumber.h:
2260         (SVGAnimatedNumberOptionalNumberAnimator):
2261         * svg/SVGAnimatedPath.cpp:
2262         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
2263         * svg/SVGAnimatedPath.h:
2264         (SVGAnimatedPathAnimator):
2265         * svg/SVGAnimatedPointList.cpp:
2266         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
2267         * svg/SVGAnimatedPointList.h:
2268         (SVGAnimatedPointListAnimator):
2269         * svg/SVGAnimatedPreserveAspectRatio.cpp:
2270         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
2271         * svg/SVGAnimatedPreserveAspectRatio.h:
2272         (SVGAnimatedPreserveAspectRatioAnimator):
2273         * svg/SVGAnimatedRect.cpp:
2274         (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue):
2275         * svg/SVGAnimatedRect.h:
2276         (SVGAnimatedRectAnimator):
2277         * svg/SVGAnimatedString.cpp:
2278         (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue):
2279         * svg/SVGAnimatedString.h:
2280         (SVGAnimatedStringAnimator):
2281         * svg/SVGAnimatedTransformList.cpp:
2282         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
2283         * svg/SVGAnimatedTransformList.h:
2284         (SVGAnimatedTransformListAnimator):
2285         * svg/SVGAnimatedTypeAnimator.h:
2286         (SVGAnimatedTypeAnimator):
2287         * svg/SVGAnimationElement.cpp:
2288         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
2289         (WebCore::SVGAnimationElement::updateAnimation):
2290         * svg/SVGAnimationElement.h:
2291         (WebCore::SVGAnimationElement::animateAdditiveNumber):
2292         (SVGAnimationElement):
2293
2294 2012-05-01  Beth Dakin  <bdakin@apple.com>
2295
2296         https://bugs.webkit.org/show_bug.cgi?id=85231
2297         Fixed position objects that are removed from the DOM don't kick off 
2298         fixed position recalculation
2299         -and corresponding-
2300         <rdar://problem/11297916>
2301
2302         Reviewed by Darin Adler.
2303
2304         * rendering/RenderBox.cpp:
2305         (WebCore::RenderBox::willBeDestroyed):
2306
2307 2012-05-01  Dana Jansens  <danakj@chromium.org>
2308
2309         Early-out for subtracting a non-intersecting region
2310         https://bugs.webkit.org/show_bug.cgi?id=85258
2311
2312         Reviewed by Hajime Morita.
2313
2314         Given regions A and B, if the bounds of the regions do not intersect,
2315         then the regions themselves do not intersect. If the intersection of
2316         A and B is empty, then A subtract B == A.
2317
2318         * platform/graphics/Region.cpp:
2319         (WebCore::Region::subtract):
2320
2321 2012-04-30  Kent Tamura  <tkent@chromium.org>
2322
2323         [Chromium/Windows] Add LocalizedDateWin
2324         https://bugs.webkit.org/show_bug.cgi?id=84935
2325
2326         Reviewed by Kentaro Hara.
2327
2328         LocalizedDateICU.cpp doesn't reflect system settings. So there were some
2329         problems such as <input type=date> doesn't use system's date format.
2330
2331         We need to use Windows API to get a date format and calendar parameters.
2332
2333         We obtain a date format like "MM/dd/yy" via Windows API, and
2334         format/parse dates for the format by our own code because Windows API
2335         can't handle years older than 1601 and doesn't have date parsing API.
2336
2337         Unit test: Source/WebKit/chromium/tests/LocaleWinTest.cpp
2338
2339         * WebCore.gypi: Add LocalizedDateWin.cpp.
2340         * WebCore.gyp/WebCore.gyp:
2341         For Windows, remove LocalizedDateICU.cpp and add LocalizedDateWin.cpp.
2342         All of *Win.cpp files are excluded by default.
2343
2344         * platform/text/LocaleWin.cpp: Added.
2345         (WebCore::LocaleWin::LocaleWin):
2346         (WebCore::LocaleWin::create):
2347         (WebCore::LocaleWin::currentLocale):
2348         (WebCore::LocaleWin::~LocaleWin):
2349         (WebCore::LocaleWin::getLocaleInfoString):
2350         A helper function to obtain a string by GetLocaleInfo().
2351         (WebCore::LocaleWin::initializeShortMonthLabels):
2352         Obtain short month names from Windows.
2353
2354         (WebCore::DateFormatToken): A struct to represent a token in a date format.
2355         e.g. A format string "MM/dd/yy" generates five DateFormatToken:
2356          Month2, Literal, Day2, Literal, Year2.
2357         (isEraSymbol): A readability helper function.
2358         (isYearSymbol): ditto.
2359         (isMonthSymbol): ditto.
2360         (isDaySymbol): ditto.
2361         (countContinuousLetters):
2362         (commitLiteralToken): A helper for parseDateFormat().
2363         (parseDateFormat):
2364         Parse a format string, and generate a list of DateFormatToken.
2365
2366         (WebCore::parseNumber): A helper for parseDate().
2367         (WebCore::LocaleWin::parseNumberOrMonth): ditto.
2368         (WebCore::LocaleWin::parseDate):
2369         Parse a user-provided date string by matching with a DateFormatToken list.
2370
2371         (WebCore::appendNumber): A helper for formatDate().
2372         (WebCore::appendTwoDigitsNumber): ditto. Write at least two digits.
2373         (WebCore::appendFourDigitsNumber): ditto. Write at least four digits.
2374         (WebCore::LocaleWin::formatDate):
2375         Format a DateComponents by iterating a DateFormatToken list.
2376
2377         (WebCore::LocaleWin::initializeShortDateTokens):
2378         (WebCore::substituteLabelsIntoFormat):
2379         Creates a user-visible format string by iterating a DateFormatToken list.
2380         (WebCore::LocaleWin::dateFormatText):
2381         (WebCore::LocaleWin::initializeMonthLabels):
2382         Creates month names by Windows API.
2383         (WebCore::LocaleWin::initializeWeekDayShortLabels):
2384          Creates day names by Windows API.
2385         (WebCore::LocaleWin::monthLabels):
2386         Public accessor function for month names.
2387         (WebCore::LocaleWin::weekDayShortLabels):
2388         Public accessor function for day names.
2389         * platform/text/LocaleWin.h: Added.
2390
2391         * platform/text/LocalizedDateWin.cpp:
2392         Added. The following functions simply delegate to LocaleWin::currentLocale().
2393         (WebCore::parseLocalizedDate):
2394         (WebCore::formatLocalizedDate):
2395         (WebCore::localizedDateFormatText):
2396         (WebCore::monthLabels):
2397         (WebCore::weekDayShortLabels):
2398         (WebCore::firstDayOfWeek):
2399
2400 2012-04-30  Kent Tamura  <tkent@chromium.org>
2401
2402         REGRESSION(r115600): parseLocalizedDate() should fail for invalid inputs
2403         https://bugs.webkit.org/show_bug.cgi?id=85176
2404
2405         Reviewed by Kentaro Hara.
2406
2407         Test: fast/forms/date/input-date-commit-valid-only.html
2408
2409         * platform/text/mac/LocalizedDateMac.mm:
2410         (WebCore::parseLocalizedDate):
2411         We should check nil for the result of NSDateFormtter::dateFromString.
2412
2413 2012-04-30  Mark Rowe  <mrowe@apple.com>
2414
2415         Fix another leak due to misuse of createCFString.
2416
2417         Reviewed by Darin Adler.
2418
2419         * plugins/mac/PluginPackageMac.cpp:
2420         (WebCore::PluginPackage::fetchInfo): Adopt the result of createCFString.
2421
2422 2012-04-30  Mark Rowe  <mrowe@apple.com>
2423
2424         <rdar://problem/11312198> Many leaks during fast/events/dropzone-002.html
2425
2426         Reviewed by Darin Adler.
2427
2428         * platform/mac/ClipboardMac.mm:
2429         (WebCore::utiTypeFromCocoaType): Adopt the result of createCFString.
2430
2431 2012-04-30  Mark Rowe  <mrowe@apple.com>
2432
2433         <rdar://problem/11352575> Many CGImageRefs leaked during media layout tests
2434
2435         Reviewed by Brian Weinstein.
2436
2437         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2438         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect): Adopt the CGImageRef.
2439
2440 2012-04-30  Emil A Eklund  <eae@chromium.org>
2441
2442         Change RenderBoxModelObject::calculateBackgroundImageGeometry to use roundToInt
2443         https://bugs.webkit.org/show_bug.cgi?id=85249
2444
2445         Reviewed by Eric Seidel.
2446
2447         Prepare RenderBoxModelObject for FractionalLayoutUnits by adding rounding
2448         logic to calculateBackgroundImageGeometry. Background images, as all
2449         images, needs to be layed out on pixel boundaries thus we need to convert
2450         it to a integer value.
2451
2452         No new tests, no change in functionality.
2453
2454         * rendering/RenderBoxModelObject.cpp:
2455         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2456
2457 2012-04-30  Ilya Sherman  <isherman@chromium.org>
2458
2459         Unreviewed, rolling out r113511.
2460         http://trac.webkit.org/changeset/113511
2461         https://bugs.webkit.org/show_bug.cgi?id=66032
2462         https://bugs.webkit.org/show_bug.cgi?id=85150
2463
2464         Regression: Many autofilled form fields lack the default
2465         autofill background even when authors don’t override the
2466         autofill colors
2467
2468         * css/html.css:
2469         (input:-webkit-autofill): Restore !important modifiers
2470
2471 2012-04-30  Julien Chaffraix  <jchaffraix@webkit.org>
2472
2473         Move RenderTableCell's row index to RenderTableRow
2474         https://bugs.webkit.org/show_bug.cgi?id=85229
2475
2476         Reviewed by Ojan Vafai.
2477
2478         Covered by the existing table tests.
2479
2480         Row index is a RenderTableRow concept and as such this change moves
2481         the relevant logic into the class.
2482
2483         While touching the code, renamed row() -> rowIndex() as now RenderTableCell
2484         can return its parent RenderTableRow and we were returning an index, not the row
2485         itself.
2486
2487         * accessibility/AccessibilityTable.cpp:
2488         (WebCore::AccessibilityTable::cellForColumnAndRow):
2489         * accessibility/AccessibilityTableCell.cpp:
2490         (WebCore::AccessibilityTableCell::rowIndexRange):
2491         (WebCore::AccessibilityTableCell::titleUIElement):
2492         * rendering/RenderTable.cpp:
2493         (WebCore::RenderTable::cellAbove):
2494         (WebCore::RenderTable::cellBelow):
2495         (WebCore::RenderTable::cellBefore):
2496         (WebCore::RenderTable::cellAfter):
2497         * rendering/RenderTreeAsText.cpp:
2498         (WebCore::RenderTreeAsText::writeRenderObject):
2499         Updated after the renaming RenderTableCell::row() -> rowIndex().
2500
2501         * rendering/RenderTableCell.cpp:
2502         (WebCore::RenderTableCell::RenderTableCell):
2503         (WebCore::RenderTableCell::computeCollapsedBeforeBorder):
2504         (WebCore::RenderTableCell::computeCollapsedAfterBorder):
2505         Updated after m_rowIndex removal and row() -> rowIndex() renaming.
2506
2507         (WebCore::RenderTableCell::styleDidChange):
2508         Switched the rowWasSet check to an ASSERT. The new logic guarantees that
2509         row index was set straight when we insert the row. The previous logic was
2510         opened to some race conditions as we could wait for a recalcCells call before
2511         setting the index on the rows which made this check necessary.
2512
2513         * rendering/RenderTableCell.h:
2514         (WebCore::RenderTableCell::row):
2515         Added this RenderTableRow getter.
2516
2517         (WebCore::RenderTableCell::rowIndex):
2518         Renamed from row().
2519
2520         * rendering/RenderTableRow.cpp:
2521         (WebCore::RenderTableRow::RenderTableRow):
2522         (WebCore::RenderTableRow::styleDidChange):
2523         Updated after adding m_rowIndex / rowIndex().
2524
2525         * rendering/RenderTableRow.h:
2526         (WebCore::RenderTableRow::setRowIndex):
2527         (WebCore::RenderTableRow::rowIndex):
2528         Added those getter / setter. Also kept m_rowIndex's smaller size
2529         for future optimization and for symmetry with the column index on
2530         RenderTableCell.
2531
2532         * rendering/RenderTableSection.cpp:
2533         (WebCore::RenderTableSection::addChild):
2534         (WebCore::RenderTableSection::recalcCells):
2535         Made sure that whenever we insert or update our row index
2536         we do call setRowIndex().
2537
2538         (WebCore::RenderTableSection::addCell):
2539         This logic now doesn't need to query insertionRow as the cell's
2540         should have the index of the row in which it is inserted.
2541
2542         (WebCore::RenderTableSection::calcRowLogicalHeight):
2543         (WebCore::RenderTableSection::layoutRows):
2544         (WebCore::compareCellPositionsWithOverflowingCells):
2545         More updates after row() -> rowIndex() renaming.
2546
2547         * rendering/RenderTableSection.h:
2548         Removed rowIndexForRenderer now that the row caches this informatin.
2549
2550 2012-04-30  Keishi Hattori  <keishi@webkit.org>
2551
2552         datalist: Inconsistent behavior of HTMLInputElement::list
2553         https://bugs.webkit.org/show_bug.cgi?id=84351
2554
2555         Each platform will have a different set of input types that support the datalist UI.
2556         This patch makes shouldRespectListAttribute ask the RenderTheme if it supports datalist UI for that input type.
2557         Thus making it possible to do feature detection with JS.
2558
2559         Reviewed by Kent Tamura.
2560
2561         * WebCore.gypi: Added RenderThemeChromiumCommon.{cpp,h}
2562         * html/ColorInputType.cpp:
2563         (WebCore::ColorInputType::shouldRespectListAttribute):
2564         (WebCore):
2565         * html/ColorInputType.h:
2566         (ColorInputType):
2567         * html/InputType.cpp:
2568         (WebCore::InputType::themeSupportsDataListUI): Static method used by TextFieldInputType, RangeInputType, and ColorInputType.
2569         (WebCore):
2570         * html/InputType.h:
2571         (InputType):
2572         * html/RangeInputType.cpp:
2573         (WebCore::RangeInputType::shouldRespectListAttribute):
2574         * html/TextFieldInputType.cpp:
2575         (WebCore::TextFieldInputType::shouldRespectListAttribute):
2576         * rendering/RenderTheme.h:
2577         (RenderTheme):
2578         (WebCore::RenderTheme::supportsDataListUI): Returns true if the platform can show the datalist suggestions for a given input type.
2579         * rendering/RenderThemeChromiumCommon.cpp: Added.
2580         (WebCore):
2581         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
2582         * rendering/RenderThemeChromiumCommon.h: Added.
2583         (WebCore):
2584         (RenderThemeChromiumCommon):
2585         * rendering/RenderThemeChromiumMac.h:
2586         (RenderThemeChromiumMac):
2587         * rendering/RenderThemeChromiumMac.mm:
2588         (WebCore::RenderThemeChromiumMac::supportsDataListUI):
2589         (WebCore):
2590         * rendering/RenderThemeChromiumSkia.cpp:
2591         (WebCore::RenderThemeChromiumMac::supportsDataListUI):
2592         (WebCore):
2593         * rendering/RenderThemeChromiumSkia.h:
2594         (RenderThemeChromiumSkia):
2595
2596 2012-04-30  Levi Weintraub  <leviw@chromium.org>
2597
2598         RenderObject incorrectly lists maximalOutlineSize as a LayoutUnit
2599         https://bugs.webkit.org/show_bug.cgi?id=85248
2600
2601         Reviewed by Eric Seidel.
2602
2603         Reverting RenderObject::maximalOutlineSize to int. This is a slop value for repaint
2604         rects that doesn't affect layout. It also derives its value from RenderView's function
2605         of the same name, which is already an integer.
2606
2607         No new tests. No change in behavior.
2608
2609         * rendering/RenderObject.cpp:
2610         (WebCore::RenderObject::maximalOutlineSize):
2611         * rendering/RenderObject.h:
2612         (RenderObject):
2613
2614 2012-04-30  Xingnan Wang  <xingnan.wang@intel.com>
2615
2616         Add multichannel support for input of JavaScriptAudioNode
2617         https://bugs.webkit.org/show_bug.cgi?id=84687
2618
2619         Reviewed by Chris Rogers.
2620
2621         Tests: webaudio/javascriptaudionode-downmix8-2channel-input.html
2622                webaudio/javascriptaudionode-upmix2-8channel-input.html
2623
2624         * Modules/webaudio/JavaScriptAudioNode.cpp:
2625         (WebCore::JavaScriptAudioNode::create):
2626         (WebCore::JavaScriptAudioNode::JavaScriptAudioNode):
2627         (WebCore::JavaScriptAudioNode::initialize):
2628         (WebCore::JavaScriptAudioNode::process):
2629         * Modules/webaudio/JavaScriptAudioNode.h:
2630         (JavaScriptAudioNode):
2631
2632 2012-04-30  Oliver Hunt  <oliver@apple.com>
2633
2634         Harden arithmetic in ImageBufferDataCG
2635         https://bugs.webkit.org/show_bug.cgi?id=61373
2636
2637         Reviewed by Gavin Barraclough.
2638
2639         We have a checked type that allows us to automate many of the
2640         bounds checks we want here, so let's replace the floating point
2641         math, and just use Checked<> throughout.  We use a non-recording
2642         Checked<> as no overflows should reach this point, so we'll take
2643         a hard early failure, over the cost of many branches when
2644         accessing the raw values in loops.
2645
2646         * platform/graphics/cg/ImageBufferDataCG.cpp:
2647         (WebCore::ImageBufferData::getData):
2648         (WebCore::ImageBufferData::putData):
2649
2650 2012-04-30  Levi Weintraub  <leviw@chromium.org>
2651
2652         Add absoluteValue method for LayoutUnits to allow overloading abs()
2653         https://bugs.webkit.org/show_bug.cgi?id=85214
2654
2655         Reviewed by Eric Seidel.
2656
2657         Adding an absoluteValue free inline function that operates on LayoutUnits, which
2658         allows us to have one function signature for ints or FractionalLayoutUnits. We
2659         can't simply add a FractionalLayoutUnit flavor of abs because it confuses
2660         some compilers due to the implicit FractionalLayoutUnit constructors that take
2661         ints and floats.
2662
2663         No new tests. No change in behavior.
2664
2665         * page/SpatialNavigation.cpp:
2666         (WebCore::distanceDataForNode):
2667         * rendering/LayoutTypes.h:
2668         (WebCore::absoluteValue):
2669         (WebCore):
2670         * rendering/RenderBlockLineLayout.cpp:
2671         (WebCore::RenderBlock::checkPaginationAndFloatsAtEndLine):
2672         * rendering/RenderLineBoxList.cpp:
2673         (WebCore::RenderLineBoxList::rangeIntersectsRect):
2674         * rendering/RenderObject.cpp:
2675         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
2676
2677 2012-04-30  Levi Weintraub  <leviw@chromium.org>
2678
2679         Update LayoutUnit usage in InlineFlowBox and RenderWidget
2680         https://bugs.webkit.org/show_bug.cgi?id=85239
2681
2682         Reviewed by Eric Seidel.
2683
2684         Updating LayoutUnit usage in a pair of remaining functions to minimize the remaining work to switching
2685         to FractionalLayoutUnits for layout instead of integers.
2686
2687         No new tests. No change in behavior.
2688
2689         * rendering/InlineFlowBox.cpp:
2690         (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Though stored as a float, the top is always
2691         set to an integer value. When we move to sub-pixel, we need to preserve this. Not preserving this
2692         behavior affects text decorations, most notably underlines.
2693         * rendering/RenderWidget.cpp:
2694         (WebCore::RenderWidget::updateWidgetGeometry): Adding pixel snapping for the content box if it's
2695         not transformed (absoluteContentBox includes pixel snapping), and properly treating the boundingBox
2696         as an IntRect.
2697
2698 2012-04-30  Levi Weintraub  <leviw@chromium.org>
2699
2700         Prepare RenderDeprecatedFlexibleBox for sub-pixel layout
2701         https://bugs.webkit.org/show_bug.cgi?id=85217
2702
2703         Reviewed by Eric Seidel.
2704
2705         Bailing from the space distribution loop in layoutHorizontal/VerticalBox when
2706         the remaining space falls below one pixel. This has no effect in whole-pixel
2707         layout, but avoids unnecessary work/infinite loops in the sub-pixel case.
2708
2709         No new tests. No change in behavior.
2710
2711         * rendering/RenderDeprecatedFlexibleBox.cpp:
2712         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2713         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2714
2715 2012-04-30  Ryosuke Niwa  <rniwa@webkit.org>
2716
2717         NULL ptr in WebCore::Range::getBorderAndTextQuads
2718         https://bugs.webkit.org/show_bug.cgi?id=77218
2719
2720         Reviewed by Eric Seidel.
2721
2722         The crash was caused by a malformed range obtained within an event handler of mutation events
2723         (DOMNodeRemovedFromDocument). Because this range wasn't updated per node removal, range functions
2724         end up not behaving well.
2725
2726         Fixed the bug by changing the order of the notifications in ContainerNode::willRemoveChild.
2727         We now fire mutation events first before updating ranges so that any range created inside those
2728         event handlers can also be updated prior to the actual node removal.
2729
2730         Test: fast/dom/Range/range-created-in-mutation-event-crash.xhtml
2731
2732         * dom/ContainerNode.cpp:
2733         (WebCore::willRemoveChild):
2734
2735 2012-04-30  Anders Carlsson  <andersca@apple.com>
2736
2737         ScrollingCoordinator::requestScrollPositionUpdate should not update the main frame scroll position
2738         https://bugs.webkit.org/show_bug.cgi?id=85240
2739         <rdar://problem/11286609>
2740
2741         Reviewed by Sam Weinig.
2742
2743         The call to updateMainFrameScrollPosition was added to make the WebKit2 find overlay work, since it relies
2744         on scroll position updates being synchronous. Change the find code in WebKit2 to handle asynchronous scroll
2745         position updates and remove the call to updateMainFrameScrollPosition.
2746
2747         * page/scrolling/ScrollingCoordinator.cpp:
2748         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
2749
2750 2012-04-30  Anders Carlsson  <andersca@apple.com>
2751
2752         Add a way to asynchronously call a function once the scroll position of a page has been updated
2753         https://bugs.webkit.org/show_bug.cgi?id=85237
2754
2755         Reviewed by Sam Weinig.
2756
2757         * WebCore.exp.in:
2758         Export functions needed by WebKit2.
2759
2760         * page/scrolling/ScrollingCoordinator.h:
2761         Make commitTreeStateIfNeeded public.
2762
2763 2012-04-30  Kentaro Hara  <haraken@chromium.org>
2764
2765         WebGLRenderingContext methods should throw TypeError for not enough arguments
2766         https://bugs.webkit.org/show_bug.cgi?id=84787
2767
2768         Reviewed by Kenneth Russell.
2769
2770         Currently, WebGLRenderingcontext methods implement
2771         "Not enough arguments" error as SyntaxError. The Web IDL
2772         spec requires that it should be TypeError:
2773         http://www.w3.org/TR/WebIDL/#dfn-overload-resolution-algorithm
2774
2775         This patch changes SyntaxError to TypeError.
2776
2777         I wanted to confirm the behavior of Firefox and Opera,
2778         but they do not implement WebGL yet.
2779
2780         Test: fast/canvas/webgl/webgl-exceptions.html
2781
2782         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2783         (WebCore::getObjectParameter):
2784         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
2785         (WebCore::JSWebGLRenderingContext::getExtension):
2786         (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
2787         (WebCore::JSWebGLRenderingContext::getParameter):
2788         (WebCore::JSWebGLRenderingContext::getProgramParameter):
2789         (WebCore::JSWebGLRenderingContext::getShaderParameter):
2790         (WebCore::JSWebGLRenderingContext::getUniform):
2791         (WebCore::dataFunctionf):
2792         (WebCore::dataFunctioni):
2793         (WebCore::dataFunctionMatrix):
2794         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2795         (WebCore::getObjectParameter):
2796         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
2797         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
2798         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
2799         (WebCore::V8WebGLRenderingContext::getParameterCallback):
2800         (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
2801         (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
2802         (WebCore::V8WebGLRenderingContext::getUniformCallback):
2803         (WebCore::vertexAttribAndUniformHelperf):
2804         (WebCore::uniformHelperi):
2805         (WebCore::uniformMatrixHelper):
2806
2807 2012-04-30  Emil A Eklund  <eae@chromium.org>
2808
2809         [gtk, qt, chromium, win] Fix usage of LayoutUnits and rounding in platform code
2810         https://bugs.webkit.org/show_bug.cgi?id=85222
2811
2812         Reviewed by Eric Seidel.
2813
2814         Update platform code to use the pixel snapped values for painting rects
2815         to line up with device pixels and change platform specific hit testing
2816         code to use roundedPoint as hit testing is still mostly done on integer
2817         bounds.
2818
2819         No new tests, no change in functionality.
2820
2821         * platform/qt/RenderThemeQt.cpp:
2822         (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
2823         * platform/win/PopupMenuWin.cpp:
2824         (WebCore::PopupMenuWin::paint):
2825         * rendering/RenderThemeChromiumSkia.cpp:
2826         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
2827         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
2828         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
2829
2830 2012-04-30  Kentaro Hara  <haraken@chromium.org>
2831
2832         [V8][JSC] Remove hard-coded "Not enough arguments" errors
2833         https://bugs.webkit.org/show_bug.cgi?id=85207
2834
2835         Reviewed by Sam Weinig.
2836
2837         In bug 85022 and bug 85097, we implemented
2838         createNotEnoughArgumentsError() in JSC and
2839         V8Proxy::throwNotEnoughArgumentsError() in V8 and partially
2840         removed hard-coded "Not enough arguments" errors.
2841         This patch removes hard-coded "Not enough arguments"
2842         errors by using the helper methods.
2843
2844         No tests. No change in behavior.
2845
2846         * bindings/js/JSAudioContextCustom.cpp:
2847         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
2848         * bindings/js/JSSVGLengthCustom.cpp:
2849         (WebCore::JSSVGLength::convertToSpecifiedUnits):
2850         * bindings/js/JSWebSocketCustom.cpp:
2851         (WebCore::JSWebSocketConstructor::constructJSWebSocket):
2852         (WebCore::JSWebSocket::send):
2853         * bindings/js/JSXMLHttpRequestCustom.cpp:
2854         (WebCore::JSXMLHttpRequest::open):
2855         * bindings/v8/ScriptController.cpp:
2856         (WebCore::setValueAndClosePopupCallback):
2857         * bindings/v8/custom/V8AudioContextCustom.cpp:
2858         (WebCore::V8AudioContext::constructorCallback):
2859         * bindings/v8/custom/V8SVGLengthCustom.cpp:
2860         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
2861         * bindings/v8/custom/V8WebSocketCustom.cpp:
2862         (WebCore::V8WebSocket::constructorCallback):
2863         (WebCore::V8WebSocket::sendCallback):
2864         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2865         (WebCore::V8XMLHttpRequest::openCallback):
2866
2867 2012-04-30  Benjamin Poulain  <benjamin@webkit.org>
2868
2869         Add String::startsWith() and endsWith() for string literals
2870         https://bugs.webkit.org/show_bug.cgi?id=85154
2871
2872         Reviewed by Darin Adler.
2873
2874         Update WebCore to use the simpler startsWith() and endsWith() taking
2875         a UChar.
2876
2877         * css/CSSParser.cpp:
2878         (WebCore::CSSParser::markPropertyEnd):
2879         * css/WebKitCSSKeyframeRule.cpp:
2880         (WebCore::StyleKeyframe::parseKeyString):
2881         * editing/markup.cpp:
2882         (WebCore::createFragmentFromText):
2883         * html/HTMLObjectElement.cpp:
2884         (WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
2885         * html/HTMLTextFormControlElement.cpp:
2886         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2887         * inspector/ContentSearchUtils.cpp:
2888         (WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
2889         * inspector/InspectorCSSAgent.cpp:
2890         (WebCore::InspectorCSSAgent::SetPropertyTextAction::redo):
2891         * loader/MainResourceLoader.cpp:
2892         (WebCore::MainResourceLoader::substituteMIMETypeFromPluginDatabase):
2893         * loader/appcache/ManifestParser.cpp:
2894         (WebCore::parseManifest):
2895         * platform/blackberry/CookieManager.cpp:
2896         (WebCore::CookieManager::shouldRejectForSecurityReason):
2897         * platform/posix/FileSystemPOSIX.cpp:
2898         (WebCore::pathByAppendingComponent):
2899         * plugins/PluginDatabase.cpp:
2900         (WebCore::PluginDatabase::findPlugin):
2901         * svg/SVGStopElement.cpp:
2902         (WebCore::SVGStopElement::parseAttribute):
2903         * svg/animation/SVGSMILElement.cpp:
2904         (WebCore::SVGSMILElement::parseOffsetValue):
2905         (WebCore::SVGSMILElement::parseCondition):
2906
2907 2012-04-30  Abhishek Arya  <inferno@chromium.org>
2908
2909         Remove positioned float code.
2910         https://bugs.webkit.org/show_bug.cgi?id=84795
2911
2912         Reviewed by Dan Bernstein.
2913
2914         Backout r92004 and some pieces from r91702.
2915
2916         Test: fast/block/float/positioned-float-crash.html
2917
2918         * css/CSSParser.cpp:
2919         (WebCore::isValidKeywordPropertyAndValue):
2920         * css/CSSPrimitiveValueMappings.h:
2921         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2922         (WebCore::CSSPrimitiveValue::operator EFloat):
2923         * css/CSSValueKeywords.in:
2924         * rendering/RenderBlock.cpp:
2925         (WebCore::RenderBlock::RenderBlock):
2926         (WebCore::RenderBlock::layoutBlock):
2927         (WebCore::RenderBlock::addOverflowFromFloats):
2928         (WebCore::RenderBlock::layoutBlockChild):
2929         (WebCore::RenderBlock::simplifiedLayout):
2930         (WebCore::RenderBlock::layoutPositionedObjects):
2931         (WebCore::RenderBlock::insertFloatingObject):
2932         (WebCore::RenderBlock::positionNewFloats):
2933         (WebCore::RenderBlock::clearFloats):
2934         (WebCore::RenderBlock::FloatingObjects::clear):
2935         (WebCore::RenderBlock::FloatingObjects::increaseObjectsCount):
2936         (WebCore::RenderBlock::FloatingObjects::decreaseObjectsCount):
2937         * rendering/RenderBlock.h:
2938         (RenderBlock):
2939         (WebCore::RenderBlock::forceLayoutInlineChildren):
2940         (FloatingObject):
2941         (WebCore::RenderBlock::FloatingObject::FloatingObject):
2942         (WebCore::RenderBlock::hasOverhangingFloats):
2943         (WebCore::RenderBlock::FloatingObjects::FloatingObjects):
2944         (FloatingObjects):
2945         * rendering/RenderBox.cpp:
2946         (WebCore::RenderBox::updateBoxModelInfoFromStyle):
2947         * rendering/RenderDeprecatedFlexibleBox.cpp:
2948         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2949         * rendering/RenderDeprecatedFlexibleBox.h:
2950         (RenderDeprecatedFlexibleBox):
2951         * rendering/RenderFlexibleBox.cpp:
2952         (WebCore::RenderFlexibleBox::layoutBlock):
2953         * rendering/RenderFlexibleBox.h:
2954         (RenderFlexibleBox):
2955         * rendering/RenderLayer.cpp:
2956         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
2957         * rendering/style/RenderStyleConstants.h:
2958
2959 2012-04-29  Sam Weinig  <sam@webkit.org>
2960
2961         Remove BlobBuilder
2962         https://bugs.webkit.org/show_bug.cgi?id=84036
2963
2964         Reviewed by Anders Carlsson.
2965
2966         * GNUmakefile.am:
2967         * fileapi/WebKitBlobBuilder.idl:
2968         * page/DOMWindow.idl:
2969         * workers/WorkerContext.idl:
2970         Make exposing the WebKitBlobBuilder JS object conditional on a new
2971         ENABLE_LEGACY_WEBKIT_BLOB_BUILDER flag. Don't enable this for the Mac,
2972         but do for everyone else.
2973
2974 2012-04-30  Anders Carlsson  <andersca@apple.com>
2975
2976         Add a barrier-style dispatch member function to ScrollingThread
2977         https://bugs.webkit.org/show_bug.cgi?id=85228
2978
2979         Reviewed by Sam Weinig.
2980
2981         Add a ScrollingThread::dispatchBarrier function which takes a WTF::Function and dispatches it to the main thread
2982         once all the currently scheduled scrolling thread functions have run. This is to be used for synchronization between the
2983         scrolling thread and the main thread.
2984
2985         * page/scrolling/ScrollingThread.cpp:
2986         (WebCore::callFunctionOnMainThread):
2987         (WebCore):
2988         (WebCore::ScrollingThread::dispatchBarrier):
2989         * page/scrolling/ScrollingThread.h:
2990         (ScrollingThread):
2991
2992 2012-04-30  Min Qin  <qinmin@google.com>
2993
2994         Expose a flag so that fullscreen video on android can work with FULLSCREEN_API
2995         https://bugs.webkit.org/show_bug.cgi?id=84414
2996
2997         Reviewed by Darin Fisher.
2998
2999         No tests, just exposing the flag, and will be used by android later.
3000         Sorry, there is a merge error during the previous commit, resolved now
3001
3002         * platform/graphics/MediaPlayer.cpp:
3003         (WebCore::MediaPlayer::setControls):
3004         (WebCore):
3005         (WebCore::MediaPlayer::enterFullscreen):
3006         (WebCore::MediaPlayer::exitFullscreen):
3007         * platform/graphics/MediaPlayer.h:
3008         (MediaPlayer):
3009         * platform/graphics/MediaPlayerPrivate.h:
3010         (MediaPlayerPrivateInterface):
3011         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
3012
3013 2012-04-30  Nate Chapin  <japhet@chromium.org>
3014
3015         Move more of committing and starting to write a Document
3016         to DocumentLoader.
3017         https://bugs.webkit.org/show_bug.cgi?id=83908
3018
3019         Reviewed by Adam Barth.
3020
3021         No new tests, refactor only.
3022
3023         * loader/DocumentLoader.cpp:
3024         (WebCore::DocumentLoader::commitIfReady): Ignore m_gotFirstByte here, since
3025             it was always true here anyway.
3026         (WebCore::DocumentLoader::finishedLoading): If we are finishing an empty
3027             document, create the document now, so that FrameLoaderClient doesn't
3028             have to do it later (FrameLoaderClient code will be removed in a later
3029             patch).
3030         (WebCore::DocumentLoader::commitData): Call receivedFirstData() directly and
3031             do some work receivedFirstData() used to do, setEncoding() only once per
3032             load.
3033         (WebCore::DocumentLoader::receivedData):
3034         (WebCore::DocumentLoader::maybeCreateArchive):
3035         * loader/DocumentLoader.h:
3036         * loader/DocumentWriter.cpp:
3037         (WebCore::DocumentWriter::setEncoding):
3038         * loader/FrameLoader.cpp:
3039         (WebCore::FrameLoader::receivedFirstData): Move DocumentLoader calls
3040             to DocumentLoader.
3041         * loader/FrameLoader.h: Remove m_hasReceivedFirstData and willSetEncoding(),
3042             allow hasReceivedData() to be called directly.
3043         (FrameLoader):
3044
3045 2012-04-30  Kentaro Hara  <haraken@chromium.org>
3046
3047         Unreviewed. Fix test crashes in Win/Linux debug builds.
3048
3049         * bindings/v8/V8LazyEventListener.cpp:
3050         (WebCore::V8LazyEventListener::V8LazyEventListener):
3051         (WebCore::V8LazyEventListener::prepareListenerObject):
3052         * bindings/v8/V8LazyEventListener.h:
3053         (V8LazyEventListener):
3054
3055 2012-04-30  Tommy Widenflycht  <tommyw@google.com>
3056
3057         MediaStream API: Change LocalMediaStream::stop to be synchronous
3058         https://bugs.webkit.org/show_bug.cgi?id=84942
3059
3060         Reviewed by Dimitri Glazkov.
3061
3062         Since I changed LocalMediaStream to be a ActiveDOMObject recently the stop()
3063         behaviour needs to change since it is no longer a good idea to start a timer when called.
3064
3065         Not possible to write a test for this.
3066
3067         * Modules/mediastream/LocalMediaStream.cpp:
3068         (WebCore::LocalMediaStream::LocalMediaStream):
3069         (WebCore::LocalMediaStream::stop):
3070         * Modules/mediastream/LocalMediaStream.h:
3071         (LocalMediaStream):
3072
3073 2012-04-28  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
3074
3075         Add ENABLE_SUBPIXEL_LAYOUT controlling FractionalLayoutUnit denominator
3076         https://bugs.webkit.org/show_bug.cgi?id=85146
3077
3078         Reviewed by Eric Seidel.
3079
3080         Add a new flag for controlling the fixed point denominator in
3081         FractionalLayoutUnit. Controls whether the denominator is set to 60 or 1.
3082         Until we change the LayoutUnit typedef this change will have no effect.
3083
3084         No new tests, no change in functionality.
3085
3086         * platform/FractionalLayoutUnit.h:
3087         (WebCore):
3088         (WebCore::FractionalLayoutUnit::operator++):
3089         (WebCore::operator/):
3090         (WebCore::operator+):
3091         Add ++, / double and and + double operators. These are needed when
3092         ENABLE_SUBPIXEL_LAYOUT is not enabled.
3093         
3094         * platform/graphics/FractionalLayoutRect.cpp:
3095         (WebCore::enclosingFractionalLayoutRect):
3096
3097 2012-04-30  Justin Schuh  <jschuh@chromium.org>
3098
3099         loadOrRedirectSubframe should return the owner element's frame
3100         https://bugs.webkit.org/show_bug.cgi?id=84780
3101
3102         Reviewed by Nate Chapin.
3103
3104         Test: fast/loader/javascript-url-iframe-remove-on-navigate.html
3105
3106         * loader/SubframeLoader.cpp:
3107         (WebCore::SubframeLoader::loadOrRedirectSubframe):
3108
3109 2012-04-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3110
3111         Use Vector<Attribute> directly instead of encapsulating it in AttributeVector
3112         https://bugs.webkit.org/show_bug.cgi?id=84413
3113
3114         Reviewed by Andreas Kling.
3115
3116         As commented in https://bugs.webkit.org/show_bug.cgi?id=79963#c16 we do not
3117         usually subclass basic types like Vector. This patch changes code to use
3118         Vector<Attribute> directly and move around the functionality of the former
3119         methods to more specific helper functions or inline code at the callers.
3120
3121         * dom/Element.cpp:
3122         (WebCore::Element::parserSetAttributes):
3123         (WebCore::Element::normalizeAttributes):
3124         * dom/Element.h:
3125         (Element):
3126         * dom/ElementAttributeData.cpp:
3127         * dom/ElementAttributeData.h:
3128         (WebCore::findAttributeInVector):
3129         (WebCore::ElementAttributeData::getAttributeItem):
3130         (ElementAttributeData):
3131         (WebCore::ElementAttributeData::attributeVector):
3132         (WebCore::ElementAttributeData::clonedAttributeVector):
3133         (WebCore::ElementAttributeData::getAttributeItemIndex):
3134         (WebCore):
3135         * html/parser/HTMLConstructionSite.cpp:
3136         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
3137         * html/parser/HTMLToken.h:
3138         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3139         * html/parser/HTMLTreeBuilder.cpp:
3140         (WebCore::HTMLTreeBuilder::processFakeStartTag):
3141         (WebCore::HTMLTreeBuilder::attributesForIsindexInput): Loop through the attributes
3142         backwards so we can remove items without affecting the rest of the loop run.
3143         * html/parser/HTMLTreeBuilder.h:
3144         * html/parser/TextDocumentParser.cpp:
3145         (WebCore::TextDocumentParser::insertFakePreElement):
3146         * xml/XMLErrors.cpp:
3147         (WebCore::createXHTMLParserErrorHeader):
3148         (WebCore::XMLErrors::insertErrorMessageBlock):
3149         * xml/parser/MarkupTokenBase.h:
3150         (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
3151         (WebCore::AtomicMarkupTokenBase::getAttributeItem):
3152         (WebCore::AtomicMarkupTokenBase::attributes):
3153         (AtomicMarkupTokenBase):
3154         (WebCore::::initializeAttributes):
3155         * xml/parser/XMLToken.h:
3156         (WebCore::AtomicXMLToken::AtomicXMLToken):
3157
3158 2012-04-30  Mark Pilgrim  <pilgrim@chromium.org>
3159
3160         [Chromium] Remove PlatformSupport::loadPlatformAudioResource, call loadResource directly
3161         https://bugs.webkit.org/show_bug.cgi?id=85193
3162
3163         Reviewed by Kentaro Hara.
3164
3165         Part of a refactoring series. See tracking bug 82948.
3166
3167         * platform/audio/chromium/AudioBusChromium.cpp:
3168         (WebCore::AudioBus::loadPlatformResource):
3169         * platform/chromium/PlatformSupport.h:
3170         (PlatformSupport):
3171
3172 2012-04-30  Mark Pilgrim  <pilgrim@chromium.org>
3173
3174         [Chromium] Call defaultLocale directly
3175         https://bugs.webkit.org/show_bug.cgi?id=85192
3176
3177         Reviewed by Kentaro Hara.
3178
3179         Part of a refactoring series. See tracking bug 82948.
3180
3181         * platform/chromium/LanguageChromium.cpp:
3182         (WebCore::platformLanguage):
3183         * platform/chromium/PlatformSupport.h:
3184         (PlatformSupport):
3185
3186 2012-04-30  Beth Dakin  <bdakin@apple.com>
3187
3188         https://bugs.webkit.org/show_bug.cgi?id=82922
3189         border-image with image-set does not render correctly when viewed at 
3190         2x
3191         -and corresponding-
3192         <rdar://problem/11167820>
3193
3194         Reviewed by Dan Bernstein.
3195
3196         StyleImage::computeIntrinsicDimensions() is only called from one 
3197         place: RenderBoxModelObject::calculateIntrinsicDimensions(), and that 
3198         is only used for background images and border images. In my original 
3199         image-set work, I decided that 
3200         StyleCachedImageSet::computeIntrinsicDimensions() would compute 
3201         "intrinsic" dimensions, meaning that they would compute the dimensions 
3202         that the image resource was pretending to be rather than the actual 
3203         dimensions of the resource. I chose to do this because it made 
3204         background images work great without changing the call-site. But border 
3205         images need to know the actual intrinsic dimensions, so this design 
3206         decision (which was admittedly questionable from the start) won't 
3207         stick.
3208         
3209         This patch makes StyleImage::computeIntrinsicDimensions() return 
3210         actual intrinsic dimensions. Then the border-image and background-
3211         image code is very lightly patched to account for the image's scale 
3212         factor.
3213
3214         These functions no longer need the scale factor parameter.
3215         * loader/cache/CachedImage.cpp:
3216         (WebCore::CachedImage::computeIntrinsicDimensions):
3217         * loader/cache/CachedImage.h:
3218         (CachedImage):
3219         * platform/graphics/GeneratedImage.h:
3220         (GeneratedImage):
3221         * platform/graphics/GeneratorGeneratedImage.cpp:
3222         (WebCore::GeneratedImage::computeIntrinsicDimensions):
3223         * platform/graphics/Image.cpp:
3224         (WebCore::Image::computeIntrinsicDimensions):
3225         * platform/graphics/Image.h:
3226         (Image):
3227         * platform/graphics/cg/PDFDocumentImage.cpp:
3228         (WebCore::PDFDocumentImage::computeIntrinsicDimensions):
3229         * platform/graphics/cg/PDFDocumentImage.h:
3230         (PDFDocumentImage):
3231         * svg/graphics/SVGImage.cpp:
3232         (WebCore::SVGImage::computeIntrinsicDimensions):
3233         * svg/graphics/SVGImage.h:
3234         (SVGImage):
3235         * rendering/style/StyleCachedImageSet.cpp:
3236         (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
3237         
3238         New function on StyleImage returns the image's scale factor. 
3239         * rendering/style/StyleCachedImageSet.h:
3240         (WebCore::StyleCachedImageSet::imageScaleFactor):
3241         * rendering/style/StyleImage.h:
3242         (WebCore::StyleImage::imageScaleFactor):
3243
3244         Scale the intrinsic size of the background image down by the scale 
3245         factor.
3246         * rendering/RenderBoxModelObject.cpp:
3247         (WebCore::RenderBoxModelObject::calculateFillTileSize):
3248         
3249         Slices should be multiplied by the image's scale factor since they are 
3250         always expected to the specified in the 1x image's coordinate space.
3251         (WebCore::RenderBoxModelObject::paintNinePieceImage):
3252
3253 2012-04-30  Arko Saha  <arko@motorola.com>
3254
3255         Remove custom bindings code in JSHTMLCollectionCustom.cpp for HTMLPropertiesCollection.
3256         https://bugs.webkit.org/show_bug.cgi?id=85172
3257
3258         Reviewed by Kentaro Hara.
3259
3260         Use [JSGenerateToJSObject] in HTMLPropertiesCollection.idl, so that it can generate toJS()
3261         in JSHTMLPropertiesCollection.cpp automatically.
3262
3263         * bindings/js/JSHTMLCollectionCustom.cpp:
3264         (WebCore::toJS):
3265         * html/HTMLPropertiesCollection.idl:
3266
3267 2012-04-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
3268
3269         [Texmap] TextureMapperLayer uses intermediate surfaces too eagerly
3270         https://bugs.webkit.org/show_bug.cgi?id=85103
3271
3272         Reviewed by Kenneth Rohde Christiansen.
3273
3274         Instead of automatically using an intermediate surface for layers with opacity and
3275         children, we limit surface usage for layers with more than one child and for layers with
3276         one child and contents of its own.
3277
3278         This prevents us from using intermediate surfaces in cases where a single layer with
3279         opacity has a single descendant with content, in which case normal blending can be used.
3280
3281         Covered by existing compositing layout tests.
3282
3283         * platform/graphics/texmap/TextureMapperLayer.cpp:
3284         (WebCore):
3285         * platform/graphics/texmap/TextureMapperLayer.h:
3286
3287 2012-04-30  Yi Shen  <yi.4.shen@nokia.com>
3288
3289         Inserting a paragraph between quoted lines in editing/deleting/delete-4038408-fix.html doesn't work
3290         https://bugs.webkit.org/show_bug.cgi?id=78193
3291
3292         Reviewed by Ryosuke Niwa.
3293
3294         When pasting a copied portion of a blockquote with a newline at the end into an unquoted area,
3295         the newline is inserted after the blockquote since we don't want it also to be quoted. However,
3296         this behavior has also applied when we insert a paragraph between quoted lines, which is incorrect.
3297         To figure out the right place to insert a paragraph, we need providing more information to the
3298         InsertParagraphSeparatorCommand by introducing a boolean parameter "pasteBlockqutoeIntoUnquotedArea".
3299
3300         Tests: editing/inserting/insert-paragraph-separator-in-blockquote.html
3301                editing/pasteboard/paste-wrapped-blockquote-into-nonblockquote.html
3302
3303         * editing/CompositeEditCommand.cpp:
3304         (WebCore::CompositeEditCommand::insertParagraphSeparator):
3305         * editing/CompositeEditCommand.h:
3306         (CompositeEditCommand):
3307         * editing/InsertParagraphSeparatorCommand.cpp:
3308         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
3309         (WebCore::InsertParagraphSeparatorCommand::doApply):
3310         * editing/InsertParagraphSeparatorCommand.h:
3311         (WebCore::InsertParagraphSeparatorCommand::create):
3312         (InsertParagraphSeparatorCommand):
3313         * editing/ReplaceSelectionCommand.cpp:
3314         (WebCore::ReplaceSelectionCommand::doApply):
3315
3316 2012-04-30  Antti Koivisto  <antti@apple.com>
3317
3318         Protect current element in HTMLLinkElement::setCSSStyleSheet
3319         https://bugs.webkit.org/show_bug.cgi?id=85166
3320
3321         Reviewed by Andreas Kling.
3322         
3323         Stylesheet loading can trigger script execution.
3324         
3325         Test: fast/css/cached-sheet-restore-crash.html
3326
3327         * html/HTMLLinkElement.cpp:
3328         (WebCore::HTMLLinkElement::setCSSStyleSheet):
3329
3330 2012-04-29  Keishi Hattori  <keishi@webkit.org>
3331
3332         Build fix for LocalizedDateMac.mm
3333         https://bugs.webkit.org/show_bug.cgi?id=85164
3334
3335         Reviewed by Kent Tamura.
3336
3337         * platform/text/mac/LocalizedDateMac.mm:
3338         (WebCore::monthLabels):
3339
3340 2012-04-29  Luke Macpherson  <macpherson@chromium.org>
3341
3342         Initialize member variables in CSSParser's constructor.
3343         https://bugs.webkit.org/show_bug.cgi?id=84377
3344
3345         Reviewed by Kentaro Hara.
3346
3347         It is good practice not to leave member variables uninitialized. They make debugging more difficult by reducing
3348         repeatability, and in some cases lead to the possibility of information leakage occuring. This patch simply adds
3349         initialization of m_numParsedPropertiesBeforeMarginBox to CSSParser's constructor to INVALID_NUM_PARSED_PROPERTIES
3350         so that the initial state is the same as the state after the properties are cleared.
3351
3352         No tests added because this is a code style fix, not an actual bug so long as the bison generated code calls
3353         startDeclarationsForMarginBox() and endDeclarationsForMarginBox() symmetrically. The lack of initialization was
3354         originally detected by coverity.
3355
3356         * css/CSSParser.cpp:
3357         (WebCore::CSSParser::CSSParser):
3358
3359 2012-04-29  Kent Tamura  <tkent@chromium.org>
3360
3361         [Mac] Add LocalizedDateMac
3362         https://bugs.webkit.org/show_bug.cgi?id=85039
3363
3364         Reviewed by Kentaro Hara.
3365
3366         A date shown <input type=date> should be formatted for user's OS
3367         settings. Chromium-Mac used LocalizedDateICU.cpp to format/parse visible
3368         date strings and it didn't reflect user-settings.
3369
3370         Test: covered by fast/forms/date/date-appearance.html
3371
3372         * WebCore.gyp/WebCore.gyp:
3373         Use LocalizedDateMac.mm for OS X instead of LocalizedDateICU.cpp.
3374         * WebCore.gypi: Add LocalizedDateMac.mm
3375         * platform/text/mac/LocalizedDateMac.mm: Added.
3376         (WebCore::createShortDateFormatter):
3377         Creates a NSDateFormatter with desired settings.
3378         (WebCore::parseLocalizedDate): Impelment for tyep=date.
3379         (WebCore::formatLocalizedDate): ditto.
3380         (WebCore::isYearSymbol): A readability helper for format string parsing.
3381         (WebCore::isMonthSymbol): ditto.
3382         (WebCore::isDaySymbol): ditto.
3383         (WebCore::localizeDateFormat):
3384         Parse a format string, and replace symbols with user-friendly labels.
3385         (WebCore::localizedDateFormatText):
3386         Gets a format string, and apply localizeDateFormat().
3387         (WebCore::monthLabels): Obtain month names from the system.
3388         (WebCore::weekDayShortLabels): Obtain week day symbols from the system.
3389         (WebCore::firstDayOfWeek): Obtain first day of week from the system.
3390         * platform/text/ICULocale.cpp:
3391         (WebCore::createFallbackMonthLabels): Uses WTF::monthFullName.
3392
3393 2012-04-29  Sam Weinig  <sam@webkit.org>
3394
3395         Add support for the Blob constructor (Part 2)
3396         https://bugs.webkit.org/show_bug.cgi?id=84555
3397
3398         Address additional feedback on Blob construction.
3399         - Add exception when the dictionary is not an object.
3400         - Ensure the proper ordering of dictionary access. Tested via
3401           throwing exceptions in toString, and ensuring correct one is
3402           fired first.
3403         - Changed type of exception throw for invalid enumeration to a
3404           TypeError.
3405
3406         Reviewed by Kentaro Hara.
3407
3408         Updated fast/files/blob-constructor.html to be more comprehensive.
3409
3410         * bindings/js/JSBlobCustom.cpp:
3411         (WebCore::JSBlobConstructor::constructJSBlob):
3412         * bindings/v8/custom/V8BlobCustom.cpp:
3413         (WebCore::V8Blob::constructorCallback):
3414
3415 2012-04-29  No'am Rosenthal  <noam.rosenthal@nokia.com>
3416
3417         [Texmap] Leaves demo: wrong geometry when opacity animation kicks in
3418         https://bugs.webkit.org/show_bug.cgi?id=85096
3419
3420         Reviewed by Kenneth Rohde Christiansen.
3421
3422         We should use combined() instead of combinedForChildren() since we don't allow
3423         intermediate surfaces for preserves-3d. Also, we should apply the offset before
3424         multiplying the transforms, otherwise the transform-origin is incorrect.
3425
3426         Covered by existing compositing tests.
3427
3428         * platform/graphics/texmap/TextureMapperLayer.cpp:
3429         (WebCore::TextureMapperLayer::paintSelf):
3430         (WebCore::TextureMapperLayer::paintRecursive):
3431
3432 2012-04-29  Mark Pilgrim  <pilgrim@chromium.org>
3433
3434         [Chromium] Call highUsageDeltaMB directly
3435         https://bugs.webkit.org/show_bug.cgi?id=84844
3436
3437         Reviewed by Kentaro Hara.
3438
3439         Part of a refactoring series. See tracking bug 82948.
3440
3441         * bindings/v8/V8GCController.cpp:
3442         (WebCore::V8GCController::checkMemoryUsage):
3443         * platform/MemoryUsageSupport.cpp:
3444         (WebCore):
3445         (WebCore::MemoryUsageSupport::highUsageDeltaMB):
3446         * platform/MemoryUsageSupport.h:
3447         (MemoryUsageSupport):
3448         * platform/chromium/MemoryUsageSupportChromium.cpp:
3449         (WebCore::MemoryUsageSupport::highUsageDeltaMB):
3450         (WebCore):
3451         * platform/chromium/PlatformSupport.h:
3452         (PlatformSupport):
3453
3454 2012-04-29  Kentaro Hara  <haraken@chromium.org>
3455
3456         REGRESSION(r113086): onresize event handler can be deleted in popup window
3457         https://bugs.webkit.org/show_bug.cgi?id=84908
3458
3459         Reviewed by Ojan Vafai.
3460
3461         In a nutshell, an onresize event handler in the popup window
3462         can be non-deterministically deleted. For more details, please
3463         look at Chromium issue 123642:
3464         http://code.google.com/p/chromium/issues/detail?id=123642
3465
3466         I confirmed that this bug is the regression caused by r113086.
3467
3468         r113086 introduced the following code:
3469
3470         void V8LazyEventListener::prepareListenerObject(...) {
3471             if (hasExistingListenerObject())
3472                 return;
3473             ...;
3474             // Since we only parse once, there's no need to keep data
3475             // used for parsing around anymore.
3476             m_functionName = String();
3477             m_code = String();
3478             m_eventParameterName = String();
3479             m_sourceURL = String();
3480
3481             setListenerObject(wrappedFunction);
3482         }
3483
3484         This is not correct. The parsing can be done more than once,
3485         and thus we cannot clear data. This patch removes the above code.
3486
3487         Consider the following situation:
3488
3489         (1) Assume '<body onresize="f()"></body>'.
3490         (2) prepareListenerObject() runs.
3491         (3) Since this is the first parsing, hasExistingListenerObject()
3492         returns false. After the parsing, the listener object is set
3493         by setListenerObject().
3494         (4) GC runs. Since there is no strong reference to the listener
3495         object, weakEventListenerCallback() is called back, and the listener
3496         object is disposed.
3497         (5) A resize event is triggered.
3498         (6) prepareListenerObject() is called again. Since the listener object
3499         is already disposed, hasExistingListenerObject() returns false,
3500         and the second parsing starts.
3501
3502         In my investigation, the above situation is happening in the reported
3503         Chromium bug. Anyway, I am sure that potentially the parsing can be
3504         done more than once, and thus we must keep m_xxxx data.
3505
3506         However, this is just a temporary fix. We should fix the code so that
3507         an alive event listener object is never reclaimed.
3508         See https://bugs.webkit.org/show_bug.cgi?id=85152 for more details.
3509
3510         No tests: I tried hard to create a DRT test, but could not.
3511         The bug depends on the behavior of GC, and thus the reported bug is
3512         non-deterministic. For example, (as explained in the Chromium issue,)
3513         the bug does not happen if we load an HTML from network because
3514         the network latency hides the bug. Also the bug happens in the
3515         popup window only. If we open the reported HTML in the main window,
3516         we cannot reproduce the bug.
3517
3518         * bindings/v8/V8LazyEventListener.cpp:
3519         (WebCore::V8LazyEventListener::prepareListenerObject):
3520
3521 2012-04-28  Sam Weinig  <sam@webkit.org>
3522
3523         Smooth scrolling needs a new key
3524         <rdar://problem/11331632>
3525
3526         Reviewed by Geoffrey Garen.
3527
3528         * platform/mac/ScrollAnimatorMac.mm:
3529         (WebCore::scrollAnimationEnabledForSystem):
3530         (WebCore::ScrollAnimatorMac::scroll):
3531         Update for new key.
3532
3533 2012-04-28  Li Yin  <li.yin@intel.com>
3534
3535         MessagePort must set m_closed to be true at the end of MessagePort::close function
3536         https://bugs.webkit.org/show_bug.cgi?id=85139
3537
3538         In the function MessagePort::close, the "m_closed = true" must be executed at the end, not at the beginning.
3539         Or, the m_entangledChannel->close() will not be executed.
3540         And it resulted in the failure of MS bench mark messagechannel_close.htm.
3541         http://samples.msdn.microsoft.com/ietestcenter/WebWorkers/messagechannel_close.htm
3542
3543         Reviewed by Kentaro Hara.
3544
3545         Test: fast/events/message-port-close.html
3546
3547         * dom/MessagePort.cpp:
3548         (WebCore::MessagePort::close):
3549
3550 2012-04-28  Sam Weinig  <sam@webkit.org>
3551
3552         And again.
3553
3554         * bindings/v8/custom/V8BlobCustom.cpp:
3555         (WebCore::V8Blob::constructorCallback):
3556
3557 2012-04-28  Sam Weinig  <sam@webkit.org>
3558
3559         Once again, try to make these puppies work.
3560
3561         * bindings/v8/custom/V8BlobCustom.cpp:
3562
3563 2012-04-28  Sam Weinig  <sam@webkit.org>
3564
3565         Fix the Chromium build.
3566
3567         * bindings/v8/custom/V8BlobCustom.cpp:
3568         (WebCore::V8Blob::constructorCallback):
3569
3570 2012-04-27  Sam Weinig  <sam@webkit.org>
3571
3572         Add support for the Blob constructor
3573         https://bugs.webkit.org/show_bug.cgi?id=84555
3574
3575         Reviewed by Maciej Stachowiak.
3576
3577         Test: fast/files/blob-constructor.html
3578
3579         This adds an implementation of the Blob constructor that willfully
3580         violates the W3C Editor’s Draft 29 February 2012 in the following ways:
3581         - Elements in the parts array are coerced to DOMStrings https://www.w3.org/Bugs/Public/show_bug.cgi?id=16721 
3582         - Don't throw for invalid key in the dictionary https://www.w3.org/Bugs/Public/show_bug.cgi?id=16727
3583         - Values for the endings property are treated as enums https://www.w3.org/Bugs/Public/show_bug.cgi?id=16729 
3584
3585         * bindings/js/JSBlobCustom.cpp:
3586         (WebCore::JSBlobConstructor::constructJSBlob):
3587         Implement blob constructor.
3588
3589         * bindings/v8/custom/V8BlobCustom.cpp:
3590         (WebCore::V8Blob::constructorCallback):
3591         Implement blob constructor.
3592
3593         * fileapi/Blob.idl:
3594         Add constructor to IDL.
3595
3596         * workers/WorkerContext.idl:
3597         Add Blob constructor to the worker global object.
3598
3599 2012-04-28  Igor Oliveira  <igor.o@sisa.samsung.com>
3600
3601         Move PropertyWrapper out of the  AnimationBase
3602         https://bugs.webkit.org/show_bug.cgi?id=84978
3603
3604         Reviewed by Dean Jackson.
3605
3606         AnimationBase is a complex class. It has a state machine and a bunch of
3607         property handlers. This patch moves the property handlers to a separate
3608         class making AnimationBase simpler.
3609
3610         * CMakeLists.txt:
3611         * GNUmakefile.list.am:
3612         * Target.pri:
3613         * WebCore.gypi:
3614         * WebCore.vcproj/WebCore.vcproj:
3615         * WebCore.xcodeproj/project.pbxproj:
3616         * page/animation/AnimationBase.cpp:
3617         * page/animation/AnimationBase.h:
3618         (AnimationBase):
3619         * page/animation/AnimationController.cpp:
3620         (WebCore::AnimationController::supportsAcceleratedAnimationOfProperty):
3621         * page/animation/CSSPropertyAnimation.cpp: Added.
3622         (WebCore):
3623         (WebCore::blendFunc):
3624         (WebCore::crossfadeBlend):
3625         (AnimationPropertyWrapperBase):
3626         (WebCore::AnimationPropertyWrapperBase::AnimationPropertyWrapperBase):
3627         (WebCore::AnimationPropertyWrapperBase::~AnimationPropertyWrapperBase):
3628         (WebCore::AnimationPropertyWrapperBase::isShorthandWrapper):
3629         (WebCore::AnimationPropertyWrapperBase::property):
3630         (WebCore::AnimationPropertyWrapperBase::animationIsAccelerated):
3631         (WebCore::addPropertyWrapper):
3632         (WebCore::wrapperForProperty):
3633         (PropertyWrapperGetter):
3634         (WebCore::PropertyWrapperGetter::PropertyWrapperGetter):
3635         (WebCore::PropertyWrapperGetter::equals):
3636         (PropertyWrapper):
3637         (WebCore::PropertyWrapper::PropertyWrapper):
3638         (WebCore::PropertyWrapper::blend):
3639         (RefCountedPropertyWrapper):
3640         (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
3641         (WebCore::RefCountedPropertyWrapper::blend):
3642         (StyleImagePropertyWrapper):
3643         (WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
3644         (WebCore::StyleImagePropertyWrapper::equals):
3645         (PropertyWrapperColor):
3646         (WebCore::PropertyWrapperColor::PropertyWrapperColor):
3647         (WebCore::PropertyWrapperColor::blend):
3648         (PropertyWrapperAcceleratedOpacity):
3649         (WebCore::PropertyWrapperAcceleratedOpacity::PropertyWrapperAcceleratedOpacity):
3650         (WebCore::PropertyWrapperAcceleratedOpacity::animationIsAccelerated):
3651         (WebCore::PropertyWrapperAcceleratedOpacity::blend):
3652         (PropertyWrapperAcceleratedTransform):
3653         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
3654         (WebCore::PropertyWrapperAcceleratedTransform::animationIsAccelerated):
3655         (WebCore::PropertyWrapperAcceleratedTransform::blend):
3656         (PropertyWrapperAcceleratedFilter):
3657         (WebCore::PropertyWrapperAcceleratedFilter::PropertyWrapperAcceleratedFilter):
3658         (WebCore::PropertyWrapperAcceleratedFilter::animationIsAccelerated):
3659         (WebCore::PropertyWrapperAcceleratedFilter::blend):
3660         (WebCore::shadowListLength):
3661         (WebCore::shadowForBlending):
3662         (PropertyWrapperShadow):
3663         (WebCore::PropertyWrapperShadow::PropertyWrapperShadow):
3664         (WebCore::PropertyWrapperShadow::equals):
3665         (WebCore::PropertyWrapperShadow::blend):
3666         (WebCore::PropertyWrapperShadow::blendSimpleOrMatchedShadowLists):
3667         (WebCore::PropertyWrapperShadow::blendMismatchedShadowLists):
3668         (PropertyWrapperMaybeInvalidColor):
3669         (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor):
3670         (WebCore::PropertyWrapperMaybeInvalidColor::equals):
3671         (WebCore::PropertyWrapperMaybeInvalidColor::blend):
3672         (PropertyWrapperVisitedAffectedColor):
3673         (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
3674         (WebCore::PropertyWrapperVisitedAffectedColor::equals):
3675         (WebCore::PropertyWrapperVisitedAffectedColor::blend):
3676         (FillLayerAnimationPropertyWrapperBase):
3677         (WebCore::FillLayerAnimationPropertyWrapperBase::FillLayerAnimationPropertyWrapperBase):
3678         (WebCore::FillLayerAnimationPropertyWrapperBase::~FillLayerAnimationPropertyWrapperBase):
3679         (FillLayerPropertyWrapperGetter):
3680         (WebCore::FillLayerPropertyWrapperGetter::FillLayerPropertyWrapperGetter):
3681         (WebCore::FillLayerPropertyWrapperGetter::equals):
3682         (FillLayerPropertyWrapper):
3683         (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
3684         (WebCore::FillLayerPropertyWrapper::blend):
3685         (FillLayerRefCountedPropertyWrapper):
3686         (WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper):
3687         (WebCore::FillLayerRefCountedPropertyWrapper::blend):
3688         (FillLayerStyleImagePropertyWrapper):
3689         (WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper):
3690         (WebCore::FillLayerStyleImagePropertyWrapper::equals):
3691         (FillLayersPropertyWrapper):
3692         (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
3693         (WebCore::FillLayersPropertyWrapper::equals):
3694         (WebCore::FillLayersPropertyWrapper::blend):
3695         (ShorthandPropertyWrapper):
3696         (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper):
3697         (WebCore::ShorthandPropertyWrapper::isShorthandWrapper):
3698         (WebCore::ShorthandPropertyWrapper::equals):
3699         (WebCore::ShorthandPropertyWrapper::blend):
3700         (WebCore::ShorthandPropertyWrapper::propertyWrappers):
3701         (PropertyWrapperFlex):
3702         (WebCore::PropertyWrapperFlex::PropertyWrapperFlex):
3703         (WebCore::PropertyWrapperFlex::equals):
3704         (WebCore::PropertyWrapperFlex::blend):
3705         (PropertyWrapperSVGPaint):
3706         (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):
3707         (WebCore::PropertyWrapperSVGPaint::equals):
3708         (WebCore::PropertyWrapperSVGPaint::blend):
3709         (WebCore::addShorthandProperties):
3710         (WebCore::CSSPropertyAnimation::ensurePropertyMap):
3711         (WebCore::gatherEnclosingShorthandProperties):
3712         (WebCore::CSSPropertyAnimation::blendProperties):
3713         (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
3714         (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
3715         (WebCore::CSSPropertyAnimation::propertiesEqual):
3716         (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
3717         (WebCore::CSSPropertyAnimation::getNumProperties):
3718         * page/animation/CSSPropertyAnimation.h: Added.
3719         (WebCore):
3720         (CSSPropertyAnimation):
3721         * page/animation/CompositeAnimation.cpp:
3722         (WebCore::CompositeAnimation::updateTransitions):
3723         (WebCore::CompositeAnimation::pauseTransitionAtTime):
3724         * page/animation/ImplicitAnimation.cpp:
3725         (WebCore::ImplicitAnimation::animate):
3726         (WebCore::ImplicitAnimation::getAnimatedStyle):
3727         (WebCore::ImplicitAnimation::isTargetPropertyEqual):
3728         (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
3729         (WebCore::ImplicitAnimation::timeToNextService):
3730         * page/animation/KeyframeAnimation.cpp:
3731         (WebCore::KeyframeAnimation::animate):
3732         (WebCore::KeyframeAnimation::getAnimatedStyle):
3733         (WebCore::KeyframeAnimation::timeToNextService):
3734         * rendering/style/RenderStyle.h:
3735
3736 2012-04-28  Geoffrey Garen  <ggaren@apple.com>
3737
3738         Clarified JSGlobalData (JavaScript VM) lifetime
3739         https://bugs.webkit.org/show_bug.cgi?id=85142
3740
3741         Reviewed by Anders Carlsson.
3742
3743         * bindings/js/WorkerScriptController.cpp:
3744         (WebCore::WorkerScriptController::~WorkerScriptController): Slightly 
3745         simpler than before. We can't just rely on our default destructor 
3746         because we need to hold the JSLock when we tear down the VM.
3747
3748         * bridge/NP_jsobject.cpp:
3749         (_NPN_InvokeDefault):
3750         (_NPN_Invoke):
3751         (_NPN_Evaluate):
3752         (_NPN_Construct): Don't RefPtr<> the JSGlobalData because it makes it 
3753         seem like you know something the rest of our code doesn't know. The 
3754         plugin JSGlobalData is immortal, anyway.
3755
3756         I also removed some timeout checker related code because that feature 
3757         doesn't work anymore, so it was effectively dead code.
3758
3759 2012-04-28  Ilya Tikhonovsky  <loislo@chromium.org>
3760
3761         Web Inspector: InspectorFrontendHost.append has to be implemented for saving heap snapshots.
3762         https://bugs.webkit.org/show_bug.cgi?id=85137
3763
3764         We can save a file with help of InspectorFrontendHost.save method,
3765         but it is suitable only for relatively small portions of data and
3766         can't process the 6Gb heap snapshot.
3767         These methods just pass the url and content into embedder.
3768
3769         Reviewed by Yury Semikhatsky.
3770
3771         * inspector/InspectorFrontendClient.h:
3772         (InspectorFrontendClient):
3773         * inspector/InspectorFrontendClientLocal.h:
3774         (WebCore::InspectorFrontendClientLocal::append):
3775         * inspector/InspectorFrontendHost.cpp:
3776         (WebCore::InspectorFrontendHost::append):
3777         (WebCore):
3778         * inspector/InspectorFrontendHost.h:
3779         (InspectorFrontendHost):
3780         * inspector/InspectorFrontendHost.idl:
3781
3782 2012-04-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
3783
3784         [Qt][Texmap] Error of cross-compiling webkit with Qt 4.8.1
3785         https://bugs.webkit.org/show_bug.cgi?id=84321
3786
3787         Speculative build-fix for Qt 4.8.
3788         Use QGLContext for Qt 4.x instead of the platform-specific context.
3789
3790         Reviewed by Simon Hausmann.
3791
3792         No new tests, build fix.
3793
3794         * platform/graphics/texmap/TextureMapperGL.cpp:
3795         (SharedGLData):
3796         (WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):
3797
3798 2012-04-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
3799
3800         [Texmap] Falling leaves demo missing opacity fade out animation
3801         https://bugs.webkit.org/show_bug.cgi?id=83691
3802
3803         Reviewed by Martin Robinson.
3804
3805         The bug originated from clearing an intermediate surface with glClear while the scissor
3806         state was wrong.
3807         When using intermediate surfaces, maintain a clip-stack for each surface, rather than
3808         a single clip-stack for the whole scene. When a surface is bound, its clip stack should
3809         be applied.
3810
3811         Covered by existing compositing tests.
3812
3813         * platform/graphics/texmap/TextureMapperGL.cpp:
3814         (SharedGLData):
3815         (WebCore::TextureMapperGL::ClipStack::push):
3816         (WebCore):
3817         (WebCore::TextureMapperGL::ClipStack::pop):
3818         (WebCore::scissorClip):
3819         (WebCore::TextureMapperGL::ClipStack::apply):
3820         (WebCore::TextureMapperGL::clipStack):
3821         (WebCore::TextureMapperGL::beginPainting):
3822         (WebCore::TextureMapperGL::drawTexture):
3823         (WebCore::BitmapTextureGL::didReset):
3824         (WebCore::BitmapTextureGL::clearIfNeeded):
3825         (WebCore::BitmapTextureGL::createFboIfNeeded):
3826         (WebCore::BitmapTextureGL::bind):
3827         (WebCore::TextureMapperGL::bindDefaultSurface):
3828         (WebCore::TextureMapperGL::bindSurface):
3829         (WebCore::TextureMapperGL::beginScissorClip):
3830         (WebCore::TextureMapperGL::beginClip):
3831         (WebCore::TextureMapperGL::endClip):
3832         * platform/graphics/texmap/TextureMapperGL.h:
3833         (TextureMapperGL):
3834         (ClipState):
3835         (WebCore::TextureMapperGL::ClipState::ClipState):
3836         (ClipStack):
3837         (WebCore::TextureMapperGL::ClipStack::current):
3838         (WebCore::TextureMapperGL::ClipStack::clear):
3839         (BitmapTextureGL):
3840         (WebCore::BitmapTextureGL::BitmapTextureGL):
3841
3842 2012-04-26  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
3843
3844         Move Length and CSS length computation to float
3845         https://bugs.webkit.org/show_bug.cgi?id=84801
3846
3847         Reviewed by Eric Seidel.
3848
3849         Change Length and CSS length computation to floating point. This gets us
3850         closer to the goal of supporting subpixel layout and improves precision
3851         for SVG which already uses floating point for its layout.
3852
3853         This change makes computedStyle return fractional values for pixel values
3854         if a fraction is specified. It also changes the result of computations
3855         where two or more values with fractional precision. Prior to this change
3856         the result of Length(2.9) + Length(2.9) would be 4 as each value would be
3857         floored. With this change the result is 5 as the addition is done with
3858         floating point precision and then the result will be floored. Once we
3859         enable subpixel layout the resulting value in this example would be 5.8.
3860
3861         Updated existing layout tests.
3862
3863         * css/CSSComputedStyleDeclaration.cpp:
3864         (WebCore::zoomAdjustedPixelValue):
3865         * css/CSSPrimitiveValue.cpp:
3866         (WebCore::CSSPrimitiveValue::computeLength):
3867         * css/CSSPrimitiveValue.h:
3868         (WebCore):
3869         (WebCore::roundForImpreciseConversion):
3870         Add specialized float version of roundForImpreciseConversion that matches
3871         the int versions rounding logic.
3872         
3873         If a value is sufficiently close to the next integer round it up to
3874         ensure that a style rule such as "width: 4.999px" evaluates to 5px
3875         instead of 4px. This is needed as, although Lengths are using floating
3876         point, the layout system still uses integer precision and floors the
3877         Length values.
3878         This will change once we move to FractionalLayoutUnits but for now this
3879         is needed to ensure compatibility with the existing system and tests.
3880         
3881         Without this specialized rounding logic we fail a handful of tests
3882         including acid3.
3883         
3884         * platform/Length.h:
3885         (WebCore::Length::value):
3886         (Length):
3887         (WebCore::Length::intValue):
3888         * rendering/RenderTableCell.cpp:
3889         (WebCore::RenderTableCell::styleOrColLogicalWidth):
3890
3891 2012-04-28  Alexander Pavlov  <apavlov@chromium.org>
3892
3893         Web Inspector: Enable touch events feature fails touch feature detection
3894         https://bugs.webkit.org/show_bug.cgi?id=84397
3895
3896         Whenever the touch emulation is enabled, Inspector adds a script to evaluate on load,
3897         that adds ontouch(start|end|move|cancel) properties to window.__proto__ and document.__proto__.
3898
3899         Reviewed by Pavel Feldman.
3900
3901         * inspector/front-end/DOMAgent.js:
3902         (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.get if):
3903         (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.scriptAddedCallback):
3904         (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged):
3905         * inspector/front-end/inspector.js:
3906
3907 2012-04-28  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3908
3909         Web Inspector: Shortcuts screen UI polish
3910         https://bugs.webkit.org/show_bug.cgi?id=84708
3911
3912           1) remove inconsistent shadow;
3913           2) reduce border radius;
3914           3) vertically center the “X” button;
3915           4) replace unreadable symbolic shortcuts with text;
3916           5) gaps / colors / opacity adjustments;
3917           6) section-to-column distribution algorithm is replaced with a fair one.
3918
3919         Reviewed by Pavel Feldman.
3920
3921         This is a UI polising patch, so no new tests added.
3922
3923         * English.lproj/localizedStrings.js: added keyboars arrow keys items
3924         * inspector/front-end/KeyboardShortcut.js: replace unreadable symbolic shortcuts with text
3925         * inspector/front-end/ShortcutsScreen.js:
3926         (WebInspector.ShortcutsScreen):
3927         (WebInspector.ShortcutsScreen.prototype.show): remove redundant parameter
3928         (WebInspector.ShortcutsScreen.prototype._buildTable): change section distributing algorithm
3929         (WebInspector.ShortcutsSection.prototype.renderSection): render colon with margins
3930         (WebInspector.ShortcutsSection.prototype._renderHeader): apply classname to th elements
3931         * inspector/front-end/helpScreen.css:
3932         (.help-window-main): reduce radius, remove shadow; tune color and opacity
3933         (.help-window-caption): fix spacing; add ruler
3934         (.help-window-title): fix spacing; remove ruler
3935         (.help-content): fix spacing
3936         (.help-close-button): fix spacing; adjust background color
3937         (.help-column-table): fix spacing
3938         (.help-table > tr > th): fix color
3939         (.help-key): fix color
3940         (.help-combine-keys, .help-key-delimiter): extract common style
3941         (.help-combine-keys): remove dupe
3942         (.help-section-title): add space between sections
3943
3944 2012-04-28  Noel Gordon  <noel.gordon@gmail.com>
3945
3946         Remove PlatformTouchPointQt.cpp PlatformTouchEventQt.cpp from the gyp projects
3947         https://bugs.webkit.org/show_bug.cgi?id=85132
3948
3949         Unreviewed VS2010 gyp project generation fix.
3950
3951         PlatformTouchPointQt.cpp and PlatformTouchEventQt.cpp were removed in r115312,
3952         so remove them from the gyp projects.
3953
3954         * WebCore.gypi:
3955
3956 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
3957
3958         <animateTransform type="scale"> should use '0' as effective from value not '1', if no base value is specified and from is not given
3959         https://bugs.webkit.org/show_bug.cgi?id=85133
3960
3961         It should start from scale=0. I had that fixed before, but it got lost during merging. Restore the fix.
3962         See bug 85051, for more context why this is correct.
3963
3964         Tests: svg/animations/animateTransform-by-scale-1-expected.svg
3965                svg/animations/animateTransform-by-scale-1.svg
3966
3967         * svg/SVGAnimatedTransformList.cpp:
3968         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
3969
3970 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
3971
3972         SVGAnimateColorElement doesn't support by/to animations properly
3973         https://bugs.webkit.org/show_bug.cgi?id=36704
3974
3975         Reviewed by Antti Koivisto.
3976
3977         Switch AnimatedColorAnimator to use the standard animateAdditiveNumber() method, taking progress & repeatCount into account.
3978         This gives us accumulation/repeatCount support for free.
3979
3980         We just animate the four color components on their own now and clamp once at the end after addition/accumulation finished.
3981         Import <animateColor> tests from Dr. Olaf Hoffmanns SVG Animation test suite, which all pass now.
3982
3983         While I was at it, remove the includeSMILProperties boolean from computeCSSPropertyValue - we always use the computed style
3984         without SMIL effects included, whenever we want to retrieve the "base value", or handle "inherit/currentColor".
3985
3986         Tests: svg/animations/animateColor-additive-2a-expected.svg
3987                svg/animations/animateColor-additive-2a.svg
3988                svg/animations/animateColor-additive-2b-expected.svg
3989                svg/animations/animateColor-additive-2b.svg
3990                svg/animations/animateColor-additive-2c-expected.svg
3991                svg/animations/animateColor-additive-2c.svg
3992                svg/animations/animateColor-additive-2d-expected.svg
3993                svg/animations/animateColor-additive-2d.svg
3994
3995         * svg/ColorDistance.cpp:
3996         (WebCore::ColorDistance::clampColor):
3997         (WebCore::ColorDistance::addColors):
3998         (WebCore::ColorDistance::addToColor):
3999         * svg/ColorDistance.h:
4000         (ColorDistance):
4001         * svg/SVGAnimateElement.cpp:
4002         (WebCore::SVGAnimateElement::resetToBaseValue):
4003         * svg/SVGAnimatedColor.cpp:
4004         (WebCore::SVGAnimatedColorAnimator::addAnimatedTypes):
4005         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
4006         * svg/SVGAnimationElement.cpp:
4007         (WebCore::SVGAnimationElement::computeCSSPropertyValue):
4008         (WebCore::SVGAnimationElement::adjustForInheritance):
4009         * svg/SVGAnimationElement.h:
4010         (SVGAnimationElement):
4011
4012 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
4013
4014         Not reviewed. Fix Qt build -- I was too quick.
4015
4016         * rendering/svg/SVGPathData.cpp: Add back Path.h include.
4017
4018 2012-04-28  Nikolas Zimmermann  <nzimmermann@rim.com>
4019
4020         Rename SVGPathParserFactory to SVGPathUtilities and remove the obsolete singleton
4021         https://bugs.webkit.org/show_bug.cgi?id=85129