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