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