Rename [ConvertUndefinedOrNullToNullString] to
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-02-02  Kentaro Hara  <haraken@chromium.org>
2
3         Rename [ConvertUndefinedOrNullToNullString] to
4         [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString]
5         https://bugs.webkit.org/show_bug.cgi?id=77611
6
7         Reviewed by Adam Barth.
8
9         This patch renames [ConvertUndefinedOrNullToNullString] to
10         [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString], according to the spec
11         (http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs,
12         http://dev.w3.org/2006/webapi/WebIDL/#TreatUndefinedAs).
13
14         No tests. No changes in behavior.
15
16         * bindings/scripts/CodeGeneratorJS.pm:
17         (JSValueToNative):
18         * bindings/scripts/CodeGeneratorV8.pm:
19         (GetNativeTypeFromSignature):
20         * dom/DOMImplementation.idl:
21         * dom/Document.idl:
22         * fileapi/Blob.idl:
23         * fileapi/DirectoryEntry.idl:
24         * fileapi/DirectoryEntrySync.idl:
25         * fileapi/Entry.idl:
26         * fileapi/EntrySync.idl:
27         * fileapi/WebKitBlobBuilder.idl:
28         * html/HTMLButtonElement.idl:
29         * html/HTMLCanvasElement.idl:
30         * html/HTMLFieldSetElement.idl:
31         * html/HTMLInputElement.idl:
32         * html/HTMLKeygenElement.idl:
33         * html/HTMLObjectElement.idl:
34         * html/HTMLOutputElement.idl:
35         * html/HTMLSelectElement.idl:
36         * html/HTMLTextAreaElement.idl:
37         * page/Console.idl:
38         * page/DOMWindow.idl:
39
40         * bindings/scripts/test/TestObj.idl: No changes in run-bindings-tests results.
41
42 2012-02-02  Anders Carlsson  <andersca@apple.com>
43
44         NPAPI will not send mouse up events when mouse is outside plugin area
45         https://bugs.webkit.org/show_bug.cgi?id=77657
46         <rdar://problem/10160674>
47
48         Reviewed by Andreas Kling.
49
50         Export EventHandler::setCapturingMouseEventsNode.
51
52         * WebCore.exp.in:
53
54 2012-02-02  Antti Koivisto  <antti@apple.com>
55
56         Move remaining implementation from CSSStyleDeclaration to subclasses 
57         https://bugs.webkit.org/show_bug.cgi?id=77621
58
59         Reviewed by Andreas Kling.
60
61         This leaves CSSStyleDeclaration a near-pure CSSOM interface.
62
63         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
64         (WebCore::isCSSPropertyName):
65         (WebCore::JSCSSStyleDeclaration::putDelegate):
66         * css/CSSComputedStyleDeclaration.cpp:
67         (WebCore::CSSComputedStyleDeclaration::parentRule):
68         (WebCore):
69         * css/CSSComputedStyleDeclaration.h:
70         (CSSComputedStyleDeclaration):
71         * css/CSSMutableStyleDeclaration.cpp:
72         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
73         (WebCore::CSSMutableStyleDeclaration::contextStyleSheet):
74         (WebCore):
75         (WebCore::CSSMutableStyleDeclaration::parentRule):
76         * css/CSSMutableStyleDeclaration.h:
77         (WebCore::CSSMutableStyleDeclaration::isInlineStyleDeclaration):
78         (WebCore::CSSMutableStyleDeclaration::parentRuleInternal):
79         (WebCore::CSSMutableStyleDeclaration::clearParentRule):
80         (CSSMutableStyleDeclaration):
81         (WebCore::CSSMutableStyleDeclaration::parentElement):
82         (WebCore::CSSMutableStyleDeclaration::clearParentElement):
83         (WebCore::CSSMutableStyleDeclaration::parentStyleSheet):
84         * css/CSSParser.cpp:
85         (WebCore::parseColorValue):
86         (WebCore::parseSimpleLengthValue):
87         (WebCore::CSSParser::parseValue):
88         (WebCore::CSSParser::parseDeclaration):
89         * css/CSSStyleDeclaration.cpp:
90         (WebCore):
91         * css/CSSStyleDeclaration.h:
92         (CSSStyleDeclaration):
93         (WebCore::CSSStyleDeclaration::parentStyleSheet):
94         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
95         * css/CSSStyleRule.cpp:
96         (WebCore::CSSStyleRule::setSelectorText):
97                             
98             Eliminate unnecessary call to CSSMutableStyleDeclaration::parentStyleSheet()
99
100         * css/CSSStyleRule.h:
101         (WebCore::CSSStyleRule::setDeclaration):
102         * css/CSSStyleSelector.cpp:
103         (WebCore::isInsideRegionRule):
104         (WebCore::CSSStyleSelector::applyDeclaration):
105         * css/WebKitCSSKeyframeRule.cpp:
106         (WebCore::WebKitCSSKeyframeRule::setDeclaration):
107         * page/PageSerializer.cpp:
108         (WebCore::PageSerializer::serializeFrame):
109         (WebCore::PageSerializer::serializeCSSStyleSheet):
110         (WebCore::PageSerializer::retrieveResourcesForCSSRule):
111         (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration):
112         * page/PageSerializer.h:
113         
114             Eliminate unnecessary call to CSSMutableStyleDeclaration::parentStyleSheet()
115         
116         (WebCore):
117         (PageSerializer):
118
119 2012-02-02  Chris Marrin  <cmarrin@apple.com>
120
121         Turn on CSS Filters on Windows
122         https://bugs.webkit.org/show_bug.cgi?id=76667
123
124         Turning on CSS_FILTERS flag for Windows and fixed a couple of resultant build errors
125
126         Reviewed by Adele Peterson.
127
128         * WebCore.vcproj/copyForwardingHeaders.cmd:
129         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
130         (PlatformCALayer::setFilters):
131         (PlatformCALayer::filtersCanBeComposited):
132
133 2012-02-02  Anders Carlsson  <andersca@apple.com>
134
135         Move ScrollingThread to its own file
136         https://bugs.webkit.org/show_bug.cgi?id=77652
137
138         Reviewed by Sam Weinig.
139
140         This just shuffles some classes around and makes ScrollingCoordinator call into ScrollingThread.
141         Hopefully we'll be able to make ScrollingThread use the new WebCore::RunLoop class eventually.
142
143         * WebCore.xcodeproj/project.pbxproj:
144         * page/scrolling/ScrollingCoordinator.cpp:
145         (WebCore::ScrollingCoordinator::handleWheelEvent):
146         * page/scrolling/ScrollingCoordinator.h:
147         (ScrollingCoordinator):
148         * page/scrolling/ScrollingThread.cpp: Added.
149         (WebCore):
150         (WebCore::ScrollingThread::ScrollingThread):
151         (WebCore::ScrollingThread::isCurrentThread):
152         (WebCore::ScrollingThread::dispatch):
153         (WebCore::ScrollingThread::shared):
154         (WebCore::ScrollingThread::createThreadIfNeeded):
155         (WebCore::ScrollingThread::threadCallback):
156         (WebCore::ScrollingThread::threadBody):
157         (WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread):
158         * page/scrolling/ScrollingThread.h: Added.
159         (WebCore):
160         (ScrollingThread):
161         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
162         (WebCore::ScrollingCoordinator::scrollByOnScrollingThread):
163         (WebCore::ScrollingCoordinator::updateMainFrameScrollLayerPositionOnScrollingThread):
164         * page/scrolling/mac/ScrollingThreadMac.mm: Added.
165         (WebCore):
166         (WebCore::ScrollingThread::initializeRunLoop):
167         (WebCore::ScrollingThread::wakeUpRunLoop):
168         (WebCore::ScrollingThread::threadRunLoopSourceCallback):
169
170 2012-02-02  Sheriff Bot  <webkit.review.bot@gmail.com>
171
172         Unreviewed, rolling out r106551.
173         http://trac.webkit.org/changeset/106551
174         https://bugs.webkit.org/show_bug.cgi?id=77648
175
176         Breaking mac and gtk tests due to font differences. (Requested
177         by _pdr_ on #webkit).
178
179         * platform/graphics/SVGGlyph.cpp:
180         (WebCore::charactersWithArabicForm):
181         * svg/SVGFontData.cpp:
182         (WebCore::SVGFontData::applySVGGlyphSelection):
183         * svg/SVGFontData.h:
184         (SVGFontData):
185
186 2012-02-02  Alexander Pavlov  <apavlov@chromium.org>
187
188         Web Inspector: [REGRESSION] Slow continuous DOM traversal with Up/Down keys
189         https://bugs.webkit.org/show_bug.cgi?id=77643
190
191         Reviewed by Pavel Feldman.
192
193         Test: inspector/styles/updates-during-dom-traversal.html
194
195         * inspector/front-end/StylesSidebarPane.js:
196         (WebInspector.StylesSidebarPane.prototype._executeRebuildUpdate):
197
198 2012-02-02  Claudio Saavedra  <csaavedra@igalia.com> and Martin Robinson  <mrobinson@igalia.com>
199
200         [GTK] WebKitWebView won't work in a GtkOffscreenWindow
201         https://bugs.webkit.org/show_bug.cgi?id=76911
202
203         Reviewed by Philippe Normand.
204
205         * platform/gtk/GtkUtilities.cpp:
206         (WebCore::widgetIsOnscreenToplevelWindow): Added this helper.
207         * platform/gtk/GtkUtilities.h:
208         (WebCore): Added helper declaration.
209
210 2012-02-02  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
211
212         Update active and hover state on touch release.
213         https://bugs.webkit.org/show_bug.cgi?id=77620
214
215         Reviewed by Kenneth Rohde Christiansen.
216
217         * rendering/HitTestRequest.h:
218         (WebCore::HitTestRequest::move):
219         (WebCore::HitTestRequest::release):
220         (WebCore::HitTestRequest::touchEvent):
221         (WebCore::HitTestRequest::mouseEvent):
222         (WebCore::HitTestRequest::touchMove):
223         (WebCore::HitTestRequest::touchRelease):
224             Rename the enum values in HitTestRequest to be mouse/touch
225             agnostic, and add value for recognizing touch events.
226         * rendering/RenderFrameSet.cpp:
227         (WebCore::RenderFrameSet::nodeAtPoint): Update for HitTestRequest rename.
228         * rendering/RenderLayer.cpp:
229         (WebCore::RenderLayer::hitTest): ditto
230         (WebCore::RenderLayer::updateHoverActiveState): Reset hoverstate on touch release.
231         * page/EventHandler.cpp:
232         (WebCore::EventHandler::updateSelectionForMouseDrag): Update for HitTestRequest rename.
233         (WebCore::EventHandler::handleMouseMoveEvent): ditto
234         (WebCore::EventHandler::handleMouseReleaseEvent): ditto
235         (WebCore::EventHandler::hoverTimerFired): ditto
236         (WebCore::EventHandler::dragSourceEndedAt): ditto
237         (WebCore::EventHandler::handleTouchEvent): Hittest touch release to reset
238             active and hover states and add touch enum to all touch hittests.
239
240 2012-02-02  Pavel Feldman  <pfeldman@google.com>
241
242         Web Inspector: enable editing of selected rows on single click in elements panel.
243         https://bugs.webkit.org/show_bug.cgi?id=77627
244
245         Reviewed by Vsevolod Vlasov.
246
247         * inspector/front-end/ElementsTreeOutline.js:
248         (WebInspector.ElementsTreeElement.prototype.onattach):
249         (WebInspector.ElementsTreeElement.prototype.onselect):
250         (WebInspector.ElementsTreeElement.prototype._mouseDown):
251         * inspector/front-end/treeoutline.js:
252         (TreeElement.prototype.selectOnMouseDown):
253         (TreeElement.prototype.select):
254
255 2012-02-02  Philip Rogers  <pdr@google.com>
256
257         Fix mirroring with SVG fonts
258         https://bugs.webkit.org/show_bug.cgi?id=77067
259
260         Reviewed by Nikolas Zimmermann.
261
262         SVG fonts were incorrectly handling mirrored characters in bidi text.
263         In this change I added the function createStringWithMirroredCharacters
264         which handles mirroring the characters when selecting glyphs for SVG
265         fonts. I also made a small cosmetic change in the function
266         charactersWithArabicForm, changing the bool parameter "mirror" to "rtl"
267         which better reflects what it actually does.
268
269         Several new tests were added to test mirroring with SVG fonts in the
270         presence of Arabic forms and non-BMP characters.
271
272         Tests: svg/custom/glyph-selection-arabic-forms.svg
273                svg/custom/glyph-selection-bidi-mirror.svg
274                svg/custom/glyph-selection-non-bmp.svg
275
276         * platform/graphics/SVGGlyph.cpp:
277         (WebCore::charactersWithArabicForm):
278         * svg/SVGFontData.cpp:
279         (WebCore::SVGFontData::applySVGGlyphSelection):
280         (WebCore::SVGFontData::createStringWithMirroredCharacters):
281         * svg/SVGFontData.h:
282         (SVGFontData):
283
284 2012-02-02  Pavel Feldman  <pfeldman@google.com>
285
286         Web Inspector: add experiment for single click styles editing.
287         https://bugs.webkit.org/show_bug.cgi?id=77624
288
289         Reviewed by Vsevolod Vlasov.
290
291         * inspector/front-end/Settings.js:
292         (WebInspector.ExperimentsSettings):
293         * inspector/front-end/StylesSidebarPane.js:
294         (WebInspector.StylePropertiesSection):
295         (WebInspector.StylePropertyTreeElement.prototype.onattach):
296         (WebInspector.StylePropertyTreeElement.prototype._mouseDown):
297         (WebInspector.StylePropertyTreeElement.prototype._resetMouseDownElement):
298         (WebInspector.StylePropertyTreeElement.prototype):
299         (WebInspector.StylePropertyTreeElement.prototype.selectElement.context):
300
301 2012-02-02  Kenneth Rohde Christiansen  <kenneth@webkit.org>
302
303         Make the tap highlighting work for all test cases
304         https://bugs.webkit.org/show_bug.cgi?id=77626
305
306         Reviewed by Simon Hausmann.
307
308         Clean up of the current code to make it more generic. Now uses
309         addFocusRingRects for finding the areas to highlight.
310
311         Tested by current manual tests.
312
313         * page/GestureTapHighlighter.cpp:
314         (WebCore::GestureTapHighlighter::pathForNodeHighlight):
315
316 2012-02-02  Mario Sanchez Prada  <msanchez@igalia.com>
317
318         [Gtk] atk_text_get_text_at_offset() sometimes fails to provide the correct line
319         https://bugs.webkit.org/show_bug.cgi?id=72382
320
321         Reviewed by Martin Robinson.
322
323         Do not add unnecesary blanks at the end of a line of text.
324
325         * accessibility/gtk/WebKitAccessibleInterfaceText.cpp:
326         (textForRenderer): Do not just append a '\n' at the end of a line
327         if the linebreak for that line was already considered.
328
329 2012-02-02  Raul Hudea  <rhudea@adobe.com>
330
331         Regions should ignore the saved currentRenderFlowThread during repainting
332         because if there are imbricated flow threads, it might end using the wrong one.
333
334         [CSSRegions] Assert failure in RenderView::computeRectForRepaint
335         https://bugs.webkit.org/show_bug.cgi?id=77430
336
337         Reviewed by David Hyatt.
338
339         Test: fast/regions/imbricated-flow-threads-crash.html
340
341         * rendering/RenderFlowThread.cpp:
342         (CurrentRenderFlowThreadDisabler):
343         (WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler):
344         (WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler):
345         (WebCore):
346         (WebCore::RenderFlowThread::repaintRectangleInRegions):
347
348 2012-02-02  Kinuko Yasuda  <kinuko@chromium.org>
349
350         Cleanup: Move chrome-specific filesystem type handling code (for FileSystem API) under chromium directory (re-landing r105395)
351         https://bugs.webkit.org/show_bug.cgi?id=76551
352
353         Reviewed by David Levin.
354
355         Moved the implementation of crackFileSystemURL() and toURL() from
356         WebCore/fileapi/DOMFileSystemBase into WebCore/platform/AsyncFileSystem
357         so that each platform can extend/implement their behavior if necessary.
358
359         No new tests as it has no functional changes.
360
361         * fileapi/DOMFileSystemBase.cpp: Moved crackFileSystemURL() to AsyncFileSystem.
362         * fileapi/DOMFileSystemBase.h:
363         (DOMFileSystemBase):
364         * fileapi/EntryBase.cpp: Moved toURL() to AsyncFileSystem.
365         (WebCore::EntryBase::toURL):
366         * page/DOMWindow.cpp: Made corresponding callsite changes.
367         (WebCore::DOMWindow::webkitRequestFileSystem):
368         (WebCore::DOMWindow::webkitResolveLocalFileSystemURL):
369         * page/DOMWindow.h:
370         * platform/AsyncFileSystem.cpp:
371         (WebCore::AsyncFileSystem::isValidType): Added.
372         * platform/AsyncFileSystem.h:
373         (AsyncFileSystem):
374         * workers/WorkerContext.cpp: Made corresponding callsite changes.
375         (WebCore::WorkerContext::webkitRequestFileSystem):
376         (WebCore::WorkerContext::webkitRequestFileSystemSync):
377         (WebCore::WorkerContext::webkitResolveLocalFileSystemURL):
378         (WebCore::WorkerContext::webkitResolveLocalFileSystemSyncURL):
379         * workers/WorkerContext.h:
380
381 2012-02-02  Yury Semikhatsky  <yurys@chromium.org>
382
383         Web Inspector: pause on uncaugh exceptions state is not properly restored
384         https://bugs.webkit.org/show_bug.cgi?id=77558
385
386         'Pause on exceptions' state is now stored in InspectorState object so that it is
387         properly restored on inspected process change.
388
389         Reviewed by Vsevolod Vlasov.
390
391         * inspector/InspectorDebuggerAgent.cpp:
392         (DebuggerAgentState):
393         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
394         (WebCore::InspectorDebuggerAgent::disable):
395         (WebCore::InspectorDebuggerAgent::restore):
396         (WebCore::InspectorDebuggerAgent::setPauseOnExceptions):
397         (WebCore):
398         (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsImpl):
399         * inspector/InspectorDebuggerAgent.h:
400         (InspectorDebuggerAgent):
401
402 2012-02-02  Kentaro Hara  <haraken@chromium.org>
403
404         The third argument of addEventListener/removeEventListener of PeerConnection should be optional
405         https://bugs.webkit.org/show_bug.cgi?id=77606
406
407         Reviewed by Adam Barth.
408
409         This patch corrects a typo in PeerConnection.idl, i.e. [optional] => [Optional].
410
411         Test: fast/mediastream/peerconnection-eventlistener-optional-argument.html
412
413         * mediastream/PeerConnection.idl:
414
415 2012-02-02  Rakesh KN  <rakesh.kn@motorola.com>
416
417         hidden attribute on <input type=file /> suppresses the file selection dialog
418         https://bugs.webkit.org/show_bug.cgi?id=58208
419
420         Reviewed by Ryosuke Niwa.
421
422         We want to allow opening file dialog on hidden element when click() is called
423         on the element. The behaviour is similar to Firefox and IE.
424
425         Added manual test as the file dialog opens only on user gesture.
426
427         * html/FileInputType.cpp:
428         (WebCore::FileInputType::handleDOMActivateEvent):
429         Removed renderer check as input can be hidden.
430
431 2012-02-01  Philippe Normand  <pnormand@igalia.com>
432
433         [GStreamer] FFTFrame implementation
434         https://bugs.webkit.org/show_bug.cgi?id=73545
435
436         Reviewed by Chris Rogers.
437
438         FFTFrame implementation based on GStreamer's FFT processing
439         library.
440
441         No new tests, existing WebAudio tests cover this.
442
443         * GNUmakefile.am:
444         * GNUmakefile.list.am:
445         * platform/audio/FFTFrame.h:
446         * platform/audio/FFTFrameStub.cpp:
447         * platform/audio/gstreamer/FFTFrameGStreamer.cpp: Added.
448         (WebCore::FFTFrame::FFTFrame):
449         (WebCore::FFTFrame::initialize):
450         (WebCore::FFTFrame::cleanup):
451         (WebCore::FFTFrame::~FFTFrame):
452         (WebCore::FFTFrame::multiply):
453         (WebCore::FFTFrame::doFFT):
454         (WebCore::FFTFrame::doInverseFFT):
455         (WebCore::FFTFrame::realData):
456         (WebCore::FFTFrame::imagData):
457
458 2012-02-02  Kentaro Hara  <haraken@chromium.org>
459
460         Rename [CheckFrameSecurity] and [SVGCheckSecurity] to [CheckAccessToNode]
461         https://bugs.webkit.org/show_bug.cgi?id=77601
462
463         Reviewed by Adam Barth.
464
465         [CheckFrameSecurity] and [SVGCheckSecurity] have the same meaning; i.e. generate code
466         to check allowAccessToNode() for a given attribute or method. This patch renames them
467         to [CheckAccessToNode].
468
469         No tests. No changes in behavior.
470
471         * bindings/scripts/CodeGeneratorJS.pm:
472         (GenerateImplementation):
473         * bindings/scripts/CodeGeneratorV8.pm:
474         (GenerateNormalAttrGetter):
475         (GenerateFunctionCallback):
476         * html/HTMLEmbedElement.idl:
477         * html/HTMLFrameElement.idl:
478         * html/HTMLIFrameElement.idl:
479         * html/HTMLObjectElement.idl:
480
481         * bindings/scripts/test/TestObj.idl:
482         * bindings/scripts/test/V8/V8TestObj.cpp: Updated the test results.
483         (WebCore):
484
485 2012-02-01  Kentaro Hara  <haraken@chromium.org>
486
487         Rename [V8DisallowShadowing] to [V8Unforgeable]
488         https://bugs.webkit.org/show_bug.cgi?id=77599
489
490         Reviewed by Adam Barth.
491
492         This patch renames [V8DisallowShadowing] to [V8Unforgeable], following the Web IDL
493         spec (http://dev.w3.org/2006/webapi/WebIDL/#Unforgeable).
494
495         No tests. No change in behavior.
496
497         * bindings/scripts/CodeGeneratorV8.pm:
498         (GenerateNormalAttrGetter):
499         (GenerateSingleBatchedAttribute):
500         (GenerateImplementation):
501         * page/DOMWindow.idl:
502         * page/Location.idl:
503
504 2012-02-01  Kentaro Hara  <haraken@chromium.org>
505
506         Rename [ConvertNullToNullString] to [TreatNullAs=EmptyString]
507         https://bugs.webkit.org/show_bug.cgi?id=77602
508
509         Reviewed by Adam Barth.
510
511         This patch renames [ConvertNullToNullString] to [TreatNullAs=EmptyString],
512         according to the spec (http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs).
513
514         No tests. No changes in behavior.
515
516         * bindings/scripts/CodeGeneratorJS.pm:
517         (JSValueToNative):
518         * bindings/scripts/CodeGeneratorV8.pm:
519         (GetNativeTypeFromSignature):
520
521         * css/CSSCharsetRule.idl:
522         * css/CSSPageRule.idl:
523         * css/CSSRule.idl:
524         * css/CSSStyleDeclaration.idl:
525         * css/CSSStyleRule.idl:
526         * css/CSSValue.idl:
527         * css/MediaList.idl:
528         * css/WebKitCSSKeyframesRule.idl:
529         * dom/Attr.idl:
530         * dom/CharacterData.idl:
531         * dom/DOMImplementation.idl:
532         * dom/Document.idl:
533         * dom/Element.idl:
534         * dom/NamedNodeMap.idl:
535         * dom/Node.idl:
536         * dom/ProcessingInstruction.idl:
537         * dom/ShadowRoot.idl:
538         * html/HTMLAnchorElement.idl:
539         * html/HTMLButtonElement.idl:
540         * html/HTMLDocument.idl:
541         * html/HTMLElement.idl:
542         * html/HTMLFormElement.idl:
543         * html/HTMLFrameElement.idl:
544         * html/HTMLInputElement.idl:
545         * html/HTMLMediaElement.idl:
546         * html/HTMLOutputElement.idl:
547         * html/HTMLScriptElement.idl:
548         * html/HTMLSelectElement.idl:
549         * html/HTMLTextAreaElement.idl:
550         * html/HTMLTitleElement.idl:
551         * html/canvas/CanvasRenderingContext2D.idl:
552         * page/DOMWindow.idl:
553         * storage/StorageEvent.idl:
554         * svg/SVGAngle.idl:
555         * svg/SVGElement.idl:
556         * svg/SVGLength.idl:
557         * svg/SVGScriptElement.idl:
558
559         * bindings/scripts/test/TestObj.idl: No change in the run-bindings-tests results.
560
561 2012-02-01  Kentaro Hara  <haraken@chromium.org>
562
563         Remove [GenerateConstructor] from IDL files
564         https://bugs.webkit.org/show_bug.cgi?id=77598
565
566         Reviewed by Adam Barth.
567
568         [GenerateConstructor] is used in some IDL files but it is not implemented
569         in code generators. I could not find any history about [GenerateConstructor]
570         in code generators. This patch removes them from IDL files.
571
572         Maybe we want to replace [GenerateConstructor] with [Constructor] eventually,
573         but currently no tests are written for their constructors (e.g. "new DOMTokenList()").
574         So simply removing them would make sense.
575
576         No new tests. No change in behavior.
577
578         * dom/DOMStringList.idl:
579         * html/DOMSettableTokenList.idl:
580         * html/DOMTokenList.idl:
581         * svg/SVGFEConvolveMatrixElement.idl:
582         * webaudio/AudioPannerNode.idl:
583
584 2012-02-01  Eric Carlson  <eric.carlson@apple.com>
585
586         Consider user's preferred language when choosing text tracks
587         https://bugs.webkit.org/show_bug.cgi?id=74121
588
589         Reviewed by Alexey Proskuryakov.
590
591         Tests: media/track/track-language-preference.html
592                media/track/track-prefer-captions.html
593
594         * html/HTMLMediaElement.cpp:
595         (WebCore::HTMLMediaElement::loadTimerFired): configureTextTracks -> configureNewTextTracks.
596         (WebCore::HTMLMediaElement::textTracksAreReady): Add more comments.
597         (WebCore::HTMLMediaElement::textTrackModeChanged): Ditto.
598         (WebCore::HTMLMediaElement::showingTrackWithSameKind): Minor restructuring.
599         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Renamed from userIsInterestedInThisTrack,
600             don't consider user's language preference.
601         (WebCore::HTMLMediaElement::configureTextTrackGroup): New, configure all tracks in a group, 
602             considering user's kind and language preferences.
603         (WebCore::HTMLMediaElement::configureNewTextTracks): New, configure all newly added tracks.
604         * html/HTMLMediaElement.h:
605         (WebCore::HTMLMediaElement::TrackGroup::TrackGroup):
606         (TrackGroup):
607
608         * platform/Language.cpp:
609         (WebCore::canonicalLanguageIdentifier): New, create a canonicalized version of a language string.
610         (WebCore::bestMatchingLanguage): New, return the language from the list that best matches the 
611             specified language.
612         (WebCore::preferredLanguageFromList): New, return the language in the specified list that best
613             matches the user's language preference.
614         * platform/Language.h:
615
616         * testing/Internals.cpp:
617         (WebCore::Internals::setShouldDisplayTrackType): New, allow DRT to set the track type preference.
618         (WebCore::Internals::shouldDisplayTrackType): New, allow DRT to read the track type preference.
619         * testing/Internals.h:
620         * testing/Internals.idl:
621
622 2012-02-01  Hayato Ito  <hayato@chromium.org>
623
624         Change class hierarycy so that ShadowRoot can inherit DocumentFragment.
625         https://bugs.webkit.org/show_bug.cgi?id=76693
626
627         Reviewed by Darin Adler.
628
629         Make ShadowRoot inherit DocumentFragment so that it matches the class hierarchy of IDL in the spec.
630         TreeScope becomes a separated class, which is now inherited by Document and ShadowRoot using multiple-inheritance.
631         This patch is pre-requirement for coming IDL change.
632
633         No tests. No change in behavior.
634
635         * dom/Document.cpp:
636         (WebCore::Document::Document):
637         (WebCore::Document::~Document):
638         (WebCore::Document::buildAccessKeyMap):
639         (WebCore::Document::childrenChanged):
640         (WebCore::Document::attach):
641         (WebCore::Document::detach):
642         * dom/Document.h:
643         (Document):
644         * dom/DocumentFragment.cpp:
645         (WebCore::DocumentFragment::DocumentFragment):
646         * dom/DocumentFragment.h:
647         (DocumentFragment):
648         * dom/DocumentOrderedMap.cpp:
649         (WebCore::DocumentOrderedMap::get):
650         * dom/ShadowRoot.cpp:
651         (WebCore::ShadowRoot::ShadowRoot):
652         (WebCore::ShadowRoot::~ShadowRoot):
653         (WebCore::ShadowRoot::attach):
654         * dom/ShadowRoot.h:
655         * dom/TreeScope.cpp:
656         (WebCore::TreeScope::TreeScope):
657         (WebCore::TreeScope::~TreeScope):
658         (WebCore::TreeScope::setParentTreeScope):
659         (WebCore::TreeScope::getImageMap):
660         (WebCore::TreeScope::findAnchor):
661         * dom/TreeScope.h:
662         (WebCore):
663         (WebCore::TreeScope::rootNode):
664         (TreeScope):
665         * dom/TreeScopeAdopter.cpp:
666         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
667         * page/DragController.cpp:
668         (WebCore::asFileInput):
669         * page/FocusController.cpp:
670         (WebCore::ownerOfTreeScope):
671         (WebCore::FocusController::nextFocusableNode):
672         (WebCore::FocusController::previousFocusableNode):
673
674 2012-02-01  Benjamin Poulain  <bpoulain@apple.com>
675
676         WorkerScriptController::evaluate() should not return anything
677         https://bugs.webkit.org/show_bug.cgi?id=77587
678
679         Reviewed by Adam Barth.
680
681         Remove the return value from WorkerScriptController as it is
682         (and should be) unused.
683
684         * bindings/js/WorkerScriptController.cpp:
685         (WebCore::WorkerScriptController::evaluate):
686         * bindings/js/WorkerScriptController.h:
687         (WorkerScriptController):
688         * bindings/v8/WorkerScriptController.cpp:
689         (WebCore::WorkerScriptController::evaluate):
690         * bindings/v8/WorkerScriptController.h:
691         (WorkerScriptController):
692
693 2012-02-01  Kentaro Hara  <haraken@chromium.org>
694
695         Remove [DelegatingPrototypeGetOwnPropertySlot], [HasCustomIndexGetter],
696         [HasIndexSetter], [JSConstructorTemplate] and [NonEmpty] from code generators
697         https://bugs.webkit.org/show_bug.cgi?id=77585
698
699         Reviewed by Adam Barth.
700
701         This patch removes [DelegatingPrototypeGetOwnPropertySlot], [HasCustomIndexGetter],
702         [HasIndexSetter], [JSConstructorTemplate] and [NonEmpty] from code generators,
703         since they are not used by no IDL files.
704
705         No tests. No change in behavior.
706
707         * bindings/scripts/CodeGenerator.pm:
708         (GetterExpression):
709         * bindings/scripts/CodeGeneratorJS.pm:
710         (GenerateGetOwnPropertySlotBody):
711         (GenerateGetOwnPropertyDescriptorBody):
712         (GenerateHeader):
713         (GenerateImplementation):
714         (IsConstructable):
715         (IsConstructorTemplate):
716
717         * bindings/scripts/test/TestObj.idl:
718         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated the run-bindings-tests results.
719         * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
720         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
721         (webkit_dom_test_obj_set_property):
722         (webkit_dom_test_obj_get_property):
723         (webkit_dom_test_obj_class_init):
724         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
725         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
726         (WebCore):
727         * bindings/scripts/test/JS/JSTestObj.h: Ditto.
728         (WebCore):
729         * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
730         * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
731         * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
732         (WebCore):
733
734 2012-02-01  Shinya Kawanaka  <shinyak@google.com>
735
736         Select attribute of HTMLContentElement should be able be changed dynamically.
737         https://bugs.webkit.org/show_bug.cgi?id=76261
738
739         Reviewed by Hajime Morita.
740
741         When select attribute is changed, the flag to recalc style is set.
742
743         Test: fast/dom/shadow/content-element-select-dynamic.html
744
745         * html/shadow/HTMLContentElement.cpp:
746         (WebCore::HTMLContentElement::parseMappedAttribute):
747           Sets recalc style when select is changed.
748         * html/shadow/HTMLContentElement.h:
749         (HTMLContentElement):
750
751 2012-02-01  Kentaro Hara  <haraken@chromium.org>
752
753         Remove [ImplementationUUID] and [InterfaceUUID] from html/canvas/*.idl
754         https://bugs.webkit.org/show_bug.cgi?id=77589
755
756         Reviewed by Adam Barth.
757
758         [ImplementationUUID] and [InterfaceUUID] are used in html/canvas/*.idl,
759         but they are not implemented in code generators and thus have no meaning.
760         This patch removes them.
761
762         No tests. No change in behavior.
763
764         * html/canvas/CanvasGradient.idl:
765         * html/canvas/CanvasPattern.idl: The file is now empty though.
766         * html/canvas/CanvasRenderingContext.idl:
767         * html/canvas/CanvasRenderingContext2D.idl:
768         * html/canvas/WebGLRenderingContext.idl:
769
770 2012-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
771
772         Unreviewed, rolling out r106408.
773         http://trac.webkit.org/changeset/106408
774         https://bugs.webkit.org/show_bug.cgi?id=77592
775
776         crashes in chromium mac release tests (Requested by japhet on
777         #webkit).
778
779         * platform/graphics/Region.cpp:
780         * platform/graphics/Region.h:
781         (Region):
782         (Shape):
783
784 2012-02-01  No'am Rosenthal  <noam.rosenthal@nokia.com>
785
786         [Texmap] Use glScissors for clipping in TextureMapperGL when possible
787         https://bugs.webkit.org/show_bug.cgi?id=77575
788
789         Reviewed by Martin Robinson.
790
791         Maintain a clipping stack, that helps us use stencils in conjunction with scissors.
792         We apply scissors when the clip region is rectalinear, and stencil when it's not.
793
794         No behavior changes so no new tests.
795
796         * platform/graphics/opengl/TextureMapperGL.cpp:
797         (SharedGLData):
798         (WebCore::TextureMapperGLData::SharedGLData::SharedGLData):
799         (WebCore::TextureMapperGL::drawTexture):
800         (WebCore::TextureMapperGL::bindSurface):
801         (WebCore):
802         (WebCore::scissorClip):
803         (WebCore::TextureMapperGL::beginScissorClip):
804         (WebCore::TextureMapperGL::endScissorClip):
805         (WebCore::TextureMapperGL::beginClip):
806         (WebCore::TextureMapperGL::endClip):
807         * platform/graphics/opengl/TextureMapperGL.h:
808         (TextureMapperGL):
809
810 2012-02-01  Anders Carlsson  <andersca@apple.com>
811
812         Move the scrolling coordinator to page/scrolling
813         https://bugs.webkit.org/show_bug.cgi?id=77590
814
815         Reviewed by Dan Bernstein.
816
817         Put scrolling related files in page/scrolling to avoid cluttering the page directory.
818
819         * WebCore.xcodeproj/project.pbxproj:
820         * page/scrolling/ScrollingCoordinator.cpp: Renamed from Source/WebCore/page/ScrollingCoordinator.cpp.
821         * page/scrolling/ScrollingCoordinator.h: Renamed from Source/WebCore/page/ScrollingCoordinator.h.
822         * page/scrolling/mac/ScrollingCoordinatorMac.mm: Renamed from Source/WebCore/page/mac/ScrollingCoordinatorMac.mm.
823
824 2012-02-01  Kentaro Hara  <haraken@chromium.org>
825
826         Remove [ObjCPrefix], [V8ConstructorTemplate], [allowAccessToNode],
827         [v8implname] and [v8referenceattr] from code generators
828         https://bugs.webkit.org/show_bug.cgi?id=77588
829
830         Reviewed by Adam Barth.
831
832         This patch removes [ObjCPrefix], [V8ConstructorTemplate], [allowAccessToNode],
833         [v8implname] and [v8referenceattr] from code generators, since they are not used
834         by any IDL files.
835
836         No tests. No changes in behavior.
837
838         * bindings/scripts/CodeGeneratorJS.pm:
839         (GenerateImplementation):
840         * bindings/scripts/CodeGeneratorObjC.pm:
841         (GenerateHeader):
842         (GenerateImplementation):
843         * bindings/scripts/CodeGeneratorV8.pm:
844         (IsConstructable):
845         (IsConstructorTemplate):
846         (GenerateNormalAttrGetter):
847         (GenerateFunctionCallString):
848
849 2012-02-01  Pablo Flouret  <pablof@motorola.com>
850
851         Support targetOrigin = "/" in postMessage for sending messages to same origin as source document.
852         https://bugs.webkit.org/show_bug.cgi?id=77580
853
854         Reviewed by Adam Barth.
855
856         No new tests. Modified http/tests/security/postMessage/target-origin.html
857         to test this case as well.
858
859         * page/DOMWindow.cpp:
860         (WebCore::DOMWindow::postMessage):
861
862 2012-02-01  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
863
864         Avoid creating NamedNodeMap unnecessarily
865         https://bugs.webkit.org/show_bug.cgi?id=77574
866
867         Reviewed by Ryosuke Niwa.
868
869         The method Element::attributes() was being used for multiple things in our
870         codebase: (1) as the getter for NamedNodeMap exposed to DOM, (2) as a way to other WebCore
871         code get the "attribute storage" (currently inside NamedNodeMap), and (3) as a way to
872         get the attribute storage creating one if necessary.
873
874         This commit separate the jobs in different functions:
875
876         1) attributes() keeps being the DOM getter, and loses its boolean parameter.
877
878         2) updatedAttributes() updates the invalid attributes and returns the attribute
879         storage. If we don't have one, return 0.
880
881         3) ensureUpdatedAttributes() updates the invalid attributes and forces the
882         creation of attribute storage to return.
883
884         There is also another way to get to the attribute storage currently, via
885         attributeMap(), which doesn't update the attributes for possible changes in Style
886         or SVG attributes.
887
888         Note that the new functions are not available in Node class, so C++ code manipulating
889         attributes should cast to Element.
890
891         This separation also made easier to spot and fix some places where we do not
892         need to create the attribute storage if it doesn't exist.
893
894         No new tests, this commit shouldn't change the behavior of existing code.
895
896         * css/SelectorChecker.cpp:
897         (WebCore::SelectorChecker::checkOneSelector):
898         * dom/DatasetDOMStringMap.cpp:
899         (WebCore::DatasetDOMStringMap::getNames):
900         (WebCore::DatasetDOMStringMap::item):
901         (WebCore::DatasetDOMStringMap::contains):
902         * dom/Document.cpp:
903         (WebCore::Document::importNode):
904         * dom/Element.cpp:
905         (WebCore::Element::setAttribute):
906         (WebCore::Element::hasAttributes):
907         (WebCore::Element::setAttributeNode):
908         (WebCore::Element::setAttributeNodeNS):
909         (WebCore::Element::removeAttributeNode):
910         (WebCore::Element::getAttributeNode):
911         (WebCore::Element::getAttributeNodeNS):
912         (WebCore::Element::hasAttribute):
913         (WebCore::Element::hasAttributeNS):
914         (WebCore::Element::normalizeAttributes):
915         * dom/Element.h:
916         (Element):
917         (WebCore::Element::attributes):
918         (WebCore::Element::ensureAttributeData):
919         (WebCore::Element::ensureUpdatedAttributes):
920         (WebCore::Element::updatedAttributes):
921         (WebCore::Element::setAttributesFromElement):
922         (WebCore::Element::ensureAttributeMap): Made const to be reused by ensureUpdatedAttributes().
923         (WebCore::Element::updateInvalidAttributes):
924         (WebCore):
925         * dom/NamedNodeMap.cpp:
926         (WebCore::NamedNodeMap::mapsEquivalent): Having no attributes is equivalent to
927         not having an attribute storage because the attribute storage is lazily created.
928         * dom/Node.cpp:
929         (WebCore::Node::isEqualNode): Do not force the creation of attribute storage to
930         compare two nodes.
931         (WebCore::Node::isDefaultNamespace): Use updatedAttributes(). Since we iterate
932         using length, it's OK if the attribute storage is empty.
933         (WebCore::Node::lookupNamespaceURI): Ditto.
934         (WebCore::Node::lookupNamespacePrefix): Ditto.
935         (WebCore::Node::compareDocumentPosition): Ditto.
936         * editing/ApplyStyleCommand.cpp:
937         (WebCore::hasNoAttributeOrOnlyStyleAttribute):
938         (WebCore::isEmptyFontTag):
939         * editing/CompositeEditCommand.cpp:
940         (WebCore::CompositeEditCommand::isRemovableBlock): Use isElementNode() explicitly
941         to identify non-Element nodes, then use hasAttributes() if is Element.
942         * editing/InsertParagraphSeparatorCommand.cpp:
943         (WebCore::highestVisuallyEquivalentDivBelowRoot):
944         * editing/MarkupAccumulator.cpp:
945         (WebCore::MarkupAccumulator::appendElement): Do not create the attribute storage
946         unnecessarily.
947         * editing/htmlediting.cpp:
948         (WebCore::areIdenticalElements): Do not create the attribute storage
949         unnecessarily. Use mapsEquivalent() for comparing the attributes.
950         * editing/markup.cpp:
951         (WebCore::completeURLs): Do not create the attribute storage unnecessarily.
952         (WebCore::StyledMarkupAccumulator::appendElement): Ditto.
953         (WebCore::isPlainTextMarkup): hasAttributes() will avoid creating the attribute
954         storage unnecessarily.
955         * html/HTMLEmbedElement.cpp:
956         (WebCore::HTMLEmbedElement::parametersForPlugin):
957         * html/HTMLObjectElement.cpp:
958         (WebCore::HTMLObjectElement::parametersForPlugin):
959         * html/HTMLParamElement.cpp:
960         (WebCore::HTMLParamElement::isURLAttribute): Do not create the attribute storage
961         unnecessarily.
962         * html/parser/HTMLConstructionSite.cpp:
963         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement): Use
964         ensureUpdatedAttributes() since we will add new attributes.
965         (WebCore):
966         * inspector/InspectorCSSAgent.cpp:
967         (WebCore::InspectorCSSAgent::buildArrayForAttributeStyles):
968         * inspector/InspectorDOMAgent.cpp:
969         (WebCore::InspectorDOMAgent::setAttributesAsText):
970         (WebCore::InspectorDOMAgent::performSearch):
971         (WebCore::InspectorDOMAgent::buildArrayForElementAttributes):
972         * page/PageSerializer.cpp:
973         (WebCore::isCharsetSpecifyingNode): Do not assume attributeMap will exist.
974         * svg/properties/SVGAnimatedPropertySynchronizer.h: Use ensureUpdatedAttributes()
975         since we will add new attributes.
976         * xml/XPathFunctions.cpp:
977         (WebCore::XPath::FunLang::evaluate): Do not create the attribute storage
978         unnecessarily.
979         * xml/XPathNodeSet.cpp:
980         (WebCore::XPath::NodeSet::traversalSort):
981         * xml/XPathStep.cpp:
982         (WebCore::XPath::Step::nodesInAxis): Use isElementNode() instead of comparing
983         nodeType() manually. Do not create the attribute storage unnecessarily.
984         * xml/parser/XMLDocumentParserLibxml2.cpp:
985         (WebCore::XMLDocumentParser::XMLDocumentParser): Do not create the attribute
986         storage unnecessarily.
987         * xml/parser/XMLDocumentParserQt.cpp:
988         (WebCore::XMLDocumentParser::XMLDocumentParser): Ditto.
989         * xml/parser/XMLTreeBuilder.cpp:
990         (WebCore::XMLTreeBuilder::XMLTreeBuilder): Ditto.
991
992 2012-02-01  Adam Barth  <abarth@webkit.org>
993
994         contentDispositionType misparses the Content-Disposition header in some obscure corner cases
995         https://bugs.webkit.org/show_bug.cgi?id=77577
996
997         Reviewed by Eric Seidel.
998
999         The contentDispositionType extracts the disposition-type from the
1000         Content-Disposition header.  According to RFC 6266 (and previous RFCs),
1001         the disposition-type must be an RFC 2616 token.  Rather than enforce
1002         this general rule, we had special-cased some examples (including
1003         name=foo and filename=bar).  This patch generalizes our check to
1004         properly validate that the disposition-type is an RFC 2616 token.
1005
1006         In conjunction with some other work in the Chromium network stack, this
1007         causes Chromium to pass the following tests:
1008
1009           http://greenbytes.de/tech/tc2231/#inlonlyquoted
1010           http://greenbytes.de/tech/tc2231/#attonlyquoted
1011
1012         Without this patch, these test cases neither trigger a navigation nor a
1013         download in Chromium.  This patch does not appear to cause any visible
1014         change in Safari.  (Safari passes these tests both before and after
1015         this patch.)
1016
1017         * platform/network/HTTPParsers.cpp:
1018         (WebCore::isRFC2616Token):
1019         (WebCore::contentDispositionType):
1020             - This patch also adds a comment to
1021               filenameFromHTTPContentDisposition, which explains some of the
1022               was this function incorrectly implements the requirements in
1023               RFC 6266.  Resolving these issues is a subject for a future
1024               patch.
1025         * platform/network/HTTPParsers.h:
1026
1027 2012-02-01  Dan Bernstein  <mitz@apple.com>
1028
1029         WebCore part of <rdar://problem/10442663> Paginated display does not respect page-break-{before,after}
1030         https://bugs.webkit.org/show_bug.cgi?id=77505
1031
1032         Reviewed by Darin Adler.
1033
1034         * page/Page.h:
1035         (WebCore::Page::Pagination::Pagination): Added initializer for the behavesLikeColumns member
1036         variable.
1037         (WebCore::Page::Pagination::operator==): Added comparison of behavesLikeColumns values.
1038         (Pagination): Added behavesLikeColumns member variable. When set to false (the default),
1039         paginated display respects the page-break-{before,after} properties rather than the
1040         column-break-{before,after} ones.
1041         * rendering/ColumnInfo.h:
1042         (WebCore::ColumnInfo::ColumnInfo): Added initializer for the m_paginationUnit member.
1043         (WebCore::ColumnInfo::paginationUnit): Added this getter.
1044         (WebCore::ColumnInfo::setPaginationUnit): Added this setter.
1045         (ColumnInfo): Added m_paginationUnit member. It defaults to Column.
1046         * rendering/LayoutState.h:
1047         (WebCore::LayoutState::isPaginatingColumns): Changed to check the pagination unit.
1048         * rendering/RenderBlock.cpp:
1049         (WebCore::RenderBlock::layoutBlock): Added code to set the pagination unit in the ColumnInfo.
1050         (WebCore::RenderBlock::paginationUnit): Added. The base class implementation returns Column.
1051         * rendering/RenderBlock.h:
1052         * rendering/RenderView.cpp:
1053         (WebCore::RenderView::paginationUnit): Added this override that returns Page, unless
1054         this is the RenderView for the main frame and pagination is set to behave like columns.
1055         * rendering/RenderView.h:
1056
1057 2012-02-01  Florin Malita  <fmalita@google.com>
1058
1059         Backgrounds in HTML inside foreignObject don't draw
1060         https://bugs.webkit.org/show_bug.cgi?id=23111
1061
1062         Reviewed by Eric Seidel.
1063
1064         Test: svg/foreignObject/body-background.svg
1065
1066         * rendering/RenderBox.cpp:
1067         (WebCore::RenderBox::paintBackground):
1068         Tweak the <body> background inhibiting logic to allow drawing when the element is embedded in FOs.
1069
1070
1071 2012-02-01  Gustavo Lima Chaves  <glima@profusion.mobi>
1072
1073         Make one able to set the local storage (tracker) database dir's path
1074         https://bugs.webkit.org/show_bug.cgi?id=77006
1075
1076         Reviewed by Darin Adler.
1077
1078         There are no behavior changes with the diff, so no need for new tests.
1079
1080         * storage/StorageTracker.cpp:
1081         (WebCore::StorageTracker::setDatabaseDirectoryPath):
1082         (WebCore):
1083         (WebCore::StorageTracker::databaseDirectoryPath):
1084         * storage/StorageTracker.h:
1085         (StorageTracker):
1086
1087 2012-02-01  Anders Carlsson  <andersca@apple.com>
1088
1089         Fix Window build.
1090
1091         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1092         (WebCore::LayerClient::platformCALayerDidCreateTiles):
1093         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1094         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDidCreateTiles):
1095
1096 2012-02-01  John Yani  <vanuan@gmail.com>
1097
1098         GetMIMEDescription should return const char *
1099         https://bugs.webkit.org/show_bug.cgi?id=77297
1100
1101         Reviewed by Alexey Proskuryakov.
1102
1103         No new tests. No change in behaviour.
1104
1105         * plugins/blackberry/PluginPackageBlackBerry.cpp:
1106         (WebCore::PluginPackage::fetchInfo):
1107         * plugins/efl/PluginPackageEfl.cpp:
1108         (WebCore):
1109         (WebCore::PluginPackage::fetchInfo):
1110         * plugins/npapi.h:
1111         * plugins/npfunctions.h:
1112         * plugins/qt/PluginPackageQt.cpp:
1113         (WebCore::PluginPackage::fetchInfo):
1114
1115 2012-02-01  Timothy Hatcher  <timothy@apple.com>
1116
1117         Consolidate duplicate "willHide" functions in DetailedHeapshotView.js to fix
1118         a syntax error in JSC and make the Inspector open again in Release builds.
1119
1120         https://webkit.org/b/77424
1121
1122         Reviewed by Brian Weinstein.
1123
1124         * inspector/front-end/DetailedHeapshotView.js:
1125         (WebInspector.DetailedHeapshotView.prototype.willHide): Consolidated.
1126         (WebInspector.DetailedHeapshotView.prototype.willHide): Removed.
1127
1128 2012-02-01  Justin Novosad  <junov@chromium.org>
1129
1130         [Chromium] Enable deferred canvas rendering in the skia port
1131         https://bugs.webkit.org/show_bug.cgi?id=76732
1132
1133         Reviewed by Stephen White.
1134
1135         No new tests: covered by existing canvas layout tests
1136
1137         Adding a new setting to enable deferred 2d canvas rendering.
1138         Added support for deferred 2d canvas rendering in ImageBufferSkia
1139         and Canvas2DLayerChromium, mostly plumbing. Deffered rendering
1140         implementation is provided by skia (class SkDeferredCanvas).
1141
1142         * html/HTMLCanvasElement.cpp:
1143         (WebCore::HTMLCanvasElement::shouldDefer):
1144         (WebCore):
1145         (WebCore::HTMLCanvasElement::createImageBuffer):
1146         * html/HTMLCanvasElement.h:
1147         (HTMLCanvasElement):
1148         * page/Settings.cpp:
1149         (WebCore::Settings::Settings):
1150         (WebCore::Settings::setAccelerated2dCanvasEnabled):
1151         (WebCore):
1152         (WebCore::Settings::setDeferred2dCanvasEnabled):
1153         * page/Settings.h:
1154         (Settings):
1155         (WebCore::Settings::deferred2dCanvasEnabled):
1156         * platform/graphics/ImageBuffer.h:
1157         (WebCore::ImageBuffer::create):
1158         (ImageBuffer):
1159         * platform/graphics/cairo/ImageBufferCairo.cpp:
1160         (WebCore::ImageBuffer::ImageBuffer):
1161         * platform/graphics/cg/ImageBufferCG.cpp:
1162         (WebCore::ImageBuffer::ImageBuffer):
1163         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1164         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
1165         (WebCore):
1166         (WebCore::Canvas2DLayerChromium::setCanvas):
1167         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
1168         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1169         (Canvas2DLayerChromium):
1170         * platform/graphics/qt/ImageBufferQt.cpp:
1171         (WebCore::ImageBuffer::ImageBuffer):
1172         * platform/graphics/skia/ImageBufferSkia.cpp:
1173         (AcceleratedDeviceContext):
1174         (WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext):
1175         (WebCore::AcceleratedDeviceContext::prepareForDraw):
1176         (WebCore::AcceleratedDeviceContext::flush):
1177         (WebCore):
1178         (WebCore::createAcceleratedCanvas):
1179         (WebCore::ImageBuffer::ImageBuffer):
1180         * platform/graphics/wince/ImageBufferWinCE.cpp:
1181         (WebCore::ImageBuffer::ImageBuffer):
1182         * platform/graphics/wx/ImageBufferWx.cpp:
1183         (WebCore::ImageBuffer::ImageBuffer):
1184
1185 2012-02-01  Ryosuke Niwa  <rniwa@webkit.org>
1186
1187         Gcc build fix after r106482.
1188
1189         * platform/graphics/ca/GraphicsLayerCA.h:
1190         (GraphicsLayerCA):
1191
1192 2012-02-01  Beth Dakin  <bdakin@apple.com>
1193
1194         https://bugs.webkit.org/show_bug.cgi?id=77383
1195         Add a different didFirstVisuallNonEmptyLayout heuristic to experiment with
1196         -and corresponding-
1197         <rdar://problem/10709560>
1198
1199         Reviewed by Sam Weinig.
1200
1201         The goal is to re-vamp didFirstVisuallyNonEmptyLayout to be more accurate. 
1202         This patch adds a new heuristic called didNewFirstVisuallNonEmptyLayout and 
1203         leaves the old one for the time being. That is temporary.
1204
1205         The heuristic for didNewFirstVisuallNonEmptyLayout is to count relevant 
1206         painted RenderObjects on Page.
1207         * page/Page.cpp:
1208         (WebCore::Page::Page):
1209         (WebCore::Page::setPaintedObjectsCounterThreshold):
1210         (WebCore::Page::addRelevantRepaintedObject):
1211         * page/Page.h:
1212         (WebCore):
1213         (Page):
1214         (WebCore::Page::startCountingRepaintedObjects):
1215         * WebCore.exp.in:
1216
1217         Start counting relevant painted RenderObjects on the page once the first 
1218         layout is complete.
1219         * page/FrameView.cpp:
1220         (WebCore::FrameView::performPostLayoutTasks):
1221
1222         Machinery for firing didNewFirstVisuallNonEmptyLayout.
1223         * loader/EmptyClients.h:
1224         (WebCore::EmptyFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout):
1225         * loader/FrameLoader.cpp:
1226         (WebCore::FrameLoader::didNewFirstVisuallyNonEmptyLayout):
1227         (WebCore):
1228         * loader/FrameLoader.h:
1229         (FrameLoader):
1230         * loader/FrameLoaderClient.h:
1231         (WebCore::FrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout):
1232
1233         These RenderObjects are the ones that this api currently consider to be 
1234         relevant. If their repaint rects intersect with the viewRect, then they are 
1235         added to the relevant objects set on the Page.
1236         * rendering/InlineBox.cpp:
1237         (WebCore::InlineBox::paint):
1238         * rendering/InlineTextBox.cpp:
1239         (WebCore::InlineTextBox::paint):
1240         * rendering/RenderEmbeddedObject.cpp:
1241         (WebCore::RenderEmbeddedObject::paintReplaced):
1242         * rendering/RenderHTMLCanvas.cpp:
1243         (WebCore::RenderHTMLCanvas::paintReplaced):
1244         * rendering/RenderImage.cpp:
1245         (WebCore::RenderImage::paintReplaced):
1246         * rendering/RenderRegion.cpp:
1247         (WebCore::RenderRegion::paintReplaced):
1248         * rendering/RenderReplaced.cpp:
1249         (WebCore::RenderReplaced::paint):
1250         * rendering/RenderVideo.cpp:
1251         (WebCore::RenderVideo::paintReplaced):
1252         * rendering/svg/RenderSVGRoot.cpp:
1253         (WebCore::RenderSVGRoot::paintReplaced):
1254
1255 2012-02-01  Alexis Menard  <alexis.menard@openbossa.org>
1256
1257         CSSStyleDeclaration.getPropertyPriority() fails for CSS shorthand properties with 'important' priority
1258         https://bugs.webkit.org/show_bug.cgi?id=49058
1259
1260         Reviewed by Andreas Kling.
1261
1262         CSSMutableStyleDeclaration::getPropertyPriority was not handling shorthands properly. Shorthands are
1263         not part of the property list of the style so we need to query the longhands which are the one added
1264         in the list. Only if the longhands have equal priority the shorthand priority is known. I also renamed
1265         getPropertyPriority (not the CSSOM exposed method) to something more consistent with WebKit naming guidelines.
1266
1267         Test: fast/css/shorthand-priority.html
1268
1269         * css/CSSMutableStyleDeclaration.cpp:
1270         (WebCore::CSSMutableStyleDeclaration::propertyIsImportant):
1271         (WebCore::CSSMutableStyleDeclaration::addParsedProperty):
1272         (WebCore::CSSMutableStyleDeclaration::getPropertyPriority):
1273         * css/CSSMutableStyleDeclaration.h:
1274         (CSSMutableStyleDeclaration):
1275         * editing/EditingStyle.cpp:
1276         (WebCore::EditingStyle::extractAndRemoveTextDirection):
1277         (WebCore::EditingStyle::collapseTextDecorationProperties):
1278         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
1279         (WebCore::setTextDecorationProperty):
1280         * editing/RemoveCSSPropertyCommand.cpp:
1281         (WebCore::RemoveCSSPropertyCommand::doApply):
1282
1283 2012-02-01  Ryosuke Niwa  <rniwa@webkit.org>
1284
1285         Crash in EventHandler::updateDragAndDrop
1286         https://bugs.webkit.org/show_bug.cgi?id=77569
1287
1288         Reviewed by Alexey Proskuryakov.
1289
1290         Test: fast/events/remove-target-with-shadow-in-drag.html
1291
1292         * page/EventHandler.cpp:
1293         (WebCore::EventHandler::updateDragAndDrop):
1294
1295 2012-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
1296
1297         Unreviewed, rolling out r106382.
1298         http://trac.webkit.org/changeset/106382
1299         https://bugs.webkit.org/show_bug.cgi?id=77571
1300
1301         Causing chromium crashes in PNGImageDecoder (Requested by
1302         japhet on #webkit).
1303
1304         * bindings/v8/V8Proxy.cpp:
1305         (WebCore::V8Proxy::evaluate):
1306         * page/Console.cpp:
1307         (WebCore::Console::time):
1308         (WebCore::Console::timeEnd):
1309         * platform/chromium/PlatformSupport.h:
1310         * platform/chromium/TraceEvent.h:
1311         (internal):
1312         (ScopeTracer):
1313         (WebCore::internal::ScopeTracer::ScopeTracer):
1314         (WebCore::internal::ScopeTracer::~ScopeTracer):
1315
1316 2012-02-01  Anders Carlsson  <andersca@apple.com>
1317
1318         Reviewed by Darin Adler.
1319
1320         Simplify the code that creates a new tile layer by getting a reference to the RetainPtr<WebTileLayer>&
1321         slot in the hash map and assign directly into it.
1322
1323         * platform/graphics/ca/mac/TileCache.mm:
1324         (WebCore::TileCache::revalidateTiles):
1325
1326 2012-02-01  Anders Carlsson  <andersca@apple.com>
1327
1328         Tile cache doesn't have an upper limit
1329         https://bugs.webkit.org/show_bug.cgi?id=77564
1330         <rdar://problem/10710744>
1331
1332         Reviewed by Darin Adler.
1333
1334         Cache enough tiles to cover 3x the visible height and 2x the visible width of the page,
1335         and drop tiles that are outside that area.
1336
1337         * platform/graphics/ca/GraphicsLayerCA.cpp:
1338         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
1339         Call GraphicsLayerClient::notifySyncRequired here, which will schedule a layer flush and ensure that
1340         the page layout is up to date before the new tiles are painted.
1341
1342         * platform/graphics/ca/PlatformCALayerClient.h:
1343         Add platformCALayerDidCreateTiles member function.
1344
1345         * platform/graphics/ca/mac/TileCache.h:
1346         Update for new/removed member functions and member variables.
1347
1348         * platform/graphics/ca/mac/TileCache.mm:
1349         (WebCore::TileCache::TileCache):
1350         Initialize the tile revalidation timer.
1351
1352         (WebCore::TileCache::tileCacheLayerBoundsChanged):
1353         If we don't have any tiles at all right now, revalidate the tiles immediately. Otherwise,
1354         schedule the revalidation timer.
1355
1356         (WebCore::TileCache::setNeedsDisplayInRect):
1357         Return early if we have no tiles.
1358
1359         (WebCore::TileCache::visibleRectChanged):
1360         Schedule tile revalidation.
1361
1362         (WebCore::TileCache::rectForTileIndex):
1363         New helper function that returns the bounds rect of a tile given its tile index.
1364
1365         (WebCore::TileCache::getTileIndexRangeForRect):
1366         Clamp the rect to the bounds of the tile cache layer.
1367
1368         (WebCore::TileCache::scheduleTileRevalidation):
1369         Schedule the revalidation timer if it hasn't already been scheduled.
1370
1371         (WebCore::TileCache::tileRevalidationTimerFired):
1372         Call revalidateTiles.
1373
1374         (WebCore::TileCache::revalidateTiles):
1375         Compute the tile coverage rect and remove all tiles that are outside. Create new tiles for any
1376         parts of the tile coverage rect that don't have tiles already.
1377
1378         (WebCore::TileCache::tileLayerAtIndex):
1379         Remove invalid assertions.
1380
1381 2012-02-01  Max Vujovic  <mvujovic@adobe.com>
1382
1383         Add support for fixed and percent min-width on the table element for table-layout: auto to
1384         match Firefox and Opera's behavior.
1385
1386         In FixedTableLayout.cpp, the computePreferredLogicalWidths method looks like it has
1387         issues based on the comment: "FIXME: This entire calculation is incorrect for both
1388         minwidth and maxwidth." (minwidth and maxwidth refer to the preferred widths, not the
1389         min-width and max-width styles). I have not implemented min-width for FixedTableLayout
1390         in this patch since it requires some more research around that comment.
1391
1392         min-width and max-width on the table element was discussed on the www-style list:
1393         http://lists.w3.org/Archives/Public/www-style/2012Jan/0684.html
1394
1395         min-width is not implemented on <table> for table-layout: auto
1396         https://bugs.webkit.org/show_bug.cgi?id=76553
1397
1398         Reviewed by Julien Chaffraix.
1399
1400         Test: fast/table/min-width.html
1401
1402         * rendering/AutoTableLayout.cpp:
1403         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
1404
1405             If the min or max preferred logical width is less than a fixed min width style, it is
1406             set to the fixed min width style. Like a percent width style, a percent min-width style
1407             does not affect the min or max preferred logical widths computed by the table layout
1408             algorithm. RenderTable's computeLogicalWidth method handles percent min-width styles.
1409
1410             min-width for the table-layout: fixed case has been split out into this bug:
1411             https://bugs.webkit.org/show_bug.cgi?id=76948
1412
1413         * rendering/RenderTable.cpp:
1414         (WebCore::RenderTable::computeLogicalWidth):
1415
1416             If the RenderStyle's logical min width is defined and greater than the logical width
1417             calculation, this method sets the logical width to the logical min width.
1418
1419         (WebCore::RenderTable::convertStyleWidthToComputedWidth):
1420
1421             This new method generalizes and factors out logic from RenderTable::computeLogicalWidth
1422             that converted the width style to a computed value in the fixed and percent case.
1423             RenderTable::computeLogicalWidth now calls this method to determine the computed values
1424             for both the width style and the min-width style. In the future, it can also be used for
1425             the max-width style.
1426
1427             Note that this method handles the special CSS table case, which requires borders and
1428             paddings to be included in the computed width calculation. This applies to all width
1429             styles, including width, min-width, and max-width. Before, this special case was handled
1430             in RenderTable::computeLogicalWidth.
1431
1432         * rendering/RenderTable.h:
1433
1434 2012-02-01  Brian Salomon  <bsalomon@google.com>
1435
1436         [SKIA/CHROMIUM] Perform getImageData format conversions using Skia
1437         https://bugs.webkit.org/show_bug.cgi?id=77553
1438
1439         Reviewed by Stephen White.
1440
1441         Many existing canvas tests exercise this functionality.
1442
1443         * platform/graphics/skia/ImageBufferSkia.cpp:
1444         (WebCore::getImageData):
1445
1446 2012-02-01  Nate Chapin  <japhet@chromium.org>
1447
1448         preventDefault() in a mousedown in a subframe should not
1449         prevent the scrollbar from handling mouse movements if the
1450         cursor leaves the subframe.
1451         https://bugs.webkit.org/show_bug.cgi?id=73097
1452
1453         Reviewed by Darin Adler.
1454
1455         Test: fast/events/scroll-div-with-prevent-default-in-subframe.html
1456
1457         * page/EventHandler.cpp:
1458         (WebCore::EventHandler::handleMousePressEvent):
1459
1460 2012-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
1461
1462         [GTK] editing/inserting/4960120-2.html flaky crash
1463         https://bugs.webkit.org/show_bug.cgi?id=76815
1464
1465         Reviewed by Martin Robinson.
1466
1467         Check if the node for the first parent object not ignoring
1468         accessibility is null before using it. This might happen with
1469         certain kind of accessibility objects, such as the root one (the
1470         scroller containing the webArea object as its only child).
1471
1472         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
1473         (objectFocusedAndCaretOffsetUnignored): Add missing null check.
1474
1475 2012-02-01  Antti Koivisto  <antti@apple.com>
1476
1477         Make CSSMappedAttributeDeclaration have CSSMutableStyleDeclaration instead of being one
1478         https://bugs.webkit.org/show_bug.cgi?id=77545
1479
1480         Reviewed by Andreas Kling.
1481
1482         This is the easiest path for eliminating the last remaining subclass of CSSMutableStyleDeclaration.
1483         
1484         On negative side this increases memory use of CSSMappedAttributeDeclaration by one ptr and refcount
1485         (it loses the vptr) in total.
1486         
1487         This is not meant to be the end state, just an intermediate refactoring step. CSSMappedAttributeDeclaration
1488         should clearly be renamed too but this patch doesn't do that. It might not exist in its current form
1489         much longer.
1490
1491         * css/CSSMutableStyleDeclaration.cpp:
1492         (WebCore::CSSMutableStyleDeclaration::setProperty):
1493         (WebCore::CSSMutableStyleDeclaration::merge):
1494         * css/CSSMutableStyleDeclaration.h:
1495
1496             Remove protected section. No subclasses remain.        
1497             Rename setPropertyInternal() to setProperty(). All public methods here are internal.
1498         
1499         (CSSMutableStyleDeclaration):
1500         * css/CSSParser.cpp:
1501         (WebCore::CSSParser::parseMappedAttributeValue):
1502         * dom/Attribute.cpp:
1503         (WebCore::Attribute::clone):
1504         * dom/Attribute.h:
1505         (Attribute):
1506         (WebCore::Attribute::decl):
1507         (WebCore::Attribute::mappedAttributeDeclaration):
1508         (WebCore::Attribute::setMappedAttributeDeclaration):
1509         (WebCore::Attribute::Attribute):
1510         * dom/CSSMappedAttributeDeclaration.cpp:
1511         (WebCore::CSSMappedAttributeDeclaration::setMappedImageProperty):
1512         (WebCore::CSSMappedAttributeDeclaration::setMappedProperty):
1513         (WebCore::CSSMappedAttributeDeclaration::removeMappedProperty):
1514         * dom/CSSMappedAttributeDeclaration.h:
1515         (CSSMappedAttributeDeclaration):
1516         (WebCore::CSSMappedAttributeDeclaration::declaration):
1517         (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration):
1518         
1519             Make CSSMutableStyleDeclaration a member instead of the base class.
1520         
1521         * dom/StyledElement.cpp:
1522         (WebCore::StyledElement::attributeChanged):
1523         (WebCore::StyledElement::removeCSSProperty):
1524         (WebCore::StyledElement::addCSSProperty):
1525         (WebCore::StyledElement::addCSSImageProperty):
1526         (WebCore::StyledElement::addCSSLength):
1527         (WebCore::StyledElement::addCSSColor):
1528         (WebCore::StyledElement::createMappedDecl):
1529         * svg/SVGStyledElement.cpp:
1530         (WebCore::SVGStyledElement::getPresentationAttribute):
1531
1532 2012-02-01  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1533
1534         [Qt] Set all PlatformTouchPoint values possible from a QTouch event.
1535         https://bugs.webkit.org/show_bug.cgi?id=77442
1536
1537         Reviewed by Kenneth Rohde Christiansen.
1538
1539         * platform/qt/PlatformTouchPointQt.cpp:
1540         (WebCore::PlatformTouchPoint::PlatformTouchPoint):
1541
1542 2012-02-01  Peter Rybin  <peter.rybin@gmail.com>
1543
1544         Web Inspector: CodeGeneratorInspector.py: move type builder code to dedicated InspectorTypeBuilder .h/.cpp
1545         https://bugs.webkit.org/show_bug.cgi?id=77471
1546
1547         Reviewed by Yury Semikhatsky.
1548
1549         Code is moved physically to other file -- generator is changed accrodingly.
1550
1551         * inspector/CodeGeneratorInspector.py:
1552         (String):
1553         (provides):
1554         (typename):
1555         (Array):
1556
1557 2012-02-01  Yury Semikhatsky  <yurys@chromium.org>
1558
1559         Web Inspector: debugger reports wrong sources when paused in inline script on page reload
1560         https://bugs.webkit.org/show_bug.cgi?id=77548
1561
1562         V8 returns treats each script source as ending with \n, now we take
1563         this into account when reporting script line count to the inspector
1564         front-end.
1565
1566         Reviewed by Vsevolod Vlasov.
1567
1568         Test: inspector/debugger/pause-in-inline-script.html
1569
1570         * bindings/js/ScriptDebugServer.cpp:
1571         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1572         * bindings/v8/DebuggerScript.js:
1573
1574 2012-02-01  Shinya Kawanaka  <shinyak@google.com>
1575
1576         Content element should be able to be dynamically added/removed/replaced in a shadow tree.
1577         https://bugs.webkit.org/show_bug.cgi?id=76611
1578
1579         Reviewed by Hajime Morita
1580
1581         When a content element is added/removed/replaced in a shadow tree, we have to recreate
1582         the shadow tree to recalculate inclusions of content elements. Currently we didn't recalculate it
1583         when content element is removed. (When added, it is recalculated.)
1584         This patch enables us to recalcurate the shadow tree when content element is removed.
1585
1586         Test: fast/dom/shadow/content-element-move.html
1587
1588         * dom/Element.cpp:
1589         (WebCore::Element::attach):
1590           If a shadow root exists, attaches shadow tree before attaching child elements.
1591         * dom/ShadowRoot.cpp:
1592           Added a flag to recalculate shadow tree.
1593         (WebCore::ShadowRoot::ShadowRoot):
1594         (WebCore::ShadowRoot::recalcShadowTreeStyle):
1595           Recalculates light children and shadow tree.
1596         (WebCore::ShadowRoot::setNeedsReattachHostChildrenAndShadow):
1597         (WebCore::ShadowRoot::reattachHostChildrenAndShadow):
1598           Detaches shadow tree and host light children, and attaches them again.
1599         * dom/ShadowRoot.h:
1600         (WebCore::ShadowRoot::clearNeedsReattachHostChildrenAndShadow):
1601         (WebCore::ShadowRoot::needsReattachHostChildrenAndShadow):
1602         * html/shadow/HTMLContentElement.cpp:
1603         (WebCore::HTMLContentElement::attach):
1604           Does not need to detach included elements, because they are not attached in ContainerNode anymore.
1605         (WebCore::HTMLContentElement::detach):
1606           When a content element detached, reattaches a shadow tree.
1607
1608 2012-02-01  Peter Beverloo  <peter@chromium.org>
1609
1610         getIntersectionList causes transforms to be recalculated in SVG
1611         https://bugs.webkit.org/show_bug.cgi?id=77179
1612
1613         Reviewed by Nikolas Zimmermann.
1614
1615         Introduce a local variable to store the element's local-to-parent
1616         transformation matrix in, removing the need for the const_cast and
1617         stopping us from modifying any matrices elsewhere.
1618
1619         Test: svg/custom/intersection-list-transforms.svg
1620
1621         * rendering/svg/RenderSVGModelObject.cpp:
1622         (WebCore::getElementCTM):
1623
1624 2012-02-01  Vsevolod Vlasov  <vsevik@chromium.org>
1625
1626         Web Inspector: [InspectorIndexedDB] Add tests for database names and database structure requests.
1627         https://bugs.webkit.org/show_bug.cgi?id=77439
1628
1629         Reviewed by Pavel Feldman.
1630
1631         Tests: http/tests/inspector/indexeddb/database-names.html
1632                http/tests/inspector/indexeddb/database-structure.html
1633
1634         * inspector/front-end/IndexedDBModel.js:
1635         (WebInspector.IndexedDBModel.prototype.refreshDatabase):
1636
1637 2012-01-31  Vsevolod Vlasov  <vsevik@chromium.org>
1638
1639         Web Inspector: Scripts navigator becomes empty after "show folders" settings change.
1640         https://bugs.webkit.org/show_bug.cgi?id=77441
1641
1642         Reviewed by Pavel Feldman.
1643
1644         * inspector/front-end/ScriptsNavigator.js:
1645         (WebInspector.ScriptsNavigator.prototype._reset):
1646         * inspector/front-end/utilities.js:
1647
1648 2012-02-01  Shawn Singh  <shawnsingh@chromium.org>
1649
1650         Fix the semantics of passing contentsVisible flag to GraphicsLayers
1651         https://bugs.webkit.org/show_bug.cgi?id=76975
1652
1653         Reviewed by Simon Fraser.
1654
1655         This patch is covered by existing tests, in particular
1656         compositing/visibility/layer-visible-content.html; its
1657         expectations are rebaselined.
1658
1659         * rendering/RenderLayerBacking.cpp:
1660         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1661
1662 2012-02-01  Philippe Normand  <pnormand@igalia.com>
1663
1664         Unreviewed, another GTK build fix after r106446.
1665
1666         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1667         Restore webKitWebSrcGetProtocols as it was before r106446.
1668
1669 2012-02-01  Philippe Normand  <pnormand@igalia.com>
1670
1671         Unreviewed, GTK build fix after r106446.
1672
1673         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1674
1675 2012-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
1676
1677         Unreviewed, rolling out r106432.
1678         http://trac.webkit.org/changeset/106432
1679         https://bugs.webkit.org/show_bug.cgi?id=77529
1680
1681         it breaks tests (Requested by shinyak on #webkit).
1682
1683         * dom/Element.cpp:
1684         (WebCore::Element::attach):
1685         * dom/ShadowRoot.cpp:
1686         (WebCore::ShadowRoot::recalcShadowTreeStyle):
1687         * dom/ShadowRoot.h:
1688         (ShadowRoot):
1689         * html/shadow/HTMLContentElement.cpp:
1690         (WebCore::HTMLContentElement::attach):
1691         (WebCore::HTMLContentElement::detach):
1692
1693 2012-02-01  Hayato Ito  <hayato@chromium.org>
1694
1695         Remove unnecessary [OldStyleObjC] from ShadowRoot.idl.
1696         https://bugs.webkit.org/show_bug.cgi?id=77516
1697
1698         Reviewed by Kentaro Hara.
1699
1700         No new tests. No change in behavior.
1701
1702         * dom/ShadowRoot.idl:
1703
1704 2012-01-26  Philippe Normand  <pnormand@igalia.com>
1705
1706         [GStreamer] 0.11 webkitwebsrc
1707         https://bugs.webkit.org/show_bug.cgi?id=77086
1708
1709         Port the webkitwebsrc element to GStreamer 0.11 APIs.
1710
1711         Reviewed by Gustavo Noronha Silva.
1712
1713         No new tests, existing http media layout tests should cover this.
1714
1715         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1716         (webkit_web_src_class_init):
1717
1718 2012-01-31  Hans Wennborg  <hans@chromium.org>
1719
1720         Speech Input: Report speech element rect relative to window rather than frame
1721         https://bugs.webkit.org/show_bug.cgi?id=76443
1722
1723         Reviewed by Darin Fisher.
1724
1725         When requesting speech input, report the speech element rect relative
1726         to the window rather than the frame. The embedder will typically use
1727         this position to show a bubble indicating that speech recognition is
1728         in progress.
1729
1730         Test: fast/speech/bubble-position.html
1731
1732         * html/shadow/TextControlInnerElements.cpp:
1733         (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
1734
1735 2012-01-31  Andreas Kling  <awesomekling@apple.com>
1736
1737         Make elements that don't have attributes smaller.
1738         <http://webkit.org/b/76876>
1739
1740         Reviewed by Sam Weinig and Antti Koivisto.
1741
1742         Move the inline style declaration from StyledElement to ElementAttributeData, since having
1743         an inline style declaration also implies having a style attribute on the element.
1744         This saves one CPU word per element that has no attributes.
1745
1746         This reduces memory consumption by 412 kB (on 64-bit) when viewing the full
1747         HTML5 spec at <http://whatwg.org/c>.
1748
1749         This was rolled out once because of a performance regression which has been averted this
1750         time around by adding an Element::ensureAttributeMap() so we can force creation of the
1751         NamedNodeMap without also serializing the inline style for the "style" attribute.
1752
1753         * dom/Element.h:
1754         (Element):
1755         (WebCore::Element::ensureAttributeMap):
1756         (WebCore):
1757         * dom/ElementAttributeData.h:
1758         (ElementAttributeData):
1759         * dom/NamedNodeMap.cpp:
1760         (WebCore::NamedNodeMap::ensureInlineStyleDecl):
1761         (WebCore):
1762         (WebCore::NamedNodeMap::destroyInlineStyleDecl):
1763         * dom/NamedNodeMap.h:
1764         (WebCore::NamedNodeMap::inlineStyleDecl):
1765         (NamedNodeMap):
1766         * dom/StyledElement.cpp:
1767         (WebCore::StyledElement::addSubresourceAttributeURLs):
1768         * dom/StyledElement.h:
1769         (WebCore::StyledElement::inlineStyleDecl):
1770         (WebCore::StyledElement::ensureInlineStyleDecl):
1771         (StyledElement):
1772         (WebCore::StyledElement::destroyInlineStyleDecl):
1773
1774 2012-01-31  Hayato Ito  <hayato@chromium.org>
1775
1776         Add APIs, getElementsByXXX family, to ShadowRoot IDL.
1777         https://bugs.webkit.org/show_bug.cgi?id=77323
1778
1779         Reviewed by Dimitri Glazkov.
1780
1781         Add APIs (getElementById, getElemesntByTagName, getElementsByClassName and getElementsByTagNameNS)
1782         to ShadowRoot IDL.
1783
1784         * dom/ShadowRoot.idl:
1785
1786 2012-01-31  Shinya Kawanaka  <shinyak@google.com>
1787
1788         Content element should be able to be dynamically added/removed/replaced in a shadow tree.
1789         https://bugs.webkit.org/show_bug.cgi?id=76611
1790
1791         Reviewed by Hajime Morita.
1792
1793         When a content element is added/removed/replaced in a shadow tree, we have to recreate
1794         the shadow tree to recalculate inclusions of content elements. Currently we didn't recalculate it
1795         when content element is removed. (When added, it is recalculated.)
1796         This patch enables us to recalcurate the shadow tree when content element is removed.
1797
1798         Test: fast/dom/shadow/content-element-move.html
1799
1800         * dom/Element.cpp:
1801         (WebCore::Element::attach):
1802           If a shadow root exists, attaches shadow tree before attaching child elements.
1803         * dom/ShadowRoot.cpp:
1804         (WebCore::ShadowRoot::recalcShadowTreeStyle):
1805           Recalculates light children and shadow tree.
1806         (WebCore::ShadowRoot::reattachHostChildrenAndShadow):
1807           Detaches shadow tree and host light children, and attaches them again.
1808         * dom/ShadowRoot.h:
1809           Added a flag to recalculate shadow tree.
1810         (WebCore::ShadowRoot::setNeedsShadowTreeStyleRecalc):
1811         (WebCore::ShadowRoot::clearNeedsShadowTreeStyleRecalc):
1812         (WebCore::ShadowRoot::needsShadowTreeStyleRecalc):
1813         * html/shadow/HTMLContentElement.cpp:
1814         (WebCore::HTMLContentElement::attach):
1815           Does not need to detach included elements, because they are not attached in ContainerNode anymore.
1816         (WebCore::HTMLContentElement::detach):
1817           When a content element detached, reattaches a shadow tree.
1818
1819 2012-01-31  Joe Thomas  <joethomas@motorola.com>
1820
1821         https://bugs.webkit.org/show_bug.cgi?id=76801
1822         Listboxes incorrectly display contents when cleared and then re-populated.
1823
1824         Whenever the number of items in the listbox is less than the size of listbox (number of visible items the listbox can accomodate),
1825         we set the listbox scroll-offset to zero. The scroll-offset of the Scrollbar should also be set to 0 so that when the listbox is re-populated,
1826         scrollbar position and the content inside the listbox are in sync.
1827
1828         Reviewed by Andreas Kling.
1829
1830         Tests: fast/forms/listbox-clear-restore.html
1831
1832         * rendering/RenderListBox.cpp:
1833         (WebCore::RenderListBox::computeLogicalHeight): Setting the scroll-offset of the Scrollbar to 0 when scrollbar is not needed.
1834
1835 2012-01-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1836
1837         Unreviewed. Fix build break after r106373.
1838
1839         * CMakeLists.txt:
1840
1841 2012-01-31  Adam Barth  <abarth@webkit.org>
1842
1843         HTMLPreloadScanner should understand the <base> element
1844         https://bugs.webkit.org/show_bug.cgi?id=77231
1845
1846         Reviewed by Eric Seidel.
1847
1848         Previously, the HTMLPreloadScanner would ignore the <base> element when
1849         preloading resources.  If there was a <base> tag, this could cause the
1850         preload scanner to make a bunch of useless requests.
1851
1852         This patch teaches the preload scanner to use <base> tags to better
1853         predict which URLs will be used by the document.
1854
1855         Tests: fast/preloader/first-base-tag-scanned-wins.html
1856                fast/preloader/first-base-tag-wins.html
1857                fast/preloader/understands-base-tag.html
1858
1859         * dom/Document.cpp:
1860         (WebCore::Document::completeURL):
1861         (WebCore):
1862         * dom/Document.h:
1863         (Document):
1864         (WebCore::Document::baseElementURL):
1865         * html/parser/HTMLPreloadScanner.cpp:
1866         (WebCore::HTMLNames::PreloadTask::PreloadTask):
1867         (WebCore::HTMLNames::PreloadTask::processAttributes):
1868         (WebCore::HTMLNames::PreloadTask::preload):
1869         (WebCore::HTMLNames::PreloadTask::baseElementHref):
1870         (PreloadTask):
1871         (WebCore::HTMLPreloadScanner::scan):
1872         (WebCore::HTMLPreloadScanner::processToken):
1873         (WebCore::HTMLPreloadScanner::updatePredictedBaseElementURL):
1874         (WebCore):
1875         * html/parser/HTMLPreloadScanner.h:
1876         (HTMLPreloadScanner):
1877
1878 2012-01-31  Raymond Liu  <raymond.liu@intel.com>
1879
1880         Dynamic allocate AudioBus with required number of channels for AudioNodeInput
1881         https://bugs.webkit.org/show_bug.cgi?id=76516
1882
1883         Reviewed by Kenneth Russell.
1884
1885         No new tests required.
1886
1887         * webaudio/AudioBasicProcessorNode.cpp:
1888         (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
1889         * webaudio/AudioChannelMerger.cpp:
1890         (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput):
1891         * webaudio/AudioGainNode.cpp:
1892         (WebCore::AudioGainNode::checkNumberOfChannelsForInput):
1893         * webaudio/AudioNode.cpp:
1894         (WebCore::AudioNode::checkNumberOfChannelsForInput):
1895         * webaudio/AudioNode.h:
1896         * webaudio/AudioNodeInput.cpp:
1897         (WebCore::AudioNodeInput::AudioNodeInput):
1898         (WebCore::AudioNodeInput::updateInternalBus):
1899         (WebCore::AudioNodeInput::internalSummingBus):
1900         * webaudio/AudioNodeInput.h:
1901
1902 2012-01-31  Alexey Proskuryakov  <ap@apple.com>
1903
1904         REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian
1905         https://bugs.webkit.org/show_bug.cgi?id=77473
1906         <rdar://problem/10751357>
1907
1908         Reviewed by Darin Adler.
1909
1910         Test: platform/mac/fast/events/non-roman-key-code.html
1911
1912         * WebCore.exp.in:
1913         * platform/mac/PlatformEventFactoryMac.h:
1914         * platform/mac/PlatformEventFactoryMac.mm:
1915         (WebCore::keyIdentifierForKeyEvent):
1916         (WebCore::windowsKeyCodeForKeyEvent):
1917         Export functions for reuse in WebKit2. I did not attempt any larger refactoring at this time.
1918
1919 2012-01-31  Gregg Tavares  <gman@google.com>
1920
1921         Make WebGL put synthesized errors in the JS console
1922         https://bugs.webkit.org/show_bug.cgi?id=77267
1923
1924         Reviewed by Kenneth Russell.
1925
1926         No new functionality so no new tests.
1927
1928         * html/canvas/WebGLCompressedTextures.cpp:
1929         (WebCore::WebGLCompressedTextures::validateCompressedTexFuncData):
1930         (WebCore::WebGLCompressedTextures::compressedTexImage2D):
1931         (WebCore::WebGLCompressedTextures::compressedTexSubImage2D):
1932         * html/canvas/WebGLCompressedTextures.h:
1933         (WebGLCompressedTextures):
1934         * html/canvas/WebGLDebugShaders.cpp:
1935         (WebCore::WebGLDebugShaders::getTranslatedShaderSource):
1936         * html/canvas/WebGLRenderingContext.cpp:
1937         (WebCore::WebGLRenderingContext::activeTexture):
1938         (WebCore::WebGLRenderingContext::attachShader):
1939         (WebCore::WebGLRenderingContext::bindAttribLocation):
1940         (WebCore::WebGLRenderingContext::checkObjectToBeBound):
1941         (WebCore::WebGLRenderingContext::bindBuffer):
1942         (WebCore::WebGLRenderingContext::bindFramebuffer):
1943         (WebCore::WebGLRenderingContext::bindRenderbuffer):
1944         (WebCore::WebGLRenderingContext::bindTexture):
1945         (WebCore::WebGLRenderingContext::blendEquation):
1946         (WebCore::WebGLRenderingContext::blendEquationSeparate):
1947         (WebCore::WebGLRenderingContext::blendFunc):
1948         (WebCore::WebGLRenderingContext::blendFuncSeparate):
1949         (WebCore::WebGLRenderingContext::bufferData):
1950         (WebCore::WebGLRenderingContext::bufferSubData):
1951         (WebCore::WebGLRenderingContext::checkFramebufferStatus):
1952         (WebCore::WebGLRenderingContext::clear):
1953         (WebCore::WebGLRenderingContext::compileShader):
1954         (WebCore::WebGLRenderingContext::compressedTexImage2D):
1955         (WebCore::WebGLRenderingContext::compressedTexSubImage2D):
1956         (WebCore::WebGLRenderingContext::copyTexImage2D):
1957         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
1958         (WebCore::WebGLRenderingContext::createShader):
1959         (WebCore::WebGLRenderingContext::deleteObject):
1960         (WebCore::WebGLRenderingContext::depthRange):
1961         (WebCore::WebGLRenderingContext::detachShader):
1962         (WebCore::WebGLRenderingContext::disable):
1963         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
1964         (WebCore::WebGLRenderingContext::validateWebGLObject):
1965         (WebCore::WebGLRenderingContext::drawArrays):
1966         (WebCore::WebGLRenderingContext::drawElements):
1967         (WebCore::WebGLRenderingContext::enable):
1968         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
1969         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
1970         (WebCore::WebGLRenderingContext::framebufferTexture2D):
1971         (WebCore::WebGLRenderingContext::generateMipmap):
1972         (WebCore::WebGLRenderingContext::getActiveAttrib):
1973         (WebCore::WebGLRenderingContext::getActiveUniform):
1974         (WebCore::WebGLRenderingContext::getAttachedShaders):
1975         (WebCore::WebGLRenderingContext::getAttribLocation):
1976         (WebCore::WebGLRenderingContext::getBufferParameter):
1977         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
1978         (WebCore::WebGLRenderingContext::getParameter):
1979         (WebCore::WebGLRenderingContext::getProgramParameter):
1980         (WebCore::WebGLRenderingContext::getProgramInfoLog):
1981         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
1982         (WebCore::WebGLRenderingContext::getShaderParameter):
1983         (WebCore::WebGLRenderingContext::getShaderInfoLog):
1984         (WebCore::WebGLRenderingContext::getShaderSource):
1985         (WebCore::WebGLRenderingContext::getTexParameter):
1986         (WebCore::WebGLRenderingContext::getUniform):
1987         (WebCore::WebGLRenderingContext::getUniformLocation):
1988         (WebCore::WebGLRenderingContext::getVertexAttrib):
1989         (WebCore::WebGLRenderingContext::hint):
1990         (WebCore::WebGLRenderingContext::isEnabled):
1991         (WebCore::WebGLRenderingContext::linkProgram):
1992         (WebCore::WebGLRenderingContext::pixelStorei):
1993         (WebCore::WebGLRenderingContext::readPixels):
1994         (WebCore::WebGLRenderingContext::renderbufferStorage):
1995         (WebCore::WebGLRenderingContext::scissor):
1996         (WebCore::WebGLRenderingContext::shaderSource):
1997         (WebCore::WebGLRenderingContext::stencilFunc):
1998         (WebCore::WebGLRenderingContext::stencilFuncSeparate):
1999         (WebCore::WebGLRenderingContext::stencilMaskSeparate):
2000         (WebCore::WebGLRenderingContext::texImage2DBase):
2001         (WebCore::WebGLRenderingContext::texImage2DImpl):
2002         (WebCore::WebGLRenderingContext::texImage2D):
2003         (WebCore::WebGLRenderingContext::videoFrameToImage):
2004         (WebCore::WebGLRenderingContext::texParameter):
2005         (WebCore::WebGLRenderingContext::texSubImage2DBase):
2006         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
2007         (WebCore::WebGLRenderingContext::texSubImage2D):
2008         (WebCore::WebGLRenderingContext::uniform1f):
2009         (WebCore::WebGLRenderingContext::uniform1fv):
2010         (WebCore::WebGLRenderingContext::uniform1i):
2011         (WebCore::WebGLRenderingContext::uniform1iv):
2012         (WebCore::WebGLRenderingContext::uniform2f):
2013         (WebCore::WebGLRenderingContext::uniform2fv):
2014         (WebCore::WebGLRenderingContext::uniform2i):
2015         (WebCore::WebGLRenderingContext::uniform2iv):
2016         (WebCore::WebGLRenderingContext::uniform3f):
2017         (WebCore::WebGLRenderingContext::uniform3fv):
2018         (WebCore::WebGLRenderingContext::uniform3i):
2019         (WebCore::WebGLRenderingContext::uniform3iv):
2020         (WebCore::WebGLRenderingContext::uniform4f):
2021         (WebCore::WebGLRenderingContext::uniform4fv):
2022         (WebCore::WebGLRenderingContext::uniform4i):
2023         (WebCore::WebGLRenderingContext::uniform4iv):
2024         (WebCore::WebGLRenderingContext::uniformMatrix2fv):
2025         (WebCore::WebGLRenderingContext::uniformMatrix3fv):
2026         (WebCore::WebGLRenderingContext::uniformMatrix4fv):
2027         (WebCore::WebGLRenderingContext::useProgram):
2028         (WebCore::WebGLRenderingContext::validateProgram):
2029         (WebCore::WebGLRenderingContext::vertexAttrib1f):
2030         (WebCore::WebGLRenderingContext::vertexAttrib1fv):
2031         (WebCore::WebGLRenderingContext::vertexAttrib2f):
2032         (WebCore::WebGLRenderingContext::vertexAttrib2fv):
2033         (WebCore::WebGLRenderingContext::vertexAttrib3f):
2034         (WebCore::WebGLRenderingContext::vertexAttrib3fv):
2035         (WebCore::WebGLRenderingContext::vertexAttrib4f):
2036         (WebCore::WebGLRenderingContext::vertexAttrib4fv):
2037         (WebCore::WebGLRenderingContext::vertexAttribPointer):
2038         (WebCore::WebGLRenderingContext::viewport):
2039         (WebCore::WebGLRenderingContext::forceLostContext):
2040         (WebCore::WebGLRenderingContext::loseContextImpl):
2041         (WebCore::WebGLRenderingContext::forceRestoreContext):
2042         (WebCore::WebGLRenderingContext::validateTextureBinding):
2043         (WebCore::WebGLRenderingContext::validateLocationLength):
2044         (WebCore::WebGLRenderingContext::validateSize):
2045         (WebCore::WebGLRenderingContext::validateString):
2046         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
2047         (WebCore::WebGLRenderingContext::validateTexFuncLevel):
2048         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
2049         (WebCore::WebGLRenderingContext::validateTexFuncData):
2050         (WebCore::WebGLRenderingContext::validateDrawMode):
2051         (WebCore::WebGLRenderingContext::validateStencilSettings):
2052         (WebCore::WebGLRenderingContext::validateStencilFunc):
2053         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
2054         (WebCore::WebGLRenderingContext::validateBlendEquation):
2055         (WebCore::WebGLRenderingContext::validateBlendFuncFactors):
2056         (WebCore::WebGLRenderingContext::validateCapability):
2057         (WebCore::WebGLRenderingContext::validateUniformParameters):
2058         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
2059         (WebCore::WebGLRenderingContext::validateBufferDataParameters):
2060         (WebCore::WebGLRenderingContext::validateHTMLImageElement):
2061         (WebCore::WebGLRenderingContext::vertexAttribfImpl):
2062         (WebCore::WebGLRenderingContext::vertexAttribfvImpl):
2063         (WebCore::WebGLRenderingContext::maybeRestoreContext):
2064         (WebCore):
2065         (WebCore::WebGLRenderingContext::synthesizeGLError):
2066         * html/canvas/WebGLRenderingContext.h:
2067         (WebGLRenderingContext):
2068
2069 2012-01-31  Raymond Liu  <raymond.liu@intel.com>
2070
2071         Clean up m_processLock logic in AudioBasicProcessorNode and AudioGainNode
2072         https://bugs.webkit.org/show_bug.cgi?id=76772
2073
2074         Reviewed by Kenneth Russell.
2075
2076         No new tests required.
2077
2078         * webaudio/AudioBasicProcessorNode.cpp:
2079         (WebCore::AudioBasicProcessorNode::process):
2080         (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
2081         * webaudio/AudioBasicProcessorNode.h:
2082         * webaudio/AudioGainNode.cpp:
2083         (WebCore::AudioGainNode::process):
2084         (WebCore::AudioGainNode::checkNumberOfChannelsForInput):
2085         * webaudio/AudioGainNode.h:
2086         (AudioGainNode):
2087
2088 2012-01-31  Adam Klein  <adamk@chromium.org>
2089
2090         ProcessingInstruction should not be a ContainerNode
2091         https://bugs.webkit.org/show_bug.cgi?id=75141
2092
2093         Reviewed by Darin Adler.
2094
2095         Per the DOM spec, ProcessingInstruction can't have any children.
2096         And the WebCore behavior already matches the spec by always returning
2097         false for childTypeAllowed(). This change simplifies
2098         ProcessingInstruction's implementation by making it subclass Node
2099         instead of ContainerNode.
2100
2101         Test: fast/dom/processing-instruction-appendChild-exceptions.xhtml
2102
2103         * dom/ContainerNode.cpp: Moved dispatchBeforeLoadEvent up to Node.
2104         * dom/ContainerNode.h:
2105         * dom/Node.cpp:
2106         (WebCore::Node::dispatchBeforeLoadEvent): Moved up from ContainerNode
2107         since it's used both by ProcessingInstruction and various Element
2108         subclasses.
2109         * dom/Node.h:
2110         * dom/ProcessingInstruction.cpp:
2111         (WebCore::ProcessingInstruction::ProcessingInstruction): Call Node constructor.
2112         (WebCore::ProcessingInstruction::insertedIntoDocument): Call Node impl.
2113         (WebCore::ProcessingInstruction::removedFromDocument): ditto.
2114         (WebCore::ProcessingInstruction::finishParsingChildren): ditto.
2115         * dom/ProcessingInstruction.h:
2116
2117 2012-01-31  Matthew Delaney  <mdelaney@apple.com>
2118
2119         Failing 2d.shadow.enable.off.2.html on Lion
2120         https://bugs.webkit.org/show_bug.cgi?id=77489
2121
2122         Reviewed by Dan Bernstein.
2123
2124         The canvas spec requires that shadows not be drawn under certain
2125         circumstances outlined here: http://www.whatwg.org/specs/web-apps/current-work/#shadows
2126         This patch adds in those checks which allows us to pass now (on Lion)
2127         the philip canvas test that was checking that constraint.
2128
2129         No new tests. Unskipping the test on Lion that this patch fixes.
2130
2131         * html/canvas/CanvasRenderingContext2D.cpp:
2132         (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault):
2133         (WebCore::CanvasRenderingContext2D::setShadow):
2134         (WebCore::CanvasRenderingContext2D::applyShadow):
2135         (WebCore::CanvasRenderingContext2D::shouldDrawShadows):
2136         * html/canvas/CanvasRenderingContext2D.h:
2137         (CanvasRenderingContext2D):
2138
2139 2012-01-31  Anders Carlsson  <andersca@apple.com>
2140
2141         TileCache::setNeedsDisplayInRect cleanup
2142         https://bugs.webkit.org/show_bug.cgi?id=77486
2143
2144         Reviewed by Andreas Kling.
2145
2146         * platform/graphics/ca/mac/TileCache.h:
2147         * platform/graphics/ca/mac/TileCache.mm:
2148         (WebCore::TileCache::setNeedsDisplayInRect):
2149         TileCache::tileLayerAtIndex can in the future return nil, so cope with that. Also, replace
2150         nested if statements with continue statements.
2151
2152         (WebCore::TileCache::getTileIndexRangeForRect):
2153         Rename this to better indicate that it returns a range of indices.
2154
2155 2012-01-31  Dana Jansens  <danakj@chromium.org>
2156
2157         Add contains() test to Region
2158         https://bugs.webkit.org/show_bug.cgi?id=72294
2159
2160         Reviewed by Anders Carlsson.
2161
2162         * platform/graphics/Region.cpp:
2163         (WebCore::Region::contains):
2164         (WebCore):
2165         * platform/graphics/Region.h:
2166         (Region):
2167         (Shape):
2168         (WebCore::operator==):
2169         (WebCore):
2170
2171 2012-01-31  Sami Kyostila  <skyostil@chromium.org>
2172
2173         [chromium] Compositor debug borders are not scaled correctly
2174         https://bugs.webkit.org/show_bug.cgi?id=77468
2175
2176         Use CCLayerImpl::contentBounds() instead of CCLayerImpl::bounds() to calculate debug
2177         border geometry so that the borders are properly scaled.
2178
2179         Reviewed by James Robinson.
2180
2181         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2182         (WebCore::CCLayerImpl::appendDebugBorderQuad):
2183
2184 2012-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
2185
2186         Unreviewed, rolling out r106376.
2187         http://trac.webkit.org/changeset/106376
2188         https://bugs.webkit.org/show_bug.cgi?id=77481
2189
2190         Broke WebGLLayerChromiumTest in webkit_unit_tests (Requested
2191         by kbr_google on #webkit).
2192
2193         * platform/graphics/gpu/DrawingBuffer.cpp:
2194         (WebCore):
2195         (WebCore::DrawingBuffer::reset):
2196
2197 2012-01-31  Mihnea Ovidenie  <mihnea@adobe.com>
2198
2199         [CSSRegions]Reduce the cases when the box style in region is computed
2200         https://bugs.webkit.org/show_bug.cgi?id=77446
2201
2202         Reviewed by David Hyatt.
2203
2204         Covered by existing region style tests.
2205
2206         * rendering/RenderRegion.cpp:
2207         (WebCore::RenderRegion::setRegionBoxesRegionStyle):
2208         (WebCore::RenderRegion::restoreRegionBoxesOriginalStyle):
2209
2210 2012-01-31  Anders Carlsson  <andersca@apple.com>
2211
2212         Put tiles in a HashMap
2213         https://bugs.webkit.org/show_bug.cgi?id=77480
2214
2215         Reviewed by Antti Koivisto.
2216
2217         Put tiles in a hash map keyed off the tile index.
2218
2219         * platform/graphics/ca/mac/TileCache.h:
2220         Shuffle member variables around so the order makes more sense.
2221         Add the tile map.
2222
2223         * platform/graphics/ca/mac/TileCache.mm:
2224         (WebCore::TileCache::TileCache):
2225         Update member initializers.
2226
2227         (WebCore::TileCache::setNeedsDisplayInRect):
2228         Call tileLayerAtIndex instead of tileLayerAtPosition.
2229
2230         (WebCore::TileCache::setAcceleratesDrawing):
2231         (WebCore::TileCache::setTileDebugBorderWidth):
2232         (WebCore::TileCache::setTileDebugBorderColor):
2233         Iterate over the hash map instead of the sublayers.
2234
2235         (WebCore::TileCache::resizeTileGrid):
2236         Add the created layers to the map.
2237
2238         (WebCore::TileCache::tileLayerAtIndex):
2239         Rename from tileLayerAtPoint to better reflect that this member function
2240         returns a tile layer at the given index and not the given point.
2241
2242 2012-01-31  Antti Koivisto  <antti@apple.com>
2243
2244         Make CSSOM style() return CSSStyleDeclaration*
2245         https://bugs.webkit.org/show_bug.cgi?id=77475
2246
2247         Reviewed by Anders Carlsson
2248
2249         CSSStyleRule::style() and some other places return CSSMutableStyleDeclaration. 
2250         They should return the plain CSSOM type instead.
2251         
2252         CSSMutableStyleDeclaration* should be available through non-CSSOM function.
2253
2254         * css/CSSFontFaceRule.h:
2255         (WebCore::CSSFontFaceRule::style):
2256         (WebCore::CSSFontFaceRule::declaration):
2257         * css/CSSFontSelector.cpp:
2258         (WebCore::CSSFontSelector::addFontFaceRule):
2259         * css/CSSStyleRule.h:
2260         (WebCore::CSSStyleRule::style):
2261         (WebCore::CSSStyleRule::declaration):
2262         * css/CSSStyleSelector.cpp:
2263         (WebCore::CSSStyleSelector::styleForKeyframe):
2264         * css/WebKitCSSKeyframeRule.h:
2265         (WebCore):
2266         (WebCore::WebKitCSSKeyframeRule::style):
2267         (WebCore::WebKitCSSKeyframeRule::declaration):
2268         (WebKitCSSKeyframeRule):
2269         * editing/EditingStyle.cpp:
2270         (WebCore::styleFromMatchedRulesForElement):
2271         * inspector/InspectorStyleSheet.cpp:
2272         (WebCore::InspectorStyleSheet::revalidateStyle):
2273         * page/PageSerializer.cpp:
2274         (WebCore::PageSerializer::retrieveResourcesForCSSRule):
2275         * svg/SVGFontFaceElement.cpp:
2276         (WebCore::SVGFontFaceElement::parseMappedAttribute):
2277         (WebCore::SVGFontFaceElement::fontFamily):
2278         (WebCore::SVGFontFaceElement::rebuildFontFace):
2279
2280 2012-01-31  Scott Graham  <scottmg@chromium.org>
2281
2282         [Chromium] Remove references to gyp cygwin build target
2283         https://bugs.webkit.org/show_bug.cgi?id=77253
2284
2285         Reviewed by Julien Chaffraix.
2286
2287         Target dependency is no longer required, it's done earlier in the
2288         build process.
2289
2290         * WebCore.gyp/WebCore.gyp:
2291
2292 2012-01-31  Jon Lee  <jonlee@apple.com>
2293
2294         Hidden form elements do not save their state prior to form submission
2295         https://bugs.webkit.org/show_bug.cgi?id=77391
2296         <rdar://problem/10563108>
2297
2298         Reviewed by Brady Eidson.
2299
2300         Test: fast/forms/state-restore-hidden.html
2301
2302         * html/HiddenInputType.cpp: Teach hidden inputs to save and restore their state.
2303         (WebCore::HiddenInputType::saveFormControlState):
2304         (WebCore::HiddenInputType::restoreFormControlState):
2305         * html/HiddenInputType.h:
2306         (HiddenInputType):
2307
2308 2012-01-31  Joshua Bell  <jsbell@chromium.org>
2309
2310         IndexedDB: IDBCursor.update() should raise exception if key changed
2311         https://bugs.webkit.org/show_bug.cgi?id=76952
2312
2313         Move the test from the async task to the synchronous call, per spec. Also re-ordered the tests
2314         done during the synchronous call and the asynchronous task to follow the spec order.
2315
2316         Reviewed by Tony Chang.
2317
2318         Tests: storage/indexeddb/cursor-update.html
2319
2320         * storage/IDBObjectStoreBackendImpl.cpp:
2321         (WebCore::IDBObjectStoreBackendImpl::put): Added check during update() call, order checks per spec.
2322         (WebCore::IDBObjectStoreBackendImpl::putInternal): Move effective key calculation inline.
2323         * storage/IDBObjectStoreBackendImpl.h: Removed selectKeyForPut method.
2324
2325 2012-01-31  Anders Carlsson  <andersca@apple.com>
2326
2327         Inform the tile cache whenever the visible rect changes
2328         https://bugs.webkit.org/show_bug.cgi?id=77470
2329
2330         Reviewed by Andreas Kling.
2331
2332         * platform/graphics/GraphicsLayer.h:
2333         (WebCore::GraphicsLayer::visibleRectChanged):
2334         Add empty function.
2335
2336         * platform/graphics/ca/GraphicsLayerCA.cpp:
2337         (WebCore::GraphicsLayerCA::visibleRectChanged):
2338         Call through to the PlatformCALayer.
2339
2340         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2341         (PlatformCALayer::visibleRectChanged):
2342         Call through to the underlying WebTileCacheLayer.
2343
2344         * platform/graphics/ca/mac/TileCache.mm:
2345         (WebCore::TileCache::visibleRectChanged):
2346         Add empty stub.
2347
2348         (WebCore::TileCache::visibleRect):
2349         Add new (currently unused) helper function that returns the visible rect of the
2350         tile cache layer.
2351
2352         * platform/graphics/ca/mac/WebTileCacheLayer.h:
2353         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
2354         (-[WebTileCacheLayer visibleRectChanged]):
2355         Call through to the TielCache object.
2356
2357         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2358         (PlatformCALayer::visibleRectChanged):
2359         Add stub.
2360
2361         * rendering/RenderLayerCompositor.cpp:
2362         (WebCore::RenderLayerCompositor::frameViewDidScroll):
2363         Call GraphicsLayer::visibleRectChanged.
2364
2365 2012-01-31  Antti Koivisto  <antti@apple.com>
2366
2367         Remove CSSStyleDeclaration isElementStyleDeclaration bit
2368         https://bugs.webkit.org/show_bug.cgi?id=77460
2369
2370         Reviewed by Andreas Kling.
2371
2372         Inline style declaration is now the only type of style declaration with element parent.
2373         We can remove the bit and the associated logic.
2374
2375         * bindings/js/JSDOMBinding.h:
2376         (WebCore::root):
2377         * css/CSSMutableStyleDeclaration.cpp:
2378         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
2379         (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
2380         * css/CSSMutableStyleDeclaration.h:
2381         (WebCore::CSSMutableStyleDeclaration::createInline):
2382         (CSSMutableStyleDeclaration):
2383         * css/CSSStyleDeclaration.cpp:
2384         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
2385         (WebCore):
2386         (WebCore::CSSStyleDeclaration::parentStyleSheet):
2387         * css/CSSStyleDeclaration.h:
2388         (WebCore::CSSStyleDeclaration::parentRule):
2389         (WebCore::CSSStyleDeclaration::clearParentRule):
2390         (WebCore::CSSStyleDeclaration::parentElement):
2391         (WebCore::CSSStyleDeclaration::clearParentElement):
2392         (CSSStyleDeclaration):
2393
2394 2012-01-31  Dana Jansens  <danakj@chromium.org>
2395
2396         [chromium] Compute occlusion during paint loop
2397         https://bugs.webkit.org/show_bug.cgi?id=76858
2398
2399         Reviewed by James Robinson.
2400
2401         New unit tests in TiledLayerChromiumTest.cpp, CCLayerTreeHostCommonTest.cpp, CCLayerTreeHostTest.cpp
2402
2403         * platform/graphics/FloatRect.cpp:
2404         (WebCore::enclosedIntRect):
2405         (WebCore):
2406         * platform/graphics/FloatRect.h:
2407         (WebCore):
2408         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2409         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
2410         * platform/graphics/chromium/Canvas2DLayerChromium.h:
2411         (Canvas2DLayerChromium):
2412         * platform/graphics/chromium/ContentLayerChromium.cpp:
2413         (WebCore::ContentLayerChromium::paintContentsIfDirty):
2414         * platform/graphics/chromium/ContentLayerChromium.h:
2415         (ContentLayerChromium):
2416         * platform/graphics/chromium/ImageLayerChromium.cpp:
2417         (WebCore::ImageLayerChromium::paintContentsIfDirty):
2418         * platform/graphics/chromium/ImageLayerChromium.h:
2419         (ImageLayerChromium):
2420         * platform/graphics/chromium/LayerChromium.cpp:
2421         (WebCore::LayerChromium::contentToScreenSpaceTransform):
2422         (WebCore):
2423         (WebCore::LayerChromium::addSelfToOccludedScreenSpace):
2424         (WebCore::LayerChromium::isPaintedAxisAlignedInScreen):
2425         * platform/graphics/chromium/LayerChromium.h:
2426         (WebCore):
2427         (WebCore::LayerChromium::paintContentsIfDirty):
2428         (LayerChromium):
2429         * platform/graphics/chromium/RenderSurfaceChromium.h:
2430         (RenderSurfaceChromium):
2431         * platform/graphics/chromium/TiledLayerChromium.cpp:
2432         (WebCore::TiledLayerChromium::addSelfToOccludedScreenSpace):
2433         * platform/graphics/chromium/TiledLayerChromium.h:
2434         (WebCore):
2435         ():
2436         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2437         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
2438         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
2439         (RenderSurfaceRegion):
2440         (WebCore):
2441         (WebCore::pushTargetRenderSurfaceRegion):
2442         (WebCore::popAndPushTargetRenderSurfaceRegion):
2443         (WebCore::CCLayerTreeHost::paintLayerContents):
2444         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2445         (WebCore):
2446         ():
2447         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2448
2449 2012-01-31  John Bates  <jbates@google.com>
2450
2451         [Chromium] Add chromium-style tracing support
2452         https://bugs.webkit.org/show_bug.cgi?id=76885
2453
2454         Reviewed by Darin Fisher.
2455
2456         This code enables WebKit trace events to pass through more data to the
2457         chromium platform tracing API and generally to use the full tracing
2458         API provided by chromium.
2459
2460         * bindings/v8/V8Proxy.cpp:
2461         (WebCore::V8Proxy::evaluate): Replace old tracing API.
2462         * page/Console.cpp:
2463         (WebCore::Console::time): Replace old tracing API.
2464         (WebCore::Console::timeEnd): Replace old tracing API.
2465         * platform/chromium/PlatformSupport.h:
2466         * platform/chromium/TraceEvent.h:
2467         (WebCore::TraceEvent::TraceID::TraceID):
2468         (WebCore::TraceEvent::TraceID::data):
2469         (WebCore::TraceEvent::TraceStringWithCopy::TraceStringWithCopy):
2470         (WebCore::TraceEvent::TraceStringWithCopy::operator const char* ):
2471         (WebCore::TraceEvent::setTraceValue):
2472         (WebCore::TraceEvent::addTraceEvent):
2473         (WebCore::TraceEvent::TraceEndOnScopeClose::TraceEndOnScopeClose):
2474         (WebCore::TraceEvent::TraceEndOnScopeClose::~TraceEndOnScopeClose):
2475         (WebCore::TraceEvent::TraceEndOnScopeClose::initialize):
2476         (WebCore::TraceEvent::TraceEndOnScopeClose::addEventIfEnabled):
2477         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::TraceEndOnScopeCloseThreshold):
2478         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::~TraceEndOnScopeCloseThreshold):
2479         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::initialize):
2480         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::addEventIfEnabled):
2481
2482 2012-01-31  Ryosuke Niwa  <rniwa@webkit.org>
2483
2484         Crash in DeleteSelectionCommand::handleGeneralDelete when attempting to delete the start block
2485         https://bugs.webkit.org/show_bug.cgi?id=77077
2486
2487         Reviewed by Enrica Casucci.
2488
2489         The crash was caused by a missing null check after removing the position out of the start block.
2490         Fixed the bug by adding an early return.
2491
2492         Tests: editing/deleting/delete-start-block.html
2493                editing/selection/move-into-empty-root-inline-box.html
2494
2495         * editing/DeleteSelectionCommand.cpp:
2496         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2497
2498 2012-01-31  Rafael Brandao  <rafael.lobo@openbossa.org>
2499
2500         HTMLIsIndexElement should not expose HTMLInputElement properties
2501         https://bugs.webkit.org/show_bug.cgi?id=76095
2502
2503         Reviewed by Eric Seidel.
2504
2505         This is a buildfix for r106373.
2506
2507         * DerivedSources.pri: Removed reference to HTMLIsIndexElement.idl
2508
2509 2012-01-31  Yongsheng Zhu  <yongsheng.zhu@intel.com>
2510
2511         WebGL must allocate smaller drawing buffer when the allocation fails. 
2512         https://bugs.webkit.org/show_bug.cgi?id=76654
2513
2514         Reviewed by Kenneth Russell.
2515
2516         Test: fast/canvas/webgl/drawingbuffer-test.html
2517
2518         * platform/graphics/gpu/DrawingBuffer.cpp:
2519         (WebCore):
2520         (WebCore::DrawingBuffer::create):
2521         (WebCore::DrawingBuffer::reset):
2522
2523 2012-01-25  Eric Seidel  <eric@webkit.org>
2524
2525         HTMLIsIndexElement should not expose HTMLInputElement properties
2526         https://bugs.webkit.org/show_bug.cgi?id=76095
2527
2528         Reviewed by Adam Barth.
2529
2530         document.createElement("isindex") should produce an HTMLUnknownElement
2531         per the HTML5 spec.  The parser automagically translates <isindex> into
2532         a whole dom tree roughly representing what <isindex> used to do 15 years ago. :)
2533
2534         This patch just removes our support for HTMLIsIndexElement.  The parser
2535         support was already in.  Having support for HTMLIsIndexElement was causing
2536         one of the IE TestCenter tests to fail.
2537
2538         Test: fast/dom/HTMLIsIndexElement/prototype-chain.html
2539
2540         * DerivedSources.cpp:
2541         * DerivedSources.make:
2542         * DerivedSources.pri:
2543         * GNUmakefile.list.am:
2544         * Target.pri:
2545         * WebCore.exp.in:
2546         * WebCore.gypi:
2547         * WebCore.order:
2548         * WebCore.vcproj/WebCore.vcproj:
2549         * WebCore.xcodeproj/project.pbxproj:
2550         * bindings/gobject/GNUmakefile.am:
2551         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
2552         (WebKit::createHTMLElementWrapper):
2553         * bindings/objc/DOM.mm:
2554         (WebCore::createElementClassMap):
2555         * bindings/objc/DOMHTML.h:
2556         * bindings/objc/PublicDOMInterfaces.h:
2557         * html/HTMLElementsAllInOne.cpp:
2558         * html/HTMLIsIndexElement.cpp: Removed.
2559         * html/HTMLIsIndexElement.h: Removed.
2560         * html/HTMLIsIndexElement.idl: Removed.
2561         * html/HTMLTagNames.in:
2562         * page/DOMWindow.idl:
2563
2564 2012-01-31  Alexis Menard  <alexis.menard@openbossa.org>
2565
2566         Unreviewed include cleanup.
2567
2568         Tested locally on Qt and Chromium port.
2569
2570         * dom/Node.cpp:
2571
2572 2012-01-31  Arko Saha  <arko@motorola.com>
2573
2574         The spec renamed addTrack() to addTextTrack().
2575         https://bugs.webkit.org/show_bug.cgi?id=77381
2576
2577         Reviewed by Eric Carlson.
2578
2579         Renamed addTrack() to addTextTrack().
2580         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#media-elements
2581
2582         * html/HTMLMediaElement.cpp:
2583         (WebCore::HTMLMediaElement::addTextTrack):
2584         * html/HTMLMediaElement.h:
2585         (WebCore::HTMLMediaElement::addTextTrack):
2586         * html/HTMLMediaElement.idl:
2587
2588 2012-01-31  Peter Rybin  <peter.rybin@gmail.com>
2589
2590         Web Inspector: CodeGeneratorInspector.py: reimplement generated array types
2591         https://bugs.webkit.org/show_bug.cgi?id=77289
2592
2593         Reviewed by Vsevolod Vlasov.
2594
2595         Arrays are now rendered as a single template class. Its type-specific
2596         details are provided by an additional ArrayItemHelper class that is
2597         defined using C++ specialization technique.
2598
2599         * inspector/CodeGeneratorInspector.py:
2600         (RawTypes.String):
2601         (RawTypes.String.get_array_item_raw_c_type_text):
2602         (RawTypes.Int):
2603         (RawTypes.Int.get_array_item_raw_c_type_text):
2604         (RawTypes.Number):
2605         (RawTypes.Number.get_array_item_raw_c_type_text):
2606         (RawTypes.Bool):
2607         (RawTypes.Bool.get_array_item_raw_c_type_text):
2608         (RawTypes.Object):
2609         (RawTypes.Object.get_array_item_raw_c_type_text):
2610         (RawTypes.Any):
2611         (RawTypes.Any.get_array_item_raw_c_type_text):
2612         (RawTypes.Array):
2613         (RawTypes.Array.get_array_item_raw_c_type_text):
2614         (RawTypes):
2615         (TypeBindings.create_type_declaration_.EnumBinding):
2616         (TypeBindings.create_type_declaration_.EnumBinding.get_array_item_c_type_text):
2617         (TypeBindings.create_type_declaration_.PlainString):
2618         (TypeBindings.create_type_declaration_.PlainString.get_array_item_c_type_text):
2619         (TypeBindings.create_type_declaration_.TypedefString):
2620         (TypeBindings.create_type_declaration_.TypedefString.get_array_item_c_type_text):
2621         (StructItemTraits):
2622         (get_array_item_c_type_text):
2623         (PlainObjectBinding):
2624         (PlainObjectBinding.get_array_item_c_type_text):
2625         (AdHocTypeContext):
2626         (AdHocTypeContext.get_type_name_fix):
2627         (AdHocTypeContext.add_type):
2628         (ArrayBinding):
2629         (ArrayBinding.resolve_inner):
2630         (ArrayBinding.resolve_inner.ResolveData):
2631         (ArrayBinding.request_user_runtime_cast):
2632         (ArrayBinding.request_internal_runtime_cast):
2633         (ArrayBinding.get_code_generator):
2634         (ArrayBinding.get_code_generator.CodeGenerator):
2635         (ArrayBinding.get_code_generator.CodeGenerator.generate_type_builder):
2636         (ArrayBinding.get_code_generator.CodeGenerator.generate_forward_declaration):
2637         (ArrayBinding.get_code_generator.CodeGenerator.register_use):
2638         (ArrayBinding.get_code_generator.CodeGenerator.get_generate_pass_id):
2639         (ArrayBinding.get_validator_call_text):
2640         (ArrayBinding.get_in_c_type_text):
2641         (ArrayBinding.get_array_item_c_type_text):
2642         (ArrayBinding.get_setter_value_expression_pattern):
2643         (ArrayBinding.reduce_to_raw_type):
2644         (RawTypeBinding.get_array_item_c_type_text):
2645         (ArrayItemHelper):
2646         (typename):
2647         (ArrayOf):
2648         (Traits):
2649
2650 2012-01-31  Antti Koivisto  <antti@apple.com>
2651
2652         Parent SVGFontFaceElements style declaration to the rule
2653         https://bugs.webkit.org/show_bug.cgi?id=77421
2654
2655         Reviewed by Adam Roben.
2656
2657         For some reason the declaration is parented to the element which adds a bunch of unnecessary special case code.
2658         The invalidation on mutation is done explicitly by SVGFontFaceElement so that is not affected. The declaration
2659         is not exposed so the change is not observable with a test.
2660
2661         * css/CSSFontFaceRule.cpp:
2662         (WebCore::CSSFontFaceRule::~CSSFontFaceRule):
2663         * css/CSSMutableStyleDeclaration.h:
2664         (WebCore::CSSMutableStyleDeclaration::createInline):
2665         * svg/SVGFontFaceElement.cpp:
2666         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
2667         (WebCore::SVGFontFaceElement::parseMappedAttribute):
2668         (WebCore::SVGFontFaceElement::fontFamily):
2669         (WebCore::SVGFontFaceElement::rebuildFontFace):
2670         * svg/SVGFontFaceElement.h:
2671         
2672             Remove the unnecessary m_styleDeclaration field, access through m_fontFaceRule instead.
2673
2674 2012-01-31  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2675
2676         Tap highlighting: Support better outlines for multiline inlines
2677         https://bugs.webkit.org/show_bug.cgi?id=77428
2678
2679         Reviewed by Simon Hausmann.
2680
2681         Covered by manual tests.
2682
2683         Do not use the linesBoundingBox anymore but draw a custom path
2684         with rounded corners. Inlines are drawn as max 3 rects, first
2685         line rect, joined middle rect and the rect for the last line.
2686
2687         * page/GestureTapHighlighter.cpp:
2688         * platform/graphics/Path.h: Make addBeziersForRoundedRect public.
2689
2690 2012-01-31  Alexei Filippov  <alexeif@chromium.org>
2691
2692         Web Inspector: show sizes in bytes instead of KB, MB in heap profiler.
2693         https://bugs.webkit.org/show_bug.cgi?id=77199
2694
2695         Reviewed by Pavel Feldman.
2696
2697         * inspector/front-end/DetailedHeapshotGridNodes.js:
2698         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
2699         (WebInspector.HeapSnapshotInstanceNode.prototype._enhanceData):
2700         (WebInspector.HeapSnapshotConstructorNode.prototype.get data):
2701         (WebInspector.HeapSnapshotDiffNode.prototype.get data):
2702         * inspector/front-end/UIUtils.js:
2703         (Number.withThousandsSeparator):
2704
2705 2012-01-26  Hans Wennborg  <hans@chromium.org>
2706
2707         Speech Input: move MockSpeechInputClient into Chromium DumpRenderTree implementation
2708         https://bugs.webkit.org/show_bug.cgi?id=77083
2709
2710         Reviewed by Darin Fisher.
2711
2712         Remove SpeechInputClientMock. The mock is moving to the DumpRenderTree
2713         implementation.
2714
2715         No new tests, just refactoring.
2716
2717         * GNUmakefile.list.am:
2718         * Target.pri:
2719         * WebCore.gypi:
2720         * WebCore.vcproj/WebCore.vcproj:
2721         * WebCore.xcodeproj/project.pbxproj:
2722         * platform/mock/SpeechInputClientMock.cpp: Removed.
2723         * platform/mock/SpeechInputClientMock.h: Removed.
2724
2725 2012-01-31  Pavel Feldman  <pfeldman@google.com>
2726
2727         Web Inspector: boost protocol version to 1.0
2728         https://bugs.webkit.org/show_bug.cgi?id=77408
2729
2730         Reviewed by Yury Semikhatsky.
2731
2732         * inspector/Inspector-1.0.json: Copied from Source/WebCore/inspector/Inspector.json.
2733         * inspector/Inspector.json:
2734
2735 2012-01-31  Roland Steiner  <rolandsteiner@chromium.org>
2736
2737         <style scoped>: Improve shortcut code for cases where <style scoped> isn't used
2738         https://bugs.webkit.org/show_bug.cgi?id=77410
2739
2740         Move shortcut from setupScopingElementStack(), do it at the calling sites instead
2741         (where a larger chunk of work can be skipped).
2742
2743         Reviewed by Antti Koivisto.
2744
2745         No new tests. (refactoring)
2746
2747         * css/CSSStyleSelector.cpp:
2748         (WebCore::CSSStyleSelector::setupScopingElementStack): remove shortcut code
2749         (WebCore::CSSStyleSelector::pushParent): add shortcut code
2750         (WebCore::CSSStyleSelector::matchScopedAuthorRules): factor matching scoped rules out from matchAuthorRules
2751         (WebCore::CSSStyleSelector::matchAuthorRules): add shortcut code
2752         * css/CSSStyleSelector.h:
2753         (CSSStyleSelector): add matchScopedAuthorRules
2754
2755 2012-01-31  Pavel Feldman  <pfeldman@google.com>
2756
2757         Web Inspector: DOMDebugger.setEventListenerBreakpoint should accept regular DOM event names.
2758         https://bugs.webkit.org/show_bug.cgi?id=77409
2759
2760         Reviewed by Yury Semikhatsky.
2761
2762         * inspector/Inspector.json:
2763         * inspector/InspectorDOMDebuggerAgent.cpp:
2764         (WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint):
2765         (WebCore):
2766         (WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint):
2767         (WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
2768         (WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint):
2769         (WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint):
2770         (WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
2771         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
2772         * inspector/InspectorDOMDebuggerAgent.h:
2773         (InspectorDOMDebuggerAgent):
2774         * inspector/InspectorInstrumentation.cpp:
2775         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
2776         (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
2777         (WebCore::InspectorInstrumentation::willHandleEventImpl):
2778         (WebCore::InspectorInstrumentation::willFireTimerImpl):
2779         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
2780         * inspector/InspectorInstrumentation.h:
2781         (InspectorInstrumentation):
2782         * inspector/front-end/BreakpointsSidebarPane.js:
2783         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._setBreakpoint):
2784         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._removeBreakpoint):
2785
2786 2012-01-31  Pablo Flouret  <pablof@motorola.com>
2787
2788         Fix compilation errors on build-webkit --debug --no-workers on mac.
2789         https://bugs.webkit.org/show_bug.cgi?id=75869
2790
2791         Reviewed by Adam Barth.
2792
2793         * WebCore.exp.in:
2794
2795 2012-01-30  Konrad Piascik  <kpiascik@rim.com>
2796
2797         Web Inspector: [BlackBerry] Add BlackBerry UA Strings to the Inspector's UA switcher
2798         https://bugs.webkit.org/show_bug.cgi?id=77343
2799
2800         Reviewed by Yury Semikhatsky.
2801
2802         * inspector/front-end/SettingsScreen.js:
2803         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const):
2804
2805 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
2806
2807         Web Inspector: should be possible to step through all event listeners when event listener breakpoint is hit
2808         https://bugs.webkit.org/show_bug.cgi?id=77331
2809
2810         Inspector instrumentation is called before and after each event handler invokation.
2811         In case inspector front-end is closed it is no-op, otherwise it may stop execution
2812         on an event listener breakpoint.
2813
2814         Reviewed by Pavel Feldman.
2815
2816         Test: inspector/debugger/step-through-event-listeners.html
2817
2818         * dom/EventTarget.cpp:
2819         (WebCore::EventTarget::fireEventListeners):
2820         * inspector/InspectorInstrumentation.cpp:
2821         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
2822         (WebCore::InspectorInstrumentation::willHandleEventImpl):
2823         (WebCore):
2824         (WebCore::InspectorInstrumentation::didHandleEventImpl):
2825         (WebCore::InspectorInstrumentation::didDispatchEventImpl):
2826         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
2827         (WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl):
2828         * inspector/InspectorInstrumentation.h:
2829         (InspectorInstrumentation):
2830         (WebCore::InspectorInstrumentation::willHandleEvent):
2831         (WebCore):
2832         (WebCore::InspectorInstrumentation::didHandleEvent):
2833
2834 2011-01-30  Hayato Ito  <hayato@chromium.org>
2835
2836         Attach light children after removing a shadow root.
2837         https://bugs.webkit.org/show_bug.cgi?id=74267
2838
2839         Reviewed by Ryosuke Niwa.
2840
2841         Tests: fast/dom/shadow/dynamically-created-shadow-root-expected.html
2842                fast/dom/shadow/dynamically-created-shadow-root.html:
2843
2844         * dom/Element.cpp:
2845         (WebCore::Element::removeShadowRoot):
2846
2847 2012-01-30  Sheriff Bot  <webkit.review.bot@gmail.com>
2848
2849         Unreviewed, rolling out r106324.
2850         http://trac.webkit.org/changeset/106324
2851         https://bugs.webkit.org/show_bug.cgi?id=77406
2852
2853         Broke CCLayerTreeHostTestLayerOcclusion.runMultiThread and
2854         runSingleThread (Requested by yuzo1 on #webkit).
2855
2856         * platform/graphics/FloatRect.cpp:
2857         * platform/graphics/FloatRect.h:
2858         (WebCore):
2859         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2860         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
2861         * platform/graphics/chromium/Canvas2DLayerChromium.h:
2862         (WebCore):
2863         (Canvas2DLayerChromium):
2864         * platform/graphics/chromium/ContentLayerChromium.cpp:
2865         (WebCore::ContentLayerChromium::paintContentsIfDirty):
2866         * platform/graphics/chromium/ContentLayerChromium.h:
2867         (WebCore):
2868         (ContentLayerChromium):
2869         * platform/graphics/chromium/ImageLayerChromium.cpp:
2870         (WebCore::ImageLayerChromium::paintContentsIfDirty):
2871         * platform/graphics/chromium/ImageLayerChromium.h:
2872         (WebCore):
2873         (ImageLayerChromium):
2874         * platform/graphics/chromium/LayerChromium.cpp:
2875         * platform/graphics/chromium/LayerChromium.h:
2876         (WebCore):
2877         (WebCore::LayerChromium::paintContentsIfDirty):
2878         (LayerChromium):
2879         * platform/graphics/chromium/RenderSurfaceChromium.h:
2880         * platform/graphics/chromium/TiledLayerChromium.cpp:
2881         * platform/graphics/chromium/TiledLayerChromium.h:
2882         (WebCore):
2883         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2884         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
2885         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
2886         (WebCore::CCLayerTreeHost::paintLayerContents):
2887         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2888         (WebCore):
2889         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2890         (WebCore::enclosedIntRect):
2891         (WebCore):
2892
2893 2012-01-30  Raymond Liu  <raymond.liu@intel.com>
2894
2895         Fix ASSERT fail within AudioBus::processWithGainFrom()
2896         https://bugs.webkit.org/show_bug.cgi?id=76685
2897
2898         Reviewed by Daniel Bates.
2899
2900         Test: webaudio/audionode-connect-order.html
2901
2902         * webaudio/AudioBasicProcessorNode.cpp:
2903         (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode):
2904
2905 2012-01-30  Roland Steiner  <rolandsteiner@chromium.org>
2906
2907         <style scoped>: Implement scoped stylesheets and basic application
2908         https://bugs.webkit.org/show_bug.cgi?id=73190
2909
2910         Implementing support for <style scoped>:
2911         Add a vector stack to CSSStyleSelector that keeps track of encountered scoping elements. This is
2912         used for O(1) access to all relevant style sheets for a given element.
2913         Adapt matching of author style sheets to also consult appropriate scoped sheets.
2914         Finally, prevent style sharing from crossing into/out of scoped style boundaries.
2915
2916         Reviewed by Antti Koivisto.
2917
2918         Tests: fast/css/style-scoped/style-scoped-attach.html
2919                fast/css/style-scoped/style-scoped-basic.html
2920                fast/css/style-scoped/style-scoped-detach.html
2921                fast/css/style-scoped/style-scoped-remove-scoped.html
2922                fast/css/style-scoped/style-scoped-set-scoped.html
2923
2924         * css/CSSStyleSelector.cpp:
2925         (RuleSet):
2926         (WebCore::CSSStyleSelector::CSSStyleSelector): add code for scoped style sheets
2927         (WebCore::CSSStyleSelector::collectFeatures): ditto
2928         (WebCore):
2929         (WebCore::CSSStyleSelector::determineScopingElement): determine whether an author sheet is scoped (and to which scope), or global
2930         (WebCore::CSSStyleSelector::scopedRuleSetForElement): returns the RuleSet for the <style scoped> contained by the passed-in element (if any), or 0
2931         (WebCore::CSSStyleSelector::appendAuthorStylesheets): add code for scoped style sheets
2932         (WebCore::CSSStyleSelector::setupScopingElementStack): determine scoping element ancestors of the given element
2933         (WebCore::CSSStyleSelector::pushParent): simplify and refactor SelectorChecker::pushParent, as code in CSStyleSelector needs partial access
2934         (WebCore::CSSStyleSelector::popParent): ditto
2935         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules): helper function
2936         (WebCore::CSSStyleSelector::matchAuthorRules): use AuthorRuleSetIterator to iterate over all relevant RuleSets
2937         (WebCore::CSSStyleSelector::matchRules): adapt for scoped style rules
2938         (WebCore::CSSStyleSelector::matchAllRules): ditto
2939         (WebCore::CSSStyleSelector::locateCousinList): prevent style sharing across scope boundaries
2940         (WebCore::CSSStyleSelector::canShareStyleWithElement): ditto
2941         (WebCore::CSSStyleSelector::locateSharedStyle): ditto
2942         (WebCore::CSSStyleSelector::pseudoStyleForElement): changed call to matchAuthorRules
2943         (WebCore::CSSStyleSelector::styleForPage): add comment
2944         (WebCore::CSSStyleSelector::checkRegionStyle): add global scope parameter
2945         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): changed call to matchAuthorRules
2946         (WebCore::RuleSet::addRulesFromSheet): adapt for scoped style rules
2947         * css/CSSStyleSelector.h:
2948         (CSSStyleSelector):
2949         (WebCore::CSSStyleSelector::ScopeStackFrame::ScopeStackFrame): struct holding an Element pointer and a RuleSet pointer, to be used in a Vector
2950         (WebCore::CSSStyleSelector::scopingElementStackIsConsistent): returns if the last seen parent matches the passed-in element
2951         * css/SelectorChecker.cpp:
2952         (WebCore::SelectorChecker::setupParentStack): set up the parent stack (refactoring)
2953         (WebCore::SelectorChecker::pushParent): simplify and refactor
2954         * css/SelectorChecker.h:
2955         (WebCore::SelectorChecker::popParent): ditto
2956         (WebCore::SelectorChecker::parentStackIsEmpty): ditto
2957         (WebCore::SelectorChecker::parentStackIsConsistent): make parameter const
2958
2959 2012-01-30  Dana Jansens  <danakj@chromium.org>
2960
2961         [chromium] Compute occlusion during paint loop
2962         https://bugs.webkit.org/show_bug.cgi?id=76858
2963
2964         Reviewed by James Robinson.
2965
2966         New unit tests in TiledLayerChromiumTest.cpp, CCLayerTreeHostCommonTest.cpp, CCLayerTreeHostTest.cpp
2967
2968         * platform/graphics/FloatRect.cpp:
2969         (WebCore::enclosedIntRect):
2970         (WebCore):
2971         * platform/graphics/FloatRect.h:
2972         (WebCore):
2973         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
2974         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
2975         * platform/graphics/chromium/Canvas2DLayerChromium.h:
2976         (Canvas2DLayerChromium):
2977         * platform/graphics/chromium/ContentLayerChromium.cpp:
2978         (WebCore::ContentLayerChromium::paintContentsIfDirty):
2979         * platform/graphics/chromium/ContentLayerChromium.h:
2980         (ContentLayerChromium):
2981         * platform/graphics/chromium/ImageLayerChromium.cpp:
2982         (WebCore::ImageLayerChromium::paintContentsIfDirty):
2983         * platform/graphics/chromium/ImageLayerChromium.h:
2984         (ImageLayerChromium):
2985         * platform/graphics/chromium/LayerChromium.cpp:
2986         (WebCore::LayerChromium::contentToScreenSpaceTransform):
2987         (WebCore):
2988         (WebCore::LayerChromium::addSelfToOccludedScreenSpace):
2989         (WebCore::LayerChromium::isPaintedAxisAlignedInScreen):
2990         * platform/graphics/chromium/LayerChromium.h:
2991         (WebCore):
2992         (WebCore::LayerChromium::paintContentsIfDirty):
2993         (LayerChromium):
2994         * platform/graphics/chromium/RenderSurfaceChromium.h:
2995         (RenderSurfaceChromium):
2996         * platform/graphics/chromium/TiledLayerChromium.cpp:
2997         (WebCore::TiledLayerChromium::addSelfToOccludedScreenSpace):
2998         * platform/graphics/chromium/TiledLayerChromium.h:
2999         (WebCore):
3000         ():
3001         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3002         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
3003         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
3004         (RenderSurfaceRegion):
3005         (WebCore):
3006         (WebCore::pushTargetRenderSurfaceRegion):
3007         (WebCore::popAndPushTargetRenderSurfaceRegion):
3008         (WebCore::CCLayerTreeHost::paintLayerContents):
3009         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3010         (WebCore):
3011         ():
3012         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3013
3014 2012-01-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3015
3016         Add ElementAttributeData class to replace internal uses of NamedNodeMap
3017         https://bugs.webkit.org/show_bug.cgi?id=77233
3018
3019         Reviewed by Andreas Kling.
3020
3021         Move part of non-DOM functionality of NamedNodeMap into a separate class. This is
3022         the first step toward the goal of separating NamedNodeMap from internal attribute
3023         storage, as described in https://bugs.webkit.org/show_bug.cgi?id=75069.
3024
3025         The internal attribute storage is exposed as attributeData() in Element, and when
3026         necessary (because it has no back pointer to Element) via methods in Element.
3027
3028         No new tests. Except from setClass() change this is just moving the code, no new
3029         feature was added.
3030
3031         * CMakeLists.txt:
3032         * GNUmakefile.list.am:
3033         * Target.pri:
3034         * WebCore.gypi:
3035         * WebCore.xcodeproj/project.pbxproj:
3036         * dom/DOMAllInOne.cpp:
3037         * dom/Element.cpp:
3038         (WebCore::Element::idAttributeChanged):
3039         * dom/Element.h:
3040         (WebCore::Element::attributeData):
3041         (WebCore::Element::ensureAttributeData):
3042         (Element):
3043         (WebCore::Element::idForStyleResolution):
3044         * dom/ElementAttributeData.cpp: Added.
3045         (WebCore):
3046         (WebCore::ElementAttributeData::setClass): the only caller of this function
3047         already deal with the case when the element has no class, so don't do it here.
3048         * dom/ElementAttributeData.h: Added.
3049         (WebCore):
3050         (ElementAttributeData):
3051         (WebCore::ElementAttributeData::clearClass):
3052         (WebCore::ElementAttributeData::classNames):
3053         (WebCore::ElementAttributeData::idForStyleResolution):
3054         (WebCore::ElementAttributeData::setIdForStyleResolution):
3055         (WebCore::ElementAttributeData::ElementAttributeData):
3056         * dom/NamedNodeMap.cpp:
3057         (WebCore::NamedNodeMap::clearAttributes):
3058         * dom/NamedNodeMap.h:
3059         (WebCore::NamedNodeMap::attributeData):
3060         (NamedNodeMap):
3061         * dom/StyledElement.cpp:
3062         (WebCore::StyledElement::classAttributeChanged):
3063         * dom/StyledElement.h:
3064         (WebCore::StyledElement::classNames):
3065         * html/ClassList.cpp:
3066         (WebCore::ClassList::classNames):
3067
3068 2012-01-30  Gregg Tavares  <gman@chromium.org>
3069
3070         Add Plumming to get graphics error messages to JS Console
3071         https://bugs.webkit.org/show_bug.cgi?id=77238
3072
3073         Reviewed by Kenneth Russell.
3074
3075         No new tests. No change in behavior.
3076
3077         * html/canvas/WebGLRenderingContext.cpp:
3078         (WebGLRenderingContextErrorMessageCallback):
3079         (WebCore::WebGLRenderingContextErrorMessageCallback::WebGLRenderingContextErrorMessageCallback):
3080         (WebCore::WebGLRenderingContextErrorMessageCallback::onErrorMessage):
3081         (WebCore::WebGLRenderingContextErrorMessageCallback::~WebGLRenderingContextErrorMessageCallback):
3082         (WebCore):
3083         (WebCore::WebGLRenderingContext::create):
3084         (WebCore::WebGLRenderingContext::initializeNewContext):
3085         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
3086         * html/canvas/WebGLRenderingContext.h:
3087         (WebGLRenderingContext):
3088         * platform/graphics/GraphicsContext3D.h:
3089         (ErrorMessageCallback):
3090         (WebCore::GraphicsContext3D::ErrorMessageCallback::~ErrorMessageCallback):
3091         (GraphicsContext3D):
3092         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3093         (WebCore::GraphicsContext3D::setErrorMessageCallback):
3094         (WebCore):
3095         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3096         (WebCore::GraphicsContext3D::setErrorMessageCallback):
3097         (WebCore):
3098         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3099         (WebCore::GraphicsContext3D::setErrorMessageCallback):
3100         (WebCore):
3101
3102 2012-01-30  Anders Carlsson  <andersca@apple.com>
3103
3104         Simplify RenderLayerCompositor::frameViewDidScroll
3105         https://bugs.webkit.org/show_bug.cgi?id=77398
3106
3107         Reviewed by Sam Weinig.
3108
3109         Remove the scrollPosition parameter from RenderLayerCompositor::frameViewDidScroll; we can just get it
3110         from the associated FrameView object.
3111
3112         * page/FrameView.cpp:
3113         (WebCore::FrameView::scrollPositionChanged):
3114         * rendering/RenderLayerCompositor.cpp:
3115         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
3116         Call frameViewDidScroll() here instead of setting the scroll layer position explicitly.
3117
3118         (WebCore::RenderLayerCompositor::frameViewDidScroll):
3119         (WebCore::RenderLayerCompositor::ensureRootLayer):
3120         * rendering/RenderLayerCompositor.h:
3121         (RenderLayerCompositor):
3122
3123 2012-01-30  Pablo Flouret  <pablof@motorola.com>
3124
3125         Don't select the next selectable index when deselecting an option in select elements with size set to a value greater than one.
3126         https://bugs.webkit.org/show_bug.cgi?id=76389
3127
3128         Reviewed by Kent Tamura.
3129
3130         This behavior matches the rest of the browsers.
3131
3132         Test: fast/forms/select/option-selecting.html
3133
3134         * html/HTMLSelectElement.cpp:
3135         (WebCore::HTMLSelectElement::optionSelectionStateChanged):
3136
3137 2012-01-30  Anders Carlsson  <andersca@apple.com>
3138
3139         Scrollbars don't show when scrolling on the scrolling thread
3140         https://bugs.webkit.org/show_bug.cgi?id=77396
3141         <rdar://problem/10710736>
3142
3143         Reviewed by Sam Weinig.
3144
3145         Use ScrollAnimator::scrollToOffsetWithoutAnimation when updating the frame view scroll offset,
3146         since that function will end up invalidating the scrollbars correctly.
3147
3148         * page/ScrollingCoordinator.cpp:
3149         (WebCore::ScrollingCoordinator::didUpdateMainFrameScrollPosition):
3150
3151 2012-01-30  Anders Carlsson  <andersca@apple.com>
3152
3153         Show repaint counters in individual tiles
3154         https://bugs.webkit.org/show_bug.cgi?id=77390
3155         <rdar://problem/10767967>
3156
3157         Reviewed by Darin Adler.
3158
3159         * platform/graphics/ca/mac/TileCache.h:
3160         * platform/graphics/ca/mac/TileCache.mm:
3161         (WebCore::TileCache::setNeedsDisplayInRect):
3162         Make sure to invalidate the repaint counter rect if necessary.
3163
3164         (WebCore::TileCache::drawLayer):
3165         Draw the repaint counter.
3166
3167         (WebCore::TileCache::showRepaintCounter):
3168         New function that determines whether we should show repaint counters for the given tile cache.
3169
3170         * platform/graphics/ca/mac/WebTileLayer.h:
3171         * platform/graphics/ca/mac/WebTileLayer.mm:
3172         (-[WebTileLayer incrementRepaintCount]):
3173         Add method for getting the repaint count.
3174
3175 2012-01-30  Dan Bernstein  <mitz@apple.com>
3176
3177         <rdar://problem/10778045> REGRESSION (r91935): text-combine fails
3178         https://bugs.webkit.org/show_bug.cgi?id=77373
3179
3180         Reviewed by Darin Adler.
3181
3182         Removed tests that were failing because of this bug from the Lion skipped
3183         list.
3184
3185         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
3186         (WebCore::GlyphPage::fill): Changed to use CTFontGetGlyphsForCharacters,
3187         rather than wkGetVerticalGlyphsForCharacters, for non-fullwidth fonts.
3188
3189 2012-01-30  Christopher Hutten-Czapski  <chutten@rim.com>
3190
3191         BlackBerry - Support Proxy-Authenticate headers when a proxy is configured
3192         https://bugs.webkit.org/show_bug.cgi?id=77361
3193
3194         Though we have a proxy configured, we might not have the auth
3195         credentials it requires. Support Proxy-Authenticate for that case.
3196
3197         Reviewed by George Staikos.
3198
3199         * platform/network/blackberry/NetworkJob.cpp:
3200         (WebCore::NetworkJob::handleNotifyHeaderReceived):
3201         (WebCore::NetworkJob::handleAuthHeader):
3202         (WebCore::NetworkJob::sendRequestWithCredentials):
3203         * platform/network/blackberry/NetworkJob.h:
3204         * platform/network/blackberry/NetworkManager.cpp:
3205         (WebCore::NetworkManager::startJob):
3206
3207 2012-01-27  James Robinson  <jamesr@chromium.org>
3208
3209         [chromium] Remove unnecessary retry logic in LayerRendererChromium initialization for accelerated painting
3210         https://bugs.webkit.org/show_bug.cgi?id=77247
3211
3212         Reviewed by Kenneth Russell.
3213
3214         The accelerate painting setting is done differently from other capability-dependent settings for no good reason,
3215         requiring that we retry initialization with different settings. For all other settings we set the capabilities
3216         bit to true if the setting is requested and if the required capabilities exist on the underlying context.
3217
3218         * platform/graphics/chromium/LayerRendererChromium.cpp:
3219         (WebCore::LayerRendererChromium::create):
3220         (WebCore::LayerRendererChromium::initialize):
3221         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3222         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
3223
3224 2012-01-30  Brady Eidson  <beidson@apple.com>
3225
3226         <rdar://problem/10707072>
3227         Crashes in WebProcess at WebCore::Node::rendererIsNeeded
3228
3229         Reviewed by Darin Adler.
3230
3231         In specific circumstances a plugin element can be without a render style at the point in time where
3232         the page navigated and enters the page cache.
3233
3234         When this is the cash, the element should not enter into the "custom style for renderer" mode and should
3235         instead use the default render style machinery.
3236
3237         Test: plugins/crash-restoring-pluging-page-from-page-cache.html
3238
3239         * html/HTMLPlugInImageElement.cpp:
3240         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache): Only setHasCustomStyleForRenderer and 
3241           forceRecalc if there actually is a custom style to be used.
3242         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache): Only clearHasCustomStyleForRenderer if there
3243           actually was a custom style to be cleared.
3244         (WebCore::HTMLPlugInImageElement::customStyleForRenderer): This should only be called if there actually is a 
3245           custom style to be used. Otherwise the element would have to fallback to the "normal" RenderStyle which might
3246           not exist.
3247
3248 2012-01-30  Anders Carlsson  <andersca@apple.com>
3249
3250         Show debug borders for individual tile cache tiles
3251         https://bugs.webkit.org/show_bug.cgi?id=77388
3252
3253         Reviewed by Sam Weinig.
3254
3255         * platform/graphics/GraphicsLayer.cpp:
3256         (WebCore::GraphicsLayer::updateDebugIndicators):
3257         Give tile cache tiles a thin dark blue border.
3258
3259         * platform/graphics/ca/mac/TileCache.h:
3260         (WebCore::TileCache::tileDebugBorderWidth):
3261         (WebCore::TileCache::tileDebugBorderColor):
3262         Add getters and member variables for the tile debug border width and color.
3263
3264         * platform/graphics/ca/mac/TileCache.mm:
3265         (WebCore::TileCache::TileCache):
3266         Initialize m_tileDebugBorderWidth.
3267
3268         (WebCore::TileCache::setTileDebugBorderWidth):
3269         Update the border width of each tile layer.
3270
3271         (WebCore::TileCache::setTileDebugBorderColor):
3272         Update the border color of each tile layer.
3273
3274         (WebCore::TileCache::createTileLayer):
3275         Set the border color and border width.
3276
3277         * platform/graphics/ca/mac/WebTileCacheLayer.h:
3278         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
3279         (-[WebTileCacheLayer borderColor]):
3280         (-[WebTileCacheLayer setBorderColor:]):
3281         (-[WebTileCacheLayer borderWidth]):
3282         (-[WebTileCacheLayer setBorderWidth:]):
3283         Call through to the TileCache.
3284
3285         * platform/graphics/mac/WebLayer.mm:
3286         (drawLayerContents):
3287         Don't draw the repaint counter for tile cache layers, each tile will maintain its own repaint counter.
3288
3289 2012-01-30  Rakesh KN  <rakesh.kn@motorola.com>
3290
3291         single-file input elements should refuse multi-file drags
3292         https://bugs.webkit.org/show_bug.cgi?id=25913
3293
3294         Reviewed by Eric Seidel.
3295
3296         Refuse the multiple file drags onto a single file input element.
3297
3298         No new tests: Covered by existing tests, updated the expected results.
3299
3300         * page/DragController.cpp:
3301         (WebCore::DragController::tryDocumentDrag):
3302         Setting the dragSession.numberOfItemsToBeAccepted to 0 so that drag operation is none if the
3303         file input element under mouse is single input type and number of files dragged onto that
3304         input element are more than 1.
3305
3306 2012-01-30  Dana Jansens  <danakj@chromium.org>
3307
3308         [chromium] Use region reported painted opaque for draw culling
3309         https://bugs.webkit.org/show_bug.cgi?id=76015
3310
3311         Reviewed by James Robinson.
3312
3313         New unit tests in CCTiledLayerImplTest.cpp, CCQuadCullerTest.cpp, CCLayerTreeHostImplTest.cpp
3314
3315         * platform/graphics/chromium/LayerChromium.cpp:
3316         (WebCore::LayerChromium::setOpaque):
3317         * platform/graphics/chromium/TiledLayerChromium.cpp:
3318         (UpdatableTile):
3319         (WebCore::TiledLayerChromium::pushPropertiesTo):
3320         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
3321         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
3322         (WebCore::CCDrawQuad::opaqueRect):
3323         (WebCore):
3324         * platform/graphics/chromium/cc/CCDrawQuad.h:
3325         (CCDrawQuad):
3326         (WebCore::CCDrawQuad::needsBlending):
3327         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3328         (WebCore::CCQuadCuller::cullOccludedQuads):
3329         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp:
3330         (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
3331         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
3332         (WebCore::CCTileDrawQuad::create):
3333         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
3334         * platform/graphics/chromium/cc/CCTileDrawQuad.h:
3335         (CCTileDrawQuad):
3336         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3337         (DrawableTile):
3338         (WebCore::DrawableTile::opaqueRect):
3339         (WebCore::DrawableTile::setOpaqueRect):
3340         (WebCore::CCTiledLayerImpl::appendQuads):
3341         (WebCore::CCTiledLayerImpl::pushTileProperties):
3342         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3343         (CCTiledLayerImpl):
3344
3345 2012-01-30  Ryosuke Niwa  <rniwa@webkit.org>
3346
3347         Crash in previousLinePosition when moving into a root inline box without leaves
3348         https://bugs.webkit.org/show_bug.cgi?id=76812
3349
3350         Reviewed by Enrica Casucci.
3351
3352         The crash was caused by us assuming that every root inline box has at least one leaf,
3353         which isn't true when we create inline boxes for an empty text run with margin, border, etc...
3354
3355         Test: editing/selection/move-into-empty-root-inline-box.html
3356
3357         * editing/visible_units.cpp:
3358         (WebCore::previousLinePosition):
3359         (WebCore::nextLinePosition):
3360
3361 2012-01-30  Levi Weintraub  <leviw@chromium.org>
3362
3363         !m_insideRegionPaint assertion in RenderRegion.cpp is invalid
3364         https://bugs.webkit.org/show_bug.cgi?id=77372
3365
3366         Reviewed by David Hyatt.
3367
3368         Removing the !m_insideRegionPaint assertion that's in three functions in
3369         RenderRegion. It's triggering in numerous layout tests and isn't valid.
3370
3371         No new tests as this just removes assertions.
3372
3373         * rendering/RenderRegion.cpp:
3374         (WebCore::RenderRegion::setRenderBoxRegionInfo):
3375         (WebCore::RenderRegion::takeRenderBoxRegionInfo):
3376         (WebCore::RenderRegion::removeRenderBoxRegionInfo):
3377
3378 2012-01-30  Adrienne Walker  <enne@google.com>
3379
3380         [chromium] Always pre-reserve scrollbar and scroll corner textures
3381         https://bugs.webkit.org/show_bug.cgi?id=77251
3382
3383         Reviewed by James Robinson.
3384
3385         Add a flag to LayerChromium that says that a layer's textures should
3386         always be reserved. Prior to painting layers, find all layers marked
3387         as such and reserve their textures. This will prevent texture memory
3388         limits from being hit before the root layer's scrollbars are reserved
3389         and painted.
3390
3391         * platform/graphics/chromium/LayerChromium.cpp:
3392         (WebCore::LayerChromium::LayerChromium):
3393         * platform/graphics/chromium/LayerChromium.h:
3394         (LayerChromium):
3395         (WebCore::LayerChromium::reserveTextures):
3396         (WebCore::LayerChromium::setAlwaysReserveTextures):
3397         (WebCore::LayerChromium::alwaysReserveTextures):
3398         * platform/graphics/chromium/TiledLayerChromium.cpp:
3399         (WebCore::TiledLayerChromium::reserveTextures):
3400         * platform/graphics/chromium/TiledLayerChromium.h:
3401         ():
3402         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3403         (WebCore::CCLayerTreeHost::updateLayers):
3404         (WebCore::CCLayerTreeHost::reserveTextures):
3405         (WebCore):
3406         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3407         ():
3408
3409 2012-01-30  Beth Dakin  <bdakin@apple.com>
3410
3411         Speculative 32-bit build-fix.
3412
3413         * WebCore.exp.in:
3414
3415 2012-01-30  Mihnea Ovidenie  <mihnea@adobe.com>
3416
3417         [CSSRegions]Add support for background-color in region styling
3418         https://bugs.webkit.org/show_bug.cgi?id=71488
3419
3420         Reviewed by David Hyatt.
3421
3422         Based on work by Alexandru Chiculita (achicu@adobe.com).
3423         Previous patches for region styling were touching RenderObject::style() method. After several attempts to avoid regressions
3424         (including caching of RenderObject::style() pointer in most used methods), we decided to attempt a different approach:
3425         Step1: before each region is repainted, we compute the style for each box that falls into the region
3426         Step2: before paint, we store the box original style
3427         Step3: paint the region contents using the style in region
3428         Step4: after paint is finished, we restore the box original style (and store the box style in region for future region paint)
3429
3430         Tests for region styling are also enabled with this patch.
3431
3432         * WebCore.exp.in:
3433         * rendering/RenderFlowThread.cpp:
3434         (WebCore::RenderFlowThread::clearRenderBoxCustomStyle):
3435         (WebCore::RenderFlowThread::setRegionRangeForBox):
3436         * rendering/RenderFlowThread.h:
3437         ():
3438         * rendering/RenderLayer.cpp:
3439         (WebCore::RenderLayer::paint):
3440         (WebCore::RenderLayer::hitTest):
3441         * rendering/RenderObject.cpp:
3442         * rendering/RenderObject.h:
3443         (WebCore::RenderObject::style):
3444         (RenderObject):
3445         * rendering/RenderObjectChildList.cpp:
3446         (WebCore::RenderObjectChildList::removeChildNode):
3447         * rendering/RenderRegion.cpp:
3448         (WebCore::RenderRegion::RenderRegion):
3449         (WebCore::RenderRegion::setRegionBoxesRegionStyle):
3450         (WebCore):
3451         (WebCore::RenderRegion::restoreRegionBoxesOriginalStyle):
3452         (WebCore::RenderRegion::paintReplaced):
3453         (WebCore::RenderRegion::setRenderBoxRegionInfo):
3454         (WebCore::RenderRegion::takeRenderBoxRegionInfo):
3455         (WebCore::RenderRegion::removeRenderBoxRegionInfo):
3456         (WebCore::RenderRegion::renderBoxRegionStyle):
3457         (WebCore::RenderRegion::computeStyleInRegion):
3458         (WebCore::RenderRegion::clearBoxStyleInRegion):
3459         * rendering/RenderRegion.h:
3460         (RenderRegion):
3461         * rendering/RenderView.cpp:
3462         (WebCore::RenderView::RenderView):
3463         * rendering/RenderView.h:
3464         (WebCore):
3465         (RenderView):
3466
3467 2012-01-30  Jessie Berlin  <jberlin@apple.com>
3468
3469         WebCore build exceeds address space on 32-bit Windows builders (again).
3470         https://bugs.webkit.org/show_bug.cgi?id=77357
3471
3472         Reviewed by Adam Roben.
3473
3474         Add an Inspector All-In-One file, but only use it in Release and Production builds.
3475         This differs from our other All-In-One files, but it is a better approach because it makes
3476         debugging possible in the Debug configuration (the symbols will be in the correct .obj file
3477         for the original .cpp files).
3478
3479         * WebCore.vcproj/WebCore.vcproj:
3480         Also, let VS have its way with the vcproj file.
3481         * inspector/InspectorAllInOne.cpp: Added.
3482
3483 2012-01-28  Matthew Delaney  <mdelaney@apple.com>
3484
3485         Limit periodic flushing inside ImageBufferCG to just Lion
3486         https://bugs.webkit.org/show_bug.cgi?id=77353
3487         <rdar://problem/10328309>
3488
3489         Reviewed by Chris Marrin.
3490
3491         * platform/graphics/cg/ImageBufferCG.cpp:
3492         * platform/graphics/cg/ImageBufferDataCG.h:
3493
3494 2012-01-30  Tommy Widenflycht  <tommyw@google.com>
3495
3496         Memory leak caused by PeerConnection add a NULL media stream
3497         https://bugs.webkit.org/show_bug.cgi?id=76150
3498
3499         It was my missunderstanding that the IDL keyword [StrictTypeChecking] also protects against
3500         null or undefined arguments, it doesn't. Added checks for null pointers.
3501
3502         Reviewed by Adam Barth.
3503
3504         Test: fast/mediastream/peerconnection-addstream.html
3505