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