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