bc663914beeb639c79ea2ad05d4ca350526546b5
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-12  Dana Jansens  <danakj@chromium.org>
2
3         [chromium] Use projectQuad to apply inverse mapRect
4         https://bugs.webkit.org/show_bug.cgi?id=80741
5
6         Reviewed by Adrienne Walker.
7
8         Unit test: CCOcclusionTrackerTest3dTransform
9                    CCOcclusionTrackerTestPerspectiveTransform
10                    CCOcclusionTrackerTestPerspectiveTransformBehindCamera
11
12         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
13         (WebCore::projectQuad):
14         (WebCore):
15         (WebCore::computeUnoccludedContentRect):
16
17 2012-03-12  Leo Yang  <leo.yang@torchmobile.com.cn>
18
19         [BlackBerry] Upstream the BlackBerry change to platform/graphics/FontPlatformData.h
20         https://bugs.webkit.org/show_bug.cgi?id=80820
21
22         Reviewed by Rob Buis.
23
24         The BlackBerry is using the FontPlatformData from Chromium porting.
25
26         * platform/graphics/FontPlatformData.h:
27
28 2012-03-12  Zhenyao Mo  <zmo@google.com>
29
30         After webgl canvas resize, bindings might be lost
31         https://bugs.webkit.org/show_bug.cgi?id=80895
32
33         Reviewed by Stephen White.
34
35         Test: fast/canvas/webgl/texture-bindings-uneffected-on-resize.html
36
37         * html/canvas/WebGLRenderingContext.cpp:
38         (WebCore):
39         (WebCore::WebGLRenderingContext::reshape): recover bindings after reshape.
40
41 2012-03-12  Kentaro Hara  <haraken@chromium.org>
42
43         [V8][Refactoring] Remove getWrapper() and getWrapperSlow()
44         https://bugs.webkit.org/show_bug.cgi?id=80920
45
46         Reviewed by Adam Barth.
47
48         Now getWrapper() is the same as getExistingWrapper().
49         getWrapperSlow() is the same as getExistingWrapperSlow().
50         This patch removes getWrapper() and getWrapperSlow().
51         Also this patch renames getExistingWrapper() to getCachedWrapper().
52
53         No tests. No change in behavior.
54
55         * bindings/scripts/CodeGeneratorV8.pm:
56         (GenerateHeader):
57         * bindings/v8/V8DOMWrapper.cpp:
58         (WebCore::V8DOMWrapper::getWrapperSlow):
59         * bindings/v8/V8DOMWrapper.h:
60         (WebCore::V8DOMWrapper::getWrapper):
61         (V8DOMWrapper):
62         * bindings/v8/custom/V8NodeCustom.cpp:
63         (WebCore::toV8Slow):
64
65 2012-03-12  Erik Arvidsson  <arv@chromium.org>
66
67         [V8] Use v8::V8::AddHiddenReferences instead of SetHiddenValue
68         https://bugs.webkit.org/show_bug.cgi?id=80880
69
70         Reviewed by Adam Barth.
71
72         We used to add a hidden property in the getter to the returned wrapper.
73         With this patch we instead handle the liveness of the wrapper in the GC phase by
74         calling v8::V8::AddHiddenReference.
75
76         To reduce the amount of custom code we need, the V8 code generator now supports
77         GenerateIsReachable (as well as CustomIsReachable) which, even though different
78         from the JSC attribute, is used in the same cases and takes the same values (even though
79         at the moment not all JSC values are supported by V8).
80
81         No new tests. Covered by existing tests.
82
83         * Target.pri:
84         * UseV8.cmake:
85         * WebCore.gypi:
86         * bindings/scripts/CodeGeneratorJS.pm:
87         (GetGenerateIsReachable):
88         (GetCustomIsReachable):
89         (GenerateHeader):
90         (GenerateImplementation):
91         * bindings/scripts/CodeGeneratorV8.pm:
92         (NeedsToVisitDOMWrapper):
93         (GetGenerateIsReachable):
94         (GetCustomIsReachable):
95         (GenerateVisitDOMWrapper):
96         (GenerateHeader):
97         (GenerateNamedConstructorCallback):
98         (GenerateImplementation):
99         * bindings/scripts/IDLAttributes.txt:
100         * bindings/scripts/test/V8/V8Float64Array.cpp:
101         (WebCore):
102         * bindings/scripts/test/V8/V8Float64Array.h:
103         (V8Float64Array):
104         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
105         (WebCore):
106         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
107         (V8TestActiveDOMObject):
108         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
109         (WebCore):
110         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
111         (V8TestCustomNamedGetter):
112         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
113         (WebCore):
114         * bindings/scripts/test/V8/V8TestEventConstructor.h:
115         (V8TestEventConstructor):
116         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
117         (WebCore):
118         * bindings/scripts/test/V8/V8TestEventTarget.h:
119         (V8TestEventTarget):
120         * bindings/scripts/test/V8/V8TestInterface.cpp:
121         (WebCore):
122         * bindings/scripts/test/V8/V8TestInterface.h:
123         (V8TestInterface):
124         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
125         (WebCore):
126         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
127         (V8TestMediaQueryListListener):
128         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
129         (WebCore):
130         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
131         (V8TestNamedConstructor):
132         * bindings/scripts/test/V8/V8TestObj.cpp:
133         (WebCore):
134         * bindings/scripts/test/V8/V8TestObj.h:
135         (V8TestObj):
136         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
137         (WebCore):
138         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
139         (V8TestSerializedScriptValueInterface):
140         * bindings/v8/NPV8Object.cpp:
141         (WebCore::npObjectTypeInfo):
142         * bindings/v8/V8GCController.cpp:
143         (WebCore::GrouperVisitor::visitDOMWrapper):
144         * bindings/v8/WrapperTypeInfo.h:
145         (WebCore):
146         (WrapperTypeInfo):
147         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Removed.
148         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
149         * bindings/v8/custom/V8DOMTokenListCustom.cpp: Removed.
150         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
151         (WebCore):
152         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
153         * bindings/v8/custom/V8StyleSheetCustom.cpp:
154         (WebCore::toV8):
155         * css/CSSStyleSheet.idl:
156         * css/StyleSheet.idl:
157         * dom/DOMStringMap.idl:
158         * dom/NamedNodeMap.idl:
159         * html/DOMTokenList.idl:
160         * html/track/TextTrackList.idl:
161
162 2012-03-12  Kentaro Hara  <haraken@chromium.org>
163
164         [V8][Refactoring] Make getWrapperSlow() and getExistingWrapperSlow() same
165         https://bugs.webkit.org/show_bug.cgi?id=80916
166
167         Reviewed by Adam Barth.
168
169         This is one of the steps for fixing bug 80841.
170         This patch makes getWrapperSlow() and getExistingWrapperSlow() same.
171         In the next patch, we will remove getExistingWrapper() and getExistingWrapperSlow().
172
173         No tests. No change in behavior.
174
175         * bindings/scripts/CodeGeneratorV8.pm:
176         (GenerateHeader):
177         * bindings/v8/V8DOMWrapper.cpp:
178         (WebCore::V8DOMWrapper::getWrapperSlow):
179
180 2012-03-12  Kentaro Hara  <haraken@chromium.org>
181
182         [V8] Refactor some header includes in V8 bindings
183         https://bugs.webkit.org/show_bug.cgi?id=80913
184
185         Reviewed by Adam Barth.
186
187         This patch refactors some header includes in V8 bindings
188         required for fixing bug 80841.
189
190         No tests. No change in behavior.
191
192         * bindings/v8/DOMDataStore.h:
193         (DOMDataStore):
194         * bindings/v8/V8DOMMap.h:
195         * bindings/v8/V8DOMWrapper.cpp:
196         * bindings/v8/V8IsolatedContext.cpp:
197         (WebCore::V8IsolatedContext::isolatedContext):
198         * bindings/v8/V8IsolatedContext.h:
199         (WebCore::V8IsolatedContext::getEntered):
200         (V8IsolatedContext):
201         * bindings/v8/WorldContextHandle.cpp:
202
203 2012-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
204
205         Unreviewed, rolling out r110501.
206         http://trac.webkit.org/changeset/110501
207         https://bugs.webkit.org/show_bug.cgi?id=80908
208
209         Broke the Apple-Win build (Requested by abarth on #webkit).
210
211         * CMakeLists.txt:
212         * DerivedSources.make:
213         * DerivedSources.pri:
214         * GNUmakefile.am:
215         * GNUmakefile.list.am:
216         * Target.pri:
217         * WebCore.gyp/WebCore.gyp:
218         * WebCore.gypi:
219         * WebCore.pri:
220         * WebCore.xcodeproj/project.pbxproj:
221         * fileapi/DirectoryEntry.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntry.cpp.
222         (WebCore):
223         (WebCore::DirectoryEntry::DirectoryEntry):
224         (WebCore::DirectoryEntry::createReader):
225         (WebCore::DirectoryEntry::getFile):
226         (WebCore::DirectoryEntry::getDirectory):
227         (WebCore::DirectoryEntry::removeRecursively):
228         * fileapi/DirectoryEntry.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntry.h.
229         (WebCore):
230         (DirectoryEntry):
231         (WebCore::DirectoryEntry::create):
232         (WebCore::DirectoryEntry::isDirectory):
233         * fileapi/DirectoryEntry.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntry.idl.
234         * fileapi/DirectoryEntrySync.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntrySync.cpp.
235         (WebCore):
236         (WebCore::DirectoryEntrySync::DirectoryEntrySync):
237         (WebCore::DirectoryEntrySync::createReader):
238         (WebCore::DirectoryEntrySync::getFile):
239         (WebCore::DirectoryEntrySync::getDirectory):
240         (WebCore::DirectoryEntrySync::removeRecursively):
241         * fileapi/DirectoryEntrySync.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntrySync.h.
242         (WebCore):
243         (DirectoryEntrySync):
244         (WebCore::DirectoryEntrySync::create):
245         (WebCore::DirectoryEntrySync::isDirectory):
246         * fileapi/DirectoryEntrySync.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntrySync.idl.
247         * fileapi/DirectoryReader.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryReader.cpp.
248         (WebCore):
249         (WebCore::DirectoryReader::DirectoryReader):
250         (WebCore::DirectoryReader::readEntries):
251         * fileapi/DirectoryReader.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryReader.h.
252         (WebCore):
253         (DirectoryReader):
254         (WebCore::DirectoryReader::create):
255         (WebCore::DirectoryReader::filesystem):
256         * fileapi/DirectoryReader.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryReader.idl.
257         * fileapi/DirectoryReaderBase.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderBase.h.
258         (WebCore):
259         (DirectoryReaderBase):
260         (WebCore::DirectoryReaderBase::filesystem):
261         (WebCore::DirectoryReaderBase::setHasMoreEntries):
262         (WebCore::DirectoryReaderBase::DirectoryReaderBase):
263         * fileapi/DirectoryReaderSync.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderSync.cpp.
264         (WebCore):
265         (WebCore::DirectoryReaderSync::DirectoryReaderSync):
266         (WebCore::DirectoryReaderSync::readEntries):
267         * fileapi/DirectoryReaderSync.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderSync.h.
268         (WebCore):
269         (DirectoryReaderSync):
270         (WebCore::DirectoryReaderSync::create):
271         * fileapi/DirectoryReaderSync.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderSync.idl.
272
273 2012-03-12  Nico Weber  <thakis@chromium.org>
274
275         [chromium/mac] Make sure libWebKitSystemInterface.a doesn't contain ppc object files.
276         https://bugs.webkit.org/show_bug.cgi?id=80902
277
278         Reviewed by Adam Barth.
279
280         Follow-up to http://codereview.chromium.org/9638015/
281
282         No intended behavior change.
283
284         * WebCore.gyp/mac/adjust_visibility.sh:
285
286 2012-03-12  Jer Noble  <jer.noble@apple.com>
287
288         WebCore: Add support for AudioNode "tailTime()" and "latencyTime()"
289         https://bugs.webkit.org/show_bug.cgi?id=74750
290
291         Reviewed by Chris Rogers.
292
293         No new tests; optimization of existing code path, so covered by existing tests.
294
295         To account for AudioNodes which may generate non-silent audio when fed silent input
296         for a certain amount of time after the last non-silent audio data, add two new virtual
297         functions tailTime() and latencyTime().
298
299         * webaudio/AudioNode.h:
300         (WebCore::AudioNode::tailTime): Added. Pure virtual.
301         (WebCore::AudioNode::latencyTime): Added. Pure virtual.
302         * platform/audio/AudioProcessor.h:
303         (WebCore::AudioProcessor::tailTime): Added. Pure virtual.
304         (WebCore::AudioProcessor::latencyTime): Added. Pure virtual.
305         * platform/audio/AudioDSPKernel.h:
306         (WebCore::AudioDSPKernel::tailTime): Added. Pure virtual.
307         (WebCore::AudioDSPKernel::latencyTime): Added. Pure virtual.
308
309         Added tailTime() and latencyTime() overrides to the following classes:
310         * platform/audio/AudioDSPKernelProcessor.cpp:
311         (WebCore::AudioDSPKernelProcessor::tailTime):
312         (WebCore::AudioDSPKernelProcessor::latencyTime):
313         * platform/audio/AudioDSPKernelProcessor.h:
314         * platform/audio/DynamicsCompressor.h:
315         (WebCore::DynamicsCompressor::tailTime):
316         (WebCore::DynamicsCompressor::latencyTime):
317         * platform/audio/EqualPowerPanner.h:
318         * platform/audio/HRTFPanner.cpp:
319         (WebCore::HRTFPanner::tailTime):
320         (WebCore::HRTFPanner::latencyTime):
321         * platform/audio/HRTFPanner.h:
322         * platform/audio/Panner.h:
323         * webaudio/AudioBasicProcessorNode.cpp:
324         (WebCore::AudioBasicProcessorNode::tailTime):
325         (WebCore::AudioBasicProcessorNode::latencyTime):
326         * webaudio/AudioBasicProcessorNode.h:
327         * webaudio/AudioChannelMerger.h:
328         * webaudio/AudioChannelSplitter.h:
329         * webaudio/AudioDestinationNode.h:
330         * webaudio/AudioGainNode.h:
331         * webaudio/AudioPannerNode.h:
332         * webaudio/AudioSourceNode.h:
333         * webaudio/BiquadDSPKernel.cpp:
334         (WebCore::BiquadDSPKernel::tailTime):
335         (WebCore::BiquadDSPKernel::latencyTime):
336         * webaudio/BiquadDSPKernel.h:
337         * webaudio/BiquadFilterNode.h:
338         * webaudio/ConvolverNode.cpp:
339         (WebCore::ConvolverNode::tailTime):
340         (WebCore::ConvolverNode::latencyTime):
341         * webaudio/ConvolverNode.h:
342         * webaudio/DelayDSPKernel.cpp:
343         (WebCore::DelayDSPKernel::tailTime):
344         (WebCore::DelayDSPKernel::latencyTime):
345         * webaudio/DelayDSPKernel.h:
346         * webaudio/DelayProcessor.h:
347         * webaudio/DynamicsCompressorNode.cpp:
348         (WebCore::DynamicsCompressorNode::tailTime):
349         (WebCore::DynamicsCompressorNode::latencyTime):
350         * webaudio/DynamicsCompressorNode.h:
351         * webaudio/JavaScriptAudioNode.cpp:
352         (WebCore::JavaScriptAudioNode::tailTime):
353         (WebCore::JavaScriptAudioNode::latencyTime):
354         * webaudio/JavaScriptAudioNode.h:
355         * webaudio/RealtimeAnalyserNode.h:
356         * webaudio/WaveShaperDSPKernel.h:
357
358         The following functions were added as support for the new AudioNode and AudioProcessor functions:
359         * platform/audio/Biquad.cpp:
360         (WebCore::Biquad::latencyFrames):
361         * platform/audio/Biquad.h:
362         * platform/audio/Reverb.cpp:
363         (WebCore::Reverb::latencyFrames):
364         * platform/audio/ReverbConvolver.h:
365         (WebCore::ReverbConvolver::latencyFrames):
366
367         The following functions were made const-correct:
368         * platform/audio/HRTFPanner.h:
369         (WebCore::HRTFPanner::fftSize):
370         * platform/audio/Reverb.h:
371         (WebCore::Reverb::impulseResponseLength):
372
373 2012-03-12  Anders Carlsson  <andersca@apple.com>
374
375         WebTileLayers should be opaque
376         https://bugs.webkit.org/show_bug.cgi?id=80907
377         <rdar://problem/11034390>
378
379         Reviewed by Andreas Kling.
380
381         * platform/graphics/ca/mac/TileCache.mm:
382         (WebCore::TileCache::createTileLayer):
383         Call -[CALayer setOpaque:] on the newly created WebTileLayer.
384
385 2012-03-12  Emil A Eklund  <eae@chromium.org>
386
387         Fix rounding in scrollbar rect calculations
388         https://bugs.webkit.org/show_bug.cgi?id=80894
389
390         Reviewed by Eric Seidel.
391
392         Fix usage of subpixel units in RenderScrollbar::buttonRect and
393         RenderScrollbar::trackRect.
394
395         No new tests, no new functionality.
396
397         * rendering/LayoutTypes.h:
398         (WebCore::isIntegerValue):
399         Add dummy isIntegerValue function, will be replaced with actual
400         implementation once LayoutUnit is remapped to FractionalLayoutUnit.
401         
402         * rendering/RenderScrollbar.cpp:
403         (WebCore::RenderScrollbar::buttonRect):
404         (WebCore::RenderScrollbar::trackRect):
405         Change rect calculations to use pixel snapped values.
406
407         * rendering/RenderScrollbarPart.h:
408         (RenderScrollbarPart):
409         (WebCore::RenderScrollbarPart::marginTop):
410         (WebCore::RenderScrollbarPart::marginBottom):
411         (WebCore::RenderScrollbarPart::marginLeft):
412         (WebCore::RenderScrollbarPart::marginRight):
413         Add ASSERT to ensure that scrollbar parts are always aligned to device
414         pixels.
415
416 2012-03-12  C Anthony Risinger  <anthony@xtfx.me>
417
418         [GObject IDL Parser] STRING argument should be HASHREF
419         https://bugs.webkit.org/show_bug.cgi?id=78877
420
421         Reviewed by Kentaro Hara.
422
423         * bindings/scripts/CodeGeneratorGObject.pm:
424         (GenerateFunctions): extendedAttributes are hashes, not strings
425
426 2012-03-12  Jessie Berlin  <jberlin@apple.com>
427
428         More Windows build fixing.
429
430         Use fully qualified paths for WTF headers.
431
432         * platform/graphics/cg/ImageSourceCGWin.cpp:
433         * platform/graphics/win/UniscribeController.h:
434         * platform/win/DragImageCGWin.cpp:
435         * platform/win/DragImageCairoWin.cpp:
436         * platform/win/DragImageWin.cpp:
437         * rendering/RenderThemeSafari.cpp:
438
439 2012-03-12  Mark Pilgrim  <pilgrim@chromium.org>
440
441         Move DirectoryEntry and DirectoryReader to new Modules/filesystem/ directory
442         https://bugs.webkit.org/show_bug.cgi?id=80625
443
444         Reviewed by Adam Barth.
445
446         No new tests, all existing tests pass.
447
448         * CMakeLists.txt:
449         * DerivedSources.make:
450         * DerivedSources.pri:
451         * GNUmakefile.am:
452         * GNUmakefile.list.am:
453         * Modules/filesystem: Added.
454         * Modules/filesystem/DirectoryEntry.cpp: Copied from Source/WebCore/fileapi/DirectoryEntry.cpp.
455         * Modules/filesystem/DirectoryEntry.h: Copied from Source/WebCore/fileapi/DirectoryEntry.h.
456         * Modules/filesystem/DirectoryEntry.idl: Copied from Source/WebCore/fileapi/DirectoryEntry.idl.
457         * Modules/filesystem/DirectoryEntrySync.cpp: Copied from Source/WebCore/fileapi/DirectoryEntrySync.cpp.
458         * Modules/filesystem/DirectoryEntrySync.h: Copied from Source/WebCore/fileapi/DirectoryEntrySync.h.
459         * Modules/filesystem/DirectoryEntrySync.idl: Copied from Source/WebCore/fileapi/DirectoryEntrySync.idl.
460         * Modules/filesystem/DirectoryReader.cpp: Copied from Source/WebCore/fileapi/DirectoryReader.cpp.
461         * Modules/filesystem/DirectoryReader.h: Copied from Source/WebCore/fileapi/DirectoryReader.h.
462         * Modules/filesystem/DirectoryReader.idl: Copied from Source/WebCore/fileapi/DirectoryReader.idl.
463         * Modules/filesystem/DirectoryReaderBase.h: Copied from Source/WebCore/fileapi/DirectoryReaderBase.h.
464         * Modules/filesystem/DirectoryReaderSync.cpp: Copied from Source/WebCore/fileapi/DirectoryReaderSync.cpp.
465         * Modules/filesystem/DirectoryReaderSync.h: Copied from Source/WebCore/fileapi/DirectoryReaderSync.h.
466         * Modules/filesystem/DirectoryReaderSync.idl: Copied from Source/WebCore/fileapi/DirectoryReaderSync.idl.
467         * Target.pri:
468         * WebCore.gyp/WebCore.gyp:
469         * WebCore.gypi:
470         * WebCore.pri:
471         * WebCore.xcodeproj/project.pbxproj:
472         * fileapi/DirectoryEntry.cpp: Removed.
473         * fileapi/DirectoryEntry.h: Removed.
474         * fileapi/DirectoryEntry.idl: Removed.
475         * fileapi/DirectoryEntrySync.cpp: Removed.
476         * fileapi/DirectoryEntrySync.h: Removed.
477         * fileapi/DirectoryEntrySync.idl: Removed.
478         * fileapi/DirectoryReader.cpp: Removed.
479         * fileapi/DirectoryReader.h: Removed.
480         * fileapi/DirectoryReader.idl: Removed.
481         * fileapi/DirectoryReaderBase.h: Removed.
482         * fileapi/DirectoryReaderSync.cpp: Removed.
483         * fileapi/DirectoryReaderSync.h: Removed.
484         * fileapi/DirectoryReaderSync.idl: Removed.
485
486 2012-03-12  Brady Eidson  <beidson@apple.com>
487
488         https://bugs.webkit.org/show_bug.cgi?id=80903
489         InspectorDOMStorageAgent creates a Storage object which is a DOMWindowProperty - Should use the StorageArea directly
490
491         Reviewed by Tim Hatcher.
492
493         No new tests. (No behavior change)
494
495         Changed to hold the StorageArea directly and added a Frame* accessor:
496         * inspector/InspectorDOMStorageResource.h:
497         (WebCore::InspectorDOMStorageResource::create):
498         (WebCore::InspectorDOMStorageResource::storageArea):
499         (WebCore::InspectorDOMStorageResource::frame):
500         (InspectorDOMStorageResource):
501
502         * inspector/InspectorDOMStorageResource.cpp:
503         (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
504
505         * inspector/InspectorDOMStorageAgent.cpp:
506         (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
507         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
508         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
509         (WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
510
511 2012-03-12  Brian Salomon  <bsalomon@google.com>
512
513         [Skia] Release CGImage used to apply color space conversion to SkBitmap
514         https://bugs.webkit.org/show_bug.cgi?id=80892
515
516         Reviewed by Adam Barth.
517
518         Regressions should be covered by any test that does image decode on the mac.
519
520         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
521         (WebCore::resolveColorSpace):
522
523 2012-03-12  Levi Weintraub  <leviw@chromium.org>
524
525         Update LayoutUnit usage in RenderMathML* classes
526         https://bugs.webkit.org/show_bug.cgi?id=77916
527
528         Reviewed by Eric Seidel.
529
530         The purpose of this patch is to ensure MathML rendering does not regress when
531         we switch to sub-pixel layout. A subsequent patch can likely improve MathML's
532         rendering when zoom is applied.
533
534         To accomplish this without changing the current heuristics for positioning,
535         we continue to use integers for sizes and locations, using pixel snapping
536         when communicating with other Rendering classes.
537
538         No new tests. No change in behavior.
539
540         * rendering/mathml/RenderMathMLBlock.cpp:
541         (WebCore::RenderMathMLBlock::paint): Cleaning up debug painting to be on
542         pixel boundaries instead of subpixel.
543         * rendering/mathml/RenderMathMLFraction.cpp:
544         (WebCore::RenderMathMLFraction::paint): Reverting to integers for determining
545         the vertical offset.
546         (WebCore::RenderMathMLFraction::baselinePosition):
547         * rendering/mathml/RenderMathMLRoot.cpp:
548         (WebCore::RenderMathMLRoot::paint): Using integers for height and width
549         and only accumulating pixel snapped values.
550         (WebCore::RenderMathMLRoot::layout): Setting padding with integers to
551         avoid inconsistent rounding based on the root's location.
552         * rendering/mathml/RenderMathMLRow.cpp:
553         (WebCore::RenderMathMLRow::layout):
554         * rendering/mathml/RenderMathMLSquareRoot.cpp:
555         (WebCore::RenderMathMLSquareRoot::paint): See RenderMathMLRoot.
556         (WebCore::RenderMathMLSquareRoot::layout): Ditto.
557         * rendering/mathml/RenderMathMLUnderOver.cpp:
558         (WebCore::getOffsetHeight):
559         (WebCore::RenderMathMLUnderOver::layout):
560
561 2012-03-12  Anders Carlsson  <andersca@apple.com>
562
563         Use smaller tiles for right and bottom edges
564         https://bugs.webkit.org/show_bug.cgi?id=80893
565         <rdar://problem/11032873>
566
567         Reviewed by Sam Weinig.
568
569         * platform/graphics/ca/mac/TileCache.mm:
570         (WebCore::TileCache::rectForTileIndex):
571         Intersect the rect with the tile cache bounds.
572
573         (WebCore::TileCache::revalidateTiles):
574         Resize already existing tiles if needed.
575
576         (WebCore::TileCache::createTileLayer):
577         This now takes a tile rect. Use setFrame instead of setting the bounds and position separately.
578
579 2012-03-12  Enrica Casucci  <enrica@apple.com>
580
581         WebKit2: remove NSPasteboard access for promised data from the WebProcess
582         https://bugs.webkit.org/show_bug.cgi?id=80073
583         
584         Reviewed by Alexey Proskuryakov.
585
586         * WebCore.exp.in: Added two exported methods.
587         * platform/mac/FileSystemMac.mm:
588         (WebCore::setMetaData): Last parameter in the call to wkSetMetadataURL
589         needs to be wrapped in String before casting to NSString.
590
591 2012-03-12  Alexey Proskuryakov  <ap@apple.com>
592
593         clang build fix
594
595         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::convertToLength): Reorder
596         boolean operators, so that a warning about "use of logical || with constant operand" doesn't
597         appear.
598
599 2012-03-12  Abhishek Arya  <inferno@chromium.org>
600
601         Crash in Text::splitText due to mutation events.
602         https://bugs.webkit.org/show_bug.cgi?id=80828
603
604         Reviewed by Ryosuke Niwa.
605
606         Test: fast/text/split-text-crash.xhtml
607
608         * dom/Range.cpp:
609         (WebCore::Range::insertNode): replace m_start.container() calls with ref protected node.
610
611 2012-03-12  Kenneth Russell  <kbr@google.com>
612
613         Null argument to texSubImage2D crashes
614         https://bugs.webkit.org/show_bug.cgi?id=80778
615
616         Reviewed by Dean Jackson.
617
618         Generate INVALID_VALUE OpenGL error upon receiving null argument.
619         Final behavior still being decided on public-webgl mailing list.
620
621         * html/canvas/WebGLRenderingContext.cpp:
622         (WebCore):
623         (WebCore::WebGLRenderingContext::texImage2D):
624         (WebCore::WebGLRenderingContext::texSubImage2D):
625         (WebCore::WebGLRenderingContext::validateTexFuncData):
626         * html/canvas/WebGLRenderingContext.h:
627
628 2012-03-12  Luke Macpherson   <macpherson@chromium.org>
629
630         Remove CSSStyleSelector's convertToLength method and use CSSPrimitiveValue's version directly.
631         https://bugs.webkit.org/show_bug.cgi?id=80484
632
633         Reviewed by Julien Chaffraix.
634
635         No new tests / code cleanup only.
636
637         * css/CSSPrimitiveValueMappings.h:
638         (WebCore::CSSPrimitiveValue::convertToLength):
639         * css/CSSStyleApplyProperty.cpp:
640         (WebCore::ApplyPropertyClip::convertToLength):
641         * css/CSSStyleSelector.cpp:
642         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
643
644 2012-03-12  Stephen White  <senorblanco@chromium.org>
645
646         [chromium] Restore canvas2D acceleration after context loss.
647         https://bugs.webkit.org/show_bug.cgi?id=80629
648
649         Reviewed by James Robinson.
650
651         Covered by existing canvas tests, and manual testing (killing the GPU
652         process).
653
654         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
655         (WebCore::Canvas2DLayerChromium::create):
656         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
657         (WebCore::Canvas2DLayerChromium::setNeedsDisplayRect):
658         (WebCore::Canvas2DLayerChromium::drawsContent):
659         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
660         * platform/graphics/chromium/Canvas2DLayerChromium.h:
661         (Canvas2DLayerChromium):
662         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
663         (WebCore::CCRenderSurface::applyFilters):
664         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
665         (SharedGraphicsContext3DImpl):
666         (WebCore::SharedGraphicsContext3DImpl::SharedGraphicsContext3DImpl):
667         (WebCore::SharedGraphicsContext3DImpl::get):
668         (WebCore):
669         (WebCore::SharedGraphicsContext3D::get):
670         * platform/graphics/gpu/SharedGraphicsContext3D.h:
671         (SharedGraphicsContext3D):
672         * platform/graphics/skia/ImageBufferSkia.cpp:
673         (WebCore::createAcceleratedCanvas):
674         * platform/graphics/skia/PlatformContextSkia.cpp:
675         (WebCore::PlatformContextSkia::PlatformContextSkia):
676         (WebCore):
677         * platform/graphics/skia/PlatformContextSkia.h:
678         (WebCore):
679         (WebCore::PlatformContextSkia::isAccelerated):
680         (WebCore::PlatformContextSkia::setAccelerated):
681         (PlatformContextSkia):
682
683 2012-03-12  George Staikos  <staikos@webkit.org>
684
685         It doesn't make sense to return const unsigned, and GCC warns about it.
686         Remove const.
687         https://bugs.webkit.org/show_bug.cgi?id=80790
688
689         Reviewed by Antonio Gomes.
690
691         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h:
692         (WebCore::ComplexTextController::length):
693         (WebCore::ComplexTextController::numCodePoints):
694         (WebCore::ComplexTextController::offsetX):
695
696 2012-03-12  Beth Dakin  <bdakin@apple.com>
697
698         https://bugs.webkit.org/show_bug.cgi?id=80888
699         Clear background for NSTextFieldCell is unreliable and not necessary
700         -and corresponding-
701         <rdar://problem/10663710>
702
703         Reviewed by Dan Bernstein.
704
705         With http://trac.webkit.org/changeset/104240 I thought it was necessary to 
706         make NSTextFieldCells draw with a clear background in order to allow styled 
707         text fields. That is not actually necessary; we just had a different bug 
708         where isControlStyled() was only checking for styled borders on text fields. 
709         Text fields can also be styled with backgrounds, so they need the full check.
710         * rendering/RenderThemeMac.mm:
711         (WebCore::RenderThemeMac::isControlStyled):
712         (WebCore::RenderThemeMac::textField):
713
714 2012-03-12  Scott Byer  <scottbyer@chromium.org>
715
716         Cleanup obsolete files.
717         https://bugs.webkit.org/show_bug.cgi?id=80737
718
719         Reviewed by James Robinson.
720
721         No new code.
722
723         * GNUmakefile.list.am:
724         * PlatformWinCE.cmake:
725         * Target.pri:
726         * WebCore.vcproj/WebCore.vcproj:
727         * platform/ScrollAnimatorWin.cpp: Removed.
728         * platform/ScrollAnimatorWin.h: Removed.
729
730 2012-03-12  Gregg Tavares  <gman@google.com>
731
732         Make texImage2D error for wrong size ArrayBufferView more helpful
733         https://bugs.webkit.org/show_bug.cgi?id=80868
734         
735         It took me about 30 minutes to figure out my texImage2D was failing
736         not because my ArrayBufferView was too small but because the default
737         alignment is 4. A better error message might help devs find this issue
738         faster.
739
740         Reviewed by Kenneth Russell.
741
742         No new tests as no new functionality.
743
744         * html/canvas/WebGLRenderingContext.cpp:
745         (WebCore):
746         (WebCore::WebGLRenderingContext::validateTexFuncData):
747
748 2012-03-12  Tim Horton  <timothy_horton@apple.com>
749
750         Infinite repaint loop with SVGImageCache and deferred repaint timers
751         https://bugs.webkit.org/show_bug.cgi?id=78315
752         <rdar://problem/10651634>
753
754         Reviewed by Nikolas Zimmermann.
755
756         Only defer image redraw on a timer if we're in layout. This breaks
757         the repaint loop while still preventing us from drawing inside layout.
758
759         Completely disable repaint during relayout inside SVGImage::drawSVGToImageBuffer,
760         preventing deferred repaint timers from being started during that process.
761
762         No new tests, as the problem only occurs in a nonstandard configuration.
763
764         * page/FrameView.cpp:
765         (WebCore::FrameView::FrameView):
766         (WebCore::FrameView::reset):
767         (WebCore::FrameView::repaintContentRectangle):
768         (WebCore::FrameView::endDeferredRepaints):
769         (WebCore::FrameView::startDeferredRepaintTimer):
770         (WebCore):
771         (WebCore::FrameView::doDeferredRepaints):
772         (WebCore::FrameView::deferredRepaintTimerFired):
773         (WebCore::FrameView::beginDisableRepaints):
774         (WebCore::FrameView::endDisableRepaints):
775         * page/FrameView.h:
776         (FrameView):
777         (WebCore::FrameView::repaintsDisabled):
778         * rendering/RenderView.cpp:
779         (WebCore::RenderView::shouldRepaint):
780         * svg/graphics/SVGImage.cpp:
781         (WebCore::SVGImage::drawSVGToImageBuffer):
782         (WebCore::SVGImage::draw):
783         (WebCore::SVGImage::frameView):
784         (WebCore):
785         * svg/graphics/SVGImage.h:
786         (WebCore):
787         * svg/graphics/SVGImageCache.cpp:
788         (WebCore::SVGImageCache::imageContentChanged):
789         (WebCore::SVGImageCache::redraw):
790         (WebCore::SVGImageCache::redrawTimerFired):
791         (WebCore):
792         * svg/graphics/SVGImageCache.h:
793         (SVGImageCache):
794
795 2012-03-12  Adam Klein  <adamk@chromium.org>
796
797         [MutationObservers] Enforce a consistent order of MutationRecord delivery
798         https://bugs.webkit.org/show_bug.cgi?id=80549
799
800         Reviewed by Ojan Vafai.
801
802         Mutations should be delivered in order of creation.
803
804         Tests: fast/mutation/create-during-delivery.html
805                fast/mutation/delivery-order.html
806                fast/mutation/mutate-during-delivery.html
807
808         * dom/WebKitMutationObserver.cpp:
809         (WebCore):
810         (WebCore::WebKitMutationObserver::ObserverLessThan::operator()): Functor for use with std::sort.
811         (WebCore::WebKitMutationObserver::create):
812         (WebCore::WebKitMutationObserver::WebKitMutationObserver):
813         (WebCore::WebKitMutationObserver::deliverAllMutations): Move observers into a sorted vector before delivery.
814         * dom/WebKitMutationObserver.h: Add a "priority" member which monotonically increases with each construction.
815
816 2012-03-12  Nat Duca  <nduca@chromium.org>
817
818         [Chromium] Force compositeAndReadback through regular scheduling flow
819         https://bugs.webkit.org/show_bug.cgi?id=77049
820
821         Reviewed by James Robinson.
822
823         * platform/graphics/chromium/cc/CCFrameRateController.cpp:
824         (WebCore::CCFrameRateController::onTimerTick):
825         * platform/graphics/chromium/cc/CCFrameRateController.h:
826         (CCFrameRateControllerClient):
827         * platform/graphics/chromium/cc/CCScheduler.cpp:
828         (WebCore::CCScheduler::setNeedsForcedCommit):
829         (WebCore):
830         (WebCore::CCScheduler::vsyncTick):
831         * platform/graphics/chromium/cc/CCScheduler.h:
832         (CCScheduler):
833         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
834         (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
835         (WebCore::CCSchedulerStateMachine::nextAction):
836         (WebCore::CCSchedulerStateMachine::updateState):
837         (WebCore::CCSchedulerStateMachine::setNeedsForcedCommit):
838         (WebCore):
839         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
840         (CCSchedulerStateMachine):
841         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
842         (WebCore::CCThreadProxy::CCThreadProxy):
843         (WebCore::CCThreadProxy::compositeAndReadback):
844         (WebCore::CCThreadProxy::requestReadbackOnImplThread):
845         (WebCore::CCThreadProxy::forceBeginFrameOnImplThread):
846         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
847         (WebCore::CCThreadProxy::beginFrame):
848         * platform/graphics/chromium/cc/CCThreadProxy.h:
849         (CCThreadProxy):
850         (WebCore::CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState):
851         (BeginFrameAndCommitState):
852
853 2012-03-12  Joshua Bell  <jsbell@chromium.org>
854
855         IndexedDB: Handle LevelDB database corruption
856         https://bugs.webkit.org/show_bug.cgi?id=79413
857
858         Add LevelDBDatabase::destroy() method so that clients can retry if open() fails.
859
860         Reviewed by Tony Chang.
861
862         Test: webkit_unit_tests --gtest_filter='LevelDBDatabaseTest.CorruptionTest'
863
864         * Modules/indexeddb/IDBLevelDBBackingStore.cpp: Implement open/destroy/open strategy.
865         (WebCore::IDBLevelDBBackingStore::open):
866         * platform/leveldb/LevelDBDatabase.cpp:
867         (WebCore::LevelDBDatabase::destroy):
868         (WebCore):
869         * platform/leveldb/LevelDBDatabase.h:
870         (LevelDBDatabase):
871
872 2012-03-11  Shawn Singh  <shawnsingh@chromium.org>
873
874         Fix regression on fast/table/table-row-compositing-repaint-crash.html
875         https://bugs.webkit.org/show_bug.cgi?id=80804
876
877         Reviewed by Simon Fraser.
878
879         Covered by existing tests.
880
881         http://trac.webkit.org/changeset/110401/ accidentally caused
882         fast/table/table-row-compositing-repaint-crash.html to fail.
883
884         * rendering/RenderLayerCompositor.cpp:
885         (WebCore::RenderLayerCompositor::updateBacking):
886
887 2012-03-12  Mike Lawther  <mikelawther@chromium.org>
888
889         CSS3 calc: enable mixed percent/absolute for font
890         https://bugs.webkit.org/show_bug.cgi?id=80813
891
892         Reviewed by Ojan Vafai.
893
894         Add support for mixed percent/absolute expressions to the font handling class.
895
896         * css/CSSStyleApplyProperty.cpp:
897         (WebCore::ApplyPropertyFontSize::applyValue):
898
899 2012-03-12  Andreas Kling  <awesomekling@apple.com>
900
901         Restore Attr::style() functionality.
902         <http://webkit.org/b/80678>
903         <rdar://problem/10933904>
904
905         Reviewed by Antti Koivisto.
906
907         The neutering of Attr::style() in r106740 broke some internal clients of the Obj-C API,
908         so this was definitely premature.
909
910         Since we no longer have a per-Attribute style object, synthesize one in style() and
911         hang it off of the Attr. This grows Attr by one pointer, but it's a low-volume object
912         so it shouldn't matter much.
913
914         We recreate the StylePropertySet object on every call to style(), to avoid complicating
915         things with custom invalidation code.
916
917         * dom/Attr.cpp:
918         (WebCore::Attr::style):
919         * dom/Attr.h:
920         * dom/StyledElement.h:
921         (WebCore::StyledElement::collectStyleForAttribute):
922
923 2012-03-12  Ryosuke Niwa  <rniwa@webkit.org>
924
925         REGRESSION(r109285): Crash in WebCore::Document::nodeChildrenWillBeRemoved
926         https://bugs.webkit.org/show_bug.cgi?id=80578
927
928         Reviewed by Andreas Kling.
929
930         Test: svg/css/style-change-crash.html
931
932         * dom/Element.cpp:
933         (WebCore::Element::setAttribute):
934         (WebCore::Element::setAttributeInternal):
935         * dom/Element.h:
936         (Element):
937         * dom/ElementAttributeData.cpp:
938         (WebCore::ElementAttributeData::addAttribute):
939         (WebCore::ElementAttributeData::removeAttribute):
940         * dom/ElementAttributeData.h:
941         (ElementAttributeData):
942         * dom/StyledElement.cpp:
943         (WebCore::StyledElement::updateStyleAttribute):
944
945 2012-03-12  Sadrul Habib Chowdhury  <sadrul@chromium.org>
946
947         Touch event handler count is not updated when adding handlers to the window.
948         https://bugs.webkit.org/show_bug.cgi?id=80756
949
950         Touch event handlers added to the window needs to be included when counting the number of touch event
951         handlers. This makes touch event handler counting identical to wheel event handler counting.
952
953         Reviewed by Anders Carlsson.
954
955         Test: fast/events/touch/touch-handler-count.html
956
957         * dom/EventNames.h:
958         (EventNames):
959         (WebCore::EventNames::isTouchEventType):
960         * dom/Node.cpp:
961         (WebCore):
962         (WebCore::tryAddEventListener):
963         (WebCore::tryRemoveEventListener):
964         * page/DOMWindow.cpp:
965         (WebCore::DOMWindow::addEventListener):
966         (WebCore::DOMWindow::removeEventListener):
967         * testing/Internals.cpp:
968         (WebCore::Internals::touchEventHandlerCount):
969         (WebCore):
970         * testing/Internals.h:
971         (Internals):
972         * testing/Internals.idl:
973
974 2012-03-12  Pavel Podivilov  <podivilov@chromium.org>
975
976         Web Inspector: extract ResourceScriptMapping from MainScriptMapping.
977         https://bugs.webkit.org/show_bug.cgi?id=80834
978
979         Reviewed by Vsevolod Vlasov.
980
981         * inspector/front-end/ScriptMapping.js:
982         (WebInspector.ResourceScriptMapping):
983         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeListChanged):
984         (WebInspector.ResourceScriptMapping.prototype.reset):
985         (WebInspector.MainScriptMapping):
986         (WebInspector.MainScriptMapping.prototype.rawLocationToUILocation):
987         (WebInspector.MainScriptMapping.prototype.createLiveLocation):
988         (WebInspector.MainScriptMapping.prototype._registerLiveLocation):
989         (WebInspector.MainScriptMapping.prototype._unregisterLiveLocation):
990         (WebInspector.MainScriptMapping.prototype._updateLiveLocations):
991         (WebInspector.MainScriptMapping.prototype.uiSourceCodeList):
992         (WebInspector.MainScriptMapping.prototype.addScript):
993         (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged):
994         (WebInspector.MainScriptMapping.prototype.setFormatSource):
995         (WebInspector.MainScriptMapping.prototype.forceUpdateSourceMapping):
996         (WebInspector.MainScriptMapping.prototype.reset):
997
998 2012-03-12  Pavel Feldman  <pfeldman@chromium.org>
999
1000         Web Inspector: recognize Float*Array and Int*Array as arrays.
1001         https://bugs.webkit.org/show_bug.cgi?id=80850
1002
1003         Reviewed by Vsevolod Vlasov.
1004
1005         Test: inspector/console/console-external-array.html
1006
1007         * bindings/js/JSInjectedScriptHostCustom.cpp:
1008         (WebCore::JSInjectedScriptHost::type):
1009         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1010         (WebCore::V8InjectedScriptHost::typeCallback):
1011
1012 2012-03-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1013
1014         [TexMapGL] Pixel-align the transform of textures that fit pixel-for-pixel on the frame buffer.
1015         https://bugs.webkit.org/show_bug.cgi?id=80848
1016
1017         Reviewed by Noam Rosenthal.
1018
1019         When rendering a transformed texture on the screen with a fractional
1020         coordinate with linear filtering, the resulting pixel will be blended from
1021         the texels around this fractional position according to their cover ratio.
1022         This produces a slight blur of pixels which give no benefit when rendering
1023         a texture that isn't scaled.
1024
1025         This patch offsets the transform by rounding the translation part of the
1026         layer's transform to align the result to integer coordinates.
1027         Applying the adjustment on the layer transform makes sure that all the tiles
1028         get the same adjustment.
1029
1030         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1031         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1032         * platform/graphics/texmap/TextureMapperGL.cpp:
1033         (WebCore::TextureMapperGL::drawTexture):
1034         * platform/graphics/texmap/TextureMapperGL.h:
1035         (WebCore::BitmapTextureGL::textureSize):
1036
1037 2012-03-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1038
1039         [TexMapGL] Use textures sized exactly to their contents.
1040         https://bugs.webkit.org/show_bug.cgi?id=80845
1041
1042         Reviewed by Noam Rosenthal.
1043
1044         This fixes a regression introduced in r108273 as well as the bug it fixed.
1045         The regressing behavior was that textures were rendered shrunk by 1 pixel
1046         and thus would appear blurry on the screen.
1047         The original problem was that garbage contents would appear on filtered
1048         textures since we would reuse textures of different sizes by giving them
1049         a slightly bigger size.
1050
1051         This patch will reuse the texture only if the size matches exactly to allow
1052         edge clamping to work properly when redering with linear filtering.
1053         Reusing textures would only saves us the allocation of graphic memory
1054         anyway, which is negligeable compared to texture upload.
1055
1056         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1057         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1058         * platform/graphics/texmap/TextureMapperGL.cpp:
1059         (WebCore::TextureMapperGL::drawTexture):
1060         (WebCore::BitmapTextureGL::didReset):
1061         * platform/graphics/texmap/TextureMapperGL.h:
1062         (BitmapTextureGL):
1063         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1064         (WebCore::TextureMapperShaderProgramOpacityAndMask::TextureMapperShaderProgramOpacityAndMask):
1065         (WebCore::TextureMapperShaderProgramOpacityAndMask::prepare):
1066         * platform/graphics/texmap/TextureMapperShaderManager.h:
1067         (TextureMapperShaderProgramOpacityAndMask):
1068
1069 2012-03-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1070
1071         [TexMap] Remove BitmapTexture::destroy.
1072         https://bugs.webkit.org/show_bug.cgi?id=80844
1073
1074         Reviewed by Noam Rosenthal.
1075
1076         Use the destructor directly instead.
1077
1078         * platform/graphics/texmap/TextureMapper.h:
1079         * platform/graphics/texmap/TextureMapperGL.cpp:
1080         (WebCore::BitmapTextureGL::~BitmapTextureGL):
1081         * platform/graphics/texmap/TextureMapperGL.h:
1082         (BitmapTextureGL):
1083         * platform/graphics/texmap/TextureMapperImageBuffer.h:
1084         (WebCore::BitmapTextureImageBuffer::~BitmapTextureImageBuffer):
1085
1086 2012-03-12  Pavel Podivilov  <podivilov@chromium.org>
1087
1088         Web Inspector: DebuggerModel.Location should have scriptId property.
1089         https://bugs.webkit.org/show_bug.cgi?id=80830
1090
1091         Reviewed by Vsevolod Vlasov.
1092
1093         * inspector/front-end/CompilerSourceMapping.js:
1094         (WebInspector.ClosureCompilerSourceMapping.prototype.sourceLocationToCompiledLocation):
1095         * inspector/front-end/ConsoleMessage.js:
1096         (WebInspector.ConsoleMessageImpl.prototype.location):
1097         * inspector/front-end/DebuggerModel.js:
1098         (WebInspector.DebuggerModel.Location):
1099         (WebInspector.DebuggerModel.prototype._failedToParseScriptSource):
1100         (WebInspector.DebuggerModel.prototype.createRawLocation):
1101         (WebInspector.DebuggerModel.prototype.createRawLocationByURL):
1102         * inspector/front-end/DebuggerPresentationModel.js:
1103         (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded):
1104         (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessageToScript):
1105         (WebInspector.DebuggerPresentationModel.prototype._addPendingConsoleMessagesToScript):
1106         (WebInspector.DebuggerPresentationModelResourceBinding.prototype._uiSourceCodeForResource):
1107         (WebInspector.DebuggerPresentationModel.Linkifier.prototype.linkifyLocation):
1108         * inspector/front-end/RawSourceCode.js:
1109         (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation):
1110         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation):
1111         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation):
1112         (WebInspector.RawSourceCode.CompilerSourceMapping.prototype.uiLocationToRawLocation):
1113         * inspector/front-end/ScriptFormatter.js:
1114         (WebInspector.ScriptFormatter.locationToPosition):
1115         (WebInspector.ScriptFormatter.positionToLocation):
1116         (WebInspector.FormattedSourceMapping.prototype.originalToFormatted):
1117         (WebInspector.FormattedSourceMapping.prototype.formattedToOriginal):
1118
1119 2012-03-12  Dana Jansens  <danakj@chromium.org>
1120
1121         [chromium] A couple early-outs for occlusion tracker
1122         https://bugs.webkit.org/show_bug.cgi?id=80742
1123
1124         Reviewed by Adrienne Walker.
1125
1126         Covered by existing tests.
1127
1128         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1129         (WebCore::::occluded):
1130         (WebCore::::unoccludedContentRect):
1131
1132 2012-03-12  Zeno Albisser  <zeno@webkit.org>
1133
1134         [Qt][Mac] Build fails after adding WebCoreCFAutorelease(CFTypeRef) (r110360).
1135         https://bugs.webkit.org/show_bug.cgi?id=80840
1136
1137         CoreFoundation/CFBase.h needs to be included to define the type CFTypeRef.
1138
1139         Reviewed by Tor Arne Vestbø.
1140
1141         * platform/mac/WebCoreObjCExtras.h:
1142
1143 2012-03-12  George Staikos  <staikos@webkit.org>
1144
1145         Remove unused global static variable for BlackBerry.
1146         https://bugs.webkit.org/show_bug.cgi?id=80790
1147
1148         Reviewed by Alexey Proskuryakov.
1149
1150         * platform/graphics/gpu/DrawingBuffer.cpp:
1151         (WebCore):
1152
1153 2012-03-12  George Staikos  <staikos@webkit.org>
1154
1155         Correct usage of NDEBUG to fix warnings on BlackBerry.
1156         https://bugs.webkit.org/show_bug.cgi?id=80790
1157
1158         Reviewed by Alexey Proskuryakov.
1159
1160         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
1161         (WebCore::CookieDatabaseBackingStore::sendChangesToDatabase):
1162         * platform/blackberry/CookieManager.cpp:
1163         (WebCore::CookieManager::initiateCookieLimitCleanUp):
1164
1165 2012-03-12  Ilya Tikhonovsky  <loislo@chromium.org>
1166
1167         Re-apply the patch after v8 roll to r11000.
1168
1169         Web Inspector: move heap snapshot nodes data to external array.
1170         https://bugs.webkit.org/show_bug.cgi?id=79911
1171
1172         Reviewed by Vsevolod Vlasov.
1173
1174         Tests:
1175         heap-shapshot.html
1176         heap-shapshot-loader.html
1177
1178         * inspector/front-end/HeapSnapshot.js:
1179         (WebInspector.Int32Array):
1180         (WebInspector.Int32Array.prototype.get array):
1181         (WebInspector.HeapSnapshotLoader.prototype._parseNodes):
1182         (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
1183         (WebInspector.HeapSnapshot):
1184         (WebInspector.HeapSnapshot.prototype._init):
1185
1186 2012-03-12  Simon Hausmann  <simon.hausmann@nokia.com>
1187
1188         [Qt] Fix build with newer Qt 5.
1189
1190         Reviewed by Tor Arne Vestbø.
1191
1192         * platform/qt/RenderThemeQt.cpp:
1193         (WebCore::RenderThemeQt::fileListNameForWidth): Use DefaultCodec instead of the
1194         deprecated CodecForTR.
1195
1196 2012-03-12  Hans Wennborg  <hans@chromium.org>
1197
1198         Speech JavaScript API: SpeechRecognitionEvent
1199         https://bugs.webkit.org/show_bug.cgi?id=80513
1200
1201         Reviewed by Adam Barth.
1202
1203         Implement SpeechRecognitionEvent.
1204         (Spec: http://speech-javascript-api-spec.googlecode.com/git/speechapi.html)
1205
1206         Test: fast/events/constructors/speech-recognition-event-constructor.html
1207
1208         * Modules/speech/DOMWindowSpeech.idl:
1209         * Modules/speech/SpeechRecognitionEvent.cpp: Added.
1210         (WebCore):
1211         (WebCore::SpeechRecognitionEventInit::SpeechRecognitionEventInit):
1212         (WebCore::SpeechRecognitionEvent::create):
1213         (WebCore::SpeechRecognitionEvent::createResult):
1214         (WebCore::SpeechRecognitionEvent::createNoMatch):
1215         (WebCore::SpeechRecognitionEvent::createResultDeleted):
1216         (WebCore::SpeechRecognitionEvent::createError):
1217         (WebCore::SpeechRecognitionEvent::interfaceName):
1218         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
1219         * Modules/speech/SpeechRecognitionEvent.h: Added.
1220         (WebCore):
1221         (SpeechRecognitionEventInit):
1222         (SpeechRecognitionEvent):
1223         (WebCore::SpeechRecognitionEvent::result):
1224         (WebCore::SpeechRecognitionEvent::error):
1225         (WebCore::SpeechRecognitionEvent::resultIndex):
1226         (WebCore::SpeechRecognitionEvent::resultHistory):
1227         * Modules/speech/SpeechRecognitionEvent.idl:
1228         * WebCore.gypi:
1229         * bindings/generic/RuntimeEnabledFeatures.h:
1230         (WebCore::RuntimeEnabledFeatures::webkitSpeechRecognitionEventEnabled):
1231         * bindings/v8/OptionsObject.cpp:
1232         (WebCore::OptionsObject::get):
1233         (WebCore):
1234         * bindings/v8/OptionsObject.h:
1235         (WebCore):
1236         (OptionsObject):
1237         * dom/EventNames.h:
1238         (WebCore):
1239         * dom/EventNames.in:
1240
1241 2012-03-12  Kent Tamura  <tkent@chromium.org>
1242
1243         Use ICU C API instead of C++ API in LocalizedNumberICU
1244         https://bugs.webkit.org/show_bug.cgi?id=80815
1245         https://bugs.gentoo.org/show_bug.cgi?id=407401
1246
1247         Reviewed by Hajime Morita.
1248
1249         ICU 4.8 doesn't have kNumberStyle. We had better to use ICU C API in
1250         general to avoid such issues.
1251
1252         This patch should not make any behavior change.
1253
1254         * platform/text/LocalizedNumberICU.cpp:
1255         (WebCore::ICULocale::ICULocale):
1256         Change the argument type: icu::Locale -> const char*
1257         (WebCore::ICULocale::~ICULocale): Delete m_numberFormat with unum_close().
1258         (WebCore::ICULocale::create): Do not create icu::Locale.
1259         (WebCore::ICULocale::createForCurrentLocale): ditto.
1260         (WebCore::ICULocale::setDecimalSymbol):
1261         Use unum_getSymbol() instead of DecimalFormatSymbols::getSymbol().
1262         (WebCore::ICULocale::setDecimalTextAttribute):
1263         Added. A utility function to store prefixes and suffixes.
1264         (WebCore::ICULocale::initializeDecimalFormat):
1265         - unum_open(), instead of NumberFormat::createInstance().
1266         - Use C API symbols.
1267         - Cache positive/negative prefixes/suffixes.
1268         (WebCore::ICULocale::convertToLocalizedNumber): Use cached prefixes and suffixes.
1269         (WebCore::matches): Stop using template because we don't use UString anymore.
1270         (WebCore::ICULocale::detectSignAndGetDigitRange):
1271         - Use cached prefixes and suffixes.
1272         - Use String::startsWith() and endsWith().
1273         (WebCore::ICULocale::convertFromLocalizedNumber):
1274         * platform/text/LocalizedNumberICU.h:
1275         (ICULocale):
1276
1277 2012-03-11  Pavel Podivilov  <podivilov@chromium.org>
1278
1279         Web Inspector: decouple LiveLocation from RawSourceCode.
1280         https://bugs.webkit.org/show_bug.cgi?id=80785
1281
1282         Reviewed by Vsevolod Vlasov.
1283
1284         * inspector/front-end/DebuggerPresentationModel.js:
1285         (WebInspector.DebuggerPresentationModel.prototype.createPlacard):
1286         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
1287         (WebInspector.PresentationCallFrame):
1288         (WebInspector.PresentationCallFrame.prototype.uiLocation):
1289         (WebInspector.DebuggerPresentationModel.CallFramePlacard):
1290         * inspector/front-end/RawSourceCode.js:
1291         * inspector/front-end/ScriptMapping.js:
1292         (WebInspector.MainScriptMapping):
1293         (WebInspector.MainScriptMapping.prototype.createLiveLocation):
1294         (WebInspector.MainScriptMapping.prototype._registerLiveLocation):
1295         (WebInspector.MainScriptMapping.prototype._unregisterLiveLocation):
1296         (WebInspector.MainScriptMapping.prototype._updateLiveLocations):
1297         (WebInspector.MainScriptMapping.prototype._uiSourceCodeListChanged):
1298         (WebInspector.MainScriptMapping.prototype.reset):
1299         (WebInspector.LiveLocation):
1300         (WebInspector.LiveLocation.prototype.init):
1301         (WebInspector.LiveLocation.prototype.dispose):
1302         (WebInspector.LiveLocation.prototype._update):
1303
1304 2012-03-11  Victor Carbune  <vcarbune@adobe.com>
1305
1306         The main code structure for placing future text track cue rendering
1307         code and main outer rendering steps.
1308         https://bugs.webkit.org/show_bug.cgi?id=79746
1309
1310         Reviewed by Eric Carlson.
1311
1312         No new tests. Only refactoring, but some chromium tests require rebaselining
1313         and have been marked accordingly.
1314
1315         * css/mediaControls.css:
1316         (::-webkit-media-controls): Changed the default display to -webkit-box, as
1317         captions need to always be rendered on top of the controls, if they are visible.
1318         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1319         Default position attribute is now relative, handled by the parent -webkit-box
1320         (video::-webkit-media-text-track-container): The position of the container is
1321         now relative, handled by -webkit-box.
1322         (video::-webkit-media-text-track-display): Adjusted text color to match
1323         the color required in the WebVTT spec (section 3.5.1 'color' property)
1324         * css/mediaControlsChromium.css:
1325         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1326         Default position attribute is now relative, handled by the parent -webkit-box
1327
1328         * html/shadow/MediaControlElements.cpp:
1329         (WebCore::MediaControlPanelElement::MediaControlPanelElement): Added a timer
1330         for the webkit fade out transition event. This timer is required for setting
1331         the display property to 'none', when the fade out transition is over. Otherwise,
1332         captions would not be displayed at the bottom of the video.
1333         (WebCore::MediaControlPanelElement::startTimer): Added.
1334         (WebCore):
1335         (WebCore::MediaControlPanelElement::stopTimer): Added.
1336         (WebCore::MediaControlPanelElement::transitionTimerFired): Added. If the current
1337         state of the controls is transparent, the display property is set to 'none'.
1338         (WebCore::MediaControlPanelElement::makeOpaque): The inline display:'none' property
1339         is removed before the fade in transition.
1340         (WebCore::MediaControlPanelElement::makeTransparent): Added the timer start.
1341         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
1342         Removed m_bottom as it is not needed anymore.
1343         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Added. Main
1344         function for the rendering rules.
1345         (WebCore::MediaControlTextTrackContainerElement::updateSizes): The bottom position
1346         needs not to be set anymore.
1347         * html/shadow/MediaControlElements.h:
1348         (MediaControlPanelElement): Added timer internals.
1349         (MediaControlTextTrackContainerElement): Added updateDisplay() and removed unused
1350         variables.
1351
1352         (WebCore):
1353         * html/shadow/MediaControlRootElement.cpp: Removed m_textTrackDisplay
1354         and duplicated code with MediaControlRootElementChromium (only minimum
1355         function calls to the main text track container)
1356         (WebCore::MediaControlRootElement::MediaControlRootElement):
1357         (WebCore::MediaControlRootElement::setMediaController):
1358         (WebCore::MediaControlRootElement::createTextTrackDisplay):
1359         (WebCore::MediaControlRootElement::updateTextTrackDisplay):
1360
1361         * html/shadow/MediaControlRootElementChromium.cpp: Removed m_textTrackDisplay
1362         and duplicate code with MediaControlRootElement (only minimum function calls
1363         to the main text track container remained)
1364         (WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
1365         (WebCore::MediaControlRootElementChromium::setMediaController):
1366         (WebCore::MediaControlRootElementChromium::createTextTrackDisplay):
1367         (WebCore::MediaControlRootElementChromium::updateTextTrackDisplay):
1368
1369         (WebCore):
1370         * html/track/TextTrackCue.cpp: Enhanced structure for supporting more complex
1371         rendering required by the WebVTT spec.
1372         (WebCore::TextTrackCue::TextTrackCue):
1373         (WebCore::TextTrackCue::cueDidChange): Mark the display tree as obsolete, so that
1374         it needs to be re-computed.
1375         (WebCore::TextTrackCue::setIsActive): The display tree needs to be removed as
1376         soon as the cue becomes inactive. Adjusted this method to support the functionality.
1377         (WebCore):
1378         (WebCore::TextTrackCue::determineDisplayParameters): Added. This method will hold
1379         main positioning parameter computations for a TextTrackCue
1380         (WebCore):
1381         (WebCore::TextTrackCue::getDisplayTree): Added. This method returns the root node
1382         of the CSS boxes that need to be displayed on top of the video, for the current
1383         instance.
1384         * html/track/TextTrackCue.h:
1385         (WebCore):
1386         (TextTrackCue):
1387
1388 2012-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1389
1390         Unreviewed, rolling out r110359.
1391         http://trac.webkit.org/changeset/110359
1392         https://bugs.webkit.org/show_bug.cgi?id=80799
1393
1394         SelectPopupMenuTest.ClickItem failure (Requested by ukai on
1395         #webkit).
1396
1397         * platform/chromium/PopupListBox.cpp:
1398         (WebCore::PopupListBox::paint):
1399         (WebCore::PopupListBox::paintRow):
1400         (WebCore::PopupListBox::getRowHeight):
1401         * platform/chromium/PopupListBox.h:
1402         (PopupContainerSettings):
1403         * platform/chromium/PopupMenuChromium.cpp:
1404         (WebCore):
1405         (WebCore::PopupMenuChromium::show):
1406         * platform/chromium/PopupMenuChromium.h:
1407         (PopupMenuChromium):
1408         * rendering/RenderMenuList.cpp:
1409         (WebCore::RenderMenuList::showPopup):
1410
1411 2012-03-11  Timothy Hatcher  <timothy@apple.com>
1412
1413         Fix a crash opening the Web Inspector in WebKit1 clients.
1414
1415         The call to InspectorFrontendClientLocal::setAttachedWindow is preformed really early in the process,
1416         causing it to crash almost every time. It should use evaluateOnLoad instead of evaluateAsBoolean.
1417
1418         <rdar://problem/10951109> Crash when bringing up Web Inspector in WebKit1 client
1419         https://bugs.webkit.org/show_bug.cgi?id=80796
1420
1421         Reviewed by Brian Weinstein.
1422
1423         * inspector/InspectorFrontendClientLocal.cpp:
1424         (WebCore::InspectorFrontendClientLocal::setAttachedWindow): Use evaluateOnLoad instead of evaluateAsBoolean.
1425
1426 2012-03-11  Shawn Singh  <shawnsingh@chromium.org>
1427
1428         REGRESSION (r93614): scrolling div does not repaint
1429         https://bugs.webkit.org/show_bug.cgi?id=80641
1430
1431         Reviewed by Simon Fraser.
1432
1433         Test: compositing/repaint/newly-composited-repaint-rect.html
1434
1435         * rendering/RenderLayerCompositor.cpp:
1436         (WebCore::RenderLayerCompositor::updateBacking): When a layer
1437         becomes newly composited and creates its backing, the repaintRect
1438         may become invalid. This patch recomputes repaintRects in this
1439         case.
1440
1441 2012-03-11  George Staikos  <staikos@webkit.org>
1442
1443         Enable JPEG encoding for BlackBerry.
1444         https://bugs.webkit.org/show_bug.cgi?id=80792
1445
1446         Reviewed by Antonio Gomes.
1447
1448         * PlatformBlackBerry.cmake:
1449
1450 2012-03-11  Pavel Feldman  <pfeldman@chromium.org>
1451
1452         Web Inspector: console.log attempts to substitute any "%" character in the message.
1453         https://bugs.webkit.org/show_bug.cgi?id=80504
1454
1455         Reviewed by Vsevolod Vlasov.
1456
1457         Test: inspector/console/console-string-format.html
1458
1459         * inspector/front-end/AuditRules.js:
1460         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
1461         * inspector/front-end/ProfileDataGridTree.js:
1462         * inspector/front-end/ProfilesPanel.js:
1463         (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
1464         * inspector/front-end/utilities.js:
1465
1466 2012-03-11  Andrey Kosyakov  <caseq@chromium.org>
1467
1468         Web Inspector: use monotonically increasing time in timeline agent
1469         https://bugs.webkit.org/show_bug.cgi?id=80786
1470
1471         Reviewed by Pavel Feldman.
1472
1473         * bindings/v8/ScriptGCEvent.cpp:
1474         (WebCore::ScriptGCEvent::gcPrologueCallback):
1475         (WebCore::ScriptGCEvent::gcEpilogueCallback):
1476         * inspector/InspectorTimelineAgent.cpp:
1477         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
1478         (WebCore::InspectorTimelineAgent::willSendResourceRequest):
1479         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
1480         (WebCore::InspectorTimelineAgent::appendRecord):
1481         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
1482         (WebCore::InspectorTimelineAgent::timestamp):
1483         (WebCore):
1484         * inspector/InspectorTimelineAgent.h:
1485         (InspectorTimelineAgent):
1486         (WebCore::InspectorTimelineAgent::timestamp):
1487
1488 2012-03-11  Vsevolod Vlasov  <vsevik@chromium.org>
1489
1490         Web Inspector: Network panel does not show responses for application/json data
1491         https://bugs.webkit.org/show_bug.cgi?id=80684
1492
1493         Reviewed by Pavel Feldman.
1494
1495         Test: http/tests/inspector/network/async-xhr-json-mime-type.html
1496
1497         * inspector/InspectorPageAgent.cpp:
1498         (WebCore::createXHRTextDecoder):
1499         (WebCore::InspectorPageAgent::cachedResourceContent):
1500         * inspector/InspectorPageAgent.h:
1501         * inspector/NetworkResourcesData.cpp:
1502         (WebCore::createOtherResourceTextDecoder):
1503         (WebCore):
1504         (WebCore::NetworkResourcesData::responseReceived):
1505
1506 2012-03-11  Vsevolod Vlasov  <vsevik@chromium.org>
1507
1508         Web Inspector: CSS content is not shown when stylesheet is loaded with invalid mime type in quirks mode.
1509         https://bugs.webkit.org/show_bug.cgi?id=80528
1510
1511         Reviewed by Pavel Feldman.
1512
1513         Test: http/tests/inspector/resource-tree/resource-tree-invalid-mime-type-css-content.html
1514
1515         * inspector/InspectorPageAgent.cpp:
1516         (WebCore::InspectorPageAgent::cachedResourceContent):
1517
1518 2012-03-11  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1519
1520         [Qt] [WK2] Support threaded renderer in WK2
1521         https://bugs.webkit.org/show_bug.cgi?id=76661
1522
1523         Reviewed by Noam Rosenthal.
1524
1525         Add TransformationMatrix conversions from/to Qt QMatrix4x4. Used by Qt WebKit2
1526         rendering and tested by Qt WebKit2 API tests.
1527
1528         * platform/graphics/qt/TransformationMatrixQt.cpp:
1529         (WebCore::TransformationMatrix::operator QMatrix4x4):
1530         (WebCore):
1531         (WebCore::TransformationMatrix::TransformationMatrix):
1532         * platform/graphics/transforms/TransformationMatrix.h:
1533         (TransformationMatrix):
1534
1535 2012-03-09  Jon Lee  <jonlee@apple.com>
1536
1537         Rename NotificationPresenter to NotificationClient
1538         https://bugs.webkit.org/show_bug.cgi?id=80488
1539         <rdar://problem/10965558>
1540
1541         Reviewed by Kentaro Hara.
1542
1543         * notifications/NotificationCenter.h: Renamed from notifications/NotificationPresenter.h.
1544
1545         Refactor to use renamed WebCore::NotificationClient.
1546         * GNUmakefile.list.am:
1547         * Target.pri:
1548         * WebCore.exp.in:
1549         * WebCore.gypi:
1550         * WebCore.vcproj/WebCore.vcproj:
1551         * WebCore.xcodeproj/project.pbxproj:
1552         * notifications/Notification.cpp:
1553         (WebCore::Notification::Notification):
1554         (WebCore::Notification::show):
1555         (WebCore::Notification::cancel):
1556         (WebCore::Notification::contextDestroyed):
1557         (WebCore::Notification::finishLoading):
1558         * notifications/NotificationCenter.cpp:
1559         (WebCore::NotificationCenter::create):
1560         (WebCore::NotificationCenter::NotificationCenter):
1561         (WebCore::NotificationCenter::checkPermission):
1562         (WebCore::NotificationCenter::requestPermission):
1563         (WebCore::NotificationCenter::disconnectFrame):
1564         * notifications/NotificationController.cpp:
1565         (WebCore::NotificationController::NotificationController):
1566         (WebCore::NotificationController::create):
1567         (WebCore::NotificationController::clientFrom):
1568         (WebCore::provideNotification):
1569         * notifications/NotificationController.h:
1570         (WebCore):
1571         (NotificationController):
1572         (WebCore::NotificationController::client):
1573         * page/DOMWindow.cpp:
1574         (WebCore::DOMWindow::webkitNotifications):
1575         * page/DOMWindow.h:
1576         (DOMWindow):
1577         * workers/WorkerContext.cpp:
1578         (WebCore::WorkerContext::webkitNotifications):
1579         * workers/WorkerThread.cpp:
1580         (WebCore::WorkerThread::WorkerThread):
1581         * workers/WorkerThread.h:
1582         (WebCore):
1583         (WebCore::WorkerThread::getNotificationClient):
1584         (WebCore::WorkerThread::setNotificationClient):
1585         (WorkerThread):
1586
1587 2012-03-10  Julien Chaffraix  <jchaffraix@webkit.org>
1588
1589         RenderObject with 'resize' different from 'none' should have a RenderLayer
1590         https://bugs.webkit.org/show_bug.cgi?id=80738
1591
1592         Reviewed by James Robinson.
1593
1594         Covered by fast/css/resize-single-axis.html.
1595
1596         * rendering/RenderBox.h:
1597         (WebCore::RenderBox::requiresLayerForOverflowClip):
1598         The resizer logic is tied to RenderLayer so force a RenderLayer to be allocated if resize() != RESIZE_NONE.
1599
1600 2012-03-10  Stephen White  <senorblanco@chromium.org>
1601
1602         Unreviewed, rolling out r110358.
1603         http://trac.webkit.org/changeset/110358
1604         https://bugs.webkit.org/show_bug.cgi?id=80706
1605
1606         No improvement on specified benchmarks.
1607
1608         * dom/ContainerNode.cpp:
1609         (WebCore::collectNodes):
1610         (WebCore::collectTargetNodes):
1611
1612 2012-03-10  MORITA Hajime  <morrita@google.com>
1613
1614         ShadowTree uses weak iteration patterns
1615         https://bugs.webkit.org/show_bug.cgi?id=80572
1616
1617         Reviewed by Dimitri Glazkov.
1618
1619         Patch by Adam Barth.
1620
1621         This patch moves various ShadowTree to using a better iteration pattern
1622         in which we collect all the ShadowRoots we're planning to iterate into
1623         a vector and then iterate over them.
1624
1625         * dom/ShadowTree.cpp:
1626         (ShadowRootVector):
1627         (WebCore::ShadowRootVector::ShadowRootVector):
1628         (WebCore):
1629         (WebCore::ShadowTree::removeAllShadowRoots):
1630         (WebCore::ShadowTree::insertedIntoDocument):
1631         (WebCore::ShadowTree::removedFromDocument):
1632         (WebCore::ShadowTree::insertedIntoTree):
1633         (WebCore::ShadowTree::removedFromTree):
1634         (WebCore::ShadowTree::willRemove):
1635
1636 2012-03-10  Sheriff Bot  <webkit.review.bot@gmail.com>
1637
1638         Unreviewed, rolling out r110363.
1639         http://trac.webkit.org/changeset/110363
1640         https://bugs.webkit.org/show_bug.cgi?id=80757
1641
1642         link error in chromium: unresolved external symbol
1643         webkit_support::CreateScopedTempDirectory(void) (Requested by
1644         ukai_home on #webkit).
1645
1646         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
1647         (WebCore::IDBLevelDBBackingStore::open):
1648         * platform/leveldb/LevelDBDatabase.cpp:
1649         * platform/leveldb/LevelDBDatabase.h:
1650         (LevelDBDatabase):
1651
1652 2012-03-09  Robert Kroeger  <rjkroege@chromium.org>
1653
1654         Handle more Gesture* events by performing scrolls on the correct target ScrollableArea 
1655         https://bugs.webkit.org/show_bug.cgi?id=80311
1656
1657         Implement GestureScroll* events via re-use of WheelEvent dispatch.
1658
1659         Reviewed by James Robinson.
1660
1661         Layout tests previously submited as https://bugs.webkit.org/show_bug.cgi?id=80201 and unit
1662         test added as part of this patch.
1663
1664         * page/EventHandler.cpp:
1665         (WebCore::wheelGranularityToScrollGranularity): Refactoring.
1666         (WebCore):
1667         (WebCore::scrollNode):
1668         (WebCore::EventHandler::EventHandler):
1669         (WebCore::EventHandler::clear):
1670         (WebCore::EventHandler::handleWheelEvent):
1671         (WebCore::EventHandler::defaultWheelEventHandler):
1672         (WebCore::EventHandler::handleGestureEvent): Added GestureScrollBegin & End.
1673         (WebCore::EventHandler::handleGestureTap):
1674         (WebCore::EventHandler::handleGestureScrollUpdate):
1675         (WebCore::EventHandler::handleGestureScrollCore): Refactoring.
1676         * page/EventHandler.h:
1677         (EventHandler):
1678         * platform/PlatformWheelEvent.h: Added additional scroll type.
1679         * platform/ScrollAnimator.cpp:
1680         (WebCore::ScrollAnimator::handleWheelEvent): Forward additional scroll type.
1681         * platform/ScrollAnimator.h:
1682         (WebCore):
1683         * platform/ScrollAnimatorNone.cpp:
1684         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): Handle additional scroll type.
1685         (WebCore::ScrollAnimatorNone::fireUpAnAnimation): 
1686         (WebCore):
1687         (WebCore::ScrollAnimatorNone::scroll):
1688         * platform/ScrollAnimatorNone.h:
1689         (ScrollAnimatorNone):
1690         * platform/ScrollTypes.h: Added an additional scroll type.
1691         * platform/ScrollableArea.cpp:
1692         (WebCore::ScrollableArea::scroll):
1693
1694 2012-03-09  Erik Arvidsson  <arv@chromium.org>
1695
1696         [V8] Fix a fixme in v8 bindings
1697         https://bugs.webkit.org/show_bug.cgi?id=80734
1698
1699         Reviewed by Kentaro Hara.
1700
1701         No new tests. Covered by existing tests.
1702
1703         * bindings/v8/V8Binding.cpp:
1704         (WebCore::toInt32):
1705         (WebCore::toUInt32):
1706
1707 2012-03-09  Lauro Neto  <lauro.neto@openbossa.org>
1708
1709         [Qt] WebCore/Target.pri contains obsolete FileStreamProxy.h reference.
1710         https://bugs.webkit.org/show_bug.cgi?id=80730
1711
1712         Reviewed by Tor Arne Vestbø.
1713
1714         Build fix. Target.pri was still including old FileStreamProxy.h.
1715
1716         * Target.pri:
1717
1718 2012-03-05 Cem Kocagil  <cem.kocagil@gmail.com>
1719
1720         Pan scroll icon is painted at incorrect coordinates in frames
1721         https://bugs.webkit.org/show_bug.cgi?id=79378
1722
1723         Convert client coordinates to parent ScrollView coordinates
1724
1725         Reviewed by Antonio Gomes
1726
1727         * platform/ScrollView.cpp:
1728         (WebCore::ScrollView::paintPanScrollIcon):
1729
1730 2012-03-09  Joshua Bell  <jsbell@chromium.org>
1731
1732         IndexedDB: Handle LevelDB database corruption
1733         https://bugs.webkit.org/show_bug.cgi?id=79413
1734
1735         Add LevelDBDatabase::destroy() method so that clients can retry if open() fails.
1736
1737         Reviewed by Tony Chang.
1738
1739         Test: webkit_unit_tests --gtest_filter='LevelDBDatabaseTest.CorruptionTest'
1740
1741         * Modules/indexeddb/IDBLevelDBBackingStore.cpp: Implement open/destroy/open strategy.
1742         (WebCore::IDBLevelDBBackingStore::open):
1743         * platform/leveldb/LevelDBDatabase.cpp:
1744         (WebCore::LevelDBDatabase::destroy):
1745         (WebCore):
1746         * platform/leveldb/LevelDBDatabase.h:
1747         (LevelDBDatabase):
1748
1749 2012-03-09  Jessie Berlin  <jberlin@apple.com>
1750
1751         Fix one of the Windows build warnings.
1752
1753         * html/track/TextTrackCueList.idl:
1754         Add a newline to the end of the file.
1755
1756 2012-03-09  Tyler Abbott  <tabbott@rim.com>
1757
1758         BlackBerry PlayBook doesn't sniff mime types
1759         https://bugs.webkit.org/show_bug.cgi?id=73869
1760
1761         Reviewed by Rob Buis.
1762
1763         Hook up MIMESniffing for BlackBerry. Override Content-Types will
1764         not be overriden. File extensions will be trusted when content
1765         is loaded from disk.
1766
1767         No tests, BlackBerry tests are not yet present in webkit.org codebase.
1768
1769         * PlatformBlackBerry.cmake:
1770         * platform/network/blackberry/NetworkJob.cpp:
1771         (WebCore::NetworkJob::NetworkJob):
1772         (WebCore::NetworkJob::initialize):
1773         (WebCore::NetworkJob::handleNotifyDataReceived):
1774         (WebCore::NetworkJob::sendResponseIfNeeded):
1775         * platform/network/blackberry/NetworkJob.h:
1776         (NetworkJob):
1777
1778 2012-03-09  Enrica Casucci  <enrica@apple.com>
1779
1780         Move WebNSURLExtras code down to WebCore.
1781         https://bugs.webkit.org/show_bug.cgi?id=80611
1782
1783         Reviewed by Alexey Proskuryakov.
1784
1785         * WebCore.exp.in: Added new exported functions.
1786         * WebCore.xcodeproj/project.pbxproj: Added WebCoreNSURLExtras.*
1787         * platform/FileSystem.h: Added setMetadataURL.
1788         * platform/mac/FileSystemMac.mm:
1789         (WebCore::setMetaData): Added.
1790         (WebCore::setMetadataURL): Added.
1791         * platform/mac/WebCoreNSStringExtras.h:
1792         * platform/mac/WebCoreNSStringExtras.mm:
1793         (hasCaseInsensitivePrefix): Added.
1794         * platform/mac/WebCoreNSURLExtras.h: Added.
1795         * platform/mac/WebCoreNSURLExtras.mm: Added.
1796         * platform/mac/WebCoreObjCExtras.h:
1797         * platform/mac/WebCoreSystemInterface.h:
1798         * platform/mac/WebCoreSystemInterface.mm:
1799
1800 2012-03-09  Tim Dresser  <tdresser@chromium.org>
1801
1802         [chromium] Increase size of Combo Box Options for touch and high DPI devices
1803         https://bugs.webkit.org/show_bug.cgi?id=80027
1804
1805         Reviewed by Darin Fisher.
1806
1807         Scale Combo box popups by defaultDeviceScaleFactor, and add padding to
1808         <option> elements when touch is enabled.
1809
1810         Manually tested with --default-device-scale-factor=1,2 and unset.
1811         Each of these were tested with RuntimeEnabledFeatures::touchEnabled
1812         set to true and false.
1813
1814         * platform/chromium/PopupListBox.cpp:
1815         (WebCore::PopupListBox::paint):
1816         (WebCore::PopupListBox::paintRow):
1817         (WebCore::PopupListBox::getRowHeight):
1818         * platform/chromium/PopupListBox.h:
1819         (PopupContainerSettings):
1820         * platform/chromium/PopupMenuChromium.cpp:
1821         (WebCore):
1822         (WebCore::PopupMenuChromium::show):
1823         * platform/chromium/PopupMenuChromium.h:
1824         (WebCore::PopupMenuChromium::optionPaddingForTouch):
1825         (WebCore::PopupMenuChromium::setOptionPaddingForTouch):
1826         (PopupMenuChromium):
1827         * rendering/RenderMenuList.cpp:
1828         (WebCore::RenderMenuList::showPopup):
1829
1830 2012-03-09  Stephen White  <senorblanco@chromium.org>
1831
1832         Improve ContainerNode collectNode() performance by reserving vector
1833         capacity up front.
1834         https://bugs.webkit.org/show_bug.cgi?id=80706
1835
1836         Reviewed by Ryosuke Niwa.
1837
1838         Covered by existing tests.  Performance will be evaluated based on
1839         Chromium's page_cycler_bloat-http, page_cycler_intl1, and
1840         dromaeo_domcore suites.
1841
1842         * dom/ContainerNode.cpp:
1843         (WebCore::collectNodes):
1844
1845 2012-03-09  Dan Bernstein  <mitz@apple.com>
1846
1847         <rdar://problem/11018851> Crash in DisplayRefreshMonitor::notifyClients()
1848         https://bugs.webkit.org/show_bug.cgi?id=80740
1849
1850         Reviewed by Sam Weinig.
1851
1852         No test, since this race condition cannot be reproduced reliably.
1853
1854         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
1855         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor): Changed to stop the display link
1856         first, then cancel any outstanding calls to refreshDisplayOnMainThread(). When doing things
1857         the other way around, the display link can fire after outstanding calls have been canceled,
1858         and enqueue new calls on the main thread, which will be dispatched after monitor destruction.
1859
1860 2012-03-09  Pratik Solanki  <psolanki@apple.com>
1861
1862         Assertion failure in ResourceHandle::setDefersLoading(): d->m_defersLoading != defers
1863         https://bugs.webkit.org/show_bug.cgi?id=80543
1864
1865         Reviewed by Geoffrey Garen.
1866
1867         Reset m_defersLoading flag to the value from Page::defersCallbacks() in
1868         ResourceLoader::init(). This is because the resource could have been in the pending requests
1869         queue in ResourceLoadScheduler and would have missed out on state changes to this flag
1870         happening from DocumentLoader::setDefersCallbacks().
1871
1872         * loader/ResourceLoader.cpp:
1873         (WebCore::ResourceLoader::init):
1874
1875 2012-03-09  Emil A Eklund  <eae@chromium.org>
1876
1877         Add roundedPoint to HitTestResult and change platform code to use it
1878         https://bugs.webkit.org/show_bug.cgi?id=80715
1879
1880         Reviewed by James Robinson.
1881
1882         Change ports to use roundedPoint to avoid exposing subpixel types to
1883         platform code.
1884
1885         No new tests.
1886
1887         * rendering/HitTestResult.h:
1888         (WebCore::HitTestResult::roundedPoint):
1889
1890 2012-03-09  Kentaro Hara  <haraken@chromium.org>
1891
1892         [V8][Performance] Inline hot methods in V8Bindings.h
1893         https://bugs.webkit.org/show_bug.cgi?id=80685
1894
1895         Reviewed by Adam Barth.
1896
1897         This patch slightly improves DOM binding performance by inlining hot
1898         methods in V8Binding.cpp, e.g. isUndefinedOrNull(), v8StringOrNull(), v8Boolean().
1899         For example, this patch improves div.nodeName by 5.0%, and div.nodeValue by 4.1%.
1900
1901         Performance tests: https://bugs.webkit.org/attachment.cgi?id=131006
1902
1903         The performance test results in my Mac environment are as follows:
1904
1905         Chromium/V8 without this patch:
1906         div.nodeName : 3417.4 ms
1907         div.nodeValue : 2069.6 ms
1908
1909         Chromium/V8 with this patch:
1910         div.nodeName : 3245.6 ms
1911         div.nodeValue : 1983.1 ms
1912
1913         No tests. No change in behavior.
1914
1915         * bindings/v8/V8Binding.cpp:
1916         * bindings/v8/V8Binding.h:
1917         (WebCore::toWebCoreString):
1918         (WebCore::isUndefinedOrNull):
1919         (WebCore::isHostObject):
1920         (WebCore::v8Boolean):
1921         (WebCore::toWebCoreStringWithNullCheck):
1922         (WebCore::toAtomicWebCoreStringWithNullCheck):
1923         (WebCore::toWebCoreStringWithNullOrUndefinedCheck):
1924         (WebCore::v8UndetectableString):
1925         (WebCore::v8StringOrNull):
1926         (WebCore::v8StringOrUndefined):
1927         (WebCore::v8StringOrFalse):
1928         (WebCore::toWebCoreDate):
1929         (WebCore::v8DateOrNull):
1930
1931 2012-03-09  W. James MacLean  <wjmaclean@chromium.org>
1932
1933         [chromium] Implement scroll physics architecture for impl/main thread
1934         https://bugs.webkit.org/show_bug.cgi?id=79827
1935
1936         Reviewed by James Robinson.
1937
1938         Unittests added, plus follow-on patch from rjkroege will add layout tests.
1939
1940         PlatformGestureCurve is a framework to separate the physical simulation from for gesture
1941         animation from control concerns. This allows the physics to be reused in alternate places.
1942         At present, the framework will be applied in ScrollAnimatorNone and the Chrome Compositor.
1943
1944         * WebCore.gypi:
1945         * platform/ActivePlatformGestureAnimation.cpp: Added.
1946         (WebCore):
1947         (WebCore::ActivePlatformGestureAnimation::create):
1948         (WebCore::ActivePlatformGestureAnimation::~ActivePlatformGestureAnimation):
1949         (WebCore::ActivePlatformGestureAnimation::ActivePlatformGestureAnimation):
1950         (WebCore::ActivePlatformGestureAnimation::animate):
1951         * platform/ActivePlatformGestureAnimation.h: Added.
1952         (WebCore):
1953         (ActivePlatformGestureAnimation):
1954         * platform/PlatformGestureCurve.h: Added.
1955         (WebCore):
1956         (PlatformGestureCurve):
1957         (WebCore::PlatformGestureCurve::~PlatformGestureCurve):
1958         * platform/PlatformGestureCurveTarget.h: Added.
1959         (WebCore):
1960         (PlatformGestureCurveTarget):
1961         (WebCore::PlatformGestureCurveTarget::~PlatformGestureCurveTarget):
1962         * platform/TouchFlingPlatformGestureCurve.cpp: Added.
1963         (WebCore):
1964         (WebCore::TouchFlingPlatformGestureCurve::create):
1965         (WebCore::TouchFlingPlatformGestureCurve::TouchFlingPlatformGestureCurve):
1966         (WebCore::TouchFlingPlatformGestureCurve::~TouchFlingPlatformGestureCurve):
1967         (WebCore::TouchFlingPlatformGestureCurve::apply):
1968         * platform/TouchFlingPlatformGestureCurve.h: Added.
1969         (WebCore):
1970         (TouchFlingPlatformGestureCurve):
1971         * platform/WheelFlingPlatformGestureCurve.cpp: Added.
1972         (WebCore):
1973         (WebCore::WheelFlingPlatformGestureCurve::create):
1974         (WebCore::WheelFlingPlatformGestureCurve::WheelFlingPlatformGestureCurve):
1975         (WebCore::WheelFlingPlatformGestureCurve::~WheelFlingPlatformGestureCurve):
1976         (WebCore::WheelFlingPlatformGestureCurve::apply):
1977         * platform/WheelFlingPlatformGestureCurve.h: Added.
1978         (WebCore):
1979         (WheelFlingPlatformGestureCurve):
1980         * platform/graphics/chromium/cc/CCActiveGestureAnimation.cpp: Added.
1981         (WebCore):
1982         (WebCore::CCActiveGestureAnimation::create):
1983         (WebCore::CCActiveGestureAnimation::CCActiveGestureAnimation):
1984         (WebCore::CCActiveGestureAnimation::~CCActiveGestureAnimation):
1985         (WebCore::CCActiveGestureAnimation::animate):
1986         * platform/graphics/chromium/cc/CCActiveGestureAnimation.h: Added.
1987         (WebCore):
1988         (CCActiveGestureAnimation):
1989         * platform/graphics/chromium/cc/CCGestureCurve.h: Added.
1990         (WebCore):
1991         (CCGestureCurveTarget):
1992         (WebCore::CCGestureCurveTarget::~CCGestureCurveTarget):
1993         (CCGestureCurve):
1994         (WebCore::CCGestureCurve::~CCGestureCurve):
1995
1996 2012-03-09  Alexis Menard  <alexis.menard@openbossa.org>
1997
1998         Implement selectedOptions attribute of <select>.
1999         https://bugs.webkit.org/show_bug.cgi?id=80631
2000
2001         Reviewed by Benjamin Poulain.
2002
2003         Add a new collection as a member of HTMLSelectElement which is
2004         used to store the selected elements. Extend HTMLCollection to
2005         support the new collection type needed by this feature.
2006
2007         Reference : http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#dom-select-selectedoptions
2008
2009         Test: fast/dom/select-selectedOptions.html
2010
2011         * html/CollectionType.h:
2012         * html/HTMLCollection.cpp:
2013         (WebCore::HTMLCollection::shouldIncludeChildren):
2014         (WebCore::HTMLCollection::isAcceptableElement):
2015         * html/HTMLSelectElement.cpp:
2016         (WebCore::HTMLSelectElement::selectedOptions):
2017         (WebCore):
2018         * html/HTMLSelectElement.h:
2019         (HTMLSelectElement):
2020         * html/HTMLSelectElement.idl:
2021
2022 2012-03-09  Tien-Ren Chen  <trchen@chromium.org>
2023
2024         [chromium] ScrollbarLayerChromium/CCScrollbarLayerImpl for CC-side scrollbar painting
2025         https://bugs.webkit.org/show_bug.cgi?id=78872
2026
2027         Reviewed by James Robinson.
2028
2029         New test ScrollbarLayerChromiumTest.resolveScrollLayerPointer
2030
2031         * WebCore.gypi:
2032         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2033         (WebCore::scrollLayerForFrameView):
2034         (WebCore::scrollbarLayerDidChange):
2035         (WebCore):
2036         (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
2037         (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
2038         * platform/ScrollableArea.cpp:
2039         (WebCore::ScrollableArea::invalidateScrollbar):
2040         * platform/graphics/chromium/GraphicsLayerChromium.h:
2041         (WebCore::GraphicsLayerChromium::hasContentsLayer):
2042         * platform/graphics/chromium/LayerChromium.h:
2043         (WebCore):
2044         (WebCore::LayerChromium::toScrollbarLayerChromium):
2045         (LayerChromium):
2046         * platform/graphics/chromium/ScrollbarLayerChromium.cpp: Added.
2047         (WebCore):
2048         (WebCore::ScrollbarLayerChromium::createCCLayerImpl):
2049         (WebCore::ScrollbarLayerChromium::create):
2050         (WebCore::ScrollbarLayerChromium::ScrollbarLayerChromium):
2051         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
2052         * platform/graphics/chromium/ScrollbarLayerChromium.h: Added.
2053         (WebCore):
2054         (ScrollbarLayerChromium):
2055         (WebCore::ScrollbarLayerChromium::scrollLayerId):
2056         (WebCore::ScrollbarLayerChromium::toScrollbarLayerChromium):
2057         * platform/graphics/chromium/TreeSynchronizer.cpp:
2058         (WebCore::TreeSynchronizer::synchronizeTrees):
2059         (WebCore::TreeSynchronizer::collectExistingCCLayerImplRecursive):
2060         (WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl):
2061         (WebCore::TreeSynchronizer::synchronizeTreeRecursive):
2062         (WebCore::TreeSynchronizer::updateScrollbarLayerPointersRecursive):
2063         (WebCore):
2064         * platform/graphics/chromium/TreeSynchronizer.h:
2065         (TreeSynchronizer):
2066         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2067         (WebCore::CCLayerTreeHostImpl::updateMaxScrollPosition):
2068         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: Added.
2069         (WebCore):
2070         (WebCore::CCScrollbarLayerImpl::create):
2071         (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
2072         (WebCore::CCScrollbarLayerImpl::willDraw):
2073         (WebCore::CCScrollbarLayerImpl::appendQuads):
2074         (WebCore::CCScrollbarLayerImpl::didDraw):
2075         (WebCore::CCScrollbarLayerImpl::paint):
2076         (WebCore::CCScrollbarLayerImpl::CCScrollbar::x):
2077         (WebCore::CCScrollbarLayerImpl::CCScrollbar::y):
2078         (WebCore::CCScrollbarLayerImpl::CCScrollbar::width):
2079         (WebCore::CCScrollbarLayerImpl::CCScrollbar::height):
2080         (WebCore::CCScrollbarLayerImpl::CCScrollbar::size):
2081         (WebCore::CCScrollbarLayerImpl::CCScrollbar::location):
2082         (WebCore::CCScrollbarLayerImpl::CCScrollbar::parent):
2083         (WebCore::CCScrollbarLayerImpl::CCScrollbar::root):
2084         (WebCore::CCScrollbarLayerImpl::CCScrollbar::setFrameRect):
2085         (WebCore::CCScrollbarLayerImpl::CCScrollbar::frameRect):
2086         (WebCore::CCScrollbarLayerImpl::CCScrollbar::invalidate):
2087         (WebCore::CCScrollbarLayerImpl::CCScrollbar::invalidateRect):
2088         (WebCore::CCScrollbarLayerImpl::CCScrollbar::scrollbarOverlayStyle):
2089         (WebCore::CCScrollbarLayerImpl::CCScrollbar::getTickmarks):
2090         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollableAreaActive):
2091         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollViewScrollbar):
2092         (WebCore::CCScrollbarLayerImpl::CCScrollbar::convertFromContainingWindow):
2093         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isCustomScrollbar):
2094         (WebCore::CCScrollbarLayerImpl::CCScrollbar::orientation):
2095         (WebCore::CCScrollbarLayerImpl::CCScrollbar::value):
2096         (WebCore::CCScrollbarLayerImpl::CCScrollbar::currentPos):
2097         (WebCore::CCScrollbarLayerImpl::CCScrollbar::visibleSize):
2098         (WebCore::CCScrollbarLayerImpl::CCScrollbar::totalSize):
2099         (WebCore::CCScrollbarLayerImpl::CCScrollbar::maximum):
2100         (WebCore::CCScrollbarLayerImpl::CCScrollbar::controlSize):
2101         (WebCore::CCScrollbarLayerImpl::CCScrollbar::lineStep):
2102         (WebCore::CCScrollbarLayerImpl::CCScrollbar::pageStep):
2103         (WebCore::CCScrollbarLayerImpl::CCScrollbar::pressedPart):
2104         (WebCore::CCScrollbarLayerImpl::CCScrollbar::hoveredPart):
2105         (WebCore::CCScrollbarLayerImpl::CCScrollbar::styleChanged):
2106         (WebCore::CCScrollbarLayerImpl::CCScrollbar::enabled):
2107         (WebCore::CCScrollbarLayerImpl::CCScrollbar::setEnabled):
2108         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: Added.
2109         (WebCore):
2110         (CCScrollbarLayerImpl):
2111         (WebCore::CCScrollbarLayerImpl::setScrollbarOverlayStyle):
2112         (WebCore::CCScrollbarLayerImpl::setTickmarks):
2113         (WebCore::CCScrollbarLayerImpl::setIsScrollableAreaActive):
2114         (WebCore::CCScrollbarLayerImpl::setIsScrollViewScrollbar):
2115         (WebCore::CCScrollbarLayerImpl::setOrientation):
2116         (WebCore::CCScrollbarLayerImpl::setControlSize):
2117         (WebCore::CCScrollbarLayerImpl::setPressedPart):
2118         (WebCore::CCScrollbarLayerImpl::setHoveredPart):
2119         (WebCore::CCScrollbarLayerImpl::setEnabled):
2120         (WebCore::CCScrollbarLayerImpl::scrollLayer):
2121         (WebCore::CCScrollbarLayerImpl::setScrollLayer):
2122         (CCScrollbar):
2123         (WebCore::CCScrollbarLayerImpl::CCScrollbar::CCScrollbar):
2124
2125 2012-03-09  Julien Chaffraix  <jchaffraix@webkit.org>
2126
2127         Split the extra logical height distribution logic out of RenderTableSection::layoutRows
2128         https://bugs.webkit.org/show_bug.cgi?id=80671
2129
2130         Reviewed by Adrienne Walker.
2131
2132         Refactoring only, no change in behavior expected.
2133
2134         * rendering/RenderTableSection.cpp:
2135         (WebCore::RenderTableSection::layoutRows):
2136         Split the logic from here...
2137
2138         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
2139         (WebCore::RenderTableSection::distributeExtraLogicalHeightToAutoRows):
2140         (WebCore::RenderTableSection::distributeRemainingExtraLogicalHeight):
2141         (WebCore::RenderTableSection::distributeExtraLogicalHeightToRows):
2142         ... to those functions. Cleaned up the variable naming while at it and
2143         made them follow the same signature as this may be useful to fix another
2144         bug I have.
2145
2146         * rendering/RenderTableSection.h:
2147         (RenderTableSection):
2148         Added the previous 4 new functions.
2149
2150 2012-03-09  Rob Buis  <rbuis@rim.com>
2151
2152         Remove unused file FrameBlackBerry.cpp
2153         https://bugs.webkit.org/show_bug.cgi?id=80731
2154
2155         Reviewed by Antonio Gomes.
2156
2157         This is not needed anymore since there is an implementation elsewhere.
2158
2159         * PlatformBlackBerry.cmake:
2160         * page/blackberry/FrameBlackBerry.cpp: Removed.
2161
2162 2012-03-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2163
2164         Unreviewed, rolling out r110309.
2165         http://trac.webkit.org/changeset/110309
2166         https://bugs.webkit.org/show_bug.cgi?id=80732
2167
2168         Seems to have caused a number of SVG crashes (thorton will
2169         investigate further) (Requested by abarth|gardener on
2170         #webkit).
2171
2172         * page/FrameView.cpp:
2173         (WebCore::FrameView::FrameView):
2174         (WebCore::FrameView::reset):
2175         (WebCore::FrameView::repaintContentRectangle):
2176         (WebCore::FrameView::deferredRepaintTimerFired):
2177         * page/FrameView.h:
2178         (FrameView):
2179         * rendering/RenderView.cpp:
2180         (WebCore::RenderView::shouldRepaint):
2181         * svg/graphics/SVGImage.cpp:
2182         (WebCore::SVGImage::drawSVGToImageBuffer):
2183         (WebCore::SVGImage::draw):
2184         * svg/graphics/SVGImage.h:
2185         * svg/graphics/SVGImageCache.cpp:
2186         (WebCore::SVGImageCache::imageContentChanged):
2187         (WebCore::SVGImageCache::redrawTimerFired):
2188         * svg/graphics/SVGImageCache.h:
2189         (SVGImageCache):
2190
2191 2012-03-09  Ken Buchanan  <kenrb@chromium.org>
2192
2193         Crash due to inserting letter into div with first-letter
2194         https://bugs.webkit.org/show_bug.cgi?id=78534
2195
2196         Reviewed by David Hyatt.
2197
2198         This fixes an issue in RenderTextFragment with setTextInternal
2199         getting called with different intents. While most calls to it
2200         are intended to change the underlying DOM node string, it can
2201         also be called as a result of styleDidChange just for transforms
2202         on the substring text fragment. This adds a mechanism for internal
2203         callers to specify if the internal text is being updated without
2204         a DOM node text change.
2205
2206         * rendering/RenderTextFragment.cpp:
2207         (WebCore::RenderTextFragment::styleDidChange)
2208         (WebCore::RenderTextFragment::setTextInternal)
2209         * rendering/RenderTextFragment.h:
2210         (WebCore::RenderTextFragment)
2211
2212 2012-03-09  Chris Rogers  <crogers@google.com>
2213
2214         Fix uninitialized variable in DynamicsCompressor
2215         https://bugs.webkit.org/show_bug.cgi?id=80724
2216
2217         Reviewed by James Robinson.
2218
2219         * platform/audio/DynamicsCompressor.cpp:
2220         (WebCore::DynamicsCompressor::DynamicsCompressor):
2221
2222 2012-03-09  Erik Arvidsson  <arv@chromium.org>
2223
2224         [V8] Undo text position adjustment for attribute event handlers
2225         https://bugs.webkit.org/show_bug.cgi?id=80725
2226
2227         Reviewed by Adam Barth.
2228
2229         No new tests. Needs rebaseline.
2230
2231         * bindings/v8/V8LazyEventListener.cpp:
2232         (WebCore::V8LazyEventListener::prepareListenerObject):
2233
2234 2012-03-09  Tom Sepez  <tsepez@chromium.org>
2235
2236         Hold cached images with a CachedResourceHandle rather than a raw pointer for CSSCrossfadeValue
2237         https://bugs.webkit.org/show_bug.cgi?id=80186
2238
2239         Reviewed by Simon Fraser.
2240
2241         Test: http/tests/css/cross-fade-reload.html
2242
2243         * css/CSSCrossfadeValue.h:
2244         (CSSCrossfadeValue):
2245
2246 2012-03-09  Abhishek Arya  <inferno@chromium.org>
2247
2248         Crash when splitting an anonymous block in multi-column layout.
2249         https://bugs.webkit.org/show_bug.cgi?id=80432
2250
2251         Reviewed by David Hyatt.
2252
2253         Calculating currChild->nextSibling() is risky after destroying :after content
2254         because it can blow away currChild if it is a left over empty anonymous block.
2255         We need to calculate next sibling upfront, using the same trick, we do in
2256         RenderBlock::addChildIgnoringAnonymousColumnBlock to reset beforeChild (check
2257         out the line before splitFlow call).
2258
2259         Test: fast/multicol/anonymous-block-split-crash.html
2260
2261         * rendering/RenderBlock.cpp:
2262         (WebCore::RenderBlock::splitBlocks):
2263
2264 2012-03-09  Abhishek Arya  <inferno@chromium.org>
2265
2266         Crash due to accessing removed parent lineboxes when clearing selection.
2267         https://bugs.webkit.org/show_bug.cgi?id=79264
2268
2269         Reviewed by Dave Hyatt.
2270
2271         Test: editing/selection/first-letter-selection-crash.html
2272
2273         * rendering/RenderBoxModelObject.cpp:
2274         (WebCore::RenderBoxModelObject::setSelectionState):
2275         1. No need of checking if we are being set to same selection state.
2276         Now tested by setSelectionStateIfNeeded. Rename 's' with 'state' and
2277         'cb' with 'containingBlock'.
2278         * rendering/RenderListMarker.cpp:
2279         (WebCore::RenderListMarker::setSelectionState):
2280         1. Add check to canUpdateSelectionOnRootLineBoxes to make sure our
2281         root line boxes are still valid before setting them.
2282         2. No need of calling setSelectionState on containing block since our base
2283         class call to RenderBox::setSelectionState covers it. Added a comment to indicate that.
2284         3. Use m_inlineBoxWrapper variable directly to simplify the ifs.
2285         * rendering/RenderObject.cpp:
2286         (WebCore::RenderObject::canUpdateSelectionOnRootLineBoxes):
2287         (WebCore): helper function to tell if we can update selection information
2288         on our root line boxes. This returns false if our containing block is pending layout.
2289         * rendering/RenderObject.h:
2290         (RenderObject):
2291         (WebCore::RenderObject::setSelectionStateIfNeeded):
2292         (WebCore): helper to set selection state only if it is different from our
2293         current selection state.
2294         * rendering/RenderReplaced.cpp:
2295         (WebCore::RenderReplaced::setSelectionState):
2296         1. Rename 's' to 'state', 'line' to 'root' and use m_inlineBoxWrapper directly
2297         to simplify ifs.
2298         2. Add check to canUpdateSelectionOnRootLineBoxes to make sure our
2299         root line boxes are still valid before setting them.
2300         * rendering/RenderText.cpp:
2301         (WebCore::RenderText::setSelectionState):
2302         1. Add check to canUpdateSelectionOnRootLineBoxes to make sure our
2303         root line boxes are still valid before setting them.
2304         2. Rename 'cb' to 'containingBlock', 'line' to 'root', move InlineTextBox
2305         declaration to local.
2306         * rendering/RenderView.cpp:
2307         (WebCore::RenderView::setSelection): Replace all calls to setSelectionState
2308         with setSelectionStateIfNeeded.
2309         * rendering/RenderWidget.cpp:
2310         (WebCore::RenderWidget::setSelectionState):
2311         1. No need of checking if we are being set to same selection state.
2312         Now tested by setSelectionStateIfNeeded.
2313
2314 2012-03-09  Levi Weintraub  <leviw@chromium.org>
2315
2316         Move TransformationMatrix and TransformState to LayoutUnits.
2317         https://bugs.webkit.org/show_bug.cgi?id=80632
2318
2319         Reviewed by Simon Fraser.
2320
2321         When we move layout to sub-pixel precision, we want to preserve that precision through
2322         transformations. This change readies TransformState and TransformationMatrix to make
2323         use of this additional precision in accumulating transforms, and in returning rects that
2324         preserve it.
2325
2326         No new tests. No change in behavior.
2327
2328         * platform/graphics/transforms/TransformState.cpp:
2329         (WebCore::TransformState::move): Changed to pass along LayoutUnits to the contained
2330         TransformationMatrix. The values of the LayoutUnits will be implicitly converted to
2331         floats to be applied.
2332         * platform/graphics/transforms/TransformState.h:
2333         (WebCore::TransformState::move): Ditto.
2334         (TransformState):
2335         * platform/graphics/transforms/TransformationMatrix.cpp:
2336         (WebCore::clampEdgeValue): Limiting edges to the maximum LayoutUnit value to prevent
2337         overflow..
2338         (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad): Same as above, but also
2339         returning a LayoutRect which preserves additional precision than the previous IntRect.
2340         (WebCore::TransformationMatrix::mapRect): Adding a version of this method that operates
2341         specifically on FractionalLayoutRects.
2342         (WebCore):
2343         * platform/graphics/transforms/TransformationMatrix.h:
2344         (WebCore):
2345         (TransformationMatrix):
2346         * rendering/LayoutTypes.h:
2347         (WebCore::clampToLayoutUnit):
2348         (WebCore):
2349
2350 2012-03-09  Ryosuke Niwa  <rniwa@webkit.org>
2351
2352         Remove a bogus assertion. This condition is no longer true for non-document tree scopes.
2353
2354         * dom/TreeScope.cpp:
2355         (WebCore::TreeScope::activeElement):
2356
2357 2012-03-09  Ryosuke Niwa  <rniwa@webkit.org>
2358
2359         Cleanup incDOMTreeVersion callers
2360         https://bugs.webkit.org/show_bug.cgi?id=80452
2361
2362         Reviewed by Andreas Kling.
2363
2364         Unify various calls to incDOMTreeVersion and namely remove the call inside dispatchSubtreeModifiedEvent.
2365         There should be no behavioral change and therefore there is no new test.
2366
2367         * dom/CharacterData.cpp:
2368         (WebCore::CharacterData::parserAppendData):
2369         (WebCore::CharacterData::setDataAndUpdate):
2370         * dom/ContainerNode.cpp:
2371         (WebCore::willRemoveChild):
2372         (WebCore::willRemoveChildren):
2373         (WebCore::ContainerNode::removeChild):
2374         (WebCore::ContainerNode::removeChildren):
2375         (WebCore::ContainerNode::childrenChanged):
2376         (WebCore::notifyChildInserted):
2377         * dom/Element.cpp:
2378         (WebCore::Element::attributeChanged):
2379         (WebCore::Element::parserSetAttributes):
2380         (WebCore::Element::willModifyAttribute):
2381         * dom/Node.cpp:
2382         (WebCore::Node::dispatchSubtreeModifiedEvent):
2383         * html/HTMLOutputElement.cpp:
2384         (WebCore::HTMLOutputElement::childrenChanged):
2385         * html/HTMLScriptElement.cpp:
2386         (WebCore::HTMLScriptElement::childrenChanged):
2387         * html/HTMLStyleElement.cpp:
2388         (WebCore::HTMLStyleElement::childrenChanged):
2389         * html/HTMLTextAreaElement.cpp:
2390         (WebCore::HTMLTextAreaElement::childrenChanged):
2391         * html/HTMLTitleElement.cpp:
2392         (WebCore::HTMLTitleElement::childrenChanged):
2393         * svg/SVGScriptElement.cpp:
2394         (WebCore::SVGScriptElement::childrenChanged):
2395         * svg/SVGStyleElement.cpp:
2396         (WebCore::SVGStyleElement::childrenChanged):
2397
2398 2012-03-09  Patrick Gansterer  <paroga@webkit.org>
2399
2400         Build fix for !ENABLE(FILTERS) after r110285.
2401
2402         * rendering/svg/SVGRenderingContext.h:
2403         (WebCore::SVGRenderingContext::SVGRenderingContext):
2404
2405 2012-03-09  Dana Jansens  <danakj@chromium.org>
2406
2407         [chromium] Use opaque paints in CCOcclusionTracker
2408         https://bugs.webkit.org/show_bug.cgi?id=80173
2409
2410         Reviewed by Adrienne Walker.
2411
2412         Use tracked opaque paints in the tiles when tracking occlusion in
2413         CCOcclusionTracker. Moves the Tile::m_opaqueRect up to the super-
2414         class in CCLayerTilingData rather than having it declared in both
2415         TiledLayerChromium and CCTiledLayerImpl. This lets the CCLayerTilingData
2416         class compute the opaque region for its tiles, sharing code between the
2417         two tiled layer implementations.
2418
2419         Use of this feature is guarded behind a runtime flag and turned off for
2420         paint culling. We will enable it in the future once we're comfortable
2421         with the paint culling.
2422
2423         Unit test: CCOcclusionTrackerTest.opaqueContentsRegionEmpty
2424                    CCOcclusionTrackerTest.opaqueContentsRegionNonEmpty
2425                    TiledLayerChromiumTest.opaqueContentsRegion
2426
2427         All existing CCOcclusionTrackerTest.* duplicated with opaque painted
2428         rects.
2429
2430         * platform/graphics/chromium/LayerChromium.h:
2431         (WebCore::LayerChromium::opaqueContentsRegion):
2432         (LayerChromium):
2433         * platform/graphics/chromium/TiledLayerChromium.cpp:
2434         (UpdatableTile):
2435         (WebCore::TiledLayerChromium::pushPropertiesTo):
2436         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2437         (WebCore::TiledLayerChromium::addSelfToOccludedScreenSpace):
2438         (WebCore::TiledLayerChromium::opaqueContentsRegion):
2439         (WebCore):
2440         * platform/graphics/chromium/TiledLayerChromium.h:
2441         * platform/graphics/chromium/cc/CCLayerImpl.h:
2442         (WebCore::CCLayerImpl::opaqueContentsRegion):
2443         (CCLayerImpl):
2444         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
2445         (WebCore::CCLayerTilingData::opaqueRegionInLayerRect):
2446         (WebCore):
2447         * platform/graphics/chromium/cc/CCLayerTilingData.h:
2448         (WebCore):
2449         (Tile):
2450         (WebCore::CCLayerTilingData::Tile::opaqueRect):
2451         (WebCore::CCLayerTilingData::Tile::setOpaqueRect):
2452         (CCLayerTilingData):
2453         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2454         (WebCore::::CCOcclusionTrackerBase):
2455         (WebCore::computeOcclusionBehindLayer):
2456         (WebCore::::markOccludedBehindLayer):
2457         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
2458         (CCOcclusionTrackerBase):
2459         (WebCore::CCOcclusionTrackerBase::setUsePaintTracking):
2460         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2461         (DrawableTile):
2462         (WebCore::CCTiledLayerImpl::opaqueContentsRegion):
2463         (WebCore):
2464         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2465         (CCTiledLayerImpl):
2466
2467 2012-03-09  Antti Koivisto  <antti@apple.com>
2468
2469         Presentation attribute cache
2470         https://bugs.webkit.org/show_bug.cgi?id=80707
2471         
2472         Reviewed by Andreas Kling.
2473
2474         It is common for the same presentation attribute values repeat. We should introduce a cache that uses 
2475         presentation attribute names and values as key. This will help to avoid repeated parsing of the 
2476         same attribute values, reduce memory consumption and speed up the style resolve.
2477         
2478         This patch introduces a simple and small (128 entries) global cache. In general web browsing it seems
2479         to give sharing rate of >75% (an average presentation attribute property set is shared between >4 elements).
2480
2481         * dom/StyledElement.cpp:
2482         (WebCore::PresentationAttributeCacheKey::PresentationAttributeCacheKey):
2483         (PresentationAttributeCacheKey):
2484         (WebCore):
2485         (WebCore::operator!=):
2486         (PresentationAttributeCacheEntry):
2487         (WebCore::presentationAttributeCache):
2488         (WebCore::attributeNameSort):
2489         (WebCore::StyledElement::makePresentationAttributeCacheKey):
2490         (WebCore::computePresentationAttributeCacheHash):
2491         (WebCore::StyledElement::updateAttributeStyle):
2492         * dom/StyledElement.h:
2493         (WebCore):
2494         (StyledElement):
2495
2496 2012-03-08  Erik Arvidsson  <arv@chromium.org>
2497
2498         [V8] Fix object scope for inline event attribute handlers
2499         https://bugs.webkit.org/show_bug.cgi?id=80329
2500
2501         Reviewed by Ojan Vafai.
2502
2503         We now create the funciton inside the with-statements with the current scope objects.
2504         This is important for a few reasons:
2505
2506         - We need to use the real objects and not just lookup the JS properties because these might have been overridden.
2507         - We need to use the node, form and document at the time of the preparation and not at the time of calling.
2508         - We need to ensure that event/evt is bound closer than a property with the same name in the object environment
2509           created by the with-statements.
2510
2511         Tests: fast/dom/inline-event-attributes-lookup-removed-form.html
2512                fast/dom/inline-event-attributes-lookup-removed.html
2513                fast/dom/inline-event-attributes-lookup.html
2514
2515         * bindings/v8/ScriptEventListener.cpp:
2516         (WebCore::eventParameterName):
2517         (WebCore):
2518         (WebCore::createAttributeEventListener):
2519         * bindings/v8/V8LazyEventListener.cpp:
2520         (WebCore::V8LazyEventListener::V8LazyEventListener):
2521         (WebCore):
2522         (WebCore::toObjectWrapper):
2523         (WebCore::V8LazyEventListener::callListenerFunction):
2524         (WebCore::V8LazyEventListener::prepareListenerObject):
2525         * bindings/v8/V8LazyEventListener.h:
2526         (WebCore):
2527         (WebCore::V8LazyEventListener::create):
2528         (V8LazyEventListener):
2529
2530 2012-03-09  Stephen Chenney  <schenney@chromium.org>
2531
2532         Crash in WebCore::SVGUseElement::instanceForShadowTreeElement
2533         https://bugs.webkit.org/show_bug.cgi?id=80406
2534
2535         Reviewed by Nikolas Zimmermann.
2536
2537         Code assumes that an object that is an SVG Element and in a shadow
2538         tree must be in an SVG use shadow tree, and casts the shadow host with
2539         a static_cast. It may be that an SVG element appears in a non-use
2540         shadow tree, in which case bad things happen. While it appears that
2541         the current code prevents such a situation from arising (checks are
2542         made within the shadow tree code to prevent it) there are also
2543         indications that the situation may change.
2544
2545         No new tests. I believe that the problem here cannot currently be
2546         reproduced. That is, other code prevents SVG elements from appearing
2547         in non-svg shadow trees.
2548
2549         * dom/EventDispatcher.cpp:
2550         (WebCore::eventTargetRespectingSVGTargetRules):
2551         * svg/SVGStyledElement.cpp:
2552         (WebCore::SVGStyledElement::title):
2553
2554 2012-03-09  Jon Lee  <jonlee@apple.com>
2555
2556         Add support for ENABLE(LEGACY_NOTIFICATIONS)
2557         https://bugs.webkit.org/show_bug.cgi?id=80497
2558
2559         Reviewed by Adam Barth.
2560
2561         Prep for b80472: Update API for Web Notifications
2562         * Configurations/FeatureDefines.xcconfig:
2563         * GNUmakefile.am:
2564
2565 2012-03-09  Kaustubh Atrawalkar  <kaustubh@motorola.com>
2566
2567         ShadowRoot should implement activeElement.
2568         https://bugs.webkit.org/show_bug.cgi?id=79886
2569
2570         Reviewed by Ryosuke Niwa.
2571
2572         Implement the activeElement attribute for ShadowRoot to return the
2573         currently focused element in the shadow DOM subtree.
2574
2575         Test: fast/dom/shadow/shadow-root-activeElement.html
2576
2577         * dom/ShadowRoot.cpp:
2578         (WebCore::ShadowRoot::activeElement):
2579         (WebCore):
2580         * dom/ShadowRoot.h:
2581         (ShadowRoot):
2582         * dom/ShadowRoot.idl:
2583         * dom/TreeScope.cpp:
2584         (WebCore::TreeScope::adoptIfNeeded):
2585         (WebCore):
2586         (WebCore::focusedFrameOwnerElement):
2587         (WebCore::TreeScope::activeElement):
2588         * dom/TreeScope.h:
2589         (TreeScope):
2590         * html/HTMLDocument.cpp:
2591         (WebCore):
2592         (WebCore::HTMLDocument::activeElement):
2593
2594 2012-03-09  Tim Horton  <timothy_horton@apple.com>
2595
2596         Infinite repaint loop with SVGImageCache and deferred repaint timers
2597         https://bugs.webkit.org/show_bug.cgi?id=78315
2598         <rdar://problem/10651634>
2599
2600         Reviewed by Nikolas Zimmermann.
2601
2602         Only defer image redraw on a timer if we're in layout. This breaks
2603         the repaint loop while still preventing us from drawing inside layout.
2604
2605         Completely disable repaint during relayout inside SVGImage::drawSVGToImageBuffer,
2606         preventing deferred repaint timers from being started during that process.
2607
2608         No new tests, as the problem only occurs in a nonstandard configuration.
2609
2610         * svg/graphics/SVGImage.cpp:
2611         (WebCore::SVGImage::draw):
2612         (WebCore::SVGImage::frameView):
2613         (WebCore):
2614         * svg/graphics/SVGImage.h:
2615         (WebCore):
2616         * svg/graphics/SVGImageCache.cpp:
2617         (WebCore::SVGImageCache::imageContentChanged):
2618         (WebCore::SVGImageCache::redraw):
2619         (WebCore::SVGImageCache::redrawTimerFired):
2620         (WebCore):
2621         * svg/graphics/SVGImageCache.h:
2622         (SVGImageCache):
2623
2624 2012-03-09  Victor Carbune  <vcarbune@adobe.com>
2625
2626         The method TextTrackCue::getCueAsHTML() should return different
2627         fragments on different calls.
2628
2629         https://bugs.webkit.org/show_bug.cgi?id=80701
2630
2631         Reviewed by Eric Carlson.
2632
2633         Test: media/track/track-cue-mutable-fragment.html
2634
2635         * html/track/TextTrackCue.cpp: Removed setCueHTML(), since it is sufficient
2636         to create apply the DOM rules only when the fragment is first requested.
2637         (WebCore::TextTrackCue::getCueAsHTML): Changed the method such that a
2638         a clone of the cached document fragment is returned.
2639         * html/track/TextTrackCue.h: Removed setCueHTML() as the document fragment
2640         of the cue should be created only within the class, from the cue text.
2641         (TextTrackCue):
2642         * html/track/WebVTTParser.cpp:
2643         (WebCore::WebVTTParser::createNewCue): removed usage of setCueHTML()
2644
2645 2012-03-09  Tim Horton  <timothy_horton@apple.com>
2646
2647         Crash in SVGTextLayoutAttributesBuilder::fillCharacterDataMap
2648         https://bugs.webkit.org/show_bug.cgi?id=78949
2649         <rdar://problem/10889440>
2650
2651         Reviewed by Nikolas Zimmermann.
2652
2653         Invalidate the text positioning cache when the children of an SVGAElement change,
2654         so that we regenerate the list the next time it's needed instead of using stale values.
2655
2656         Test: svg/text/text-positioning-remove-child-crash.svg
2657
2658         * rendering/svg/SVGAElement.cpp:
2659         (WebCore::SVGAElement::childrenChanged):
2660
2661 2012-03-09  Ashod Nakashian  <ashodnakashian@yahoo.com>
2662
2663         Bash scripts should support LF endings only
2664         https://bugs.webkit.org/show_bug.cgi?id=79509
2665
2666         Reviewed by David Kilzer.
2667
2668         * WebCore.gyp/mac/adjust_visibility.sh: Added property svn:eol-style.
2669         * WebCore.vcproj/build-generated-files.sh: Added property svn:executable.
2670         * WebCore.vcproj/migrate-scripts.sh: Added property svn:executable.
2671         * gyp/copy-forwarding-and-icu-headers.sh: Added property svn:eol-style.
2672         * gyp/copy-inspector-resources.sh: Added property svn:eol-style.
2673         * gyp/generate-derived-sources.sh: Added property svn:eol-style.
2674         * gyp/generate-webcore-export-file-generator.sh: Added property svn:eol-style.
2675         * gyp/run-if-exists.sh: Added property svn:eol-style.
2676         * gyp/streamline-inspector-source.sh: Added property svn:eol-style.
2677         * gyp/update-info-plist.sh: Added property svn:eol-style.
2678
2679 2012-03-09  Andreas Kling  <awesomekling@apple.com>
2680
2681         CSSParser: Use Vector for intermediate property storage.
2682         <http://webkit.org/b/80653>
2683
2684         Reviewed by Antti Koivisto.
2685
2686         Remove the custom memory management for intermediate CSSProperties in CSSParser
2687         and replace it by a Vector<CSSProperty, 256>.
2688         This avoids heap allocations and removes a bunch of unnecessary complexity.
2689
2690         Remove WTF_MAKE_FAST_ALLOCATED from CSSProperty since they are only created on
2691         the stack now.
2692
2693         * css/CSSGrammar.y:
2694         * css/CSSParser.cpp:
2695         (WebCore::CSSParser::CSSParser):
2696         (WebCore::CSSParser::~CSSParser):
2697         (WebCore::CSSParser::parseValue):
2698         (WebCore::CSSParser::parseColor):
2699         (WebCore::CSSParser::parseDeclaration):
2700         (WebCore::CSSParser::addProperty):
2701         (WebCore::CSSParser::rollbackLastProperties):
2702         (WebCore::CSSParser::clearProperties):
2703         (WebCore::CSSParser::parse4Values):
2704         (WebCore::CSSParser::parseFlowThread):
2705         (WebCore::CSSParser::createStyleRule):
2706         (WebCore::CSSParser::createFontFaceRule):
2707         (WebCore::CSSParser::createPageRule):
2708         (WebCore::CSSParser::createMarginAtRule):
2709         (WebCore::CSSParser::startDeclarationsForMarginBox):
2710         (WebCore::CSSParser::endDeclarationsForMarginBox):
2711         (WebCore::CSSParser::deleteFontFaceOnlyValues):
2712         (WebCore::CSSParser::createKeyframeRule):
2713         * css/CSSParser.h:
2714         (WebCore::CSSParser::hasProperties):
2715         (CSSParser):
2716         * css/CSSProperty.h:
2717         * css/SVGCSSParser.cpp:
2718         (WebCore::CSSParser::parseSVGValue):
2719         * css/StylePropertySet.cpp:
2720         (WebCore::StylePropertySet::StylePropertySet):
2721         (WebCore::StylePropertySet::addParsedProperties):
2722         * css/StylePropertySet.h:
2723         (WebCore::StylePropertySet::create):
2724         (StylePropertySet):
2725
2726 2012-03-09  Nate Chapin  <japhet@chromium.org>
2727
2728         CachedRawResource breaks when trying to load
2729         a resource with an empty response body from cache.
2730
2731         Reviewed by Alexey Proskuryakov.
2732
2733         Test: http/tests/cache/zero-length-xhr.html
2734
2735         * loader/cache/CachedRawResource.cpp:
2736         (WebCore::CachedRawResource::didAddClient): Don't exit early
2737             if m_data is empty, we may still need to notifyFinished().
2738
2739 2012-03-09  Robin Cao  <robin.cao@torchmobile.com.cn>
2740
2741         [BlackBerry] Upstream classes that handle layer tiling
2742         https://bugs.webkit.org/show_bug.cgi?id=79875
2743
2744         Reviewed by Rob Buis.
2745
2746         Initial upstreaming, no new tests.
2747
2748         * platform/graphics/blackberry/LayerTile.cpp: Added.
2749         (WebCore):
2750         (WebCore::LayerTile::LayerTile):
2751         (WebCore::LayerTile::~LayerTile):
2752         (WebCore::LayerTile::setContents):
2753         (WebCore::LayerTile::setContentsToColor):
2754         (WebCore::LayerTile::updateContents):
2755         (WebCore::LayerTile::discardContents):
2756         (WebCore::LayerTile::setVisible):
2757         (WebCore::LayerTile::setTexture):
2758         * platform/graphics/blackberry/LayerTile.h: Added.
2759         (WebCore):
2760         (LayerTileData):
2761         (WebCore::LayerTileData::LayerTileData):
2762         (WebCore::LayerTileData::isVisible):
2763         (LayerTile):
2764         (WebCore::LayerTile::texture):
2765         (WebCore::LayerTile::isVisible):
2766         (WebCore::LayerTile::isDirty):
2767         (WebCore::LayerTile::hasTexture):
2768         (WebCore::LayerTile::setContentsDirty):
2769         * platform/graphics/blackberry/LayerTileIndex.h: Added.
2770         (WebCore):
2771         (TileIndex):
2772         (WebCore::TileIndex::TileIndex):
2773         (WebCore::TileIndex::~TileIndex):
2774         (WebCore::TileIndex::i):
2775         (WebCore::TileIndex::j):
2776         (WebCore::TileIndex::setIndex):
2777         (WebCore::operator==):
2778         (WebCore::operator!=):
2779         (WTF):
2780         * platform/graphics/blackberry/LayerTiler.cpp: Added.
2781         (WebCore):
2782         (WebCore::transformPoint):
2783         (WebCore::defaultTileSize):
2784         (WebCore::LayerTiler::LayerTiler):
2785         (WebCore::LayerTiler::~LayerTiler):
2786         (WebCore::LayerTiler::layerWebKitThreadDestroyed):
2787         (WebCore::LayerTiler::layerCompositingThreadDestroyed):
2788         (WebCore::LayerTiler::setNeedsDisplay):
2789         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
2790         (WebCore::LayerTiler::shouldPerformRenderJob):
2791         (WebCore::LayerTiler::addTextureJob):
2792         (WebCore::LayerTiler::clearTextureJobs):
2793         (WebCore::LayerTiler::commitPendingTextureUploads):
2794         (WebCore::LayerTiler::layerVisibilityChanged):
2795         (WebCore::LayerTiler::uploadTexturesIfNeeded):
2796         (WebCore::LayerTiler::processTextureJob):
2797         (WebCore::LayerTiler::addTileJob):
2798         (WebCore::LayerTiler::performTileJob):
2799         (WebCore::LayerTiler::drawTextures):
2800         (WebCore::LayerTiler::drawMissingTextures):
2801         (WebCore::LayerTiler::drawTexturesInternal):
2802         (WebCore::LayerTiler::addRenderJob):
2803         (WebCore::LayerTiler::removeRenderJob):
2804         (WebCore::LayerTiler::deleteTextures):
2805         (WebCore::LayerTiler::pruneTextures):
2806         (WebCore::LayerTiler::updateTileSize):
2807         (WebCore::LayerTiler::disableTiling):
2808         (WebCore::LayerTiler::shouldPrefillTile):
2809         (WebCore::LayerTiler::indexOfTile):
2810         (WebCore::LayerTiler::originOfTile):
2811         (WebCore::LayerTiler::rectForTile):
2812         (WebCore::LayerTiler::hasDirtyTiles):
2813         (WebCore::LayerTiler::bindContentsTexture):
2814         * platform/graphics/blackberry/LayerTiler.h: Added.
2815         (WebCore):
2816         (LayerTiler):
2817         (WebCore::LayerTiler::create):
2818         (WebCore::LayerTiler::layer):
2819         (WebCore::LayerTiler::hasMissingTextures):
2820         (WebCore::LayerTiler::TextureJob::TextureJob):
2821         (TextureJob):
2822         (WebCore::LayerTiler::TextureJob::setContents):
2823         (WebCore::LayerTiler::TextureJob::setContentsToColor):
2824         (WebCore::LayerTiler::TextureJob::updateContents):
2825         (WebCore::LayerTiler::TextureJob::discardContents):
2826         (WebCore::LayerTiler::TextureJob::resizeContents):
2827         (WebCore::LayerTiler::TextureJob::dirtyContents):
2828         (WebCore::LayerTiler::TextureJob::isNull):
2829         (WebCore::LayerTiler::tileSize):
2830         (WebCore::LayerTiler::removeUpdateContentsJobs):
2831
2832 2012-03-09  Ian Vollick  <vollick@chromium.org>
2833
2834         [chromium] Ensure we use the correct time when notifying animation started
2835         https://bugs.webkit.org/show_bug.cgi?id=79537
2836
2837         Reviewed by James Robinson
2838
2839         Tested in CCLayerTreeHostTestAddAnimation
2840
2841         * platform/graphics/chromium/LayerChromium.cpp:
2842         (WebCore::LayerChromium::setAnimationEvent):
2843         * platform/graphics/chromium/LayerChromium.h:
2844         (LayerChromium):
2845         * platform/graphics/chromium/cc/CCAnimationEvents.cpp:
2846         (WebCore::CCAnimationStartedEvent::create):
2847         (WebCore::CCAnimationStartedEvent::CCAnimationStartedEvent):
2848         * platform/graphics/chromium/cc/CCAnimationEvents.h:
2849         (CCAnimationEvent):
2850         (CCAnimationStartedEvent):
2851         * platform/graphics/chromium/cc/CCInputHandler.h:
2852         (CCInputHandler):
2853         * platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.cpp:
2854         (WebCore::CCLayerAnimationControllerImpl::animate):
2855         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForNextTick):
2856         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForStartTime):
2857         (WebCore::CCLayerAnimationControllerImpl::startAnimationsWaitingForTargetAvailability):
2858         (WebCore::CCLayerAnimationControllerImpl::resolveConflicts):
2859         (WebCore::CCLayerAnimationControllerImpl::tickAnimations):
2860         * platform/graphics/chromium/cc/CCLayerAnimationControllerImpl.h:
2861         (CCLayerAnimationControllerImpl):
2862         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2863         (WebCore::CCLayerTreeHost::setAnimationEvents):
2864         (WebCore::CCLayerTreeHost::setAnimationEventsRecursive):
2865         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2866         (CCLayerTreeHost):
2867         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2868         (WebCore::CCLayerTreeHostImpl::animate):
2869         (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation):
2870         (WebCore::CCLayerTreeHostImpl::animateLayersRecursive):
2871         (WebCore::CCLayerTreeHostImpl::animatePageScale):
2872         (WebCore::CCLayerTreeHostImpl::animateLayers):
2873         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2874         (CCLayerTreeHostImplClient):
2875         (CCLayerTreeHostImpl):
2876         * platform/graphics/chromium/cc/CCPageScaleAnimation.cpp:
2877         (WebCore::CCPageScaleAnimation::create):
2878         (WebCore::CCPageScaleAnimation::CCPageScaleAnimation):
2879         (WebCore::CCPageScaleAnimation::zoomTo):
2880         (WebCore::CCPageScaleAnimation::zoomWithAnchor):
2881         (WebCore::CCPageScaleAnimation::scrollOffsetAtTime):
2882         (WebCore::CCPageScaleAnimation::pageScaleAtTime):
2883         (WebCore::CCPageScaleAnimation::isAnimationCompleteAtTime):
2884         (WebCore::CCPageScaleAnimation::progressRatioForTime):
2885         * platform/graphics/chromium/cc/CCPageScaleAnimation.h:
2886         (CCPageScaleAnimation):
2887         (WebCore::CCPageScaleAnimation::startTime):
2888         (WebCore::CCPageScaleAnimation::duration):
2889         (WebCore::CCPageScaleAnimation::endTime):
2890         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2891         (WebCore::CCSingleThreadProxy::startPageScaleAnimation):
2892         (WebCore::CCSingleThreadProxy::postAnimationEventsToMainThreadOnImplThread):
2893         (WebCore::CCSingleThreadProxy::doComposite):
2894         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
2895         (CCSingleThreadProxy):
2896         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2897         (WebCore::CCThreadProxy::startPageScaleAnimation):
2898         (WebCore::CCThreadProxy::requestStartPageScaleAnimationOnImplThread):
2899         (WebCore::CCThreadProxy::postAnimationEventsToMainThreadOnImplThread):
2900         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
2901         (WebCore::CCThreadProxy::setAnimationEvents):
2902         * platform/graphics/chromium/cc/CCThreadProxy.h:
2903         (CCThreadProxy):
2904
2905 2012-03-09  Zoltan Herczeg  <zherczeg@webkit.org>
2906
2907         Add SVGRenderingContext and move there the context related code from SVGRenderSupport
2908         https://bugs.webkit.org/show_bug.cgi?id=80413
2909
2910         Reviewed by Nikolas Zimmermann.
2911
2912         This is the first step of refactoring the rendering context for SVG. The
2913         previous context was stateless before, which means the cleanup phase
2914         needed to do a lot of checks to revert the initialization part and
2915         was unaware of failed inititalization. Future code can also add
2916         new local variables to the context.
2917
2918         This patch add a new SVGRenderingContext class, and moves there the context
2919         initialization / cleanup code from SVGRenderSupport. All build systems were
2920         updated.
2921
2922         * CMakeLists.txt:
2923         * GNUmakefile.list.am:
2924         * Target.pri:
2925         * WebCore.gypi:
2926         * WebCore.vcproj/WebCore.vcproj:
2927         * WebCore.xcodeproj/project.pbxproj:
2928         * rendering/svg/RenderSVGAllInOne.cpp:
2929         * rendering/svg/RenderSVGContainer.cpp:
2930         (WebCore::RenderSVGContainer::paint):
2931         * rendering/svg/RenderSVGForeignObject.cpp:
2932         (WebCore::RenderSVGForeignObject::paint):
2933         * rendering/svg/RenderSVGImage.cpp:
2934         (WebCore::RenderSVGImage::paint):
2935         * rendering/svg/RenderSVGRoot.cpp:
2936         (WebCore::RenderSVGRoot::paintReplaced):
2937         * rendering/svg/RenderSVGShape.cpp:
2938         (WebCore::RenderSVGShape::paint):
2939         * rendering/svg/SVGInlineFlowBox.cpp:
2940         (WebCore::SVGInlineFlowBox::paint):
2941         * rendering/svg/SVGRenderSupport.cpp:
2942         * rendering/svg/SVGRenderSupport.h:
2943         * rendering/svg/SVGRenderingContext.cpp: Added.
2944         (WebCore):
2945         (WebCore::isRenderingMaskImage):
2946         (WebCore::SVGRenderingContext::~SVGRenderingContext):
2947         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2948         * rendering/svg/SVGRenderingContext.h: Added.
2949         (WebCore):
2950         (SVGRenderingContext):
2951         (WebCore::SVGRenderingContext::SVGRenderingContext):
2952         (WebCore::SVGRenderingContext::isRenderingPrepared):
2953         * rendering/svg/SVGRootInlineBox.cpp:
2954         (WebCore::SVGRootInlineBox::paint):
2955
2956 2012-03-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2957
2958         Unreviewed, rolling out r110191, r110202, and r110279.
2959         http://trac.webkit.org/changeset/110191
2960         http://trac.webkit.org/changeset/110202
2961         http://trac.webkit.org/changeset/110279
2962         https://bugs.webkit.org/show_bug.cgi?id=80694
2963
2964         They broke !ENABLE(INSPECTOR) builds (Requested by Ossy on
2965         #webkit).
2966
2967         * WebCore.exp.in:
2968         * testing/Internals.cpp:
2969         * testing/Internals.h:
2970         (WebCore):
2971         (Internals):
2972         * testing/Internals.idl:
2973
2974 2012-03-09  Hans Wennborg  <hans@chromium.org>
2975
2976         Speech JavaScript API: add SpeechGrammar and SpeechGrammarList
2977         https://bugs.webkit.org/show_bug.cgi?id=80417
2978
2979         Reviewed by Adam Barth.
2980
2981         Implement SpeechGrammar and SpeechGrammarList.
2982         (Spec: http://speech-javascript-api-spec.googlecode.com/git/speechapi.html)
2983
2984         Test: fast/speech/scripted/speechgrammar-basics.html
2985
2986         * Modules/speech/DOMWindowSpeech.idl:
2987         * Modules/speech/SpeechGrammar.cpp:
2988         (WebCore):
2989         (WebCore::SpeechGrammar::create):
2990         (WebCore::SpeechGrammar::SpeechGrammar):
2991         * Modules/speech/SpeechGrammar.h:
2992         (WebCore):
2993         (SpeechGrammar):
2994         (WebCore::SpeechGrammar::src):
2995         (WebCore::SpeechGrammar::setSrc):
2996         (WebCore::SpeechGrammar::weight):
2997         (WebCore::SpeechGrammar::setWeight):
2998         * Modules/speech/SpeechGrammar.idl:
2999         * Modules/speech/SpeechGrammarList.cpp:
3000         (WebCore):
3001         (WebCore::SpeechGrammarList::create):
3002         (WebCore::SpeechGrammarList::item):
3003         (WebCore::SpeechGrammarList::addFromUri):
3004         (WebCore::SpeechGrammarList::addFromString):
3005         (WebCore::SpeechGrammarList::SpeechGrammarList):
3006         * Modules/speech/SpeechGrammarList.h:
3007         (WebCore):
3008         (SpeechGrammarList):
3009         (WebCore::SpeechGrammarList::length):
3010         * Modules/speech/SpeechGrammarList.idl:
3011         * WebCore.gypi:
3012
3013 2012-03-09  Sheriff Bot  <webkit.review.bot@gmail.com>
3014
3015         Unreviewed, rolling out r110269.
3016         http://trac.webkit.org/changeset/110269
3017         https://bugs.webkit.org/show_bug.cgi?id=80688
3018
3019         It made inspector/elements/highlight-node.html fail everywhere
3020         (Requested by Ossy on #webkit).
3021
3022         * testing/Internals.idl:
3023
3024 2012-03-07  Alexander Pavlov  <apavlov@chromium.org>
3025
3026         Web Inspector: [Styles] Click in the first line of rule while editing property starts a new property
3027         https://bugs.webkit.org/show_bug.cgi?id=80507
3028
3029         Reviewed by Vsevolod Vlasov.
3030
3031         * inspector/front-end/StylesSidebarPane.js:
3032         (WebInspector.StylePropertiesSection):
3033         (WebInspector.StylePropertiesSection.prototype._checkWillCancelEditing):
3034         (WebInspector.StylePropertiesSection.prototype._handleSelectorContainerClick):
3035         (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
3036         (WebInspector.StylePropertyTreeElement.prototype.onattach):
3037         (WebInspector.StylePropertyTreeElement.prototype):
3038
3039 2012-03-09  Mark Rowe  <mrowe@apple.com>
3040
3041         <rdar://problem/11012024> Fix the build by working around <rdar://problem/10710970>.
3042
3043         * platform/mac/RunLoopMac.mm:
3044         (WebCore::RunLoop::stop):
3045
3046 2012-03-09  Marja Hölttä  <marja@google.com>
3047
3048         FileInputType doesn't support (save|restore)FormControlState
3049         https://bugs.webkit.org/show_bug.cgi?id=80145
3050
3051         Reviewed by Kent Tamura.
3052
3053         This enables saving and restoring the state of file upload elements in
3054         unsubmitted forms.
3055
3056         Test: fast/forms/file/recover-file-input-in-unposted-form.html
3057
3058         * html/BaseCheckableInputType.cpp:
3059         (WebCore::BaseCheckableInputType::restoreFormControlState): non-const
3060         * html/BaseCheckableInputType.h:
3061         (BaseCheckableInputType): restoreFormControlState non-const
3062         * html/FileInputType.cpp:
3063         (WebCore::FileInputType::saveFormControlState): save chosen files
3064         (WebCore):
3065         (WebCore::FileInputType::restoreFormControlState): restore chosen files
3066         * html/FileInputType.h:
3067         (FileInputType): overwrite (save|restore)FormControlState
3068         * html/HiddenInputType.cpp:
3069         (WebCore::HiddenInputType::restoreFormControlState): non-const
3070         * html/HiddenInputType.h:
3071         (HiddenInputType): restoreFormControlState non-const
3072         * html/InputType.cpp:
3073         (WebCore::InputType::restoreFormControlState): non-const
3074         * html/InputType.h:
3075         (InputType): restoreFormControlState non-const
3076         * html/PasswordInputType.cpp:
3077         (WebCore::PasswordInputType::restoreFormControlState): non-const
3078         * html/PasswordInputType.h:
3079         (PasswordInputType): restoreFormControlState non-const
3080
3081 2012-03-08  Benjamin Poulain  <bpoulain@apple.com>
3082
3083         Base the access to CSSStyleDeclaration on the CSSPropertyID instead of the PropertyName
3084         https://bugs.webkit.org/show_bug.cgi?id=80461
3085
3086         Reviewed by Geoffrey Garen.
3087
3088         Previously, the acces to CSS Style properties was done through a NamedGetter. This caused
3089         the (slow) mapping between CSSPropertyName and CSSPropertyID to be done twice for every acess:
3090         1) canGetItemsForName() prior to the definition of the slot.
3091         2) nameGetter() called from the slot with CSSPropertyName to get the actual value.
3092
3093         This patch changes the access to be based on CSSPropertyID. The slot is defined with the
3094         CSSPropertyID as the customIndex, and the value can be accessed directly when the slot is
3095         called.
3096
3097         To handle the differences create by hadPixelOrPosPrefix, two nearly identical callback are defined,
3098         one for hadPixelOrPosPrefix, the other for !hadPixelOrPosPrefix.
3099
3100         The performance gain is about 19% when accessing CSS properties.
3101
3102         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3103         (WebCore::getPropertyValueFallback):
3104         (WebCore::cssPropertyGetterPixelOrPosPrefix):
3105         (WebCore):
3106         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
3107         (WebCore::cssPropertyGetter):
3108         (WebCore::cssPropertyGetterCallback):
3109         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
3110         (WebCore::JSCSSStyleDeclaration::getOwnPropertyDescriptorDelegate):
3111         * css/CSSStyleDeclaration.idl:
3112
3113 2012-03-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3114
3115         [Qt] Fix Qt minimal build
3116
3117         * testing/Internals.idl:
3118
3119 2012-03-08  James Robinson  <jamesr@chromium.org>
3120
3121         [chromium] Remove dead CoreGraphics code from chromium compositor implementation
3122         https://bugs.webkit.org/show_bug.cgi?id=80470
3123
3124         Reviewed by Adam Barth.
3125
3126         We haven't supported CoreGraphics as a raster backend in chromium for a few months and do not plan to do so, so
3127         it's time to remove the USE(CG) #ifdefs from our compositor and just rely on USE(SKIA) being set.  This also
3128         slightly simplifies how PlatformCanvas works.
3129
3130         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
3131         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
3132         * platform/graphics/chromium/ContentLayerChromium.cpp:
3133         (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded):
3134         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
3135         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
3136         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
3137         * platform/graphics/chromium/ImageLayerChromium.h:
3138         * platform/graphics/chromium/LayerChromium.cpp:
3139         * platform/graphics/chromium/LayerRendererChromium.cpp:
3140         (WebCore::LayerRendererChromium::initialize):
3141         * platform/graphics/chromium/LayerRendererChromium.h:
3142         * platform/graphics/chromium/PlatformCanvas.cpp:
3143         (WebCore::PlatformCanvas::createBackingCanvas):
3144         (WebCore::PlatformCanvas::AutoLocker::AutoLocker):
3145         (WebCore::PlatformCanvas::AutoLocker::~AutoLocker):
3146         (WebCore):
3147         (WebCore::PlatformCanvas::AutoLocker::pixels):
3148         (WebCore::PlatformCanvas::Painter::Painter):
3149         * platform/graphics/chromium/PlatformCanvas.h:
3150         (WebCore):
3151         (AutoLocker):
3152         (Painter):
3153         (PlatformCanvas):
3154         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
3155         * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h:
3156
3157 2012-03-08  Ryosuke Niwa  <rniwa@webkit.org>
3158
3159         Get rid of itemTypeAttributeChanged
3160         https://bugs.webkit.org/show_bug.cgi?id=80666
3161
3162         Reviewed by Adam Barth.
3163
3164         This function is unnecessay as we can invalidate m_microDataItemListCaches
3165         in invalidateCachesThatDependOnAttributes as done for other node lists.
3166
3167         * dom/Node.cpp:
3168         (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged):
3169         (WebCore::NodeListsNodeData::invalidateCachesThatDependOnAttributes):
3170         * dom/Node.h:
3171         * dom/NodeRareData.h:
3172         (NodeListsNodeData):
3173         * html/HTMLElement.cpp:
3174         (WebCore::HTMLElement::parseAttribute):
3175
3176 2012-03-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3177
3178         Unreviewed, rolling out r108616.
3179         http://trac.webkit.org/changeset/108616
3180         https://bugs.webkit.org/show_bug.cgi?id=80676
3181
3182         breaks animation on Safari welcome page (Requested by smfr on
3183         #webkit).
3184
3185         * page/animation/AnimationController.cpp:
3186         (WebCore::AnimationController::updateAnimations):
3187         * page/animation/AnimationControllerPrivate.h:
3188         (AnimationControllerPrivate):
3189
3190 2012-03-08  Benjamin Poulain  <benjamin@webkit.org>
3191
3192         Fix the build of WebKit with WTFURL following the removal of ForwardingHeaders/wtf
3193         https://bugs.webkit.org/show_bug.cgi?id=80652
3194
3195         Reviewed by Eric Seidel.
3196
3197         The fowarding headers have been removed, we must now use the full path to the header.
3198
3199         * platform/KURLWTFURLImpl.h:
3200
3201 2012-03-08  Emil A Eklund  <eae@chromium.org>
3202
3203         Change calcRadiiFor to IntSize
3204         https://bugs.webkit.org/show_bug.cgi?id=80655
3205
3206         Reviewed by Simon Fraser.
3207
3208         Borders and RoundedRect are both represented with pixel precision. As
3209         such it doesn't make sense for calcRadiiFor to use subpixel units, it
3210         just adds unnecessary type conversions.
3211
3212         No new tests, no new functionality.
3213
3214         * rendering/style/RenderStyle.cpp:
3215         (WebCore::calcRadiiFor):
3216
3217 2012-03-08  Adrienne Walker  <enne@google.com>
3218
3219         [chromium] Encapsulate mask layer settings in LayerChromium
3220         https://bugs.webkit.org/show_bug.cgi?id=80646
3221
3222         Reviewed by James Robinson.
3223
3224         If a WebLayer sets a mask layer, the setIsMask flag will not get set
3225         properly and the mask layer will not turn off tiling. This was only
3226         being set through GraphicsLayerChromium. Move this flag into
3227         LayerChromium so that it always gets set.
3228
3229         Test: LayoutTests/compositing/
3230
3231         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3232         (WebCore::GraphicsLayerChromium::setMaskLayer):
3233         * platform/graphics/chromium/LayerChromium.cpp:
3234         (WebCore::LayerChromium::setMaskLayer):
3235
3236 2012-03-08  Tony Chang  <tony@chromium.org>
3237
3238         margins on flex-align: baseline are double counted
3239         https://bugs.webkit.org/show_bug.cgi?id=80645
3240
3241         Reviewed by Ojan Vafai.
3242
3243         Fix a bug where we're counting the margins on baseline aligned
3244         children twice. Also add some test cases to make sure we handle
3245         wrap-reverse baseline alignment properly.
3246
3247         Tests: css3/flexbox/multiline-reverse-wrap-baseline-expected.html
3248                css3/flexbox/multiline-reverse-wrap-baseline.html
3249
3250         * rendering/RenderFlexibleBox.cpp:
3251         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
3252
3253 2012-03-08  Nat Duca  <nduca@chromium.org>
3254
3255         [chromium] Pass setVisibility to CCLayerTreeHostImpl regardless of LRC initialization status
3256         https://bugs.webkit.org/show_bug.cgi?id=80584
3257
3258         Reviewed by James Robinson.
3259
3260         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3261         (WebCore::CCLayerTreeHost::setVisible):
3262         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
3263         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3264         (WebCore::CCLayerTreeHostImpl::setVisible):
3265         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
3266
3267 2012-03-08  Ian Vollick  <vollick@chromium.org>
3268
3269         [chromium] Ensure that the cc thread animation framework continues to tick when the tab is backgrounded
3270         https://bugs.webkit.org/show_bug.cgi?id=77668
3271
3272         Reviewed by James Robinson.
3273
3274         Tested in CCLayerTreeHostTestTickAnimationWhileBackgrounded
3275
3276         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3277         (CCLayerTreeHostImplTimeSourceAdapter):
3278         (WebCore::CCLayerTreeHostImplTimeSourceAdapter::create):
3279         (WebCore::CCLayerTreeHostImplTimeSourceAdapter::~CCLayerTreeHostImplTimeSourceAdapter):
3280         (WebCore::CCLayerTreeHostImplTimeSourceAdapter::onTimerTick):
3281         (WebCore::CCLayerTreeHostImplTimeSourceAdapter::setActive):
3282         (WebCore::CCLayerTreeHostImplTimeSourceAdapter::CCLayerTreeHostImplTimeSourceAdapter):
3283         (WebCore):
3284         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3285         (WebCore::CCLayerTreeHostImpl::setVisible):
3286         (WebCore::CCLayerTreeHostImpl::animateLayers):
3287         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3288         (WebCore):
3289         (CCLayerTreeHostImpl):
3290         * platform/graphics/chromium/cc/CCProxy.cpp:
3291         (WebCore::CCProxy::currentThread):
3292         (WebCore):
3293         (WebCore::CCProxy::isMainThread):
3294         (WebCore::CCProxy::isImplThread):
3295         (WebCore::CCProxy::setCurrentThreadIsImplThread):
3296         * platform/graphics/chromium/cc/CCProxy.h:
3297         (CCProxy):
3298
3299 2012-03-08  Nico Weber  <thakis@chromium.org>
3300
3301         [chromium] Only build NEON files if target_arch=="arm"
3302         https://bugs.webkit.org/show_bug.cgi?id=80626
3303
3304         Currently, webcore_arm_neon will compile a bunch of files
3305         whose contents are completely ifdef'd away on non-arm, and
3306         then bundle all the generated empty .o files into a useless
3307         libwebcore_arm_neon.a. Don't do this.
3308
3309         Reviewed by Tony Chang.
3310
3311         * WebCore.gyp/WebCore.gyp:
3312         * WebCore.gypi:
3313
3314 2012-03-08 Nima Ghanavatian <nghanavatian@rim.com>
3315
3316         [BlackBerry] Fix warning in PlatformTouchEventBlackBerry.cpp
3317         https://bugs.webkit.org/show_bug.cgi?id=80621
3318
3319         Fixes a warning seen when control reaches the end of a
3320         non-void function.  Return TouchCancel in the 'default' case.
3321
3322         Reviewed by Rob Buis.
3323
3324         * platform/blackberry/PlatformTouchEventBlackBerry.cpp:
3325         (WebCore::touchEventType):
3326
3327 2012-03-08  Dana Jansens  <danakj@chromium.org>
3328
3329         [chromium] Using wrong scissor rect for draw culling
3330         https://bugs.webkit.org/show_bug.cgi?id=80624
3331
3332         Reviewed by Adrienne Walker.
3333
3334         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3335         (WebCore::CCLayerTreeHostImpl::optimizeRenderPasses):
3336
3337 2012-03-08  Andy Estes  <aestes@apple.com>
3338
3339         REGRESSION (r105396): Dragging an iWork document into icloud.com opens it in the Mac app instead of uploading it to icloud.com
3340         https://bugs.webkit.org/show_bug.cgi?id=79443
3341
3342         Reviewed by Ryosuke Niwa.
3343
3344         icloud.com registers a drop event handler that sets display:none on the
3345         file input element receiving the drop. After dispatching the drop event,
3346         DragController hit tests the position under the mouse to see if it is a
3347         file input element in need of receiving files. Since the file input
3348         element has lost its renderer, it cannot be found by hit testing, so
3349         the dropped file is never attached to the file input element, no change
3350         event fires, and no upload commences. We want these things to happen
3351         even if the element is no longer visible.
3352
3353         Since we already keep track of the file input element under the mouse
3354         via m_fileInputElementUnderMouse, this additional hit test is
3355         unnecessary. Use m_fileInputElementUnderMouse in concludeEditDrag()
3356         when dropping files.
3357
3358         Test: fast/events/file-input-hidden-in-ondrop.html
3359
3360         * page/DragController.cpp:
3361         (WebCore::DragController::concludeEditDrag): Use
3362         m_fileInputElementUnderMouse instead of the element returned by hit
3363         testing. Assert that m_fileInputElementUnderMouse equals the hit tested
3364         element unless m_fileInputElementUnderMouse doesn't have a renderer.
3365
3366 2012-03-08  Ryosuke Niwa  <rniwa@webkit.org>
3367
3368         Mac build fix for micro data API.
3369
3370         * Configurations/FeatureDefines.xcconfig:
3371         * WebCore.xcodeproj/project.pbxproj:
3372         * dom/Document.cpp:
3373         (WebCore::Document::removeCachedMicroDataItemList):
3374         * html/HTMLElement.idl:
3375
3376 2012-03-07  Jon Lee  <jonlee@apple.com>
3377
3378         Support [Custom] for static functions
3379         https://bugs.webkit.org/show_bug.cgi?id=80573
3380
3381         Reviewed by Kentaro Hara.
3382
3383         * bindings/scripts/CodeGeneratorJS.pm:
3384         (GenerateHeader): If the function is static, add static qualifier to cpp function.
3385         (GenerateImplementation): Reorganize the function to split out based on the static
3386         attribute, instead of checking for it at every line we output.
3387             If the function is static and not custom, the listed code should be the code in
3388         the rest of the function that did not have the static check. If it is custom, then
3389         we check the number of arguments, and then call the static impl function directly.
3390             If the function is not static, all of the "unless ($function->isStatic)" checks
3391         are removed since it is not necessary.
3392
3393         * bindings/scripts/test/TestObj.idl: Added new test case.
3394
3395         * bindings/scripts/test/JS/JSTestObj.cpp:
3396         (WebCore):
3397         (WebCore::jsTestObjConstructorFunctionClassMethod2):
3398         * bindings/scripts/test/JS/JSTestObj.h:
3399         (JSTestObj):
3400         (WebCore):
3401         * bindings/scripts/test/ObjC/DOMTestObj.h:
3402         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3403         (-[DOMTestObj classMethod2]):
3404         * bindings/scripts/test/V8/V8TestObj.cpp:
3405         (WebCore::ConfigureV8TestObjTemplate):
3406         * bindings/scripts/test/V8/V8TestObj.h:
3407         (V8TestObj):
3408
3409 2012-03-08  Mark Pilgrim  <pilgrim@chromium.org>
3410
3411         Collapse ENABLE(BLOB)|ENABLE(FILE_SYSTEM) to just ENABLE(BLOB)
3412         https://bugs.webkit.org/show_bug.cgi?id=80592
3413
3414         Reviewed by Adam Barth.
3415
3416         In anticipation of moving FILE_SYSTEM-related code to Modules/, we
3417         are collapsing combination BLOB/FILE_SYSTEM ifdefs to just
3418         BLOB. In other words, it is assumed from now on that you can not
3419         have FILE_SYSTEM support without BLOB support.
3420         
3421         No new tests, all existing tests pass.
3422
3423         * CMakeLists.txt:
3424         * dom/ScriptExecutionContext.cpp:
3425         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
3426         (WebCore):
3427         (WebCore::ScriptExecutionContext::fileThread):
3428         * dom/ScriptExecutionContext.h:
3429         (WebCore):
3430         (ScriptExecutionContext):
3431         * fileapi/AsyncFileStream.cpp:
3432         * fileapi/AsyncFileStream.h:
3433         * fileapi/FileError.h:
3434         * fileapi/FileException.cpp:
3435         * fileapi/FileException.h:
3436         * fileapi/FileThread.cpp:
3437         * fileapi/FileThread.h:
3438         * fileapi/OperationNotAllowedException.cpp:
3439         * fileapi/OperationNotAllowedException.h:
3440         * platform/FileStream.cpp:
3441         * platform/FileStream.h:
3442         * platform/FileStreamClient.h:
3443         * platform/SchemeRegistry.cpp:
3444         (WebCore::canDisplayOnlyIfCanRequestSchemes):
3445         (WebCore::CORSEnabledSchemes):
3446         (WebCore::SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs):
3447
3448 2012-03-08  James Robinson  <jamesr@chromium.org>
3449
3450         Use an explicit attribute to signal that a context prefers to use a discrete GPU
3451         https://bugs.webkit.org/show_bug.cgi?id=80639
3452
3453         Reviewed by Stephen White.
3454
3455         On platforms that support both integrated and discrete GPUs and can dynamically switch between the two, we
3456         sometimes have a specific preference for a given context. Specifically, contexts used for WebGL and canvas 2d
3457         acceleration should use the discrete GPU if available, but compositor contexts can run fine on an integrated
3458         GPU. Instead of attempting to infer the intent from examining other context attributes, this adds an explicit
3459         attribute to control this behavior.
3460
3461         * html/canvas/WebGLRenderingContext.cpp:
3462         (WebCore):
3463         (WebCore::WebGLRenderingContext::create):
3464         * platform/graphics/GraphicsContext3D.h:
3465         (WebCore::GraphicsContext3D::Attributes::Attributes):
3466         (Attributes):
3467         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
3468         (WebCore::SharedGraphicsContext3D::get):
3469
3470 2012-03-08  Andy Estes  <aestes@apple.com>
3471
3472         NULL renderer possible in WebCore::HTMLInputElement::setCanReceiveDroppedFiles()
3473         https://bugs.webkit.org/show_bug.cgi?id=80648
3474
3475         Reviewed by Simon Fraser.
3476
3477         Test: fast/events/input-element-display-none-in-dragleave-crash.html
3478
3479         * html/HTMLInputElement.cpp:
3480         (WebCore::HTMLInputElement::setCanReceiveDroppedFiles): NULL-check renderer().
3481
3482 2012-03-08  Jer Noble  <jer.noble@apple.com>
3483
3484         Yet another unreviewed build fix.
3485
3486         Remove an unneeded and Lion-defined window constant from WebCoreFullScreenWindow.
3487
3488         * platform/mac/WebCoreFullScreenWindow.mm:
3489         (-[WebCoreFullScreenWindow initWithContentRect:styleMask:backing:defer:]):
3490
3491 2012-03-08  Levi Weintraub  <leviw@chromium.org>
3492
3493         Switch absoluteRects, culledInlineAbsoluteRects, absoluteBoundingBoxRect, and addFocusRingRects back to integers
3494         https://bugs.webkit.org/show_bug.cgi?id=80545
3495
3496         Reviewed by Simon Fraser.
3497
3498         Converting the above functions, all of which return rects that represent on-screen rects, to IntRects from
3499         LayoutRects.
3500
3501         addFocusRingsRects generates a vector of rects that is handed off directly to the GraphicsContext to be
3502         drawn. Snapping the rects before adding them to the vector saves an extra pass through the vector.
3503
3504         absoluteRects and culledInlineAbsoluteRects are only used by addFocusRingRects, hasNonEmptyBoundingBox (only
3505         to check if they're empty), and absoluteBoundingBoxRect, which is exposed from WebCore and thus should be an
3506         IntRect anyways.
3507
3508         No new tests. No change in behavior.
3509
3510         * dom/Node.cpp:
3511         (WebCore::Node::hasNonEmptyBoundingBox):
3512         * dom/Range.cpp:
3513         (WebCore::Range::boundingBox):
3514         * rendering/RenderBlock.cpp:
3515         (WebCore::RenderBlock::absoluteRects):
3516         (WebCore::RenderBlock::addFocusRingRects):
3517         * rendering/RenderBlock.h:
3518         (RenderBlock):
3519         * rendering/RenderInline.cpp:
3520         (WebCore::RenderInline::absoluteRects):
3521         (WebCore::RenderInline::culledInlineAbsoluteRects):
3522         (WebCore::RenderInline::addFocusRingRects):
3523         * rendering/RenderInline.h:
3524         (RenderInline):
3525         * rendering/RenderListBox.cpp:
3526         (WebCore::RenderListBox::addFocusRingRects):
3527         * rendering/RenderListBox.h:
3528         (RenderListBox):
3529         * rendering/RenderObject.cpp:
3530         (WebCore::RenderObject::paintFocusRing):
3531         (WebCore::RenderObject::absoluteBoundingBoxRect):
3532         (WebCore::RenderObject::absoluteFocusRingQuads):
3533         * rendering/RenderObject.h:
3534         (WebCore::RenderObject::absoluteRects):
3535         (RenderObject):
3536         (WebCore::RenderObject::absoluteBoundingBoxRectIgnoringTransforms):
3537         (WebCore::RenderObject::addFocusRingRects):
3538         * rendering/RenderText.cpp:
3539         (WebCore::RenderText::absoluteRects):
3540         (WebCore::RenderText::absoluteRectsForRange):
3541         * rendering/RenderText.h:
3542         (RenderText):
3543         * rendering/RenderTextControl.cpp:
3544         (WebCore::RenderTextControl::addFocusRingRects):
3545         * rendering/RenderTextControl.h:
3546         (RenderTextControl):
3547         * rendering/RenderView.cpp:
3548         (WebCore::RenderView::absoluteRects):
3549         * rendering/RenderView.h:
3550         (RenderView):
3551         * rendering/svg/RenderSVGBlock.cpp:
3552         (WebCore::RenderSVGBlock::absoluteRects):
3553         * rendering/svg/RenderSVGBlock.h:
3554         (RenderSVGBlock):
3555         * rendering/svg/RenderSVGContainer.cpp:
3556         (WebCore::RenderSVGContainer::addFocusRingRects):
3557         * rendering/svg/RenderSVGContainer.h:
3558         (RenderSVGContainer):
3559         * rendering/svg/RenderSVGImage.cpp:
3560         (WebCore::RenderSVGImage::addFocusRingRects):
3561         * rendering/svg/RenderSVGImage.h:
3562         (RenderSVGImage):
3563         * rendering/svg/RenderSVGModelObject.cpp:
3564         (WebCore::RenderSVGModelObject::absoluteRects):
3565         * rendering/svg/RenderSVGModelObject.h:
3566         (RenderSVGModelObject):
3567         * rendering/svg/RenderSVGShape.cpp:
3568         (WebCore::RenderSVGShape::addFocusRingRects):
3569         * rendering/svg/RenderSVGShape.h:
3570         (RenderSVGShape):
3571
3572 2012-03-08  Erik Arvidsson  <arv@chromium.org>
3573
3574         [V8] Use EventNames instead of strings
3575         https://bugs.webkit.org/show_bug.cgi?id=80649
3576
3577         Reviewed by Ojan Vafai.
3578
3579         No new tests. Covered by existing tests.
3580
3581         * bindings/v8/V8AbstractEventListener.cpp:
3582         (WebCore::V8AbstractEventListener::invokeEventHandler):
3583
3584 2012-03-08  Tim Horton  <timothy_horton@apple.com>
3585
3586         No-op filter changes color output because of colorspace issues
3587         https://bugs.webkit.org/show_bug.cgi?id=72411
3588         <rdar://problem/10588374>
3589
3590         Reviewed by Dean Jackson.
3591
3592         Redefine "linear RGB" color space on Mac to mean linearized sRGB, instead of linear
3593         Generic RGB. This makes existing CG color matching equivalent to what other ports do via
3594         ImageBuffer::transformColorSpace (which only adjusts gamma, as we will now). Previously,
3595         we were also causing actual (non-gamma) color adjustments which were not reversible.
3596
3597         No new tests, covered by all existing SVG and CSS filter tests.
3598
3599         * Resources/linearSRGB.icc: Added.
3600         * WebCore.xcodeproj/project.pbxproj:
3601         * platform/graphics/cg/GraphicsContextCG.cpp:
3602         (WebCore::linearRGBColorSpaceRef):
3603
3604 2012-03-08  Beth Dakin  <bdakin@apple.com>
3605
3606         https://bugs.webkit.org/show_bug.cgi?id=80463
3607         RenderImage is using the wrong origin when calling addRelevantRepaintedObject
3608         -and corresponding-
3609         <rdar://problem/10970221>
3610
3611         Reviewed by Dan Bernstein.
3612
3613         Use the exact same rect that we paint with instead of the 
3614         visualOverflowRect() which does not always have a correct x and y.
3615         * rendering/RenderImage.cpp:
3616         (WebCore::RenderImage::paintReplaced):
3617         * rendering/RenderVideo.cpp:
3618         (WebCore::RenderVideo::paintReplaced):
3619
3620 2012-03-08  Jer Noble  <jer.noble@apple.com>
3621
3622         Full Screen Refactor Part 3: Animate into Full Screen mode using new animation classes.
3623         https://bugs.webkit.org/show_bug.cgi?id=78928
3624
3625         Reviewed by Anders Carlsson.
3626
3627         Move WKFullScreenWindow from WebKit2 into WebCore to be shared by WebKit2 and WebKit.
3628         * WebCore.xcodeproj/project.pbxproj:
3629         * platform/mac/WebCoreFullScreenWindow.h:
3630         * platform/mac/WebCoreFullScreenWindow.mm:
3631
3632         Add symbols for the following classes and functions to the export list:
3633             WebCoreFullScreenWindow
3634             WebWindowScaleAnimation
3635             WebWindowFadeAnimation
3636             ScrollView::contentsToScreen()
3637             RenderObject::localToContainerQuad()
3638             Document::setAnimatingFullScreen()
3639         * WebCore.exp.in:
3640
3641 2012-03-08  Jer Noble  <jer.noble@apple.com>
3642
3643         Full Screen Refactor Part 1: Remove special-case rendering code for Full Screen animation.
3644         https://bugs.webkit.org/show_bug.cgi?id=78925
3645
3646         Reviewed by John Sullivan.
3647
3648         No new tests; no net change in functionality so covered by existing tests.
3649
3650         The following functions had special case code for rendering full-screen elements removed:
3651         * dom/Document.cpp:
3652         (WebCore::Document::webkitWillEnterFullScreenForElement):
3653         (WebCore::Document::webkitDidEnterFullScreenForElement):
3654         (WebCore::Document::webkitWillExitFullScreenForElement):
3655         (WebCore::Document::webkitDidExitFullScreenForElement):
3656         (WebCore::Document::setAnimatingFullScreen):
3657         * page/FrameView.cpp:
3658         (WebCore):
3659         (WebCore::FrameView::updateCompositingLayers):
3660         (WebCore::FrameView::syncCompositingStateForThisFrame):
3661         * rendering/RenderLayerBacking.cpp:
3662         (WebCore::layerOrAncestorIsTransformed):
3663         (WebCore::RenderLayerBacking::updateCompositedBounds):
3664         * rendering/RenderLayerCompositor.cpp:
3665         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
3666         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
3667         * rendering/RenderLayerCompositor.h:
3668
3669 2012-03-08  Matt Lilek  <mrl@apple.com>
3670
3671         Don't enable VIDEO_TRACK on all OS X platforms
3672         https://bugs.webkit.org/show_bug.cgi?id=80635
3673
3674         Reviewed by Eric Carlson.
3675
3676         * Configurations/FeatureDefines.xcconfig:
3677
3678 2012-03-08  Tony Chang  <tony@chromium.org>
3679
3680         implement flexbox wrap-reverse
3681         https://bugs.webkit.org/show_bug.cgi?id=80552
3682
3683         Reviewed by Ojan Vafai.
3684
3685         No new tests, but additional coverage in:
3686             css3/flexbox/multiline-align.html
3687             css3/flexbox/multiline-pack.html
3688             css3/flexbox/multiline.html
3689
3690         * rendering/RenderFlexibleBox.cpp:
3691         (WebCore::RenderFlexibleBox::WrapReverseContext::WrapReverseContext): Helper struct to hold information needed for reversing
3692         the order of lines.
3693         (RenderFlexibleBox::WrapReverseContext):
3694         (WebCore::RenderFlexibleBox::WrapReverseContext::addCrossAxisOffset):
3695         (WebCore::RenderFlexibleBox::WrapReverseContext::addNumberOfChildrenOnLine):
3696         (WebCore::RenderFlexibleBox::WrapReverseContext::lineCrossAxisDelta): Computes the number of pixels to move a line.
3697         (WebCore):
3698         (WebCore::RenderFlexibleBox::layoutFlexItems): Call flipForWrapReverse if needed. This happens
3699         before flipForRightToLeftColumn because otherwise the crossAxisOffsets will be wrong.
3700         (WebCore::flexAlignForChild):
3701         (WebCore::RenderFlexibleBox::alignChildren): Flip alignment in wrap-reverse because the cross directions are flipped.
3702         (WebCore::RenderFlexibleBox::flipForWrapReverse): Flip each line.
3703         * rendering/RenderFlexibleBox.h:
3704         (RenderFlexibleBox):
3705
3706 2012-03-08  Adam Klein  <adamk@chromium.org>
3707
3708         Remove InDocumentFlag manipulation methods from Node interface
3709         https://bugs.webkit.org/show_bug.cgi?id=80612
3710
3711         Reviewed by Ryosuke Niwa.
3712
3713         This is a first step towards tightening up Node::inDocument() to match
3714         the actual in-document-tree state (see r108152 for the sort of bug
3715         resulting from those not matching).
3716
3717         No new tests, refactoring only.
3718
3719         * dom/ContainerNode.cpp:
3720         (WebCore::ContainerNode::removedFromDocument): Remove duplicate call to clearInDocument:
3721         the call to Node::removedFromDocument three lines above will clear the flag.
3722         * dom/Document.cpp:
3723         (WebCore::Document::Document): Call ContainerNode constructor with InDocumentFlag always set
3724         instead of calling setInDocument.
3725         * dom/Node.cpp:
3726         (WebCore::Node::insertedIntoDocument): Inline setInDocument (now the only caller).
3727         (WebCore::Node::removedFromDocument): Inline clearInDocument (now the only caller).
3728         * dom/Node.h: Remove setInDocument & clearInDocument, add new CreateDocument ConstructionType.
3729
3730 2012-03-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3731
3732         [Qt] Try to fix the Snow Leopard build
3733
3734         If the build is running under sh, echo -n does not empty the file.
3735
3736         * DerivedSources.pri:
3737
3738 2012-03-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3739
3740         Prospective build fix for Qt minimal after r110191
3741
3742         https://bugs.webkit.org/show_bug.cgi?id=80338
3743
3744         * testing/Internals.cpp:
3745         (WebCore):
3746         * testing/Internals.h:
3747         (Internals):
3748
3749 2012-03-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3750
3751         [Qt] Prospective Windows build fix
3752
3753         Don't assume that windows-builds will always run inside a cmd.exe shell.
3754
3755         * DerivedSources.pri:
3756
3757 2012-03-08  Vivek Galatage  <vivekgalatage@gmail.com>
3758
3759         Web Inspector: Creating a selector for class names with trailing spaces results with two dots instead of one
3760         https://bugs.webkit.org/show_bug.cgi?id=80529
3761
3762         Trim the className before replacing the whitespaces with dot "."
3763
3764         Reviewed by Pavel Feldman.
3765
3766         No new tests.
3767
3768         * inspector/front-end/DOMAgent.js:
3769         (WebInspector.DOMNode.prototype.appropriateSelectorFor):
3770
3771 2012-03-08  Dan Bernstein  <mitz@apple.com>
3772
3773         <rdar://problem/10981173> Dashboard regions should not be in device space
3774
3775         Reviewed by John Sullivan.
3776
3777         Test: TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm
3778
3779         * rendering/RenderInline.cpp:
3780         (WebCore::RenderInline::addDashboardRegions): Stop applying the device scale factor to
3781         Dashboard regions.
3782         * rendering/RenderObject.cpp:
3783         (WebCore::RenderObject::addDashboardRegions): Ditto.
3784
3785 2012-03-08  Cem Kocagil  <cem.kocagil@gmail.com>
3786
3787         Web Inspector: Cannot insert right curly bracket on some keyboards
3788         https://bugs.webkit.org/show_bug.cgi?id=80474
3789
3790         Make sure other modifiers are not pressed
3791
3792         Reviewed by Pavel Feldman
3793
3794         * inspector/front-end/inspector.js:
3795         (WebInspector.documentKeyDown):
3796
3797 2012-03-08  Max Vujovic  <mvujovic@adobe.com>
3798
3799         Add a method to window.internals to enable testing of inspector highlight rects
3800         https://bugs.webkit.org/show_bug.cgi?id=80338
3801
3802         Reviewed by Pavel Feldman.
3803
3804         Add window.internals.inspectorHighlightRects, a method which makes it possible to test the
3805         positions and sizes of inspector highlight rects.
3806
3807         Test: inspector/elements/highlight-node.html
3808
3809         * WebCore.exp.in: Export symbols.
3810         * testing/Internals.cpp:
3811         (WebCore::Internals::inspectorHighlightRects): Call InspectorController::getHighlight and
3812         return the highlight's quads as a ClientRectList.
3813         (WebCore):
3814         * testing/Internals.h:
3815         (WebCore):
3816         (Internals):
3817         * testing/Internals.idl:
3818
3819             Add inspectorHighlightRects to the window.internals interface.
3820
3821 2012-03-08  Antti Koivisto  <antti@apple.com>
3822
3823         https://bugs.webkit.org/show_bug.cgi?id=80370
3824         Enable matched declaration caching for elements with a style attribute
3825
3826         Reviewed by Andreas Kling
3827
3828         Make the property set for style attribute immutable as long as there is no CSSOM
3829         wrapper for it. If the style attribute changes we create a new property set instead
3830         of recycling the old one. This way the property sets can be made cacheable as long
3831         as there is no CSSOM wrapper that would allow uncontrolled modifications. Constructing
3832         the wrapper disables caching.
3833         
3834         Made StyledElement::inlineStyle() and StyledElement::ensureInlineStyle() return a const
3835         StylePropertySet so making accidental modifications difficult. Also dropped *Decl from
3836         the names.
3837         
3838         Fixed two unrelated bugs that this exposed.
3839
3840         * css/CSSStyleSelector.cpp:
3841         
3842             Don't allow caching of document element style if writingModeSetOnDocumentElement() bit is set.
3843             Tested by fast/multicol/vertical-rl/break-properties.html.
3844         
3845         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3846         * css/StylePropertySet.h:
3847         (StylePropertySet):
3848         (WebCore::StylePropertySet::hasCSSOMWrapper):
3849         * dom/Element.cpp:
3850         (WebCore::Element::recalcStyle):
3851         
3852             Invalidate the matched properties cache if the document has rem units and the root font changes.
3853             Tested by fast/css/rem-dynamic-scaling.html.
3854         
3855         * dom/ElementAttributeData.cpp:
3856         (WebCore):
3857         (WebCore::ElementAttributeData::ensureInlineStyle):
3858         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
3859         (WebCore::ElementAttributeData::updateInlineStyleAvoidingMutation):
3860         (WebCore::ElementAttributeData::destroyInlineStyle):
3861         * dom/ElementAttributeData.h:
3862         (WebCore::ElementAttributeData::inlineStyle):
3863         (ElementAttributeData):
3864         * dom/StyledElement.cpp:
3865         (WebCore::StyledElement::updateStyleAttribute):
3866         (WebCore::StyledElement::~StyledElement):
3867         (WebCore):
3868         (WebCore::StyledElement::style):
3869         (WebCore::StyledElement::parseAttribute):
3870         (WebCore::StyledElement::setInlineStyleProperty):
3871         (WebCore::StyledElement::removeInlineStyleProperty):
3872         (WebCore::StyledElement::addSubresourceAttributeURLs):
3873         * dom/StyledElement.h:
3874         (WebCore::StyledElement::inlineStyle):
3875         (WebCore::StyledElement::ensureInlineStyle):
3876         (StyledElement):
3877         (WebCore::StyledElement::destroyInlineStyle):
3878         * editing/ApplyStyleCommand.cpp:
3879         (WebCore::hasNoAttributeOrOnlyStyleAttribute):
3880         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
3881         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
3882         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
3883         (WebCore::ApplyStyleCommand::removeCSSStyle):
3884         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
3885         (WebCore::ApplyStyleCommand::addBlockStyle):
3886         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
3887         * editing/EditingStyle.cpp:
3888         (WebCore::HTMLElementEquivalent::propertyExistsInStyle):
3889         (HTMLTextDecorationEquivalent):
3890         (WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle):
3891         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
3892         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
3893         (WebCore::EditingStyle::mergeInlineStyleOfElement):
3894         (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl):
3895         (WebCore::EditingStyle::mergeStyle):
3896         * editing/EditingStyle.h:
3897         (EditingStyle):
3898         * editing/RemoveCSSPropertyCommand.cpp:
3899         (WebCore::RemoveCSSPropertyCommand::doApply):
3900         * editing/ReplaceSelectionCommand.cpp:
3901         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
3902         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
3903         * editing/markup.cpp:
3904         (WebCore::StyledMarkupAccumulator::appendElement):
3905         (WebCore::styleFromMatchedRulesAndInlineDecl):
3906         * html/HTMLElement.cpp:
3907         (WebCore::StyledElement::copyNonAttributeProperties):
3908         * html/canvas/CanvasStyle.cpp:
3909         (WebCore::currentColor):
3910         * page/PageSerializer.cpp:
3911         (WebCore::PageSerializer::serializeFrame):
3912         (WebCore::PageSerializer::retrieveResourcesForProperties):
3913         * page/PageSerializer.h:
3914         (PageSerializer):
3915         * rendering/RenderTreeAsText.cpp:
3916         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
3917
3918 2012-03-08  Scott Byer  <scottbyer@chromium.org>
3919
3920         Have ScrollAnimatorNone use requestAnimationFrame
3921         https://bugs.webkit.org/show_bug.cgi?id=78938
3922
3923         Reviewed by James Robinson.
3924
3925         No new tests. Passes Chromium webkit_unit_tests.
3926
3927         * page/FrameView.cpp:
3928         (WebCore::FrameView::serviceScriptedAnimations):
3929         * platform/ScrollAnimator.h:
3930         (WebCore::ScrollAnimator::serviceScrollAnimations):
3931         * platform/ScrollAnimatorNone.cpp:
3932         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
3933         (WebCore::ScrollAnimatorNone::scroll):
3934         (WebCore::ScrollAnimatorNone::cancelAnimations):
3935         (WebCore):
3936         (WebCore::ScrollAnimatorNone::serviceScrollAnimations):
3937         (WebCore::ScrollAnimatorNone::animationTimerFired):
3938         (WebCore::ScrollAnimatorNone::startNextTimer):
3939         (WebCore::ScrollAnimatorNone::animationTimerActive):
3940         (WebCore::ScrollAnimatorNone::stopAnimationTimerIfNeeded):
3941         * platform/ScrollAnimatorNone.h:
3942         (ScrollAnimatorNone):
3943         * platform/ScrollableArea.cpp:
3944         (WebCore::ScrollableArea::serviceScrollAnimations):
3945         (WebCore):
3946         * platform/ScrollableArea.h:
3947         (WebCore):
3948         (ScrollableArea):
3949         * rendering/RenderLayer.h:
3950         (WebCore::RenderLayer::hostWindow):
3951         (RenderLayer):
3952         * rendering/RenderListBox.h:
3953         (WebCore::RenderListBox::hostWindow):
3954         (RenderListBox):
3955
3956 2012-03-08  Dan Bernstein  <mitz@apple.com>
3957
3958         REGRESSION (r109964): Assertion failure (!isUndefined()) in Length::getIntValue() when a Dashboard region is specified without offsets
3959         https://bugs.webkit.org/show_bug.cgi?id=80614
3960
3961         Reviewed by Beth Dakin.
3962
3963         Test: fast/css/dashboard-regions-undefined-length-assertion.html
3964
3965         * css/CSSStyleSelector.cpp:
3966         (WebCore::CSSStyleSelector::collectMatchingRulesForList): Reverted to setting zero lengths,
3967         rather than Undefined ones, in the RenderStyle when offsets are not given.
3968
3969 2012-03-08  Mikkel Kruse Johnsen  <mikkel@linet.dk>
3970
3971         WebKitGtk+ fails to build on win32 against GTK3
3972         https://bugs.webkit.org/show_bug.cgi?id=63919
3973
3974         Reviewed by Gustavo Noronha Silva.
3975
3976         * plugins/gtk/PluginViewGtk.cpp: Don't use gtk_socket_new with GTK3 on Win32
3977         (WebCore::PluginView::platformStart):
3978
3979 2012-03-08  Jason Liu  <jason.liu@torchmobile.com.cn>
3980
3981         [BlackBerry]New feature: support about:cookie for internal build.
3982         https://bugs.webkit.org/show_bug.cgi?id=80367
3983
3984         Reviewed by Antonio Gomes.
3985
3986         No new tests.
3987
3988         * platform/blackberry/CookieManager.cpp:
3989         (WebCore::CookieManager::generateHtmlFragmentForCookies):
3990         (WebCore):
3991         * platform/blackberry/CookieManager.h:
3992         * platform/network/blackberry/NetworkJob.cpp:
3993         (WebCore::NetworkJob::handleAbout):
3994
3995 2012-03-08  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3996
3997         Make elements with attributes smaller by eliminating the m_element back pointer in NamedNodeMap
3998         https://bugs.webkit.org/show_bug.cgi?id=75069
3999
4000         Reviewed by Ryosuke Niwa.
4001
4002         NamedNodeMap is an exposed DOM representation of an element's attribute storage. As part of
4003         its implementation it keeps a pointer to its associated Element plus all the attribute
4004         storage.
4005
4006         This commit separate the two things: NamedNodeMap is now a wrapper to Element, containing
4007         only the pointer, and the attribute storage is now owned by Element directly. Since usage
4008         of NamedNodeMap is not very common, it can be stored in ElementRareData. As a result, most
4009         elements with attributes now don't need to allocate memory for that extra pointer in
4010         NamedNodeMap.
4011
4012         One consequence of this implementation is that now we explicitly don't support
4013         DocumentType.notations and DocumentType.entities. They weren't supported before, a
4014         NamedNodeMap was never created for those attributes -- and some NamedNodeMap functions
4015         wouldn't work correctly without an associated Element.
4016
4017         NamedNodeMap itself was cleaned up, as well as unnecessary references to it removed in the
4018         code and comments.
4019
4020         No new tests and should not change results for existing tests.
4021
4022         * dom/Attribute.h:
4023         (WebCore):
4024         * dom/DocumentType.h:
4025         (DocumentType): Point out that we don't support does attributes yet.
4026         * dom/Element.cpp:
4027         (WebCore::Element::~Element): Detaching the NamedNodeMap is no longer necessary because it
4028         will be destroyed. We still detach the potential Attrs inside our Attributes by using
4029         clearAttributes().
4030         (WebCore::Element::attributes): Looks in ElementRareData now. Note we ensure the creation
4031         of the attribute storage.
4032         (WebCore):
4033         (WebCore::Element::getAttribute):
4034         (WebCore::Element::setAttributeInternal):
4035         (WebCore::Element::parserSetAttributes):
4036         (WebCore::Element::hasAttributes):
4037         (WebCore::Element::createAttributeData):
4038         (WebCore::Element::insertedIntoDocument):
4039         (WebCore::Element::removedFromDocument):
4040         (WebCore::Element::getURLAttribute):
4041         (WebCore::Element::getNonEmptyURLAttribute):
4042         (WebCore::Element::hasNamedNodeMap): Helper function for Node::dumpStatistics().
4043         * dom/Element.h:
4044         (Element):
4045         (WebCore::Element::attributeData):
4046         (WebCore::Element::ensureAttributeData):
4047         (WebCore::Element::fastHasAttribute):
4048         (WebCore::Element::fastGetAttribute):
4049         (WebCore::Element::hasAttributesWithoutUpdate):
4050         (WebCore::Element::idForStyleResolution):
4051         (WebCore::Element::attributeCount):
4052         (WebCore::Element::attributeItem):
4053         (WebCore::Element::getAttributeItem):
4054         * dom/ElementAttributeData.h:
4055         (WebCore::ElementAttributeData::create):
4056         (ElementAttributeData):
4057         * dom/ElementRareData.h:
4058         (ElementRareData):
4059         * dom/NamedNodeMap.cpp: Rewriting now that m_attributeData is not a member, using m_element
4060         methods when possible.
4061         (WebCore::NamedNodeMap::ref):
4062         (WebCore::NamedNodeMap::deref):
4063         (WebCore::NamedNodeMap::getNamedItem):
4064         (WebCore::NamedNodeMap::getNamedItemNS):
4065         (WebCore::NamedNodeMap::removeNamedItem):
4066         (WebCore::NamedNodeMap::removeNamedItemNS):
4067         (WebCore::NamedNodeMap::setNamedItem):
4068         (WebCore::NamedNodeMap::item):
4069         (WebCore::NamedNodeMap::length):
4070         * dom/NamedNodeMap.h:
4071         (WebCore):
4072         (WebCore::NamedNodeMap::create):
4073         (NamedNodeMap):
4074         (WebCore::NamedNodeMap::NamedNodeMap): Instead of asserting m_element in every function, we
4075         now assert only in the constructor.
4076         * dom/Node.cpp:
4077         (WebCore::Node::dumpStatistics): Add a counter for elements with rare data, this allows us
4078         compare more clearly the impact of moving NamedNodeMap there.
4079         (WebCore::Node::isEqualNode): Remove use of mapsEquivalent(). It was dead code, because
4080         both entities and notations were always NULL.
4081         (WebCore::Node::compareDocumentPosition):
4082         * inspector/DOMPatchSupport.h:
4083         (WebCore):
4084         * svg/SVGElement.cpp:
4085         (WebCore::SVGElement::attributeChanged):
4086
4087 2012-03-08  Robin Cao  <robin.cao@torchmobile.com.cn>
4088
4089         [BlackBerry] Upstream WebGL related files from platform/graphics
4090         https://bugs.webkit.org/show_bug.cgi?id=79876
4091
4092         Reviewed by Rob Buis.
4093
4094         Initial upstream, no new tests.
4095
4096         * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp: Added.
4097         (WebCore):
4098         (DrawingBufferInternal):
4099         (WebCore::generateColorTexture):
4100         (WebCore::DrawingBuffer::DrawingBuffer):
4101         (WebCore::DrawingBuffer::~DrawingBuffer):
4102         (WebCore::DrawingBuffer::publishToPlatformLayer):
4103         (WebCore::DrawingBuffer::reset):
4104         (WebCore::DrawingBuffer::platformLayer):
4105         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp: Added.
4106         (WebCore):
4107         (WebCore::GraphicsContext3D::create):
4108         (WebCore::GraphicsContext3D::GraphicsContext3D):
4109         (WebCore::GraphicsContext3D::~GraphicsContext3D):
4110         (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer):
4111         (WebCore::GraphicsContext3D::makeContextCurrent):
4112         (WebCore::GraphicsContext3D::isGLES2Compliant):
4113         (WebCore::GraphicsContext3D::isGLES2NPOTStrict):
4114         (WebCore::GraphicsContext3D::isErrorGeneratedOnOutOfBoundsAccesses):
4115         (WebCore::GraphicsContext3D::platformTexture):
4116         (WebCore::GraphicsContext3D::platformLayer):
4117         (WebCore::GraphicsContext3D::paintToCanvas):
4118         (WebCore::GraphicsContext3D::setContextLostCallback):