2009-12-16 Jon Honeycutt <jhoneycutt@apple.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2009-12-16  Jon Honeycutt  <jhoneycutt@apple.com>
2
3         MSAA: Accessibility role of text nodes is wrong
4
5         https://bugs.webkit.org/show_bug.cgi?id=32631
6         <rdar://problem/7369084>
7
8         Reviewed by Alice Liu.
9
10         Test: platform/win/accessibility/text-role.html
11
12         * accessibility/AccessibilityObject.h:
13         (WebCore::):
14         Add a new role to the enum.
15         (WebCore::AccessibilityObject::roleValueForMSAA):
16         Declare a function to return the accessibility role for MSAA; the base
17         implementation returns the old role value.
18
19         * accessibility/AccessibilityRenderObject.cpp:
20         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
21         Initialize m_roleForMSAA.
22         (WebCore::AccessibilityRenderObject::roleValueForMSAA):
23         If m_roleForMSAA has been set, return it. If the renderer is a
24         RenderText, set the role to EditableTextRole to match IE and Firefox.
25         Otherwise, set the role for MSAA to the old role value.
26
27         * accessibility/AccessibilityRenderObject.h:
28         Add a member to hold the role for MSAA, and declare an override of
29         roleValueForMSAA().
30
31 2009-12-16  Eric Seidel  <eric@webkit.org>
32
33         No review, rolling out r52206.
34         http://trac.webkit.org/changeset/52206
35         https://bugs.webkit.org/show_bug.cgi?id=31187
36
37         This broke pixel tests on Mac.  Presumably the code in
38         ImageCG is wrong here.
39
40         * platform/graphics/BitmapImage.h:
41         * platform/graphics/GeneratedImage.cpp:
42         (WebCore::GeneratedImage::drawPattern):
43         * platform/graphics/GeneratedImage.h:
44         * platform/graphics/Image.cpp:
45         (WebCore::Image::drawTiled):
46         * platform/graphics/Image.h:
47         * platform/graphics/cairo/ImageCairo.cpp:
48         (WebCore::Image::drawPattern):
49         * platform/graphics/cg/ImageCG.cpp:
50         (WebCore::Image::drawPattern):
51         * platform/graphics/haiku/ImageHaiku.cpp:
52         (WebCore::Image::drawPattern):
53         * platform/graphics/qt/ImageQt.cpp:
54         (WebCore::Image::drawPattern):
55         * platform/graphics/skia/ImageSkia.cpp:
56         (WebCore::Image::drawPattern):
57         * platform/graphics/wince/GraphicsContextWince.cpp:
58         (WebCore::GraphicsContext::drawBitmapPattern):
59         * platform/graphics/wince/ImageBufferWince.cpp:
60         (WebCore::):
61         (WebCore::BufferedImage::drawPattern):
62         * platform/graphics/wx/ImageWx.cpp:
63         (WebCore::BitmapImage::drawPattern):
64         (WebCore::Image::drawPattern):
65
66 2009-12-16  Dimitri Glazkov  <dglazkov@chromium.org>
67
68         Reviewed by David Levin.
69
70         https://bugs.webkit.org/show_bug.cgi?id=32637
71         [V8] Generate most named property getters.
72
73         Covered by existing tests.
74
75         * bindings/scripts/CodeGeneratorV8.pm: Added generation of SetNamedPropertyHandler call.
76         * bindings/v8/V8DOMWrapper.cpp:
77         (WebCore::V8DOMWrapper::getTemplate): Removed now-generated SetNamedPropertyHandler callsites.
78
79 2009-12-16  Luiz Agostini  <luiz.agostini@openbossa.org>
80
81         Reviewed by Kenneth Rohde Christiansen.
82
83         [Qt] Implement combobox delegate for Qt
84         https://bugs.webkit.org/show_bug.cgi?id=32550
85
86         Abstract popup menu factory.
87
88         A static method from QtAbstractPopupMenu is used to create its instances. If a factory
89         has been suplied to class QtAbstractPopupMenu the factory will be used to create the
90         objects. If not an instance of QtFallbackPopupMenu will be created.
91
92         The objective is to make it easy to replace the combobox popup at WebCore layer providing
93         support to the combobox popup delegation API. Future patches will make it possible to
94         replace the combobox popup at WebKit layer.
95
96         No behavior changes.
97
98         * platform/qt/PopupMenuQt.cpp:
99         (WebCore::PopupMenu::PopupMenu):
100         * platform/qt/QtAbstractWebPopup.cpp:
101         (WebCore::QtAbstractWebPopup::setFactory):
102         (WebCore::QtAbstractWebPopup::create):
103         * platform/qt/QtAbstractWebPopup.h:
104         * platform/qt/QtFallbackWebPopup.cpp:
105
106 2009-12-16  Mark Rowe  <mrowe@apple.com>
107
108         Build fix.  Disable debug variants of WebKit frameworks.
109
110         * WebCore.xcodeproj/project.pbxproj:
111
112 2009-12-16  Enrica Casucci  <enrica@apple.com>
113
114         Reviewed by Eric Seidel.
115
116         Right clicking in a table cell creates a selection that extends into the next cell.
117         <rdar://problem/5565465>
118         https://bugs.webkit.org/show_bug.cgi?id=32622
119         
120         Avoid extending the selection to the next cell if we start from an empty cell.
121
122         Test: editing/selection/empty-cell-right-click.html
123
124         * editing/TypingCommand.cpp:
125         (WebCore::TypingCommand::deleteKeyPressed): Replaced the code that check for empty table cell
126         with a call to the new function.
127         * editing/VisibleSelection.cpp:
128         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity): Extends the
129         selection only if we are not starting from an empty table cell.
130         * editing/htmlediting.cpp:
131         (WebCore::isEmptyTableCell): Added a function since this check is performed now in two places.
132         * editing/htmlediting.h: Added isEmptyTableCell declaration.
133
134 2009-12-16  Dirk Schulze  <krit@webkit.org>
135
136         Reviewed by Nikolas Zimmermann.
137
138         feMerge crahses if feMergeNodes attribute in is empty
139         https://bugs.webkit.org/show_bug.cgi?id=32489
140
141         SVGFEMergeElement only stored pointers to all effects of it's nodes
142         in a list. But it should store the RefPtr otherwise the effects get
143         dereferenced and WebKit crashes.
144         I also made a short clean-up in SVGFilterBuilder. No change in
145         functionality.
146
147         Test: I updated svg/custom/empty-merge.svg to cover this problem.
148
149         * svg/SVGFEMergeElement.cpp:
150         (WebCore::SVGFEMergeElement::build):
151         * svg/graphics/filters/SVGFEMerge.cpp:
152         (WebCore::FEMerge::FEMerge):
153         (WebCore::FEMerge::create):
154         (WebCore::FEMerge::mergeInputs):
155         (WebCore::FEMerge::setMergeInputs):
156         * svg/graphics/filters/SVGFEMerge.h:
157         * svg/graphics/filters/SVGFilterBuilder.cpp:
158         (WebCore::SVGFilterBuilder::add):
159
160 2009-12-16  Brian Weinstein  <bweinstein@apple.com>
161
162         Reviewed by Timothy Hatcher.
163
164         Part of <http://webkit.org/b/32568>.
165         Web Inspector: Context Menus should be used in more places.
166         
167         Add a context menu entry in the console to clear the console. This
168         is only shown when there is no user selection of text, because if
169         there is selection of the text, then we want to give the user the Copy +
170         Spell Check context menu that they are used to.
171
172         * English.lproj/localizedStrings.js: Added "Clear Console".
173         * inspector/front-end/ConsoleView.js:
174         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
175
176 2009-12-16  Brian Weinstein  <bweinstein@apple.com>
177
178         Reviewed by Pavel Feldman.
179
180         Fixes <https://bugs.webkit.org/show_bug.cgi?id=32621>.
181         Web Inspector: [REGRESSION (52095-52100)] Resources filter disappears when switching 
182         from / to resources panel.
183
184         Changed style in sidebar-resizer-vertical, because if the min-height was 100%, we start
185         to cover the scope bar.
186
187         * inspector/front-end/inspector.css:
188
189 2009-12-16  Dimitri Glazkov  <dglazkov@chromium.org>
190
191         Reviewed by Adam Barth.
192
193         [V8] Switch all indexers to be generated.
194         https://bugs.webkit.org/show_bug.cgi?id=32569
195
196         Covered by existing tests.
197
198         * WebCore.gypi: Remove V8FileListCustom.cpp and V8ClientRecListCustom.cpp,
199             as they are now generated.
200         * bindings/v8/V8DOMWrapper.cpp:
201         (WebCore::V8DOMWrapper::getTemplate): Remove customization of ClientRectList,
202             FileList, and DataGridColumnList templates.
203         * bindings/v8/custom/V8ClientRectListCustom.cpp: Removed.
204         * bindings/v8/custom/V8CustomBinding.h: Remove custom indexer getter decls.
205         * bindings/v8/custom/V8DataGridColumnListCustom.cpp: Remove indexer getter definition.
206         * bindings/v8/custom/V8FileListCustom.cpp: Removed.
207
208 2009-12-16  anton muhin  <antonm@chromium.org>
209
210         Reviewed by Darin Adler.
211
212         [dom] make dom/Node.cpp compile if DUMP_NODE_STATISTICS is on
213         https://bugs.webkit.org/show_bug.cgi?id=32617
214
215         * dom/Node.cpp:
216         (WebCore::Node::dumpStatistics):
217
218 2009-12-16  Dimitri Glazkov  <dglazkov@chromium.org>
219
220         Reviewed by Darin Fisher.
221
222         [V8] There is no such thing as HTMLSelectElementCollection.
223         https://bugs.webkit.org/show_bug.cgi?id=32616
224
225         Refactoring, covered by existing tests.
226
227         * WebCore.gypi: Removed V8HTMLSelectElementCollectionCustom.cpp
228         * bindings/v8/V8Collection.h: Removed one-off template.
229         * bindings/v8/V8DOMWrapper.cpp:
230         (WebCore::V8DOMWrapper::getTemplate): Renamed all references to HTMLSelectElementCollection
231             to HTMLSelectElement.
232         * bindings/v8/custom/V8CustomBinding.h: Renamed custom indexer decls.
233         * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp: Removed.
234         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp: Moved code as-is from
235             V8HTMLSelectElementCollectionCustom.cpp
236
237 2009-12-16  Dan Winship  <danw@gnome.org>
238
239         Reviewed by Gustavo Noronha Silva.
240
241         [Gtk] Content-Encoding support
242
243         https://bugs.webkit.org/show_bug.cgi?id=25855
244
245         * platform/network/soup/ResourceHandleSoup.cpp:
246         (WebCore::startHttp): Don't force "Accept-Encoding: identity" any
247         more
248
249 2009-12-16  Benjamin Otte  <otte@gnome.org>
250
251         Reviewed by Darin Adler.
252
253         Get rid of the phase argument to Image::drawPattern.
254         https://bugs.webkit.org/show_bug.cgi?id=31187
255
256         The argument can be expressed equally well as part of the
257         patternTransform. All backends but the Qt one did exactly that
258         manually anyway.
259
260         * platform/graphics/BitmapImage.h:
261         * platform/graphics/GeneratedImage.cpp:
262         (WebCore::GeneratedImage::drawPattern):
263         * platform/graphics/GeneratedImage.h:
264         * platform/graphics/Image.cpp:
265         (WebCore::Image::drawTiled):
266         * platform/graphics/Image.h:
267         * platform/graphics/cairo/ImageCairo.cpp:
268         (WebCore::Image::drawPattern):
269         * platform/graphics/cg/ImageCG.cpp:
270         (WebCore::Image::drawPattern):
271         * platform/graphics/haiku/ImageHaiku.cpp:
272         (WebCore::Image::drawPattern):
273         * platform/graphics/qt/ImageQt.cpp:
274         (WebCore::Image::drawPattern):
275         * platform/graphics/skia/ImageSkia.cpp:
276         (WebCore::Image::drawPattern):
277         * platform/graphics/wince/GraphicsContextWince.cpp:
278         (WebCore::GraphicsContext::drawBitmapPattern):
279         * platform/graphics/wince/ImageBufferWince.cpp:
280         (WebCore::):
281         (WebCore::BufferedImage::drawPattern):
282         * platform/graphics/wx/ImageWx.cpp:
283         (WebCore::BitmapImage::drawPattern):
284         (WebCore::Image::drawPattern):
285
286 2009-12-16  Kenneth Russell  <kbr@google.com>
287
288         Reviewed by Darin Fisher.
289
290         Performance problems with index validation code for drawElements
291         https://bugs.webkit.org/show_bug.cgi?id=32466
292
293         Added a cache of the maximum index for each element type to
294         WebGLBuffer, querying it before iterating through the indices in
295         the client-side copy of the buffer's data. Hoisted checks of the
296         size of the element array itself into validateElementArraySize to
297         avoid duplicating code.
298
299         The performance improvement has been measured with manual tests.
300         Existing layout tests cover the index validation functionality
301         and continue to pass as before.
302
303         * html/canvas/WebGLBuffer.cpp:
304         (WebCore::WebGLBuffer::WebGLBuffer):
305         (WebCore::WebGLBuffer::associateBufferData):
306         (WebCore::WebGLBuffer::associateBufferSubData):
307         (WebCore::WebGLBuffer::getCachedMaxIndex):
308         (WebCore::WebGLBuffer::setCachedMaxIndex):
309         (WebCore::WebGLBuffer::clearCachedMaxIndices):
310         * html/canvas/WebGLBuffer.h:
311         * html/canvas/WebGLRenderingContext.cpp:
312         (WebCore::WebGLRenderingContext::validateElementArraySize):
313         (WebCore::WebGLRenderingContext::validateIndexArrayConservative):
314         (WebCore::WebGLRenderingContext::validateIndexArrayPrecise):
315         (WebCore::WebGLRenderingContext::validateRenderingState):
316         (WebCore::WebGLRenderingContext::drawElements):
317         * html/canvas/WebGLRenderingContext.h:
318
319 2009-12-16  Zelidrag Hornung  <zelidrag@chromium.org>
320
321         Reviewed by Darin Adler.
322
323         https://bugs.webkit.org/show_bug.cgi?id=32261
324         Added ability to separate the autocomplete suggestion previewing from
325         the actual accepting of the suggested value in HTMLInputElement.
326         This element (it's single line text incarnation) can now
327         be put in suggestion mode where renderer might display the suggested
328         value without making it automatically exposed to JavaScript.
329
330         No new tests. This new methods are not exposed yet. It's use will be
331         platform specific. PopupMenu and Chromium specific changes will be
332         separated based on Darin Adler's comments.
333
334         * dom/InputElement.h:
335         (WebCore::InputElementData::suggestedValue):
336         (WebCore::InputElementData::setSuggestedValue):
337         * html/HTMLInputElement.cpp:
338         (WebCore::HTMLInputElement::suggestedValue):
339         (WebCore::HTMLInputElement::setSuggestedValue):
340         (WebCore::HTMLInputElement::setValue):
341         (WebCore::HTMLInputElement::setValueFromRenderer):
342         * html/HTMLInputElement.h:
343         * rendering/RenderTextControlSingleLine.cpp:
344         (WebCore::RenderTextControlSingleLine::updateFromElement):
345         * wml/WMLInputElement.cpp:
346         (WebCore::WMLInputElement::suggestedValue):
347         * wml/WMLInputElement.h:
348
349 2009-12-16  Pavel Feldman  <pfeldman@chromium.org>
350
351         Reviewed by Timothy Hatcher.
352
353         Web Inspector: Make Elements tree, properties section and resources
354         view monospace.
355
356         https://bugs.webkit.org/show_bug.cgi?id=32609
357
358         * inspector/front-end/ElementsPanel.js:
359         * inspector/front-end/PropertiesSection.js:
360         (WebInspector.PropertiesSection):
361         * inspector/front-end/ResourceView.js:
362         (WebInspector.ResourceView):
363         * inspector/front-end/inspector.css:
364
365 2009-12-16  Dirk Schulze  <krit@webkit.org>
366
367         Reviewed by Darin Adler.
368
369         sourceGraphic wrong if positive x,y is >0 and objectBB is selected on Filter
370         https://bugs.webkit.org/show_bug.cgi?id=32575
371
372         On SVG Filters, the rest of the source graphic gets clipped to the filter
373         rest. This helps us to minimize the size of intermediate ImageBuffers. If
374         the position moves to the right or to the bottom, we have to adjust the
375         GraphicContext of this intermediate ImageBuffer.
376         This patch fixes the adjustment of the context, according to the clipping.
377
378         Test: svg/filters/filter-source-position.svg
379
380         * svg/graphics/SVGResourceFilter.cpp:
381         (WebCore::SVGResourceFilter::prepareFilter):
382
383 2009-12-16  Enrica Casucci  <enrica@apple.com>
384
385         Reviewed by Adele Peterson.
386
387         CrashTracer: [USER] 1 crash in Safari at com.apple.WebCore: WebCore::endsOfNodeAreVisuallyDistinctPositions + 115
388         <rdar://problem/7467108>
389         https://bugs.webkit.org/show_bug.cgi?id=32590
390
391         If the element is a button there is no need to look at the children to calculate the caret position.
392         
393         Test: editing/selection/button-right-click.html
394
395         * dom/Position.cpp:
396         (WebCore::Position::getInlineBoxAndOffset): Avoid calling recursively this method,
397         when starting from a button element.
398
399 2009-12-16  Luiz Agostini  <luiz.agostini@openbossa.org>
400
401         Reviewed by Kenneth Rohde Christiansen.
402
403         [Qt] Implement combobox delegate for Qt
404         https://bugs.webkit.org/show_bug.cgi?id=32550
405
406         Refactoring of class QWebPopup.
407
408         Class QWebPopup has been split in QtAbstractWebPopup and QtFallbackWebPopup.
409         Both new classes are now in corresponding files and files QWebPopup.* have been removed.
410
411         Custom combo popup classes will inherit from QtAbstractWebPopup. It is not the public API as it is
412         in WebCore and will not be visible by users of QtWebKit. It will be used in implementation of
413         public QtWebKit combobox popup delegation API.
414
415         Class QtFallbackWebPopup inherits from QtAbstractWebPopup and implements the currently used combobox popup.
416         It needs to be improved to provide standard features that are missing like style or indentation.
417
418         No behavior changes.
419
420         * WebCore.pro:
421         * platform/PopupMenu.h:
422         * platform/qt/PopupMenuQt.cpp:
423         (WebCore::PopupMenu::PopupMenu):
424         * platform/qt/QWebPopup.cpp: Removed.
425         * platform/qt/QWebPopup.h: Removed.
426         * platform/qt/QtAbstractWebPopup.cpp: Added.
427         (WebCore::QtAbstractWebPopup::QtAbstractWebPopup):
428         (WebCore::QtAbstractWebPopup::~QtAbstractWebPopup):
429         (WebCore::QtAbstractWebPopup::client):
430         * platform/qt/QtAbstractWebPopup.h: Added.
431         * platform/qt/QtFallbackWebPopup.cpp: Added.
432         (WebCore::QtFallbackWebPopup::QtFallbackWebPopup):
433         (WebCore::QtFallbackWebPopup::show):
434         (WebCore::QtFallbackWebPopup::populate):
435         (WebCore::QtFallbackWebPopup::showPopup):
436         (WebCore::QtFallbackWebPopup::hidePopup):
437         (WebCore::QtFallbackWebPopup::activeChanged):
438         * platform/qt/QtFallbackWebPopup.h: Added.
439         (WebCore::QtFallbackWebPopup::hide):
440
441 2009-12-15  Pavel Feldman  <pfeldman@chromium.org>
442
443         Reviewed by Timothy Hatcher.
444
445         Web Inspector: beautify HTTP info section.
446
447         https://bugs.webkit.org/show_bug.cgi?id=32583
448
449         * English.lproj/localizedStrings.js:
450         * inspector/front-end/ResourceView.js:
451         (WebInspector.ResourceView):
452         (WebInspector.ResourceView.prototype._refreshURL):
453         (WebInspector.ResourceView.prototype._refreshHTTPInformation):
454         * inspector/front-end/inspector.css:
455
456 2009-12-13  Roland Steiner  <rolandsteiner@chromium.org>
457
458         Reviewed by Adam Barth.
459
460         Fix crash when encountering illegal HTML within a continuation inside <ruby>.
461         (https://bugs.webkit.org/show_bug.cgi?id=32316)
462
463         Avoid having the anonymous blocks utilized in the ruby renderers being
464         re-used as continuation blocks.
465         Avoid having ruby runs collected as "leftover blocks".
466
467         Test: fast/ruby/ruby-illegal.html
468
469         * rendering/RenderRuby.h:
470         (WebCore::RenderRubyAsInline::removeLeftoverAnonymousBlock): mustn't be called
471         (WebCore::RenderRubyAsInline::isRuby): made private
472         (WebCore::RenderRubyAsInline::renderName): made private
473         (WebCore::RenderRubyAsInline::createsAnonymousWrapper): return true
474         (WebCore::RenderRubyAsBlock::removeLeftoverAnonymousBlock): mustn't be called
475         (WebCore::RenderRubyAsBlock::isRuby): made private
476         (WebCore::RenderRubyAsBlock::renderName): made private
477         (WebCore::RenderRubyAsBlock::createsAnonymousWrapper): return true
478         * rendering/RenderRubyRun.h:
479         (WebCore::RenderRubyRun::removeLeftoverAnonymousBlock): avoid
480         (WebCore::RenderRubyRun::isRubyRun): made private
481         (WebCore::RenderRubyRun::renderName): made private
482         (WebCore::RenderRubyRun::createsAnonymousWrapper): return true
483
484 2009-12-15  Nate Chapin  <japhet@chromium.org>
485
486         Reviewed by Darin Adler.
487
488         Rename skipCanLoadCheck to skipSecurityCheck in a bunch of places in WebCore/loader.
489
490         https://bugs.webkit.org/show_bug.cgi?id=32529
491
492         * loader/Cache.cpp:
493         (WebCore::Cache::requestUserCSSStyleSheet):
494         * loader/CachedImage.cpp:
495         (WebCore::CachedImage::load):
496         * loader/CachedResource.cpp:
497         (WebCore::CachedResource::load):
498         * loader/CachedResource.h:
499         (WebCore::CachedResource::load):
500         * loader/DocumentThreadableLoader.cpp:
501         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
502         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
503         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
504         (WebCore::DocumentThreadableLoader::preflightSuccess):
505         (WebCore::DocumentThreadableLoader::loadRequest):
506         * loader/DocumentThreadableLoader.h:
507         * loader/FrameLoaderTypes.h:
508         (WebCore::):
509         * loader/Request.cpp:
510         (WebCore::Request::Request):
511         * loader/Request.h:
512         (WebCore::Request::shouldDoSecurityCheck):
513         * loader/SubresourceLoader.cpp:
514         (WebCore::SubresourceLoader::create):
515         * loader/SubresourceLoader.h:
516         * loader/loader.cpp:
517         (WebCore::Loader::load):
518         (WebCore::Loader::Host::servePendingRequests):
519         * loader/loader.h:
520
521 2009-12-15  Dan Bernstein  <mitz@apple.com>
522
523         Reviewed by Darin Adler.
524
525         <rdar://problem/7470452> Safari/Chromium crashes on complicated @font-face rule
526         https://bugs.webkit.org/show_bug.cgi?id=32257
527
528         Test: fast/css/font-face-unused-source-loaded.html
529
530         The loading of a font resource caused a CSSFontFace that had the resource in one of its
531         sources, but wasn’t using it (due to using an earlier source) to invalidate its
532         CSSSegmentedFontFaces. This caused FontData for the active source (the one that did not just
533         finish loading) to be deleted, but that went unnoticed by Font::operator==(), since the
534         corresponding FontFallbackLists were not in the loading state. The fix is for CSSFontFace to
535         ignore loads from unused sources.
536
537         * css/CSSFontFace.cpp:
538         (WebCore::CSSFontFace::fontLoaded): Bail out if the loaded source is not the active source.
539         (WebCore::CSSFontFace::getFontData): Set m_activeSource to the source that supplied the
540             FontData.
541         * css/CSSFontFace.h:
542         (WebCore::CSSFontFace::CSSFontFace): Initialize m_activeSource.
543
544 2009-12-15  Yael Aharon  <yael.aharon@nokia.com>
545
546         Reviewed by Kenneth Rohde Christiansen.
547
548         [Qt] Cannot load flash files from a local file.
549         https://bugs.webkit.org/show_bug.cgi?id=32572
550
551         When loading the main resource and its mime type is application/octet-stream,
552         use the file extenstion to check if it is a supported plugin.
553
554         No new tests were added since any existing swf file can be used as a manual test.
555
556         * loader/MainResourceLoader.cpp:
557         (WebCore::MainResourceLoader::didReceiveResponse):
558         * loader/MainResourceLoader.h:
559         * plugins/PluginDatabase.h:
560
561 2009-12-15  Brian Weinstein  <bweinstein@apple.com>
562
563         Reviewed by Timothy Hatcher.
564
565         Fixes <https://bugs.webkit.org/show_bug.cgi?id=18498>.
566         REGRESSION: Tips are not shown for resources anymore.
567         
568         As discussed in the bug, Tips are not coming back, and the feature
569         will be moved to the audits panel. This patch is to remove the Tips
570         code and the resources that it needed.
571
572         * WebCore.gypi: Removed tips files.
573         * inspector/front-end/Images/tipBalloon.png: Removed.
574         * inspector/front-end/Images/tipBalloonBottom.png: Removed.
575         * inspector/front-end/Images/tipIcon.png: Removed.
576         * inspector/front-end/Images/tipIconPressed.png: Removed.
577         * inspector/front-end/Resource.js: Removed tips code.
578         (WebInspector.Resource.prototype.set finished): 
579         * inspector/front-end/WebKit.qrc: Removed tips files.
580         * inspector/front-end/inspector.css: Removes tips style rules.
581         
582 2009-12-15  Pavel Feldman  <pfeldman@chromium.org>
583
584         Reviewed by Timothy Hatcher.
585
586         Web Inspector: Display request headers for main resource
587         having redirects.
588
589         https://bugs.webkit.org/show_bug.cgi?id=32577
590
591         * inspector/InspectorController.cpp:
592         (WebCore::InspectorController::identifierForInitialRequest):
593         (WebCore::InspectorController::willSendRequest):
594         * inspector/InspectorResource.cpp:
595         (WebCore::InspectorResource::InspectorResource):
596         (WebCore::InspectorResource::appendRedirect):
597         (WebCore::InspectorResource::createCached):
598         (WebCore::InspectorResource::updateRequest):
599         * inspector/InspectorResource.h:
600         (WebCore::InspectorResource::create):
601
602 2009-12-15  Brian Weinstein  <bweinstein@apple.com>
603
604         Reviewed by Timothy Hatcher.
605
606         Fixes <https://bugs.webkit.org/show_bug.cgi?id=32578>.
607         Web Inspector: No Need for ?="" now that we have context menus.
608         
609         Remove the toggleNewAttributeButton function and callers to it, as
610         we don't need this behavior anymore, now that we have context menus.
611
612         * inspector/front-end/ElementsTreeOutline.js:
613         (WebInspector.ElementsTreeElement.prototype.set hovered):
614         (WebInspector.ElementsTreeElement.prototype.toggleNewAttributeButton):
615         (WebInspector.ElementsTreeElement.prototype._startEditing):
616
617 2009-12-15  Dimitri Glazkov  <dglazkov@chromium.org>
618
619         Reviewed by Eric Seidel.
620
621         [V8] Generate trivial named property getters.
622         https://bugs.webkit.org/show_bug.cgi?id=32562
623
624         Covered by existing tests.
625
626         * bindings/scripts/CodeGeneratorV8.pm: Added GenerateImplementationNamedPropertyGetter.
627         * bindings/v8/V8Collection.h:
628         (WebCore::getNamedPropertyOfCollection): Fixed a booboo by using AtomicString like we're supposed to.
629         * bindings/v8/V8DOMWrapper.cpp:
630         (WebCore::V8DOMWrapper::getTemplate): Removed code that's now generated.
631
632 2009-12-15  Brian Weinstein  <bweinstein@apple.com>
633
634         Reviewed by Timothy Hatcher.
635
636         Part of <http://webkit.org/b/32568>.
637         New Web Inspector: The Context Menu should be used in more places.
638         
639         Add support for context menu entries for editing and deleting elements
640         in the datagrid. This gives support to deleting cookies, and editing and
641         deleting session storage and local storage.
642
643         * English.lproj/localizedStrings.js: Added "Edit" and "Add New" entries (delete was already there)
644         * inspector/front-end/DataGrid.js:
645         (WebInspector.DataGrid): Added context menu listener.
646         (WebInspector.DataGrid.prototype._contextMenuInDataTable):
647
648 2009-12-15  Kenneth Russell  <kbr@google.com>
649
650         Reviewed by Darin Fisher.
651
652         Don't allow default framebuffer to be mutated
653         https://bugs.webkit.org/show_bug.cgi?id=32391
654
655         * html/canvas/WebGLRenderingContext.cpp:
656         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
657         (WebCore::WebGLRenderingContext::framebufferTexture2D):
658         * platform/graphics/mac/GraphicsContext3DMac.cpp:
659         (WebCore::GraphicsContext3D::bindFramebuffer):
660
661 2009-12-15  Zoltan Horvath  <zoltan@webkit.org>
662
663         Reviewed by Darin Adler.
664
665         Allow custom memory allocation control for FontPlatformDataCacheKey class
666         https://bugs.webkit.org/show_bug.cgi?id=32552
667
668         Inherits the following struct from FastAllocBase because it is instantiated by 'new':
669
670         struct name                     - instantiated at: WebCore/'location'
671         struct FontPlatformDataCacheKey - platform/graphics/FontCache.cpp:118
672
673         * platform/graphics/FontCache.cpp:
674
675 2009-12-15  Jian Li  <jianli@chromium.org>
676
677         Reviewed by Dmitry Titov.
678
679         Bug 31090 - [Chromium] Add DownloadURL format to Chromium clipboard.
680         https://bugs.webkit.org/show_bug.cgi?id=31090
681
682         The proposal to whatwg can be found here:
683         http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-August/022118.html
684
685         * platform/chromium/ChromiumDataObject.cpp:
686         (WebCore::ChromiumDataObject::clear):
687         (WebCore::ChromiumDataObject::hasData):
688         (WebCore::ChromiumDataObject::ChromiumDataObject):
689         * platform/chromium/ChromiumDataObject.h:
690         * platform/chromium/ClipboardChromium.cpp:
691         (WebCore::):
692         (WebCore::clipboardTypeFromMIMEType):
693         (WebCore::ClipboardChromium::setData):
694
695 2009-12-15  Chris Fleizach  <cfleizach@apple.com>
696
697         Reviewed by Darin Adler.
698
699         WAI-ARIA: implement treegrid
700         https://bugs.webkit.org/show_bug.cgi?id=31299
701
702         Test: platform/mac/accessibility/aria-treegrid.html
703
704         * accessibility/AXObjectCache.cpp:
705         (WebCore::AXObjectCache::getOrCreate):
706         * accessibility/AccessibilityARIAGrid.h:
707         (WebCore::AccessibilityARIAGrid::supportsSelectedRows):
708         * accessibility/AccessibilityARIAGridRow.cpp:
709         (WebCore::AccessibilityARIAGridRow::isARIATreeGridRow):
710         (WebCore::AccessibilityARIAGridRow::disclosedRows):
711         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
712         * accessibility/AccessibilityARIAGridRow.h:
713         * accessibility/AccessibilityObject.cpp:
714         (WebCore::createARIARoleMap):
715         * accessibility/AccessibilityObject.h:
716         (WebCore::):
717         (WebCore::AccessibilityObject::isARIATreeGridRow):
718         * accessibility/AccessibilityRenderObject.cpp:
719         (WebCore::AccessibilityRenderObject::isMultiSelectable):
720         (WebCore::AccessibilityRenderObject::setIsExpanded):
721         (WebCore::AccessibilityRenderObject::setSelectedRows):
722         (WebCore::AccessibilityRenderObject::ariaSelectedRows):
723         (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
724         (WebCore::AccessibilityRenderObject::selectedChildren):
725         * accessibility/AccessibilityRenderObject.h:
726         * accessibility/AccessibilityTable.h:
727         (WebCore::AccessibilityTable::supportsSelectedRows):
728         * accessibility/mac/AccessibilityObjectWrapper.mm:
729         (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
730         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
731         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
732         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
733
734 2009-12-15  Zoltan Horvath  <zoltan@webkit.org>
735
736         Reviewed by Darin Adler.
737
738         Allow custom memory allocation control for EmptyEditorClient and EmptyInspectorClient
739         https://bugs.webkit.org/show_bug.cgi?id=32557
740
741         Inherits the following classes from Noncopyable because these are instantiated
742         by 'new' and no need to be copyable:
743
744         class name                 - instantiated at: WebCore/'location'
745         class EmptyEditorClient    - svg/graphics/SVGImage.cpp:230
746         class EmptyInspectorClient - svg/graphics/SVGImage.cpp:241
747
748         * loader/EmptyClients.h:
749
750 2009-12-15  Zoltan Horvath  <zoltan@webkit.org>
751
752         Reviewed by Darin Adler.
753
754         Allow custom memory allocation control for WebCore/inspector directory's classes
755         https://bugs.webkit.org/show_bug.cgi?id=32556
756
757         Inherits the following class from Noncopyable because these are instantiated
758         by 'new' and no need to be copyable:
759
760         class name                   - instantiated at: WebCore/'location'
761         class InspectorFrontend      - inspector/InspectorController.cpp:538
762         class InspectorTimelineAgent - inspector/InspectorController.cpp:1097
763
764         * inspector/InspectorFrontend.h:
765         * inspector/InspectorTimelineAgent.h:
766
767 2009-12-15  Zoltan Horvath  <zoltan@webkit.org>
768
769         Reviewed by Darin Adler.
770
771         Allow custom memory allocation control for WebCore/platform/network directory's classes
772         https://bugs.webkit.org/show_bug.cgi?id=32553
773
774         Inherits the following class from Noncopyable because it is instantiated
775         by 'new' and no need to be copyable:
776
777         class/struct name                      - instantiated at: WebCore/'location'
778
779         struct CrossThreadResourceResponseData - platform/network/ResourceResponseBase.cpp:109
780
781         Inherits the following classes from FastAllocBase because these are
782         instantiated by 'new':
783
784         class ResourceResponseBase - (its child class) platform/network/ResourceResponseBase.cpp:90
785         class ResourceRequestBase  - (its child class) loader/DocumentThreadableLoader.cpp:88
786
787         * platform/network/ResourceRequestBase.h:
788         * platform/network/ResourceResponseBase.h:
789
790 2009-12-15  Zoltan Horvath  <zoltan@webkit.org>
791
792         Reviewed by Darin Adler.
793
794         Allow custom memory allocation control for AnimationControllerPrivate and FillLayerPropertyWrapperGetter
795         https://bugs.webkit.org/show_bug.cgi?id=32549
796
797         Inherits AnimationControllerPrivate and FillLayerPropertyWrapperGetter
798         classes from Noncopyable because these are instantiated by 'new' and no need to be copyable:
799
800         class/struct name              - instantiated at: WebCore/'location'
801
802         AnimationControllerPrivate     - page/animation/AnimationController.cpp:439
803         FillLayerPropertyWrapperGetter - (its child class) page/animation/AnimationBase.cpp:464
804
805         * page/animation/AnimationBase.cpp:
806         * page/animation/AnimationControllerPrivate.h:
807
808 2009-12-15  Pavel Feldman  <pfeldman@chromium.org>
809
810         Reviewed by Timothy Hatcher.
811
812         Web Inspector: Do not lose HTTP redirect information, display it
813         in the Resources Panel.
814
815         https://bugs.webkit.org/show_bug.cgi?id=32551
816
817         * inspector/InspectorController.cpp:
818         (WebCore::InspectorController::populateScriptObjects):
819         (WebCore::InspectorController::didCommitLoad):
820         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
821         (WebCore::InspectorController::identifierForInitialRequest):
822         (WebCore::InspectorController::willSendRequest):
823         (WebCore::InspectorController::didReceiveResponse):
824         (WebCore::InspectorController::didReceiveContentLength):
825         (WebCore::InspectorController::didFinishLoading):
826         (WebCore::InspectorController::didFailLoading):
827         * inspector/InspectorFrontend.cpp:
828         * inspector/InspectorFrontend.h:
829         * inspector/InspectorResource.cpp:
830         (WebCore::InspectorResource::InspectorResource):
831         (WebCore::InspectorResource::appendRedirect):
832         (WebCore::InspectorResource::updateScriptObject):
833         (WebCore::InspectorResource::releaseScriptObject):
834         (WebCore::InspectorResource::type):
835         * inspector/InspectorResource.h:
836         (WebCore::InspectorResource::):
837         (WebCore::InspectorResource::Changes::setAll):
838         * inspector/front-end/inspector.js:
839         (WebInspector._addResource):
840         (WebInspector.updateResource):
841
842 2009-12-15  Holger Hans Peter Freyther  <zecke@selfish.org>
843
844         Reviewed by Simon Hausmann.
845
846         [Qt] Followup for direct signals and slots connections in QNetworkReplyHandler
847         https://bugs.webkit.org/show_bug.cgi?id=32113
848
849         For Qt versions prior to 4.6.1 we will need to use QueuedConnection
850         for the signal and slot connection to avoid running into a bug in.
851
852         Add a comment that we want to remove one signal to forward
853         queued items when moving our minimum requirements.
854
855         * platform/network/qt/QNetworkReplyHandler.cpp:
856         (WebCore::QNetworkReplyHandler::start):
857
858 2009-12-14  Holger Hans Peter Freyther  <zecke@selfish.org>
859
860         Reviewed by Kenneth Rohde Christiansen.
861
862         [Qt] Add manual test for JavaScript prompt corner case
863         https://bugs.webkit.org/show_bug.cgi?id=30914
864
865         The patch is based on the work done by Gupta Manish.
866
867         Verify behavior of the JavaScript prompt function. Currently
868         Qt is not behaving like other WebKit ports and Firefox in
869         regards to accepting the prompt but not entering a text.
870
871         * manual-tests/qt/java-script-prompt.html: Added.
872
873 2009-12-15  Luiz Agostini  <luiz.agostini@openbossa.org>
874
875         Reviewed by Kenneth Rohde Christiansen.
876
877         Moving list populate methods from PopupMenuQt to QWebPopup.
878         
879         In preparation to future implementation of a delegation API for the combobox.
880
881         * platform/PopupMenu.h:
882         * platform/qt/PopupMenuQt.cpp:
883         (WebCore::PopupMenu::show):
884         (WebCore::PopupMenu::hide):
885         * platform/qt/QWebPopup.cpp:
886         (WebCore::QWebPopup::show):
887         (WebCore::QWebPopup::populate):
888         * platform/qt/QWebPopup.h:
889         (WebCore::QWebPopup::hide):
890
891 2009-12-15  Alexander Pavlov  <apavlov@chromium.org>
892
893         Reviewed by Pavel Feldman.
894
895         Extract WebInspector.Section from WebInspector.PropertiesSection.
896         https://bugs.webkit.org/show_bug.cgi?id=32523
897
898         * WebCore.gypi:
899         * WebCore.vcproj/WebCore.vcproj:
900         * inspector/front-end/PropertiesSection.js:
901         (WebInspector.PropertiesSection):
902         * inspector/front-end/Section.js: Added.
903         (WebInspector.Section):
904         (WebInspector.Section.prototype.get title):
905         (WebInspector.Section.prototype.set title):
906         (WebInspector.Section.prototype.get subtitle):
907         (WebInspector.Section.prototype.set subtitle):
908         (WebInspector.Section.prototype.get expanded):
909         (WebInspector.Section.prototype.set expanded):
910         (WebInspector.Section.prototype.get populated):
911         (WebInspector.Section.prototype.set populated):
912         (WebInspector.Section.prototype.expand):
913         (WebInspector.Section.prototype.collapse):
914         (WebInspector.Section.prototype.toggleExpanded):
915         * inspector/front-end/WebKit.qrc:
916         * inspector/front-end/inspector.html:
917
918 2009-12-15  Eric Seidel  <eric@webkit.org>
919
920         No review, rolling out r52140.
921         http://trac.webkit.org/changeset/52140
922         https://bugs.webkit.org/show_bug.cgi?id=31299
923
924         The commit broke the Leopard bots and unfortunately
925         Chris wasn't around to fix them, so I'm rolling the change
926         out after 3 hours so that the bots can roll green again. :)
927
928         * accessibility/AXObjectCache.cpp:
929         (WebCore::AXObjectCache::getOrCreate):
930         * accessibility/AccessibilityARIAGrid.h:
931         * accessibility/AccessibilityARIAGridRow.cpp:
932         * accessibility/AccessibilityARIAGridRow.h:
933         * accessibility/AccessibilityObject.cpp:
934         (WebCore::createARIARoleMap):
935         * accessibility/AccessibilityObject.h:
936         (WebCore::):
937         * accessibility/AccessibilityRenderObject.cpp:
938         (WebCore::AccessibilityRenderObject::isMultiSelect):
939         (WebCore::AccessibilityRenderObject::setIsExpanded):
940         (WebCore::AccessibilityRenderObject::setSelectedRows):
941         (WebCore::AccessibilityRenderObject::ariaTreeSelectedRows):
942         (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
943         (WebCore::AccessibilityRenderObject::selectedChildren):
944         * accessibility/AccessibilityRenderObject.h:
945         * accessibility/AccessibilityTable.h:
946         * accessibility/mac/AccessibilityObjectWrapper.mm:
947         (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
948         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
949         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
950         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
951
952 2009-12-14  Holger Hans Peter Freyther  <zecke@selfish.org>
953
954         Reviewed by Eric Seidel.
955
956         [Qt] Remove dead code from FontPlatformDataQt.cpp
957         https://bugs.webkit.org/show_bug.cgi?id=32540
958
959         In r51758 the code that used familyNames was removed
960         and we should remove the creation of the familyNames
961         as well.
962
963         * platform/graphics/qt/FontPlatformDataQt.cpp:
964         (WebCore::FontPlatformData::FontPlatformData):
965
966 2009-12-15  Dan Bernstein  <mitz@apple.com>
967
968         Reviewed by Adam Roben.
969
970         WebCore part of <rdar://problem/7173515> Use LOGFONT support in Core
971         Graphics when available
972
973         When using a version of Core Graphics with LOGFONT support, this fixes
974         <rdar://problem/5764844> First-time launch is painfully slow due to font
975         plist creation
976         and <rdar://problem/6576281> 12px synthetic-italics Tahoma text is less
977         readable in Safari than in Firefox/IE due to poorly-spaced letters
978
979         * platform/graphics/win/FontCGWin.cpp:
980         (WebCore::Font::drawGlyphs): No longer call drawGDIGlyphs for stroked
981         text.
982         * platform/graphics/win/FontCacheWin.cpp:
983         (WebCore::createGDIFont): Added a synthesizeItalic parameter. When set
984         to true, if italics are desired but the best match lacks italics,
985         creates and returns a synthetic italics font.
986         (WebCore::FontCache::createFontPlatformData): Ask to synthesize italics
987         if needed.
988         * platform/graphics/win/FontCustomPlatformData.cpp:
989         (WebCore::FontCustomPlatformData::fontPlatformData): Updated an
990         assertion, and changed to create the CGFont from the LOGFONT.
991         (WebCore::createFontCustomPlatformData): Changed cgFont to be a
992         RetainPtr. Do not create a CGFont from the font data if it can be
993         created from the LOGFONT in fontPlatformData().
994         * platform/graphics/win/FontDatabase.cpp:
995         (WebCore::populateFontDatabase): Avoid font database work if fonts are
996         not going to be looked up by name.
997         * platform/graphics/win/FontPlatformDataCGWin.cpp:
998         (WebCore::FontPlatformData::platformDataInit): Create the CGFont from
999         a LOGFONT based on the HFONT.
1000
1001 2009-12-14  Chris Fleizach  <cfleizach@apple.com>
1002
1003         Reviewed by Darin Adler.
1004
1005         WAI-ARIA: implement treegrid
1006         https://bugs.webkit.org/show_bug.cgi?id=31299
1007
1008         Test: platform/mac/accessibility/aria-treegrid.html
1009
1010         * accessibility/AXObjectCache.cpp:
1011         (WebCore::AXObjectCache::getOrCreate):
1012         * accessibility/AccessibilityARIAGrid.h:
1013         (WebCore::AccessibilityARIAGrid::supportsSelectedRows):
1014         * accessibility/AccessibilityARIAGridRow.cpp:
1015         (WebCore::AccessibilityARIAGridRow::isARIATreeGridRow):
1016         (WebCore::AccessibilityARIAGridRow::disclosedRows):
1017         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
1018         * accessibility/AccessibilityARIAGridRow.h:
1019         * accessibility/AccessibilityObject.cpp:
1020         (WebCore::createARIARoleMap):
1021         * accessibility/AccessibilityObject.h:
1022         (WebCore::AccessibilityObject::isARIATreeGridRow):
1023         * accessibility/AccessibilityRenderObject.cpp:
1024         (WebCore::AccessibilityRenderObject::isMultiSelectable):
1025         (WebCore::AccessibilityRenderObject::setIsExpanded):
1026         (WebCore::AccessibilityRenderObject::setSelectedRows):
1027         (WebCore::AccessibilityRenderObject::ariaSelectedRows):
1028         (WebCore::AccessibilityRenderObject::ariaListboxSelectedChildren):
1029         (WebCore::AccessibilityRenderObject::selectedChildren):
1030         * accessibility/AccessibilityRenderObject.h:
1031         * accessibility/AccessibilityTable.h:
1032         (WebCore::AccessibilityTable::supportsSelectedRows):
1033         * accessibility/mac/AccessibilityObjectWrapper.mm:
1034         (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1035         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1036         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
1037         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1038
1039 2009-12-14  Dan Bernstein  <mitz@apple.com>
1040
1041         Reviewed by Darin Adler.
1042
1043         <rdar://problem/7460655> REGRESSION (r47255): Content shifted down at software.opensuse.org
1044         https://bugs.webkit.org/show_bug.cgi?id=32382
1045
1046         Test: fast/block/float/in-margin.html
1047
1048         * rendering/RenderBlock.cpp:
1049         (WebCore::RenderBlock::getClearDelta): Floats that do not intrude into the line (because
1050         they are in the margin) do not need to be cleared.
1051
1052 2009-12-14  Enrica Casucci  <enrica@apple.com>
1053
1054         Reviewed by John Sullivan.
1055
1056         Pressing backspace inside a table cell erases all empty rows below it.
1057         <rdar://problem/5565461>
1058         https://bugs.webkit.org/show_bug.cgi?id=32526
1059
1060         No deletion is performed when the caret selection is on an empty table cell.
1061         
1062         Test: editing/deleting/delete-empty-table.html
1063
1064         * editing/TypingCommand.cpp:
1065         (WebCore::TypingCommand::deleteKeyPressed): Added check for empty table cells in
1066         case of caret selection.
1067
1068 2009-12-14  Andrei Popescu  <andreip@google.com>
1069
1070         Reviewed by Darin Adler.
1071
1072         [Android] Android needs ResourceHandle implementation
1073         https://bugs.webkit.org/show_bug.cgi?id=32515
1074
1075         Adds implementation of ResourceHandle on Android.
1076
1077         No new tests needed, this is platform-specific code, so existing
1078         tests are sufficient.
1079
1080         * platform/network/android/ResourceHandleAndroid.cpp: Added.
1081         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1082         (WebCore::ResourceHandle::~ResourceHandle):
1083         (WebCore::ResourceHandle::start):
1084         (WebCore::ResourceHandle::cancel):
1085         (WebCore::ResourceHandle::bufferedData):
1086         (WebCore::ResourceHandle::supportsBufferedData):
1087         (WebCore::ResourceHandle::setDefersLoading):
1088         (WebCore::ResourceHandle::willLoadFromCache):
1089         (WebCore::ResourceHandle::loadsBlocked):
1090         (WebCore::SyncLoader::SyncLoader):
1091         (WebCore::SyncLoader::~SyncLoader):
1092         (WebCore::SyncLoader::didReceiveResponse):
1093         (WebCore::SyncLoader::didReceiveData):
1094         (WebCore::SyncLoader::didFail):
1095         (WebCore::ResourceHandle::loadResourceSynchronously):
1096         * platform/network/android/ResourceLoaderAndroid.h: Added.
1097         (WebCore::ResourceLoaderAndroid::~ResourceLoaderAndroid):
1098         (WebCore::ResourceLoaderAndroid::ResourceLoaderAndroid):
1099
1100 2009-12-14  Marco Martin  <notmart@gmail.com>
1101
1102         Reviewed by Kenneth Rohde Christiansen.
1103
1104         In the Scrollbar painting of the Qt theme integration,
1105         intersects any previous clip rects with the one needed to paint the scrollbar.
1106         This fixes the painting in QGraphicsview, when the parent of the widget that 
1107         paints the QWebPage has the QGraphicsItem::ItemClipsChildrenToShape set and
1108         a piece of the scrollbar should be cipped away
1109         https://bugs.webkit.org/show_bug.cgi?id=30366
1110
1111         No new tests.
1112
1113         * platform/qt/ScrollbarThemeQt.cpp:
1114         (WebCore::ScrollbarThemeQt::paint):
1115
1116 2009-12-14  Dimitri Glazkov  <dglazkov@chromium.org>
1117
1118         Reviewed by Eric Seidel.
1119
1120         [V8] Generate bindings for trivial indexers.
1121         https://bugs.webkit.org/show_bug.cgi?id=32455
1122
1123         Covered by existing tests.
1124
1125         * bindings/scripts/CodeGeneratorV8.pm:
1126             Added detecting indexers and generating code for them.
1127         * bindings/v8/V8Collection.h: Removed code that's now generated.
1128         * bindings/v8/V8DOMWrapper.cpp:
1129         (WebCore::V8DOMWrapper::getTemplate): Ditto.
1130
1131 2009-12-14  Alexey Proskuryakov  <ap@apple.com>
1132
1133         Reviewed by Dave Hyatt.
1134
1135         https://bugs.webkit.org/show_bug.cgi?id=31660
1136         REGRESSION (r49394): Image load event fires before the document fragment is attached.
1137
1138         Test: fast/images/image-load-event-in-fragment.html
1139
1140         We cannot fire load events immediately after parsing a fragment - an element inserted via
1141         innerHTML or equivalent should be reachable via getElementById() by the time its load event
1142         fires.
1143
1144         * dom/Document.cpp: (WebCore::Document::implicitClose): Call dispatchPendingBeforeLoadEvents()
1145         and dispatchPendingLoadEvents() individually. I'm not sure why these calls are here, just
1146         preserving existing behavior.
1147
1148         * dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::write):
1149         * html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::write):
1150         Load events for elements that have just been parsed cannot be dispatched yet, we should give
1151         the elements a chance to be inserted into a document first. There is no compatibility baggage
1152         for beforeload, so it seems OK to dispatch it right away.
1153
1154         * loader/ImageLoader.cpp:
1155         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvents):
1156         (WebCore::ImageLoader::dispatchPendingLoadEvents):
1157         * loader/ImageLoader.h:
1158         Separated dispatchPendingEvents() into individual functions for each event kind.
1159
1160 2009-12-14  Jakob Petsovits  <jpetsovits@rim.com>
1161
1162         Reviewed by Simon Fraser.
1163
1164         Add FloatQuad::isRectilinear() to check whether it can be represented as FloatRect.
1165         https://bugs.webkit.org/show_bug.cgi?id=30442
1166
1167         This enables optimizations for distinguishing between
1168         arbitrary FloatQuads and rectilinear ones.
1169
1170         * platform/graphics/FloatQuad.cpp:
1171         (WebCore::FloatQuad::isRectilinear):
1172         * platform/graphics/FloatQuad.h:
1173
1174 2009-12-14  Simon Hausmann  <hausmann@webkit.org>
1175
1176         Reviewed by Holger Freyther.
1177
1178         [Qt] Add support for keyboard modifiers to TouchEvent
1179
1180         https://bugs.webkit.org/show_bug.cgi?id=32482
1181
1182         Similar to other ui events with keyboard state, get the alt, shift,
1183         meta and ctrl modifiers straight from the platform event.
1184
1185         * dom/TouchEvent.cpp:
1186         (WebCore::TouchEvent::TouchEvent):
1187         (WebCore::TouchEvent::initTouchEvent):
1188         * dom/TouchEvent.h:
1189         (WebCore::TouchEvent::create):
1190         * dom/TouchEvent.idl:
1191         * page/EventHandler.cpp:
1192         (WebCore::EventHandler::handleTouchEvent):
1193         * platform/PlatformTouchEvent.h:
1194         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
1195         (WebCore::PlatformTouchEvent::shiftKey):
1196         (WebCore::PlatformTouchEvent::ctrlKey):
1197         (WebCore::PlatformTouchEvent::altKey):
1198         (WebCore::PlatformTouchEvent::metaKey):
1199         * platform/qt/PlatformTouchEventQt.cpp:
1200         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
1201
1202 2009-12-14  Benjamin Poulain  <benjamin.poulain@nokia.com>
1203
1204         Reviewed by Kenneth Rohde Christiansen.
1205
1206         [Qt] crash when clicking "Sign out" in GMail
1207         https://bugs.webkit.org/show_bug.cgi?id=32300
1208
1209         When the ResourceLoader cancels the handle we have to make sure not to access
1210         the resource handle afterwards again.
1211         This complete r29515
1212
1213         * platform/network/qt/QNetworkReplyHandler.cpp:
1214         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1215
1216 2009-12-14  Alexander Pavlov  <apavlov@chromium.org>
1217
1218         Reviewed by Pavel Feldman.
1219
1220         Implement InjectedScript.evaluateOnSelf() that evaluates functions in the InjectedScript context.
1221         https://bugs.webkit.org/show_bug.cgi?id=32517
1222
1223         * inspector/front-end/InjectedScript.js:
1224         (InjectedScript.evaluateOnSelf):
1225         * inspector/front-end/InjectedScriptAccess.js:
1226
1227 2009-12-14  Nayan Kumar K  <nayankk@gmail.com>
1228
1229         Reviewed by Darin Adler.
1230
1231         Fix for compilation errors in WML enabled builds.
1232
1233         https://bugs.webkit.org/show_bug.cgi?id=32481
1234
1235         * wml/WMLInputElement.cpp:
1236         (WebCore::WMLInputElement::setValue):
1237         (WebCore::WMLInputElement::setValueForUser):
1238         * wml/WMLInputElement.h:
1239
1240 2009-12-14  Andrei Popescu  <andreip@google.com>
1241
1242         Reviewed by Darin Adler.
1243
1244         [Android] Android needs ResourceError, ResourceResponse and
1245         ResourceRequest implementation.
1246         https://bugs.webkit.org/show_bug.cgi?id=32522
1247
1248         Add implementation of ResourceError, ResourceResponse and ResourceRequest.
1249         No new tests needed, the existing tests should be sufficient.
1250
1251         * platform/network/android/ResourceError.h: Added.
1252         (WebCore::ResourceError::ResourceError):
1253         * platform/network/android/ResourceRequest.h: Added.
1254         (WebCore::ResourceRequest::ResourceRequest):
1255         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1256         (WebCore::ResourceRequest::doUpdateResourceRequest):
1257         (WebCore::ResourceRequest::setUserGesture):
1258         (WebCore::ResourceRequest::getUserGesture):
1259         * platform/network/android/ResourceResponse.h: Added.
1260         (WebCore::ResourceResponse::ResourceResponse):
1261         (WebCore::ResourceResponse::doUpdateResourceResponse):
1262
1263 2009-12-14  Sam Weinig  <sam@webkit.org>
1264
1265         Fix the build.
1266
1267         * page/Geolocation.cpp:
1268         * page/Geolocation.h:
1269
1270 2009-12-13  Sam Weinig  <sam@webkit.org>
1271
1272         Reviewed by Dan Bernstein.
1273
1274         Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
1275         Add client based Geolocation provider
1276
1277         Add first cut of a client based Geolocation provider. This is guarded by
1278         ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
1279         GeolocationControllerClient interface that no-one currently implements,
1280         but will in a subsequent patch.
1281
1282         * GNUmakefile.am:
1283         * WebCore.base.exp:
1284         * WebCore.gypi:
1285         * WebCore.pro:
1286         * WebCore.vcproj/WebCore.vcproj:
1287         * WebCore.xcodeproj/project.pbxproj:
1288         * WebCoreSources.bkl:
1289         * page/Geolocation.cpp:
1290         (WebCore::createGeopositionFromGeolocationPosition):
1291         (WebCore::createPositionErrorFromGeolocationError):
1292         (WebCore::Geolocation::Geolocation):
1293         (WebCore::Geolocation::~Geolocation):
1294         (WebCore::Geolocation::disconnectFrame):
1295         (WebCore::Geolocation::lastPosition):
1296         (WebCore::Geolocation::startRequest):
1297         (WebCore::Geolocation::fatalErrorOccurred):
1298         (WebCore::Geolocation::requestTimedOut):
1299         (WebCore::Geolocation::clearWatch):
1300         (WebCore::Geolocation::handleError):
1301         (WebCore::Geolocation::positionChanged):
1302         (WebCore::Geolocation::makeSuccessCallbacks):
1303         (WebCore::Geolocation::errorOccurred):
1304         (WebCore::Geolocation::geolocationServicePositionChanged):
1305         (WebCore::Geolocation::geolocationServiceErrorOccurred):
1306         (WebCore::Geolocation::startUpdating):
1307         (WebCore::Geolocation::stopUpdating):
1308         * page/Geolocation.h:
1309         * page/GeolocationController.cpp: Added.
1310         (WebCore::GeolocationController::GeolocationController):
1311         (WebCore::GeolocationController::~GeolocationController):
1312         (WebCore::GeolocationController::addObserver):
1313         (WebCore::GeolocationController::removeObserver):
1314         (WebCore::GeolocationController::positionChanged):
1315         (WebCore::GeolocationController::errorOccurred):
1316         (WebCore::GeolocationController::lastPosition):
1317         * page/GeolocationController.h: Added.
1318         * page/GeolocationControllerClient.h: Added.
1319         (WebCore::GeolocationControllerClient::~GeolocationControllerClient):
1320         * page/GeolocationError.h: Added.
1321         (WebCore::GeolocationError::):
1322         (WebCore::GeolocationError::create):
1323         (WebCore::GeolocationError::code):
1324         (WebCore::GeolocationError::message):
1325         * page/GeolocationPosition.h: Added.
1326         (WebCore::GeolocationPosition::create):
1327         (WebCore::GeolocationPosition::timestamp):
1328         (WebCore::GeolocationPosition::latitude):
1329         (WebCore::GeolocationPosition::longitude):
1330         (WebCore::GeolocationPosition::accuracy):
1331         (WebCore::GeolocationPosition::altitude):
1332         (WebCore::GeolocationPosition::altitudeAccuracy):
1333         (WebCore::GeolocationPosition::heading):
1334         (WebCore::GeolocationPosition::speed):
1335         (WebCore::GeolocationPosition::canProvideAltitude):
1336         (WebCore::GeolocationPosition::canProvideAltitudeAccuracy):
1337         (WebCore::GeolocationPosition::canProvideHeading):
1338         (WebCore::GeolocationPosition::canProvideSpeed):
1339         (WebCore::GeolocationPosition::GeolocationPosition):
1340         * page/Geoposition.h:
1341         (WebCore::Geoposition::create):
1342         * page/Page.cpp:
1343         (WebCore::Page::Page):
1344         * page/Page.h:
1345         (WebCore::Page::geolocationController):
1346         * svg/graphics/SVGImage.cpp:
1347         (WebCore::SVGImage::dataChanged):
1348
1349 2009-12-14  Adam Langley  <agl@google.com>
1350
1351         Reviewed by Darin Adler.
1352
1353         Test that an image's size is valid before reading it.
1354
1355         Previously, an image that failed to load (m_failed == true) would
1356         trigger an assertion failure when WebKit tried to get its size.
1357
1358         https://bugs.webkit.org/show_bug.cgi?id=32176
1359         http://code.google.com/p/chromium/issues/detail?id=28566
1360
1361         Test: fast/images/size-failure.html
1362
1363         * platform/graphics/ImageSource.cpp:
1364         (WebCore::ImageSource::createFrameAtIndex):
1365
1366 2009-12-14  Dan Bernstein  <mitz@apple.com>
1367
1368         Reviewed by Darin Adler.
1369
1370         <rdar://problem/7458272> REGRESSION (r50470) Reproducible ASSERT in
1371         RenderWidget::setWidgetGeometry()
1372
1373         Test: fast/forms/defer-updateFromElement.html
1374
1375         * html/HTMLFormControlElement.cpp:
1376         (WebCore::updateFromElementCallback): Added this post-attach callback
1377         that invokes updateFromElement().
1378         (WebCore::HTMLFormControlElement::recalcStyle): Instead of calling
1379         updateFromElement(), enqueue a post-attach (in this case, post-style
1380         recalc) callback to do it. updateFromElement() can cause the selection
1381         to change, and in turn trigger synchronous layout, so it must not be
1382         called during style recalc.
1383
1384 2009-12-14  Pavel Feldman  <pfeldman@chromium.org>
1385
1386         Reviewed by Timothy Hatcher.
1387
1388         Web Inspector: [regression] inspector deletes nodes when editing css.
1389
1390         Now all the treeoutlines are focusable, sections and their titles
1391         are also focusable. Change contains couple of drive-by fixes such as
1392         canceling of the attribute edit nuking attr info and maintaining proper
1393         selection while deleting nodes.
1394
1395         https://bugs.webkit.org/show_bug.cgi?id=32460
1396
1397         * inspector/front-end/CallStackSidebarPane.js:
1398         (WebInspector.CallStackSidebarPane.prototype.handleShortcut):
1399         * inspector/front-end/ConsoleView.js:
1400         (WebInspector.ConsoleView.prototype._promptKeyDown):
1401         * inspector/front-end/DataGrid.js:
1402         (WebInspector.DataGrid.prototype._keyDown):
1403         * inspector/front-end/DatabaseQueryView.js:
1404         (WebInspector.DatabaseQueryView):
1405         (WebInspector.DatabaseQueryView.prototype._promptKeyDown):
1406         * inspector/front-end/ElementsPanel.js:
1407         (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
1408         (WebInspector.ElementsPanel.prototype.get defaultFocusedElement):
1409         (WebInspector.ElementsPanel.prototype.handleShortcut):
1410         * inspector/front-end/ElementsTreeOutline.js:
1411         (WebInspector.ElementsTreeOutline):
1412         (WebInspector.ElementsTreeOutline.prototype._keyDown):
1413         (WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted):
1414         (WebInspector.ElementsTreeElement.prototype._editingCancelled):
1415         * inspector/front-end/Panel.js:
1416         (WebInspector.Panel.prototype.show):
1417         (WebInspector.Panel.prototype.get defaultFocusedElement):
1418         * inspector/front-end/PropertiesSection.js:
1419         (WebInspector.PropertiesSection):
1420         * inspector/front-end/ScriptsPanel.js:
1421         (WebInspector.ScriptsPanel):
1422         (WebInspector.ScriptsPanel.prototype.get defaultFocusedElement):
1423         (WebInspector.ScriptsPanel.prototype.handleShortcut):
1424         * inspector/front-end/SidebarPane.js:
1425         (WebInspector.SidebarPane):
1426         (WebInspector.SidebarPane.prototype.toggleExpanded):
1427         (WebInspector.SidebarPane.prototype._onTitleKeyDown):
1428         * inspector/front-end/SourceFrame.js:
1429         (WebInspector.SourceFrame.prototype._loaded):
1430         * inspector/front-end/TextPrompt.js:
1431         (WebInspector.TextPrompt):
1432         * inspector/front-end/inspector.css:
1433         * inspector/front-end/inspector.html:
1434         * inspector/front-end/inspector.js:
1435         (WebInspector.loaded):
1436         (WebInspector.documentKeyDown):
1437         (WebInspector.documentCanCopy):
1438         (WebInspector.documentCopy):
1439         (WebInspector._searchFieldManualFocus):
1440         (WebInspector._searchKeyDown):
1441         (WebInspector.startEditing.cleanUpAfterEditing):
1442         (WebInspector.startEditing.keyDownEventListener):
1443         (WebInspector.startEditing):
1444         * inspector/front-end/treeoutline.js:
1445         (TreeOutline):
1446         (TreeOutline._removeChildAtIndex):
1447         (TreeOutline.prototype._treeKeyDown):
1448         (TreeElement.prototype.deselect):
1449         * inspector/front-end/utilities.js:
1450         ():
1451
1452 2009-12-14  Dimitri Glazkov  <dglazkov@chromium.org>
1453
1454         Unreviewed, build fix.
1455
1456         [Chromium] Guard all of JSC's wrapper cache-related members on Document.
1457
1458         * dom/Document.cpp:
1459         (WebCore::Document::createWrapperCache): Widened the guards to the whole method.
1460         * dom/Document.h: Added JSC guards to wrapper cache-related members.
1461
1462 2009-12-14  Chris Fleizach  <cfleizach@apple.com>
1463
1464         Reviewed by Adele Peterson.
1465
1466         AX: there's an infinite loop going on for some webpages - facebook.com
1467         https://bugs.webkit.org/show_bug.cgi?id=32501
1468
1469         The problem is that parentObjectUnignored() cannot be called
1470         while in accessibilityIsIgnored, because it leads to
1471         recursiveness. Specifically, there were checks to determine
1472         if an object was within a ARIA tree. That check should
1473         1) be moved to all platforms, and 2) not call parentObjectUnignored().
1474
1475         Test: accessibility/hang-in-isignored.html
1476
1477         * accessibility/AccessibilityRenderObject.cpp:
1478         (WebCore::AccessibilityRenderObject::isAllowedChildOfTree):
1479         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1480         * accessibility/AccessibilityRenderObject.h:
1481         * accessibility/mac/AccessibilityObjectMac.mm:
1482         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1483
1484 2009-12-14  Eric Carlson  <eric.carlson@apple.com>
1485
1486         Reviewed by Dan Bernstein.
1487
1488         <rdar://problem/6293979> Adopt shared control drawing for <video> controls on Leopard and Windows
1489
1490         Use MediaControllerThemeQuickTime on Leopard.
1491
1492         * rendering/RenderThemeMac.mm:
1493         (WebCore::mediaControllerTheme):
1494
1495 2009-12-14  Adam Roben  <aroben@apple.com>
1496
1497         Move QuartzCore-related build settings into a vsprops file
1498
1499         Fixes <http://webkit.org/b/32518>
1500
1501         Reviewed by Dan Bernstein.
1502
1503         * WebCore.vcproj/WebCore.vcproj: Let VS reformat the files list, added
1504         WebCoreQuartzCore.vsprops to the non-Cairo configurations, moved all
1505         other QuartzCore-related build settings from here...
1506         * WebCore.vcproj/WebCoreQuartzCore.vsprops: ...to here.
1507
1508 2009-12-14  Yael Aharon  <yael.aharon@nokia.com>
1509
1510         Reviewed by Antti Koivisto.
1511
1512         handling scripts can block UI
1513         https://bugs.webkit.org/show_bug.cgi?id=27612
1514
1515         Break execution of external scrips to smaller chunks. 
1516         No new tests since no new functionality was introduced.
1517
1518         * html/HTMLTokenizer.cpp:
1519         (WebCore::HTMLTokenizer::HTMLTokenizer):
1520         (WebCore::HTMLTokenizer::reset):
1521         (WebCore::HTMLTokenizer::notifyFinished):
1522         (WebCore::HTMLTokenizer::executeExternalScriptsIfReady):
1523         (WebCore::HTMLTokenizer::executeExternalScriptsTimerFired):
1524         (WebCore::HTMLTokenizer::continueExecutingExternalScripts):
1525         * html/HTMLTokenizer.h:
1526
1527 2009-12-03  Holger Hans Peter Freyther  <zecke@selfish.org>
1528
1529         Reviewed by Simon Hausmann.
1530
1531         [Qt] Connect QNetworkReply via direct connections.
1532         https://bugs.webkit.org/show_bug.cgi?id=32113
1533
1534         In the past we have switched from auto connections to queued
1535         connections to get some more stability. The problem with the
1536         Queued connections is latency. Even when running simple loading
1537         tests the time it takes to runs highly varies and by using
1538         direct connections these tests produce a stable result.
1539
1540         We will have to look out for crashes coming from within the
1541         QNetworkAccessManager due this patch and address them then.
1542
1543         * platform/network/qt/QNetworkReplyHandler.cpp:
1544         (WebCore::QNetworkReplyHandler::start):
1545
1546 2009-12-14  Holger Hans Peter Freyther  <zecke@selfish.org>
1547
1548         Rubber-stamped by Simon Hausmann.
1549
1550         [Qt] QtWebKit should use QImageReader::setQuality(49)
1551         https://bugs.webkit.org/show_bug.cgi?id=30740
1552
1553         Using QImageReader::setQuality(49) will influence the JPEG
1554         decoder of Qt to use the JDCT_IFAST routines for decompressing. This
1555         is showing a 5% improvement in a reduction that decodes all images
1556         used during the page loading test. The libjpeg documentation mentions
1557         that the IFAST routine is not as accurate as other routines but in
1558         our tests we couldn't see a difference.
1559
1560         * platform/graphics/qt/ImageDecoderQt.cpp:
1561         (WebCore::ImageDecoderQt::setData):
1562
1563 2009-12-13  Geoffrey Garen  <ggaren@apple.com>
1564
1565         Reviewed by Sam Weinig.
1566         
1567         Changed GC from mark-sweep to mark-allocate.
1568
1569         * ForwardingHeaders/runtime/WeakGCMap.h: Added.
1570         * bindings/js/GCController.cpp:
1571         (WebCore::collect):
1572         (WebCore::GCController::gcTimerFired):
1573         (WebCore::GCController::garbageCollectNow): Updated for rename.
1574
1575         * bindings/js/JSDOMBinding.cpp:
1576         (WebCore::removeWrappers):
1577         (WebCore::hasCachedDOMObjectWrapperUnchecked):
1578         (WebCore::hasCachedDOMObjectWrapper):
1579         (WebCore::hasCachedDOMNodeWrapperUnchecked):
1580         (WebCore::forgetDOMObject):
1581         (WebCore::forgetDOMNode):
1582         (WebCore::isObservableThroughDOM):
1583         (WebCore::markDOMNodesForDocument):
1584         (WebCore::markDOMObjectWrapper):
1585         (WebCore::markDOMNodeWrapper):
1586         * bindings/js/JSDOMBinding.h: Changed DOM wrapper maps to be WeakGCMaps.
1587         Don't ASSERT that an item must be in the WeakGCMap when its destructor
1588         runs, since it might have been overwritten in the map first.
1589
1590         * bindings/js/JSDocumentCustom.cpp:
1591         (WebCore::toJS): Changed Document from a DOM object wrapper to a DOM node
1592         wrapper, to simplify some code.
1593
1594         * bindings/js/JSInspectedObjectWrapper.cpp:
1595         (WebCore::JSInspectedObjectWrapper::JSInspectedObjectWrapper):
1596         (WebCore::JSInspectedObjectWrapper::~JSInspectedObjectWrapper):
1597         * bindings/js/JSInspectorCallbackWrapper.cpp: Use a WeakGCMap for these
1598         wrappers.
1599
1600         * bindings/js/JSNodeCustom.cpp:
1601         (WebCore::JSNode::markChildren): Updated for WeakGCMap and Document using
1602         a DOM node wrapper instead of a DOM object wrapper.
1603
1604         * bindings/js/JSSVGPODTypeWrapper.h:
1605         (WebCore::JSSVGDynamicPODTypeWrapperCache::wrapperMap):
1606         (WebCore::JSSVGDynamicPODTypeWrapperCache::lookupOrCreateWrapper):
1607         (WebCore::JSSVGDynamicPODTypeWrapperCache::forgetWrapper):
1608         (WebCore::::~JSSVGDynamicPODTypeWrapper): Shined a small beam of sanity light
1609         on this code. Use hashtable-based lookup in JSSVGPODTypeWrapper.h instead
1610         of linear lookup through iteration, since that's what hashtables were
1611         invented for. Make JSSVGPODTypeWrapper.h responsible for reomving itself
1612         from the table, instead of its JS wrapper, to decouple these objects from
1613         GC, and because these objects are refCounted, not solely owned by their
1614         JS wrappers.
1615
1616         * bindings/scripts/CodeGeneratorJS.pm:
1617         * dom/Document.h: Adopted changes above.
1618
1619 2009-12-13  Geoffrey Garen  <ggaren@apple.com>
1620
1621         Windows build fix: Removed an incorrect #ifdef.
1622
1623         * bindings/js/GCController.cpp:
1624
1625 2009-12-13  Charles Reis  <creis@chromium.org>
1626
1627         Reviewed by Adam Barth.
1628
1629         Refactor some security code out of V8 bindings
1630         https://bugs.webkit.org/show_bug.cgi?id=32326
1631
1632         No new tests. There should be no functionality changes in this patch,
1633         since it is only refactoring code.
1634
1635         * WebCore.gyp/WebCore.gyp:
1636         * WebCore.gypi:
1637         * bindings/BindingSecurity.h: Added.
1638         (WebCore::BindingSecurity::BindingSecurity):
1639         (WebCore::::canAccessWindow):
1640         (WebCore::::canAccessFrame):
1641         (WebCore::::checkNodeSecurity):
1642         * bindings/BindingSecurityBase.cpp: Added.
1643         (WebCore::BindingSecurityBase::getDOMWindow):
1644         (WebCore::BindingSecurityBase::getFrame):
1645         (WebCore::BindingSecurityBase::canAccessWindow):
1646         * bindings/BindingSecurityBase.h: Added.
1647         * bindings/GenericBinding.h: Added.
1648         (WebCore::):
1649         * bindings/scripts/CodeGeneratorV8.pm:
1650         * bindings/v8/ScriptController.cpp:
1651         (WebCore::ScriptController::isSafeScript):
1652         * bindings/v8/V8Binding.h:
1653         * bindings/v8/V8BindingState.cpp: Added.
1654         (WebCore::::Only):
1655         (WebCore::::getActiveWindow):
1656         (WebCore::::immediatelyReportUnsafeAccessTo):
1657         * bindings/v8/V8BindingState.h: Added.
1658         (WebCore::):
1659         * bindings/v8/V8Proxy.cpp:
1660         (WebCore::V8Proxy::reportUnsafeAccessTo):
1661         (WebCore::reportUnsafeJavaScriptAccess):
1662         * bindings/v8/V8Proxy.h:
1663         (WebCore::V8Proxy::):
1664         * bindings/v8/custom/V8CustomBinding.cpp:
1665         (WebCore::allowSettingFrameSrcToJavascriptUrl):
1666         (WebCore::INDEXED_ACCESS_CHECK):
1667         (WebCore::NAMED_ACCESS_CHECK):
1668         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1669         (WebCore::V8Custom::WindowSetTimeoutImpl):
1670         (WebCore::ACCESSOR_GETTER):
1671         (WebCore::ACCESSOR_SETTER):
1672         (WebCore::CALLBACK_FUNC_DECL):
1673         (WebCore::V8Custom::ClearTimeoutImpl):
1674         (WebCore::NAMED_ACCESS_CHECK):
1675         (WebCore::INDEXED_ACCESS_CHECK):
1676         * bindings/v8/custom/V8LocationCustom.cpp:
1677         (WebCore::ACCESSOR_GETTER):
1678         (WebCore::CALLBACK_FUNC_DECL):
1679         (WebCore::INDEXED_ACCESS_CHECK):
1680         (WebCore::NAMED_ACCESS_CHECK):
1681
1682 2009-11-30  Holger Hans Peter Freyther  <zecke@selfish.org>
1683
1684         Reviewed by Simon Hausmann.
1685
1686         [Qt] Implement initializeMaximumHTTPConnectionCountPerHost.
1687         https://bugs.webkit.org/show_bug.cgi?id=31849
1688
1689         Qt allows to have three connections per host on Symbian, for
1690         every other platform the limit is set to six connections per
1691         host but the default implementation will only schedule four
1692         connections per host.
1693         In a manual test we seem to get the best loading speed by
1694         going with Qt's limit and schedule two more jobs to allow Qt
1695         to prepare them.
1696
1697         * platform/network/ResourceRequestBase.cpp:
1698         * platform/network/qt/ResourceRequestQt.cpp:
1699         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
1700
1701 2009-12-13  Dan Bernstein  <mitz@apple.com>
1702
1703         Reviewed by Simon Fraser.
1704
1705         <rdar://problem/7341364> Crash at HTMLParser::popOneBlockCommon() after
1706         handling misnested residual style tags
1707
1708         Test: fast/parser/residual-style-close-ref-clone.html
1709
1710         * html/HTMLParser.cpp:
1711         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Gave the
1712         block stack a strong reference to the cloned residual style element. 
1713
1714 2009-12-13  Adele Peterson  <adele@apple.com>
1715
1716         Reviewed by Sam Weinig.
1717
1718         Reverting changes from http://trac.webkit.org/changeset/49585 to fix:
1719         <rdar://problem/7382815> REGRESSION (4.0.4-TOT): Home photo slider is too narrow at http://www.ziprealty.com/
1720         https://bugs.webkit.org/show_bug.cgi?id=32078
1721
1722         * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText):
1723
1724 2009-12-08  Jeremy Moskovich  <jeremy@chromium.org>
1725
1726         Reviewed by Eric Seidel.
1727
1728         Add code to allow toggling ATSUI/Core Text rendering at runtime in ComplexTextController.
1729         https://bugs.webkit.org/show_bug.cgi?id=31802
1730
1731         The goal here is to allow for a zero runtime hit for ports that decide to select
1732         the API at compile time.
1733         When both USE(ATSUI) and USE(CORE_TEXT) are true, the API is toggled
1734         at runtime.  Core Text is used for OS Versions >= 10.6.
1735
1736         No test since this is already covered by existing pixel tests.
1737
1738         * platform/graphics/SimpleFontData.h:  Change #ifdef to define getNSFont() on Chrome/Mac .
1739         * platform/graphics/mac/ComplexTextController.cpp:
1740         (WebCore::shouldUseATSUIAPI): Cache decision about which API to use.
1741         (WebCore::ComplexTextController::ComplexTextRun::indexAt):
1742         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Stub function to call through
1743         to ATSUI/Core text variants.
1744         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): The actual work for object construction
1745         is delegate to createTextRunFromFontDataATSUI/createTextRunFromFontDataCoreText.
1746         * platform/graphics/mac/ComplexTextController.h:
1747         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
1748         (WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation): Small style fix.
1749         (WebCore::ComplexTextController::ComplexTextRun::createTextRunFromFontDataATSUI):
1750         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersATSUI):
1751         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
1752         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
1753         (WebCore::ComplexTextController::ComplexTextRun::createTextRunFromFontDataCoreText):
1754         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
1755
1756 2009-12-13  Eric Carlson  <eric.carlson@apple.com>
1757
1758         No review, rolling out r52059 until I can generate new Tiger
1759         test results.
1760
1761         * rendering/RenderThemeMac.mm:
1762         (WebCore::mediaControllerTheme):
1763
1764 2009-12-12  Sam Weinig  <sam@webkit.org>
1765
1766         Rubber-stamped by Dan Bernstein.
1767
1768         Fix the EXPERIMENTAL_SINGLE_VIEW_MODE build.
1769
1770         * Configurations/WebCore.xcconfig:
1771         * page/EventHandler.cpp:
1772         (WebCore::EventHandler::EventHandler):
1773         (WebCore::EventHandler::clearDragState):
1774         * page/mac/DragControllerMac.mm:
1775         (WebCore::DragController::isCopyKeyDown):
1776         * page/mac/EventHandlerMac.mm:
1777         (WebCore::EventHandler::eventActivatedView):
1778         * platform/PlatformKeyboardEvent.h:
1779         * platform/PlatformMouseEvent.h:
1780         * platform/PlatformWheelEvent.h:
1781         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1782         * platform/ScrollView.cpp:
1783         (WebCore::ScrollView::wheelEvent):
1784         * platform/mac/KeyEventMac.mm:
1785         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1786         * platform/mac/PlatformMouseEventMac.mm:
1787         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1788         * platform/mac/PopupMenuMac.mm:
1789         (WebCore::PopupMenu::show):
1790         * platform/mac/WidgetMac.mm:
1791
1792 2009-12-12  Sam Weinig  <sam@webkit.org>
1793
1794         Rubber-stamped by Dan Bernstein.
1795
1796         Fix the !ENABLE(VIDEO) build.
1797
1798         * rendering/RenderLayerCompositor.cpp:
1799         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
1800
1801 2009-12-12  Sam Weinig  <sam@webkit.org>
1802
1803         Rubber-stamped by Dan Bernstein.
1804
1805         Fix the !ENABLE(DATABASE) build.
1806
1807         * storage/SQLTransactionClient.cpp:
1808         * storage/SQLTransactionClient.h:
1809         * storage/SQLTransactionCoordinator.cpp:
1810         * storage/SQLTransactionCoordinator.h:
1811         * loader/FrameLoader.cpp:
1812         (WebCore::FrameLoader::stopLoading):
1813
1814 2009-12-12  Eric Carlson  <eric.carlson@apple.com>
1815
1816         Reviewed by Dan Bernstein.
1817
1818         <rdar://problem/6293979> Adopt shared control drawing for <video> controls on Leopard and Windows
1819
1820         Use MediaControllerThemeQuickTime on Leopard.
1821
1822         * rendering/RenderThemeMac.mm:
1823         (WebCore::mediaControllerTheme):
1824
1825 2009-12-12  Kenneth Russell  <kbr@google.com>
1826
1827         Reviewed by Oliver Hunt.
1828
1829         Errors in WebGL[T]Array set() and get() methods
1830         https://bugs.webkit.org/show_bug.cgi?id=32456
1831
1832         Test: fast/canvas/webgl/bug-32456.html
1833
1834         * bindings/js/JSWebGLFloatArrayCustom.cpp:
1835         (WebCore::JSWebGLFloatArray::set):
1836         * bindings/js/JSWebGLIntArrayCustom.cpp:
1837         (WebCore::JSWebGLIntArray::set):
1838         * bindings/js/JSWebGLShortArrayCustom.cpp:
1839         (WebCore::JSWebGLShortArray::set):
1840         * bindings/js/JSWebGLUnsignedByteArrayCustom.cpp:
1841         (WebCore::JSWebGLUnsignedByteArray::set):
1842         * bindings/js/JSWebGLUnsignedIntArrayCustom.cpp:
1843         (WebCore::JSWebGLUnsignedIntArray::set):
1844         * bindings/js/JSWebGLUnsignedShortArrayCustom.cpp:
1845         (WebCore::JSWebGLUnsignedShortArray::set):
1846         * bindings/v8/custom/V8WebGLArrayCustom.h:
1847         (WebCore::setWebGLArray):
1848         * html/canvas/WebGLFloatArray.idl:
1849         * html/canvas/WebGLUnsignedIntArray.idl:
1850
1851 2009-12-12  Kenneth Russell  <kbr@google.com>
1852
1853         Reviewed by Oliver Hunt.
1854
1855         Update WebGL tests to released versions
1856         https://bugs.webkit.org/show_bug.cgi?id=32457
1857
1858         * manual-tests/webgl/Earth.html:
1859         * manual-tests/webgl/ManyPlanetsDeep.html:
1860         * manual-tests/webgl/SpinningBox.html:
1861         * manual-tests/webgl/TeapotPerPixel.html:
1862         * manual-tests/webgl/TeapotPerVertex.html:
1863         * manual-tests/webgl/resources/CanvasMatrix.js:
1864         (CanvasMatrix4.prototype.getAsWebGLFloatArray):
1865         * manual-tests/webgl/resources/utils3d.js:
1866         (initWebGL.gl.console.window.console.log):
1867         (initWebGL):
1868         (loadShader):
1869         (makeBox):
1870         (makeSphere):
1871         (processLoadObj):
1872         (doLoadObj):
1873         (doLoadImageTexture):
1874
1875 2009-12-12  Christian Dywan  <christian@twotoasts.de>
1876
1877         Reviewed by Dirk Schulze.
1878
1879         Remove the include to SVGFEDisplacementMap.h, it's not needed at all.
1880
1881         * platform/graphics/filters/FEComponentTransfer.h:
1882
1883 2009-12-12  Christian Dywan  <christian@twotoasts.de>
1884
1885         Rubber-stamped by Maciej Stachowiak.
1886
1887         Only include SVGFEDisplacementMap.h if SVG is enabled.
1888
1889         * platform/graphics/filters/FEComponentTransfer.h:
1890
1891 2009-12-12  Dirk Schulze  <krit@webkit.org>
1892
1893         Reviewed by Eric Seidel.
1894
1895         [Cairo][Qt] Alpha blending in SVG filters is wrong
1896         https://bugs.webkit.org/show_bug.cgi?id=32427
1897
1898         This patch is a follow-up to:
1899         http://trac.webkit.org/changeset/51950
1900         It fixes the alpha blending for Cairo and Qt on SVG Filters.
1901
1902         Covered by: * LayoutTests/svg/filters/feGaussianBlur.svg
1903                     * LayoutTests/svg/filters/feComposite.svg
1904                      and others.
1905
1906         * platform/graphics/cairo/ImageBufferCairo.cpp:
1907         (WebCore::ImageBuffer::platformTransformColorSpace):
1908         * platform/graphics/qt/ImageBufferQt.cpp:
1909         (WebCore::ImageBuffer::platformTransformColorSpace):
1910
1911 2009-12-11  Eric Roman  <eroman@chromium.org>
1912
1913         Unreviewed build fix.
1914
1915         [V8] Add a method on ScriptController to get it compiling after http://trac.webkit.org/changeset/52033.
1916
1917         * bindings/v8/ScriptController.cpp:
1918         (WebCore::ScriptController::anyPageIsProcessingUserGesture):
1919         * bindings/v8/ScriptController.h:
1920
1921 2009-12-11  Dimitri Glazkov  <dglazkov@chromium.org>
1922
1923         Unreviewed, build fix.
1924
1925         [V8] Change bindings to catch up with http://trac.webkit.org/changeset/52033.
1926
1927         * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
1928         (WebCore::CALLBACK_FUNC_DECL): Added retrieval of calling frame and passing
1929           to the submit method.
1930
1931 2009-12-11  Sam Weinig  <sam@webkit.org>
1932
1933         Reviewed by Mark Rowe.
1934
1935         Put -umbrella linker flag into a variable so that it can be overridden.
1936
1937         * Configurations/WebCore.xcconfig:
1938
1939 2009-12-11  Shinichiro Hamaji  <hamaji@chromium.org>
1940
1941         Reviewed by Darin Adler.
1942
1943         body with display:inline causes crash
1944         https://bugs.webkit.org/show_bug.cgi?id=32371
1945
1946         Tests: fast/inline/inline-body-crash.html
1947                fast/inline/inline-body-with-scrollbar-crash.html
1948
1949         * page/FrameView.cpp:
1950         (WebCore::FrameView::createScrollbar):
1951         (WebCore::FrameView::layout):
1952
1953 2009-12-11  Brady Eidson  <beidson@apple.com>
1954
1955         Rubberstamped by Sam Weinig.
1956
1957         https://webkit.org/b/22851 - Remove defunct FIXME.
1958
1959         * html/HTMLPlugInElement.cpp:
1960         (WebCore::HTMLPlugInElement::HTMLPlugInElement): This flag was removed completely
1961           from the HTMLFrameOwnerElement chain of classes.
1962
1963 2009-12-11  Darin Adler  <darin@apple.com>
1964
1965         Reviewed by Dan Bernstein.
1966
1967         Small refactoring to get rid of some extra unneeded selection-related work
1968         in RenderLayer::scrollToOffset and separate caret and range selection
1969         logic in FrameView::layout. This may be useful later when changing how
1970         the range selection logic works to fix layout reentrancy problems.
1971
1972         * page/Frame.cpp: Removed invalidateSelection.
1973         * page/Frame.h: Ditto.
1974
1975         * page/FrameView.cpp:
1976         (WebCore::FrameView::layout): Call SelectionController::setNeedsLayout
1977         and Frame::selectionLayoutChanged instead of calling
1978         Frame::invalidateSelection, which was just a function that called
1979         both of those others.
1980
1981         * rendering/RenderLayer.cpp:
1982         (WebCore::RenderLayer::scrollToOffset): Call
1983         SelectionController::setNeedsLayout instead of calling
1984         Frame::invalidateSelection. This call site only needs the caret-related
1985         work in that first function, not the other work formerly done by
1986         Frame::invalidateSelection. The caret works outside the normal
1987         painting and rendering system, and the range selection highlight is
1988         more or less inside it and doesn't need special handling when scrolling.
1989
1990 2009-12-11  Brady Eidson  <beidson@apple.com>
1991
1992         Reviewed by Darin Adler.
1993
1994         <rdar://problem/7342725> and https://webkit.org/b/32383
1995         Selecting article text at sfgate.com results in spurious back/forward entries
1996
1997         If an iframe had a form and that form is submitted by javascript, IE and Opera don't add back/forward entries.
1998         
1999         In the case where the frame was added dynamically via createElement(), Firefox would like to add a back entry
2000         but has a bug that prevents this.
2001
2002         Therefore by a bizarre coincidence, WebKit is the loner and the only engine affected by sfgate.com's technique.
2003
2004         This patch changes us to willfully match IE and Opera and fixes sfgate.com in the process.
2005
2006         Tests: http/tests/navigation/dynamic-iframe-dynamic-form-back-entry.html
2007                http/tests/navigation/parsed-iframe-dynamic-form-back-entry.html
2008
2009         Capture whether the form was submitted by javascript:
2010         * loader/FormState.cpp:
2011         (WebCore::FormState::FormState):
2012         (WebCore::FormState::create):
2013         * loader/FormState.h:
2014         (WebCore::FormState::formSubmissionTrigger):
2015
2016         When deciding the value of the lockBackForwardList variable, take formSubmissionTrigger() into account:
2017         * loader/RedirectScheduler.cpp:
2018         (WebCore::RedirectScheduler::scheduleFormSubmission):
2019
2020         Rearrange the public HTMLFormElement::submit() method to be called only from DOM or JS bindings,
2021         and figure out the rest of the parameters for an internal submit() call including the formSubmissionTrigger:
2022         * bindings/js/JSHTMLFormElementCustom.cpp:
2023         (WebCore::JSHTMLFormElement::submit):
2024         * html/HTMLFormElement.cpp:
2025         (WebCore::HTMLFormElement::prepareSubmit):
2026         (WebCore::HTMLFormElement::submit):
2027         * html/HTMLFormElement.h:
2028
2029 2009-12-11  Alexey Proskuryakov  <ap@apple.com>
2030
2031         Reviewed by Darin Adler.
2032
2033         https://bugs.webkit.org/show_bug.cgi?id=32445
2034         REGRESSION: http://www.mcafee.com/japan/ displays unstyled
2035
2036         * css/CSSImportRule.cpp:
2037         (WebCore::CSSImportRule::setCSSStyleSheet):
2038         * html/HTMLLinkElement.cpp:
2039         (WebCore::HTMLLinkElement::setCSSStyleSheet):
2040         Add a quirk for mcafee.com/japan (http or https, with or without www).
2041
2042 2009-12-11  Sam Weinig  <sam@webkit.org>
2043
2044         Reviewed by Dan Bernstein.
2045
2046         Make PlatformWheelEvent.h private instead of project.
2047
2048         * WebCore.xcodeproj/project.pbxproj:
2049
2050 2009-12-11  Simon Fraser  <simon.fraser@apple.com>
2051
2052         Reviewed by Darin Adler.
2053
2054         Support reflections on composited layers
2055         https://bugs.webkit.org/show_bug.cgi?id=31885
2056         
2057         First part of supporting composited reflections on compositing layers.
2058         
2059         Rename the m_transformLayer member variable to m_structuralLayer, since it
2060         will get used both for transform layers (for preserve-3d) and to hold a flattening
2061         layer related to reflections, both of which have similar requirements, and are
2062         mutually exclusive.
2063
2064         * platform/graphics/mac/GraphicsLayerCA.h:
2065         primaryLayer(), hostLayerForSublayers() and layerForSuperlayer() all now return
2066         a CALayer, since m_structuralLayer isn't always a WebLayer.
2067         
2068         * platform/graphics/mac/GraphicsLayerCA.mm:
2069         (WebCore::GraphicsLayerCA::commitLayerChanges):
2070         updateLayerPreserves3D() renamed to updateStructuralLayer()
2071         
2072         (WebCore::GraphicsLayerCA::updateLayerNames):
2073         New "update" method for updating layer names.
2074         
2075         (WebCore::GraphicsLayerCA::updateSublayerList):
2076         m_transformLayer -> m_structuralLayer. Also minor refactor to only
2077         allocate newSublayers in one place.
2078         
2079         (WebCore::GraphicsLayerCA::updateLayerSize):
2080         (WebCore::GraphicsLayerCA::removeAnimationFromLayer):
2081         (WebCore::GraphicsLayerCA::hostLayerForSublayers):
2082         (WebCore::GraphicsLayerCA::layerForSuperlayer):
2083         m_transformLayer -> m_structuralLayer
2084         
2085         (WebCore::GraphicsLayerCA::updateStructuralLayer):
2086         Call ensureStructuralLayer() which handles any deltas to the
2087         structural layer type.
2088         
2089         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
2090         Handle changes to the structural layer requirements
2091         
2092         (WebCore::GraphicsLayerCA::structuralLayerPurpose):
2093         Return an enum describing the purpose of the structural layer; for now
2094         this only returns NoStructuralLayer or StructuralLayerForPreserves3D, but
2095         will in future also have a value related to reflections.
2096
2097 2009-12-11  Simon Fraser  <simon.fraser@apple.com>
2098
2099         Build fix for platforms where ACCELERATED_COMPOSITING is not defined.
2100
2101         * page/animation/KeyframeAnimation.cpp:
2102         (WebCore::KeyframeAnimation::pauseAnimation):
2103
2104 2009-12-11  Adam Roben  <aroben@apple.com>
2105
2106         Windows build fix
2107
2108         * platform/graphics/win/WKCACFLayerRenderer.cpp: Removed #include of
2109         non-existent header.
2110
2111 2009-12-11  Simon Fraser  <simon.fraser@apple.com>
2112
2113         Build fix, no review.
2114
2115         Build fix for platforms where ACCELERATED_COMPOSITING is not defined.
2116
2117         * page/animation/KeyframeAnimation.cpp:
2118         (WebCore::KeyframeAnimation::startAnimation):
2119
2120 2009-12-11  Simon Fraser  <simon.fraser@apple.com>
2121
2122         Build fix, no review.
2123
2124         Build fix for platforms where ACCELERATED_COMPOSITING is not defined.
2125
2126         * page/animation/ImplicitAnimation.cpp:
2127         (WebCore::ImplicitAnimation::startAnimation):
2128
2129 2009-12-11  Simon Fraser  <simon.fraser@apple.com>
2130
2131         Reviewed by Darin Adler.
2132
2133         Negative values for animation-delay are ignored (treated as zero)
2134         https://bugs.webkit.org/show_bug.cgi?id=26150
2135         
2136         When we get the m_startTime for an animation or transition, subtract any negative
2137         delay so the animation/transition behaves like it started in the past, per spec.
2138
2139         Tests: animations/negative-delay.html
2140                transitions/negative-delay.html
2141
2142         * page/animation/AnimationBase.cpp:
2143         (WebCore::AnimationBase::updateStateMachine):
2144
2145 2009-12-11  Simon Fraser  <simon.fraser@apple.com>
2146
2147         Reviewed by Dan Bernstein.
2148
2149         Accelerated transitions broken when mixed with paused animations
2150         https://bugs.webkit.org/show_bug.cgi?id=32387
2151
2152         Synchronization of a mixture of accelerated and software animations occurs via
2153         a callback from GraphicsLayerCA, which ends up in
2154         AnimationControllerPrivate::receivedStartTimeResponse(). The time passed in is
2155         the exact time at which the accelerated animations started, so is used as the
2156         start time for all animations and transitions which are marked as waiting.
2157
2158         The bug was that the callback called when re-starting animations that were
2159         paused sent back an old time value, but this was used to start normal
2160         transitions. Therefore the transition would start with a stale start time, and
2161         thus end prematurely.
2162
2163         The fix is to change the way that GraphicsLayerCA handles paused animations.
2164         Rather than setting the beginTime of the animation, it uses a beginTime of 0
2165         and a timeOffset that gets passed down. Thus the callbacks always come with
2166         beginTime for 'now'.
2167
2168         Also clarify the role of AnimationBase::endAnimation() by splitting it into
2169         pauseAnimation() and endAnimation(), and pass down timeOffsets, rather than
2170         beginTimes when starting and pausing.
2171
2172         Manual test only, because the bug requires a non-trivial combination of
2173         animation pausing and transitions which take time, and the bug only shows in
2174         pixel results.
2175         
2176         * manual-tests/animation/transitions-and-paused-animations.html
2177
2178         * page/animation/AnimationBase.cpp:
2179         (WebCore::AnimationBase::updateStateMachine):
2180         * page/animation/AnimationBase.h:
2181         (WebCore::AnimationBase::startAnimation):
2182         (WebCore::AnimationBase::pauseAnimation):
2183         (WebCore::AnimationBase::endAnimation):
2184         * page/animation/ImplicitAnimation.cpp:
2185         (WebCore::ImplicitAnimation::~ImplicitAnimation):
2186         (WebCore::ImplicitAnimation::startAnimation):
2187         (WebCore::ImplicitAnimation::endAnimation):
2188         (WebCore::ImplicitAnimation::onAnimationEnd):
2189         * page/animation/ImplicitAnimation.h:
2190         (WebCore::ImplicitAnimation::pauseAnimation):
2191         * page/animation/KeyframeAnimation.cpp:
2192         (WebCore::KeyframeAnimation::~KeyframeAnimation):
2193         (WebCore::KeyframeAnimation::startAnimation):
2194         (WebCore::KeyframeAnimation::pauseAnimation):
2195         (WebCore::KeyframeAnimation::endAnimation):
2196         (WebCore::KeyframeAnimation::onAnimationEnd):
2197         * page/animation/KeyframeAnimation.h:
2198         * platform/graphics/GraphicsLayer.h:
2199         (WebCore::GraphicsLayer::addAnimation):
2200         (WebCore::GraphicsLayer::pauseAnimation):
2201         * platform/graphics/mac/GraphicsLayerCA.h:
2202         (WebCore::GraphicsLayerCA::LayerAnimation::LayerAnimation):
2203         (WebCore::GraphicsLayerCA::AnimationProcessingAction::AnimationProcessingAction):
2204         * platform/graphics/mac/GraphicsLayerCA.mm:
2205         (WebCore::GraphicsLayerCA::addAnimation):
2206         (WebCore::GraphicsLayerCA::removeAnimationsForKeyframes):
2207         (WebCore::GraphicsLayerCA::pauseAnimation):
2208         (WebCore::GraphicsLayerCA::updateLayerAnimations):
2209         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
2210         (WebCore::GraphicsLayerCA::pauseAnimationOnLayer):
2211         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2212         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2213         * rendering/RenderLayerBacking.cpp:
2214         (WebCore::RenderLayerBacking::startAnimation):
2215         (WebCore::RenderLayerBacking::startTransition):
2216         (WebCore::RenderLayerBacking::animationPaused):
2217         * rendering/RenderLayerBacking.h:
2218
2219 2009-12-11  Brian Weinstein  <bweinstein@apple.com>
2220
2221         Reviewed by Darin Adler.
2222
2223         Fixes <http://webkit.org/b/32399>.
2224         Pan Scrolling Jumps out of frames if the initial location is in a frame that can't be scrolled.
2225         
2226         When we initially figure out the layer that we should begin scrolling, don't try to jump out
2227         of frames/iFrames to look at the owner document. We don't want to jump out of frames, so we
2228         don't need that logic anymore.
2229         
2230         Added a test to make sure that we don't pan scroll if we start to scroll in an empty
2231         iFrame that has a scrollable owner document.
2232
2233         Test: platform/win/fast/events/panScroll-no-iframe-jump.html
2234
2235         * dom/Node.cpp:
2236         (WebCore::Node::defaultEventHandler):
2237
2238 2009-12-11  Brian Weinstein  <bweinstein@apple.com>
2239
2240         Reviewed by Adam Roben.
2241
2242         Fixes <http://webkit.org/b/32303>.
2243         Middle-mouse button not firing mousedown DOM event when autoscroll happens.
2244         
2245         This fix moves the pan scrolling code into Node.cpp, as part of the default event handler.
2246         We get two wins out of this:
2247             1) Mousedown DOM events are now fired before pan scrolling.
2248             2) Calling event.preventDefault() on a middle mouse button will now prevent pan scrolling.
2249         
2250         Added tests to show that middle mousedown DOM events are fired when panscrolling happens, and
2251         that when event.preventDefault is called, pan scrolling doesn't happen.
2252
2253         Tests: platform/win/fast/events/panScroll-event-fired.html
2254                platform/win/fast/events/panScroll-preventDefault.html
2255
2256         * dom/Node.cpp:
2257         (WebCore::Node::defaultEventHandler): Moved pan scrolling starting code to here.
2258         * page/EventHandler.cpp:
2259         (WebCore::EventHandler::startPanScrolling): Function to initialize scrolling variables and start timer.
2260         (WebCore::EventHandler::handleMousePressEvent): From here.
2261         * page/EventHandler.h:
2262
2263 2009-12-11  Chris Marrin  <cmarrin@apple.com>
2264
2265         Reviewed by Adam Roben.
2266
2267         Delay load DLLs for accelerated compositing
2268         https://bugs.webkit.org/show_bug.cgi?id=31856
2269         
2270         Change calls that use the data export symbols from
2271         QuartzCore to use the functions in QuartzCoreInterface.
2272         This allows QuartzCore to be delay loaded.
2273
2274         * platform/graphics/win/GraphicsLayerCACF.cpp:
2275         (WebCore::GraphicsLayerCACF::GraphicsLayerCACF):
2276         (WebCore::GraphicsLayerCACF::updateLayerPreserves3D):
2277         (WebCore::GraphicsLayerCACF::updateContentsImage):
2278         * platform/graphics/win/WKCACFLayer.cpp:
2279         (WebCore::toCACFLayerType):
2280         (WebCore::toCACFContentsGravityType):
2281         (WebCore::fromCACFContentsGravityType):
2282         (WebCore::toCACFFilterType):
2283         (WebCore::fromCACFFilterType):
2284         (WebCore::WKCACFLayer::create):
2285         (WebCore::WKCACFLayer::WKCACFLayer):
2286         (WebCore::WKCACFLayer::setContentsGravity):
2287         (WebCore::WKCACFLayer::contentsGravity):
2288         (WebCore::WKCACFLayer::setMagnificationFilter):
2289         (WebCore::WKCACFLayer::magnificationFilter):
2290         (WebCore::WKCACFLayer::setMinificationFilter):
2291         (WebCore::WKCACFLayer::minificationFilter):
2292         * platform/graphics/win/WKCACFLayer.h:
2293         (WebCore::WKCACFLayer::):
2294         * platform/graphics/win/WKCACFLayerRenderer.cpp:
2295         (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable):
2296         (WebCore::WKCACFLayerRenderer::createRenderer):
2297
2298 2009-12-11  Steve Block  <steveblock@google.com>
2299
2300         Reviewed by Darin Fisher.
2301
2302         Adds an Android-specific implementation of initializeMaximumHTTPConnectionCountPerHost.
2303         https://bugs.webkit.org/show_bug.cgi?id=31810
2304
2305         * platform/network/ResourceRequestBase.cpp: Modified. Disable default implementation
2306             of initializeMaximumHTTPConnectionCountPerHost for Android.
2307         * platform/network/android: Added.
2308         * platform/network/android/ResourceRequestAndroid.cpp: Added.
2309         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Android-specific implementation.
2310
2311 2009-12-11  Kent Tamura  <tkent@chromium.org>
2312
2313         Reviewed by Darin Fisher.
2314
2315         Add acceptTypes() method to FileChooser.
2316         https://bugs.webkit.org/show_bug.cgi?id=32429
2317
2318         This method returns an 'accept' attribute value of the
2319         corresponding INPUT element. A ChromeClient::runOpenPanel()
2320         implementation can refer it through a FileChooser instance to
2321         support type-restricted file selecting.
2322
2323         This makes no user-visible changes for now.
2324
2325         * platform/FileChooser.h:
2326         (WebCore::FileChooser::acceptTypes):
2327         * rendering/RenderFileUploadControl.cpp:
2328         (WebCore::RenderFileUploadControl::acceptTypes):
2329         * rendering/RenderFileUploadControl.h:
2330
2331 2009-12-11  Victor Wang  <victorw@chromium.org>
2332
2333         Reviewed by Darin Fisher.
2334
2335         Changed PopupMenuChromium to keep the value selected from
2336         keyboard when popup is closed.
2337
2338         The problem is Chromium does not fire the onchange event
2339         when the popup is closed if an item is selected via
2340         keyboard by typing the first char of the item. This makes
2341         chromium popup not having consistent behaviours and also
2342         behaves differently from other major browsers.
2343         Calling popup->hide() instead of popup->hidePopup() in
2344         PopupMenu fixes the issues as it does extra step to check
2345         whethere there is a keyboard selection changed when closing
2346         the popup.
2347
2348         https://bugs.webkit.org/show_bug.cgi?id=32403
2349     
2350         TEST: add a manual test as the current layout test shell
2351         does not support sending keyboard events to popup list.
2352
2353         * manual-tests/chromium/select-close-popup-value-change.html: Added.
2354         * platform/chromium/PopupMenuChromium.cpp:
2355         (WebCore::PopupMenu::hide):
2356
2357 2009-12-11  anton muhin  <antonm@chromium.org>
2358
2359         Reviewed by Adam Barth.
2360
2361         [v8] refactor WeakReferenceMap.
2362         Move common bits of functionality to reduce duplication.
2363
2364         https://bugs.webkit.org/show_bug.cgi?id=32389
2365
2366         Should be covered by buildbots.
2367
2368         * bindings/v8/DOMData.h:
2369         (WebCore::DOMData::WrapperMapObjectRemover::visitDOMWrapper):
2370         (WebCore::DOMData::handleWeakObject):
2371         (WebCore::DOMData::removeObjectsFromWrapperMap):
2372         * bindings/v8/DOMDataStore.cpp:
2373         (WebCore::DOMDataStore::weakDOMObjectCallback):
2374         (WebCore::DOMDataStore::weakActiveDOMObjectCallback):
2375         (WebCore::DOMDataStore::weakNodeCallback):
2376         (WebCore::DOMDataStore::weakSVGElementInstanceCallback):
2377         (WebCore::DOMDataStore::weakSVGObjectWithContextCallback):
2378         * bindings/v8/DOMDataStore.h:
2379         * bindings/v8/V8DOMMap.cpp:
2380         (WebCore::visitDOMNodesInCurrentThread):
2381         (WebCore::visitDOMObjectsInCurrentThread):
2382         (WebCore::visitActiveDOMObjectsInCurrentThread):
2383         (WebCore::visitDOMSVGElementInstancesInCurrentThread):
2384         (WebCore::visitSVGObjectsInCurrentThread):
2385         * bindings/v8/V8DOMMap.h:
2386         (WebCore::WeakReferenceMap::removeIfPresent):
2387         (WebCore::WeakReferenceMap::clear):
2388         (WebCore::WeakReferenceMap::visit):
2389
2390 2009-12-11  anton muhin  <antonm@chromium.org>
2391         Reviewed by Adam Barth.
2392
2393         [v8] in Debug builds create an additional handle scope
2394         when doing debug build checks.
2395         https://bugs.webkit.org/show_bug.cgi?id=32335
2396
2397         Should be covered by buildbots.
2398
2399         * bindings/v8/V8DOMWrapper.h:
2400         (WebCore::V8DOMWrapper::convertDOMWrapperToNative):
2401         (WebCore::V8DOMWrapper::convertDOMWrapperToNode):
2402
2403 2009-12-11  Pavel Feldman  <pfeldman@chromium.org>
2404
2405         Reviewed by Timothy Hatcher.
2406
2407         Web Inspector: Do not use ContextMenuItem as value type in custom
2408         context menu implementation.
2409
2410         https://bugs.webkit.org/show_bug.cgi?id=32411
2411
2412         * GNUmakefile.am:
2413         * WebCore.gypi:
2414         * WebCore.pro:
2415         * WebCore.vcproj/WebCore.vcproj:
2416         * WebCore.xcodeproj/project.pbxproj:
2417         * bindings/js/JSInspectorFrontendHostCustom.cpp:
2418         (WebCore::JSInspectorFrontendHost::showContextMenu):
2419         * inspector/InspectorFrontendHost.cpp:
2420         (WebCore::InspectorFrontendHost::InspectorFrontendHost):
2421         (WebCore::InspectorFrontendHost::~InspectorFrontendHost):
2422         (WebCore::InspectorFrontendHost::showContextMenu):
2423         (WebCore::InspectorFrontendHost::contextMenuCleared):
2424         * inspector/InspectorFrontendHost.h:
2425         (WebCore::InspectorFrontendHost::MenuProvider::create):
2426         (WebCore::InspectorFrontendHost::MenuProvider::~MenuProvider):
2427         (WebCore::InspectorFrontendHost::MenuProvider::disconnect):
2428         (WebCore::InspectorFrontendHost::MenuProvider::populateContextMenu):
2429         (WebCore::InspectorFrontendHost::MenuProvider::contextMenuCleared):
2430         (WebCore::InspectorFrontendHost::MenuProvider::MenuProvider):
2431         * page/ContextMenuController.cpp:
2432         (WebCore::ContextMenuController::ContextMenuController):
2433         (WebCore::ContextMenuController::clearContextMenu):
2434         (WebCore::ContextMenuController::showContextMenu):
2435         (WebCore::ContextMenuController::contextMenuItemSelected):
2436         * page/ContextMenuController.h:
2437         * page/ContextMenuProvider.h: Added.
2438         (WebCore::ContextMenuProvider::~ContextMenuProvider):
2439         * page/ContextMenuSelectionHandler.h: Removed.
2440
2441 2009-12-11  Simon Hausmann  <hausmann@webkit.org>, Kim Grönholm  <kim.gronholm@nomovok.com>
2442
2443         Reviewed by Antti Koivisto.
2444
2445         Basic cross-platform implementation of mapping platform touch events
2446         to JavaScript touch events.
2447
2448         https://bugs.webkit.org/show_bug.cgi?id=32114
2449
2450         Test: fast/events/basic-touch-events.html
2451
2452         * page/EventHandler.cpp:
2453         (WebCore::EventHandler::handleTouchEvent):
2454         * page/EventHandler.h:
2455
2456 2009-12-11  Zoltan Horvath  <zoltan@webkit.org>
2457
2458         Reviewed by Darin Adler.
2459
2460         Allow custom memory allocation control for WebCore's EmptyFrameLoaderClient
2461         https://bugs.webkit.org/show_bug.cgi?id=32110
2462
2463         Inherits the following class from Noncopyable because it is
2464         instantiated by 'new' and no need to be copyable:
2465
2466         class name              - instantiated at: WebCore/'location'
2467
2468         class EmptyFrameLoaderClient - svg/graphics/SVGImage.cpp:229
2469
2470         * loader/FrameLoaderClient.h:
2471
2472 2009-12-11  Zoltan Horvath  <zoltan@webkit.org>
2473
2474         Reviewed by Darin Adler.
2475
2476         Allow custom memory allocation control for 3 classes in WebCore's svg and loader directory
2477         https://bugs.webkit.org/show_bug.cgi?id=32106
2478
2479         Inherits the following classes from Noncopyable because these are instantiated 
2480         by 'new' and no need to be copyable:
2481
2482         class/struct name            - instantiated at: WebCore/'location'
2483
2484         class EmptyContextMenuClient - instantiated at: svg/graphics/SVGImage.cpp:232
2485         class EmptyDragClient        - instantiated at: svg/graphics/SVGImage.cpp:237
2486         class SVGImageChromeClient   - instantiated at: svg/graphics/SVGImage.cpp:243
2487
2488         * svg/graphics/SVGImage.cpp:
2489         * loader/EmptyClients.h:
2490
2491 2009-12-11  Benjamin Poulain  <benjamin.poulain@nokia.com>
2492
2493         Reviewed by Darin Adler.
2494
2495         The values of RuntimeArray are not enumerable
2496         https://bugs.webkit.org/show_bug.cgi?id=29005
2497
2498         The indices of RuntimeArray should be enumerated like for a regular array.
2499
2500         * bridge/runtime_array.cpp:
2501         (JSC::RuntimeArray::getOwnPropertyNames):
2502         * bridge/runtime_array.h:
2503
2504 2009-12-11  Andreas Kling  <andreas.kling@nokia.com>
2505
2506         Reviewed by Simon Hausmann.
2507
2508         [Qt] ImageDecoderQt: Fix retrieval of image file extensions
2509
2510         QImageReader only allows retrieving the format() before actually reading the image.
2511
2512         https://bugs.webkit.org/show_bug.cgi?id=32428
2513
2514         * platform/graphics/qt/ImageDecoderQt.cpp:
2515         (WebCore::ImageDecoderQt::setData):
2516         (WebCore::ImageDecoderQt::internalDecodeSize):
2517
2518 2009-12-11  Simon Hausmann  <hausmann@webkit.org>, Kim Grönholm  <kim.gronholm@nomovok.com>
2519
2520         Reviewed by Antti Koivisto.
2521
2522         Added interfaces for touch event support in JavaScript.
2523
2524         https://bugs.webkit.org/show_bug.cgi?id=32114
2525
2526         The Touch, TouchEvent and TouchList interfaces come straight from
2527         Android's copy of WebKit (eclaire branch).
2528
2529         The PlatformTouchEvent and PlatformTouchPoint code was written by
2530         us.
2531
2532         No new tests added, we are just adding interfaces
2533         with this patch.
2534
2535         * WebCore.pro:
2536         * bindings/js/JSEventCustom.cpp:
2537         (WebCore::toJS):
2538         * dom/Document.cpp:
2539         (WebCore::Document::addListenerTypeIfNeeded):
2540         * dom/Document.h:
2541         (WebCore::Document::):
2542         * dom/Document.idl:
2543         * dom/Element.h:
2544         * dom/Element.idl:
2545         * dom/Event.cpp:
2546         (WebCore::Event::isTouchEvent):
2547         * dom/Event.h:
2548         * dom/EventNames.h:
2549         * dom/Touch.cpp: Added.
2550         (WebCore::contentsX):
2551         (WebCore::contentsY):
2552         (WebCore::Touch::Touch):
2553         (WebCore::Touch::updateLocation):
2554         * dom/Touch.h: Added.
2555         (WebCore::Touch::create):
2556         (WebCore::Touch::frame):
2557         (WebCore::Touch::target):
2558         (WebCore::Touch::identifier):
2559         (WebCore::Touch::clientX):
2560         (WebCore::Touch::clientY):
2561         (WebCore::Touch::screenX):
2562         (WebCore::Touch::screenY):
2563         (WebCore::Touch::pageX):
2564         (WebCore::Touch::pageY):
2565         * dom/Touch.idl: Added.
2566         * dom/TouchEvent.cpp: Added.
2567         (WebCore::TouchEvent::TouchEvent):
2568         (WebCore::TouchEvent::initTouchEvent):
2569         * dom/TouchEvent.h: Added.
2570         (WebCore::TouchEvent::create):
2571         (WebCore::TouchEvent::touches):
2572         (WebCore::TouchEvent::targetTouches):
2573         (WebCore::TouchEvent::changedTouches):
2574         (WebCore::TouchEvent::TouchEvent):
2575         (WebCore::TouchEvent::isTouchEvent):
2576         * dom/TouchEvent.idl: Added.
2577         * dom/TouchList.cpp: Added.
2578         (WebCore::TouchList::item):
2579         * dom/TouchList.h: Added.
2580         (WebCore::TouchList::create):
2581         (WebCore::TouchList::length):
2582         (WebCore::TouchList::append):
2583         (WebCore::TouchList::TouchList):
2584         * dom/TouchList.idl: Added.
2585         * html/HTMLAttributeNames.in:
2586         * html/HTMLElement.cpp:
2587         (WebCore::HTMLElement::parseMappedAttribute):
2588         * page/DOMWindow.h:
2589         * page/DOMWindow.idl:
2590         * platform/PlatformTouchEvent.h: Added.
2591         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
2592         (WebCore::PlatformTouchEvent::touchPoints):
2593         * platform/PlatformTouchPoint.h: Added.
2594         (WebCore::PlatformTouchPoint::):
2595         (WebCore::PlatformTouchPoint::id):
2596         (WebCore::PlatformTouchPoint::state):
2597         (WebCore::PlatformTouchPoint::screenPos):
2598         (WebCore::PlatformTouchPoint::pos):
2599         * platform/qt/PlatformTouchEventQt.cpp: Added.
2600         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
2601         * platform/qt/PlatformTouchPointQt.cpp: Added.
2602         (WebCore::PlatformTouchPoint::PlatformTouchPoint):
2603
2604 2009-12-11  Grace Kloba  <klobag@gmail.com>
2605
2606         Reviewed by Darin Adler.
2607
2608         [Android] Add detachHistoryItem() to AndroidWebHistoryBridge. And the constructor takes
2609         HistoryItem* now. As AndroidWebHistoryBridge holds a dumb pointer of HistoryItem and
2610         HistoryItem holds a RefPtr of AndroidWebHistoryBridge, the dumb pointer needs to be cleared
2611         when HistoryItem is deleted to avoid potential crash.
2612         https://bugs.webkit.org/show_bug.cgi?id=32251
2613
2614         * history/HistoryItem.cpp:
2615         (WebCore::HistoryItem::~HistoryItem):
2616         * history/android/AndroidWebHistoryBridge.h:
2617         (WebCore::AndroidWebHistoryBridge::AndroidWebHistoryBridge):
2618         (WebCore::AndroidWebHistoryBridge::detachHistoryItem):
2619
2620
2621 2009-12-11  Fumitoshi Ukai  <ukai@chromium.org>
2622
2623         Reviewed by Pavel Feldman.
2624
2625         Log WebSocket error to Web Inspector console.
2626         https://bugs.webkit.org/show_bug.cgi?id=32165
2627
2628         * websockets/WebSocketChannel.cpp:
2629         (WebCore::WebSocketChannel::didOpen):
2630         (WebCore::WebSocketChannel::appendToBuffer):
2631         * websockets/WebSocketHandshake.cpp:
2632         (WebCore::WebSocketHandshake::readServerHandshake):
2633         (WebCore::WebSocketHandshake::readHTTPHeaders):
2634         (WebCore::WebSocketHandshake::checkResponseHeaders):
2635
2636 2009-12-10  Adam Barth  <abarth@webkit.org>
2637
2638         Reviewed by Darin Adler.
2639
2640         Mixed content shouldn't trigger for plug-ins without URLs
2641         https://bugs.webkit.org/show_bug.cgi?id=32384
2642
2643         These plug-ins cannot be controlled by active network attackers, so
2644         there's no reason to trigger a mixed content warning.
2645
2646         Test: http/tests/security/mixedContent/empty-url-plugin-in-frame.html
2647
2648         * loader/FrameLoader.cpp:
2649         (WebCore::FrameLoader::isMixedContent):
2650
2651 2009-12-10  Alexey Proskuryakov  <ap@apple.com>
2652
2653         Reviewed by Darin Adler.
2654
2655         https://bugs.webkit.org/show_bug.cgi?id=32140
2656         REGRESSION(r50072): Mailman administrative functionality is broken
2657
2658         Test: http/tests/misc/percent-sign-in-form-field-name.html
2659
2660         * platform/network/FormDataBuilder.cpp: (WebCore::appendQuotedString): Don't encode percent
2661         sign, we never had a good reason to do that.
2662
2663 2009-12-10  Kent Hansen  <kent.hansen@nokia.com>
2664
2665         Reviewed by Geoffrey Garen.
2666
2667         Remove getPropertyAttributes() from JavaScript bindings.
2668         https://bugs.webkit.org/show_bug.cgi?id=31933
2669
2670         The functionality is provided by getOwnPropertyDescriptor().
2671
2672         * WebCore.order:
2673         * bindings/js/JSDOMWindowCustom.cpp:
2674         * bindings/js/JSDOMWindowShell.cpp:
2675         * bindings/js/JSDOMWindowShell.h:
2676         * bindings/scripts/CodeGeneratorJS.pm:
2677         * page/DOMWindow.idl:
2678
2679 2009-12-10  Kenneth Russell  <kbr@google.com>
2680
2681         Reviewed by Oliver Hunt.
2682
2683         Changed WebGLRenderingContext to synthesize GL errors rather than
2684         raising JavaScript exceptions. Removed internal getError() calls
2685         after each graphics call. The GraphicsContext3D maintains the
2686         synthetic exceptions because only it has complete information
2687         about certain conditions requiring them to be raised.
2688
2689         Based on idea from Ilmari Heikkinen, added create3DDebugContext()
2690         to webgl-test.js and changed the WebGL layout tests expecting
2691         error conditions to use it. Updated expected.txt files, which now
2692         implicitly test the OpenGL error as it is part of the exception's
2693         message.
2694
2695         Added new targeted test covering aspects of synthetic errors as
2696         well as regression tests for bugs uncovered during its development.
2697
2698         Test: fast/canvas/webgl/error-reporting.html
2699
2700         * html/canvas/WebGLRenderingContext.cpp:
2701         (WebCore::WebGLRenderingContext::sizeInBytes):
2702         (WebCore::WebGLRenderingContext::activeTexture):
2703         (WebCore::WebGLRenderingContext::attachShader):
2704         (WebCore::WebGLRenderingContext::bindAttribLocation):
2705         (WebCore::WebGLRenderingContext::bindBuffer):
2706         (WebCore::WebGLRenderingContext::bindFramebuffer):
2707         (WebCore::WebGLRenderingContext::bindRenderbuffer):
2708         (WebCore::WebGLRenderingContext::bindTexture):
2709         (WebCore::WebGLRenderingContext::bufferData):
2710         (WebCore::WebGLRenderingContext::bufferSubData):
2711         (WebCore::WebGLRenderingContext::compileShader):
2712         (WebCore::WebGLRenderingContext::createShader):
2713         (WebCore::WebGLRenderingContext::detachShader):
2714         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
2715         (WebCore::WebGLRenderingContext::drawArrays):
2716         (WebCore::WebGLRenderingContext::drawElements):
2717         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
2718         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
2719         (WebCore::WebGLRenderingContext::framebufferTexture2D):
2720         (WebCore::WebGLRenderingContext::getActiveAttrib):
2721         (WebCore::WebGLRenderingContext::getActiveUniform):
2722         (WebCore::WebGLRenderingContext::getBufferParameter):
2723         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
2724         (WebCore::WebGLRenderingContext::getParameter):
2725         (WebCore::WebGLRenderingContext::getProgramParameter):
2726         (WebCore::WebGLRenderingContext::getProgramInfoLog):
2727         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
2728         (WebCore::WebGLRenderingContext::getShaderParameter):
2729         (WebCore::WebGLRenderingContext::getShaderInfoLog):
2730         (WebCore::WebGLRenderingContext::getShaderSource):
2731         (WebCore::WebGLRenderingContext::getTexParameter):
2732         (WebCore::WebGLRenderingContext::getUniform):
2733         (WebCore::WebGLRenderingContext::getUniformLocation):
2734         (WebCore::WebGLRenderingContext::getVertexAttrib):
2735         (WebCore::WebGLRenderingContext::linkProgram):
2736         (WebCore::WebGLRenderingContext::shaderSource):
2737         (WebCore::WebGLRenderingContext::texImage2D):
2738         (WebCore::WebGLRenderingContext::texSubImage2D):
2739         (WebCore::WebGLRenderingContext::uniform1f):
2740         (WebCore::WebGLRenderingContext::uniform1fv):
2741         (WebCore::WebGLRenderingContext::uniform1i):
2742         (WebCore::WebGLRenderingContext::uniform1iv):
2743         (WebCore::WebGLRenderingContext::uniform2f):
2744         (WebCore::WebGLRenderingContext::uniform2fv):
2745         (WebCore::WebGLRenderingContext::uniform2i):
2746         (WebCore::WebGLRenderingContext::uniform2iv):
2747         (WebCore::WebGLRenderingContext::uniform3f):
2748         (WebCore::WebGLRenderingContext::uniform3fv):
2749         (WebCore::WebGLRenderingContext::uniform3i):
2750         (WebCore::WebGLRenderingContext::uniform3iv):
2751         (WebCore::WebGLRenderingContext::uniform4f):
2752         (WebCore::WebGLRenderingContext::uniform4fv):
2753         (WebCore::WebGLRenderingContext::uniform4i):
2754         (WebCore::WebGLRenderingContext::uniform4iv):
2755         (WebCore::WebGLRenderingContext::uniformMatrix2fv):
2756         (WebCore::WebGLRenderingContext::uniformMatrix3fv):
2757         (WebCore::WebGLRenderingContext::uniformMatrix4fv):
2758         (WebCore::WebGLRenderingContext::useProgram):
2759         (WebCore::WebGLRenderingContext::validateProgram):
2760         (WebCore::WebGLRenderingContext::vertexAttribPointer):
2761         * html/canvas/WebGLRenderingContext.h:
2762         (WebCore::WebGLRenderingContext::cleanupAfterGraphicsCall):
2763         * platform/graphics/GraphicsContext3D.h:
2764         * platform/graphics/mac/GraphicsContext3DMac.cpp:
2765         (WebCore::GraphicsContext3D::getActiveAttrib):
2766         (WebCore::GraphicsContext3D::getActiveUniform):
2767         (WebCore::GraphicsContext3D::getError):
2768         (WebCore::GraphicsContext3D::synthesizeGLError):
2769
2770 2009-12-10  Stephen White  <senorblanco@chromium.org>
2771
2772         Reviewed by Dimitri Glazkov.
2773
2774         Fix for assert on Chrome/skia with SVG Filters enabled.
2775         https://bugs.webkit.org/show_bug.cgi?id=32394
2776
2777         Covered by LayoutTests/svg/W3C-SVG-1.1/filters-tile-01-b.svg and others.
2778
2779         * platform/graphics/skia/ImageBufferSkia.cpp:
2780         (WebCore::ImageBuffer::platformTransformColorSpace):
2781
2782 2009-12-10  Enrica Casucci  <enrica@apple.com>
2783
2784         Reviewed by Darin Adler.
2785
2786         REGRESSION(4.0.4-42a12): With 2 highlighted lines of text in gmail/hotmail selecting Bold selects other 2 edit buttons automatically.
2787         <rdar://problem/7442065>
2788         https://bugs.webkit.org/show_bug.cgi?id=32285
2789
2790         When examining the styles of the nodes after the first in a range selection, we take into
2791         cosideration differences in style of txt nodes only.
2792         
2793         Test: editing/execCommand/queryCommandState-02.html
2794
2795         * editing/Editor.cpp:
2796         (WebCore::Editor::selectionHasStyle):
2797
2798 2009-12-10  Oliver Hunt  <oliver@apple.com>
2799
2800         Reviewed by Alexey Proskuryakov.
2801
2802         Crash in XMLTokenizer::popCurrentNode if window.close() is called during parsing
2803         https://bugs.webkit.org/show_bug.cgi?id=31576
2804
2805         Add a RefCounted wrapper object around xmlParserCtxtPtr so we can
2806         maintain it's lifetime more effectively.
2807
2808         Test: fast/parser/xhtml-close-while-parsing.xhtml
2809
2810         * dom/XMLTokenizer.cpp:
2811         (WebCore::XMLTokenizer::popCurrentNode):
2812         * dom/XMLTokenizer.h:
2813         (WebCore::XMLParserContext::context):
2814         (WebCore::XMLParserContext::XMLParserContext):
2815         (WebCore::XMLTokenizer::context):
2816         * dom/XMLTokenizerLibxml2.cpp:
2817         (WebCore::XMLParserContext::createStringParser):
2818         (WebCore::XMLParserContext::createMemoryParser):
2819         (WebCore::XMLParserContext::~XMLParserContext):
2820         (WebCore::XMLTokenizer::~XMLTokenizer):
2821         (WebCore::XMLTokenizer::doWrite):
2822         (WebCore::XMLTokenizer::initializeParserContext):
2823         (WebCore::XMLTokenizer::doEnd):
2824         (WebCore::XMLTokenizer::lineNumber):
2825         (WebCore::XMLTokenizer::columnNumber):
2826         (WebCore::XMLTokenizer::stopParsing):
2827         (WebCore::parseXMLDocumentFragment):
2828         (WebCore::parseAttributes):
2829
2830 2009-12-10  Pavel Feldman  <pfeldman@chromium.org>
2831
2832         Reviewed by Timothy Hatcher.
2833
2834         Web Inspector: debugger shortcuts don't work when
2835         Search field or Console drawer has focus.
2836
2837         https://bugs.webkit.org/show_bug.cgi?id=32392
2838
2839         * inspector/front-end/inspector.js:
2840         (WebInspector.loaded):
2841         (WebInspector.documentKeyDown):
2842         (WebInspector.documentKeyUp):
2843         (WebInspector.searchKeyDown):
2844
2845 2009-12-10  Dimitri Glazkov  <dglazkov@chromium.org>
2846
2847         Reviewed by Adam Barth.
2848
2849         [V8] Events created in isolated worlds may fire in main world.
2850         https://bugs.webkit.org/show_bug.cgi?id=32386
2851
2852         Test: http/tests/security/isolatedWorld/events.html
2853
2854         * WebCore.gypi: Added WorldContextHandle.
2855         * bindings/v8/ScriptEventListener.cpp:
2856         (WebCore::createAttributeEventListener): Added WorldContextHandle params.
2857         * bindings/v8/SharedPersistent.h: Fixed a few style/include issues.
2858         * bindings/v8/V8AbstractEventListener.cpp:
2859         (WebCore::V8AbstractEventListener::V8AbstractEventListener): Added WorldContextHandle params.
2860         (WebCore::V8AbstractEventListener::handleEvent): Adjusted context retrieval to use WorldContextHandle.
2861         (WebCore::V8AbstractEventListener::invokeEventHandler): Ditto.
2862         * bindings/v8/V8AbstractEventListener.h:
2863         (WebCore::V8AbstractEventListener::worldContext): Added WorldContextHandle params.
2864         * bindings/v8/V8EventListenerList.h:
2865         (WebCore::V8EventListenerList::findOrCreateWrapper): Ditto.
2866         * bindings/v8/V8LazyEventListener.cpp:
2867         (WebCore::V8LazyEventListener::V8LazyEventListener): Ditto.
2868         (WebCore::V8LazyEventListener::prepareListenerObject): Adjusted context retrieval to use WorldContextHandle.
2869         * bindings/v8/V8LazyEventListener.h:
2870         (WebCore::V8LazyEventListener::create): Added WorldContextHandle params.
2871         * bindings/v8/V8Proxy.cpp:
2872         (WebCore::V8Proxy::context): Refactored to use mainWorldContext();
2873         (WebCore::V8Proxy::mainWorldContext): Added.
2874         (WebCore::toV8Context): Changed to use WorldContextHandle.
2875         * bindings/v8/V8Proxy.h: Added mainWorldContext decl.
2876         * bindings/v8/V8Utilities.cpp:
2877         (WebCore::reportException): Added an extra check to avoid crashes during frame teardown.
2878         * bindings/v8/V8WorkerContextEventListener.cpp:
2879         (WebCore::V8WorkerContextEventListener::V8WorkerContextEventListener): Added WorldContextHandle params.
2880         * bindings/v8/V8WorkerContextEventListener.h:
2881         (WebCore::V8WorkerContextEventListener::create): Added WorldContextHandle params.
2882         * bindings/v8/WorldContextHandle.cpp: Added.
2883         * bindings/v8/WorldContextHandle.h: Added.
2884         * bindings/v8/custom/V8CustomEventListener.cpp:
2885         (WebCore::V8EventListener::V8EventListener): Added WorldContextHandle params.
2886         * bindings/v8/custom/V8CustomEventListener.h:
2887         (WebCore::V8EventListener::create): Added WorldContextHandle params.
2888
2889 2009-12-10  Jon Honeycutt  <jhoneycutt@apple.com>
2890
2891         Pass more information about a plug-in to the PluginHalterDelegate
2892
2893         Reviewed by Adam Roben.
2894
2895         * loader/EmptyClients.h:
2896         Remove this unused class.
2897
2898         * page/HaltablePlugin.h:
2899         Add new functions to return the plug-in's name and whether it is
2900         windowed.
2901
2902         * page/PluginHalter.cpp:
2903         (WebCore::PluginHalter::timerFired):
2904         Pass new arguments to the client.
2905
2906         * page/PluginHalterClient.h:
2907         Add new parameters.
2908
2909         * plugins/PluginView.cpp:
2910         (WebCore::PluginView::pluginName):
2911         Return the name from the PluginPackage.
2912
2913         * plugins/PluginView.h:
2914         (WebCore::PluginView::isWindowed):
2915
2916 2009-12-09  Brian Weinstein  <bweinstein@apple.com>
2917
2918         Reviewed by Pavel Feldman.
2919
2920         Fixes <http://webkit.org/b/31738>.
2921         Web Inspector: Console Scope Bar should be on top of console when Console is a Panel.
2922         
2923         When the console is set to be shown as a full panel, move the scope bar to the top
2924         where it looks best. When it is only shown as a drawer, move it to the bottom, where
2925         it originally was. This takes up less space as a drawer, and makes it more discoverable
2926         and usable when it is the full panel.
2927
2928         * inspector/front-end/ConsolePanel.js:
2929         (WebInspector.ConsolePanel.prototype.show): Move filter bar to top.
2930         (WebInspector.ConsolePanel.prototype.hide): Move filter bar back to bottom.
2931         * inspector/front-end/inspector.css:
2932
2933 2009-12-10  Stephen White  <senorblanco@chromium.org>
2934
2935         Reviewed by Dirk Schulze.
2936
2937         Fix for alpha blending in SVG Filters on Chromium/skia.
2938         https://bugs.webkit.org/show_bug.cgi?id=32378
2939
2940         Covered by LayoutTests/svg/filters/feGaussianBlur.svg and others.
2941
2942         * platform/graphics/skia/ImageBufferSkia.cpp:
2943         (WebCore::ImageBuffer::platformTransformColorSpace):
2944
2945 2009-12-10  Pavel Feldman  <pfeldman@chromium.org>
2946
2947         Reviewed by Timothy Hatcher.
2948
2949         Web Inspector: Add context menu actions for DOM tree.
2950
2951         https://bugs.webkit.org/show_bug.cgi?id=32348
2952
2953         * English.lproj/localizedStrings.js:
2954         * inspector/front-end/ContextMenu.js:
2955         (WebInspector.ContextMenu):
2956         (WebInspector.ContextMenu.prototype.show):
2957         (WebInspector.ContextMenu.prototype.appendItem):
2958         (WebInspector.ContextMenu.prototype.appendSeparator):
2959         (WebInspector.ContextMenu.prototype._itemSelected):
2960         (WebInspector.contextMenuItemSelected):
2961         (WebInspector.contextMenuCleared):
2962         * inspector/front-end/ElementsTreeOutline.js:
2963         (WebInspector.ElementsTreeOutline.prototype._onmouseout):
2964         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
2965         (WebInspector.ElementsTreeElement.prototype.ondblclick):
2966         (WebInspector.ElementsTreeElement.prototype._startEditingFromEvent):
2967         (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
2968         (WebInspector.ElementsTreeElement.prototype._populateTextContextMenu):
2969         (WebInspector.ElementsTreeElement.prototype._startEditing):
2970         (WebInspector.ElementsTreeElement.prototype._addNewAttribute):
2971         * inspector/front-end/ObjectPropertiesSection.js:
2972         (WebInspector.ObjectPropertyTreeElement.prototype.ondblclick):
2973         * inspector/front-end/ResourceView.js:
2974         (WebInspector.ResourceView.prototype._toggleURLdecoding):
2975         * inspector/front-end/ResourcesPanel.js:
2976         (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick):
2977         * inspector/front-end/StylesSidebarPane.js:
2978         (WebInspector.StylePropertyTreeElement.prototype):
2979         * inspector/front-end/inspector.js:
2980         (WebInspector.contextMenuEventFired):
2981         * inspector/front-end/treeoutline.js:
2982         (TreeElement.treeElementDoubleClicked):
2983
2984 2009-12-09  Nikolas Zimmermann  <nzimmermann@rim.com>
2985
2986         Reviewed by Oliver Hunt.
2987
2988         Filters contain some leaks in untested code
2989         https://bugs.webkit.org/show_bug.cgi?id=32325
2990
2991         Fix obvious leak in SVGFE*Lighting classes. Implement the create() idiom for 
2992         all classes in svg/graphics, that were missing it. The lighting filters aren't
2993         implemented so far, but the associated FilterEffect objects are build, which created
2994         these leaks.
2995
2996         This removes the SVG related failures in the leaks bot.
2997
2998         * svg/SVGFEDiffuseLightingElement.cpp:
2999         (WebCore::SVGFEDiffuseLightingElement::findLights):
3000         * svg/SVGFEDiffuseLightingElement.h:
3001         * svg/SVGFEDistantLightElement.cpp:
3002         (WebCore::SVGFEDistantLightElement::lightSource):
3003         * svg/SVGFEDistantLightElement.h:
3004         * svg/SVGFELightElement.h:
3005         * svg/SVGFEPointLightElement.cpp:
3006         (WebCore::SVGFEPointLightElement::lightSource):
3007         * svg/SVGFEPointLightElement.h:
3008         * svg/SVGFESpecularLightingElement.cpp:
3009         (WebCore::SVGFESpecularLightingElement::findLights):
3010         * svg/SVGFESpecularLightingElement.h:
3011         * svg/SVGFESpotLightElement.cpp:
3012         (WebCore::SVGFESpotLightElement::lightSource):
3013         * svg/SVGFESpotLightElement.h:
3014         * svg/graphics/filters/SVGDistantLightSource.h:
3015         (WebCore::DistantLightSource::create):
3016         (WebCore::DistantLightSource::DistantLightSource):
3017         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
3018         (WebCore::FEDiffuseLighting::FEDiffuseLighting):
3019         (WebCore::FEDiffuseLighting::create):
3020         (WebCore::FEDiffuseLighting::setLightSource):
3021         * svg/graphics/filters/SVGFEDiffuseLighting.h:
3022         * svg/graphics/filters/SVGFESpecularLighting.cpp:
3023         (WebCore::FESpecularLighting::FESpecularLighting):
3024         (WebCore::FESpecularLighting::create):
3025         (WebCore::FESpecularLighting::setLightSource):
3026         * svg/graphics/filters/SVGFESpecularLighting.h:
3027         * svg/graphics/filters/SVGLightSource.h:
3028         * svg/graphics/filters/SVGPointLightSource.h:
3029         (WebCore::PointLightSource::create):
3030         (WebCore::PointLightSource::PointLightSource):
3031         * svg/graphics/filters/SVGSpotLightSource.h:
3032         (WebCore::SpotLightSource::create):
3033         (WebCore::SpotLightSource::SpotLightSource):
3034
3035 2009-12-10  Kenneth Russell  <kbr@google.com>
3036
3037         Reviewed by Oliver Hunt.
3038
3039         [Chromium] SporeViewer demo doesn't work in Chromium
3040         https://bugs.webkit.org/show_bug.cgi?id=32364
3041
3042         Test: fast/canvas/webgl/bug-32364.html
3043
3044         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3045         (WebCore::CALLBACK_FUNC_DECL):
3046         (WebCore::vertexAttribAndUniformHelperf):
3047         (WebCore::uniformHelperi):
3048
3049 2009-12-09  Beth Dakin  <bdakin@apple.com>
3050
3051         Reviewed by Oliver Hunt.
3052
3053         Fix for https://bugs.webkit.org/show_bug.cgi?id=32346 SVG property 
3054         -webkit-shadow should apply shadow on the result after compositing
3055         -and corresponding-
3056         <rdar://problem/7389404>
3057
3058         Set a transparency layer when setting a shadow to apply the shadow 
3059         to the composite.
3060         * rendering/SVGRenderSupport.cpp:
3061         (WebCore::SVGRenderBase::prepareToRenderSVGContent):
3062         (WebCore::SVGRenderBase::finishRenderSVGContent):
3063
3064 2009-12-09  Alexey Proskuryakov  <ap@apple.com>
3065
3066         Reviewed by Darin Adler.
3067
3068         https://bugs.webkit.org/show_bug.cgi?id=32332
3069         WebSocket events should be dispatched synchronously
3070
3071         Updated websocket/tests/simple to test for the new behavior.
3072
3073         When Web Sockets API says that events should be queued for async dispatch, it means something
3074         different. We should keep this in mind when dealing with other HTML5-related specs.
3075
3076         The model for HTML5 is that code running in response to network events (e.g. WebSocket or
3077         XMLHttpRequest algorithms) runs in a separate thread of execution, and thus needs to post
3078         async events as its only way to communicate with client code. As long as network events are
3079         queued themselves (as they are in WebKit), there is no need to queue JS events for async
3080         dispatch.
3081
3082         * websockets/WebSocket.cpp:
3083         (WebCore::WebSocket::didConnect):
3084         (WebCore::WebSocket::didReceiveMessage):
3085         (WebCore::WebSocket::didClose):
3086
3087 2009-12-09  Alexey Proskuryakov  <ap@apple.com>
3088
3089         Reviewed by Oliver Hunt.
3090
3091         https://bugs.webkit.org/show_bug.cgi?id=32355
3092         Assertion failure when opening a WebSocket connection
3093
3094         I couldn't make a reliable test for this. Once the test from bug 32299 is landed, it
3095         will provide partial coverage, as I was frequently seeing the assertion failure with it.
3096
3097         * platform/network/SocketStreamHandleBase.cpp: (WebCore::SocketStreamHandleBase::send):
3098         It's not an error if zero is returned from platformSend() - it just means that nothing could
3099         be pushed down to the network layer, and all data was queued for later.
3100         * platform/network/cf/SocketStreamHandleCFNet.cpp:
3101         (WebCore::SocketStreamHandle::readStreamCallback): This will no longer happen with SocketStream,
3102         but a client can potentially destroy the handle from any callback, so we need to check that
3103         this didn't happen.
3104         (WebCore::SocketStreamHandle::writeStreamCallback): Ditto.
3105
3106 2009-12-09  Sam Weinig  <sam@webkit.org>
3107
3108         Roll out 51919 and 51920. They were incorrect and unnecessary right now.
3109
3110         * platform/mac/WebCoreObjCExtras.mm:
3111         (WebCoreObjCScheduleDeallocateOnMainThread):
3112         * platform/network/mac/NetworkStateNotifierMac.cpp:
3113         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
3114
3115 2009-12-09  Steve Block  <steveblock@google.com>
3116
3117         Reviewed by Darin Fisher.
3118
3119         Adds wtf/StdLibExtras.h include for DEFINE_STATIC_LOCAL in V8 ScriptState.
3120         https://bugs.webkit.org/show_bug.cgi?id=32330
3121
3122         Build fix only, no new tests.
3123
3124         * bindings/v8/ScriptState.cpp: Modified. Adds wtf/StdLibExtras.h include.
3125
3126 2009-12-09  Steve Block  <steveblock@google.com>
3127
3128         Reviewed by Darin Adler.
3129
3130         Adds ENABLE(INSPECTOR) guards around script binding methods that use types
3131         defined only when INSPECTOR is enabled.
3132         https://bugs.webkit.org/show_bug.cgi?id=32328
3133
3134         Build fix only, no new tests.
3135
3136         * bindings/js/ScriptValue.cpp: Modified. Added ENABLE(INSPECTOR) guard to ScriptValue::quarantineValue.
3137         * bindings/v8/ScriptObject.cpp: Modified. Added ENABLE(INSPECTOR) guard to some overloads of ScriptGlobalObject::set.
3138
3139 2009-12-09  Steve Block  <steveblock@google.com>
3140
3141         Reviewed by Adam Barth.
3142
3143         Adds Android Makefiles for building with V8.
3144         Also updates existing Android Makefiles with latest additions.
3145         https://bugs.webkit.org/show_bug.cgi?id=32278
3146
3147         Build fix only, no new tests.
3148
3149         * Android.derived.jscbindings.mk: Modified.
3150         * Android.derived.mk: Modified.
3151         * Android.derived.v8bindings.mk: Added.
3152         * Android.jscbindings.mk: Modified.
3153         * Android.mk: Modified.
3154         * Android.v8bindings.mk: Added.
3155
3156 2009-12-09  Jonathan Dixon  <joth@chromium.org>
3157
3158         Reviewed by Dimitri Glazkov.
3159
3160         Bug 32338 - [Chromium] Fix Chromium builder by including missing GeolocationServiceChromium
3161         https://bugs.webkit.org/show_bug.cgi?id=32338
3162
3163         Fix build break: re-include file dropped out by merge in http://trac.webkit.org/changeset/51681/trunk/WebCore/WebCore.gypi
3164
3165         * WebCore.gypi: Add missing GeolocationServiceChromium.cpp
3166
3167 2009-12-09  Andreas Kling  <andreas.kling@nokia.com>
3168
3169         Reviewed by Brady Eidson.
3170
3171         Fixed a typo in http://trac.webkit.org/changeset/51644 that broke
3172         the QWebPage autotest.
3173
3174         No new test required.
3175
3176         * loader/FrameLoader.cpp:
3177         (WebCore::FrameLoader::navigateToDifferentDocument):
3178
3179 2009-12-09  Robert Hogan  <robert@roberthogan.net>
3180
3181         Reviewed by Eric Seidel.
3182
3183         Exclude JSSVG*.cpp generated files from --minimal and --no-svg builds.
3184         
3185         https://bugs.webkit.org/show_bug.cgi?id=32286
3186
3187         * WebCore.pro:
3188
3189 2009-12-09  Philippe Normand  <pnormand@igalia.com>
3190
3191         Reviewed by Eric Carlson.
3192
3193         Ogg mimetypes are incorrect
3194         https://bugs.webkit.org/show_bug.cgi?id=27113
3195
3196         The ogg extension is handled by audio/ogg instead of
3197         application/ogg. See
3198         http://wiki.xiph.org/MIME_Types_and_File_Extensions
3199
3200         * platform/MIMETypeRegistry.cpp:
3201         (WebCore::TypeExtensionPair::):
3202
3203 2009-12-09  Sam Weinig  <sam@webkit.org>
3204
3205         Reviewed by Anders Carlsson.
3206
3207         Use the current run loop instead of the main runloop for the NetworkStateNotifier.
3208
3209         * platform/network/mac/NetworkStateNotifierMac.cpp:
3210         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
3211
3212 2009-12-09  Sam Weinig  <sam@webkit.org>
3213
3214         Reviewed by Anders Carlsson.
3215
3216         Use isMainThread() helper instead of pthread_main_np() != 0.
3217
3218         * platform/mac/WebCoreObjCExtras.mm:
3219         (WebCoreObjCScheduleDeallocateOnMainThread):
3220
3221 2009-12-09  Sam Weinig  <sam@webkit.org>
3222
3223         Reviewed by Anders Carlsson.
3224
3225         Add some #ifdefs to allow us to experiment with a single NSView mac WebKit.
3226
3227         * page/Chrome.h:
3228         * page/EventHandler.h:
3229         * page/mac/ChromeMac.mm:
3230         * page/mac/DragControllerMac.mm:
3231         (WebCore::DragController::dragOperation):
3232         * page/mac/EventHandlerMac.mm:
3233         (WebCore::EventHandler::eventLoopHandleMouseDragged):
3234         (WebCore::EventHandler::eventActivatedView):
3235         (WebCore::EventHandler::passMousePressEventToSubframe):
3236         (WebCore::EventHandler::passMouseMoveEventToSubframe):
3237         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
3238         (WebCore::EventHandler::passWheelEventToWidget):
3239         (WebCore::EventHandler::focusDocumentView):
3240         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
3241         (WebCore::EventHandler::createDraggingClipboard):
3242         (WebCore::isKeyboardOptionTab):
3243         (WebCore::EventHandler::invertSenseOfTabsToLinks):
3244         (WebCore::EventHandler::tabsToAllControls):
3245         (WebCore::EventHandler::needsKeyboardEventDisambiguationQuirks):
3246         (WebCore::EventHandler::accessKeyModifiers):
3247         * platform/ScrollView.cpp:
3248         (WebCore::ScrollView::wheelEvent):
3249         * platform/Widget.cpp:
3250         * platform/Widget.h:
3251         * platform/mac/ScrollViewMac.mm:
3252         * platform/mac/WidgetMac.mm:
3253         (WebCore::Widget::Widget):
3254         (WebCore::Widget::~Widget):
3255         (WebCore::Widget::show):
3256         (WebCore::Widget::hide):
3257         (WebCore::Widget::setCursor):
3258         (WebCore::Widget::paint):
3259         (WebCore::Widget::setFocus):
3260         (WebCore::Widget::setIsSelected):
3261         (WebCore::Widget::frameRect):
3262         (WebCore::Widget::setFrameRect):
3263
3264 2009-12-09  Michael Nordman  <michaeln@google.com>
3265
3266         Reviewed by Dimitri Glazkov.
3267
3268         Chromium build fix.
3269
3270         No new tests.
3271
3272         * bindings/v8/DOMData.cpp
3273         * bindings/v8/V8DOMWrapper.cpp
3274         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3275         (WebCore::vertexAttribAndUniformHelperf):
3276         (WebCore::uniformHelperi):
3277         (WebCore::uniformMatrixHelper):
3278
3279 2009-12-09  Søren Gjesse  <sgjesse@chromium.org>
3280
3281         Reviewed by Pavel Feldman.
3282
3283         [V8] Isolated world reuse failure
3284         https://bugs.webkit.org/show_bug.cgi?id=32306
3285
3286         Fixed bug introduced in r51407: (http://trac.webkit.org/changeset/51407) which caused layout test
3287         LayoutTests/http/tests/security/isolatedWorld/world-reuse.html to fail.
3288
3289         * bindings/v8/V8Proxy.cpp:
3290         (WebCore::V8Proxy::setInjectedScriptContextDebugId):
3291         (WebCore::V8Proxy::contextDebugId):
3292
3293 2009-12-09  Patrick Scott  <phanna@email.unc.edu>
3294
3295         Fix the build with ENABLE_ORIENTATION_EVENTS
3296         https://bugs.webkit.org/show_bug.cgi?id=32321
3297
3298         * page/Frame.cpp:
3299         (WebCore::Frame::sendOrientationChangeEvent):
3300
3301 2009-12-09  Avi Drissman  <avi@chromium.org>
3302
3303         Reviewed by Darin Fisher.
3304
3305         Chromium tickmarks in scrollbar now UX approved.
3306         https://bugs.webkit.org/show_bug.cgi?id=32069
3307
3308         * platform/chromium/ScrollbarThemeChromiumMac.mm:
3309         (WebCore::ScrollbarThemeChromiumMac::paint):
3310
3311 2009-12-09  Chris Marrin  <cmarrin@apple.com>
3312
3313         Reviewed by Adam Roben.
3314
3315         Delay load DLLs for accelerated compositing
3316         https://bugs.webkit.org/show_bug.cgi?id=31856
3317         
3318         Add logic to turn off accelerated compositing if d3d9 or QuartzCore
3319         DLLs are not present.
3320         
3321         This patch also changes the WKCACFLayerRenderer to be a pointer.
3322         This allows me to have a create() method which will not create it when
3323         accelerated compositing is disabled because of missing DLLs. It 
3324         avoids having to do so many checks. I also made WebViewWndProc 
3325         a member function to allow several methods to be made protected, which
3326         allows me to avoid doing availability checks there as well.
3327
3328         * platform/graphics/win/WKCACFLayer.cpp:
3329         * platform/graphics/win/WKCACFLayer.h:
3330         * platform/graphics/win/WKCACFLayerRenderer.cpp:
3331         * platform/graphics/win/WKCACFLayerRenderer.h:
3332         * rendering/RenderLayerBacking.cpp:
3333
3334 2009-12-09  Nate Chapin  <japhet@chromium.org>
3335
3336         Reviewed by Darin Adler.
3337
3338         Rename dom/ClassNames to SpaceSplitString and update build files.
3339
3340         https://bugs.webkit.org/show_bug.cgi?id=32250
3341
3342         * GNUmakefile.am:
3343         * WebCore.gypi:
3344         * WebCore.pro:
3345         * WebCore.vcproj/WebCore.vcproj:
3346         * WebCore.xcodeproj/project.pbxproj:
3347         * WebCoreSources.bkl:
3348         * css/CSSStyleSelector.cpp:
3349         (WebCore::CSSStyleSelector::matchRules):
3350         * dom/ClassNames.cpp: Removed.
3351         * dom/ClassNames.h: Removed.
3352         * dom/ClassNodeList.h:
3353         * dom/NamedMappedAttrMap.h:
3354         (WebCore::NamedMappedAttrMap::classNames):
3355         * dom/SpaceSplitString.cpp: Copied from WebCore/dom/ClassNames.cpp.
3356         (WebCore::SpaceSplitStringData::createVector):
3357         (WebCore::SpaceSplitStringData::containsAll):
3358         * dom/SpaceSplitString.h: Copied from WebCore/dom/ClassNames.h.
3359         (WebCore::SpaceSplitStringData::SpaceSplitStringData):
3360         (WebCore::SpaceSplitString::SpaceSplitString):
3361         (WebCore::SpaceSplitString::set):
3362         (WebCore::SpaceSplitString::containsAll):
3363         * dom/StyledElement.h:
3364         (WebCore::StyledElement::classNames):
3365         * html/HTMLAnchorElement.cpp:
3366         (WebCore::HTMLAnchorElement::setRel):
3367
3368 2009-12-09  Stephen White  <senorblanco@chromium.org>
3369
3370         Reviewed by Darin Fisher.
3371
3372         Enable SVG filters in Chromium build.
3373         https://bugs.webkit.org/show_bug.cgi?id=32323
3374
3375         Covered by SVG filter layout tests.
3376
3377         * WebCore.gyp/WebCore.gyp:
3378         * WebCore.gypi:
3379         * bindings/scripts/CodeGeneratorV8.pm:
3380         * bindings/v8/DerivedSourcesAllInOne.cpp:
3381         * bindings/v8/V8DOMWrapper.cpp:
3382         * bindings/v8/V8Index.cpp:
3383         * bindings/v8/V8Index.h:
3384
3385 2009-12-09  Oliver Hunt  <oliver@apple.com>
3386
3387         Build fix
3388
3389         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3390         (WebCore::functionForUniform):
3391
3392 2009-12-08  Fumitoshi Ukai  <ukai@chromium.org>
3393
3394         Reviewed by Darin Adler.
3395
3396         WebSocket allow space (U+0020) in sub protocol name.
3397         https://bugs.webkit.org/show_bug.cgi?id=32266
3398
3399         Test: websocket/tests/sub-protocol-with-space.html
3400
3401         * websockets/WebSocket.cpp:
3402         (WebCore::isValidProtocolString):
3403
3404 2009-12-08  Peterson Trethewey  <petersont@google.com>
3405
3406         Reviewed by Oliver Hunt.
3407
3408         Implement WebGLUniformLocation and change API to use it.
3409         https://bugs.webkit.org/show_bug.cgi?id=31173
3410
3411         Test: fast/canvas/webgl/uniform-location.html
3412
3413         * DerivedSources.make:
3414         * WebCore.gypi:
3415         * WebCore.xcodeproj/project.pbxproj:
3416         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3417         (WebCore::JSWebGLRenderingContext::getProgramParameter):
3418         (WebCore::JSWebGLRenderingContext::getUniform):
3419         (WebCore::functionForUniform):
3420         (WebCore::dataFunctionf):
3421         (WebCore::dataFunctioni):
3422         (WebCore::dataFunctionMatrix):
3423         * bindings/scripts/CodeGeneratorV8.pm:
3424         * bindings/v8/DerivedSourcesAllInOne.cpp:
3425         * bindings/v8/V8Index.cpp:
3426         * bindings/v8/V8Index.h:
3427         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3428         (WebCore::toWebGLUniformLocation):
3429         (WebCore::):
3430         (WebCore::CALLBACK_FUNC_DECL):
3431         (WebCore::isFunctionToCallForAttribute):
3432         (WebCore::vertexAttribAndUniformHelperf):
3433         (WebCore::uniformHelperi):
3434         (WebCore::uniformMatrixHelper):
3435         * html/canvas/WebGLRenderingContext.cpp:
3436         (WebCore::WebGLRenderingContext::getUniform):
3437         (WebCore::WebGLRenderingContext::getUniformLocation):
3438         (WebCore::WebGLRenderingContext::uniform1f):
3439         (WebCore::WebGLRenderingContext::uniform1fv):
3440         (WebCore::WebGLRenderingContext::uniform1i):
3441         (WebCore::WebGLRenderingContext::uniform1iv):
3442         (WebCore::WebGLRenderingContext::uniform2f):
3443         (WebCore::WebGLRenderingContext::uniform2fv):
3444         (WebCore::WebGLRenderingContext::uniform2i):
3445         (WebCore::WebGLRenderingContext::uniform2iv):
3446         (WebCore::WebGLRenderingContext::uniform3f):
3447         (WebCore::WebGLRenderingContext::uniform3fv):
3448         (WebCore::WebGLRenderingContext::uniform3i):
3449         (WebCore::WebGLRenderingContext::uniform3iv):
3450         (WebCore::WebGLRenderingContext::uniform4f):
3451         (WebCore::WebGLRenderingContext::uniform4fv):
3452         (WebCore::WebGLRenderingContext::uniform4i):
3453         (WebCore::WebGLRenderingContext::uniform4iv):
3454         (WebCore::WebGLRenderingContext::uniformMatrix2fv):
3455         (WebCore::WebGLRenderingContext::uniformMatrix3fv):
3456         (WebCore::WebGLRenderingContext::uniformMatrix4fv):
3457         * html/canvas/WebGLRenderingContext.h:
3458         * html/canvas/WebGLRenderingContext.idl:
3459         * html/canvas/WebGLUniformLocation.cpp: Added.
3460         (WebCore::WebGLUniformLocation::create):
3461         (WebCore::WebGLUniformLocation::WebGLUniformLocation):
3462         * html/canvas/WebGLUniformLocation.h: Added.
3463         (WebCore::WebGLUniformLocation::~WebGLUniformLocation):
3464         (WebCore::WebGLUniformLocation::program):
3465         (WebCore::WebGLUniformLocation::location):
3466         * html/canvas/WebGLUniformLocation.idl: Added.
3467
3468 2009-12-08  Adam Langley  <agl@google.com>
3469
3470         Reviewed by Darin Adler.
3471
3472         Fix assertion failure in WebCore::RenderBlock::startDelayUpdateScrollInfo
3473
3474         startDelayUpdateScrollInfo calls a function that can end up calling
3475         startDelayUpdateScrollInfo again. However, it's static state is
3476         inconsistent when this happens leading to an assertion failure (or
3477         probably a memory leak if assertions are off).
3478
3479         Thanks to Robert Swiecki for the test case.
3480
3481         https://bugs.webkit.org/show_bug.cgi?id=32172
3482         http://code.google.com/p/chromium/issues/detail?id=28880
3483
3484         Test: fast/css/recursive-delay-update-scroll.html
3485
3486         * rendering/RenderBlock.cpp:
3487         (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
3488
3489 2009-12-08  Steve Falkenburg  <sfalken@apple.com>
3490
3491         Reviewed by Adam Roben.
3492
3493         WebCore source level debugging on Windows not reliable in some cases
3494         https://bugs.webkit.org/show_bug.cgi?id=32297
3495
3496         Customized pdb file name/location for WebCore static library.
3497
3498         * WebCore.vcproj/WebCoreCommon.vsprops: Add ProgramDataBaseFileName.
3499
3500 2009-12-08  Kevin Watters  <kevinwatters@gmail.com>
3501
3502         Reviewed by Kevin Ollivier.
3503
3504         [wx] Mac plugins support.
3505         
3506         https://bugs.webkit.org/show_bug.cgi?id=32236
3507
3508         * platform/FileSystem.h:
3509         * platform/cf/BinaryPropertyList.h:
3510         * platform/network/curl/ResourceHandleManager.cpp:
3511         * platform/wx/FileSystemWx.cpp:
3512         (WebCore::fileExists):
3513         (WebCore::unloadModule):
3514         (WebCore::wxDirTraverserNonRecursive::wxDirTraverserNonRecursive):
3515         (WebCore::wxDirTraverserNonRecursive::OnFile):
3516         (WebCore::wxDirTraverserNonRecursive::OnDir):
3517         (WebCore::listDirectory):
3518         * plugins/mac/PluginViewMac.cpp:
3519         (WebCore::nativeWindowFor):
3520         (WebCore::cgHandleFor):
3521         (WebCore::topLevelOffsetFor):
3522         (WebCore::PluginView::platformStart):
3523         (WebCore::PluginView::setFocus):
3524         (WebCore::PluginView::invalidateRect):
3525         (WebCore::PluginView::handleKeyboardEvent):
3526         (WebCore::PluginView::globalMousePosForPlugin):
3527         * plugins/wx/PluginDataWx.cpp: Added.
3528         (WebCore::PluginData::initPlugins):
3529         (WebCore::PluginData::refresh):
3530         * wscript:
3531
3532 2009-12-08  Brady Eidson  <beidson@apple.com>
3533
3534         Reviewed by Darin Adler.
3535
3536         Navigating to a cached page can result in accessing a destroyed HTMLInputElement.
3537         <rdar://problem/6856662> and https://webkit.org/b/32293
3538
3539         Test: fast/loader/input-element-page-cache-crash.html
3540
3541         * html/HTMLInputElement.cpp:
3542         (WebCore::HTMLInputElement::parseMappedAttribute): Make sure to unregister for the activation
3543           callback after the new m_autocomplete setting has been stored so the unregistration actually
3544           takes place.
3545
3546 2009-12-08  Dmitry Titov  <dimich@chromium.org>
3547
3548         Rubber-stamped by David Levin.
3549
3550         Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread."
3551         It may have caused massive increase of reported leaks on the bots.
3552         https://bugs.webkit.org/show_bug.cgi?id=31639
3553
3554         * ForwardingHeaders/wtf/ThreadVerifier.h: Removed.
3555         * loader/icon/IconRecord.cpp:
3556         (WebCore::IconRecord::IconRecord):
3557         * platform/SharedBuffer.cpp:
3558         (WebCore::SharedBuffer::SharedBuffer):
3559         * platform/text/StringImpl.cpp:
3560         (WebCore::StringImpl::StringImpl):
3561
3562 2009-12-08  Pavel Feldman  <pfeldman@chromium.org>
3563
3564         Reviewed by Darin Fisher.
3565
3566         Chromium: support custom WebCore context menu items in Chromium port.
3567
3568         https://bugs.webkit.org/show_bug.cgi?id=32277
3569
3570         * platform/ContextMenu.h:
3571         * platform/ContextMenuItem.h:
3572         (WebCore::PlatformMenuItemDescription::PlatformMenuItemDescription):
3573         * platform/chromium/ContextMenuChromium.cpp:
3574         (WebCore::ContextMenu::ContextMenu):
3575         (WebCore::ContextMenu::itemCount):
3576         (WebCore::ContextMenu::insertItem):
3577         (WebCore::ContextMenu::appendItem):
3578         (WebCore::ContextMenu::itemWithAction):
3579         (WebCore::ContextMenu::itemAtIndex):
3580         (WebCore::ContextMenu::platformDescription):
3581         * platform/chromium/ContextMenuItemChromium.cpp:
3582         (WebCore::ContextMenuItem::ContextMenuItem):
3583         (WebCore::ContextMenuItem::releasePlatformDescription):
3584         (WebCore::ContextMenuItem::type):
3585         (WebCore::ContextMenuItem::action):
3586         (WebCore::ContextMenuItem::title):
3587         (WebCore::ContextMenuItem::checked):
3588         (WebCore::ContextMenuItem::enabled):
3589         (WebCore::ContextMenuItem::setType):
3590         (WebCore::ContextMenuItem::setAction):
3591         (WebCore::ContextMenuItem::setTitle):
3592         (WebCore::ContextMenuItem::setChecked):
3593         (WebCore::ContextMenuItem::setEnabled):
3594
3595 2009-12-08  Adam Langley  <agl@google.com>
3596
3597         Reviewed by Dimitri Glazkov.
3598
3599         Chromium Linux: set default scrollbar colours.
3600
3601         This is so that layout tests have sane defaults for the scrollbar
3602         colours, even if the API user doesn't set any.
3603
3604         This is a fix due to r51827.
3605
3606         https://bugs.webkit.org/show_bug.cgi?id=32287
3607
3608         This is very well covered by existing layout tests.
3609
3610         * rendering/RenderThemeChromiumLinux.cpp:
3611
3612