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