6a0b2da6a5780abac6d4253e4540a459d82e4fa7
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-13  Nikolas Zimmermann  <nzimmermann@rim.com>
2
3         SVG Animations update baseVal instead of animVal
4         https://bugs.webkit.org/show_bug.cgi?id=12437
5
6         Reviewed by Dirk Schulze.
7
8         Blind fix for some GC related assertions firing on v8.
9
10         Assure that animationStarted/animationEnded calls are happening
11         on the same SVGAnimatedProperty. Always call animationEnded(),
12         even if we shouldn't do anything for the target element, as its
13         destructed, as we still have to reset m_isAnimating.
14
15         * svg/SVGAnimateElement.cpp:
16         (WebCore::SVGAnimateElement::SVGAnimateElement):
17         (WebCore::SVGAnimateElement::resetToBaseValue):
18         (WebCore::SVGAnimateElement::targetElementWillChange):
19         * svg/SVGAnimateElement.h:
20         (SVGAnimateElement):
21         * svg/properties/SVGAnimatedPropertyTearOff.h:
22         (WebCore::SVGAnimatedPropertyTearOff::animationEnded):
23
24 2012-03-13  Mark Pilgrim  <pilgrim@chromium.org>
25
26         Move DirectoryEntry and DirectoryReader to new Modules/filesystem/ directory
27         https://bugs.webkit.org/show_bug.cgi?id=80625
28
29         Reviewed by Adam Barth.
30
31         No new tests, all existing tests pass.
32
33         * CMakeLists.txt:
34         * DerivedSources.make:
35         * DerivedSources.pri:
36         * GNUmakefile.am:
37         * GNUmakefile.list.am:
38         * Modules/filesystem: Added.
39         * Modules/filesystem/DirectoryEntry.cpp: Copied from Source/WebCore/fileapi/DirectoryEntry.cpp.
40         * Modules/filesystem/DirectoryEntry.h: Copied from Source/WebCore/fileapi/DirectoryEntry.h.
41         * Modules/filesystem/DirectoryEntry.idl: Copied from Source/WebCore/fileapi/DirectoryEntry.idl.
42         * Modules/filesystem/DirectoryEntrySync.cpp: Copied from Source/WebCore/fileapi/DirectoryEntrySync.cpp.
43         * Modules/filesystem/DirectoryEntrySync.h: Copied from Source/WebCore/fileapi/DirectoryEntrySync.h.
44         * Modules/filesystem/DirectoryEntrySync.idl: Copied from Source/WebCore/fileapi/DirectoryEntrySync.idl.
45         * Modules/filesystem/DirectoryReader.cpp: Copied from Source/WebCore/fileapi/DirectoryReader.cpp.
46         * Modules/filesystem/DirectoryReader.h: Copied from Source/WebCore/fileapi/DirectoryReader.h.
47         * Modules/filesystem/DirectoryReader.idl: Copied from Source/WebCore/fileapi/DirectoryReader.idl.
48         * Modules/filesystem/DirectoryReaderBase.h: Copied from Source/WebCore/fileapi/DirectoryReaderBase.h.
49         * Modules/filesystem/DirectoryReaderSync.cpp: Copied from Source/WebCore/fileapi/DirectoryReaderSync.cpp.
50         * Modules/filesystem/DirectoryReaderSync.h: Copied from Source/WebCore/fileapi/DirectoryReaderSync.h.
51         * Modules/filesystem/DirectoryReaderSync.idl: Copied from Source/WebCore/fileapi/DirectoryReaderSync.idl.
52         * Target.pri:
53         * WebCore.gyp/WebCore.gyp:
54         * WebCore.gypi:
55         * WebCore.pri:
56         * WebCore.vcproj/WebCore.vcproj:
57         * WebCore.xcodeproj/project.pbxproj:
58         * fileapi/DirectoryEntry.cpp: Removed.
59         * fileapi/DirectoryEntry.h: Removed.
60         * fileapi/DirectoryEntry.idl: Removed.
61         * fileapi/DirectoryEntrySync.cpp: Removed.
62         * fileapi/DirectoryEntrySync.h: Removed.
63         * fileapi/DirectoryEntrySync.idl: Removed.
64         * fileapi/DirectoryReader.cpp: Removed.
65         * fileapi/DirectoryReader.h: Removed.
66         * fileapi/DirectoryReader.idl: Removed.
67         * fileapi/DirectoryReaderBase.h: Removed.
68         * fileapi/DirectoryReaderSync.cpp: Removed.
69         * fileapi/DirectoryReaderSync.h: Removed.
70         * fileapi/DirectoryReaderSync.idl: Removed.
71
72 2012-03-13  Igor Oliveira  <igor.o@sisa.samsung.com>
73
74         animation-iteration-count does not handle floating point values correctly.
75         https://bugs.webkit.org/show_bug.cgi?id=69531
76
77         Implements support for non-integers animation-iteration-count numbers.
78         Non-integer numbers will cause the animation to end part-way through a cycle.
79
80         Reviewed by Dean Jackson.
81
82         Tests: animations/fill-mode-iteration-count-non-integer.html
83                animations/keyframes-iteration-count-non-integer.html
84
85         * css/CSSComputedStyleDeclaration.cpp:
86         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
87         * css/CSSParser.cpp:
88         (WebCore::CSSParser::parseAnimationIterationCount):
89         * css/CSSStyleApplyProperty.cpp:
90         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
91         * css/CSSStyleSelector.cpp:
92         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
93         * page/animation/AnimationBase.cpp:
94         (WebCore::AnimationBase::fractionalTime):
95         (WebCore::AnimationBase::progress):
96         * page/animation/CompositeAnimation.cpp:
97         (WebCore::CompositeAnimation::pauseAnimationAtTime):
98         * platform/animation/Animation.h:
99         (WebCore::Animation::iterationCount):
100         (WebCore::Animation::setIterationCount):
101         (Animation):
102         (WebCore::Animation::initialAnimationIterationCount):
103
104 2012-03-13  Tommy Widenflycht  <tommyw@google.com>
105
106         MediaStream API: Rename PeerConnection to DeprecatedPeerConnection
107         https://bugs.webkit.org/show_bug.cgi?id=80692
108
109         Reviewed by Adam Barth.
110
111         First patch in a series of patches to change the PeerConnection from ROAP to JSEP,
112         see bug 80589 for more information.
113
114         Patch covered by modified existing tests.
115
116         * GNUmakefile.list.am:
117         * Modules/mediastream/DOMWindowMediaStream.idl:
118         * Modules/mediastream/DeprecatedPeerConnection.cpp: Renamed from Source/WebCore/Modules/mediastream/PeerConnection.cpp.
119         (WebCore):
120         (WebCore::DeprecatedPeerConnection::create):
121         (WebCore::DeprecatedPeerConnection::DeprecatedPeerConnection):
122         (WebCore::DeprecatedPeerConnection::~DeprecatedPeerConnection):
123         (WebCore::DeprecatedPeerConnection::processSignalingMessage):
124         (WebCore::DeprecatedPeerConnection::readyState):
125         (WebCore::DeprecatedPeerConnection::send):
126         (WebCore::DeprecatedPeerConnection::addStream):
127         (WebCore::DeprecatedPeerConnection::removeStream):
128         (WebCore::DeprecatedPeerConnection::localStreams):
129         (WebCore::DeprecatedPeerConnection::remoteStreams):
130         (WebCore::DeprecatedPeerConnection::close):
131         (WebCore::DeprecatedPeerConnection::didCompleteICEProcessing):
132         (WebCore::DeprecatedPeerConnection::didGenerateSDP):
133         (WebCore::DeprecatedPeerConnection::didReceiveDataStreamMessage):
134         (WebCore::DeprecatedPeerConnection::didAddRemoteStream):
135         (WebCore::DeprecatedPeerConnection::didRemoveRemoteStream):
136         (WebCore::DeprecatedPeerConnection::interfaceName):
137         (WebCore::DeprecatedPeerConnection::scriptExecutionContext):
138         (WebCore::DeprecatedPeerConnection::stop):
139         (WebCore::DeprecatedPeerConnection::eventTargetData):
140         (WebCore::DeprecatedPeerConnection::ensureEventTargetData):
141         (WebCore::DeprecatedPeerConnection::scheduleInitialNegotiation):
142         (WebCore::DeprecatedPeerConnection::initialNegotiationTimerFired):
143         (WebCore::DeprecatedPeerConnection::ensureStreamChangeScheduled):
144         (WebCore::DeprecatedPeerConnection::streamChangeTimerFired):
145         (WebCore::DeprecatedPeerConnection::scheduleReadyStateChange):
146         (WebCore::DeprecatedPeerConnection::readyStateChangeTimerFired):
147         (WebCore::DeprecatedPeerConnection::changeReadyState):
148         * Modules/mediastream/DeprecatedPeerConnection.h: Renamed from Source/WebCore/Modules/mediastream/PeerConnection.h.
149         (WebCore):
150         (DeprecatedPeerConnection):
151         (WebCore::DeprecatedPeerConnection::didChangeState):
152         (WebCore::DeprecatedPeerConnection::refEventTarget):
153         (WebCore::DeprecatedPeerConnection::derefEventTarget):
154         * Modules/mediastream/DeprecatedPeerConnection.idl: Renamed from Source/WebCore/Modules/mediastream/PeerConnection.idl.
155         * Modules/mediastream/SignalingCallback.h:
156         (WebCore):
157         (SignalingCallback):
158         * Modules/mediastream/SignalingCallback.idl:
159         * WebCore.gypi:
160         * bindings/generic/RuntimeEnabledFeatures.h:
161         (WebCore::RuntimeEnabledFeatures::webkitDeprecatedPeerConnectionEnabled):
162         * bindings/js/JSDeprecatedPeerConnectionCustom.cpp: Renamed from Source/WebCore/bindings/js/JSPeerConnectionCustom.cpp.
163         (WebCore):
164         (WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection):
165         * dom/EventTarget.h:
166         (WebCore):
167         * dom/EventTargetFactory.in:
168         * platform/mediastream/DeprecatedPeerConnectionHandler.h: Renamed from Source/WebCore/platform/mediastream/PeerConnectionHandler.h.
169         (WebCore):
170         (DeprecatedPeerConnectionHandler):
171         * platform/mediastream/DeprecatedPeerConnectionHandlerClient.h: Renamed from Source/WebCore/platform/mediastream/PeerConnectionHandlerClient.h.
172         (WebCore):
173         (DeprecatedPeerConnectionHandlerClient):
174         (WebCore::DeprecatedPeerConnectionHandlerClient::~DeprecatedPeerConnectionHandlerClient):
175         * platform/mediastream/gstreamer/DeprecatedPeerConnectionHandler.cpp: Renamed from Source/WebCore/platform/mediastream/gstreamer/PeerConnectionHandler.cpp.
176         (WebCore):
177         (WebCore::DeprecatedPeerConnectionHandler::create):
178         (WebCore::DeprecatedPeerConnectionHandler::DeprecatedPeerConnectionHandler):
179         (WebCore::DeprecatedPeerConnectionHandler::~DeprecatedPeerConnectionHandler):
180         (WebCore::DeprecatedPeerConnectionHandler::produceInitialOffer):
181         (WebCore::DeprecatedPeerConnectionHandler::handleInitialOffer):
182         (WebCore::DeprecatedPeerConnectionHandler::processSDP):
183         (WebCore::DeprecatedPeerConnectionHandler::processPendingStreams):
184         (WebCore::DeprecatedPeerConnectionHandler::sendDataStreamMessage):
185         (WebCore::DeprecatedPeerConnectionHandler::stop):
186
187 2012-03-13  Pavel Feldman  <pfeldman@chromium.org>
188
189         Web Inspector: front-end compilation was broken while supporting large arrays.
190         https://bugs.webkit.org/show_bug.cgi?id=81013
191
192         Reviewed by Vsevolod Vlasov.
193
194         * inspector/front-end/ExtensionPanel.js:
195         * inspector/front-end/ObjectPropertiesSection.js:
196         (WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties.buildObjectFragment):
197         * inspector/front-end/RemoteObject.js:
198
199 2012-03-13  Tony Chang  <tony@chromium.org>
200
201         flexbox's computePreferredLogicalWidth needs to take multiline into account
202         https://bugs.webkit.org/show_bug.cgi?id=80931
203
204         Reviewed by Ojan Vafai.
205
206         Tests: css3/flexbox/multiline-shrink-to-fit-expected.html
207                css3/flexbox/multiline-shrink-to-fit.html
208
209         * rendering/RenderFlexibleBox.cpp:
210         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths): Set min/max preferredLogicalWidth based on always breaking or never breaking.
211         (WebCore::RenderFlexibleBox::computeNextFlexLine): Add a FIXME.
212         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Don't change the width after computePreferredWidth has been called.
213
214 2012-03-13  Sheriff Bot  <webkit.review.bot@gmail.com>
215
216         Unreviewed, rolling out r110469.
217         http://trac.webkit.org/changeset/110469
218         https://bugs.webkit.org/show_bug.cgi?id=81010
219
220         This patch still appears to crash (Requested by abarth on
221         #webkit).
222
223         * page/FrameView.cpp:
224         (WebCore::FrameView::FrameView):
225         (WebCore::FrameView::reset):
226         (WebCore::FrameView::repaintContentRectangle):
227         (WebCore):
228         (WebCore::FrameView::endDeferredRepaints):
229         (WebCore::FrameView::doDeferredRepaints):
230         (WebCore::FrameView::deferredRepaintTimerFired):
231         * page/FrameView.h:
232         (FrameView):
233         * rendering/RenderView.cpp:
234         (WebCore::RenderView::shouldRepaint):
235         * svg/graphics/SVGImage.cpp:
236         (WebCore::SVGImage::drawSVGToImageBuffer):
237         (WebCore::SVGImage::draw):
238         * svg/graphics/SVGImage.h:
239         * svg/graphics/SVGImageCache.cpp:
240         (WebCore::SVGImageCache::imageContentChanged):
241         (WebCore::SVGImageCache::redrawTimerFired):
242         * svg/graphics/SVGImageCache.h:
243         (SVGImageCache):
244
245 2012-03-13  Max Vujovic  <mvujovic@adobe.com>
246
247         Add a method to window.internals to enable testing of inspector highlight rects
248         https://bugs.webkit.org/show_bug.cgi?id=80338
249
250         Reviewed by Pavel Feldman.
251
252         Add window.internals.inspectorHighlightRects, a method which makes it possible to test the
253         positions and sizes of inspector highlight rects.
254
255         Test: inspector/elements/highlight-node.html
256
257         * WebCore.exp.in: Export symbols.
258         * testing/Internals.cpp:
259         (WebCore::Internals::inspectorHighlightRects): Call InspectorController::getHighlight and
260         return the highlight's quads as a ClientRectList.
261         (WebCore):
262         * testing/Internals.h:
263         (WebCore):
264         (Internals):
265         * testing/Internals.idl:
266
267             Add inspectorHighlightRects to the window.internals interface.
268
269 2012-03-13  Konrad Piascik  <kpiascik@rim.com>
270
271         [BlackBerry] Remove sublayers before clamping just in case the layer already exists
272         https://bugs.webkit.org/show_bug.cgi?id=80989
273
274         Reviewed by Antonio Gomes.
275
276         Discovered when trying to add a highlight sublayer for web inspector.  Since that layer
277         may already exist in the tree we need to see if it will be pruned before we clamp on the
278         size.
279
280         This was manually tested during the writing of another patch to add web inspector highlights
281         to accelrated compositing.
282
283         * platform/graphics/blackberry/LayerWebKitThread.cpp:
284         (WebCore::LayerWebKitThread::insertSublayer):
285
286 2012-03-13  Vsevolod Vlasov  <vsevik@chromium.org>
287
288         Web Inspector: Add snippets model.
289         https://bugs.webkit.org/show_bug.cgi?id=80863
290
291         Reviewed by Yury Semikhatsky.
292
293         Test: inspector/debugger/snippets-model.html
294
295         * WebCore.gypi:
296         * WebCore.vcproj/WebCore.vcproj:
297         * inspector/compile-front-end.py:
298         * inspector/front-end/Settings.js:
299         (WebInspector.ExperimentsSettings):
300         * inspector/front-end/SnippetsModel.js: Added.
301         * inspector/front-end/WebKit.qrc:
302         * inspector/front-end/inspector.html:
303         * inspector/front-end/inspector.js:
304
305 2012-03-13  'Pavel Feldman'  <pfeldman@chromium.org>
306
307         Not reviewed: chromium build fix.
308
309         * history/CachedFrame.cpp:
310
311 2012-03-13  Peter Rybin  <peter.rybin@gmail.com>
312
313         Web Inspector: CodeGeneratorInspector.py: refactor copy-paste getter methods
314         https://bugs.webkit.org/show_bug.cgi?id=80923
315
316         Reviewed by Yury Semikhatsky.
317
318         Several methods are combined in one using C++ templates.
319
320         * inspector/CodeGeneratorInspector.py:
321
322 2012-03-13  Rob Buis  <rbuis@rim.com>
323
324         [BlackBerry] Fix cast-align warning in QuotesData.cpp
325         https://bugs.webkit.org/show_bug.cgi?id=80601
326
327         Reviewed by Nikolas Zimmermann.
328
329         Fix warning by adding variable of correct return type.
330
331         * rendering/style/QuotesData.cpp:
332         (WebCore::QuotesData::create):
333
334 2012-03-12  Brady Eidson  <beidson@apple.com>
335
336         <rdar://problem/7908830> and https://bugs.webkit.org/show_bug.cgi?id=34679
337         Location and other objects are dysfunctional after a document gets restored from page cache
338
339         Reviewed by Adam Barth.
340
341         Test: fast/loader/window-properties-restored-from-page-cache.html
342
343         Give DOMWindowProperties the ability to reconnect to their Frame:
344         * page/DOMWindowProperty.cpp:
345         (WebCore::DOMWindowProperty::reconnectFrame):
346         * page/DOMWindowProperty.h:
347         (DOMWindowProperty):
348
349         Let ApplicationCache do some extra work when reconnecting:
350         * loader/appcache/DOMApplicationCache.cpp:
351         (WebCore::DOMApplicationCache::reconnectFrame):
352         (WebCore):
353         * loader/appcache/DOMApplicationCache.h:
354         (DOMApplicationCache):
355
356         Let IndexDB do some extra work when reconnecting:
357         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
358         (WebCore::DOMWindowIndexedDatabase::disconnectFrame):
359         (WebCore::DOMWindowIndexedDatabase::reconnectFrame):
360         (WebCore::DOMWindowIndexedDatabase::webkitIndexedDB):
361         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
362         (DOMWindowIndexedDatabase):
363
364         Tell the DOMWindow to suspend to the page cache:
365         * history/CachedFrame.cpp:
366         (WebCore::CachedFrame::CachedFrame):
367
368         Tell the DOMWindow to resume from the page cache:
369         * loader/FrameLoader.cpp:
370         (WebCore::FrameLoader::open):
371
372         * page/DOMWindow.cpp:
373         (WebCore::DOMWindow::DOMWindow):
374         (WebCore::DOMWindow::~DOMWindow): Call clearDOMWindowProperties directly instead of clear()
375         (WebCore::DOMWindow::frameDestroyed): Ditto.
376         (WebCore::DOMWindow::clear): Only clear if the DOMWindow is not suspended for the page cache.
377         (WebCore::DOMWindow::suspendForPageCache): Disconnect properties and set the page cache flag.
378         (WebCore::DOMWindow::resumeFromPageCache): Reconnect properties and revert the page cache flag.
379         (WebCore::DOMWindow::disconnectDOMWindowProperties): Only disconnect the registered properties.
380         (WebCore::DOMWindow::reconnectDOMWindowProperties):
381         (WebCore::DOMWindow::clearDOMWindowProperties): Disconnect the registered properties then clear them out.
382
383         For all of the following, if the DOMWindow is not displayed in a frame (i.e., it is suspended), do nothing:
384         (WebCore::DOMWindow::screen):
385         (WebCore::DOMWindow::history):
386         (WebCore::DOMWindow::crypto):
387         (WebCore::DOMWindow::locationbar):
388         (WebCore::DOMWindow::menubar):
389         (WebCore::DOMWindow::personalbar):
390         (WebCore::DOMWindow::scrollbars):
391         (WebCore::DOMWindow::statusbar):
392         (WebCore::DOMWindow::toolbar):
393         (WebCore::DOMWindow::console):
394         (WebCore::DOMWindow::applicationCache):
395         (WebCore::DOMWindow::navigator):
396         (WebCore::DOMWindow::performance):
397         (WebCore::DOMWindow::location):
398         (WebCore::DOMWindow::sessionStorage):
399         (WebCore::DOMWindow::localStorage):
400         (WebCore::DOMWindow::webkitNotifications):
401         (WebCore::DOMWindow::postMessageTimerFired):
402         (WebCore::DOMWindow::getSelection):
403         (WebCore::DOMWindow::styleMedia):
404         (WebCore::DOMWindow::webkitStorageInfo):
405         * page/DOMWindow.h:
406
407 2012-03-13  Dana Jansens  <danakj@chromium.org>
408
409         [chromium] Use projectQuad to apply inverse mapRect
410         https://bugs.webkit.org/show_bug.cgi?id=80741
411
412         Reviewed by Adrienne Walker.
413
414         Unit test: CCOcclusionTrackerTest3dTransform
415                    CCOcclusionTrackerTestPerspectiveTransform
416                    CCOcclusionTrackerTestPerspectiveTransformBehindCamera
417
418         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
419         (WebCore::projectQuad):
420         (WebCore):
421         (WebCore::computeUnoccludedContentRect):
422
423 2012-03-13  Gavin Peters  <gavinp@chromium.org>
424
425         New PageCache histogram which counts failures ignoring Settings.
426         https://bugs.webkit.org/show_bug.cgi?id=80864
427
428         Reviewed by Brady Eidson.
429
430         Chrome has a command line switch to turn on the page cache.
431         Currently it doesn't work, but it can cause the PageCache reasons
432         for failure count to read lower than it should.  Add a new
433         histogram to report the corrected value.
434
435         * history/PageCache.cpp:
436         (WebCore::logCanCachePageDecision):
437
438 2012-03-13  George Staikos  <staikos@webkit.org>
439
440         Fix signed/unsigned mismatch compiler warnings.
441         https://bugs.webkit.org/show_bug.cgi?id=80790
442
443         Reviewed by Alexey Proskuryakov.
444
445         * loader/icon/IconDatabase.cpp:
446         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
447         * platform/network/MIMESniffing.cpp:
448
449 2012-03-13  Sheriff Bot  <webkit.review.bot@gmail.com>
450
451         Unreviewed, rolling out r110510.
452         http://trac.webkit.org/changeset/110510
453         https://bugs.webkit.org/show_bug.cgi?id=80987
454
455         depends on chromium r 125700, which isn't rolled into webkit
456         yet :-/ (Requested by thakis_ on #webkit).
457
458         * WebCore.gyp/mac/adjust_visibility.sh:
459
460 2012-03-13  Gavin Peters  <gavinp@chromium.org>
461
462         Make ApplicationCacheHost::canCacheInPageCache() non-const.
463         https://bugs.webkit.org/show_bug.cgi?id=80904
464
465         Reviewed by Alexey Proskuryakov.
466
467         A const pointer to a large object like ApplicationCacheHost is not our standard
468         practice; so remove this (implicit) one.  See also https://bugs.webkit.org/show_bug.cgi?id=80898
469
470         * loader/appcache/ApplicationCacheHost.cpp:
471         (WebCore::ApplicationCacheHost::canCacheInPageCache):
472         * loader/appcache/ApplicationCacheHost.h:
473         (ApplicationCacheHost):
474
475 2012-03-13  Stephen Chenney  <schenney@chromium.org>
476
477         Crash in WebCore::GraphicsContext::paintingDisabled
478         https://bugs.webkit.org/show_bug.cgi?id=80669
479
480         Reviewed by Nikolas Zimmermann.
481
482         The SVGImageBufferTools::clipToImageBuffer method deletes the clip
483         image when it thinks it is not needed. However, there are cases when
484         it is in fact still needed, particularly when the clip buffer is
485         coming from higher up in the stack where it may be needed again.
486
487         So this patch adds a flag to only allow deletion of the image buffer
488         if it was created at the most recent call site.
489
490         Tests: svg/custom/circular-clip-path-references-crash-expected.svg
491                svg/custom/circular-clip-path-references-crash.svg
492
493         * rendering/svg/RenderSVGResourceClipper.cpp:
494         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
495         * rendering/svg/RenderSVGResourceGradient.cpp:
496         (WebCore::clipToTextMask):
497         * rendering/svg/RenderSVGResourceMasker.cpp:
498         (WebCore::RenderSVGResourceMasker::applyResource):
499         * rendering/svg/SVGImageBufferTools.cpp:
500         (WebCore::SVGImageBufferTools::clipToImageBuffer):
501         * rendering/svg/SVGImageBufferTools.h:
502         (SVGImageBufferTools):
503
504 2012-03-13  Gavin Peters  <gavinp@chromium.org>
505
506         Fix an enumeration name in ReasonsFrameCannotBeInPageCache.
507         https://bugs.webkit.org/show_bug.cgi?id=80849
508
509         Reviewed by Brady Eidson.
510
511         It seems that somebody goofed, and named one of the
512         ReasonsFrameCannotBeInPageCache antonymically.
513
514         * history/PageCache.cpp:
515         (WebCore::logCanCacheFrameDecision):
516
517 2012-03-12  Kinuko Yasuda  <kinuko@chromium.org>
518
519         File upload control should use File.name() rather than File.path() to show chosen filenames
520         https://bugs.webkit.org/show_bug.cgi?id=80970
521
522         In some rare cases (e.g. files from FileSystem API or files created
523         using the newly added WebKit API) File.name has different displayName
524         from the basename of file.path, and in the file uploader controller we
525         should use File.name rather than File.path.
526
527         Reviewed by Kent Tamura.
528
529         No new tests: existing tests should pass as this should not change
530         behavior in regular use cases.  (New behavior where File.name differs
531         from File.path can be only tested in chromeos environment, therefore
532         not adding new tests for that)
533
534         * platform/gtk/RenderThemeGtk.cpp:
535         (WebCore::RenderThemeGtk::fileListNameForWidth): Updated to handle FileList.
536         * platform/gtk/RenderThemeGtk.h:
537         * platform/qt/RenderThemeQt.cpp:
538         (WebCore::RenderThemeQt::fileListNameForWidth): Updated to handle FileList.
539         * platform/qt/RenderThemeQt.h:
540         * rendering/RenderFileUploadControl.cpp:
541         (WebCore::RenderFileUploadControl::fileTextValue): Changed to pass FileList rather than FileList->paths().
542         * rendering/RenderTheme.cpp:
543         (WebCore::RenderTheme::fileListNameForWidth): Updated to handle FileList and use File.name for displaying the file name.
544         * rendering/RenderTheme.h:
545         * rendering/RenderThemeMac.h:
546         * rendering/RenderThemeMac.mm:
547         (WebCore::RenderThemeMac::fileListNameForWidth): Updated to handle FileList.
548
549 2012-03-13  Kinuko Yasuda  <kinuko@chromium.org>
550
551         Allow WebFileChooser to return extra file info (like displayName) in addition to mere file paths
552         https://bugs.webkit.org/show_bug.cgi?id=80719
553
554         Reviewed by Kent Tamura.
555
556         No new tests: this change itself shouldn't change existing behavior.
557
558         * fileapi/File.cpp:
559         (WebCore::createBlobDataForFileWithName): Renamed from createBlobDataForFileSystemFile.
560         * fileapi/File.h:
561         * html/FileInputType.cpp:
562         (WebCore::FileInputType::saveFormControlState): Updated to handle File.name.
563         (WebCore::FileInputType::restoreFormControlState): Ditto.
564         (WebCore::FileInputType::setFileList): Changed the signature to take
565         FileChooserFileInfo.
566         (WebCore::FileInputType::filesChosen): Ditto.
567         (WebCore::FileInputType::receiveDroppedFiles):
568         * html/FileInputType.h:
569         (FileInputType):
570         * platform/FileChooser.cpp:
571         (WebCore::FileChooser::chooseFiles): Added an overloaded method that
572         takes FileChooserFileInfo.
573         (WebCore):
574         * platform/FileChooser.h:
575         (WebCore::FileChooserFileInfo::FileChooserFileInfo): Added.
576         * platform/MIMETypeRegistry.cpp:
577         (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension): Removed surrouonding ifdefs as this function is now used even if FILE_SYSTEM is not enabled.
578         * platform/MIMETypeRegistry.h:
579         (MIMETypeRegistry):
580
581 2012-03-13  Vsevolod Vlasov  <vsevik@chromium.org>
582
583         Unreviewed inspector compilation module name fix after r110550.
584
585         * inspector/compile-front-end.py:
586
587 2012-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
588
589         Web Inspector: Changes to the list of scripts for front-end compilation should not require update of number of scripts in module.
590         https://bugs.webkit.org/show_bug.cgi?id=80872
591
592         Reviewed by Pavel Feldman.
593
594         * inspector/compile-front-end.py: Added.
595         * inspector/compile-front-end.sh:
596
597 2012-03-12  Pavel Podivilov  <podivilov@chromium.org>
598
599         Web Inspector: move ResourceScriptMapping to a separate file.
600         https://bugs.webkit.org/show_bug.cgi?id=80859
601
602         Reviewed by Vsevolod Vlasov.
603
604         * WebCore.gypi:
605         * WebCore.vcproj/WebCore.vcproj:
606         * inspector/compile-front-end.sh:
607         * inspector/front-end/ResourceScriptMapping.js: Copied from Source/WebCore/inspector/front-end/ScriptMapping.js.
608         (WebInspector.ResourceScriptMapping):
609         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
610         (WebInspector.ResourceScriptMapping.prototype.uiSourceCodeList):
611         (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeListChanged):
612         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeListChanged):
613         (WebInspector.ResourceScriptMapping.prototype._bindScriptToRawSourceCode):
614         (WebInspector.ResourceScriptMapping.prototype.setFormatSource):
615         (WebInspector.ResourceScriptMapping.prototype.forceUpdateSourceMapping):
616         (WebInspector.ResourceScriptMapping.prototype.reset):
617         * inspector/front-end/ScriptMapping.js:
618         * inspector/front-end/WebKit.qrc:
619         * inspector/front-end/inspector.html:
620
621 2012-03-12  Kentaro Hara  <haraken@chromium.org>
622
623         Rename OptionsObject to Dictionary
624         https://bugs.webkit.org/show_bug.cgi?id=80802
625
626         Reviewed by Adam Barth.
627
628         For clarification, rename OptionsObject.{h,cpp} to Dictionary.{h,cpp}.
629         This patch just renames and sorts alphabetically.
630
631         No tests. No change in behavior.
632
633         * GNUmakefile.list.am:
634         * Modules/indexeddb/IDBDatabase.cpp:
635         (WebCore::IDBDatabase::createObjectStore):
636         * Modules/indexeddb/IDBDatabase.h:
637         (WebCore::IDBDatabase::createObjectStore):
638         (IDBDatabase):
639         * Modules/indexeddb/IDBDatabase.idl:
640         * Modules/indexeddb/IDBKeyRange.h:
641         * Modules/indexeddb/IDBObjectStore.cpp:
642         (WebCore::IDBObjectStore::createIndex):
643         * Modules/indexeddb/IDBObjectStore.h:
644         (WebCore::IDBObjectStore::createIndex):
645         (IDBObjectStore):
646         * Modules/indexeddb/IDBObjectStore.idl:
647         * Target.pri:
648         * UseV8.cmake:
649         * WebCore.gypi:
650         * WebCore.vcproj/WebCore.vcproj:
651         * bindings/js/Dictionary.h: Renamed from Source/WebCore/bindings/js/OptionsObject.h.
652         (WebCore):
653         (Dictionary):
654         (WebCore::Dictionary::Dictionary):
655         (WebCore::Dictionary::isObject):
656         (WebCore::Dictionary::isUndefinedOrNull):
657         (WebCore::Dictionary::get):
658         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
659         * bindings/js/IDBBindingUtilities.cpp:
660         (WebCore::createDictionaryFromValue):
661         * bindings/js/IDBBindingUtilities.h:
662         (WebCore):
663         * bindings/scripts/CodeGeneratorJS.pm:
664         (JSValueToNative):
665         * bindings/scripts/CodeGeneratorV8.pm:
666         (GenerateHeader):
667         (GenerateParametersCheck):
668         (GenerateEventConstructorCallback):
669         (GetNativeType):
670         (JSValueToNative):
671         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
672         (WebDOMTestObj::optionsObject):
673         * bindings/scripts/test/CPP/WebDOMTestObj.h:
674         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
675         (webkit_dom_test_obj_options_object):
676         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
677         * bindings/scripts/test/JS/JSTestObj.cpp:
678         (WebCore::jsTestObjPrototypeFunctionIdbKey):
679         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
680         * bindings/scripts/test/ObjC/DOMTestObj.h:
681         * bindings/scripts/test/ObjC/DOMTestObj.mm:
682         (-[DOMTestObj optionsObject:ooo:]):
683         * bindings/scripts/test/TestObj.idl:
684         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
685         (WebCore::V8TestEventConstructor::constructorCallback):
686         (WebCore::fillTestEventConstructorInit):
687         * bindings/scripts/test/V8/V8TestEventConstructor.h:
688         (WebCore):
689         * bindings/scripts/test/V8/V8TestObj.cpp:
690         (WebCore::TestObjInternal::optionsObjectCallback):
691         * bindings/v8/Dictionary.cpp: Renamed from Source/WebCore/bindings/v8/OptionsObject.cpp.
692         (WebCore):
693         (WebCore::Dictionary::Dictionary):
694         (WebCore::Dictionary::~Dictionary):
695         (WebCore::Dictionary::operator=):
696         (WebCore::Dictionary::isObject):
697         (WebCore::Dictionary::isUndefinedOrNull):
698         (WebCore::Dictionary::getKey):
699         (WebCore::Dictionary::get):
700         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
701         * bindings/v8/Dictionary.h: Renamed from Source/WebCore/bindings/v8/OptionsObject.h.
702         (WebCore):
703         (Dictionary):
704         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
705         (WebCore::V8WebKitMutationObserver::observeCallback):
706
707 2012-03-12  Nikolas Zimmermann  <nzimmermann@rim.com>
708
709         SVG Animations update baseVal instead of animVal
710         https://bugs.webkit.org/show_bug.cgi?id=12437
711
712         Reviewed by Dirk Schulze.
713
714         Begin implementing the last missing core piece of the SVG DOM: proper animVal support.
715         Most SVG DOM interfaces exposing eg. lengths use SVGAnimatedLength. eg. from SVGRectElement:
716         "readonly attribute SVGAnimatedLength x;" SVGAnimatedXXX contains following methods:
717         "readonly attribute SVGLength baseVal; readonly attribute SVGLength animVal;"
718         From SVG DOM perspective, animVal and baseVal are two distinctive objects, animVal != baseVal.
719         Its underlying value is the same though, if no animation is running on that attribute.
720
721         As soon as a SMIL animation starts animating an SVGAnimated* target attribute, its
722         baseVal and animVal may begin to differ. The animVal always reflect the current animated
723         value (including all effects of additive/accumulated animations) which is shown on screen
724         when eg animating the width of a <rect>. The baseVal is is equal to the underlying XML
725         property value / SVG DOM value, but may be influenced through dynamic changes.
726         (Consider changing rect1.width.baseVal.value while 'width' is animated)
727
728         During the last year we prepared our animation code to turn on animVal support.
729         This patch adds the last missing pieces to turn on animVal support for the SVGLength.
730         SVGLengthList and all other types will follow, one after the other.
731
732         I've decided to write an exhaustive ChangeLog, as this as the base for any future
733         work in this area - hopefully making this more reviewable.
734
735         Tests: svg/animations/additive-from-to-width-animation.html
736                svg/animations/additive-values-width-animation.html
737                svg/animations/change-baseVal-while-animating-fill-freeze-2.html
738                svg/animations/change-baseVal-while-animating-fill-freeze.html
739                svg/animations/change-baseVal-while-animating-fill-remove-2.html
740                svg/animations/change-baseVal-while-animating-fill-remove.html
741                svg/animations/change-target-while-animating-SVG-property.html
742                svg/animations/multiple-animations-fill-freeze.html
743                svg/animations/remove-animation-element-while-animation-is-running.html
744                svg/repaint/repainting-after-animation-element-removal.svg
745
746         * svg/SVGAnimateElement.cpp: Remove unnecessary std namespace inclusion.
747         (WebCore::SVGAnimateElement::SVGAnimateElement): Remove now-obsolete m_aboutToStopAnimation.
748         (WebCore::SVGAnimateElement::calculateAnimatedValue): Swap assertion order, to test hasTagName() _before_ casting.
749         (WebCore::SVGAnimateElement::resetToBaseValue):
750             Stop relying on the cached baseValue (breaking additive="sum"+values animation) for SVG DOM primitive animations.
751             Avoid any string roundtrips previously needed to reset the SVGAnimatedType to the base value. Just grab the
752             currentBaseValue() from the associated SVGAnimatedProperty, which includes all dynamic changes to the baseVal
753             either by SVG DOM or setAttribute() calls - this way we don't need to utilize the buggy cache in SMILTimeContainer,
754             which can be removed once all SVG DOM primitive types switched to the new animVal concept.
755
756             NOTE: When multiple animations of the same attribute are applied to a target element, resetToBaseValue() will be called
757             for the highest priority SVGSMILElement, on every animation step! Consider two <animate> elements, applied to a target
758             <rect> which both animate the 'x' attribute, one from 0s to 2s, the other from 4s to 6s. The last <animate> element
759             will reuse the SVGAnimatedType m_animatedType from the first <animate> element, and never create an own m_animatedType.
760             When the animation starts the first time at 0s, we update the rect.x.animVals SVGLength* pointer, to point to the
761             SVGAnimatedType of the first <animate> element, owning the m_animatedType. From that point on each call to rect.x.animVal
762             will always return the same value as the SVGAnimatedType of the first <animate> element holds. Now after 2s the first
763             <animate> element becomes inactive, but its m_animatedType remains alive. The bindings don't notice this change at all.
764             Now at 4s, the second animation element gets active. It reuses the SVGAnimatedType of the first <animate> element, and
765             applies its animation changes to that SVGAnimatedType, which is immediately reflected in the bindings w/o any additional
766             work. It's very important for the understanding when animationStarted/animationEnded need to be called.
767
768         (WebCore::SVGAnimateElement::applyResultsToTarget): Remove now-obsolete m_aboutToStopAnimation logic. No need to know it at this point.
769         (WebCore::SVGAnimateElement::targetElementWillChange):
770             Renamed from targetElementDidChange(). This method is called from SVGSMILElement for following conditions:
771             - animation element is destructed
772             - animation element is removed from document
773             - target element of animation is destructed
774             - target element of animation is removed from document
775             - target element of animation changes id
776
777             Whenever any of this happens, we need to reset the animVal. Resetting the animVal involves resetting the PropertyType* pointer,
778             eg. SVGLength*, from the animVal property tear off, belonging to a certain SVGAnimatedProperty (eg. rect.x) to the initial
779             value again, which is the 'm_x' of the SVGRectElement. This is needed as the SVGAnimatedType the animVal currently points to,
780             if an animation is/was running, is destructed in targetElementWillChange(), to reset the SVGAnimateElement to the initial
781             state before it received a target. This is the only place which destructed the m_animatedType, and thus the only place that
782             needs to take care of resetting the animVal pointers.
783
784         * svg/SVGAnimatedLength.cpp:
785         (WebCore::SVGAnimatedLengthAnimator::constructFromCopy):
786             Add a new constructFromCopy(SVGGenericAnimatedType) function to SVGAnimatedLengthAnimator.
787             It takes a type-unsafe SVGGenericAnimatedType - the caller has to guarantee the type matches.
788             This is strictly enforced for the single caller of constructFromCopy, and guaranteed to be safe.
789
790         * svg/SVGAnimatedLength.h: Add new constructFromCopy method, which is used to avoid string-roundtrips when resetting to base values.
791         * svg/SVGAnimatedType.cpp:
792         (WebCore::SVGAnimatedType::supportsAnimVal): Only returns true for AnimatedLength, for now.
793         (WebCore::SVGAnimatedType::setVariantValue): Takes a SVGGenericAnimatedType, assuming the type matches. Callers have to guarantee type-safety!
794         * svg/SVGAnimatedType.h:
795         (SVGAnimatedType): Add new static supportsAnimVal(AnimatedPropertyType) function.
796         (WebCore::SVGAnimatedType::variantValue): Add a generic accessor for all animated types, called variant(). Only one place uses this.
797         * svg/SVGAnimatedTypeAnimator.h:
798         (WebCore::SVGAnimatedTypeAnimator::constructFromCopy):
799             New method to construct an eg. SVGAnimatedLengthAnimator right from a SVGLength, instead of a String.
800             In that case the SVGAnimatedType just stores a pointer to the underlying SVGLength, no copying and or other roundtrips involved.
801
802         * svg/SVGAnimationElement.cpp:
803         (WebCore::SVGAnimationElement::svgAttributeChanged):
804             Implement this instead of attributeChanged. The previous implementation reset the animation state to Inactive, causing a full
805             rebuild, whenever any attribute changes, even though it might not be related for the animation element, eg.
806             animate.setAttribute("stdDeviationX", "foobar"). Fix that by checking if we support the attribute (keyTimes/keySplines/etc..)
807             , if not pass it on to SVGSMILElement (which supports begin/end/etc..) to check if it can handle that.
808
809         (WebCore::SVGAnimationElement::animationAttributeChanged):
810             Called from our svgAttributeChanged, and/or from SVGSMILElement::svgAttributeChanged, whenever a _known_ attribute has changed.
811             This sledgehammer should be used with care, instead of each time attributeChanged() is called :-)
812
813         (WebCore::setTargetAttributeAnimatedCSSValue):
814             Remove support for removing properties from the override style sheet. I've added this optimization too early, we should reevaluate
815             this once more types support animVal. It currently complexifies the logic too much, requiring setAttributeAnimatedValue to know
816             if the animation ends (and that's not easy to figure out, at least not using started/endedActiveInterval, as I anticipated).
817
818         (WebCore::findMatchingAnimatedProperty):
819             Add helper functions which retrieves a SVGAnimatedProperty* for a given SVGElement* targetElement, an attributeName, and an attribute
820             type. eg. findMatchingAnimatedProperty(myRectElement, SVGNames::xAttr, AnimatedLength) returns the SVGAnimatedProperty which is
821             exposed to JS, that holds: SVGProperty* baseVal, and SVGProperty* animVal. (Lazily created if they got accessed from JS.). This is
822             used to update the animVal pointing to a new eg. SVGLength* value, once animation has started, to make rect->x() return that new
823             SVGLength* value (internally), and to reflect the current animated value in rect.x.animVal.value from JS.
824
825         (WebCore::SVGAnimationElement::applyAnimatedValue): Refactored from setTargetAttributeAnimatedValue, to simplify the code.
826         (WebCore::notifyAnimatedPropertyAboutAnimationBeginEnd):
827             Helper function to share code betweeen animationStarted/animationEnded.
828             It takes a SVGAnimatedProperty* and a SVGAnimatedType* which may be zero, indicating that the animation ended.
829             It calls animationStarted/animationEnded on the given SVGAnimatedProperty, to update the animVal state.
830             It also figures out all instances of the target element, and their SVGAnimatedProperties that may need updating.
831
832         (WebCore::SVGAnimationElement::animationStarted): Uses the helper above, passing on the given animatedType.
833         (WebCore::SVGAnimationElement::animationEnded): Uses the helper above, passing 0 as animatedType.
834         (WebCore::InstanceUpdateBlocker::InstanceUpdateBlocker):
835             Added new helper struct, doing element->setInstancesUpdatedBlock(true) on construction and setInstancesUpdatesBlocked(false) on
836             destruction, making it impossible to forget one. If we ever rewrite svgAttributeChanged & co to auto-update the cloned instances,
837             this can go away.
838
839         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
840             Now takes an SVGAnimatedType* instead of a String parameter. In order to avoid string-roundtrips for animVal support, let us
841             decide if we need to construct a String out of it, or not. For animations supporting animVal (only SVGLength) we don't need
842             to update any attribute or animVal pointer here, that happens automatically! We only need to notify the targetElement eg,
843             that its xAttr changed! Previously we had to call targetElement->setAttribute("x", "...") on every animation step for
844             SVGLength animations - that's gone now! The SVGAnimatedType pointers remains the same during the whole animation, so there's
845             no need to call animationStarted() at each animated step!
846
847         (WebCore::SVGAnimationElement::animatedPropertyForType):
848             Helper function returning a SVGAnimatedProperty* for the current target element & current target attribute, if the
849             current animation is running on a type supporting animVal (SVGLength), or returning 0. This is needed for SVGAnimateElement.
850             Reuses the existing findMatchingAnimatedProperty code.
851
852         * svg/SVGAnimationElement.h:
853         * svg/animation/SMILTimeContainer.cpp:
854         (WebCore::SMILTimeContainer::updateAnimations):
855             Add comment to clarify why caching baseValues is just wrong. For SVGLength animations the problem is now gone.
856             This is exercised using the new additive-from-to-width-animation.html & additive-values-width-animation.html tests.
857
858         * svg/animation/SVGSMILElement.cpp:
859         (WebCore::SVGSMILElement::removedFromDocument):
860             Since animVal requires that the SVGAnimatedProperties are correctly reset if an animation element is removed from the document,
861             we have to call targetElementWillChange(0) from here. That requires to move the "m_attributeName = anyQName()" line down,
862             otherwise targetElementWillChange() would early exit, as no valid attributeName was specified.
863             
864             This is verified using the new svg/animations/remove-animation-element-while-animation-is-running.html
865             and svg/repaint/repainting-after-animation-element-removal.svg tests.
866
867         (WebCore::SVGSMILElement::isSupportedAttribute): Add function like all SVG*Elements have identifying their supported attributes.
868         (WebCore::SVGSMILElement::svgAttributeChanged):
869             Implement svgAttributeChanged instead of attributeChanged. Only take action if the attribute is actually supported.
870             If one of the common attributes like begin/end/etc. changed, be sure to call animationAttributeChanged() so that our
871             ancestor-classes get notified about this and can take action as well. NOTE: This is not about animating begin/end attributes,
872             but about pure DOM changes. begin/end/et.. are not exposed to the SVG DOM, we still reuse the svgAttributeChanged logic
873             for consistency. (This does NOT make those attributes animatable, nothing this here as it came up while reviewing).
874     
875         (WebCore::SVGSMILElement::targetElement): Adapt logic to targetElementDidChange -> targetElementWillChange change.
876         (WebCore::SVGSMILElement::targetElementWillChange):
877             Renamed from targetElementDidChange. Added "oldTarget" as parameter as well. Our ancestor-classes like SVGAnimateElement
878             use this to properly deregister the animVal in the old target, before resetting the SVGAnimatedType, otherwise we'd leave
879             dangling pointers around (verified manually by guard malloc runs, that none of this happens).
880
881             Also add a default implementation here in targetElementWillChange, that ancestor classes have to call.
882             Now we properly call endedActiveInterval() if the m_activeState is currently Active, so that animations are shut-down
883             just like if the animation properly ends (use the same cleanup routines, etc.). Not doing that now leads to assertions.
884
885         (WebCore::SVGSMILElement::resetTargetElement):
886             Instead of forcing m_activeState to be inactive, use the standard methods to end the animation.
887             targetElementWillChange(m_targetElement, 0) and animationAttributeChanged().
888
889             resetTargetElement() is only called by SVGDocumentExtensions::removeAllAnimationElementsFromTarget() for following conditions:
890             - targetElement gets destructed
891             - targetElement gets removed from the document
892             - targetElement id changes
893
894             If the targetElement gets destructed or removed, no actions need to be taken, as the SVGAnimatedPropertys are teared down
895             as well. But if only the id changes, we still have to properly disconnect the animVals - this is all handled through
896             targetElementWillChange now - that's why this has to be called from here as well.
897             That explains why targetElementWillChange() now needs to check if the targetElement is destructing or not.
898
899         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
900             Pass the AnimatedPropertyType from the SVGPropertyInfo to the SVGAnimatedProperties.
901             Requires mechanic changes in all SVGAnimated* classes. We need acccess to the AnimatedPropertyType
902             to verify the SVGAnimatedType objects, passed to animationStarted, match our type. This is to enforce
903             strict type-checking, whenever SVGGenericAnimatedTypes are passed around.
904
905         (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
906         (WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff):
907         * svg/properties/SVGAnimatedListPropertyTearOff.h: Ditto.
908         (WebCore::SVGAnimatedListPropertyTearOff::create):
909         (WebCore::SVGAnimatedListPropertyTearOff::SVGAnimatedListPropertyTearOff):
910         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: Ditto.
911         (WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
912         (WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
913         * svg/properties/SVGAnimatedProperty.h: Store AnimatedPropertyType, add accessors.
914         (WebCore::SVGAnimatedProperty::animatedPropertyType): Add accessor.
915         (WebCore::SVGAnimatedProperty::animationValueChanged): New animVal related functions to be implemented in the animated tear offs.
916         (WebCore::SVGAnimatedProperty::animationStarted): Ditto.
917         (WebCore::SVGAnimatedProperty::animationEnded): Ditto.
918         (WebCore::SVGAnimatedProperty::currentBaseValue):
919             Generic accessor for the baseVal: returns a SVGGenericAnimatedType.
920             It takes an AnimatedPropertyType as input, that's only needed to verify that the type we're returning matches
921             the expectation of the caller. If not, return 0 to avoid any potential casting mistakes, which would lead to crashes.
922
923         (WebCore::SVGAnimatedProperty::SVGAnimatedProperty): Store m_animatedPropertyType.
924         * svg/properties/SVGAnimatedPropertyTearOff.h:
925         (WebCore::SVGAnimatedPropertyTearOff::create): Same changes as in the other tear offs: pass around AnimatedPropertyType.
926         (WebCore::SVGAnimatedPropertyTearOff::currentBaseValue): Returns &m_property, if the type matches (see above).
927         (SVGAnimatedPropertyTearOff): Pass around AnimatedPropertyType.
928         (WebCore::SVGAnimatedPropertyTearOff::animationValueChanged): No-op for non list types, don't need to do anything here.
929         (WebCore::SVGAnimatedPropertyTearOff::animationStarted):
930         (WebCore::SVGAnimatedPropertyTearOff::animationEnded):
931             Store the currently animated value in the animVal() property tear off, that's also re-used as-is for the JS bindings.
932             As this is important, here's an example of how this affects methods like rect->x() used in the renderers.
933
934             Setting m_isAnimating to true, redirects any rect->x() calls that previously returned rect->m_x, to
935             rect->xAnimated()->animVal()->propertyReference() (which returns the same SVGLength& that the SVGAnimatedElement
936             m_animatedType contains). Calling rect->setXBaseValue() still modifies rect->m_x, and is used by all parseAttribute()
937             methods in svg/ as setAttribute() calls only ever modify the "baseValue", never the current animated value.
938             rect.x.baseVal will return a SVGLength object corresponding to rect->m_x.
939             rect.x.animVal will return a SVGLength object corresponding to rect->xAnimated()->animVal()->propertyReference().
940
941             These implementation details are all hidden in the SVGAnimatedPropertyMacros. Here's an example from SVGRectElement:
942             DECLARE_ANIMATED_LENGTH(X, x) -> Replace PropertyType with 'SVGLength', LowerProperty with 'x', and UpperProperty with 'X'.
943
944             PropertyType& LowerProperty() const
945             {
946                 if (TearOffType* wrapper = SVGAnimatedProperty::lookupWrapper<UseOwnerType, TearOffType, IsDerivedFromSVGElement<UseOwnerType>::value>(this, LowerProperty##PropertyInfo())) {
947                     if (wrapper->isAnimating())
948                         return wrapper->currentAnimatedValue();
949                 }
950                 return m_##LowerProperty.value;
951             }
952
953             PropertyType& LowerProperty##BaseValue() const
954             {
955                 return m_##LowerProperty.value;
956             }
957
958             void set##UpperProperty##BaseValue(const PropertyType& type)
959             {
960                 m_##LowerProperty.value = type;
961             }
962
963             Any code outside of svg/, eg. in rendering/svg, does not need to care about any baseVal/animVal differences.
964             During layout eg. RenderSVGRect calls rect->x().value(someLengthContext) to get the current 'x' as float. If an animation
965             is running on that rect element it will automatically retrieve the last set animated value here - all under the hood.
966             I hope that sheds some light in those myserious functions, they were designed with animVal in mind, but we never had that until now :-)
967
968         (WebCore::SVGAnimatedPropertyTearOff::SVGAnimatedPropertyTearOff): Pass around AnimatedPropertyType.
969         (WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff): Add destructor to debug builds veryifing that m_isAnimating is false.
970         * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Ditto.
971         (WebCore::SVGAnimatedStaticPropertyTearOff::create):
972         (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
973         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Ditto.
974         (WebCore::SVGAnimatedTransformListPropertyTearOff::create):
975         (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff):
976         * svg/properties/SVGPropertyInfo.h: Add SVGGenericAnimatedType definition.
977         * svg/properties/SVGPropertyTearOff.h: Remove obsolete updateAnimVal method - switched to using setValue directly.
978
979 2012-03-13  Luke Macpherson   <macpherson@chromium.org>
980
981         Implement CSSPropertyTextOverflow in CSSStyleApplyProperty.
982         https://bugs.webkit.org/show_bug.cgi?id=80934
983
984         Reviewed by Andreas Kling.
985
986         No new tests / refactoring only.
987
988         * css/CSSStyleApplyProperty.cpp:
989         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
990         * css/CSSStyleSelector.cpp:
991         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
992
993 2012-03-12  Matt Falkenhagen  <falken@chromium.org>
994
995         Switch Chromium from LocaleToScriptMappingICU.cpp to LocaleToScriptMappingDefault.cpp
996         https://bugs.webkit.org/show_bug.cgi?id=80935
997
998         Reviewed by Kent Tamura.
999
1000         ICU seems to have issues with non-well-formed locale strings.
1001         Currently, the only port that uses LocaleToScriptMappingICU.cpp is
1002         Chromium.
1003
1004         No new tests. LocaleToScriptMappingDefault.cpp is already used by
1005         other ports and covered by existing tests.
1006
1007         * WebCore.gyp/WebCore.gyp:
1008
1009 2012-03-12  Benjamin Poulain  <bpoulain@apple.com>
1010
1011         Fix IndexedDB build with JSC
1012         https://bugs.webkit.org/show_bug.cgi?id=80207
1013
1014         Reviewed by Adam Barth.
1015
1016         This fixes the build of WebKit when IndexedDB is enabled. Most functions were added
1017         empty implementation, it compiles but IndexedDB is not working.
1018
1019         * DerivedSources.make: Added missing IDL files.
1020         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Fix warnings and build errors.
1021         (IDBDatabaseBackendImpl):
1022         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp: ditto.
1023         (WebCore::IDBDatabaseCallbacksImpl::unregisterDatabase): ditto.
1024         * Modules/indexeddb/IDBFactoryBackendImpl.cpp: ditto.
1025         (WebCore::IDBFactoryBackendImpl::openBackingStore):
1026         * Modules/indexeddb/IDBIndexBackendImpl.cpp: ditto.
1027         (WebCore::IDBIndexBackendImpl::countInternal):
1028         * Modules/indexeddb/IDBKeyPathBackendImpl.cpp: Fix the method signature and add
1029         an empty implementation.
1030         (WebCore):
1031         (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
1032         (WebCore::IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue):
1033         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Fix warnings.
1034         (WebCore::IDBObjectStoreBackendImpl::countInternal):
1035         * Modules/indexeddb/IDBPendingTransactionMonitor.cpp: ditto.
1036         (WebCore::transactions):
1037         * Modules/indexeddb/IDBRequest.cpp: ditto.
1038         (WebCore::IDBRequest::resetReadyState):
1039         * Modules/indexeddb/IDBRequest.h: ditto.
1040         (WebCore::IDBRequest::onSuccessWithPrefetch):
1041         (WebCore):
1042         (WebCore::JSIDBVersionChangeRequest::visitChildren):
1043         * WebCore.xcodeproj/project.pbxproj:
1044         * bindings/js/IDBBindingUtilities.cpp:
1045         (WebCore::createIDBKeyFromValue): Fix the creation of IDBKeys.
1046         (WebCore::createOptionsObjectFromValue): Add an empty implementation of
1047         the handling of database options (IDBObjectStoreParameters).
1048         (WebCore):
1049         * bindings/js/IDBBindingUtilities.h:
1050         (WebCore):
1051         * bindings/js/JSIDBAnyCustom.cpp:
1052         (WebCore::toJS): Add the missing IDBAny's types.
1053         * bindings/js/JSIDBKeyCustom.cpp:
1054         (WebCore::toJS): Add the missing IDBKey's types.
1055         * bindings/js/JSIDBVersionChangeRequestCustom.cpp: Added.
1056         IDBVersionChangeRequest has the attribute EventTarget so it requires
1057         the visitChildren() function. An empty implementation was added.
1058         * bindings/js/OptionsObject.h: Add an empty implementation.
1059         (WebCore):
1060         (OptionsObject):
1061         (WebCore::OptionsObject::OptionsObject):
1062         (WebCore::OptionsObject::isObject):
1063         (WebCore::OptionsObject::isUndefinedOrNull):
1064         (WebCore::OptionsObject::get):
1065         (WebCore::OptionsObject::getWithUndefinedOrNullCheck):
1066         * bindings/js/SerializedScriptValue.cpp: Add the missing functions needed by IndexedDB.
1067         (WebCore):
1068         (WebCore::SerializedScriptValue::create):
1069         (WebCore::SerializedScriptValue::toWireString):
1070         (WebCore::SerializedScriptValue::createFromWire):
1071         (WebCore::SerializedScriptValue::numberValue):
1072         (WebCore::SerializedScriptValue::deserialize):
1073         * bindings/js/SerializedScriptValue.h:
1074         (SerializedScriptValue):
1075         * bindings/scripts/CodeGeneratorJS.pm: Modify the code generator to:
1076         -Support the IDBKey type correctly.
1077         -Support the OptionsObject type.
1078         -Generate valid function call for static functions.
1079         (GenerateImplementationFunctionCall):
1080         (JSValueToNative):
1081         (NativeToJSValue):
1082         * inspector/InspectorIndexedDBAgent.cpp:
1083         (WebCore):
1084
1085 2012-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1086
1087         Unreviewed, rolling out r110529.
1088         http://trac.webkit.org/changeset/110529
1089         https://bugs.webkit.org/show_bug.cgi?id=80969
1090
1091         breaks mac build (Requested by morrita on #webkit).
1092
1093         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1094         (WebCore::computeUnoccludedContentRect):
1095
1096 2012-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1097
1098         Unreviewed, rolling out r110524.
1099         http://trac.webkit.org/changeset/110524
1100         https://bugs.webkit.org/show_bug.cgi?id=80936
1101
1102         breaks chromium win build. (Requested by morrita on #webkit).
1103
1104         * Target.pri:
1105         * UseV8.cmake:
1106         * WebCore.gypi:
1107         * bindings/scripts/CodeGeneratorJS.pm:
1108         (GenerateHeader):
1109         (GenerateImplementation):
1110         * bindings/scripts/CodeGeneratorV8.pm:
1111         (GenerateHeader):
1112         (GenerateNamedConstructorCallback):
1113         (GenerateImplementation):
1114         * bindings/scripts/IDLAttributes.txt:
1115         * bindings/scripts/test/V8/V8Float64Array.cpp:
1116         (WebCore):
1117         * bindings/scripts/test/V8/V8Float64Array.h:
1118         (V8Float64Array):
1119         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1120         (WebCore):
1121         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1122         (V8TestActiveDOMObject):
1123         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1124         (WebCore):
1125         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1126         (V8TestCustomNamedGetter):
1127         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1128         (WebCore):
1129         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1130         (V8TestEventConstructor):
1131         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1132         (WebCore):
1133         * bindings/scripts/test/V8/V8TestEventTarget.h:
1134         (V8TestEventTarget):
1135         * bindings/scripts/test/V8/V8TestInterface.cpp:
1136         (WebCore):
1137         * bindings/scripts/test/V8/V8TestInterface.h:
1138         (V8TestInterface):
1139         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1140         (WebCore):
1141         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1142         (V8TestMediaQueryListListener):
1143         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1144         (WebCore):
1145         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1146         (V8TestNamedConstructor):
1147         * bindings/scripts/test/V8/V8TestObj.cpp:
1148         (WebCore):
1149         * bindings/scripts/test/V8/V8TestObj.h:
1150         (V8TestObj):
1151         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1152         (WebCore):
1153         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1154         (V8TestSerializedScriptValueInterface):
1155         * bindings/v8/NPV8Object.cpp:
1156         (WebCore::npObjectTypeInfo):
1157         * bindings/v8/V8GCController.cpp:
1158         (WebCore::GrouperVisitor::visitDOMWrapper):
1159         * bindings/v8/WrapperTypeInfo.h:
1160         (WebCore):
1161         (WrapperTypeInfo):
1162         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp.
1163         (WebCore):
1164         (WebCore::toV8):
1165         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
1166         (WebCore::toV8):
1167         (WebCore):
1168         * bindings/v8/custom/V8DOMTokenListCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp.
1169         (WebCore):
1170         (WebCore::toV8):
1171         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1172         (WebCore):
1173         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
1174         (WebCore::toV8):
1175         (WebCore):
1176         * bindings/v8/custom/V8StyleSheetCustom.cpp:
1177         (WebCore::toV8):
1178         * css/CSSStyleSheet.idl:
1179         * css/StyleSheet.idl:
1180         * dom/DOMStringMap.idl:
1181         * dom/NamedNodeMap.idl:
1182         * html/DOMTokenList.idl:
1183         * html/track/TextTrackList.idl:
1184
1185 2012-03-12  Kentaro Hara  <haraken@chromium.org>
1186
1187         [V8][Refactoring] Remove getCachedWrapperSlow() from V8Bindings.cpp
1188         https://bugs.webkit.org/show_bug.cgi?id=80924
1189
1190         Reviewed by Adam Barth.
1191
1192         getCachedWrapperSlow() is called by getCachedWrapper() only,
1193         and getCachedWrapperSlow() just calls getCachedWrapperInline().
1194         Thus, this patch expands getCachedWrapperInline() into getCachedWrapper(),
1195         and removes getCachedWrapperSlow().
1196
1197         No tests. No change in behavior.
1198
1199         * bindings/v8/V8DOMWrapper.cpp:
1200         * bindings/v8/V8DOMWrapper.h:
1201         (WebCore::V8DOMWrapper::getCachedWrapper):
1202
1203 2012-03-12  Kentaro Hara  <haraken@chromium.org>
1204
1205         [V8][Refactoring] Remove existingWrapper() from generated code
1206         https://bugs.webkit.org/show_bug.cgi?id=80927
1207
1208         Reviewed by Adam Barth.
1209
1210         Currently wrap() calls existingWrapper(), and existingWrapper()
1211         just calls getCachedWrapper(). We can remove existingWrapper() from the generated code.
1212
1213         Test: bindings/scripts/test/*
1214
1215         * bindings/scripts/CodeGeneratorV8.pm: Removed existingWrapper().
1216         (GenerateHeader):
1217         (GenerateNormalAttrGetter):
1218
1219         * bindings/scripts/test/V8/V8Float64Array.h: Updated run-bindings-tests results.
1220         (V8Float64Array):
1221         (WebCore::V8Float64Array::wrap):
1222         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1223         (V8TestActiveDOMObject):
1224         (WebCore::V8TestActiveDOMObject::wrap):
1225         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1226         (V8TestCustomNamedGetter):
1227         (WebCore::V8TestCustomNamedGetter::wrap):
1228         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1229         (V8TestEventConstructor):
1230         (WebCore::V8TestEventConstructor::wrap):
1231         * bindings/scripts/test/V8/V8TestEventTarget.h:
1232         (V8TestEventTarget):
1233         (WebCore::V8TestEventTarget::wrap):
1234         * bindings/scripts/test/V8/V8TestInterface.h:
1235         (V8TestInterface):
1236         (WebCore::V8TestInterface::wrap):
1237         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1238         (V8TestMediaQueryListListener):
1239         (WebCore::V8TestMediaQueryListListener::wrap):
1240         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1241         (V8TestNamedConstructor):
1242         (WebCore::V8TestNamedConstructor::wrap):
1243         * bindings/scripts/test/V8/V8TestObj.cpp:
1244         (WebCore::TestObjInternal::readOnlyTestObjAttrAttrGetter):
1245         (WebCore::TestObjInternal::cachedAttribute1AttrGetter):
1246         (WebCore::TestObjInternal::cachedAttribute2AttrGetter):
1247         * bindings/scripts/test/V8/V8TestObj.h:
1248         (V8TestObj):
1249         (WebCore::V8TestObj::wrap):
1250         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1251         (V8TestSerializedScriptValueInterface):
1252         (WebCore::V8TestSerializedScriptValueInterface::wrap):
1253
1254 2012-03-12  Dana Jansens  <danakj@chromium.org>
1255
1256         [chromium] Use tileRect instead of pointer derefs
1257         https://bugs.webkit.org/show_bug.cgi?id=80919
1258
1259         Reviewed by Adrienne Walker.
1260
1261         Covered by existing tests.
1262
1263         * platform/graphics/chromium/LayerRendererChromium.cpp:
1264         (WebCore::LayerRendererChromium::drawTileQuad):
1265
1266 2012-03-12  Hans Muller  <hmuller@adobe.com>
1267
1268         SVG should support transform-origin and relative values
1269         https://bugs.webkit.org/show_bug.cgi?id=79068
1270
1271         Reviewed by Dirk Schulze.
1272
1273         Added SVG support for the CSS 'transform-origin' property and for percentage
1274         values in the transform translate function.  The changes conform to
1275         http://dev.w3.org/csswg/css3-transforms/.
1276
1277         Tests: svg/transforms/percent-transform-values.xhtml
1278                svg/transforms/transform-origin-css-property.xhtml
1279
1280         * css/svg.css:
1281         (*):
1282         (html|* > svg):
1283         Default transform-origin for SVG elements is 0 0.
1284
1285         * platform/Length.h:
1286         (WebCore::Length::calcFloatValue):
1287         Added a calcFloatValue overload whose max parameter (for percent lengths) is a float.
1288         The original version will be obsolete when the sub-pixel layout support is completed.
1289
1290         * rendering/style/RenderStyle.cpp:
1291         * rendering/style/RenderStyle.h:
1292         (WebCore):
1293         (WebCore::requireTransformOrigin):
1294         Transforms that only include translations don't depend on the transform-origin.
1295
1296         (WebCore::RenderStyle::applyTransform):
1297         SVG elements interpret non-percentage/keyword transform-origin values relative to their viewport,
1298         unlike HTML which interprets all transform-origin values relative to the element's origin.
1299         The new FloatRect applyTransform() function handles SVG semantics. Similarly, SVG elements interpret
1300         percentage/keyword transform-origin values relative to the origin of their objectBoundingBox(), HTML
1301         uses the borderBox.  All this per http://dev.w3.org/csswg/css3-transforms/.
1302
1303         * svg/SVGStyledTransformableElement.cpp:
1304         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
1305
1306 2012-03-12  Dana Jansens  <danakj@chromium.org>
1307
1308         [chromium] Use projectQuad to apply inverse mapRect
1309         https://bugs.webkit.org/show_bug.cgi?id=80741
1310
1311         Reviewed by Adrienne Walker.
1312
1313         Unit test: CCOcclusionTrackerTest3dTransform
1314                    CCOcclusionTrackerTestPerspectiveTransform
1315                    CCOcclusionTrackerTestPerspectiveTransformBehindCamera
1316
1317         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1318         (WebCore::projectQuad):
1319         (WebCore):
1320         (WebCore::computeUnoccludedContentRect):
1321
1322 2012-03-12  Leo Yang  <leo.yang@torchmobile.com.cn>
1323
1324         [BlackBerry] Upstream the BlackBerry change to platform/graphics/FontPlatformData.h
1325         https://bugs.webkit.org/show_bug.cgi?id=80820
1326
1327         Reviewed by Rob Buis.
1328
1329         The BlackBerry is using the FontPlatformData from Chromium porting.
1330
1331         * platform/graphics/FontPlatformData.h:
1332
1333 2012-03-12  Zhenyao Mo  <zmo@google.com>
1334
1335         After webgl canvas resize, bindings might be lost
1336         https://bugs.webkit.org/show_bug.cgi?id=80895
1337
1338         Reviewed by Stephen White.
1339
1340         Test: fast/canvas/webgl/texture-bindings-uneffected-on-resize.html
1341
1342         * html/canvas/WebGLRenderingContext.cpp:
1343         (WebCore):
1344         (WebCore::WebGLRenderingContext::reshape): recover bindings after reshape.
1345
1346 2012-03-12  Kentaro Hara  <haraken@chromium.org>
1347
1348         [V8][Refactoring] Remove getWrapper() and getWrapperSlow()
1349         https://bugs.webkit.org/show_bug.cgi?id=80920
1350
1351         Reviewed by Adam Barth.
1352
1353         Now getWrapper() is the same as getExistingWrapper().
1354         getWrapperSlow() is the same as getExistingWrapperSlow().
1355         This patch removes getWrapper() and getWrapperSlow().
1356         Also this patch renames getExistingWrapper() to getCachedWrapper().
1357
1358         No tests. No change in behavior.
1359
1360         * bindings/scripts/CodeGeneratorV8.pm:
1361         (GenerateHeader):
1362         * bindings/v8/V8DOMWrapper.cpp:
1363         (WebCore::V8DOMWrapper::getWrapperSlow):
1364         * bindings/v8/V8DOMWrapper.h:
1365         (WebCore::V8DOMWrapper::getWrapper):
1366         (V8DOMWrapper):
1367         * bindings/v8/custom/V8NodeCustom.cpp:
1368         (WebCore::toV8Slow):
1369
1370 2012-03-12  Erik Arvidsson  <arv@chromium.org>
1371
1372         [V8] Use v8::V8::AddHiddenReferences instead of SetHiddenValue
1373         https://bugs.webkit.org/show_bug.cgi?id=80880
1374
1375         Reviewed by Adam Barth.
1376
1377         We used to add a hidden property in the getter to the returned wrapper.
1378         With this patch we instead handle the liveness of the wrapper in the GC phase by
1379         calling v8::V8::AddHiddenReference.
1380
1381         To reduce the amount of custom code we need, the V8 code generator now supports
1382         GenerateIsReachable (as well as CustomIsReachable) which, even though different
1383         from the JSC attribute, is used in the same cases and takes the same values (even though
1384         at the moment not all JSC values are supported by V8).
1385
1386         No new tests. Covered by existing tests.
1387
1388         * Target.pri:
1389         * UseV8.cmake:
1390         * WebCore.gypi:
1391         * bindings/scripts/CodeGeneratorJS.pm:
1392         (GetGenerateIsReachable):
1393         (GetCustomIsReachable):
1394         (GenerateHeader):
1395         (GenerateImplementation):
1396         * bindings/scripts/CodeGeneratorV8.pm:
1397         (NeedsToVisitDOMWrapper):
1398         (GetGenerateIsReachable):
1399         (GetCustomIsReachable):
1400         (GenerateVisitDOMWrapper):
1401         (GenerateHeader):
1402         (GenerateNamedConstructorCallback):
1403         (GenerateImplementation):
1404         * bindings/scripts/IDLAttributes.txt:
1405         * bindings/scripts/test/V8/V8Float64Array.cpp:
1406         (WebCore):
1407         * bindings/scripts/test/V8/V8Float64Array.h:
1408         (V8Float64Array):
1409         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1410         (WebCore):
1411         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1412         (V8TestActiveDOMObject):
1413         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1414         (WebCore):
1415         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1416         (V8TestCustomNamedGetter):
1417         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1418         (WebCore):
1419         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1420         (V8TestEventConstructor):
1421         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1422         (WebCore):
1423         * bindings/scripts/test/V8/V8TestEventTarget.h:
1424         (V8TestEventTarget):
1425         * bindings/scripts/test/V8/V8TestInterface.cpp:
1426         (WebCore):
1427         * bindings/scripts/test/V8/V8TestInterface.h:
1428         (V8TestInterface):
1429         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1430         (WebCore):
1431         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1432         (V8TestMediaQueryListListener):
1433         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1434         (WebCore):
1435         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1436         (V8TestNamedConstructor):
1437         * bindings/scripts/test/V8/V8TestObj.cpp:
1438         (WebCore):
1439         * bindings/scripts/test/V8/V8TestObj.h:
1440         (V8TestObj):
1441         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1442         (WebCore):
1443         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1444         (V8TestSerializedScriptValueInterface):
1445         * bindings/v8/NPV8Object.cpp:
1446         (WebCore::npObjectTypeInfo):
1447         * bindings/v8/V8GCController.cpp:
1448         (WebCore::GrouperVisitor::visitDOMWrapper):
1449         * bindings/v8/WrapperTypeInfo.h:
1450         (WebCore):
1451         (WrapperTypeInfo):
1452         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Removed.
1453         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
1454         * bindings/v8/custom/V8DOMTokenListCustom.cpp: Removed.
1455         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1456         (WebCore):
1457         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
1458         * bindings/v8/custom/V8StyleSheetCustom.cpp:
1459         (WebCore::toV8):
1460         * css/CSSStyleSheet.idl:
1461         * css/StyleSheet.idl:
1462         * dom/DOMStringMap.idl:
1463         * dom/NamedNodeMap.idl:
1464         * html/DOMTokenList.idl:
1465         * html/track/TextTrackList.idl:
1466
1467 2012-03-12  Kentaro Hara  <haraken@chromium.org>
1468
1469         [V8][Refactoring] Make getWrapperSlow() and getExistingWrapperSlow() same
1470         https://bugs.webkit.org/show_bug.cgi?id=80916
1471
1472         Reviewed by Adam Barth.
1473
1474         This is one of the steps for fixing bug 80841.
1475         This patch makes getWrapperSlow() and getExistingWrapperSlow() same.
1476         In the next patch, we will remove getExistingWrapper() and getExistingWrapperSlow().
1477
1478         No tests. No change in behavior.
1479
1480         * bindings/scripts/CodeGeneratorV8.pm:
1481         (GenerateHeader):
1482         * bindings/v8/V8DOMWrapper.cpp:
1483         (WebCore::V8DOMWrapper::getWrapperSlow):
1484
1485 2012-03-12  Kentaro Hara  <haraken@chromium.org>
1486
1487         [V8] Refactor some header includes in V8 bindings
1488         https://bugs.webkit.org/show_bug.cgi?id=80913
1489
1490         Reviewed by Adam Barth.
1491
1492         This patch refactors some header includes in V8 bindings
1493         required for fixing bug 80841.
1494
1495         No tests. No change in behavior.
1496
1497         * bindings/v8/DOMDataStore.h:
1498         (DOMDataStore):
1499         * bindings/v8/V8DOMMap.h:
1500         * bindings/v8/V8DOMWrapper.cpp:
1501         * bindings/v8/V8IsolatedContext.cpp:
1502         (WebCore::V8IsolatedContext::isolatedContext):
1503         * bindings/v8/V8IsolatedContext.h:
1504         (WebCore::V8IsolatedContext::getEntered):
1505         (V8IsolatedContext):
1506         * bindings/v8/WorldContextHandle.cpp:
1507
1508 2012-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
1509
1510         Unreviewed, rolling out r110501.
1511         http://trac.webkit.org/changeset/110501
1512         https://bugs.webkit.org/show_bug.cgi?id=80908
1513
1514         Broke the Apple-Win build (Requested by abarth on #webkit).
1515
1516         * CMakeLists.txt:
1517         * DerivedSources.make:
1518         * DerivedSources.pri:
1519         * GNUmakefile.am:
1520         * GNUmakefile.list.am:
1521         * Target.pri:
1522         * WebCore.gyp/WebCore.gyp:
1523         * WebCore.gypi:
1524         * WebCore.pri:
1525         * WebCore.xcodeproj/project.pbxproj:
1526         * fileapi/DirectoryEntry.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntry.cpp.
1527         (WebCore):
1528         (WebCore::DirectoryEntry::DirectoryEntry):
1529         (WebCore::DirectoryEntry::createReader):
1530         (WebCore::DirectoryEntry::getFile):
1531         (WebCore::DirectoryEntry::getDirectory):
1532         (WebCore::DirectoryEntry::removeRecursively):
1533         * fileapi/DirectoryEntry.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntry.h.
1534         (WebCore):
1535         (DirectoryEntry):
1536         (WebCore::DirectoryEntry::create):
1537         (WebCore::DirectoryEntry::isDirectory):
1538         * fileapi/DirectoryEntry.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntry.idl.
1539         * fileapi/DirectoryEntrySync.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntrySync.cpp.
1540         (WebCore):
1541         (WebCore::DirectoryEntrySync::DirectoryEntrySync):
1542         (WebCore::DirectoryEntrySync::createReader):
1543         (WebCore::DirectoryEntrySync::getFile):
1544         (WebCore::DirectoryEntrySync::getDirectory):
1545         (WebCore::DirectoryEntrySync::removeRecursively):
1546         * fileapi/DirectoryEntrySync.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntrySync.h.
1547         (WebCore):
1548         (DirectoryEntrySync):
1549         (WebCore::DirectoryEntrySync::create):
1550         (WebCore::DirectoryEntrySync::isDirectory):
1551         * fileapi/DirectoryEntrySync.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntrySync.idl.
1552         * fileapi/DirectoryReader.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryReader.cpp.
1553         (WebCore):
1554         (WebCore::DirectoryReader::DirectoryReader):
1555         (WebCore::DirectoryReader::readEntries):
1556         * fileapi/DirectoryReader.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryReader.h.
1557         (WebCore):
1558         (DirectoryReader):
1559         (WebCore::DirectoryReader::create):
1560         (WebCore::DirectoryReader::filesystem):
1561         * fileapi/DirectoryReader.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryReader.idl.
1562         * fileapi/DirectoryReaderBase.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderBase.h.
1563         (WebCore):
1564         (DirectoryReaderBase):
1565         (WebCore::DirectoryReaderBase::filesystem):
1566         (WebCore::DirectoryReaderBase::setHasMoreEntries):
1567         (WebCore::DirectoryReaderBase::DirectoryReaderBase):
1568         * fileapi/DirectoryReaderSync.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderSync.cpp.
1569         (WebCore):
1570         (WebCore::DirectoryReaderSync::DirectoryReaderSync):
1571         (WebCore::DirectoryReaderSync::readEntries):
1572         * fileapi/DirectoryReaderSync.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderSync.h.
1573         (WebCore):
1574         (DirectoryReaderSync):
1575         (WebCore::DirectoryReaderSync::create):
1576         * fileapi/DirectoryReaderSync.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderSync.idl.
1577
1578 2012-03-12  Nico Weber  <thakis@chromium.org>
1579
1580         [chromium/mac] Make sure libWebKitSystemInterface.a doesn't contain ppc object files.
1581         https://bugs.webkit.org/show_bug.cgi?id=80902
1582
1583         Reviewed by Adam Barth.
1584
1585         Follow-up to http://codereview.chromium.org/9638015/
1586
1587         No intended behavior change.
1588
1589         * WebCore.gyp/mac/adjust_visibility.sh:
1590
1591 2012-03-12  Jer Noble  <jer.noble@apple.com>
1592
1593         WebCore: Add support for AudioNode "tailTime()" and "latencyTime()"
1594         https://bugs.webkit.org/show_bug.cgi?id=74750
1595
1596         Reviewed by Chris Rogers.
1597
1598         No new tests; optimization of existing code path, so covered by existing tests.
1599
1600         To account for AudioNodes which may generate non-silent audio when fed silent input
1601         for a certain amount of time after the last non-silent audio data, add two new virtual
1602         functions tailTime() and latencyTime().
1603
1604         * webaudio/AudioNode.h:
1605         (WebCore::AudioNode::tailTime): Added. Pure virtual.
1606         (WebCore::AudioNode::latencyTime): Added. Pure virtual.
1607         * platform/audio/AudioProcessor.h:
1608         (WebCore::AudioProcessor::tailTime): Added. Pure virtual.
1609         (WebCore::AudioProcessor::latencyTime): Added. Pure virtual.
1610         * platform/audio/AudioDSPKernel.h:
1611         (WebCore::AudioDSPKernel::tailTime): Added. Pure virtual.
1612         (WebCore::AudioDSPKernel::latencyTime): Added. Pure virtual.
1613
1614         Added tailTime() and latencyTime() overrides to the following classes:
1615         * platform/audio/AudioDSPKernelProcessor.cpp:
1616         (WebCore::AudioDSPKernelProcessor::tailTime):
1617         (WebCore::AudioDSPKernelProcessor::latencyTime):
1618         * platform/audio/AudioDSPKernelProcessor.h:
1619         * platform/audio/DynamicsCompressor.h:
1620         (WebCore::DynamicsCompressor::tailTime):
1621         (WebCore::DynamicsCompressor::latencyTime):
1622         * platform/audio/EqualPowerPanner.h:
1623         * platform/audio/HRTFPanner.cpp:
1624         (WebCore::HRTFPanner::tailTime):
1625         (WebCore::HRTFPanner::latencyTime):
1626         * platform/audio/HRTFPanner.h:
1627         * platform/audio/Panner.h:
1628         * webaudio/AudioBasicProcessorNode.cpp:
1629         (WebCore::AudioBasicProcessorNode::tailTime):
1630         (WebCore::AudioBasicProcessorNode::latencyTime):
1631         * webaudio/AudioBasicProcessorNode.h:
1632         * webaudio/AudioChannelMerger.h:
1633         * webaudio/AudioChannelSplitter.h:
1634         * webaudio/AudioDestinationNode.h:
1635         * webaudio/AudioGainNode.h:
1636         * webaudio/AudioPannerNode.h:
1637         * webaudio/AudioSourceNode.h:
1638         * webaudio/BiquadDSPKernel.cpp:
1639         (WebCore::BiquadDSPKernel::tailTime):
1640         (WebCore::BiquadDSPKernel::latencyTime):
1641         * webaudio/BiquadDSPKernel.h:
1642         * webaudio/BiquadFilterNode.h:
1643         * webaudio/ConvolverNode.cpp:
1644         (WebCore::ConvolverNode::tailTime):
1645         (WebCore::ConvolverNode::latencyTime):
1646         * webaudio/ConvolverNode.h:
1647         * webaudio/DelayDSPKernel.cpp:
1648         (WebCore::DelayDSPKernel::tailTime):
1649         (WebCore::DelayDSPKernel::latencyTime):
1650         * webaudio/DelayDSPKernel.h:
1651         * webaudio/DelayProcessor.h:
1652         * webaudio/DynamicsCompressorNode.cpp:
1653         (WebCore::DynamicsCompressorNode::tailTime):
1654         (WebCore::DynamicsCompressorNode::latencyTime):
1655         * webaudio/DynamicsCompressorNode.h:
1656         * webaudio/JavaScriptAudioNode.cpp:
1657         (WebCore::JavaScriptAudioNode::tailTime):
1658         (WebCore::JavaScriptAudioNode::latencyTime):
1659         * webaudio/JavaScriptAudioNode.h:
1660         * webaudio/RealtimeAnalyserNode.h:
1661         * webaudio/WaveShaperDSPKernel.h:
1662
1663         The following functions were added as support for the new AudioNode and AudioProcessor functions:
1664         * platform/audio/Biquad.cpp:
1665         (WebCore::Biquad::latencyFrames):
1666         * platform/audio/Biquad.h:
1667         * platform/audio/Reverb.cpp:
1668         (WebCore::Reverb::latencyFrames):
1669         * platform/audio/ReverbConvolver.h:
1670         (WebCore::ReverbConvolver::latencyFrames):
1671
1672         The following functions were made const-correct:
1673         * platform/audio/HRTFPanner.h:
1674         (WebCore::HRTFPanner::fftSize):
1675         * platform/audio/Reverb.h:
1676         (WebCore::Reverb::impulseResponseLength):
1677
1678 2012-03-12  Anders Carlsson  <andersca@apple.com>
1679
1680         WebTileLayers should be opaque
1681         https://bugs.webkit.org/show_bug.cgi?id=80907
1682         <rdar://problem/11034390>
1683
1684         Reviewed by Andreas Kling.
1685
1686         * platform/graphics/ca/mac/TileCache.mm:
1687         (WebCore::TileCache::createTileLayer):
1688         Call -[CALayer setOpaque:] on the newly created WebTileLayer.
1689
1690 2012-03-12  Emil A Eklund  <eae@chromium.org>
1691
1692         Fix rounding in scrollbar rect calculations
1693         https://bugs.webkit.org/show_bug.cgi?id=80894
1694
1695         Reviewed by Eric Seidel.
1696
1697         Fix usage of subpixel units in RenderScrollbar::buttonRect and
1698         RenderScrollbar::trackRect.
1699
1700         No new tests, no new functionality.
1701
1702         * rendering/LayoutTypes.h:
1703         (WebCore::isIntegerValue):
1704         Add dummy isIntegerValue function, will be replaced with actual
1705         implementation once LayoutUnit is remapped to FractionalLayoutUnit.
1706         
1707         * rendering/RenderScrollbar.cpp:
1708         (WebCore::RenderScrollbar::buttonRect):
1709         (WebCore::RenderScrollbar::trackRect):
1710         Change rect calculations to use pixel snapped values.
1711
1712         * rendering/RenderScrollbarPart.h:
1713         (RenderScrollbarPart):
1714         (WebCore::RenderScrollbarPart::marginTop):
1715         (WebCore::RenderScrollbarPart::marginBottom):
1716         (WebCore::RenderScrollbarPart::marginLeft):
1717         (WebCore::RenderScrollbarPart::marginRight):
1718         Add ASSERT to ensure that scrollbar parts are always aligned to device
1719         pixels.
1720
1721 2012-03-12  C Anthony Risinger  <anthony@xtfx.me>
1722
1723         [GObject IDL Parser] STRING argument should be HASHREF
1724         https://bugs.webkit.org/show_bug.cgi?id=78877
1725
1726         Reviewed by Kentaro Hara.
1727
1728         * bindings/scripts/CodeGeneratorGObject.pm:
1729         (GenerateFunctions): extendedAttributes are hashes, not strings
1730
1731 2012-03-12  Jessie Berlin  <jberlin@apple.com>
1732
1733         More Windows build fixing.
1734
1735         Use fully qualified paths for WTF headers.
1736
1737         * platform/graphics/cg/ImageSourceCGWin.cpp:
1738         * platform/graphics/win/UniscribeController.h:
1739         * platform/win/DragImageCGWin.cpp:
1740         * platform/win/DragImageCairoWin.cpp:
1741         * platform/win/DragImageWin.cpp:
1742         * rendering/RenderThemeSafari.cpp:
1743
1744 2012-03-12  Mark Pilgrim  <pilgrim@chromium.org>
1745
1746         Move DirectoryEntry and DirectoryReader to new Modules/filesystem/ directory
1747         https://bugs.webkit.org/show_bug.cgi?id=80625
1748
1749         Reviewed by Adam Barth.
1750
1751         No new tests, all existing tests pass.
1752
1753         * CMakeLists.txt:
1754         * DerivedSources.make:
1755         * DerivedSources.pri:
1756         * GNUmakefile.am:
1757         * GNUmakefile.list.am:
1758         * Modules/filesystem: Added.
1759         * Modules/filesystem/DirectoryEntry.cpp: Copied from Source/WebCore/fileapi/DirectoryEntry.cpp.
1760         * Modules/filesystem/DirectoryEntry.h: Copied from Source/WebCore/fileapi/DirectoryEntry.h.
1761         * Modules/filesystem/DirectoryEntry.idl: Copied from Source/WebCore/fileapi/DirectoryEntry.idl.
1762         * Modules/filesystem/DirectoryEntrySync.cpp: Copied from Source/WebCore/fileapi/DirectoryEntrySync.cpp.
1763         * Modules/filesystem/DirectoryEntrySync.h: Copied from Source/WebCore/fileapi/DirectoryEntrySync.h.
1764         * Modules/filesystem/DirectoryEntrySync.idl: Copied from Source/WebCore/fileapi/DirectoryEntrySync.idl.
1765         * Modules/filesystem/DirectoryReader.cpp: Copied from Source/WebCore/fileapi/DirectoryReader.cpp.
1766         * Modules/filesystem/DirectoryReader.h: Copied from Source/WebCore/fileapi/DirectoryReader.h.
1767         * Modules/filesystem/DirectoryReader.idl: Copied from Source/WebCore/fileapi/DirectoryReader.idl.
1768         * Modules/filesystem/DirectoryReaderBase.h: Copied from Source/WebCore/fileapi/DirectoryReaderBase.h.
1769         * Modules/filesystem/DirectoryReaderSync.cpp: Copied from Source/WebCore/fileapi/DirectoryReaderSync.cpp.
1770         * Modules/filesystem/DirectoryReaderSync.h: Copied from Source/WebCore/fileapi/DirectoryReaderSync.h.
1771         * Modules/filesystem/DirectoryReaderSync.idl: Copied from Source/WebCore/fileapi/DirectoryReaderSync.idl.
1772         * Target.pri:
1773         * WebCore.gyp/WebCore.gyp:
1774         * WebCore.gypi:
1775         * WebCore.pri:
1776         * WebCore.xcodeproj/project.pbxproj:
1777         * fileapi/DirectoryEntry.cpp: Removed.
1778         * fileapi/DirectoryEntry.h: Removed.
1779         * fileapi/DirectoryEntry.idl: Removed.
1780         * fileapi/DirectoryEntrySync.cpp: Removed.
1781         * fileapi/DirectoryEntrySync.h: Removed.
1782         * fileapi/DirectoryEntrySync.idl: Removed.
1783         * fileapi/DirectoryReader.cpp: Removed.
1784         * fileapi/DirectoryReader.h: Removed.
1785         * fileapi/DirectoryReader.idl: Removed.
1786         * fileapi/DirectoryReaderBase.h: Removed.
1787         * fileapi/DirectoryReaderSync.cpp: Removed.
1788         * fileapi/DirectoryReaderSync.h: Removed.
1789         * fileapi/DirectoryReaderSync.idl: Removed.
1790
1791 2012-03-12  Brady Eidson  <beidson@apple.com>
1792
1793         https://bugs.webkit.org/show_bug.cgi?id=80903
1794         InspectorDOMStorageAgent creates a Storage object which is a DOMWindowProperty - Should use the StorageArea directly
1795
1796         Reviewed by Tim Hatcher.
1797
1798         No new tests. (No behavior change)
1799
1800         Changed to hold the StorageArea directly and added a Frame* accessor:
1801         * inspector/InspectorDOMStorageResource.h:
1802         (WebCore::InspectorDOMStorageResource::create):
1803         (WebCore::InspectorDOMStorageResource::storageArea):
1804         (WebCore::InspectorDOMStorageResource::frame):
1805         (InspectorDOMStorageResource):
1806
1807         * inspector/InspectorDOMStorageResource.cpp:
1808         (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
1809
1810         * inspector/InspectorDOMStorageAgent.cpp:
1811         (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
1812         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
1813         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
1814         (WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
1815
1816 2012-03-12  Brian Salomon  <bsalomon@google.com>
1817
1818         [Skia] Release CGImage used to apply color space conversion to SkBitmap
1819         https://bugs.webkit.org/show_bug.cgi?id=80892
1820
1821         Reviewed by Adam Barth.
1822
1823         Regressions should be covered by any test that does image decode on the mac.
1824
1825         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
1826         (WebCore::resolveColorSpace):
1827
1828 2012-03-12  Levi Weintraub  <leviw@chromium.org>
1829
1830         Update LayoutUnit usage in RenderMathML* classes
1831         https://bugs.webkit.org/show_bug.cgi?id=77916
1832
1833         Reviewed by Eric Seidel.
1834
1835         The purpose of this patch is to ensure MathML rendering does not regress when
1836         we switch to sub-pixel layout. A subsequent patch can likely improve MathML's
1837         rendering when zoom is applied.
1838
1839         To accomplish this without changing the current heuristics for positioning,
1840         we continue to use integers for sizes and locations, using pixel snapping
1841         when communicating with other Rendering classes.
1842
1843         No new tests. No change in behavior.
1844
1845         * rendering/mathml/RenderMathMLBlock.cpp:
1846         (WebCore::RenderMathMLBlock::paint): Cleaning up debug painting to be on
1847         pixel boundaries instead of subpixel.
1848         * rendering/mathml/RenderMathMLFraction.cpp:
1849         (WebCore::RenderMathMLFraction::paint): Reverting to integers for determining
1850         the vertical offset.
1851         (WebCore::RenderMathMLFraction::baselinePosition):
1852         * rendering/mathml/RenderMathMLRoot.cpp:
1853         (WebCore::RenderMathMLRoot::paint): Using integers for height and width
1854         and only accumulating pixel snapped values.
1855         (WebCore::RenderMathMLRoot::layout): Setting padding with integers to
1856         avoid inconsistent rounding based on the root's location.
1857         * rendering/mathml/RenderMathMLRow.cpp:
1858         (WebCore::RenderMathMLRow::layout):
1859         * rendering/mathml/RenderMathMLSquareRoot.cpp:
1860         (WebCore::RenderMathMLSquareRoot::paint): See RenderMathMLRoot.
1861         (WebCore::RenderMathMLSquareRoot::layout): Ditto.
1862         * rendering/mathml/RenderMathMLUnderOver.cpp:
1863         (WebCore::getOffsetHeight):
1864         (WebCore::RenderMathMLUnderOver::layout):
1865
1866 2012-03-12  Anders Carlsson  <andersca@apple.com>
1867
1868         Use smaller tiles for right and bottom edges
1869         https://bugs.webkit.org/show_bug.cgi?id=80893
1870         <rdar://problem/11032873>
1871
1872         Reviewed by Sam Weinig.
1873
1874         * platform/graphics/ca/mac/TileCache.mm:
1875         (WebCore::TileCache::rectForTileIndex):
1876         Intersect the rect with the tile cache bounds.
1877
1878         (WebCore::TileCache::revalidateTiles):
1879         Resize already existing tiles if needed.
1880
1881         (WebCore::TileCache::createTileLayer):
1882         This now takes a tile rect. Use setFrame instead of setting the bounds and position separately.
1883
1884 2012-03-12  Enrica Casucci  <enrica@apple.com>
1885
1886         WebKit2: remove NSPasteboard access for promised data from the WebProcess
1887         https://bugs.webkit.org/show_bug.cgi?id=80073
1888         
1889         Reviewed by Alexey Proskuryakov.
1890
1891         * WebCore.exp.in: Added two exported methods.
1892         * platform/mac/FileSystemMac.mm:
1893         (WebCore::setMetaData): Last parameter in the call to wkSetMetadataURL
1894         needs to be wrapped in String before casting to NSString.
1895
1896 2012-03-12  Alexey Proskuryakov  <ap@apple.com>
1897
1898         clang build fix
1899
1900         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::convertToLength): Reorder
1901         boolean operators, so that a warning about "use of logical || with constant operand" doesn't
1902         appear.
1903
1904 2012-03-12  Abhishek Arya  <inferno@chromium.org>
1905
1906         Crash in Text::splitText due to mutation events.
1907         https://bugs.webkit.org/show_bug.cgi?id=80828
1908
1909         Reviewed by Ryosuke Niwa.
1910
1911         Test: fast/text/split-text-crash.xhtml
1912
1913         * dom/Range.cpp:
1914         (WebCore::Range::insertNode): replace m_start.container() calls with ref protected node.
1915
1916 2012-03-12  Kenneth Russell  <kbr@google.com>
1917
1918         Null argument to texSubImage2D crashes
1919         https://bugs.webkit.org/show_bug.cgi?id=80778
1920
1921         Reviewed by Dean Jackson.
1922
1923         Generate INVALID_VALUE OpenGL error upon receiving null argument.
1924         Final behavior still being decided on public-webgl mailing list.
1925
1926         * html/canvas/WebGLRenderingContext.cpp:
1927         (WebCore):
1928         (WebCore::WebGLRenderingContext::texImage2D):
1929         (WebCore::WebGLRenderingContext::texSubImage2D):
1930         (WebCore::WebGLRenderingContext::validateTexFuncData):
1931         * html/canvas/WebGLRenderingContext.h:
1932
1933 2012-03-12  Luke Macpherson   <macpherson@chromium.org>
1934
1935         Remove CSSStyleSelector's convertToLength method and use CSSPrimitiveValue's version directly.
1936         https://bugs.webkit.org/show_bug.cgi?id=80484
1937
1938         Reviewed by Julien Chaffraix.
1939
1940         No new tests / code cleanup only.
1941
1942         * css/CSSPrimitiveValueMappings.h:
1943         (WebCore::CSSPrimitiveValue::convertToLength):
1944         * css/CSSStyleApplyProperty.cpp:
1945         (WebCore::ApplyPropertyClip::convertToLength):
1946         * css/CSSStyleSelector.cpp:
1947         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1948
1949 2012-03-12  Stephen White  <senorblanco@chromium.org>
1950
1951         [chromium] Restore canvas2D acceleration after context loss.
1952         https://bugs.webkit.org/show_bug.cgi?id=80629
1953
1954         Reviewed by James Robinson.
1955
1956         Covered by existing canvas tests, and manual testing (killing the GPU
1957         process).
1958
1959         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1960         (WebCore::Canvas2DLayerChromium::create):
1961         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
1962         (WebCore::Canvas2DLayerChromium::setNeedsDisplayRect):
1963         (WebCore::Canvas2DLayerChromium::drawsContent):
1964         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
1965         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1966         (Canvas2DLayerChromium):
1967         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1968         (WebCore::CCRenderSurface::applyFilters):
1969         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
1970         (SharedGraphicsContext3DImpl):
1971         (WebCore::SharedGraphicsContext3DImpl::SharedGraphicsContext3DImpl):
1972         (WebCore::SharedGraphicsContext3DImpl::get):
1973         (WebCore):
1974         (WebCore::SharedGraphicsContext3D::get):
1975         * platform/graphics/gpu/SharedGraphicsContext3D.h:
1976         (SharedGraphicsContext3D):
1977         * platform/graphics/skia/ImageBufferSkia.cpp:
1978         (WebCore::createAcceleratedCanvas):
1979         * platform/graphics/skia/PlatformContextSkia.cpp:
1980         (WebCore::PlatformContextSkia::PlatformContextSkia):
1981         (WebCore):
1982         * platform/graphics/skia/PlatformContextSkia.h:
1983         (WebCore):
1984         (WebCore::PlatformContextSkia::isAccelerated):
1985         (WebCore::PlatformContextSkia::setAccelerated):
1986         (PlatformContextSkia):
1987
1988 2012-03-12  George Staikos  <staikos@webkit.org>
1989
1990         It doesn't make sense to return const unsigned, and GCC warns about it.
1991         Remove const.
1992         https://bugs.webkit.org/show_bug.cgi?id=80790
1993
1994         Reviewed by Antonio Gomes.
1995
1996         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h:
1997         (WebCore::ComplexTextController::length):
1998         (WebCore::ComplexTextController::numCodePoints):
1999         (WebCore::ComplexTextController::offsetX):
2000
2001 2012-03-12  Beth Dakin  <bdakin@apple.com>
2002
2003         https://bugs.webkit.org/show_bug.cgi?id=80888
2004         Clear background for NSTextFieldCell is unreliable and not necessary
2005         -and corresponding-
2006         <rdar://problem/10663710>
2007
2008         Reviewed by Dan Bernstein.
2009
2010         With http://trac.webkit.org/changeset/104240 I thought it was necessary to 
2011         make NSTextFieldCells draw with a clear background in order to allow styled 
2012         text fields. That is not actually necessary; we just had a different bug 
2013         where isControlStyled() was only checking for styled borders on text fields. 
2014         Text fields can also be styled with backgrounds, so they need the full check.
2015         * rendering/RenderThemeMac.mm:
2016         (WebCore::RenderThemeMac::isControlStyled):
2017         (WebCore::RenderThemeMac::textField):
2018
2019 2012-03-12  Scott Byer  <scottbyer@chromium.org>
2020
2021         Cleanup obsolete files.
2022         https://bugs.webkit.org/show_bug.cgi?id=80737
2023
2024         Reviewed by James Robinson.
2025
2026         No new code.
2027
2028         * GNUmakefile.list.am:
2029         * PlatformWinCE.cmake:
2030         * Target.pri:
2031         * WebCore.vcproj/WebCore.vcproj:
2032         * platform/ScrollAnimatorWin.cpp: Removed.
2033         * platform/ScrollAnimatorWin.h: Removed.
2034
2035 2012-03-12  Gregg Tavares  <gman@google.com>
2036
2037         Make texImage2D error for wrong size ArrayBufferView more helpful
2038         https://bugs.webkit.org/show_bug.cgi?id=80868
2039         
2040         It took me about 30 minutes to figure out my texImage2D was failing
2041         not because my ArrayBufferView was too small but because the default
2042         alignment is 4. A better error message might help devs find this issue
2043         faster.
2044
2045         Reviewed by Kenneth Russell.
2046
2047         No new tests as no new functionality.
2048
2049         * html/canvas/WebGLRenderingContext.cpp:
2050         (WebCore):
2051         (WebCore::WebGLRenderingContext::validateTexFuncData):
2052
2053 2012-03-12  Tim Horton  <timothy_horton@apple.com>
2054
2055         Infinite repaint loop with SVGImageCache and deferred repaint timers
2056         https://bugs.webkit.org/show_bug.cgi?id=78315
2057         <rdar://problem/10651634>
2058
2059         Reviewed by Nikolas Zimmermann.
2060
2061         Only defer image redraw on a timer if we're in layout. This breaks
2062         the repaint loop while still preventing us from drawing inside layout.
2063
2064         Completely disable repaint during relayout inside SVGImage::drawSVGToImageBuffer,
2065         preventing deferred repaint timers from being started during that process.
2066
2067         No new tests, as the problem only occurs in a nonstandard configuration.
2068
2069         * page/FrameView.cpp:
2070         (WebCore::FrameView::FrameView):
2071         (WebCore::FrameView::reset):
2072         (WebCore::FrameView::repaintContentRectangle):
2073         (WebCore::FrameView::endDeferredRepaints):
2074         (WebCore::FrameView::startDeferredRepaintTimer):
2075         (WebCore):
2076         (WebCore::FrameView::doDeferredRepaints):
2077         (WebCore::FrameView::deferredRepaintTimerFired):
2078         (WebCore::FrameView::beginDisableRepaints):
2079         (WebCore::FrameView::endDisableRepaints):
2080         * page/FrameView.h:
2081         (FrameView):
2082         (WebCore::FrameView::repaintsDisabled):
2083         * rendering/RenderView.cpp:
2084         (WebCore::RenderView::shouldRepaint):
2085         * svg/graphics/SVGImage.cpp:
2086         (WebCore::SVGImage::drawSVGToImageBuffer):
2087         (WebCore::SVGImage::draw):
2088         (WebCore::SVGImage::frameView):
2089         (WebCore):
2090         * svg/graphics/SVGImage.h:
2091         (WebCore):
2092         * svg/graphics/SVGImageCache.cpp:
2093         (WebCore::SVGImageCache::imageContentChanged):
2094         (WebCore::SVGImageCache::redraw):
2095         (WebCore::SVGImageCache::redrawTimerFired):
2096         (WebCore):
2097         * svg/graphics/SVGImageCache.h:
2098         (SVGImageCache):
2099
2100 2012-03-12  Adam Klein  <adamk@chromium.org>
2101
2102         [MutationObservers] Enforce a consistent order of MutationRecord delivery
2103         https://bugs.webkit.org/show_bug.cgi?id=80549
2104
2105         Reviewed by Ojan Vafai.
2106
2107         Mutations should be delivered in order of creation.
2108
2109         Tests: fast/mutation/create-during-delivery.html
2110                fast/mutation/delivery-order.html
2111                fast/mutation/mutate-during-delivery.html
2112
2113         * dom/WebKitMutationObserver.cpp:
2114         (WebCore):
2115         (WebCore::WebKitMutationObserver::ObserverLessThan::operator()): Functor for use with std::sort.
2116         (WebCore::WebKitMutationObserver::create):
2117         (WebCore::WebKitMutationObserver::WebKitMutationObserver):
2118         (WebCore::WebKitMutationObserver::deliverAllMutations): Move observers into a sorted vector before delivery.
2119         * dom/WebKitMutationObserver.h: Add a "priority" member which monotonically increases with each construction.
2120
2121 2012-03-12  Nat Duca  <nduca@chromium.org>
2122
2123         [Chromium] Force compositeAndReadback through regular scheduling flow
2124         https://bugs.webkit.org/show_bug.cgi?id=77049
2125
2126         Reviewed by James Robinson.
2127
2128         * platform/graphics/chromium/cc/CCFrameRateController.cpp:
2129         (WebCore::CCFrameRateController::onTimerTick):
2130         * platform/graphics/chromium/cc/CCFrameRateController.h:
2131         (CCFrameRateControllerClient):
2132         * platform/graphics/chromium/cc/CCScheduler.cpp:
2133         (WebCore::CCScheduler::setNeedsForcedCommit):
2134         (WebCore):
2135         (WebCore::CCScheduler::vsyncTick):
2136         * platform/graphics/chromium/cc/CCScheduler.h:
2137         (CCScheduler):
2138         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
2139         (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
2140         (WebCore::CCSchedulerStateMachine::nextAction):
2141         (WebCore::CCSchedulerStateMachine::updateState):
2142         (WebCore::CCSchedulerStateMachine::setNeedsForcedCommit):
2143         (WebCore):
2144         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
2145         (CCSchedulerStateMachine):
2146         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2147         (WebCore::CCThreadProxy::CCThreadProxy):
2148         (WebCore::CCThreadProxy::compositeAndReadback):
2149         (WebCore::CCThreadProxy::requestReadbackOnImplThread):
2150         (WebCore::CCThreadProxy::forceBeginFrameOnImplThread):
2151         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
2152         (WebCore::CCThreadProxy::beginFrame):
2153         * platform/graphics/chromium/cc/CCThreadProxy.h:
2154         (CCThreadProxy):
2155         (WebCore::CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState):
2156         (BeginFrameAndCommitState):
2157
2158 2012-03-12  Joshua Bell  <jsbell@chromium.org>
2159
2160         IndexedDB: Handle LevelDB database corruption
2161         https://bugs.webkit.org/show_bug.cgi?id=79413
2162
2163         Add LevelDBDatabase::destroy() method so that clients can retry if open() fails.
2164
2165         Reviewed by Tony Chang.
2166
2167         Test: webkit_unit_tests --gtest_filter='LevelDBDatabaseTest.CorruptionTest'
2168
2169         * Modules/indexeddb/IDBLevelDBBackingStore.cpp: Implement open/destroy/open strategy.
2170         (WebCore::IDBLevelDBBackingStore::open):
2171         * platform/leveldb/LevelDBDatabase.cpp:
2172         (WebCore::LevelDBDatabase::destroy):
2173         (WebCore):
2174         * platform/leveldb/LevelDBDatabase.h:
2175         (LevelDBDatabase):
2176
2177 2012-03-11  Shawn Singh  <shawnsingh@chromium.org>
2178
2179         Fix regression on fast/table/table-row-compositing-repaint-crash.html
2180         https://bugs.webkit.org/show_bug.cgi?id=80804
2181
2182         Reviewed by Simon Fraser.
2183
2184         Covered by existing tests.
2185
2186         http://trac.webkit.org/changeset/110401/ accidentally caused
2187         fast/table/table-row-compositing-repaint-crash.html to fail.
2188
2189         * rendering/RenderLayerCompositor.cpp:
2190         (WebCore::RenderLayerCompositor::updateBacking):
2191
2192 2012-03-12  Mike Lawther  <mikelawther@chromium.org>
2193
2194         CSS3 calc: enable mixed percent/absolute for font
2195         https://bugs.webkit.org/show_bug.cgi?id=80813
2196
2197         Reviewed by Ojan Vafai.
2198
2199         Add support for mixed percent/absolute expressions to the font handling class.
2200
2201         * css/CSSStyleApplyProperty.cpp:
2202         (WebCore::ApplyPropertyFontSize::applyValue):
2203
2204 2012-03-12  Andreas Kling  <awesomekling@apple.com>
2205
2206         Restore Attr::style() functionality.
2207         <http://webkit.org/b/80678>
2208         <rdar://problem/10933904>
2209
2210         Reviewed by Antti Koivisto.
2211
2212         The neutering of Attr::style() in r106740 broke some internal clients of the Obj-C API,
2213         so this was definitely premature.
2214
2215         Since we no longer have a per-Attribute style object, synthesize one in style() and
2216         hang it off of the Attr. This grows Attr by one pointer, but it's a low-volume object
2217         so it shouldn't matter much.
2218
2219         We recreate the StylePropertySet object on every call to style(), to avoid complicating
2220         things with custom invalidation code.
2221
2222         * dom/Attr.cpp:
2223         (WebCore::Attr::style):
2224         * dom/Attr.h:
2225         * dom/StyledElement.h:
2226         (WebCore::StyledElement::collectStyleForAttribute):
2227
2228 2012-03-12  Ryosuke Niwa  <rniwa@webkit.org>
2229
2230         REGRESSION(r109285): Crash in WebCore::Document::nodeChildrenWillBeRemoved
2231         https://bugs.webkit.org/show_bug.cgi?id=80578
2232
2233         Reviewed by Andreas Kling.
2234
2235         Test: svg/css/style-change-crash.html
2236
2237         * dom/Element.cpp:
2238         (WebCore::Element::setAttribute):
2239         (WebCore::Element::setAttributeInternal):
2240         * dom/Element.h:
2241         (Element):
2242         * dom/ElementAttributeData.cpp:
2243         (WebCore::ElementAttributeData::addAttribute):
2244         (WebCore::ElementAttributeData::removeAttribute):
2245         * dom/ElementAttributeData.h:
2246         (ElementAttributeData):
2247         * dom/StyledElement.cpp:
2248         (WebCore::StyledElement::updateStyleAttribute):
2249
2250 2012-03-12  Sadrul Habib Chowdhury  <sadrul@chromium.org>
2251
2252         Touch event handler count is not updated when adding handlers to the window.
2253         https://bugs.webkit.org/show_bug.cgi?id=80756
2254
2255         Touch event handlers added to the window needs to be included when counting the number of touch event
2256         handlers. This makes touch event handler counting identical to wheel event handler counting.
2257
2258         Reviewed by Anders Carlsson.
2259
2260         Test: fast/events/touch/touch-handler-count.html
2261
2262         * dom/EventNames.h:
2263         (EventNames):
2264         (WebCore::EventNames::isTouchEventType):
2265         * dom/Node.cpp:
2266         (WebCore):
2267         (WebCore::tryAddEventListener):
2268         (WebCore::tryRemoveEventListener):
2269         * page/DOMWindow.cpp:
2270         (WebCore::DOMWindow::addEventListener):
2271         (WebCore::DOMWindow::removeEventListener):
2272         * testing/Internals.cpp:
2273         (WebCore::Internals::touchEventHandlerCount):
2274         (WebCore):
2275         * testing/Internals.h:
2276         (Internals):
2277         * testing/Internals.idl:
2278
2279 2012-03-12  Pavel Podivilov  <podivilov@chromium.org>
2280
2281         Web Inspector: extract ResourceScriptMapping from MainScriptMapping.
2282         https://bugs.webkit.org/show_bug.cgi?id=80834
2283
2284         Reviewed by Vsevolod Vlasov.
2285
2286         * inspector/front-end/ScriptMapping.js:
2287         (WebInspector.ResourceScriptMapping):
2288         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeListChanged):
2289         (WebInspector.ResourceScriptMapping.prototype.reset):
2290         (WebInspector.MainScriptMapping):
2291         (WebInspector.MainScriptMapping.prototype.rawLocationToUILocation):
2292         (WebInspector.MainScriptMapping.prototype.createLiveLocation):
2293         (WebInspector.MainScriptMapping.prototype._registerLiveLocation):
2294         (WebInspector.MainScriptMapping.prototype._unregisterLiveLocation):
2295         (WebInspector.MainScriptMapping.prototype._updateLiveLocations):
2296         (WebInspector.MainScriptMapping.prototype.uiSourceCodeList):
2297         (WebInspector.MainScriptMapping.prototype.addScript):
2298         (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged):
2299         (WebInspector.MainScriptMapping.prototype.setFormatSource):
2300         (WebInspector.MainScriptMapping.prototype.forceUpdateSourceMapping):
2301         (WebInspector.MainScriptMapping.prototype.reset):
2302
2303 2012-03-12  Pavel Feldman  <pfeldman@chromium.org>
2304
2305         Web Inspector: recognize Float*Array and Int*Array as arrays.
2306         https://bugs.webkit.org/show_bug.cgi?id=80850
2307
2308         Reviewed by Vsevolod Vlasov.
2309
2310         Test: inspector/console/console-external-array.html
2311
2312         * bindings/js/JSInjectedScriptHostCustom.cpp:
2313         (WebCore::JSInjectedScriptHost::type):
2314         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2315         (WebCore::V8InjectedScriptHost::typeCallback):
2316
2317 2012-03-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2318
2319         [TexMapGL] Pixel-align the transform of textures that fit pixel-for-pixel on the frame buffer.
2320         https://bugs.webkit.org/show_bug.cgi?id=80848
2321
2322         Reviewed by Noam Rosenthal.
2323
2324         When rendering a transformed texture on the screen with a fractional
2325         coordinate with linear filtering, the resulting pixel will be blended from
2326         the texels around this fractional position according to their cover ratio.
2327         This produces a slight blur of pixels which give no benefit when rendering
2328         a texture that isn't scaled.
2329
2330         This patch offsets the transform by rounding the translation part of the
2331         layer's transform to align the result to integer coordinates.
2332         Applying the adjustment on the layer transform makes sure that all the tiles
2333         get the same adjustment.
2334
2335         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2336         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2337         * platform/graphics/texmap/TextureMapperGL.cpp:
2338         (WebCore::TextureMapperGL::drawTexture):
2339         * platform/graphics/texmap/TextureMapperGL.h:
2340         (WebCore::BitmapTextureGL::textureSize):
2341
2342 2012-03-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2343
2344         [TexMapGL] Use textures sized exactly to their contents.
2345         https://bugs.webkit.org/show_bug.cgi?id=80845
2346
2347         Reviewed by Noam Rosenthal.
2348
2349         This fixes a regression introduced in r108273 as well as the bug it fixed.
2350         The regressing behavior was that textures were rendered shrunk by 1 pixel
2351         and thus would appear blurry on the screen.
2352         The original problem was that garbage contents would appear on filtered
2353         textures since we would reuse textures of different sizes by giving them
2354         a slightly bigger size.
2355
2356         This patch will reuse the texture only if the size matches exactly to allow
2357         edge clamping to work properly when redering with linear filtering.
2358         Reusing textures would only saves us the allocation of graphic memory
2359         anyway, which is negligeable compared to texture upload.
2360
2361         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2362         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2363         * platform/graphics/texmap/TextureMapperGL.cpp:
2364         (WebCore::TextureMapperGL::drawTexture):
2365         (WebCore::BitmapTextureGL::didReset):
2366         * platform/graphics/texmap/TextureMapperGL.h:
2367         (BitmapTextureGL):
2368         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
2369         (WebCore::TextureMapperShaderProgramOpacityAndMask::TextureMapperShaderProgramOpacityAndMask):
2370         (WebCore::TextureMapperShaderProgramOpacityAndMask::prepare):
2371         * platform/graphics/texmap/TextureMapperShaderManager.h:
2372         (TextureMapperShaderProgramOpacityAndMask):
2373
2374 2012-03-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2375
2376         [TexMap] Remove BitmapTexture::destroy.
2377         https://bugs.webkit.org/show_bug.cgi?id=80844
2378
2379         Reviewed by Noam Rosenthal.
2380
2381         Use the destructor directly instead.
2382
2383         * platform/graphics/texmap/TextureMapper.h:
2384         * platform/graphics/texmap/TextureMapperGL.cpp:
2385         (WebCore::BitmapTextureGL::~BitmapTextureGL):
2386         * platform/graphics/texmap/TextureMapperGL.h:
2387         (BitmapTextureGL):
2388         * platform/graphics/texmap/TextureMapperImageBuffer.h:
2389         (WebCore::BitmapTextureImageBuffer::~BitmapTextureImageBuffer):
2390
2391 2012-03-12  Pavel Podivilov  <podivilov@chromium.org>
2392
2393         Web Inspector: DebuggerModel.Location should have scriptId property.
2394         https://bugs.webkit.org/show_bug.cgi?id=80830
2395
2396         Reviewed by Vsevolod Vlasov.
2397
2398         * inspector/front-end/CompilerSourceMapping.js:
2399         (WebInspector.ClosureCompilerSourceMapping.prototype.sourceLocationToCompiledLocation):
2400         * inspector/front-end/ConsoleMessage.js:
2401         (WebInspector.ConsoleMessageImpl.prototype.location):
2402         * inspector/front-end/DebuggerModel.js:
2403         (WebInspector.DebuggerModel.Location):
2404         (WebInspector.DebuggerModel.prototype._failedToParseScriptSource):
2405         (WebInspector.DebuggerModel.prototype.createRawLocation):
2406         (WebInspector.DebuggerModel.prototype.createRawLocationByURL):
2407         * inspector/front-end/DebuggerPresentationModel.js:
2408         (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded):
2409         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessageToScript):
2410         (WebInspector.DebuggerPresentationModel.prototype._addPendingConsoleMessagesToScript):
2411         (WebInspector.DebuggerPresentationModelResourceBinding.prototype._uiSourceCodeForResource):
2412         (WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyLocation):
2413         * inspector/front-end/RawSourceCode.js:
2414         (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation):
2415         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation):
2416         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation):
2417         (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.uiLocationToRawLocation):
2418         * inspector/front-end/ScriptFormatter.js:
2419         (WebInspector.ScriptFormatter.locationToPosition):
2420         (WebInspector.ScriptFormatter.positionToLocation):
2421         (WebInspector.FormattedSourceMapping.prototype.originalToFormatted):
2422         (WebInspector.FormattedSourceMapping.prototype.formattedToOriginal):
2423
2424 2012-03-12  Dana Jansens  <danakj@chromium.org>
2425
2426         [chromium] A couple early-outs for occlusion tracker
2427         https://bugs.webkit.org/show_bug.cgi?id=80742
2428
2429         Reviewed by Adrienne Walker.
2430
2431         Covered by existing tests.
2432
2433         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2434         (WebCore::::occluded):
2435         (WebCore::::unoccludedContentRect):
2436
2437 2012-03-12  Zeno Albisser  <zeno@webkit.org>
2438
2439         [Qt][Mac] Build fails after adding WebCoreCFAutorelease(CFTypeRef) (r110360).
2440         https://bugs.webkit.org/show_bug.cgi?id=80840
2441
2442         CoreFoundation/CFBase.h needs to be included to define the type CFTypeRef.
2443
2444         Reviewed by Tor Arne Vestbø.
2445
2446         * platform/mac/WebCoreObjCExtras.h:
2447
2448 2012-03-12  George Staikos  <staikos@webkit.org>
2449
2450         Remove unused global static variable for BlackBerry.
2451         https://bugs.webkit.org/show_bug.cgi?id=80790
2452
2453         Reviewed by Alexey Proskuryakov.
2454
2455         * platform/graphics/gpu/DrawingBuffer.cpp:
2456         (WebCore):
2457
2458 2012-03-12  George Staikos  <staikos@webkit.org>
2459
2460         Correct usage of NDEBUG to fix warnings on BlackBerry.
2461         https://bugs.webkit.org/show_bug.cgi?id=80790
2462
2463         Reviewed by Alexey Proskuryakov.
2464
2465         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
2466         (WebCore::CookieDatabaseBackingStore::sendChangesToDatabase):
2467         * platform/blackberry/CookieManager.cpp:
2468         (WebCore::CookieManager::initiateCookieLimitCleanUp):
2469
2470 2012-03-12  Ilya Tikhonovsky  <loislo@chromium.org>
2471
2472         Re-apply the patch after v8 roll to r11000.
2473
2474         Web Inspector: move heap snapshot nodes data to external array.
2475         https://bugs.webkit.org/show_bug.cgi?id=79911
2476
2477         Reviewed by Vsevolod Vlasov.
2478
2479         Tests:
2480         heap-shapshot.html
2481         heap-shapshot-loader.html
2482
2483         * inspector/front-end/HeapSnapshot.js:
2484         (WebInspector.Int32Array):
2485         (WebInspector.Int32Array.prototype.get array):
2486         (WebInspector.HeapSnapshotLoader.prototype._parseNodes):
2487         (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
2488         (WebInspector.HeapSnapshot):
2489         (WebInspector.HeapSnapshot.prototype._init):
2490
2491 2012-03-12  Simon Hausmann  <simon.hausmann@nokia.com>
2492
2493         [Qt] Fix build with newer Qt 5.
2494
2495         Reviewed by Tor Arne Vestbø.
2496
2497         * platform/qt/RenderThemeQt.cpp:
2498         (WebCore::RenderThemeQt::fileListNameForWidth): Use DefaultCodec instead of the
2499         deprecated CodecForTR.
2500
2501 2012-03-12  Hans Wennborg  <hans@chromium.org>
2502
2503         Speech JavaScript API: SpeechRecognitionEvent
2504         https://bugs.webkit.org/show_bug.cgi?id=80513
2505
2506         Reviewed by Adam Barth.
2507
2508         Implement SpeechRecognitionEvent.
2509         (Spec: http://speech-javascript-api-spec.googlecode.com/git/speechapi.html)
2510
2511         Test: fast/events/constructors/speech-recognition-event-constructor.html
2512
2513         * Modules/speech/DOMWindowSpeech.idl:
2514         * Modules/speech/SpeechRecognitionEvent.cpp: Added.
2515         (WebCore):
2516         (WebCore::SpeechRecognitionEventInit::SpeechRecognitionEventInit):
2517         (WebCore::SpeechRecognitionEvent::create):
2518         (WebCore::SpeechRecognitionEvent::createResult):
2519         (WebCore::SpeechRecognitionEvent::createNoMatch):
2520         (WebCore::SpeechRecognitionEvent::createResultDeleted):
2521         (WebCore::SpeechRecognitionEvent::createError):
2522         (WebCore::SpeechRecognitionEvent::interfaceName):
2523         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
2524         * Modules/speech/SpeechRecognitionEvent.h: Added.
2525         (WebCore):
2526         (SpeechRecognitionEventInit):
2527         (SpeechRecognitionEvent):
2528         (WebCore::SpeechRecognitionEvent::result):
2529         (WebCore::SpeechRecognitionEvent::error):
2530         (WebCore::SpeechRecognitionEvent::resultIndex):
2531         (WebCore::SpeechRecognitionEvent::resultHistory):
2532         * Modules/speech/SpeechRecognitionEvent.idl:
2533         * WebCore.gypi:
2534         * bindings/generic/RuntimeEnabledFeatures.h:
2535         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEventEnabled):
2536         * bindings/v8/OptionsObject.cpp:
2537         (WebCore::OptionsObject::get):
2538         (WebCore):
2539         * bindings/v8/OptionsObject.h:
2540         (WebCore):
2541         (OptionsObject):
2542         * dom/EventNames.h:
2543         (WebCore):
2544         * dom/EventNames.in:
2545
2546 2012-03-12  Kent Tamura  <tkent@chromium.org>
2547
2548         Use ICU C API instead of C++ API in LocalizedNumberICU
2549         https://bugs.webkit.org/show_bug.cgi?id=80815
2550         https://bugs.gentoo.org/show_bug.cgi?id=407401
2551
2552         Reviewed by Hajime Morita.
2553
2554         ICU 4.8 doesn't have kNumberStyle. We had better to use ICU C API in
2555         general to avoid such issues.
2556
2557         This patch should not make any behavior change.
2558
2559         * platform/text/LocalizedNumberICU.cpp:
2560         (WebCore::ICULocale::ICULocale):
2561         Change the argument type: icu::Locale -> const char*
2562         (WebCore::ICULocale::~ICULocale): Delete m_numberFormat with unum_close().
2563         (WebCore::ICULocale::create): Do not create icu::Locale.
2564         (WebCore::ICULocale::createForCurrentLocale): ditto.
2565         (WebCore::ICULocale::setDecimalSymbol):
2566         Use unum_getSymbol() instead of DecimalFormatSymbols::getSymbol().
2567         (WebCore::ICULocale::setDecimalTextAttribute):
2568         Added. A utility function to store prefixes and suffixes.
2569         (WebCore::ICULocale::initializeDecimalFormat):
2570         - unum_open(), instead of NumberFormat::createInstance().
2571         - Use C API symbols.
2572         - Cache positive/negative prefixes/suffixes.
2573         (WebCore::ICULocale::convertToLocalizedNumber): Use cached prefixes and suffixes.
2574         (WebCore::matches): Stop using template because we don't use UString anymore.
2575         (WebCore::ICULocale::detectSignAndGetDigitRange):
2576         - Use cached prefixes and suffixes.
2577         - Use String::startsWith() and endsWith().
2578         (WebCore::ICULocale::convertFromLocalizedNumber):
2579         * platform/text/LocalizedNumberICU.h:
2580         (ICULocale):
2581
2582 2012-03-11  Pavel Podivilov  <podivilov@chromium.org>
2583
2584         Web Inspector: decouple LiveLocation from RawSourceCode.
2585         https://bugs.webkit.org/show_bug.cgi?id=80785
2586
2587         Reviewed by Vsevolod Vlasov.
2588
2589         * inspector/front-end/DebuggerPresentationModel.js:
2590         (WebInspector.DebuggerPresentationModel.prototype.createPlacard):
2591         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
2592         (WebInspector.PresentationCallFrame):
2593         (WebInspector.PresentationCallFrame.prototype.uiLocation):
2594         (WebInspector.DebuggerPresentationModel.CallFramePlacard):
2595         * inspector/front-end/RawSourceCode.js:
2596         * inspector/front-end/ScriptMapping.js:
2597         (WebInspector.MainScriptMapping):
2598         (WebInspector.MainScriptMapping.prototype.createLiveLocation):
2599         (WebInspector.MainScriptMapping.prototype._registerLiveLocation):
2600         (WebInspector.MainScriptMapping.prototype._unregisterLiveLocation):
2601         (WebInspector.MainScriptMapping.prototype._updateLiveLocations):
2602         (WebInspector.MainScriptMapping.prototype._uiSourceCodeListChanged):
2603         (WebInspector.MainScriptMapping.prototype.reset):
2604         (WebInspector.LiveLocation):
2605         (WebInspector.LiveLocation.prototype.init):
2606         (WebInspector.LiveLocation.prototype.dispose):
2607         (WebInspector.LiveLocation.prototype._update):
2608
2609 2012-03-11  Victor Carbune  <vcarbune@adobe.com>
2610
2611         The main code structure for placing future text track cue rendering
2612         code and main outer rendering steps.
2613         https://bugs.webkit.org/show_bug.cgi?id=79746
2614
2615         Reviewed by Eric Carlson.
2616
2617         No new tests. Only refactoring, but some chromium tests require rebaselining
2618         and have been marked accordingly.
2619
2620         * css/mediaControls.css:
2621         (::-webkit-media-controls): Changed the default display to -webkit-box, as
2622         captions need to always be rendered on top of the controls, if they are visible.
2623         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2624         Default position attribute is now relative, handled by the parent -webkit-box
2625         (video::-webkit-media-text-track-container): The position of the container is
2626         now relative, handled by -webkit-box.
2627         (video::-webkit-media-text-track-display): Adjusted text color to match
2628         the color required in the WebVTT spec (section 3.5.1 'color' property)
2629         * css/mediaControlsChromium.css:
2630         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2631         Default position attribute is now relative, handled by the parent -webkit-box
2632
2633         * html/shadow/MediaControlElements.cpp:
2634         (WebCore::MediaControlPanelElement::MediaControlPanelElement): Added a timer
2635         for the webkit fade out transition event. This timer is required for setting
2636         the display property to 'none', when the fade out transition is over. Otherwise,
2637         captions would not be displayed at the bottom of the video.
2638         (WebCore::MediaControlPanelElement::startTimer): Added.
2639         (WebCore):
2640         (WebCore::MediaControlPanelElement::stopTimer): Added.
2641         (WebCore::MediaControlPanelElement::transitionTimerFired): Added. If the current
2642         state of the controls is transparent, the display property is set to 'none'.
2643         (WebCore::MediaControlPanelElement::makeOpaque): The inline display:'none' property
2644         is removed before the fade in transition.
2645         (WebCore::MediaControlPanelElement::makeTransparent): Added the timer start.
2646         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
2647         Removed m_bottom as it is not needed anymore.
2648         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Added. Main
2649         function for the rendering rules.
2650         (WebCore::MediaControlTextTrackContainerElement::updateSizes): The bottom position
2651         needs not to be set anymore.
2652         * html/shadow/MediaControlElements.h:
2653         (MediaControlPanelElement): Added timer internals.
2654         (MediaControlTextTrackContainerElement): Added updateDisplay() and removed unused
2655         variables.
2656
2657         (WebCore):
2658         * html/shadow/MediaControlRootElement.cpp: Removed m_textTrackDisplay
2659         and duplicated code with MediaControlRootElementChromium (only minimum
2660         function calls to the main text track container)
2661         (WebCore::MediaControlRootElement::MediaControlRootElement):
2662         (WebCore::MediaControlRootElement::setMediaController):
2663         (WebCore::MediaControlRootElement::createTextTrackDisplay):
2664         (WebCore::MediaControlRootElement::updateTextTrackDisplay):
2665
2666         * html/shadow/MediaControlRootElementChromium.cpp: Removed m_textTrackDisplay
2667         and duplicate code with MediaControlRootElement (only minimum function calls
2668         to the main text track container remained)
2669         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
2670         (WebCore::MediaControlRootElementChromium::setMediaController):
2671         (WebCore::MediaControlRootElementChromium::createTextTrackDisplay):
2672         (WebCore::MediaControlRootElementChromium::updateTextTrackDisplay):
2673
2674         (WebCore):
2675         * html/track/TextTrackCue.cpp: Enhanced structure for supporting more complex
2676         rendering required by the WebVTT spec.
2677         (WebCore::TextTrackCue::TextTrackCue):
2678         (WebCore::TextTrackCue::cueDidChange): Mark the display tree as obsolete, so that
2679         it needs to be re-computed.
2680         (WebCore::TextTrackCue::setIsActive): The display tree needs to be removed as
2681         soon as the cue becomes inactive. Adjusted this method to support the functionality.
2682         (WebCore):
2683         (WebCore::TextTrackCue::determineDisplayParameters): Added. This method will hold
2684         main positioning parameter computations for a TextTrackCue
2685         (WebCore):
2686         (WebCore::TextTrackCue::getDisplayTree): Added. This method returns the root node
2687         of the CSS boxes that need to be displayed on top of the video, for the current
2688         instance.
2689         * html/track/TextTrackCue.h:
2690         (WebCore):
2691         (TextTrackCue):
2692
2693 2012-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2694
2695         Unreviewed, rolling out r110359.
2696         http://trac.webkit.org/changeset/110359
2697         https://bugs.webkit.org/show_bug.cgi?id=80799
2698
2699         SelectPopupMenuTest.ClickItem failure (Requested by ukai on
2700         #webkit).
2701
2702         * platform/chromium/PopupListBox.cpp:
2703         (WebCore::PopupListBox::paint):
2704         (WebCore::PopupListBox::paintRow):
2705         (WebCore::PopupListBox::getRowHeight):
2706         * platform/chromium/PopupListBox.h:
2707         (PopupContainerSettings):
2708         * platform/chromium/PopupMenuChromium.cpp:
2709         (WebCore):
2710         (WebCore::PopupMenuChromium::show):
2711         * platform/chromium/PopupMenuChromium.h:
2712         (PopupMenuChromium):
2713         * rendering/RenderMenuList.cpp:
2714         (WebCore::RenderMenuList::showPopup):
2715
2716 2012-03-11  Timothy Hatcher  <timothy@apple.com>
2717
2718         Fix a crash opening the Web Inspector in WebKit1 clients.
2719
2720         The call to InspectorFrontendClientLocal::setAttachedWindow is preformed really early in the process,
2721         causing it to crash almost every time. It should use evaluateOnLoad instead of evaluateAsBoolean.
2722
2723         <rdar://problem/10951109> Crash when bringing up Web Inspector in WebKit1 client
2724         https://bugs.webkit.org/show_bug.cgi?id=80796
2725
2726         Reviewed by Brian Weinstein.
2727
2728         * inspector/InspectorFrontendClientLocal.cpp:
2729         (WebCore::InspectorFrontendClientLocal::setAttachedWindow): Use evaluateOnLoad instead of evaluateAsBoolean.
2730
2731 2012-03-11  Shawn Singh  <shawnsingh@chromium.org>
2732
2733         REGRESSION (r93614): scrolling div does not repaint
2734         https://bugs.webkit.org/show_bug.cgi?id=80641
2735
2736         Reviewed by Simon Fraser.
2737
2738         Test: compositing/repaint/newly-composited-repaint-rect.html
2739
2740         * rendering/RenderLayerCompositor.cpp:
2741         (WebCore::RenderLayerCompositor::updateBacking): When a layer
2742         becomes newly composited and creates its backing, the repaintRect
2743         may become invalid. This patch recomputes repaintRects in this
2744         case.
2745
2746 2012-03-11  George Staikos  <staikos@webkit.org>
2747
2748         Enable JPEG encoding for BlackBerry.
2749         https://bugs.webkit.org/show_bug.cgi?id=80792
2750
2751         Reviewed by Antonio Gomes.
2752
2753         * PlatformBlackBerry.cmake:
2754
2755 2012-03-11  Pavel Feldman  <pfeldman@chromium.org>
2756
2757         Web Inspector: console.log attempts to substitute any "%" character in the message.
2758         https://bugs.webkit.org/show_bug.cgi?id=80504
2759
2760         Reviewed by Vsevolod Vlasov.
2761
2762         Test: inspector/console/console-string-format.html
2763
2764         * inspector/front-end/AuditRules.js:
2765         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
2766         * inspector/front-end/ProfileDataGridTree.js:
2767         * inspector/front-end/ProfilesPanel.js:
2768         (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
2769         * inspector/front-end/utilities.js:
2770
2771 2012-03-11  Andrey Kosyakov  <caseq@chromium.org>
2772
2773         Web Inspector: use monotonically increasing time in timeline agent
2774         https://bugs.webkit.org/show_bug.cgi?id=80786
2775
2776         Reviewed by Pavel Feldman.
2777
2778         * bindings/v8/ScriptGCEvent.cpp:
2779         (WebCore::ScriptGCEvent::gcPrologueCallback):
2780         (WebCore::ScriptGCEvent::gcEpilogueCallback):
2781         * inspector/InspectorTimelineAgent.cpp:
2782         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
2783         (WebCore::InspectorTimelineAgent::willSendResourceRequest):
2784         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
2785         (WebCore::InspectorTimelineAgent::appendRecord):
2786         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
2787         (WebCore::InspectorTimelineAgent::timestamp):
2788         (WebCore):
2789         * inspector/InspectorTimelineAgent.h:
2790         (InspectorTimelineAgent):
2791         (WebCore::InspectorTimelineAgent::timestamp):
2792
2793 2012-03-11  Vsevolod Vlasov  <vsevik@chromium.org>
2794
2795         Web Inspector: Network panel does not show responses for application/json data
2796         https://bugs.webkit.org/show_bug.cgi?id=80684
2797
2798         Reviewed by Pavel Feldman.
2799
2800         Test: http/tests/inspector/network/async-xhr-json-mime-type.html
2801
2802         * inspector/InspectorPageAgent.cpp:
2803         (WebCore::createXHRTextDecoder):
2804         (WebCore::InspectorPageAgent::cachedResourceContent):
2805         * inspector/InspectorPageAgent.h:
2806         * inspector/NetworkResourcesData.cpp:
2807         (WebCore::createOtherResourceTextDecoder):
2808         (WebCore):
2809         (WebCore::NetworkResourcesData::responseReceived):
2810
2811 2012-03-11  Vsevolod Vlasov  <vsevik@chromium.org>
2812
2813         Web Inspector: CSS content is not shown when stylesheet is loaded with invalid mime type in quirks mode.
2814         https://bugs.webkit.org/show_bug.cgi?id=80528
2815
2816         Reviewed by Pavel Feldman.
2817
2818         Test: http/tests/inspector/resource-tree/resource-tree-invalid-mime-type-css-content.html
2819
2820         * inspector/InspectorPageAgent.cpp:
2821         (WebCore::InspectorPageAgent::cachedResourceContent):
2822
2823 2012-03-11  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2824
2825         [Qt] [WK2] Support threaded renderer in WK2
2826         https://bugs.webkit.org/show_bug.cgi?id=76661
2827
2828         Reviewed by Noam Rosenthal.
2829
2830         Add TransformationMatrix conversions from/to Qt QMatrix4x4. Used by Qt WebKit2
2831         rendering and tested by Qt WebKit2 API tests.
2832
2833         * platform/graphics/qt/TransformationMatrixQt.cpp:
2834         (WebCore::TransformationMatrix::operator QMatrix4x4):
2835         (WebCore):
2836         (WebCore::TransformationMatrix::TransformationMatrix):
2837         * platform/graphics/transforms/TransformationMatrix.h:
2838         (TransformationMatrix):
2839
2840 2012-03-09  Jon Lee  <jonlee@apple.com>
2841
2842         Rename NotificationPresenter to NotificationClient
2843         https://bugs.webkit.org/show_bug.cgi?id=80488
2844         <rdar://problem/10965558>
2845
2846         Reviewed by Kentaro Hara.
2847
2848         * notifications/NotificationCenter.h: Renamed from notifications/NotificationPresenter.h.
2849
2850         Refactor to use renamed WebCore::NotificationClient.
2851         * GNUmakefile.list.am:
2852         * Target.pri:
2853         * WebCore.exp.in:
2854         * WebCore.gypi:
2855         * WebCore.vcproj/WebCore.vcproj:
2856         * WebCore.xcodeproj/project.pbxproj:
2857         * notifications/Notification.cpp:
2858         (WebCore::Notification::Notification):
2859         (WebCore::Notification::show):
2860         (WebCore::Notification::cancel):
2861         (WebCore::Notification::contextDestroyed):
2862         (WebCore::Notification::finishLoading):
2863         * notifications/NotificationCenter.cpp:
2864         (WebCore::NotificationCenter::create):
2865         (WebCore::NotificationCenter::NotificationCenter):
2866         (WebCore::NotificationCenter::checkPermission):
2867         (WebCore::NotificationCenter::requestPermission):
2868         (WebCore::NotificationCenter::disconnectFrame):
2869         * notifications/NotificationController.cpp:
2870         (WebCore::NotificationController::NotificationController):
2871         (WebCore::NotificationController::create):
2872         (WebCore::NotificationController::clientFrom):
2873         (WebCore::provideNotification):
2874         * notifications/NotificationController.h:
2875         (WebCore):
2876         (NotificationController):
2877         (WebCore::NotificationController::client):
2878         * page/DOMWindow.cpp:
2879         (WebCore::DOMWindow::webkitNotifications):
2880         * page/DOMWindow.h:
2881         (DOMWindow):
2882         * workers/WorkerContext.cpp:
2883         (WebCore::WorkerContext::webkitNotifications):
2884         * workers/WorkerThread.cpp:
2885         (WebCore::WorkerThread::WorkerThread):
2886         * workers/WorkerThread.h:
2887         (WebCore):
2888         (WebCore::WorkerThread::getNotificationClient):
2889         (WebCore::WorkerThread::setNotificationClient):
2890         (WorkerThread):
2891
2892 2012-03-10  Julien Chaffraix  <jchaffraix@webkit.org>
2893
2894         RenderObject with 'resize' different from 'none' should have a RenderLayer
2895         https://bugs.webkit.org/show_bug.cgi?id=80738
2896
2897         Reviewed by James Robinson.
2898
2899         Covered by fast/css/resize-single-axis.html.
2900
2901         * rendering/RenderBox.h:
2902         (WebCore::RenderBox::requiresLayerForOverflowClip):
2903         The resizer logic is tied to RenderLayer so force a RenderLayer to be allocated if resize() != RESIZE_NONE.
2904
2905 2012-03-10  Stephen White  <senorblanco@chromium.org>
2906
2907         Unreviewed, rolling out r110358.
2908         http://trac.webkit.org/changeset/110358
2909         https://bugs.webkit.org/show_bug.cgi?id=80706
2910
2911         No improvement on specified benchmarks.
2912
2913         * dom/ContainerNode.cpp:
2914         (WebCore::collectNodes):
2915         (WebCore::collectTargetNodes):
2916
2917 2012-03-10  MORITA Hajime  <morrita@google.com>
2918
2919         ShadowTree uses weak iteration patterns
2920         https://bugs.webkit.org/show_bug.cgi?id=80572
2921
2922         Reviewed by Dimitri Glazkov.
2923
2924         Patch by Adam Barth.
2925
2926         This patch moves various ShadowTree to using a better iteration pattern
2927         in which we collect all the ShadowRoots we're planning to iterate into
2928         a vector and then iterate over them.
2929
2930         * dom/ShadowTree.cpp:
2931         (ShadowRootVector):
2932         (WebCore::ShadowRootVector::ShadowRootVector):
2933         (WebCore):
2934         (WebCore::ShadowTree::removeAllShadowRoots):
2935         (WebCore::ShadowTree::insertedIntoDocument):
2936         (WebCore::ShadowTree::removedFromDocument):
2937         (WebCore::ShadowTree::insertedIntoTree):
2938         (WebCore::ShadowTree::removedFromTree):
2939         (WebCore::ShadowTree::willRemove):
2940
2941 2012-03-10  Sheriff Bot  <webkit.review.bot@gmail.com>
2942
2943         Unreviewed, rolling out r110363.
2944         http://trac.webkit.org/changeset/110363
2945         https://bugs.webkit.org/show_bug.cgi?id=80757
2946
2947         link error in chromium: unresolved external symbol
2948         webkit_support::CreateScopedTempDirectory(void) (Requested by
2949         ukai_home on #webkit).
2950
2951         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
2952         (WebCore::IDBLevelDBBackingStore::open):
2953         * platform/leveldb/LevelDBDatabase.cpp:
2954         * platform/leveldb/LevelDBDatabase.h:
2955         (LevelDBDatabase):
2956
2957 2012-03-09  Robert Kroeger  <rjkroege@chromium.org>
2958
2959         Handle more Gesture* events by performing scrolls on the correct target ScrollableArea 
2960         https://bugs.webkit.org/show_bug.cgi?id=80311
2961
2962         Implement GestureScroll* events via re-use of WheelEvent dispatch.
2963
2964         Reviewed by James Robinson.
2965
2966         Layout tests previously submited as https://bugs.webkit.org/show_bug.cgi?id=80201 and unit
2967         test added as part of this patch.
2968
2969         * page/EventHandler.cpp:
2970         (WebCore::wheelGranularityToScrollGranularity): Refactoring.
2971         (WebCore):
2972         (WebCore::scrollNode):
2973         (WebCore::EventHandler::EventHandler):
2974         (WebCore::EventHandler::clear):
2975         (WebCore::EventHandler::handleWheelEvent):
2976         (WebCore::EventHandler::defaultWheelEventHandler):
2977         (WebCore::EventHandler::handleGestureEvent): Added GestureScrollBegin & End.
2978         (WebCore::EventHandler::handleGestureTap):
2979         (WebCore::EventHandler::handleGestureScrollUpdate):
2980         (WebCore::EventHandler::handleGestureScrollCore): Refactoring.
2981         * page/EventHandler.h:
2982         (EventHandler):
2983         * platform/PlatformWheelEvent.h: Added additional scroll type.
2984         * platform/ScrollAnimator.cpp:
2985         (WebCore::ScrollAnimator::handleWheelEvent): Forward additional scroll type.
2986         * platform/ScrollAnimator.h:
2987         (WebCore):
2988         * platform/ScrollAnimatorNone.cpp:
2989         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): Handle additional scroll type.
2990         (WebCore::ScrollAnimatorNone::fireUpAnAnimation): 
2991         (WebCore):
2992         (WebCore::ScrollAnimatorNone::scroll):
2993         * platform/ScrollAnimatorNone.h:
2994         (ScrollAnimatorNone):
2995         * platform/ScrollTypes.h: Added an additional scroll type.
2996         * platform/ScrollableArea.cpp:
2997         (WebCore::ScrollableArea::scroll):
2998
2999 2012-03-09  Erik Arvidsson  <arv@chromium.org>
3000
3001         [V8] Fix a fixme in v8 bindings
3002         https://bugs.webkit.org/show_bug.cgi?id=80734
3003
3004         Reviewed by Kentaro Hara.
3005
3006         No new tests. Covered by existing tests.
3007
3008         * bindings/v8/V8Binding.cpp:
3009         (WebCore::toInt32):
3010         (WebCore::toUInt32):
3011
3012 2012-03-09  Lauro Neto  <lauro.neto@openbossa.org>
3013
3014         [Qt] WebCore/Target.pri contains obsolete FileStreamProxy.h reference.
3015         https://bugs.webkit.org/show_bug.cgi?id=80730
3016
3017         Reviewed by Tor Arne Vestbø.
3018
3019         Build fix. Target.pri was still including old FileStreamProxy.h.
3020
3021         * Target.pri:
3022
3023 2012-03-05 Cem Kocagil  <cem.kocagil@gmail.com>
3024
3025         Pan scroll icon is painted at incorrect coordinates in frames
3026         https://bugs.webkit.org/show_bug.cgi?id=79378
3027
3028         Convert client coordinates to parent ScrollView coordinates
3029
3030         Reviewed by Antonio Gomes
3031
3032         * platform/ScrollView.cpp:
3033         (WebCore::ScrollView::paintPanScrollIcon):
3034
3035 2012-03-09  Joshua Bell  <jsbell@chromium.org>
3036
3037         IndexedDB: Handle LevelDB database corruption
3038         https://bugs.webkit.org/show_bug.cgi?id=79413
3039
3040         Add LevelDBDatabase::destroy() method so that clients can retry if open() fails.
3041
3042         Reviewed by Tony Chang.
3043
3044         Test: webkit_unit_tests --gtest_filter='LevelDBDatabaseTest.CorruptionTest'
3045
3046         * Modules/indexeddb/IDBLevelDBBackingStore.cpp: Implement open/destroy/open strategy.
3047         (WebCore::IDBLevelDBBackingStore::open):
3048         * platform/leveldb/LevelDBDatabase.cpp:
3049         (WebCore::LevelDBDatabase::destroy):
3050         (WebCore):
3051         * platform/leveldb/LevelDBDatabase.h:
3052         (LevelDBDatabase):
3053
3054 2012-03-09  Jessie Berlin  <jberlin@apple.com>
3055
3056         Fix one of the Windows build warnings.
3057
3058         * html/track/TextTrackCueList.idl:
3059         Add a newline to the end of the file.
3060
3061 2012-03-09  Tyler Abbott  <tabbott@rim.com>
3062
3063         BlackBerry PlayBook doesn't sniff mime types
3064         https://bugs.webkit.org/show_bug.cgi?id=73869
3065
3066         Reviewed by Rob Buis.
3067
3068         Hook up MIMESniffing for BlackBerry. Override Content-Types will
3069         not be overriden. File extensions will be trusted when content
3070         is loaded from disk.
3071
3072         No tests, BlackBerry tests are not yet present in webkit.org codebase.
3073
3074         * PlatformBlackBerry.cmake:
3075         * platform/network/blackberry/NetworkJob.cpp:
3076         (WebCore::NetworkJob::NetworkJob):
3077         (WebCore::NetworkJob::initialize):
3078         (WebCore::NetworkJob::handleNotifyDataReceived):
3079         (WebCore::NetworkJob::sendResponseIfNeeded):
3080         * platform/network/blackberry/NetworkJob.h:
3081         (NetworkJob):
3082
3083 2012-03-09  Enrica Casucci  <enrica@apple.com>
3084
3085         Move WebNSURLExtras code down to WebCore.
3086         https://bugs.webkit.org/show_bug.cgi?id=80611
3087
3088         Reviewed by Alexey Proskuryakov.
3089
3090         * WebCore.exp.in: Added new exported functions.
3091         * WebCore.xcodeproj/project.pbxproj: Added WebCoreNSURLExtras.*
3092         * platform/FileSystem.h: Added setMetadataURL.
3093         * platform/mac/FileSystemMac.mm:
3094         (WebCore::setMetaData): Added.
3095         (WebCore::setMetadataURL): Added.
3096         * platform/mac/WebCoreNSStringExtras.h:
3097         * platform/mac/WebCoreNSStringExtras.mm:
3098         (hasCaseInsensitivePrefix): Added.
3099         * platform/mac/WebCoreNSURLExtras.h: Added.
3100         * platform/mac/WebCoreNSURLExtras.mm: Added.
3101         * platform/mac/WebCoreObjCExtras.h:
3102         * platform/mac/WebCoreSystemInterface.h:
3103         * platform/mac/WebCoreSystemInterface.mm:
3104
3105 2012-03-09  Tim Dresser  <tdresser@chromium.org>
3106
3107         [chromium] Increase size of Combo Box Options for touch and high DPI devices
3108         https://bugs.webkit.org/show_bug.cgi?id=80027
3109
3110         Reviewed by Darin Fisher.
3111
3112         Scale Combo box popups by defaultDeviceScaleFactor, and add padding to
3113         <option> elements when touch is enabled.
3114
3115         Manually tested with --default-device-scale-factor=1,2 and unset.
3116         Each of these were tested with RuntimeEnabledFeatures::touchEnabled
3117         set to true and false.
3118
3119         * platform/chromium/PopupListBox.cpp:
3120         (WebCore::PopupListBox::paint):
3121         (WebCore::PopupListBox::paintRow):
3122         (WebCore::PopupListBox::getRowHeight):
3123         * platform/chromium/PopupListBox.h:
3124         (PopupContainerSettings):
3125         * platform/chromium/PopupMenuChromium.cpp:
3126         (WebCore):
3127         (WebCore::PopupMenuChromium::show):
3128         * platform/chromium/PopupMenuChromium.h:
3129         (WebCore::PopupMenuChromium::optionPaddingForTouch):
3130         (WebCore::PopupMenuChromium::setOptionPaddingForTouch):
3131         (PopupMenuChromium):
3132         * rendering/RenderMenuList.cpp:
3133         (WebCore::RenderMenuList::showPopup):
3134
3135 2012-03-09  Stephen White  <senorblanco@chromium.org>
3136
3137         Improve ContainerNode collectNode() performance by reserving vector
3138         capacity up front.
3139         https://bugs.webkit.org/show_bug.cgi?id=80706
3140
3141         Reviewed by Ryosuke Niwa.
3142
3143         Covered by existing tests.  Performance will be evaluated based on
3144         Chromium's page_cycler_bloat-http, page_cycler_intl1, and
3145         dromaeo_domcore suites.
3146
3147         * dom/ContainerNode.cpp:
3148         (WebCore::collectNodes):
3149
3150 2012-03-09  Dan Bernstein  <mitz@apple.com>
3151
3152         <rdar://problem/11018851> Crash in DisplayRefreshMonitor::notifyClients()
3153         https://bugs.webkit.org/show_bug.cgi?id=80740
3154
3155         Reviewed by Sam Weinig.
3156
3157         No test, since this race condition cannot be reproduced reliably.
3158
3159         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
3160         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor): Changed to stop the display link
3161         first, then cancel any outstanding calls to refreshDisplayOnMainThread(). When doing things
3162         the other way around, the display link can fire after outstanding calls have been canceled,
3163         and enqueue new calls on the main thread, which will be dispatched after monitor destruction.
3164
3165 2012-03-09  Pratik Solanki  <psolanki@apple.com>
3166
3167         Assertion failure in ResourceHandle::setDefersLoading(): d->m_defersLoading != defers
3168         https://bugs.webkit.org/show_bug.cgi?id=80543
3169
3170         Reviewed by Geoffrey Garen.
3171
3172         Reset m_defersLoading flag to the value from Page::defersCallbacks() in
3173         ResourceLoader::init(). This is because the resource could have been in the pending requests
3174         queue in ResourceLoadScheduler and would have missed out on state changes to this flag
3175         happening from DocumentLoader::setDefersCallbacks().
3176
3177         * loader/ResourceLoader.cpp:
3178         (WebCore::ResourceLoader::init):
3179
3180 2012-03-09  Emil A Eklund  <eae@chromium.org>
3181
3182         Add roundedPoint to HitTestResult and change platform code to use it
3183         https://bugs.webkit.org/show_bug.cgi?id=80715
3184
3185         Reviewed by James Robinson.
3186
3187         Change ports to use roundedPoint to avoid exposing subpixel types to
3188         platform code.
3189
3190         No new tests.
3191
3192         * rendering/HitTestResult.h:
3193         (WebCore::HitTestResult::roundedPoint):
3194
3195 2012-03-09  Kentaro Hara  <haraken@chromium.org>
3196
3197         [V8][Performance] Inline hot methods in V8Bindings.h
3198         https://bugs.webkit.org/show_bug.cgi?id=80685
3199
3200         Reviewed by Adam Barth.
3201
3202         This patch slightly improves DOM binding performance by inlining hot
3203         methods in V8Binding.cpp, e.g. isUndefinedOrNull(), v8StringOrNull(), v8Boolean().
3204         For example, this patch improves div.nodeName by 5.0%, and div.nodeValue by 4.1%.
3205
3206         Performance tests: https://bugs.webkit.org/attachment.cgi?id=131006
3207
3208         The performance test results in my Mac environment are as follows:
3209
3210         Chromium/V8 without this patch:
3211         div.nodeName : 3417.4 ms
3212         div.nodeValue : 2069.6 ms
3213
3214         Chromium/V8 with this patch:
3215         div.nodeName : 3245.6 ms
3216         div.nodeValue : 1983.1 ms
3217
3218         No tests. No change in behavior.
3219
3220         * bindings/v8/V8Binding.cpp:
3221         * bindings/v8/V8Binding.h:
3222         (WebCore::toWebCoreString):
3223         (WebCore::isUndefinedOrNull):
3224         (WebCore::isHostObject):
3225         (WebCore::v8Boolean):
3226         (WebCore::toWebCoreStringWithNullCheck):
3227         (WebCore::toAtomicWebCoreStringWithNullCheck):
3228         (WebCore::toWebCoreStringWithNullOrUndefinedCheck):
3229         (WebCore::v8UndetectableString):
3230         (WebCore::v8StringOrNull):
3231         (WebCore::v8StringOrUndefined):
3232         (WebCore::v8StringOrFalse):
3233         (WebCore::toWebCoreDate):
3234         (WebCore::v8DateOrNull):
3235
3236 2012-03-09  W. James MacLean  <wjmaclean@chromium.org>
3237
3238         [chromium] Implement scroll physics architecture for impl/main thread
3239         https://bugs.webkit.org/show_bug.cgi?id=79827
3240
3241         Reviewed by James Robinson.
3242
3243         Unittests added, plus follow-on patch from rjkroege will add layout tests.
3244
3245         PlatformGestureCurve is a framework to separate the physical simulation from for gesture
3246         animation from control concerns. This allows the physics to be reused in alternate places.
3247         At present, the framework will be applied in ScrollAnimatorNone and the Chrome Compositor.
3248
3249         * WebCore.gypi:
3250         * platform/ActivePlatformGestureAnimation.cpp: Added.
3251         (WebCore):
3252         (WebCore::ActivePlatformGestureAnimation::create):
3253         (WebCore::ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation):
3254         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
3255         (WebCore::ActivePlatformGestureAnimation::animate):
3256         * platform/ActivePlatformGestureAnimation.h: Added.
3257         (WebCore):
3258         (ActivePlatformGestureAnimation):
3259         * platform/PlatformGestureCurve.h: Added.
3260         (WebCore):
3261         (PlatformGestureCurve):
3262         (WebCore::PlatformGestureCurve::~PlatformGestureCurve):
3263         * platform/PlatformGestureCurveTarget.h: Added.
3264         (WebCore):
3265         (PlatformGestureCurveTarget):
3266         (WebCore::PlatformGestureCurveTarget::~PlatformGestureCurveTarget):
3267         * platform/TouchFlingPlatformGestureCurve.cpp: Added.
3268         (WebCore):
3269         (WebCore::TouchFlingPlatformGestureCurve::create):
3270         (WebCore::TouchFlingPlatformGestureCurve::TouchFlingPlatformGestureCurve):
3271         (WebCore::TouchFlingPlatformGestureCurve::~TouchFlingPlatformGestureCurve):
3272         (WebCore::TouchFlingPlatformGestureCurve::apply):
3273         * platform/TouchFlingPlatformGestureCurve.h: Added.
3274         (WebCore):
3275         (TouchFlingPlatformGestureCurve):
3276         * platform/WheelFlingPlatformGestureCurve.cpp: Added.
3277         (WebCore):
3278         (WebCore::WheelFlingPlatformGestureCurve::create):
3279         (WebCore::WheelFlingPlatformGestureCurve::WheelFlingPlatformGestureCurve):
3280         (WebCore::WheelFlingPlatformGestureCurve::~WheelFlingPlatformGestureCurve):
3281         (WebCore::WheelFlingPlatformGestureCurve::apply):
3282         * platform/WheelFlingPlatformGestureCurve.h: Added.
3283         (WebCore):
3284         (WheelFlingPlatformGestureCurve):
3285         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp: Added.
3286         (WebCore):
3287         (WebCore::CCActiveGestureAnimation::create):
3288         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
3289         (WebCore::CCActiveGestureAnimation::~CCActiveGestureAnimation):
3290         (WebCore::CCActiveGestureAnimation::animate):
3291         * platform/graphics/chromium/cc/CCActiveGestureAnimation.h: Added.
3292         (WebCore):
3293         (CCActiveGestureAnimation):
3294         * platform/graphics/chromium/cc/CCGestureCurve.h: Added.
3295         (WebCore):
3296         (CCGestureCurveTarget):
3297         (WebCore::CCGestureCurveTarget::~CCGestureCurveTarget):
3298         (CCGestureCurve):
3299         (WebCore::CCGestureCurve::~CCGestureCurve):
3300
3301 2012-03-09  Alexis Menard  <alexis.menard@openbossa.org>
3302
3303         Implement selectedOptions attribute of <select>.
3304         https://bugs.webkit.org/show_bug.cgi?id=80631
3305
3306         Reviewed by Benjamin Poulain.
3307
3308         Add a new collection as a member of HTMLSelectElement which is
3309         used to store the selected elements. Extend HTMLCollection to
3310         support the new collection type needed by this feature.
3311
3312         Reference : http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#dom-select-selectedoptions
3313
3314         Test: fast/dom/select-selectedOptions.html
3315
3316         * html/CollectionType.h:
3317         * html/HTMLCollection.cpp:
3318         (WebCore::HTMLCollection::shouldIncludeChildren):
3319         (WebCore::HTMLCollection::isAcceptableElement):
3320         * html/HTMLSelectElement.cpp:
3321         (WebCore::HTMLSelectElement::selectedOptions):
3322         (WebCore):
3323         * html/HTMLSelectElement.h:
3324         (HTMLSelectElement):
3325         * html/HTMLSelectElement.idl:
3326
3327 2012-03-09  Tien-Ren Chen  <trchen@chromium.org>
3328
3329         [chromium] ScrollbarLayerChromium/CCScrollbarLayerImpl for CC-side scrollbar painting
3330         https://bugs.webkit.org/show_bug.cgi?id=78872
3331
3332         Reviewed by James Robinson.
3333
3334         New test ScrollbarLayerChromiumTest.resolveScrollLayerPointer
3335
3336         * WebCore.gypi:
3337         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
3338         (WebCore::scrollLayerForFrameView):
3339         (WebCore::scrollbarLayerDidChange):
3340         (WebCore):
3341         (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
3342         (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
3343         * platform/ScrollableArea.cpp:
3344         (WebCore::ScrollableArea::invalidateScrollbar):
3345         * platform/graphics/chromium/GraphicsLayerChromium.h:
3346         (WebCore::GraphicsLayerChromium::hasContentsLayer):
3347         * platform/graphics/chromium/LayerChromium.h:
3348         (WebCore):
3349         (WebCore::LayerChromium::toScrollbarLayerChromium):
3350         (LayerChromium):
3351         * platform/graphics/chromium/ScrollbarLayerChromium.cpp: Added.
3352         (WebCore):
3353         (WebCore::ScrollbarLayerChromium::createCCLayerImpl):
3354         (WebCore::ScrollbarLayerChromium::create):
3355         (WebCore::ScrollbarLayerChromium::ScrollbarLayerChromium):
3356         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
3357         * platform/graphics/chromium/ScrollbarLayerChromium.h: Added.
3358         (WebCore):
3359         (ScrollbarLayerChromium):
3360         (WebCore::ScrollbarLayerChromium::scrollLayerId):
3361         (WebCore::ScrollbarLayerChromium::toScrollbarLayerChromium):
3362         * platform/graphics/chromium/TreeSynchronizer.cpp:
3363         (WebCore::TreeSynchronizer::synchronizeTrees):
3364         (WebCore::TreeSynchronizer::collectExistingCCLayerImplRecursive):
3365         (WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl):
3366         (WebCore::TreeSynchronizer::synchronizeTreeRecursive):
3367         (WebCore::TreeSynchronizer::updateScrollbarLayerPointersRecursive):
3368         (WebCore):
3369         * platform/graphics/chromium/TreeSynchronizer.h:
3370         (TreeSynchronizer):
3371         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3372         (WebCore::CCLayerTreeHostImpl::updateMaxScrollPosition):
3373         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: Added.
3374         (WebCore):
3375         (WebCore::CCScrollbarLayerImpl::create):
3376         (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
3377         (WebCore::CCScrollbarLayerImpl::willDraw):
3378         (WebCore::CCScrollbarLayerImpl::appendQuads):
3379         (WebCore::CCScrollbarLayerImpl::didDraw):
3380         (WebCore::CCScrollbarLayerImpl::paint):
3381         (WebCore::CCScrollbarLayerImpl::CCScrollbar::x):
3382         (WebCore::CCScrollbarLayerImpl::CCScrollbar::y):
3383         (WebCore::CCScrollbarLayerImpl::CCScrollbar::width):
3384         (WebCore::CCScrollbarLayerImpl::CCScrollbar::height):
3385         (WebCore::CCScrollbarLayerImpl::CCScrollbar::size):
3386         (WebCore::CCScrollbarLayerImpl::CCScrollbar::location):
3387         (WebCore::CCScrollbarLayerImpl::CCScrollbar::parent):
3388         (WebCore::CCScrollbarLayerImpl::CCScrollbar::root):
3389         (WebCore::CCScrollbarLayerImpl::CCScrollbar::setFrameRect):
3390         (WebCore::CCScrollbarLayerImpl::CCScrollbar::frameRect):
3391         (WebCore::CCScrollbarLayerImpl::CCScrollbar::invalidate):
3392         (WebCore::CCScrollbarLayerImpl::CCScrollbar::invalidateRect):
3393         (WebCore::CCScrollbarLayerImpl::CCScrollbar::scrollbarOverlayStyle):
3394         (WebCore::CCScrollbarLayerImpl::CCScrollbar::getTickmarks):
3395         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollableAreaActive):
3396         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollViewScrollbar):
3397         (WebCore::CCScrollbarLayerImpl::CCScrollbar::convertFromContainingWindow):
3398         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isCustomScrollbar):
3399         (WebCore::CCScrollbarLayerImpl::CCScrollbar::orientation):
3400         (WebCore::CCScrollbarLayerImpl::CCScrollbar::value):
3401         (WebCore::CCScrollbarLayerImpl::CCScrollbar::currentPos):
3402         (WebCore::CCScrollbarLayerImpl::CCScrollbar::visibleSize):
3403         (WebCore::CCScrollbarLayerImpl::CCScrollbar::totalSize):
3404         (WebCore::CCScrollbarLayerImpl::CCScrollbar::maximum):
3405         (WebCore::CCScrollbarLayerImpl::CCScrollbar::controlSize):
3406         (WebCore::CCScrollbarLayerImpl::CCScrollbar::lineStep):
3407         (WebCore::CCScrollbarLayerImpl::CCScrollbar::pageStep):
3408         (WebCore::CCScrollbarLayerImpl::CCScrollbar::pressedPart):
3409         (WebCore::CCScrollbarLayerImpl::CCScrollbar::hoveredPart):
3410         (WebCore::CCScrollbarLayerImpl::CCScrollbar::styleChanged):
3411         (WebCore::CCScrollbarLayerImpl::CCScrollbar::enabled):
3412         (WebCore::CCScrollbarLayerImpl::CCScrollbar::setEnabled):
3413         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: Added.
3414         (WebCore):
3415         (CCScrollbarLayerImpl):
3416         (WebCore::CCScrollbarLayerImpl::setScrollbarOverlayStyle):
3417         (WebCore::CCScrollbarLayerImpl::setTickmarks):
3418         (WebCore::CCScrollbarLayerImpl::setIsScrollableAreaActive):
3419         (WebCore::CCScrollbarLayerImpl::setIsScrollViewScrollbar):
3420         (WebCore::CCScrollbarLayerImpl::setOrientation):
3421         (WebCore::CCScrollbarLayerImpl::setControlSize):
3422         (WebCore::CCScrollbarLayerImpl::setPressedPart):
3423         (WebCore::CCScrollbarLayerImpl::setHoveredPart):
3424         (WebCore::CCScrollbarLayerImpl::setEnabled):
3425         (WebCore::CCScrollbarLayerImpl::scrollLayer):
3426         (WebCore::CCScrollbarLayerImpl::setScrollLayer):
3427         (CCScrollbar):
3428         (WebCore::CCScrollbarLayerImpl::CCScrollbar::CCScrollbar):
3429
3430 2012-03-09  Julien Chaffraix  <jchaffraix@webkit.org>
3431
3432         Split the extra logical height distribution logic out of RenderTableSection::layoutRows
3433         https://bugs.webkit.org/show_bug.cgi?id=80671
3434
3435         Reviewed by Adrienne Walker.
3436
3437         Refactoring only, no change in behavior expected.
3438
3439         * rendering/RenderTableSection.cpp:
3440         (WebCore::RenderTableSection::layoutRows):
3441         Split the logic from here...
3442
3443         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
3444         (WebCore::RenderTableSection::distributeExtraLogicalHeightToAutoRows):
3445         (WebCore::RenderTableSection::distributeRemainingExtraLogicalHeight):
3446         (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows):
3447         ... to those functions. Cleaned up the variable naming while at it and
3448         made them follow the same signature as this may be useful to fix another
3449         bug I have.
3450
3451         * rendering/RenderTableSection.h:
3452         (RenderTableSection):
3453         Added the previous 4 new functions.
3454
3455 2012-03-09  Rob Buis  <rbuis@rim.com>
3456
3457         Remove unused file FrameBlackBerry.cpp
3458         https://bugs.webkit.org/show_bug.cgi?id=80731
3459
3460         Reviewed by Antonio Gomes.
3461
3462         This is not needed anymore since there is an implementation elsewhere.
3463
3464         * PlatformBlackBerry.cmake:
3465         * page/blackberry/FrameBlackBerry.cpp: Removed.
3466
3467 2012-03-09  Sheriff Bot  <webkit.review.bot@gmail.com>
3468
3469         Unreviewed, rolling out r110309.
3470         http://trac.webkit.org/changeset/110309
3471         https://bugs.webkit.org/show_bug.cgi?id=80732
3472
3473         Seems to have caused a number of SVG crashes (thorton will
3474         investigate further) (Requested by abarth|gardener on
3475         #webkit).
3476
3477         * page/FrameView.cpp:
3478         (WebCore::FrameView::FrameView):
3479         (WebCore::FrameView::reset):
3480         (WebCore::FrameView::repaintContentRectangle):
3481         (WebCore::FrameView::deferredRepaintTimerFired):
3482         * page/FrameView.h:
3483         (FrameView):
3484         * rendering/RenderView.cpp:
3485         (WebCore::RenderView::shouldRepaint):
3486         * svg/graphics/SVGImage.cpp:
3487         (WebCore::SVGImage::drawSVGToImageBuffer):
3488         (WebCore::SVGImage::draw):
3489         * svg/graphics/SVGImage.h:
3490         * svg/graphics/SVGImageCache.cpp:
3491         (WebCore::SVGImageCache::imageContentChanged):
3492         (WebCore::SVGImageCache::redrawTimerFired):
3493         * svg/graphics/SVGImageCache.h:
3494         (SVGImageCache):
3495
3496 2012-03-09  Ken Buchanan  <kenrb@chromium.org>
3497
3498         Crash due to inserting letter into div with first-letter
3499         https://bugs.webkit.org/show_bug.cgi?id=78534
3500
3501         Reviewed by David Hyatt.
3502
3503         This fixes an issue in RenderTextFragment with setTextInternal
3504         getting called with different intents. While most calls to it
3505         are intended to change the underlying DOM node string, it can
3506         also be called as a result of styleDidChange just for transforms
3507         on the substring text fragment. This adds a mechanism for internal
3508         callers to specify if the internal text is being updated without
3509         a DOM node text change.
3510
3511         * rendering/RenderTextFragment.cpp:
3512         (WebCore::RenderTextFragment::styleDidChange)
3513         (WebCore::RenderTextFragment::setTextInternal)
3514         * rendering/RenderTextFragment.h:
3515         (WebCore::RenderTextFragment)
3516
3517 2012-03-09  Chris Rogers  <crogers@google.com>
3518
3519         Fix uninitialized variable in DynamicsCompressor
3520         https://bugs.webkit.org/show_bug.cgi?id=80724
3521
3522         Reviewed by James Robinson.
3523
3524         * platform/audio/DynamicsCompressor.cpp:
3525         (WebCore::DynamicsCompressor::DynamicsCompressor):
3526
3527 2012-03-09  Erik Arvidsson  <arv@chromium.org>
3528
3529         [V8] Undo text position adjustment for attribute event handlers
3530         https://bugs.webkit.org/show_bug.cgi?id=80725
3531
3532         Reviewed by Adam Barth.
3533
3534         No new tests. Needs rebaseline.
3535
3536         * bindings/v8/V8LazyEventListener.cpp:
3537         (WebCore::V8LazyEventListener::prepareListenerObject):
3538
3539 2012-03-09  Tom Sepez  <tsepez@chromium.org>
3540
3541         Hold cached images with a CachedResourceHandle rather than a raw pointer for CSSCrossfadeValue
3542         https://bugs.webkit.org/show_bug.cgi?id=80186
3543
3544         Reviewed by Simon Fraser.
3545
3546         Test: http/tests/css/cross-fade-reload.html
3547
3548         * css/CSSCrossfadeValue.h:
3549         (CSSCrossfadeValue):
3550
3551 2012-03-09  Abhishek Arya  <inferno@chromium.org>
3552
3553         Crash when splitting an anonymous block in multi-column layout.
3554         https://bugs.webkit.org/show_bug.cgi?id=80432
3555
3556         Reviewed by David Hyatt.
3557
3558         Calculating currChild->nextSibling() is risky after destroying :after content
3559         because it can blow away currChild if it is a left over empty anonymous block.
3560         We need to calculate next sibling upfront, using the same trick, we do in
3561         RenderBlock::addChildIgnoringAnonymousColumnBlock to reset beforeChild (check
3562         out the line before splitFlow call).
3563
3564         Test: fast/multicol/anonymous-block-split-crash.html
3565
3566         * rendering/RenderBlock.cpp:
3567         (WebCore::RenderBlock::splitBlocks):
3568
3569 2012-03-09  Abhishek Arya  <inferno@chromium.org>
3570
3571         Crash due to accessing removed parent lineboxes when clearing selection.
3572         https://bugs.webkit.org/show_bug.cgi?id=79264
3573
3574         Reviewed by Dave Hyatt.
3575
3576         Test: editing/selection/first-letter-selection-crash.html
3577
3578         * rendering/RenderBoxModelObject.cpp:
3579         (WebCore::RenderBoxModelObject::setSelectionState):
3580         1. No need of checking if we are being set to same selection state.
3581         Now tested by setSelectionStateIfNeeded. Rename 's' with 'state' and
3582         'cb' with 'containingBlock'.
3583         * rendering/RenderListMarker.cpp:
3584         (WebCore::RenderListMarker::setSelectionState):
3585         1. Add check to canUpdateSelectionOnRootLineBoxes to make sure our
3586         root line boxes are still valid before setting them.
3587         2. No need of calling setSelectionState on containing block since our base
3588         class call to RenderBox::setSelectionState covers it. Added a comment to indicate that.
3589         3. Use m_inlineBoxWrapper variable directly to simplify the ifs.
3590         * rendering/RenderObject.cpp:
3591         (WebCore::RenderObject::canUpdateSelectionOnRootLineBoxes):
3592         (WebCore): helper function to tell if we can update selection information
3593         on our root line boxes. This returns false if our containing block is pending layout.
3594         * rendering/RenderObject.h:
3595         (RenderObject):
3596         (WebCore::RenderObject::setSelectionStateIfNeeded):
3597         (WebCore): helper to set selection state only if it is different from our
3598         current selection state.
3599         * rendering/RenderReplaced.cpp:
3600         (WebCore::RenderReplaced::setSelectionState):
3601         1. Rename 's' to 'state', 'line' to 'root' and use m_inlineBoxWrapper directly
3602         to simplify ifs.
3603         2. Add check to canUpdateSelectionOnRootLineBoxes to make sure our
3604         root line boxes are still valid before setting them.
3605         * rendering/RenderText.cpp:
3606         (WebCore::RenderText::setSelectionState):
3607         1. Add check to canUpdateSelectionOnRootLineBoxes to make sure our
3608         root line boxes are still valid before setting them.
3609         2. Rename 'cb' to 'containingBlock', 'line' to 'root', move InlineTextBox
3610         declaration to local.
3611         * rendering/RenderView.cpp:
3612         (WebCore::RenderView::setSelection): Replace all calls to setSelectionState
3613         with setSelectionStateIfNeeded.
3614         * rendering/RenderWidget.cpp:
3615         (WebCore::RenderWidget::setSelectionState):
3616         1. No need of checking if we are being set to same selection state.
3617         Now tested by setSelectionStateIfNeeded.
3618
3619 2012-03-09  Levi Weintraub  <leviw@chromium.org>
3620
3621         Move TransformationMatrix and TransformState to LayoutUnits.
3622         https://bugs.webkit.org/show_bug.cgi?id=80632
3623
3624         Reviewed by Simon Fraser.
3625
3626         When we move layout to sub-pixel precision, we want to preserve that precision through
3627         transformations. This change readies TransformState and TransformationMatrix to make
3628         use of this additional precision in accumulating transforms, and in returning rects that
3629         preserve it.
3630
3631         No new tests. No change in behavior.
3632
3633         * platform/graphics/transforms/TransformState.cpp:
3634         (WebCore::TransformState::move): Changed to pass along LayoutUnits to the contained
3635         TransformationMatrix. The values of the LayoutUnits will be implicitly converted to
3636         floats to be applied.
3637         * platform/graphics/transforms/TransformState.h:
3638         (WebCore::TransformState::move): Ditto.
3639         (TransformState):
3640         * platform/graphics/transforms/TransformationMatrix.cpp:
3641         (WebCore::clampEdgeValue): Limiting edges to the maximum LayoutUnit value to prevent
3642         overflow..
3643         (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad): Same as above, but also
3644         returning a LayoutRect which preserves additional precision than the previous IntRect.
3645         (WebCore::TransformationMatrix::mapRect): Adding a version of this method that operates
3646         specifically on FractionalLayoutRects.
3647         (WebCore):
3648         * platform/graphics/transforms/TransformationMatrix.h:
3649         (WebCore):
3650         (TransformationMatrix):
3651         * rendering/LayoutTypes.h:
3652         (WebCore::clampToLayoutUnit):
3653         (WebCore):
3654
3655 2012-03-09  Ryosuke Niwa  <rniwa@webkit.org>
3656
3657         Remove a bogus assertion. This condition is no longer true for non-document tree scopes.
3658
3659         * dom/TreeScope.cpp:
3660         (WebCore::TreeScope::activeElement):
3661
3662 2012-03-09  Ryosuke Niwa  <rniwa@webkit.org>
3663
3664         Cleanup incDOMTreeVersion callers
3665         https://bugs.webkit.org/show_bug.cgi?id=80452
3666
3667         Reviewed by Andreas Kling.
3668
3669         Unify various calls to incDOMTreeVersion and namely remove the call inside dispatchSubtreeModifiedEvent.
3670         There should be no behavioral change and therefore there is no new test.
3671
3672         * dom/CharacterData.cpp:
3673         (WebCore::CharacterData::parserAppendData):
3674         (WebCore::CharacterData::setDataAndUpdate):
3675         * dom/ContainerNode.cpp:
3676         (WebCore::willRemoveChild):
3677         (WebCore::willRemoveChildren):
3678         (WebCore::ContainerNode::removeChild):
3679         (WebCore::ContainerNode::removeChildren):
3680         (WebCore::ContainerNode::childrenChanged):
3681         (WebCore::notifyChildInserted):
3682         * dom/Element.cpp:
3683         (WebCore::Element::attributeChanged):
3684         (WebCore::Element::parserSetAttributes):
3685         (WebCore::Element::willModifyAttribute):
3686         * dom/Node.cpp:
3687         (WebCore::Node::dispatchSubtreeModifiedEvent):
3688         * html/HTMLOutputElement.cpp:
3689         (WebCore::HTMLOutputElement::childrenChanged):
3690         * html/HTMLScriptElement.cpp:
3691         (WebCore::HTMLScriptElement::childrenChanged):
3692         * html/HTMLStyleElement.cpp:
3693         (WebCore::HTMLStyleElement::childrenChanged):
3694         * html/HTMLTextAreaElement.cpp:
3695         (WebCore::HTMLTextAreaElement::childrenChanged):
3696         * html/HTMLTitleElement.cpp:
3697         (WebCore::HTMLTitleElement::childrenChanged):
3698         * svg/SVGScriptElement.cpp:
3699         (WebCore::SVGScriptElement::childrenChanged):
3700         * svg/SVGStyleElement.cpp:
3701         (WebCore::SVGStyleElement::childrenChanged):
3702
3703 2012-03-09  Patrick Gansterer  <paroga@webkit.org>
3704
3705         Build fix for !ENABLE(FILTERS) after r110285.
3706
3707         * rendering/svg/SVGRenderingContext.h:
3708         (WebCore::SVGRenderingContext::SVGRenderingContext):
3709
3710 2012-03-09  Dana Jansens  <danakj@chromium.org>
3711
3712         [chromium] Use opaque paints in CCOcclusionTracker
3713         https://bugs.webkit.org/show_bug.cgi?id=80173
3714
3715         Reviewed by Adrienne Walker.
3716
3717         Use tracked opaque paints in the tiles when tracking occlusion in
3718         CCOcclusionTracker. Moves the Tile::m_opaqueRect up to the super-
3719         class in CCLayerTilingData rather than having it declared in both
3720         TiledLayerChromium and CCTiledLayerImpl. This lets the CCLayerTilingData
3721         class compute the opaque region for its tiles, sharing code between the
3722         two tiled layer implementations.
3723
3724         Use of this feature is guarded behind a runtime flag and turned off for
3725         paint culling. We will enable it in the future once we're comfortable
3726         with the paint culling.
3727
3728         Unit test: CCOcclusionTrackerTest.opaqueContentsRegionEmpty
3729                    CCOcclusionTrackerTest.opaqueContentsRegionNonEmpty
3730                    TiledLayerChromiumTest.opaqueContentsRegion
3731
3732         All existing CCOcclusionTrackerTest.* duplicated with opaque painted
3733         rects.
3734
3735         * platform/graphics/chromium/LayerChromium.h:
3736         (WebCore::LayerChromium::opaqueContentsRegion):
3737         (LayerChromium):
3738         * platform/graphics/chromium/TiledLayerChromium.cpp:
3739         (UpdatableTile):
3740         (WebCore::TiledLayerChromium::pushPropertiesTo):
3741         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
3742         (WebCore::TiledLayerChromium::addSelfToOccludedScreenSpace):
3743         (WebCore::TiledLayerChromium::opaqueContentsRegion):
3744         (WebCore):
3745         * platform/graphics/chromium/TiledLayerChromium.h:
3746         * platform/graphics/chromium/cc/CCLayerImpl.h:
3747         (WebCore::CCLayerImpl::opaqueContentsRegion):
3748         (CCLayerImpl):
3749         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
3750         (WebCore::CCLayerTilingData::opaqueRegionInLayerRect):
3751         (WebCore):
3752         * platform/graphics/chromium/cc/CCLayerTilingData.h:
3753         (WebCore):
3754         (Tile):
3755         (WebCore::CCLayerTilingData::Tile::opaqueRect):
3756         (WebCore::CCLayerTilingData::Tile::setOpaqueRect):
3757         (CCLayerTilingData):
3758         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3759         (WebCore::::CCOcclusionTrackerBase):
3760         (WebCore::computeOcclusionBehindLayer):
3761         (WebCore::::markOccludedBehindLayer):
3762         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
3763         (CCOcclusionTrackerBase):
3764         (WebCore::CCOcclusionTrackerBase::setUsePaintTracking):
3765         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3766         (DrawableTile):
3767         (WebCore::CCTiledLayerImpl::opaqueContentsRegion):
3768         (WebCore):
3769         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3770         (CCTiledLayerImpl):
3771
3772 2012-03-09  Antti Koivisto  <antti@apple.com>
3773
3774         Presentation attribute cache
3775         https://bugs.webkit.org/show_bug.cgi?id=80707
3776         
3777         Reviewed by Andreas Kling.
3778
3779         It is common for the same presentation attribute values repeat. We should introduce a cache that uses 
3780         presentation attribute names and values as key. This will help to avoid repeated parsing of the 
3781         same attribute values, reduce memory consumption and speed up the style resolve.
3782         
3783         This patch introduces a simple and small (128 entries) global cache. In general web browsing it seems
3784         to give sharing rate of >75% (an average presentation attribute property set is shared between >4 elements).
3785
3786         * dom/StyledElement.cpp:
3787         (WebCore::PresentationAttributeCacheKey::PresentationAttributeCacheKey):
3788         (PresentationAttributeCacheKey):
3789         (WebCore):
3790         (WebCore::operator!=):
3791         (PresentationAttributeCacheEntry):
3792         (WebCore::presentationAttributeCache):
3793         (WebCore::attributeNameSort):
3794         (WebCore::StyledElement::makePresentationAttributeCacheKey):
3795         (WebCore::computePresentationAttributeCacheHash):
3796         (WebCore::StyledElement::updateAttributeStyle):
3797         * dom/StyledElement.h:
3798         (WebCore):
3799         (StyledElement):
3800
3801 2012-03-08  Erik Arvidsson  <arv@chromium.org>
3802
3803         [V8] Fix object scope for inline event attribute handlers
3804         https://bugs.webkit.org/show_bug.cgi?id=80329
3805
3806         Reviewed by Ojan Vafai.
3807
3808         We now create the funciton inside the with-statements with the current scope objects.
3809         This is important for a few reasons:
3810
3811         - We need to use the real objects and not just lookup the JS properties because these might have been overridden.
3812         - We need to use the node, form and document at the time of the preparation and not at the time of calling.
3813         - We need to ensure that event/evt is bound closer than a property with the same name in the object environment
3814           created by the with-statements.
3815
3816         Tests: fast/dom/inline-event-attributes-lookup-removed-form.html
3817                fast/dom/inline-event-attributes-lookup-removed.html
3818                fast/dom/inline-event-attributes-lookup.html
3819
3820         * bindings/v8/ScriptEventListener.cpp:
3821         (WebCore::eventParameterName):
3822         (WebCore):
3823         (WebCore::createAttributeEventListener):
3824         * bindings/v8/V8LazyEventListener.cpp:
3825         (WebCore::V8LazyEventListener::V8LazyEventListener):
3826         (WebCore):
3827         (WebCore::toObjectWrapper):
3828         (WebCore::V8LazyEventListener::callListenerFunction):
3829         (WebCore::V8LazyEventListener::prepareListenerObject):
3830         * bindings/v8/V8LazyEventListener.h:
3831         (WebCore):
3832         (WebCore::V8LazyEventListener::create):
3833         (V8LazyEventListener):
3834
3835 2012-03-09  Stephen Chenney  <schenney@chromium.org>
3836
3837         Crash in WebCore::SVGUseElement::instanceForShadowTreeElement
3838         https://bugs.webkit.org/show_bug.cgi?id=80406
3839
3840         Reviewed by Nikolas Zimmermann.
3841
3842         Code assumes that an object that is an SVG Element and in a shadow
3843         tree must be in an SVG use shadow tree, and casts the shadow host with
3844         a static_cast. It may be that an SVG element appears in a non-use
3845         shadow tree, in which case bad things happen. While it appears that
3846         the current code prevents such a situation from arising (checks are
3847         made within the shadow tree code to prevent it) there are also
3848         indications that the situation may change.
3849
3850         No new tests. I believe that the problem here cannot currently be
3851         reproduced. That is, other code prevents SVG elements from appearing
3852         in non-svg shadow trees.
3853
3854         * dom/EventDispatcher.cpp:
3855         (WebCore::eventTargetRespectingSVGTargetRules):
3856         * svg/SVGStyledElement.cpp:
3857         (WebCore::SVGStyledElement::title):
3858
3859 2012-03-09  Jon Lee  <jonlee@apple.com>
3860
3861         Add support for ENABLE(LEGACY_NOTIFICATIONS)
3862         https://bugs.webkit.org/show_bug.cgi?id=80497
3863
3864         Reviewed by Adam Barth.
3865
3866         Prep for b80472: Update API for Web Notifications
3867         * Configurations/FeatureDefines.xcconfig:
3868         * GNUmakefile.am:
3869
3870 2012-03-09  Kaustubh Atrawalkar  <kaustubh@motorola.com>
3871
3872         ShadowRoot should implement activeElement.
3873         https://bugs.webkit.org/show_bug.cgi?id=79886
3874
3875         Reviewed by Ryosuke Niwa.
3876
3877         Implement the activeElement attribute for ShadowRoot to return the
3878         currently focused element in the shadow DOM subtree.
3879
3880         Test: fast/dom/shadow/shadow-root-activeElement.html
3881
3882         * dom/ShadowRoot.cpp:
3883         (WebCore::ShadowRoot::activeElement):
3884         (WebCore):
3885         * dom/ShadowRoot.h:
3886         (ShadowRoot):
3887         * dom/ShadowRoot.idl:
3888         * dom/TreeScope.cpp:
3889         (WebCore::TreeScope::adoptIfNeeded):
3890         (WebCore):
3891         (WebCore::focusedFrameOwnerElement):
3892         (WebCore::TreeScope::activeElement):
3893         * dom/TreeScope.h:
3894         (TreeScope):
3895         * html/HTMLDocument.cpp:
3896         (WebCore):
3897         (WebCore::HTMLDocument::activeElement):
3898
3899 2012-03-09  Tim Horton  <timothy_horton@apple.com>
3900
3901         Infinite repaint loop with SVGImageCache and deferred repaint timers
3902         https://bugs.webkit.org/show_bug.cgi?id=78315
3903         <rdar://problem/10651634>
3904
3905         Reviewed by Nikolas Zimmermann.
3906
3907         Only defer image redraw on a timer if we're in layout. This breaks
3908         the repaint loop while still preventing us from drawing inside layout.
3909
3910         Completely disable repaint during relayout inside SVGImage::drawSVGToImageBuffer,
3911         preventing deferred repaint timers from being started during that process.
3912
3913         No new tests, as the problem only occurs in a nonstandard configuration.
3914
3915         * svg/graphics/SVGImage.cpp:
3916         (WebCore::SVGImage::draw):
3917         (WebCore::SVGImage::frameView):
3918         (WebCore):
3919         * svg/graphics/SVGImage.h:
3920         (WebCore):
3921         * svg/graphics/SVGImageCache.cpp:
3922         (WebCore::SVGImageCache::imageContentChanged):
3923         (WebCore::SVGImageCache::redraw):
3924         (WebCore::SVGImageCache::redrawTimerFired):
3925         (WebCore):
3926         * svg/graphics/SVGImageCache.h:
3927         (SVGImageCache):
3928
3929 2012-03-09  Victor Carbune  <vcarbune@adobe.com>
3930
3931         The method TextTrackCue::getCueAsHTML() should return different
3932         fragments on different calls.
3933
3934         https://bugs.webkit.org/show_bug.cgi?id=80701
3935
3936         Reviewed by Eric Carlson.
3937
3938         Test: media/track/track-cue-mutable-fragment.html
3939
3940         * html/track/TextTrackCue.cpp: Removed setCueHTML(), since it is sufficient
3941         to create apply the DOM rules only when the fragment is first requested.
3942         (WebCore::TextTrackCue::getCueAsHTML): Changed the method such that a
3943         a clone of the cached document fragment is returned.
3944         * html/track/TextTrackCue.h: Removed setCueHTML() as the document fragment
3945         of the cue should be created only within the class, from the cue text.
3946         (TextTrackCue):
3947         * html/track/WebVTTParser.cpp:
3948         (WebCore::WebVTTParser::createNewCue): removed usage of setCueHTML()
3949
3950 2012-03-09  Tim Horton  <timothy_horton@apple.com>
3951
3952         Crash in SVGTextLayoutAttributesBuilder::fillCharacterDataMap
3953         https://bugs.webkit.org/show_bug.cgi?id=78949
3954         <rdar://problem/10889440>
3955
3956         Reviewed by Nikolas Zimmermann.
3957
3958         Invalidate the text positioning cache when the children of an SVGAElement change,
3959         so that we regenerate the list the next time it's needed instead of using stale values.
3960
3961         Test: svg/text/text-positioning-remove-child-crash.svg
3962
3963         * rendering/svg/SVGAElement.cpp:
3964         (WebCore::SVGAElement::childrenChanged):
3965
3966 2012-03-09  Ashod Nakashian  <ashodnakashian@yahoo.com>
3967
3968         Bash scripts should support LF endings only
3969         https://bugs.webkit.org/show_bug.cgi?id=79509
3970
3971         Reviewed by David Kilzer.
3972
3973         * WebCore.gyp/mac/adjust_visibility.sh: Added property svn:eol-style.
3974         * WebCore.vcproj/build-generated-files.sh: Added property svn:executable.
3975         * WebCore.vcproj/migrate-scripts.sh: Added property svn:executable.
3976         * gyp/copy-forwarding-and-icu-headers.sh: Added property svn:eol-style.
3977         * gyp/copy-inspector-resources.sh: Added property svn:eol-style.
3978         * gyp/generate-derived-sources.sh: Added property svn:eol-style.
3979         * gyp/generate-webcore-export-file-generator.sh: Added property svn:eol-style.
3980         * gyp/run-if-exists.sh: Added property svn:eol-style.
3981         * gyp/streamline-inspector-source.sh: Added property svn:eol-style.
3982         * gyp/update-info-plist.sh: Added property svn:eol-style.
3983
3984 2012-03-09  Andreas Kling  <awesomekling@apple.com>
3985
3986         CSSParser: Use Vector for intermediate property storage.
3987         <http://webkit.org/b/80653>
3988
3989         Reviewed by Antti Koivisto.
3990
3991         Remove the custom memory management for intermediate CSSProperties in CSSParser
3992         and replace it by a Vector<CSSProperty, 256>.
3993         This avoids heap allocations and removes a bunch of unnecessary complexity.
3994
3995         Remove WTF_MAKE_FAST_ALLOCATED from CSSProperty since they are only created on
3996         the stack now.
3997
3998         * css/CSSGrammar.y:
3999         * css/CSSParser.cpp:
4000         (WebCore::CSSParser::CSSParser):
4001         (WebCore::CSSParser::~CSSParser):
4002         (WebCore::CSSParser::parseValue):
4003         (WebCore::CSSParser::parseColor):
4004         (WebCore::CSSParser::parseDeclaration):
4005         (WebCore::CSSParser::addProperty):
4006         (WebCore::CSSParser::rollbackLastProperties):
4007         (WebCore::CSSParser::clearProperties):
4008         (WebCore::CSSParser::parse4Values):
4009         (WebCore::CSSParser::parseFlowThread):
4010         (WebCore::CSSParser::createStyleRule):
4011         (WebCore::CSSParser::createFontFaceRule):
4012         (WebCore::CSSParser::createPageRule):
4013         (WebCore::CSSParser::createMarginAtRule):
4014         (WebCore::CSSParser::startDeclarationsForMarginBox):
4015         (WebCore::CSSParser::endDeclarationsForMarginBox):
4016         (WebCore::CSSParser::deleteFontFaceOnlyValues):
4017         (WebCore::CSSParser::createKeyframeRule):
4018         * css/CSSParser.h:
4019         (WebCore::CSSParser::hasProperties):
4020         (CSSParser):
4021         * css/CSSProperty.h:
4022         * css/SVGCSSParser.cpp:
4023         (WebCore::CSSParser::parseSVGValue):
4024         * css/StylePropertySet.cpp:
4025         (WebCore::StylePropertySet::StylePropertySet):
4026         (WebCore::StylePropertySet::addParsedProperties):
4027         * css/StylePropertySet.h:
4028         (WebCore::StylePropertySet::create):