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