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