Fixes a regression caused by splitting the input and output of console commands.
[WebKit-https.git] / WebCore / ChangeLog
1 2009-03-02  Timothy Hatcher  <timothy@apple.com>
2
3         Fixes a regression caused by splitting the input and output of console commands.
4
5         https://bugs.webkit.org/show_bug.cgi?id=24293
6
7         Reviewed by Kevin McCullough.
8
9         * inspector/front-end/Console.js:
10         (WebInspector.Console.prototype.addMessage): Don't treat ConsoleCommandResult as a
11         normal ConsoleMessage when appending. This prevents resetting repeatCounts incorrectly.
12
13 2009-03-02  Timothy Hatcher  <timothy@apple.com>
14
15         Make exception messages and logged Error objects display consistently.
16
17         https://bugs.webkit.org/show_bug.cgi?id=18983
18
19         Reviewed by Adam Roben.
20
21         * English.lproj/localizedStrings.js: Remove a string for line numbers.
22         * inspector/front-end/Console.js:
23         (WebInspector.Console.prototype._enterKeyPressed): Pass the exception
24         boolean to the ConsoleCommandResult constructor and don't pass level.
25         (WebInspector.Console.prototype._formatnode): Fix a className typo.
26         (WebInspector.Console.prototype._formaterror): Add an error-message
27         classed span around the message to show in red and remove the
28         console-message-url class from the link so it doesn't float right.
29         Instead enclose the link in parentheses and use displayNameForURL
30         to shorten the URL in the link.
31         (WebInspector.ConsoleMessage.prototype.toMessageElement): Simplify
32         how line numbers are shown since link underlining a string with
33         parentheses looks bad.
34         (WebInspector.ConsoleCommandResult): Take an exception boolean flag
35         instead of a level and get line and URL based on that flag.
36         * inspector/front-end/inspector.css: Tweaks to the styles.
37
38 2009-03-02  Ojan Vafai  <ojan@chromium.org>
39
40         Reviewed by Adele Peterson.
41
42         Bug 24048: extra windows button padding doesn't apply when there's no appearance
43         <https://bugs.webkit.org/show_bug.cgi?id=24048>
44
45         Replace adjustButtonInnerStyle with buttonInternalPaddingLeft/Right/Top/Bottom.
46
47         No tests added as existing tests already cover this behavior.
48
49         * rendering/RenderButton.cpp:
50         (WebCore::RenderButton::setupInnerStyle):
51         * rendering/RenderTheme.cpp:
52         * rendering/RenderTheme.h:
53         (WebCore::RenderTheme::buttonInternalPaddingLeft):
54         (WebCore::RenderTheme::buttonInternalPaddingRight):
55         (WebCore::RenderTheme::buttonInternalPaddingTop):
56         * rendering/RenderThemeChromiumGtk.cpp:
57         (WebCore::RenderThemeWin::buttonInternalPaddingLeft):
58         (WebCore::RenderThemeWin::buttonInternalPaddingRight):
59         (WebCore::RenderThemeWin::buttonInternalPaddingTop):
60         (WebCore::RenderThemeWin::buttonInternalPaddingBottom):
61         * rendering/RenderThemeChromiumGtk.h:
62         * rendering/RenderThemeChromiumWin.cpp:
63         (WebCore::RenderThemeChromiumWin::buttonInternalPaddingLeft):
64         (WebCore::RenderThemeChromiumWin::buttonInternalPaddingRight):
65         (WebCore::RenderThemeChromiumWin::buttonInternalPaddingTop):
66         (WebCore::RenderThemeChromiumWin::buttonInternalPaddingBottom):
67         * rendering/RenderThemeChromiumWin.h:
68         * rendering/RenderThemeWin.cpp:
69         (WebCore::RenderThemeWin::buttonInternalPaddingLeft):
70         (WebCore::RenderThemeWin::buttonInternalPaddingRight):
71         (WebCore::RenderThemeWin::buttonInternalPaddingTop):
72         (WebCore::RenderThemeWin::buttonInternalPaddingBottom):
73         * rendering/RenderThemeWin.h:
74
75 2009-03-02  Adam Treat  <adam.treat@torchmobile.com>
76
77         Build fix for Qt port.  Remove unnecessary assert.
78
79         * platform/graphics/qt/ImageBufferQt.cpp:
80         (WebCore::ImageBuffer::putImageData):
81
82 2009-03-02  Adam Treat  <adam.treat@torchmobile.com>
83
84         Reviewed by Adam Roben and previously by Eric Seidel and Simon Fraser.
85
86         https://bugs.webkit.org/show_bug.cgi?id=24227
87         Ensure that the checkForSolidColor() optimization is correctly triggered
88         for all cases of drawPattern.  Currently, the optimization was not triggered
89         when the check had not been previously performed via a request for the
90         image's NativeImagePtr.
91
92         Implement the Qt version of the checkForSolidColor() method.  Combined with
93         the bug fix this reduces the time it takes to draw a repeating background
94         of a 1x1 image from ~50msecs to ~0msecs on my machine.
95
96         * platform/graphics/BitmapImage.cpp:
97         (WebCore::BitmapImage::BitmapImage):
98         * platform/graphics/BitmapImage.h:
99         (WebCore::BitmapImage::mayFillWithSolidColor):
100         * platform/graphics/Image.h:
101         (WebCore::Image::mayFillWithSolidColor):
102         * platform/graphics/cairo/ImageCairo.cpp:
103         (WebCore::BitmapImage::BitmapImage):
104         (WebCore::BitmapImage::checkForSolidColor):
105         * platform/graphics/cg/ImageCG.cpp:
106         (WebCore::BitmapImage::BitmapImage):
107         (WebCore::BitmapImage::checkForSolidColor):
108         * platform/graphics/qt/ImageQt.cpp:
109         (WebCore::BitmapImage::checkForSolidColor):
110         * platform/graphics/skia/ImageSkia.cpp:
111         (WebCore::BitmapImage::checkForSolidColor):
112         * platform/graphics/wx/ImageWx.cpp:
113         (WebCore::BitmapImage::checkForSolidColor):
114
115 2009-03-02  Gustavo Noronha Silva  <gns@gnome.org>
116
117         Unreviewed build fix; adding missing files to EXTRA_DIST, so that
118         they show up in the tarball.
119
120         * GNUmakefile.am:
121
122 2009-03-02  Dirk Schulze  <krit@webkit.org>
123
124         Reviewed by Holger Freyther.
125
126         Added putImageData to Qt. Discussed with Ariya Hidayat.
127
128         [Qt] lacks putImageData support in Canvas
129         https://bugs.webkit.org/show_bug.cgi?id=22186
130
131         * platform/graphics/qt/ImageBufferQt.cpp:
132         (WebCore::ImageBuffer::putImageData):
133
134 2009-03-02  Timothy Hatcher  <timothy@apple.com>
135
136         Show exception messages again when evaluating bad expressions in the
137         Web Inspector's console.
138
139         https://bugs.webkit.org/show_bug.cgi?id=19890
140
141         Reviewed by Oliver Hunt.
142
143         * bindings/js/JSQuarantinedObjectWrapper.cpp:
144         (WebCore::JSQuarantinedObjectWrapper::transferExceptionToExecState):
145         Fix the order in which the exception is set and cleared now that the
146         exception is stored in the shared GlobalData, not per ExecState.
147
148 2009-02-28  Timothy Hatcher  <timothy@apple.com>
149
150         Make input in the Web Inspector console print before any output
151         that might be added by the called function.
152
153         https://bugs.webkit.org/show_bug.cgi?id=19931
154
155         Reviewed by Oliver Hunt.
156
157         * inspector/front-end/Console.js:
158         (WebInspector.Console.prototype._enterKeyPressed): Add the command
159         message before evaluating the result. Associate the originating
160         command to the result, so if they are adjacent there is no divider.
161         (WebInspector.ConsoleCommand): No longer take a result.
162         (WebInspector.ConsoleCommand.prototype.toMessageElement): Result
163         code removed since it isn't used now.
164         (WebInspector.ConsoleCommandResult): Subclass ConsoleMessage.
165         (WebInspector.ConsoleCommandResult.prototype.toMessageElement):
166         Call the ConsoleMessage toMessageElement and add a style class.
167         * inspector/front-end/inspector.css: Add a new style class for
168         adjacent results to hide the divider. Also tweak the position of
169         the disclosure triangle for objects to not use the left margin.
170
171 2009-03-01  Chris Fleizach  <cfleizach@apple.com>
172
173         Reviewed by Oliver Hunt.
174
175         Bug 24282: AX Palindrome error when asking for a specific index of the AXChildren array
176         <https://bugs.webkit.org/show_bug.cgi?id=24282>
177
178         When fetching an array of elements with a range, attachment views need to be returned
179         instead of the actual attachment.
180
181         * page/mac/AccessibilityObjectWrapper.mm:
182         (-[AccessibilityObjectWrapper accessibilityIndexOfChild:]):
183         (-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
184
185 2009-03-01  Ojan Vafai  <ojan@chromium.org>
186
187         Reviewed by Eric Seidel.
188
189         Bug 24251: Cleanup: replace positionForCoordinates with positionForPoint
190         <https://bugs.webkit.org/show_bug.cgi?id=24251>
191         
192         Make RenderObject::positionForCoordinate non-virtual and
193         RenderObject::positionForPoint virtual in preparation for
194         removing positionFor* from RenderObject/RenderText.
195
196         * page/Frame.cpp:
197         (WebCore::Frame::visiblePositionForPoint):
198         * rendering/RenderBR.cpp:
199         (WebCore::RenderBR::positionForPoint):
200         * rendering/RenderBR.h:
201         * rendering/RenderBlock.cpp:
202         (WebCore::RenderBlock::positionForPoint):
203         * rendering/RenderBlock.h:
204         * rendering/RenderBox.cpp:
205         (WebCore::RenderBox::positionForPoint):
206         * rendering/RenderBox.h:
207         * rendering/RenderInline.cpp:
208         (WebCore::RenderInline::positionForPoint):
209         * rendering/RenderInline.h:
210         * rendering/RenderObject.cpp:
211         (WebCore::RenderObject::positionForCoordinates):
212         (WebCore::RenderObject::positionForPoint):
213         * rendering/RenderObject.h:
214         * rendering/RenderReplaced.cpp:
215         (WebCore::RenderReplaced::positionForPoint):
216         * rendering/RenderReplaced.h:
217         * rendering/RenderSVGInlineText.cpp:
218         (WebCore::RenderSVGInlineText::positionForPoint):
219         * rendering/RenderSVGInlineText.h:
220         * rendering/RenderText.cpp:
221         (WebCore::RenderText::positionForPoint):
222         * rendering/RenderText.h:
223
224 2009-03-01  Larry Ewing  <lewing@novell.com>
225
226         Reviewed by Alexey Proskuryakov.
227
228         https://bugs.webkit.org/show_bug.cgi?id=24080
229         NPN_GetValue casting to the wrong type and writing outside bounds
230
231         Make sure to cast the value to the correct type so that only
232         memory owned by the value is written to.
233
234         * plugins/gtk/PluginViewGtk.cpp (PluginView::getValueStatic): 
235         * plugins/qt/PluginViewQt.cpp (PluginView::getValueStatic):
236         * plugins/mac/PluginViewMac.cpp (PluginView::getValueStatic): 
237         (PluginView::getValue):
238
239 2009-03-01  Jeremy Moskovich  <jeremy@chromium.org>
240
241         Reviewed by Simon Fraser.
242
243         https://bugs.webkit.org/show_bug.cgi?id=24197 and
244         https://bugs.webkit.org/show_bug.cgi?id=23512
245
246         The Windows version of cgColor() is conditionally compiled using
247         !PLATFORM(MAC) change this to PLATFORM(WIN_OS) so that Chrome
248         can use the OS X version instead of the Windows version.
249
250         Also rename cgColor() -> createCGColor()
251
252         No observable change in behavior, so no test.
253
254         * platform/graphics/Color.h:
255         * platform/graphics/cg/ColorCG.cpp:
256         (WebCore::createCGColor):
257         * platform/graphics/cg/GraphicsContextCG.cpp:
258         (WebCore::GraphicsContext::setPlatformShadow):
259         * platform/graphics/mac/ColorMac.mm:
260         (WebCore::createCGColor):
261         * platform/graphics/mac/GraphicsContextMac.mm:
262         (WebCore::GraphicsContext::drawFocusRing):
263         * platform/graphics/mac/GraphicsLayerCA.mm:
264         (WebCore::setLayerBorderColor):
265         (WebCore::setLayerBackgroundColor):
266         (WebCore::GraphicsLayerCA::setBackgroundColor):
267         * platform/graphics/win/GraphicsContextCGWin.cpp:
268         (WebCore::GraphicsContext::drawFocusRing):
269         * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
270         (WebCore::ciColor):
271
272 2009-03-01  David Levin  <levin@chromium.org>
273
274         Reviewed by Alexey Proskuryakov.
275
276         Bug 24271: XMLHttpRequest needs js bindings for Workers.
277         <https://bugs.webkit.org/show_bug.cgi?id=24271>
278
279         Tests: http/tests/xmlhttprequest/workers/methods-async.html
280                http/tests/xmlhttprequest/workers/methods.html
281
282         * bindings/js/JSWorkerContextBase.cpp:
283         (WebCore::JSWorkerContextBase::getOwnPropertySlot):
284         (jsWorkerContextBaseXMLHttpRequest):
285         (setJSWorkerContextBaseXMLHttpRequest):
286         Expose XMLHttpRequest to Workers.
287
288         * bindings/js/JSWorkerContextBase.h:
289
290         * bindings/js/JSXMLHttpRequestConstructor.cpp:
291         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
292         (WebCore::constructXMLHttpRequest):
293         (WebCore::JSXMLHttpRequestConstructor::mark):
294         Removed the dependencies on Document.
295
296         * bindings/js/JSXMLHttpRequestConstructor.h:
297         (WebCore::JSXMLHttpRequestConstructor::scriptExecutionContext):
298         * dom/EventException.idl:
299         * dom/EventListener.idl:
300         Chnage to have the NoStaticTables attribute since they are used from XHR.
301
302         * loader/WorkerThreadableLoader.cpp:
303         (WebCore::workerContextDidFinishLoading):
304         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
305         Fixed identifier to be unsigned long.
306
307         * loader/WorkerThreadableLoader.h:
308         * workers/WorkerThread.cpp:
309         (WebCore::WorkerThread::workerThread):
310         Stop active objects when the thread is getting shutdown so that xhr gets properly shutdown.
311
312         * xml/XMLHttpRequestUpload.cpp:
313
314         * xml/XMLHttpRequest.idl:
315         * xml/XMLHttpRequestException.idl:
316         * xml/XMLHttpRequestProgressEvent.idl:
317         * xml/XMLHttpRequestUpload.idl:
318         Chnage to have the NoStaticTables attribute since they are used from XHR.
319
320 2009-03-01  Horia Olaru  <olaru@adobe.com>
321
322         Adding manual debugger test cases for bug.
323
324         https://bugs.webkit.org/show_bug.cgi?id=21073
325
326         Reviewed by Kevin McCullough.
327
328         * manual-tests/inspector/debugger-step-on-do-while-statements.html: Added.
329         * manual-tests/inspector/debugger-step-on-for-in-statements.html: Added.
330         * manual-tests/inspector/debugger-step-on-for-statements.html: Added.
331         * manual-tests/inspector/debugger-step-on-while-statements.html: Added.
332         * manual-tests/inspector/resources/loop-statements.js: Added.
333
334 2009-03-01  Dan Bernstein  <mitz@apple.com>
335
336         Reviewed by Darin Adler.
337
338         - fix <rdar://problem/6634768> Reproducible crash in RenderLayer::updateScrollCornerStyle() using full-page zoom at MobileMe Contacts
339
340         Test: fast/events/scroll-during-zoom-change.html
341
342         * dom/Document.cpp:
343         (WebCore::Document::recalcStyle): Pause scheduled events during style
344         reclaculation. Changes to the zoom property result in scroll events
345         being generated during style recalc, and those events need to be
346         deferred until the render tree is consistent.
347         * page/FrameView.cpp:
348         (WebCore::FrameView::layout): Changed to account for a case in which the
349         post-layout tasks trigger a nested layout, which reactivates the
350         post-layout task timer.
351
352 2009-03-01  Ross Boucher  <rboucher@gmail.com>
353
354         Alphabetically sort scripts in the Script's panel file popup menu.
355
356         https://bugs.webkit.org/show_bug.cgi?id=23395
357
358         Reviewed by Timothy Hatcher.
359
360         * inspector/front-end/ScriptsPanel.js:
361         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu):
362         * inspector/front-end/utilities.js:
363         (insertionIndexForObjectInListSortedByFunction):
364         (indexOfObjectInListSortedByFunction):
365
366 2009-03-01  Yael Aharon  <yael.aharon@nokia.com>
367
368         Pass securityOrigin->host() instead of securityOrigin->domain() to WebInspector
369         when creating databases, localStorage or sessionStorage. Changing document.domain
370         should have no affect on databases, localStorage and sessionStorage in Web Inspector.
371
372         https://bugs.webkit.org/show_bug.cgi?id=23844
373
374         Reviewed by Timothy Hatcher.
375
376         * inspector/InspectorController.cpp:
377         (WebCore::InspectorController::addDOMStorageScriptResource):
378         (WebCore::InspectorController::didUseDOMStorage):
379         * storage/Database.cpp:
380         (WebCore::Database::openDatabase):
381
382 2009-03-01  Gustavo Noronha Silva  <gns@gnome.org>
383
384         Reviewed by Holger Freyther.
385
386         Avoid leaking errors when reporting GIO errors.
387
388         * platform/network/soup/ResourceHandleSoup.cpp:
389         (WebCore::readCallback):
390         (WebCore::openCallback):
391         (WebCore::queryInfoCallback):
392
393 2009-03-01  Gustavo Noronha Silva  <gns@gnome.org>
394
395         Reviewed by Holger Freyther.
396
397         Fixes crash when the GIO backend is given the URI for a directory.
398
399         * platform/network/soup/ResourceHandleSoup.cpp:
400         (WebCore::networkErrorForFile):
401
402 2009-02-28  Dimitri Glazkov  <dglazkov@chromium.org>
403
404         Reviewed by Darin Fisher.
405
406         https://bugs.webkit.org/show_bug.cgi?id=24261
407         Fix V8 custom binding scrubbing error.
408
409         Test: fast/dom/TreeWalker/TreeWalker-currentNode.html
410         Test: traversal/exception-forwarding.html
411         TesT: traversal/stay-within-root.html
412
413         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
414         * bindings/v8/custom/V8NodeIteratorCustom.cpp:
415         (WebCore::toV8): Replace v8::Undefined() return value with v8::Null().
416         * bindings/v8/custom/V8TreeWalkerCustom.cpp:
417         (WebCore::toV8): Ditto.
418
419 2009-02-28  Dimitri Glazkov  <dglazkov@chromium.org>
420
421         Reviewed by Darin Fisher.
422
423         https://bugs.webkit.org/show_bug.cgi?id=24261
424         Fix V8 custom binding scrubbing error.
425
426         Test: fast/dom/CSSStyleDeclaration/css-properties-case-sensitive.html
427
428         * WebCore.xcodeproj/project.pbxproj:
429         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
430         (WebCore::cssPropertyName):  Remove dubious checks, left over from
431             incomplete conversion of parameter from pointer to pass-by-ref.
432         (WebCore::NAMED_PROPERTY_GETTER): Initialize parameter.
433         (WebCore::NAMED_PROPERTY_SETTER): Ditto.
434
435 2009-02-28  Xan Lopez  <xan@gnome.org>
436
437         Reviewed by Holger Freyther.
438
439         https://bugs.webkit.org/show_bug.cgi?id=24263
440         [GTK] ref ResourceHandle until we are finished with it
441
442         Add a ref to the ResourceHandle in startHttp so we can keep it
443         alive untill all callbacks have been executed, and unref it when
444         soup tells us it's done with the SoupMessage (in
445         finishedCallback). Fixes a number of crashes when calling
446         didReceiveData whould crash because of the handle dying.
447
448         * platform/network/soup/ResourceHandleSoup.cpp:
449         (WebCore::finishedCallback):
450         (WebCore::ResourceHandle::startHttp):
451
452 2009-02-28  Adam Bergkvist <adam.bergkvist@ericsson.com>
453
454         Reviewed by Alexey Proskuryakov.
455
456         https://bugs.webkit.org/show_bug.cgi?id=24226
457         [SOUP] HTTP status text is never set
458
459         Set HTTP status text to SoupMessage reason_phrase.
460
461         * platform/network/soup/ResourceHandleSoup.cpp:
462         (WebCore::fillResponseFromMessage):
463
464 2009-02-28  Dan Bernstein  <mitz@apple.com>
465
466         - fix malformed project file
467
468         * WebCore.xcodeproj/project.pbxproj:
469
470 2009-02-28  Dan Bernstein  <mitz@apple.com>
471
472         Reviewed by Oliver Hunt.
473
474         - fix https://bugs.webkit.org/show_bug.cgi?id=23848
475           <rdar://problem/6573250> REGRESSION: Crash when mouse cursor moves over a link on www.opportuno.de
476
477         Test: fast/layers/inline-dirty-z-order-lists.html
478
479         * rendering/RenderBox.cpp:
480         (WebCore::RenderBox::styleWillChange): Moved the code that dirties a
481         layer's and its stacking context's z-order lists when the layer's
482         z-index or visibility change from here...
483         * rendering/RenderBoxModelObject.cpp:
484         (WebCore::RenderBoxModelObject::styleWillChange): ...to here, so that
485         it will apply to RenderInline too.
486
487 2009-02-27  Alexey Proskuryakov  <ap@webkit.org>
488
489         Reviewed by David Hyatt.
490
491         Don't include TextResourceDecoder.h in Document.h
492
493         This undoes inlining of Document::displayStringModifiedByEncoding() to avoid world rebuilds
494         when TextResourceDecoder.h is modified. Performance impact is expected to be negligible.
495
496         * dom/Document.cpp:
497         (WebCore::Document::displayStringModifiedByEncoding):
498         (WebCore::Document::displayBufferModifiedByEncoding):
499         * dom/Document.h:
500         * WebCore.base.exp:
501
502 2009-02-27  Matt Pennig  <pennig@apple.com>
503
504         Reviewed by David Hyatt.
505
506         Resolves: https://bugs.webkit.org/show_bug.cgi?id=24107
507         "Fixed elements have 0 as an offsetLeft property"
508         
509         Code also brings offsetLeft/Top in full conformance with the spec.
510         Added two tests, one for fixed-position elements, and one for <html>.
511         
512         Tests: fast/dom/Element/fixed-position-offset-parent.html
513                fast/dom/Element/offsetLeft-offsetTop-html.html
514
515         * rendering/RenderBoxModelObject.cpp:
516         (WebCore::RenderBoxModelObject::offsetLeft):
517         (WebCore::RenderBoxModelObject::offsetTop):
518
519 2009-02-27  Dean Jackson  <dino@apple.com>
520
521         Reviewed by Simon Fraser.
522
523         renderer()->hasTransform() returns true for elements
524         with perspective, but no transform, so test for transform
525         when hit testing. This fixes ASSERT from
526         https://bugs.webkit.org/show_bug.cgi?id=24252
527
528         Test: transforms/no_transform_hit_testing.html
529
530         * rendering/RenderLayer.cpp:
531         (WebCore::RenderLayer::hitTestLayer):
532
533 2009-02-27  Dimitri Glazkov  <dglazkov@chromium.org>
534
535         Reviewed by Darin Fisher.
536
537         Fix scrubbing error -- a reversed condition.
538
539         * bindings/v8/ScriptValue.h:
540         (WebCore::ScriptValue::clear): Change early exit for empty value, not the opposite.
541
542 2009-02-27  Jian Li  <jianli@chromium.org>
543
544         Reviewed by Alexey Proskuryakov.
545
546         Add confirmMessageFromWorkerObject to WorkerObjectProxy.
547         https://bugs.webkit.org/show_bug.cgi?id=24152
548
549         * workers/WorkerMessagingProxy.cpp:
550         (WebCore::MessageWorkerContextTask::performTask):
551         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
552         * workers/WorkerMessagingProxy.h:
553         * workers/WorkerObjectProxy.h:
554
555 2009-02-27  Anders Carlsson  <andersca@apple.com>
556
557         Reviewed by David Hyatt.
558
559         Revert r41295, the fix for https://bugs.webkit.org/show_bug.cgi?id=24227 
560         because it leads to assertion failures in the Mac port.
561         
562         * platform/graphics/BitmapImage.cpp:
563         (WebCore::BitmapImage::BitmapImage):
564         * platform/graphics/BitmapImage.h:
565         (WebCore::BitmapImage::mayFillWithSolidColor):
566         * platform/graphics/Image.h:
567         (WebCore::Image::mayFillWithSolidColor):
568         * platform/graphics/cairo/ImageCairo.cpp:
569         (WebCore::BitmapImage::BitmapImage):
570         * platform/graphics/cg/ImageCG.cpp:
571         (WebCore::BitmapImage::BitmapImage):
572         (WebCore::BitmapImage::checkForSolidColor):
573         * platform/graphics/qt/ImageQt.cpp:
574         (WebCore::BitmapImage::checkForSolidColor):
575         * platform/graphics/skia/ImageSkia.cpp:
576         (WebCore::BitmapImage::checkForSolidColor):
577         * platform/graphics/wx/ImageWx.cpp:
578         (WebCore::BitmapImage::checkForSolidColor):
579
580 2009-02-27  Adam Barth  <abarth@webkit.org>
581
582         Reviewed by Eric Seidel.
583
584         https://bugs.webkit.org/show_bug.cgi?id=20249
585
586         Add a preference to allow universal access from local URLs to mitigate
587         some attacks.  Some clients still want to allow this access, so we
588         expose this as a preference.
589
590         * WebCore.base.exp:
591         * dom/Document.cpp:
592         (WebCore::Document::initSecurityContext):
593         * page/SecurityOrigin.cpp:
594         (WebCore::SecurityOrigin::SecurityOrigin):
595         * page/Settings.cpp:
596         (WebCore::Settings::Settings):
597         (WebCore::Settings::setAllowUniversalAccessFromFileUrls):
598         * page/Settings.h:
599         (WebCore::Settings::allowUniversalAccessFromFileUrls):
600
601 2009-02-27  Adam Treat  <adam.treat@torchmobile.com>
602
603         Reviewed by Eric Seidel.
604
605         https://bugs.webkit.org/show_bug.cgi?id=24229
606         If an image has no alpha channel there is no reason to use SourceOver.
607
608         * platform/graphics/qt/ImageQt.cpp:
609         (WebCore::Image::drawPattern):
610         (WebCore::BitmapImage::draw):
611
612 2009-02-27  Adam Treat  <adam.treat@torchmobile.com>
613
614         Reviewed by Eric Seidel and Simon Fraser.
615
616         https://bugs.webkit.org/show_bug.cgi?id=24227
617         Ensure that the checkForSolidColor() optimization is correctly triggered
618         for all cases of drawPattern.  Currently, the optimization was not triggered
619         when the check had not been previously performed via a request for the
620         image's NativeImagePtr.
621
622         Implement the Qt version of the checkForSolidColor() method.  Combined with
623         the bug fix this reduces the time it takes to draw a repeating background
624         of a 1x1 image from ~50msecs to ~0msecs on my machine.
625
626         * platform/graphics/BitmapImage.cpp:
627         (WebCore::BitmapImage::BitmapImage):
628         * platform/graphics/BitmapImage.h:
629         (WebCore::BitmapImage::mayFillWithSolidColor):
630         * platform/graphics/Image.h:
631         (WebCore::Image::mayFillWithSolidColor):
632         * platform/graphics/cairo/ImageCairo.cpp:
633         (WebCore::BitmapImage::BitmapImage):
634         * platform/graphics/cg/ImageCG.cpp:
635         (WebCore::BitmapImage::BitmapImage):
636         (WebCore::BitmapImage::checkForSolidColor):
637         * platform/graphics/qt/ImageQt.cpp:
638         (WebCore::BitmapImage::checkForSolidColor):
639         * platform/graphics/skia/ImageSkia.cpp:
640         (WebCore::BitmapImage::checkForSolidColor):
641         * platform/graphics/wx/ImageWx.cpp:
642         (WebCore::BitmapImage::checkForSolidColor):
643
644 2009-02-27  Dirk Schulze  <krit@webkit.org>
645
646         Reviewed by Zack Rusin.
647
648         Added support for gradients and pattern on Fonts for Qt.
649
650         [Qt] gradients and patterns for FontQt
651         https://bugs.webkit.org/show_bug.cgi?id=24243
652
653         * platform/graphics/qt/FontQt.cpp:
654         (WebCore::Font::drawComplexText):
655
656 2009-02-27  Jian Li  <jianli@chromium.org>
657
658         Reviewed by Alexey Proskuryakov.
659
660         WorkerContextProxy::create in WorkerMessagingProxy.cpp should only be provided for non-Chromium platform.
661         https://bugs.webkit.org/show_bug.cgi?id=24113
662
663         * workers/WorkerMessagingProxy.cpp:
664
665 2009-02-27  Yael Aharon  <yael.aharon@nokia.com>
666
667         Added a refresh button to storage views.
668
669         https://bugs.webkit.org/show_bug.cgi?id=24040
670
671         Reviewed by Timothy Hatcher.
672
673         * inspector/front-end/DOMStorageItemsView.js:
674         (WebInspector.DOMStorageItemsView):
675         (WebInspector.DOMStorageItemsView.prototype.get statusBarItems):
676         (WebInspector.DOMStorageItemsView.prototype.update):
677         (WebInspector.DOMStorageItemsView.prototype._refreshButtonClicked):
678         * inspector/front-end/DatabaseTableView.js:
679         (WebInspector.DatabaseTableView):
680         (WebInspector.DatabaseTableView.prototype.get statusBarItems):
681         (WebInspector.DatabaseTableView.prototype._refreshButtonClicked):
682         * inspector/front-end/DatabasesPanel.js:
683         (WebInspector.DatabasesPanel):
684         (WebInspector.DatabasesPanel.prototype.get statusBarItems):
685         (WebInspector.DatabasesPanel.prototype.reset):
686         (WebInspector.DatabasesPanel.prototype.showDatabase):
687         (WebInspector.DatabasesPanel.prototype.showDOMStorage):
688         (WebInspector.DatabasesPanel.prototype._updateSidebarWidth):
689         * inspector/front-end/inspector.css:
690
691 2009-02-27  Yael Aharon  <yael.aharon@nokia.com>
692
693         Added support for editing/deleting localStorage and sessionStorage items
694         directly from Web Inspector.
695
696         https://bugs.webkit.org/show_bug.cgi?id=23866.
697
698         Reviewed by Timothy Hatcher.
699
700         * WebCore.vcproj/WebCore.vcproj:
701         * inspector/front-end/DOMStorageDataGrid.js: Added.
702         (WebInspector.DOMStorageDataGrid):
703         (WebInspector.DOMStorageDataGrid.prototype._ondblclick):
704         (WebInspector.DOMStorageDataGrid.prototype._startEditing):
705         (WebInspector.DOMStorageDataGrid.prototype._editingCommitted):
706         (WebInspector.DOMStorageDataGrid.prototype._editingCancelled):
707         (WebInspector.DOMStorageDataGrid.prototype.deleteSelectedRow):
708         * inspector/front-end/DOMStorageItemsView.js:
709         (WebInspector.DOMStorageItemsView):
710         (WebInspector.DOMStorageItemsView.prototype.get statusBarItems):
711         (WebInspector.DOMStorageItemsView.prototype.hide):
712         (WebInspector.DOMStorageItemsView.prototype.update):
713         (WebInspector.DOMStorageItemsView.prototype._deleteButtonClicked):
714         * inspector/front-end/DatabasesPanel.js:
715         (WebInspector.DatabasesPanel):
716         (WebInspector.DatabasesPanel.prototype.get statusBarItems):
717         (WebInspector.DatabasesPanel.prototype.reset):
718         (WebInspector.DatabasesPanel.prototype.showDOMStorage):
719         (WebInspector.DatabasesPanel.prototype.dataGridForDOMStorage):
720         (WebInspector.DatabasesPanel.prototype._updateSidebarWidth):
721         * inspector/front-end/WebKit.qrc:
722         * inspector/front-end/inspector.css:
723         * inspector/front-end/inspector.html:
724
725 2009-02-26  Brett Wilson  <brettw@chromium.org>
726
727         Fix Windows transparency for the Chromium port. Implement a helper
728         class for handling transparency on Windows. It allows semitransparent
729         ClearType and semitransparent form controls by making new layers in the
730         background.
731
732         It also replaces the "ThemeHelper" which allows better
733         scaling and transforms on Windows form controls. In addition to the
734         functionality that the ThemeHelper did, but additionally handles the
735         antialiasing properly so that the form controls aren't composited on a
736         white square.
737
738         https://bugs.webkit.org/show_bug.cgi?id=24101
739
740         Reviewed by Eric Seidel.
741
742         * platform/graphics/chromium/FontChromiumWin.cpp:
743         (WebCore::):
744         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter):
745         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI):
746         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
747         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::drawGlyphs):
748         (WebCore::Font::drawGlyphs):
749         * platform/graphics/chromium/ThemeHelperChromiumWin.cpp:
750         * platform/graphics/chromium/ThemeHelperChromiumWin.h:
751         * platform/graphics/chromium/TransparencyWin.cpp: Added.
752         (WebCore::):
753         (WebCore::TransparencyWin::OwnedBuffers::OwnedBuffers):
754         (WebCore::TransparencyWin::OwnedBuffers::destBitmap):
755         (WebCore::TransparencyWin::OwnedBuffers::referenceBitmap):
756         (WebCore::TransparencyWin::OwnedBuffers::canHandleSize):
757         (WebCore::TransparencyWin::TransparencyWin):
758         (WebCore::TransparencyWin::~TransparencyWin):
759         (WebCore::TransparencyWin::init):
760         (WebCore::TransparencyWin::computeLayerSize):
761         (WebCore::TransparencyWin::setupLayer):
762         (WebCore::TransparencyWin::setupLayerForNoLayer):
763         (WebCore::TransparencyWin::setupLayerForOpaqueCompositeLayer):
764         (WebCore::TransparencyWin::setupLayerForTextComposite):
765         (WebCore::TransparencyWin::setupLayerForWhiteLayer):
766         (WebCore::TransparencyWin::setupTransform):
767         (WebCore::TransparencyWin::setupTransformForKeepTransform):
768         (WebCore::TransparencyWin::setupTransformForUntransform):
769         (WebCore::TransparencyWin::setupTransformForScaleTransform):
770         (WebCore::TransparencyWin::setTextCompositeColor):
771         (WebCore::TransparencyWin::initializeNewContext):
772         (WebCore::TransparencyWin::compositeOpaqueComposite):
773         (WebCore::TransparencyWin::compositeTextComposite):
774         (WebCore::TransparencyWin::makeLayerOpaque):
775         * platform/graphics/chromium/TransparencyWin.h: Added.
776         (WebCore::TransparencyWin::):
777         (WebCore::TransparencyWin::context):
778         (WebCore::TransparencyWin::platformContext):
779         (WebCore::TransparencyWin::drawRect):
780         * platform/graphics/skia/GraphicsContextSkia.cpp:
781         (WebCore::GraphicsContext::endTransparencyLayer):
782         * platform/graphics/skia/ImageSkia.cpp:
783         (WebCore::paintSkBitmap):
784         * rendering/RenderThemeChromiumWin.cpp:
785         (WebCore::):
786         (WebCore::RenderThemeChromiumWin::paintButton):
787         (WebCore::RenderThemeChromiumWin::paintMenuList):
788         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
789
790 2009-02-27  Dimitri Glazkov  <dglazkov@chromium.org>
791
792         Reviewed by Eric Seidel.
793
794         https://bugs.webkit.org/show_bug.cgi?id=24211
795         Add ScheduledAction for V8.
796
797         * bindings/v8/ScheduledAction.cpp: Added.
798         (WebCore::ScheduledAction::ScheduledAction):
799         (WebCore::ScheduledAction::~ScheduledAction):
800         (WebCore::ScheduledAction::execute):
801         * bindings/v8/ScheduledAction.h: Added.
802         (WebCore::ScheduledAction::ScheduledAction):
803
804 2009-02-27  Zack Rusin  <zack@kde.org>
805
806         Reviewed by Nikolas Zimmermann.
807
808         Qt: be more reasonable about scrolled lines
809
810         cMouseWheelPixelsPerLineStep is currently a constant set to 13.3. it doesn't
811         match our metrics meaning that Qt scrolls by ~2 lines by default which is quite
812         irritating. so lets scroll vertically by the Qt set number of lines * Qt default
813         single step scroll
814
815         * platform/qt/WheelEventQt.cpp:
816
817 2009-02-27  Xan Lopez  <xan@gnome.org>
818
819         Rubber-stamped by Alexey Proskuryakov.
820
821         https://bugs.webkit.org/show_bug.cgi?id=24222
822         [GTK] Remove checks for old glib versions
823
824         libsoup, which is a hard dependency, needs at least glib 2.15.3,
825         so remove all glib checks for versions older than that.
826
827         * platform/gtk/ContextMenuGtk.cpp:
828         (WebCore::ContextMenu::ContextMenu):
829         * platform/gtk/ContextMenuItemGtk.cpp:
830         (WebCore::ContextMenuItem::setSubMenu):
831         * platform/gtk/PopupMenuGtk.cpp:
832         (WebCore::PopupMenu::show):
833         * platform/gtk/WidgetGtk.cpp:
834         (WebCore::Widget::retainPlatformWidget):
835         * platform/network/soup/ResourceHandleSoup.cpp:
836
837 2009-02-26  Dirk Schulze  <krit@webkit.org>
838
839         Reviewed by Oliver Hunt.
840
841         Added support for Gradients and Patterns on filled or stroked Fonts
842         in Cairo. I also added support for globalAlpha on FontCairo.
843
844         [CAIRO] SVG/Canvas fonts miss gradients/pattern support
845         https://bugs.webkit.org/show_bug.cgi?id=18617
846
847         * html/CanvasRenderingContext2D.cpp:
848         (WebCore::CanvasRenderingContext2D::drawTextInternal):
849         * platform/graphics/cairo/FontCairo.cpp:
850         (WebCore::Font::drawGlyphs):
851
852 2009-02-26  Stephen White  <senorblanco@chromium.org>
853
854         Reviewed by Eric Seidel.
855
856         https://bugs.webkit.org/show_bug.cgi?id=23957
857
858         Fix for SVG gradient and pattern text for Chromium/skia. 
859         Added accessors for the fill and stroke gradients to
860         GraphicsContext.  Changed the paintSkiaText function to take a
861         GraphicsContext, so we can check for gradients/patterns. 
862         Changed the skiaDrawText function to set the SkPaint shader
863         correctly, and to scale up the gradient shader matrix to
864         encompass the entire text string.  Also offset each glyph
865         separately, rather than transforming the canvas, so that the
866         gradient/pattern stays fixed relative to the text origin.
867
868         * platform/graphics/GraphicsContext.cpp:
869         (WebCore::GraphicsContext::getFillGradient):
870         (WebCore::GraphicsContext::getStrokeGradient):
871         (WebCore::GraphicsContext::getFillPattern):
872         (WebCore::GraphicsContext::getStrokePattern):
873         * platform/graphics/GraphicsContext.h:
874         * platform/graphics/chromium/FontChromiumWin.cpp:
875         (WebCore::Font::drawGlyphs):
876         * platform/graphics/chromium/UniscribeHelper.cpp:
877         (WebCore::UniscribeHelper::draw):
878         * platform/graphics/skia/SkiaFontWin.cpp:
879         (WebCore::windowsCanHandleTextDrawing):
880         (WebCore::skiaDrawText):
881         (WebCore::paintSkiaText):
882         * platform/graphics/skia/SkiaFontWin.h:
883
884 2009-02-26  Dimitri Glazkov  <dglazkov@chromium.org>
885
886         Reviewed by Eric Seidel.
887
888         https://bugs.webkit.org/show_bug.cgi?id=24208
889         Add custom V8 bindings for Navigator, Clipboard, Document, and Node.
890
891         * bindings/v8/custom/V8ClipboardCustom.cpp: Added.
892         (WebCore::ACCESSOR_GETTER):
893         (WebCore::CALLBACK_FUNC_DECL):
894         * bindings/v8/custom/V8DocumentCustom.cpp: Added.
895         (WebCore::CALLBACK_FUNC_DECL):
896         * bindings/v8/custom/V8NavigatorCustom.cpp: Added.
897         (WebCore::ACCESSOR_GETTER):
898         * bindings/v8/custom/V8NodeCustom.cpp: Added.
899         (WebCore::CALLBACK_FUNC_DECL):
900
901 2009-02-26  Gustavo Noronha Silva  <gns@gnome.org>
902
903         Unreviewed build fix for building with GNOME Keyring enabled.
904
905         * platform/network/soup/webkit-soup-auth-dialog.c:
906         (show_auth_dialog):
907
908 2009-02-26  Xan Lopez  <xan@gnome.org>
909
910         Reviewed by Holger Freyther.
911
912         https://bugs.webkit.org/show_bug.cgi?id=16947
913         [GTK] Missing HTTP Auth challenge
914
915         Add HTTP authentication dialog with optional GNOME Keyring
916         storage.
917
918         * GNUmakefile.am:
919         * platform/network/ResourceHandleInternal.h:
920         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
921         * platform/network/soup/ResourceHandleSoup.cpp:
922         (WebCore::currentToplevelCallback):
923         (WebCore::ResourceHandle::startHttp):
924         (WebCore::ResourceHandle::start):
925         * platform/network/soup/webkit-soup-auth-dialog.c: Added.
926         (webkit_soup_auth_dialog_class_init):
927         (webkit_soup_auth_dialog_init):
928         (webkit_soup_auth_dialog_session_feature_init):
929         (free_authData):
930         (set_password_callback):
931         (response_callback):
932         (show_auth_dialog):
933         (find_password_callback):
934         (session_authenticate):
935         (attach):
936         * platform/network/soup/webkit-soup-auth-dialog.h: Added.
937
938 2009-02-25  Ojan Vafai  <ojan@chromium.org> and Eric Seidel <eric@webkit.org>
939
940         Reviewed by Dave Hyatt.
941
942         After Ojan's positionForCoordinates fix http://trac.webkit.org/changeset/41191
943         svg/custom/pointer-events-image.svg and svg/custom/pointer-events-text.svg
944         started failing because Ojan's new code was now *correctly* calling through to
945         SVG asking for the closest text offset in the last line box, instead of
946         just returning the offset at the end of the last line box when clicking below a box.
947
948         But!  The SVG code was wrong, in that it returned the character offset of the last
949         character when you asked for a character offset after the end of the box, instead
950         it should return the offset *after* the last character.  This patch fixes
951         that behavior by reordering the last two clauses in svgCharacterHitsPosition.
952
953         The SVG positionForCoordinates function is still wrong, and I've added some FIXMEs
954         to document what's wrong.  I've also cleaned up the code a bit so it's clearer
955         what it is doing (which also makes more obvious what's wrong with it).
956
957         * rendering/RenderSVGInlineText.cpp:
958         (WebCore::RenderSVGInlineText::positionForCoordinates):
959         * rendering/SVGInlineTextBox.cpp:
960         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::SVGInlineTextBoxClosestCharacterToPositionWalker):
961         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::chunkPortionCallback):
962         (WebCore::SVGInlineTextBoxClosestCharacterToPositionWalker::offsetOfHitCharacter):
963         (WebCore::SVGInlineTextBox::closestCharacterToPosition):
964         (WebCore::SVGInlineTextBox::svgCharacterHitsPosition):
965
966 2009-02-26  Darin Fisher  <darin@chromium.org>
967
968         Reviewed by Eric Seidel.
969
970         Minor cleanup of ChromiumBridge:
971         Removing unused matchesMIMEType method and s/Javascript/JavaScript/
972
973         * platform/chromium/ChromiumBridge.h:
974         * platform/chromium/MimeTypeRegistryChromium.cpp:
975         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
976         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
977         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
978
979 2009-02-26  David Hyatt  <hyatt@apple.com>
980
981         Reviewed by Sam Weinig
982
983         Fix text-bottom vertical alignment.  It was incorrectly aligning the bottom of the descent instead of including
984         the line-height below the descent.
985
986         Added fast/inline/vertical-align-text-bottom.html
987
988         * rendering/RenderBoxModelObject.cpp:
989         (WebCore::RenderBoxModelObject::verticalPosition):
990
991 2009-02-26  Dirk Schulze  <krit@webkit.org>
992
993         Reviewed by Eric Seidel.
994
995         Make SVG Masking platform independet with the use of ImageBuffer::getImageData(),
996         ImageBuffer::putImageData() and GraphicsContext::clipToImageBuffer(). Every platform has
997         just to implement this three methods to support SVG Masking now.
998  
999         Make SVG Masking platform aware
1000         https://bugs.webkit.org/show_bug.cgi?id=19243
1001
1002         * GNUmakefile.am:
1003         * WebCore.pro:
1004         * WebCore.vcproj/WebCore.vcproj:
1005         * WebCore.xcodeproj/project.pbxproj:
1006         * svg/graphics/SVGResourceMasker.cpp:
1007         (WebCore::SVGResourceMasker::applyMask):
1008         * svg/graphics/cairo/SVGResourceMaskerCairo.cpp: Removed.
1009         * svg/graphics/cg/SVGResourceMaskerCg.cpp: Removed.
1010         * svg/graphics/cg/SVGResourceMaskerCg.mm: Removed.
1011         * svg/graphics/qt/SVGResourceMaskerQt.cpp: Removed.
1012         * svg/graphics/skia/SVGResourceMaskerSkia.cpp: Removed.
1013
1014 2009-02-26  Yong Li  <yong.li@torchmobile.com>
1015
1016         Reviewed by Darin Adler, Antti Koivisto and Alexey Proskuryakov.
1017
1018         Test: http/tests/misc/slow-preload-cancel.html
1019
1020         https://bugs.webkit.org/show_bug.cgi?id=24133
1021         Clear all pending preloads in the DocLoader object when we decide to
1022         cancel its all requests.
1023
1024         * loader/DocLoader.cpp:
1025         (WebCore::DocLoader::clearPendingPreloads):
1026         * loader/DocLoader.h:
1027         * loader/loader.cpp:
1028         (WebCore::Loader::cancelRequests):
1029
1030 2009-02-26  Dimitri Glazkov  <dglazkov@chromium.org>
1031
1032         Reviewed by Eric Seidel.
1033
1034         https://bugs.webkit.org/show_bug.cgi?id=24182
1035         Add NodeFilter, NodeIterator, and TreeWalker custom V8 bindings.
1036
1037         * bindings/v8/custom/V8NodeFilterCustom.cpp: Added.
1038         (WebCore::CALLBACK_FUNC_DECL):
1039         * bindings/v8/custom/V8NodeIteratorCustom.cpp: Added.
1040         (WebCore::toV8):
1041         (WebCore::CALLBACK_FUNC_DECL):
1042         * bindings/v8/custom/V8TreeWalkerCustom.cpp: Added.
1043         (WebCore::toV8):
1044         (WebCore::CALLBACK_FUNC_DECL):
1045
1046 2009-02-26  Alexey Proskuryakov  <ap@webkit.org>
1047
1048         Reviewed by Darin Adler.
1049
1050         https://bugs.webkit.org/show_bug.cgi?id=23500
1051         KURL::parse() incorrectly compares its result to original string
1052
1053         * platform/KURL.cpp: (WebCore::KURL::parse): Take string length into account.
1054
1055 2009-02-26  Ojan Vafai  <ojan@chromium.org>
1056
1057         Reviewed by Kevin McCullough.
1058
1059         Manual test for inspector node highlighting.
1060
1061         * manual-tests/inspector/highlight-nodes.html: Added.
1062
1063 2009-02-16  Anantanarayanan Iyengar  <ananta@chromium.org>
1064
1065         Reviewed by Darin Fisher.
1066
1067         https://bugs.webkit.org/show_bug.cgi?id=23973
1068         ScrollView::scrollContents can be invoked during view shutdown.  In
1069         this scenario the FrameView::hostWindow method can return NULL, which
1070         indicates that the frame/page is being destroyed. This causes a crash
1071         when we try to dereference a NULL hostWindow pointer.  Fix is to add a
1072         NULL check for this.  
1073
1074         * platform/ScrollView.cpp:
1075         (WebCore::ScrollView::scrollContents):
1076
1077 2009-02-26  Rahul Kuchhal  <kuchhal@chromium.org>
1078
1079         Reviewed by Dave Hyatt.
1080
1081         https://bugs.webkit.org/show_bug.cgi?id=24003
1082         Fix a crash caused by unsafe type conversion.
1083
1084         Test: fast/block/positioning/absolute-in-inline-rtl-4.html
1085
1086         * rendering/RenderBox.cpp:
1087         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
1088
1089 2009-02-26  Ojan Vafai  <ojan@chromium.org>
1090
1091         Reviewed by Adam Roben.
1092
1093         https://bugs.webkit.org/show_bug.cgi?id=24202
1094         Have drawNodeHighlight clip instead of clearing. This makes it work for
1095         both Safari and Chromium since Chromium draws the inspector highlighting
1096         in the same buffer as the page.
1097
1098         * inspector/InspectorController.cpp:
1099         (WebCore::quadToPath):
1100         (WebCore::drawOutlinedQuad):
1101         (WebCore::drawOutlinedQuadWithClip):
1102         (WebCore::drawHighlightForBox):
1103
1104 2009-02-26  David Hyatt  <hyatt@apple.com>
1105
1106         Reviewed by Dan Bernstein & Darin Adler
1107
1108         Make sure the border/padding are properly omitted at the start of an inline that is a continuation.
1109         
1110         Added fast/inline/inline-continuation-borders.html
1111
1112         * rendering/InlineFlowBox.cpp:
1113         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
1114
1115 2009-02-26  Simon Fraser  <simon.fraser@apple.com>
1116
1117         Build fix, no review.
1118         
1119         Try to fix the wx build after r41218.
1120
1121         * WebCoreSources.bkl:
1122
1123 2009-02-26  Alexey Proskuryakov  <ap@webkit.org>
1124
1125         Reviewed by Darin Adler.
1126
1127         https://bugs.webkit.org/show_bug.cgi?id=19527
1128         ASSERTION FAILED: containerA && containerB
1129
1130         Test: fast/dom/Range/bug-19527.html
1131
1132         * dom/Range.cpp:
1133         (WebCore::Range::isPointInRange):
1134         (WebCore::Range::comparePoint):
1135         Bring the behavior in line with current Firefox, making it impossible for these methods
1136         to pass a null container to compareBoundaryPoints().
1137
1138 2009-02-26  Jonathon Jongsma  <jonathon@quotidian.org>
1139
1140         Reviewed by Holger Freyther.
1141
1142         https://bugs.webkit.org/show_bug.cgi?id=20358
1143
1144         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
1145         (WebCore::SimpleFontData::smallCapsFontData): the small-caps font data
1146         should set the computed size rather than the specified size, otherwise
1147         the caps just get rendered normal size.
1148
1149 2009-02-26  Benjamin Meyer  <benjamin.meyer@torchmobile.com>
1150
1151         Reviewed by George Staikos.
1152
1153         https://bugs.webkit.org/show_bug.cgi?id=24062
1154         QNetworkCookieJar expects the url and not the policy url.  Sending the
1155         policy url will cause QNetworkCookieJar to behave incorrectly.  One
1156         example would be a cookie that does not have a path or domain.
1157         QNetworkCookieJar will use the url it is given to fill in default values.
1158         This allows setting cookies on the url of the main frame from an iFrame
1159         when the cookie should be set on the url of the iFrame.
1160
1161         Originally noticed on http://writer.zoho.com/jsp/home.jsp?serviceurl=/index.do
1162
1163         * platform/qt/CookieJarQt.cpp:
1164         (WebCore::setCookies):
1165
1166 2009-02-26  Charles Wei  <charles.wei@torchmobile.com.cn>
1167
1168         Reviewed by George Staikos.
1169
1170         make WebKit/Qt compile with SVG disabled
1171
1172         * WebCore.pro:
1173         * platform/graphics/qt/FontPlatformDataQt.cpp:
1174
1175 2009-02-25  Gustavo Noronha Silva  <gns@gnome.org>
1176
1177         Unreviewed build fix. Add WebCore/workers to the list of paths
1178         searched by the bindings generator perl script.
1179
1180         * GNUmakefile.am:
1181
1182 2009-02-25  Sam Weinig  <sam@webkit.org>
1183
1184         Reviewed by Geoffrey Garen.
1185
1186         Add canvas to the list of RenderObjects that can mark a page as
1187         visually not empty.
1188
1189         * rendering/RenderHTMLCanvas.cpp:
1190         (WebCore::RenderHTMLCanvas::RenderHTMLCanvas):
1191
1192 2009-02-25  Eric Carlson  <eric.carlson@apple.com>
1193
1194         Reviewed by Dave Hyatt.
1195
1196         * rendering/RenderBox.cpp:
1197         (WebCore::RenderBox::nodeAtPoint): Remove assertion fired when child has layer
1198         as RenderMedia with controls always has a layer.
1199
1200 2009-02-25  Dan Bernstein  <mitz@apple.com>
1201
1202         Reviewed by Simon Fraser.
1203
1204         - fix https://bugs.webkit.org/show_bug.cgi?id=24130
1205           <rdar://problem/6618196> Paint very slow when horizontally resizing
1206
1207         Test: fast/gradients/background-clipped.html
1208
1209         * rendering/RenderBoxModelObject.cpp:
1210         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Intersect the
1211         destination rectangle passed to drawTiledImage() with the dirty
1212         rectangle. This makes it more likely for the destination rect to be
1213         contained in a single tile rect, which results in a faster code path
1214         being taken down the road (just drawing a single tile instead of
1215         tiling).
1216
1217 2009-02-25  Ojan Vafai  <ojan@chromium.org>
1218
1219         Reviewed by Eric Seidel.
1220
1221         Fix test regressions from positionForCoordinates patch.
1222         https://bugs.webkit.org/show_bug.cgi?id=24148
1223
1224         * rendering/RenderBlock.cpp:
1225         (WebCore::positionForPointWithInlineChildren):
1226         Remove ASSERT that placeholder text codepath is hitting.
1227
1228 2009-02-25  Chris Fleizach  <cfleizach@apple.com>
1229
1230         Reviewed by Beth Dakin.
1231
1232         Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
1233         https://bugs.webkit.org/show_bug.cgi?id=24143
1234
1235         When an AX object is marked dirty, do not create AX elements while going up the parent chain.
1236         Do not allow AXRenderObjects to remove their own IDs from the cache, all the cache to do that work
1237         Make sure the AXObjectWrapper's have an object before calling them
1238         In AXObjectCache, change get -> getOrCreate. Use get() to only retrieve an element if it exists
1239
1240         Test: platform/mac-snowleopard/accessibility/table-updating.html
1241
1242         * WebCore.base.exp:
1243         * page/AXObjectCache.cpp:
1244         (WebCore::AXObjectCache::~AXObjectCache):
1245         (WebCore::AXObjectCache::get):
1246         (WebCore::AXObjectCache::getOrCreate):
1247         (WebCore::AXObjectCache::removeAXID):
1248         (WebCore::AXObjectCache::handleActiveDescendantChanged):
1249         (WebCore::AXObjectCache::handleAriaRoleChanged):
1250         * page/AXObjectCache.h:
1251         * page/AccessibilityImageMapLink.cpp:
1252         (WebCore::AccessibilityImageMapLink::parentObject):
1253         * page/AccessibilityListBox.cpp:
1254         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
1255         (WebCore::AccessibilityListBox::doAccessibilityHitTest):
1256         * page/AccessibilityListBoxOption.cpp:
1257         (WebCore::AccessibilityListBoxOption::elementRect):
1258         (WebCore::AccessibilityListBoxOption::parentObject):
1259         * page/AccessibilityObject.cpp:
1260         (WebCore::AccessibilityObject::detach):
1261         (WebCore::AccessibilityObject::parentObjectIfExists):
1262         (WebCore::replacedNodeNeedsCharacter):
1263         (WebCore::AccessibilityObject::accessibilityObjectForPosition):
1264         * page/AccessibilityObject.h:
1265         * page/AccessibilityRenderObject.cpp:
1266         (WebCore::AccessibilityRenderObject::firstChild):
1267         (WebCore::AccessibilityRenderObject::lastChild):
1268         (WebCore::AccessibilityRenderObject::previousSibling):
1269         (WebCore::AccessibilityRenderObject::nextSibling):
1270         (WebCore::AccessibilityRenderObject::parentObjectIfExists):
1271         (WebCore::AccessibilityRenderObject::parentObject):
1272         (WebCore::AccessibilityRenderObject::isAttachment):
1273         (WebCore::AccessibilityRenderObject::headingLevel):
1274         (WebCore::AccessibilityRenderObject::anchorElement):
1275         (WebCore::AccessibilityRenderObject::menuForMenuButton):
1276         (WebCore::AccessibilityRenderObject::menuButtonForMenu):
1277         (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
1278         (WebCore::AccessibilityRenderObject::internalLinkElement):
1279         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
1280         (WebCore::AccessibilityRenderObject::titleUIElement):
1281         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1282         (WebCore::AccessibilityRenderObject::accessibilityParentForImageMap):
1283         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1284         (WebCore::AccessibilityRenderObject::doAccessibilityHitTest):
1285         (WebCore::AccessibilityRenderObject::focusedUIElement):
1286         (WebCore::AccessibilityRenderObject::activeDescendant):
1287         (WebCore::AccessibilityRenderObject::observableObject):
1288         (WebCore::AccessibilityRenderObject::childrenChanged):
1289         (WebCore::AccessibilityRenderObject::addChildren):
1290         * page/AccessibilityRenderObject.h:
1291         (WebCore::AccessibilityRenderObject::setRenderObject):
1292         * page/AccessibilityTable.cpp:
1293         (WebCore::AccessibilityTable::addChildren):
1294         (WebCore::AccessibilityTable::headerContainer):
1295         (WebCore::AccessibilityTable::cellForColumnAndRow):
1296         * page/AccessibilityTableCell.cpp:
1297         (WebCore::AccessibilityTableCell::isTableCell):
1298         (WebCore::AccessibilityTableCell::titleUIElement):
1299         * page/AccessibilityTableColumn.cpp:
1300         (WebCore::AccessibilityTableColumn::headerObjectForSection):
1301         * page/AccessibilityTableRow.cpp:
1302         (WebCore::AccessibilityTableRow::isTableRow):
1303         * page/gtk/AccessibilityObjectWrapperAtk.cpp:
1304         * page/mac/AXObjectCacheMac.mm:
1305         (WebCore::AXObjectCache::postNotification):
1306         (WebCore::AXObjectCache::postNotificationToElement):
1307         * page/mac/AccessibilityObjectWrapper.mm:
1308         (textMarkerForVisiblePosition):
1309         (AXLinkElementForNode):
1310         (nsStringForReplacedNode):
1311         (-[AccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
1312         (-[AccessibilityObjectWrapper accessibilityActionNames]):
1313         (-[AccessibilityObjectWrapper accessibilityAttributeNames]):
1314         (-[AccessibilityObjectWrapper accessibilityFocusedUIElement]):
1315         (-[AccessibilityObjectWrapper accessibilityHitTest:]):
1316         (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
1317         (-[AccessibilityObjectWrapper accessibilityIsIgnored]):
1318         (-[AccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
1319         (-[AccessibilityObjectWrapper accessibilityPerformPressAction]):
1320         (-[AccessibilityObjectWrapper accessibilityPerformAction:]):
1321         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1322         (-[AccessibilityObjectWrapper _accessibilityParentForSubview:]):
1323         (-[AccessibilityObjectWrapper accessibilityIndexOfChild:]):
1324         (-[AccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
1325         (-[AccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
1326
1327 2009-02-25  Beth Dakin  <bdakin@apple.com>
1328
1329         Reviewed by Geoff Garen.
1330
1331         Re-working of <rdar://problem/6487249> repro crash in 
1332         WebCore::CSSParser::parseFillImage copying entire contents of this 
1333         page
1334         -and corresponding: https://bugs.webkit.org/show_bug.cgi?id=24172
1335
1336         Fixes a bunch of layout test failures I caused!
1337
1338         * css/CSSParser.cpp:
1339         (WebCore::CSSParser::parseValue):
1340         (WebCore::CSSParser::parseContent):
1341         (WebCore::CSSParser::parseFillImage):
1342         (WebCore::CSSParser::parseFontFaceSrc):
1343         (WebCore::CSSParser::parseBorderImage):
1344
1345 2009-02-25  Dimitri Glazkov  <dglazkov@chromium.org>
1346
1347         Reviewed by Eric Seidel.
1348
1349         https://bugs.webkit.org/show_bug.cgi?id=24174
1350         Add more V8 custom bindings.
1351
1352         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: Added.
1353         (WebCore::hasCSSPropertyNamePrefix):
1354         (WebCore::cssPropertyName):
1355         (WebCore::NAMED_PROPERTY_GETTER):
1356         (WebCore::NAMED_PROPERTY_SETTER):
1357         * bindings/v8/custom/V8DOMStringListCustom.cpp: Added.
1358         (WebCore::INDEXED_PROPERTY_GETTER):
1359         (WebCore::CALLBACK_FUNC_DECL):
1360         * bindings/v8/custom/V8EventCustom.cpp: Added.
1361         (WebCore::ACCESSOR_SETTER):
1362         (WebCore::ACCESSOR_GETTER):
1363         * bindings/v8/custom/V8HTMLDocumentCustom.cpp: Added.
1364         (WebCore::NAMED_PROPERTY_DELETER):
1365         (WebCore::NAMED_PROPERTY_SETTER):
1366         (WebCore::NAMED_PROPERTY_GETTER):
1367         * bindings/v8/custom/V8HTMLFrameSetElementCustom.cpp: Added.
1368         (WebCore::NAMED_PROPERTY_GETTER):
1369         * bindings/v8/custom/V8NamedNodeMapCustom.cpp: Added.
1370         (WebCore::INDEXED_PROPERTY_GETTER):
1371         (WebCore::NAMED_PROPERTY_GETTER):
1372         * bindings/v8/custom/V8NodeListCustom.cpp: Added.
1373         (WebCore::NAMED_PROPERTY_GETTER):
1374         * bindings/v8/custom/V8StyleSheetListCustom.cpp: Added.
1375         (WebCore::NAMED_PROPERTY_GETTER):
1376
1377 2009-02-25  Scott Violet  <sky@google.com>
1378
1379         Reviewed by Dave Hyatt.
1380
1381         https://bugs.webkit.org/show_bug.cgi?id=24171
1382         Provides a RenderTheme method for getting the scroll bar size and
1383         changes RenderListBox to use it. RenderTheme returns a size of regular,
1384         and Mac's override to return small. Changes ScrollbarThemeChromium to
1385         use the scrollbarsize of the scrollbar when getting the size
1386         instead of passing in no-args.
1387
1388         * platform/chromium/ScrollbarThemeChromium.cpp:
1389         (WebCore::ScrollbarThemeChromium::trackRect):
1390         (WebCore::ScrollbarThemeChromium::buttonSize):
1391         * rendering/RenderListBox.cpp:
1392         (WebCore::RenderListBox::createScrollbar):
1393         * rendering/RenderTheme.h:
1394         (WebCore::RenderTheme::scrollbarControlSizeForPart):
1395         * rendering/RenderThemeChromiumMac.h:
1396         (WebCore::RenderThemeChromiumMac::scrollbarControlSizeForPart):
1397         * rendering/RenderThemeMac.h:
1398         (WebCore::RenderThemeMac::scrollbarControlSizeForPart):
1399
1400 2009-02-25  Beth Dakin  <bdakin@apple.com>
1401
1402         Reviewed by Darin Adler.
1403
1404         Fix for <rdar://problem/6487249> repro crash in 
1405         WebCore::CSSParser::parseFillImage copying entire contents of this 
1406         page
1407         -and corresponding: https://bugs.webkit.org/show_bug.cgi?id=24172
1408
1409         * css/CSSParser.cpp:
1410         (WebCore::CSSParser::parseValue): Null-check m_styleSheet
1411
1412 2009-02-25  Adam Treat  <adam.treat@torchmobile.com>
1413
1414         Fix the Qt build.
1415
1416         * WebCore.pro:
1417
1418 2009-02-25  Jan Michael Alonzo  <jmalonzo@webkit.org>
1419
1420         Gtk build fix. Not reviewed.
1421
1422         Add files to the build per r41218.
1423         Rename WebkitPoint.h to WebKitPoint.h in DOMWindow.cpp
1424
1425         * GNUmakefile.am:
1426         * page/DOMWindow.cpp:
1427
1428 2009-02-25  Zan Dobersek  <zandobersek@gmail.com>
1429
1430         Reviewed by Alexey Proskuryakov.
1431
1432         https://bugs.webkit.org/show_bug.cgi?id=24043
1433         When faced with URLs with unsupported protocol on Gtk port,
1434         report the error through an idle function and return true, so
1435         a proper resource handle is created.
1436
1437         * platform/network/soup/ResourceHandleSoup.cpp:
1438         (WebCore::reportUnknownProtocolError):
1439         (WebCore::ResourceHandle::start):
1440
1441 2009-02-25  Steve Falkenburg  <sfalken@apple.com>
1442
1443         Windows build fix.
1444         Use struct to forward declare ResourceRequest.
1445
1446         * history/HistoryItem.h:
1447         * inspector/InspectorController.h:
1448         * loader/DocumentThreadableLoader.h:
1449         * loader/FrameLoaderClient.h:
1450         * loader/MainResourceLoader.h:
1451         * loader/SubresourceLoader.h:
1452         * loader/SubresourceLoaderClient.h:
1453         * loader/ThreadableLoader.h:
1454         * loader/WorkerThreadableLoader.h:
1455         * platform/CrossThreadCopier.h:
1456         * platform/network/ResourceHandle.h:
1457         * platform/network/ResourceHandleClient.h:
1458         * platform/network/ResourceRequestBase.h:
1459         * platform/network/cf/ResourceRequestCFNet.h:
1460         * xml/XMLHttpRequest.h:
1461
1462 2009-02-25  Steve Falkenburg  <sfalken@apple.com>
1463
1464         Partial Windows build fix.
1465         
1466         * DerivedSources.cpp:
1467         * WebCore.vcproj/WebCore.vcproj:
1468
1469 2009-02-25  Dirk Schulze  <krit@webkit.org>
1470
1471         Reviewed by Oliver Hunt.
1472
1473         Ported arcTo to Qt. Qt has no native support for arcTo. This changes
1474         calculate the behavior of arcTo and draws it with lineTo and arc.
1475
1476         [QT] implement Canvas arcTo
1477         https://bugs.webkit.org/show_bug.cgi?id=23873
1478
1479         * platform/graphics/qt/PathQt.cpp:
1480         (WebCore::Path::addArcTo):
1481
1482 2009-02-25  Simon Fraser  <simon.fraser@apple.com>
1483
1484         Reviewed by Dan Bernstein
1485
1486         Remove idl files from Resources, and sort.
1487         
1488         * WebCore.xcodeproj/project.pbxproj:
1489
1490 2009-02-25  Chris Marrin  <cmarrin@apple.com>
1491
1492         Reviewed by Simon Fraser.
1493
1494         https://bugs.webkit.org/show_bug.cgi?id=23943
1495
1496         Added webkitConvertPointFromNodeToPage and webkitConvertPointFromPageToNode on
1497         the window object. Also added WebKitPoint object, which is passed in and out
1498         of these functions.
1499
1500         Test: fast/dom/Window/webkitConvertPoint.html
1501
1502         * DerivedSources.make:
1503         * WebCore.pro:
1504         * WebCore.vcproj/WebCore.vcproj:
1505         * WebCore.xcodeproj/project.pbxproj:
1506         * WebCoreSources.bkl:
1507         * bindings/js/JSDOMWindowBase.cpp:
1508         (jsDOMWindowBaseWebKitPoint):
1509         (setJSDOMWindowBaseWebKitPoint):
1510         * bindings/js/JSWebKitPointConstructor.cpp: Added.
1511         (WebCore::):
1512         (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
1513         (WebCore::constructWebKitPoint):
1514         (WebCore::JSWebKitPointConstructor::getConstructData):
1515         * bindings/js/JSWebKitPointConstructor.h: Added.
1516         (WebCore::JSWebKitPointConstructor::classInfo):
1517         * dom/Node.cpp:
1518         (WebCore::Node::convertToPage):
1519         (WebCore::Node::convertFromPage):
1520         * dom/Node.h:
1521         * page/DOMWindow.cpp:
1522         (WebCore::DOMWindow::webkitConvertPointFromNodeToPage):
1523         (WebCore::DOMWindow::webkitConvertPointFromPageToNode):
1524         * page/DOMWindow.h:
1525         * page/DOMWindow.idl:
1526         * page/WebKitPoint.h: Added.
1527         (WebCore::WebKitPoint::create):
1528         (WebCore::WebKitPoint::x):
1529         (WebCore::WebKitPoint::y):
1530         (WebCore::WebKitPoint::setX):
1531         (WebCore::WebKitPoint::setY):
1532         (WebCore::WebKitPoint::WebKitPoint):
1533         * page/WebKitPoint.idl: Added.
1534
1535 2009-02-25  Jian Li  <jianli@chromium.org>
1536
1537         Reviewed by Alexey Proskuryakov.
1538
1539         Remove "#if ENABLE(WORKERS)" wrap from CrossThreadCopier files.
1540         https://bugs.webkit.org/show_bug.cgi?id=24145
1541
1542         * platform/CrossThreadCopier.cpp:
1543         * platform/CrossThreadCopier.h:
1544
1545 2009-02-25  David Levin  <levin@chromium.org>
1546
1547         Reviewed by Alexey Proskuryakov.
1548
1549         Bug 23688: ThreadableLoader needs a sync implementation for Workers.
1550         <https://bugs.webkit.org/show_bug.cgi?id=23688>
1551
1552         No observable change in behavior, so no test.
1553
1554         * loader/ThreadableLoader.cpp:
1555         (WebCore::ThreadableLoader::loadResourceSynchronously):
1556         * loader/ThreadableLoaderClientWrapper.h:
1557         (WebCore::ThreadableLoaderClientWrapper::clearClient):
1558         (WebCore::ThreadableLoaderClientWrapper::done):
1559         (WebCore::ThreadableLoaderClientWrapper::didFinishLoading):
1560         (WebCore::ThreadableLoaderClientWrapper::didFail):
1561         (WebCore::ThreadableLoaderClientWrapper::didFailRedirectCheck):
1562         (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
1563         Expose whether the loader is done (based on what callbacks were done).
1564
1565         * loader/WorkerThreadableLoader.cpp:
1566         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
1567         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
1568         Each loader is given its own mode so that only its callbacks get through the run loop.
1569
1570         The xhr spec says that the readystatechange events are synchronous, so in the case of a
1571         nested sync xhr no readystatechange events should be fired for the outer xhr.
1572
1573         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
1574
1575         * loader/WorkerThreadableLoader.h:
1576         (WebCore::WorkerThreadableLoader::create):
1577         (WebCore::WorkerThreadableLoader::done):
1578
1579         * workers/WorkerRunLoop.cpp:
1580         (WebCore::WorkerRunLoop::WorkerRunLoop):
1581         * workers/WorkerRunLoop.h:
1582         (WebCore::WorkerRunLoop::createUniqueId):
1583         Simple method to create a uniqueId on demand with respect to the run loop.
1584
1585         * workers/WorkerThread.h:
1586
1587 2009-02-25  David Levin  <levin@chromium.org>
1588
1589         Reviewed by Alexey Proskuryakov.
1590
1591         Bug 24089: ThreadableLoader::loadResourceSynchronously should do callbacks like the async code.
1592         <https://bugs.webkit.org/show_bug.cgi?id=24089>
1593
1594         Make threadable loader callbacks to happen during the sync load call.
1595
1596         Changes the behavior of sync xhr for insecure redirects in two ways:
1597         + Sends an error event instead of an abort event (which is the same as async xhr's behavior).
1598         + Throws a network exception which is what other browsers do and what the spec
1599         says to do (http://www.w3.org/TR/XMLHttpRequest/).
1600
1601         * loader/DocumentThreadableLoader.cpp:
1602         (WebCore::DocumentThreadableLoader::loadResourceSynchronously):
1603         * loader/DocumentThreadableLoader.h:
1604         * loader/ThreadableLoader.cpp:
1605         (WebCore::ThreadableLoader::loadResourceSynchronously):
1606         * loader/ThreadableLoader.h:
1607         * xml/XMLHttpRequest.cpp:
1608         (WebCore::XMLHttpRequest::XMLHttpRequest):
1609         (WebCore::XMLHttpRequest::loadRequestSynchronously):
1610         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
1611         (WebCore::XMLHttpRequest::didFail):
1612         (WebCore::XMLHttpRequest::didFailRedirectCheck):
1613         * xml/XMLHttpRequest.h:
1614
1615 2009-02-24  Chris Marrin  <cmarrin@apple.com>
1616
1617         Reviewed by David Hyatt.
1618
1619         https://bugs.webkit.org/show_bug.cgi?id=23368
1620
1621         Added logic to correctly hit test accelerated layers.
1622
1623         Tests: animations/animation-hit-test-transform.html
1624                animations/animation-hit-test.html
1625                transitions/transition-hit-test-transform.html
1626                transitions/transition-hit-test.html
1627
1628         * page/animation/KeyframeAnimation.cpp:
1629         (WebCore::KeyframeAnimation::animate):
1630         * rendering/RenderLayer.cpp:
1631         (WebCore::RenderLayer::hitTestLayer):
1632         (WebCore::RenderLayer::updateClipRects):
1633         * rendering/RenderLayerBacking.cpp:
1634         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1635
1636 2009-02-25  Alexey Proskuryakov  <ap@webkit.org>
1637
1638         Reviewed by Darin Adler.
1639
1640         https://bugs.webkit.org/show_bug.cgi?id=24067
1641         REGRESSION: Crash in WebCore::Document::initSecurityContext
1642
1643         The crash started to happen when we removed a check for frame->document() being null.
1644         However, the original document shouldn't be null here, because it is needed to alias
1645         security origins. So, this patch fixes the crash by correcting security origin behavior.
1646
1647         Test: http/tests/security/aboutBlank/window-open-self-about-blank.html
1648         This tests for not crashing, and for inheriting the domain from the document being replaced.
1649         Preserving the aliasing cannot be tested for automatically, because we'd need a non-trivial
1650         domain to remove a prefix from.
1651
1652         * loader/FrameLoader.cpp: (WebCore::FrameLoader::begin): Create a new document before
1653         clearing the frame, so that Document::initSecurityContext() could access the old one.
1654
1655 2009-02-25  Jay Campan  <jcampan@google.com>
1656
1657         Reviewed by Darin Fisher.
1658
1659         https://bugs.webkit.org/show_bug.cgi?id=24066
1660
1661         Items in drop-downs were not painted correctly.  Makes sure the
1662         PopupListBox invalidates in the coordinates of the window as this is
1663         FramelessScrollView::invalidateRect paints to.
1664
1665         * platform/chromium/PopupMenuChromium.cpp:
1666         (WebCore::PopupListBox::invalidateRow):
1667
1668 2009-02-24  Simon Fraser  <simon.fraser@apple.com>
1669
1670         Reviewed by Anders Carlsson
1671
1672         https://bugs.webkit.org/show_bug.cgi?id=15081
1673         
1674         Make display:none work for applet, emebed and object elements
1675         by calling rendererIsNeeded() on superclasses.
1676
1677         Tests: fast/replaced/applet-display-none.html
1678                fast/replaced/embed-display-none.html
1679                fast/replaced/object-display-none.html
1680
1681         * html/HTMLAppletElement.cpp:
1682         (WebCore::HTMLAppletElement::rendererIsNeeded):
1683         * html/HTMLElement.cpp:
1684         (WebCore::HTMLElement::rendererIsNeeded):
1685         * html/HTMLEmbedElement.cpp:
1686         (WebCore::HTMLEmbedElement::rendererIsNeeded):
1687         * html/HTMLObjectElement.cpp:
1688         (WebCore::HTMLObjectElement::rendererIsNeeded):
1689
1690 2009-02-24  Simon Fraser  <simon.fraser@apple.com>
1691
1692         Reviewed by Dave Hyatt
1693
1694         https://bugs.webkit.org/show_bug.cgi?id=24137
1695         
1696         Fix localToAbsolute() and absoluteToLocal() to map points through 3d transforms,
1697         taking perspective and transform-style: preserve-3d into account.
1698         
1699         In order to support transform-style: preserve-3d, which keeps elements in a
1700         3d space, we have to carry along an accumulated matrix in TransformState.
1701         We also need to apply the perspective from the parent, if any, with the
1702         appropriate origin.
1703
1704         * GNUmakefile.am:
1705         * WebCore.base.exp:
1706         * WebCore.pro:
1707         * WebCore.scons:
1708         * WebCore.vcproj/WebCore.vcproj:
1709         * WebCore.xcodeproj/project.pbxproj:
1710         * WebCoreSources.bkl:
1711         * css/CSSComputedStyleDeclaration.cpp:
1712         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1713         * platform/graphics/transforms/TransformationMatrix.cpp:
1714         (WebCore::TransformationMatrix::translate):
1715         (WebCore::TransformationMatrix::translate3d):
1716         (WebCore::TransformationMatrix::translateRight3d):
1717         * platform/graphics/transforms/TransformationMatrix.h:
1718         * rendering/RenderBox.cpp:
1719         (WebCore::RenderBox::mapLocalToAbsolutePoint):
1720         (WebCore::RenderBox::mapAbsoluteToLocalPoint):
1721         * rendering/RenderBox.h:
1722         * rendering/RenderLayer.cpp:
1723         (WebCore::RenderLayer::updateTransform):
1724         (WebCore::RenderLayer::perspectiveTransform):
1725         (WebCore::RenderLayer::perspectiveOrigin):
1726         * rendering/RenderLayer.h:
1727         * rendering/RenderLayerBacking.cpp:
1728         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1729         * rendering/RenderLayerCompositor.cpp:
1730         (WebCore::requiresCompositingLayerForTransform):
1731         (WebCore::RenderLayerCompositor::layerHas3DContent):
1732         * rendering/RenderObject.cpp:
1733         (WebCore::RenderObject::localToAbsolute):
1734         (WebCore::RenderObject::absoluteToLocal):
1735         (WebCore::RenderObject::mapLocalToAbsolutePoint):
1736         (WebCore::RenderObject::mapAbsoluteToLocalPoint):
1737         * rendering/RenderObject.h:
1738         * rendering/RenderTableCell.cpp:
1739         (WebCore::RenderTableCell::mapLocalToAbsolutePoint):
1740         (WebCore::RenderTableCell::mapAbsoluteToLocalPoint):
1741         * rendering/RenderTableCell.h:
1742         * rendering/RenderView.cpp:
1743         (WebCore::RenderView::mapLocalToAbsolutePoint):
1744         (WebCore::RenderView::mapAbsoluteToLocalPoint):
1745         * rendering/RenderView.h:
1746         * rendering/TransformState.cpp: Added.
1747         (WebCore::TransformState::move):
1748         (WebCore::TransformState::applyTransform):
1749         (WebCore::TransformState::flatten):
1750         * rendering/TransformState.h: Added.
1751         (WebCore::TransformState::):
1752         (WebCore::TransformState::TransformState):
1753         (WebCore::TransformState::move):
1754         * rendering/style/RenderStyle.h:
1755         (WebCore::InheritedFlags::hasPerspective):
1756
1757 2009-02-24  Sam Weinig  <sam@webkit.org>
1758
1759         Reviewed by David Hyatt.
1760
1761         Fix for https://bugs.webkit.org/show_bug.cgi?id=23990
1762         Regression (r40837): JavaScript image popup doesn't work
1763
1764         Make the getClientRects and getBoundingClientRect methods return rects
1765         relative to the viewport.
1766
1767         Test: fast/dom/getBoundingClientRect-getClientRects-relative-to-viewport.html
1768
1769         * dom/Element.cpp:
1770         (WebCore::Element::getClientRects):
1771         (WebCore::Element::getBoundingClientRect):
1772
1773 2009-02-24  Ojan Vafai  <ojan@chromium.org>
1774
1775         Reviewed by Eric Seidel.
1776
1777         SVG pages don't have a body or an html element! 
1778         Don't return early if there is no body.
1779
1780         * editing/VisiblePosition.cpp:
1781         (WebCore::VisiblePosition::canonicalPosition):
1782
1783 2009-02-23  David Hyatt  <hyatt@apple.com>
1784
1785         Reviewed by Eric Seidel
1786
1787         https://bugs.webkit.org/show_bug.cgi?id=23740, painting order wrong for normal flow elements with overflow: hidden
1788         
1789         This patch reworks the painting of overflow.  There is now the concept of a "self-painting layer."  All
1790         layers are considered to be self-painting except for overflow layers that are normal flow (and that don't have
1791         reflections or masks).
1792         
1793         If an overflow layer is not self-painting, then it ends up painted by its parent just like any other normal flow object.
1794         The only difference is that the clip has to be pushed and popped when painting the object's children.
1795         
1796         The lightweight clipping scheme used for controls has been extended to cover overflow now in this simplified case.  With
1797         the code consolidated into reusable push/pop functions, all of the renderers that use overflow have been patched to
1798         use the new functions.
1799         
1800         Hit testing has also been patched to check the overflow clip rect first before recurring into children.
1801         
1802         Scrollbar paint has been moved into RenderBlock for now, since none of the table objects support scrollbars
1803         yet, and scrollbar hit testing was already there anyway.  Now the two code paths are more symmetrical.
1804         
1805         Masks are now treated like normal flow layers (just like reflections).
1806
1807         A couple of test cases have been added to fast/overflow to test the stacking order. 
1808
1809         * rendering/InlineFlowBox.cpp:
1810         (WebCore::InlineFlowBox::nodeAtPoint):
1811         (WebCore::InlineFlowBox::paint):
1812         * rendering/RenderBlock.cpp:
1813         (WebCore::RenderBlock::repaintOverhangingFloats):
1814         (WebCore::RenderBlock::paint):
1815         (WebCore::RenderBlock::paintChildren):
1816         (WebCore::RenderBlock::paintObject):
1817         (WebCore::RenderBlock::paintFloats):
1818         (WebCore::RenderBlock::insertFloatingObject):
1819         (WebCore::RenderBlock::floatRect):
1820         (WebCore::RenderBlock::lowestPosition):
1821         (WebCore::RenderBlock::rightmostPosition):
1822         (WebCore::RenderBlock::leftmostPosition):
1823         (WebCore::RenderBlock::addOverhangingFloats):
1824         (WebCore::RenderBlock::nodeAtPoint):
1825         (WebCore::RenderBlock::hitTestContents):
1826         * rendering/RenderBox.cpp:
1827         (WebCore::RenderBox::nodeAtPoint):
1828         (WebCore::RenderBox::pushContentsClip):
1829         (WebCore::RenderBox::popContentsClip):
1830         * rendering/RenderBox.h:
1831         (WebCore::RenderBox::paintObject):
1832         * rendering/RenderBoxModelObject.cpp:
1833         (WebCore::RenderBoxModelObject::hasSelfPaintingLayer):
1834         * rendering/RenderBoxModelObject.h:
1835         * rendering/RenderLayer.cpp:
1836         (WebCore::RenderLayer::paintLayer):
1837         (WebCore::RenderLayer::hitTestLayer):
1838         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
1839         (WebCore::RenderLayer::isSelfPaintingLayer):
1840         * rendering/RenderLayer.h:
1841         * rendering/RenderTable.cpp:
1842         (WebCore::RenderTable::paint):
1843         (WebCore::RenderTable::paintObject):
1844         (WebCore::RenderTable::nodeAtPoint):
1845         * rendering/RenderTable.h:
1846         * rendering/RenderTableCell.cpp:
1847         (WebCore::RenderTableCell::paint):
1848         * rendering/RenderTableRow.cpp:
1849         (WebCore::RenderTableRow::nodeAtPoint):
1850         (WebCore::RenderTableRow::paint):
1851         * rendering/RenderTableRow.h:
1852         * rendering/RenderTableSection.cpp:
1853         (WebCore::RenderTableSection::paint):
1854         (WebCore::RenderTableSection::paintObject):
1855         (WebCore::RenderTableSection::nodeAtPoint):
1856         * rendering/RenderTableSection.h:
1857         * rendering/RenderTreeAsText.cpp:
1858         (WebCore::write):
1859         (WebCore::writeLayers):
1860
1861 2009-02-24  David Levin  <levin@chromium.org>
1862
1863         Reviewed by NOBODY (build fix).
1864
1865         Attempted build fix for wx-mac.
1866
1867         * WebCoreSources.bkl:
1868
1869 2009-02-24  David Levin  <levin@chromium.org>
1870
1871         Reviewed by NOBODY (build fix).
1872
1873         Attempted build fixes for qt-linux and wx-mac.
1874
1875         * WebCore.pro:
1876         * webcore-base.bkl:
1877
1878 2009-02-24  Ojan Vafai  <ojan@dhcp-172-31-134-214.sfo.corp.google.com>
1879
1880         Reviewed by Sam Weinig.
1881
1882         Fix null pointer error. If the node is the Document, then ownerDocument() 
1883         returns null, document() does not.
1884
1885         * editing/VisiblePosition.cpp:
1886         (WebCore::VisiblePosition::canonicalPosition):
1887
1888 2009-02-24  Jian Li  <jianli@chromium.org>
1889
1890         Reviewed by NOBODY (attempted build fixes).
1891
1892         Fix build break for Windows and Linux.
1893
1894         * GNUmakefile.am:
1895         * WebCore.vcproj/WebCore.vcproj:
1896
1897 2009-02-24  Dimitri Glazkov  <dglazkov@chromium.org>
1898
1899         Reviewed by Eric Seidel.
1900
1901         https://bugs.webkit.org/show_bug.cgi?id=24131
1902         Fix-up COM/RefCounted dichotomy in Chromium port.
1903
1904         * page/chromium/AccessibilityObjectWrapper.h:
1905         (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper): Added
1906         explicit setting of recount.
1907
1908 2009-02-24  Dimitri Glazkov  <dglazkov@chromium.org>
1909
1910         Reviewed by Eric Seidel.
1911
1912         https://bugs.webkit.org/show_bug.cgi?id=24141
1913         Add clarity to V8 interceptor helper function.
1914
1915         * bindings/v8/custom/V8HTMLPlugInElementCustom.cpp:
1916         (WebCore::NAMED_PROPERTY_GETTER): Renamed to notHandledByInterceptor.
1917         (WebCore::NAMED_PROPERTY_SETTER): Ditto.
1918         (WebCore::INDEXED_PROPERTY_GETTER): Ditto.
1919         (WebCore::INDEXED_PROPERTY_SETTER): Ditto.
1920
1921 2009-02-24  Simon Fraser  <simon.fraser@apple.com>
1922
1923         Reviewed by Eric Seidel
1924
1925         Minor numeric cleanup: convert float literals to doubles.
1926         
1927         * platform/graphics/transforms/RotateTransformOperation.cpp:
1928         (WebCore::RotateTransformOperation::blend):
1929
1930 2009-02-24  Mark Mentovai  <mark@chromium.org>
1931
1932         Reviewed by Eric Seidel.
1933
1934         https://bugs.webkit.org/show_bug.cgi?id=24139
1935         Add missing include.
1936
1937         * bindings/v8/ScriptInstance.h:
1938
1939 2009-02-24  Jian Li  <jianli@chromium.org>
1940
1941         Reviewed by Alexey Proskuryakov.
1942
1943         Move worker related files from dom directory to worker directory under WebCore.
1944         https://bugs.webkit.org/show_bug.cgi?id=24123
1945
1946         * DerivedSources.make:
1947         * GNUmakefile.am:
1948         * WebCore.pro:
1949         * WebCore.scons:
1950         * WebCore.vcproj/MigrateIDLAndScripts:
1951         * WebCore.vcproj/WebCore.vcproj:
1952         * WebCore.xcodeproj/project.pbxproj:
1953         * platform/CrossThreadCopier.cpp: Renamed from WebCore/dom/CrossThreadCopier.cpp.
1954         * platform/CrossThreadCopier.h: Renamed from WebCore/dom/CrossThreadCopier.h.
1955         * workers/GenericWorkerTask.h: Renamed from WebCore/dom/GenericWorkerTask.h.
1956         * workers/Worker.cpp: Renamed from WebCore/dom/Worker.cpp.
1957         * workers/Worker.h: Renamed from WebCore/dom/Worker.h.
1958         * workers/Worker.idl: Renamed from WebCore/dom/Worker.idl.
1959         * workers/WorkerContext.cpp: Renamed from WebCore/dom/WorkerContext.cpp.
1960         * workers/WorkerContext.h: Renamed from WebCore/dom/WorkerContext.h.
1961         * workers/WorkerContext.idl: Renamed from WebCore/dom/WorkerContext.idl.
1962         * workers/WorkerContextProxy.h: Renamed from WebCore/dom/WorkerContextProxy.h.
1963         * workers/WorkerLocation.cpp: Renamed from WebCore/dom/WorkerLocation.cpp.
1964         * workers/WorkerLocation.h: Renamed from WebCore/dom/WorkerLocation.h.
1965         * workers/WorkerLocation.idl: Renamed from WebCore/dom/WorkerLocation.idl.
1966         * workers/WorkerMessagingProxy.cpp: Renamed from WebCore/dom/WorkerMessagingProxy.cpp.
1967         * workers/WorkerMessagingProxy.h: Renamed from WebCore/dom/WorkerMessagingProxy.h.
1968         * workers/WorkerObjectProxy.h: Renamed from WebCore/dom/WorkerObjectProxy.h.
1969         * workers/WorkerRunLoop.cpp: Renamed from WebCore/dom/WorkerRunLoop.cpp.
1970         * workers/WorkerRunLoop.h: Renamed from WebCore/dom/WorkerRunLoop.h.
1971         * workers/WorkerThread.cpp: Renamed from WebCore/dom/WorkerThread.cpp.
1972         * workers/WorkerThread.h: Renamed from WebCore/dom/WorkerThread.h.
1973
1974 2009-02-05  Ojan Vafai  <ojan@chromium.org> and Eric Seidel <eric@webkit.org>
1975
1976         Reviewed by Dave Hyatt.
1977
1978         Make cursor positions match IE6/IE7/FF3 when clicking in margins/padding
1979         around divs inside editable regions.
1980         https://bugs.webkit.org/show_bug.cgi?id=23605
1981
1982         Fix clicks outside editable regions from focusing the editable region.
1983         https://bugs.webkit.org/show_bug.cgi?id=23607
1984
1985         Removed editing/selection/contenteditable-click-outside.html as it's
1986         not as useful as our new tests.
1987
1988         Clean up RenderBlock::positionForCoordinates to remove dead code,
1989         duplicate code, and generally make it more readable.
1990
1991         Tests: editing/selection/click-in-margins-inside-editable-div.html
1992                editing/selection/click-in-padding-with-multiple-line-boxes.html
1993                editing/selection/click-outside-editable-div.html
1994
1995         * editing/VisiblePosition.cpp:
1996         (WebCore::VisiblePosition::canonicalPosition):
1997         * rendering/RenderBlock.cpp:
1998         (WebCore::positionForPointRespectingEditingBoundaries):
1999         (WebCore::positionForPointWithInlineChildren):
2000         (WebCore::RenderBlock::positionForCoordinates):
2001         (WebCore::RenderBlock::updateFirstLetter):
2002
2003 2009-02-24  Sam Weinig  <sam@webkit.org>
2004
2005         Reviewed by Geoffrey Garen.
2006
2007         Related to <rdar://problem/6590295>
2008         Allow disabling javascript: urls.
2009
2010         * WebCore.base.exp:
2011         * html/HTMLAnchorElement.cpp:
2012         (WebCore::HTMLAnchorElement::parseMappedAttribute):
2013         * loader/FrameLoader.cpp:
2014         (WebCore::FrameLoader::executeIfJavaScriptURL):
2015         * page/Page.cpp:
2016         (WebCore::Page::Page):
2017         (WebCore::Page::setJavaScriptURLsAreAllowed):
2018         (WebCore::Page::javaScriptURLsAreAllowed):
2019         * page/Page.h:
2020
2021 2009-02-24  Simon Fraser  <simon.fraser@apple.com>
2022
2023         Fix build when ACCELERATED_COMPOSITING is turned on
2024         (overflowList() -> normalFlowList()).
2025     
2026         * rendering/RenderLayerBacking.cpp:
2027         (WebCore::RenderLayerBacking::hasNonCompositingContent):
2028         (WebCore::RenderLayerBacking::paintIntoLayer):
2029         * rendering/RenderLayerCompositor.cpp:
2030         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
2031         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2032         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2033         (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
2034         (WebCore::RenderLayerCompositor::layerHas3DContent):
2035
2036 2009-02-24  Simon Fraser  <simon.fraser@apple.com>
2037
2038         Reviewed by Darin Adler
2039         
2040         https://bugs.webkit.org/show_bug.cgi?id=24135
2041         
2042         Round the FloatPoint returned by absoluteToLocal(), rather than
2043         truncating it.
2044
2045         * dom/MouseRelatedEvent.cpp:
2046         (WebCore::MouseRelatedEvent::receivedTarget):
2047
2048 2009-02-24  Beth Dakin  <bdakin@apple.com>
2049
2050         Reviewed by Sam Weinig.
2051
2052         Fix for https://bugs.webkit.org/show_bug.cgi?id=24004 REGRESSION: 
2053         Ordered list item marker misaligned when line height is not 1.2 
2054         -and corresponding <rdar://problem/6602506>
2055
2056         This is a regression from http://trac.webkit.org/changeset/40880 
2057         where createInlineBox was taken off of RenderObject and moved to 
2058         RenderBox. The problem was that the RenderBox version still needs 
2059         to be virtual because there is still an existing implementation in 
2060         RenderListMarker. 
2061
2062         * rendering/RenderBox.h:
2063         * rendering/RenderListMarker.cpp:
2064         (WebCore::RenderListMarker::createInlineBox):
2065         * rendering/RenderListMarker.h:
2066
2067 2009-02-24  Dimitri Glazkov  <dglazkov@chromium.org>
2068
2069         Reviewed by Eric Seidel.
2070
2071         https://bugs.webkit.org/show_bug.cgi?id=24128
2072         Upstream more V8 custom bindings: constructors, XSLTProcessor.
2073
2074         * bindings/v8/custom/V8DOMParserConstructor.cpp: Added.
2075         (WebCore::CALLBACK_FUNC_DECL):
2076         * bindings/v8/custom/V8MessageChannelConstructor.cpp: Added.
2077         (WebCore::CALLBACK_FUNC_DECL):
2078         * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: Added.
2079         (WebCore::CALLBACK_FUNC_DECL):
2080         * bindings/v8/custom/V8XMLSerializerConstructor.cpp: Added.
2081         (WebCore::CALLBACK_FUNC_DECL):
2082         * bindings/v8/custom/V8XPathEvaluatorConstructor.cpp: Added.
2083         (WebCore::CALLBACK_FUNC_DECL):
2084         * bindings/v8/custom/V8XSLTProcessorCustom.cpp: Added.
2085         (WebCore::CALLBACK_FUNC_DECL):
2086
2087 2009-02-24  David Levin  <levin@chromium.org>
2088
2089         Reviewed by Alexey Proskuryakov.
2090
2091         Bug 24090: WorkerThreadableLoader needs to be able to post tasks for a mode.
2092         <https://bugs.webkit.org/show_bug.cgi?id=24090>
2093
2094         No observable change in behavior, so no test.
2095
2096         * dom/WorkerMessagingProxy.cpp:
2097         (WebCore::WorkerMessagingProxy::postMessageToWorkerContext):
2098         (WebCore::WorkerMessagingProxy::postTaskToWorkerContext):
2099         Fixed the bug that m_unconfirmedMessageCount was getting incremented for non-message tasks.
2100
2101         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerContext):
2102
2103         * dom/WorkerMessagingProxy.h:
2104         * loader/ThreadableLoader.cpp:
2105         (WebCore::ThreadableLoader::create):
2106         * loader/WorkerThreadableLoader.cpp:
2107         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
2108         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
2109         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
2110         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
2111         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
2112         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
2113         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
2114         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
2115         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation):
2116         Changed these methods to post task using a mode.
2117
2118         * loader/WorkerThreadableLoader.h:
2119         (WebCore::WorkerThreadableLoader::create):
2120
2121 2009-02-24  Alexey Proskuryakov  <ap@webkit.org>
2122
2123         Reviewed by Darin Adler.
2124
2125         https://bugs.webkit.org/show_bug.cgi?id=24091
2126         <rdar://problem/6468660> Start of redirect chain ends up as master entry in Application Cache
2127
2128         Test: http/tests/appcache/access-via-redirect.php
2129
2130         * loader/appcache/ApplicationCacheGroup.cpp:
2131         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Use the URL we ended up with,
2132         not the original one.
2133
2134 2009-02-24  Jian Li  <jianli@chromium.org>
2135
2136         Reviewed by Alexey Proskuryakov.
2137
2138         Change to include WorkerObjectProxy.h instead of WorkerMessagingProxy.h in WorkerContext.cpp and WorkerScriptController.cpp.
2139         https://bugs.webkit.org/show_bug.cgi?id=24112
2140
2141         * bindings/js/WorkerScriptController.cpp:
2142         * dom/WorkerContext.cpp:
2143
2144 2009-02-23  Antti Koivisto  <antti@apple.com>
2145
2146         Reviewed by Oliver Hunt.
2147
2148         <rdar://problem/6613796> Extended text codecs registered on webview creation
2149
2150         Comparing a text encoding with string "GBK" ended up constructing
2151         TextEncoding("GBK") which in turn initialized all extended
2152         text codecs.
2153
2154         * platform/text/TextCodecICU.cpp:
2155         (WebCore::TextCodecICU::decode):
2156
2157 2009-02-23  Sam Weinig  <sam@webkit.org>
2158
2159         Fix Qt build.
2160
2161         * bridge/qt/qt_runtime.cpp:
2162         (JSC::Bindings::valueRealType):
2163
2164 2009-02-23  Julien Chaffraix  <jchaffraix@webkit.org>
2165
2166         Reviewed by Darin Adler.
2167
2168         Bug 23956: Safari crashes when cloneNode fails (cloning a XML element with an invalid nodeName)
2169
2170         The crash occurred because Document::cloneNode would call Document::createElementNS. Unfortunately
2171         element created with createElement could have a wrong nodeName (createElement sets the string as the
2172         localName without checking for a prefix).
2173
2174         The fix is to call Document::createElement(const QualifiedName&, bool) that will not do any checks on the QualifiedName
2175         and will always succeed.
2176         Also rolled-out the HTMLElement specialisation of clonedNode as it was equivalent to what is done now (added an ASSERT
2177         to ensure that).
2178
2179         Test: fast/dom/cloneNode.html
2180
2181         * dom/Element.cpp:
2182         (WebCore::Element::cloneNode): Call createElement(const QualifiedName&, bool) instead of createElementNS as it will
2183         always return an element.
2184
2185         * html/HTMLElement.cpp:
2186         * html/HTMLElement.h: Removed HTMLElement::clonedNode as it is equivalent to what is now done.
2187
2188 2009-02-23  Dimitri Glazkov  <dglazkov@chromium.org>
2189
2190         Reviewed by Eric Seidel.
2191
2192         https://bugs.webkit.org/show_bug.cgi?id=24109
2193         Upstream V8 Script abstractions, all except ScriptController.
2194
2195         * bindings/v8/ScriptCachedFrameData.h: Added.
2196         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
2197         (WebCore::ScriptCachedFrameData::~ScriptCachedFrameData):
2198         (WebCore::ScriptCachedFrameData::restore):
2199         (WebCore::ScriptCachedFrameData::clear):
2200         (WebCore::ScriptCachedFrameData::domWindow):
2201         * bindings/v8/ScriptCallFrame.cpp: Added.
2202         (WebCore::ScriptCallFrame::ScriptCallFrame):
2203         (WebCore::ScriptCallFrame::~ScriptCallFrame):
2204         (WebCore::ScriptCallFrame::argumentAt):
2205         * bindings/v8/ScriptCallFrame.h: Added.
2206         (WebCore::ScriptCallFrame::functionName):
2207         (WebCore::ScriptCallFrame::sourceURL):
2208         (WebCore::ScriptCallFrame::lineNumber):
2209         (WebCore::ScriptCallFrame::argumentCount):
2210         * bindings/v8/ScriptCallStack.cpp: Added.
2211         (WebCore::ScriptCallStack::ScriptCallStack):
2212         (WebCore::ScriptCallStack::~ScriptCallStack):
2213         (WebCore::ScriptCallStack::at):
2214         * bindings/v8/ScriptCallStack.h: Added.
2215         (WebCore::ScriptCallStack::size):
2216         * bindings/v8/ScriptInstance.cpp: Added.
2217         (WebCore::V8ScriptInstance::V8ScriptInstance):
2218         (WebCore::V8ScriptInstance::~V8ScriptInstance):
2219         (WebCore::V8ScriptInstance::instance):
2220         (WebCore::V8ScriptInstance::clear):
2221         (WebCore::V8ScriptInstance::set):
2222         * bindings/v8/ScriptInstance.h: Added.
2223         (WebCore::V8ScriptInstance::create):
2224         * bindings/v8/ScriptSourceCode.h: Added.
2225         (WebCore::ScriptSourceCode::ScriptSourceCode):
2226         (WebCore::ScriptSourceCode::isEmpty):
2227         (WebCore::ScriptSourceCode::source):
2228         (WebCore::ScriptSourceCode::url):
2229         (WebCore::ScriptSourceCode::startLine):
2230         * bindings/v8/ScriptState.h: Added.
2231         (WebCore::ScriptState::hadException):
2232         (WebCore::ScriptState::setException):
2233         (WebCore::ScriptState::exception):
2234         * bindings/v8/ScriptString.h: Added.
2235         (WebCore::ScriptString::ScriptString):
2236         (WebCore::ScriptString::operator String):
2237         (WebCore::ScriptString::isNull):
2238         (WebCore::ScriptString::size):
2239         (WebCore::ScriptString::operator=):
2240         (WebCore::ScriptString::operator+=):
2241         * bindings/v8/ScriptValue.cpp: Added.
2242         (WebCore::ScriptValue::getString):
2243         * bindings/v8/ScriptValue.h: Added.
2244         (WebCore::ScriptValue::ScriptValue):
2245         (WebCore::ScriptValue::operator=):
2246         (WebCore::ScriptValue::operator==):
2247         (WebCore::ScriptValue::operator!=):
2248         (WebCore::ScriptValue::isNull):
2249         (WebCore::ScriptValue::isUndefined):
2250         (WebCore::ScriptValue::clear):
2251         (WebCore::ScriptValue::~ScriptValue):
2252         (WebCore::ScriptValue::v8Value):
2253
2254 2009-02-23  Adam Treat  <adam.treat@torchmobile.com>
2255
2256         Reviewed by Timothy Hatcher.
2257
2258         https://bugs.webkit.org/show_bug.cgi?id=24106
2259         The Qt port is crashing on exit because the tear down procedure involves
2260         the WebCore::InspectorController trying to access the JS execution context
2261         for a page that is being deleted.  This patch amends the inspector so
2262         that it does not try and access the execution context of the WebCore::Page
2263         in the midst of deletion.
2264
2265         * inspector/InspectorController.cpp:
2266         (WebCore::InspectorController::inspectedPageDestroyed):
2267         (WebCore::InspectorController::stopUserInitiatedProfiling):
2268
2269 2009-02-23  David Levin  <levin@chromium.org>
2270
2271         Reviewed by Alexey Proskuryakov.
2272
2273         Bug 24088: ThreadableLoaderClient::didFailWillSendRequestCheck isn't wired up completely for workers and could use a better name.
2274         <https://bugs.webkit.org/show_bug.cgi?id=24088>
2275
2276         No observable change in behavior, so no test.
2277
2278         * loader/DocumentThreadableLoader.cpp:
2279         (WebCore::DocumentThreadableLoader::create):
2280         * loader/ThreadableLoaderClient.h:
2281         (WebCore::ThreadableLoaderClient::didFailRedirectCheck):
2282         * loader/ThreadableLoaderClientWrapper.h:
2283         (WebCore::ThreadableLoaderClientWrapper::didFailRedirectCheck):
2284         * loader/WorkerThreadableLoader.cpp:
2285         (WebCore::workerContextDidFailRedirectCheck):
2286         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
2287         * loader/WorkerThreadableLoader.h:
2288         * xml/XMLHttpRequest.cpp:
2289         (WebCore::XMLHttpRequest::didFinishLoading):
2290         * xml/XMLHttpRequest.h:
2291
2292 2009-02-23  David Levin  <levin@chromium.org>
2293
2294         Reviewed by Alexey Proskuryakov.
2295
2296         Bug 24047: Need to simplify nested if's in WorkerRunLoop::runInMode
2297         <https://bugs.webkit.org/show_bug.cgi?id=24047>
2298
2299         Made a nested if inside of WorkerRunLoop::runInMode a lot simpler by
2300         using only MessageQueue::waitForMessageFilteredWithTimeout instead
2301         of three different MessageQueue methods.
2302
2303         No observable change in behavior, so no test.
2304
2305         * dom/WorkerRunLoop.cpp:
2306         (WebCore::ModePredicate::operator()):
2307         Minor clean-up to able to pass a const ref point for ModePredicate into runInMode.
2308         (WebCore::WorkerRunLoop::runInMode):
2309         * dom/WorkerRunLoop.h:
2310
2311 2009-02-23  David Hyatt  <hyatt@apple.com>
2312
2313         In preparation for making layers for multicol objects (so that they can properly split child layers
2314         into multiple columns), rename all of the "overflowOnly" and "overflowList" members and functions
2315         of RenderLayer to use the term "normal flow" instead.
2316
2317         Reviewed by Cameron Zwarich
2318
2319         * rendering/RenderLayer.cpp:
2320         (WebCore::RenderLayer::RenderLayer):
2321         (WebCore::RenderLayer::~RenderLayer):
2322         (WebCore::RenderLayer::setHasVisibleContent):
2323         (WebCore::RenderLayer::enclosingCompositingLayer):
2324         (WebCore::RenderLayer::addChild):
2325         (WebCore::RenderLayer::removeChild):
2326         (WebCore::RenderLayer::paintLayer):
2327         (WebCore::RenderLayer::hitTestLayer):
2328         (WebCore::RenderLayer::dirtyNormalFlowList):
2329         (WebCore::RenderLayer::updateNormalFlowList):
2330         (WebCore::RenderLayer::collectLayers):
2331         (WebCore::RenderLayer::updateLayerListsIfNeeded):
2332         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
2333         (WebCore::RenderLayer::styleChanged):
2334         * rendering/RenderLayer.h:
2335         (WebCore::RenderLayer::isNormalFlowOnly):
2336         (WebCore::RenderLayer::normalFlowList):
2337         * rendering/RenderTreeAsText.cpp:
2338         (WebCore::writeLayers):
2339
2340 2009-02-23  David Hyatt  <hyatt@apple.com>
2341
2342         Fix the stacking order for column rules in multi-column layout.  Column rules should paint as part of the background of an element, just
2343         after all other components of the background have been painted.  This allows negative z-index children to still paint on top of the
2344         column rules (rather than ending up above the background of the box but behind the column rules).
2345
2346         Reviewed by Eric Seidel
2347
2348         Added fast/multicol/column-rules-stacking.html
2349
2350         * rendering/RenderBlock.cpp:
2351         (WebCore::RenderBlock::paintColumnRules):
2352         (WebCore::RenderBlock::paintColumnContents):
2353         (WebCore::RenderBlock::paintObject):
2354         * rendering/RenderBlock.h:
2355
2356 2009-02-23  Adam Treat  <adam.treat@torchmobile.com>
2357
2358         Reviewed by David Hyatt.
2359
2360         No testcases have been added or modified since this patch should not result in
2361         a behavior change for ports that have layout tests enabled.
2362
2363         Currently, the implementation of GraphicsContext::drawLineForText amongst
2364         the various ports differ in that some of them are honoring the context's
2365         strokeStyle when drawing a text-decoration and some of them are not.
2366         For instance, Apple's Mac port *does not* honor the context's strokeStyle(),
2367         but the Cairo implementation does and has an explicit workaround that
2368         sets the strokeStyle() temporarily.
2369
2370         This patch fixes so that all ports are consistent by explicitly making sure
2371         to set the GraphicsContext strokeStyle to SolidStroke whenever
2372         painting the text-decoration of an InlineFlowBox or InlineTextBox as these
2373         should always use a solid stroke.
2374
2375         This patch addresses these bugs:
2376         https://bugs.webkit.org/show_bug.cgi?id=19364
2377         https://bugs.webkit.org/show_bug.cgi?id=15659
2378
2379         * rendering/InlineFlowBox.cpp:
2380         (WebCore::InlineFlowBox::paintTextDecorations):
2381         * rendering/InlineTextBox.cpp:
2382         (WebCore::InlineTextBox::paintDecoration):
2383
2384 2009-02-23  Scott Violet  <sky@google.com>
2385
2386         Reviewed by Eric Seidel.
2387
2388         https://bugs.webkit.org/show_bug.cgi?id=24098
2389         Bugs in ClipboardChromium
2390
2391         Fixes the following bugs in ClipboardChromium:
2392         * It's possible for the extension to be empty, resulting in a bad file
2393           name, for example, 'foo.' or just '.'.
2394         * We weren't restricting the size of the file to MAX_PATH.
2395         * We weren't removing characters that are invalid for file system names.
2396
2397         * platform/chromium/ClipboardChromium.cpp:
2398         (WebCore::writeImageToDataObject):
2399         * platform/chromium/ClipboardChromium.h:
2400         * platform/chromium/ClipboardChromiumLinux.cpp: Added.
2401         (WebCore::ClipboardChromium::validateFileName):
2402         * platform/chromium/ClipboardChromiumMac.cpp: Added.
2403         (WebCore::ClipboardChromium::validateFileName):
2404         * platform/chromium/ClipboardChromiumWin.cpp: Added.
2405         (WebCore::isInvalidFileCharacter):
2406         (WebCore::ClipboardChromium::validateFileName):
2407
2408 2009-02-23  Thiago Macieira  <thiago.macieira@nokia.com>
2409
2410         Reviewed by Simon Hausmann.
2411
2412         Fix the Copyright notices in a few files
2413
2414         * platform/qt/RenderThemeQt.h:
2415
2416 2009-02-23  Xan Lopez  <xan@gnome.org>
2417
2418         Reviewed by Alexey Proskuryakov.
2419
2420         https://bugs.webkit.org/show_bug.cgi?id=22624
2421         [SOUP][GTK] Need API to get SoupSession from WebKit.
2422
2423         Allow to retrieve the Soup session and modify the code to take
2424         into account users changing features on it.
2425
2426         * platform/network/ResourceHandle.h:
2427         * platform/network/soup/CookieJarSoup.cpp:
2428         (WebCore::defaultCookieJar):
2429         (WebCore::setDefaultCookieJar):
2430         * platform/network/soup/CookieJarSoup.h:
2431         * platform/network/soup/ResourceHandleSoup.cpp:
2432         (WebCore::createSoupSession):
2433         (WebCore::ensureSessionIsInitialized):
2434         (WebCore::ResourceHandle::startHttp):
2435         (WebCore::ResourceHandle::cancel):
2436         (WebCore::ResourceHandle::defaultSession):
2437
2438 2009-02-23  Xan Lopez  <xan@gnome.org>
2439
2440         Reviewed by Alexey Proskuryakov.
2441
2442         https://bugs.webkit.org/show_bug.cgi?id=22624
2443         [SOUP][GTK] Need API to get SoupSession from WebKit.
2444
2445         Remove CURL support.
2446
2447         * GNUmakefile.am:
2448
2449 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2450
2451         Reviewed by Mark Rowe.
2452
2453         Test: fast/dom/empty-hash-and-search.html
2454
2455         https://bugs.webkit.org/show_bug.cgi?id=21147
2456         hash property returns incorrect value for links w/o hash
2457
2458         Make hash() and search() behavior for empty and missing parts match IE and Firefox.
2459
2460         * platform/KURL.cpp:
2461         (WebCore::KURL::query): Changed to return query without '?', as it is already done for ref().
2462         (WebCore::KURL::prettyURL): Append the query with the question mark.
2463
2464         * page/Location.cpp:
2465         (WebCore::Location::search): Return an empty string if query is empty or missing.
2466         (WebCore::Location::hash): Return an empty string for empty hashes, not only missing ones.
2467
2468         * dom/WorkerLocation.cpp:
2469         (WebCore::WorkerLocation::search):
2470         (WebCore::WorkerLocation::hash):
2471         Match document.location fixes above.
2472
2473         * html/HTMLAnchorElement.cpp:
2474         (WebCore::HTMLAnchorElement::hash):
2475         (WebCore::HTMLAnchorElement::search):
2476         Return an empty string for empty and missing parts.
2477
2478 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2479
2480         Reviewed by Darin Adler.
2481
2482         https://bugs.webkit.org/show_bug.cgi?id=20184
2483         SELECT with no name generates invalid query string
2484
2485         Test: fast/forms/select-no-name.html
2486
2487         * html/HTMLSelectElement.cpp:
2488         (WebCore::HTMLSelectElement::appendFormData): Added a check for empty name.
2489
2490 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2491
2492         Apply review comments for the previous check-in (forgot to save the file, oops).
2493
2494         * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChildren):
2495
2496 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2497
2498         Reviewed by Darin Adler.
2499
2500         https://bugs.webkit.org/show_bug.cgi?id=15707
2501         Crash when manipulating document from within an iframe onload function
2502
2503         Test: fast/dom/onload-open.html
2504
2505         * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeChildren): Protect the container and
2506         the current node, because anything can happen when dispatching events.
2507
2508 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2509
2510         Reviewed by Darin Adler.
2511
2512         https://bugs.webkit.org/show_bug.cgi?id=18970
2513         Numerically named input fields cause document.forms loop problems
2514
2515         Test: fast/forms/numeric-input-name.html
2516
2517         * bindings/scripts/CodeGeneratorJS.pm: Try index getter before name getter, even if the
2518         latter overrides properties.
2519
2520 2009-02-23  Alexey Proskuryakov  <ap@webkit.org>
2521
2522         Reviewed by Sam Weinig.
2523
2524         https://bugs.webkit.org/show_bug.cgi?id=24059
2525         Tokenizer::write() return value is never used
2526
2527         * dom/Tokenizer.h:
2528         * dom/XMLTokenizer.cpp:
2529         (WebCore::XMLTokenizer::write):
2530         * dom/XMLTokenizer.h:
2531         * html/HTMLTokenizer.cpp:
2532         (WebCore::HTMLTokenizer::write):
2533         * html/HTMLTokenizer.h:
2534         * loader/FTPDirectoryDocument.cpp:
2535         (WebCore::FTPDirectoryTokenizer::write):
2536         * loader/ImageDocument.cpp:
2537         (WebCore::ImageTokenizer::write):
2538         * loader/MediaDocument.cpp:
2539         (WebCore::MediaTokenizer::write):
2540         * loader/PluginDocument.cpp:
2541         (WebCore::PluginTokenizer::write):
2542         * loader/TextDocument.cpp:
2543         (WebCore::TextTokenizer::write):
2544         Made write() return void, not bool.
2545
2546 2009-02-20  Geoffrey Garen  <ggaren@apple.com>
2547
2548         Reviewed by Sam Weinig.
2549
2550         Updated for JavaScriptCore changes to timeout checking.
2551
2552         * bindings/js/JSCustomPositionCallback.cpp:
2553         (WebCore::JSCustomPositionCallback::handleEvent):
2554         * bindings/js/JSCustomPositionErrorCallback.cpp:
2555         (WebCore::JSCustomPositionErrorCallback::handleEvent):
2556         * bindings/js/JSCustomSQLStatementCallback.cpp:
2557         (WebCore::JSCustomSQLStatementCallback::handleEvent):
2558         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
2559         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
2560         * bindings/js/JSCustomSQLTransactionCallback.cpp:
2561         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
2562         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
2563         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
2564         * bindings/js/JSCustomVoidCallback.cpp:
2565         (WebCore::JSCustomVoidCallback::handleEvent):
2566         * bindings/js/JSCustomXPathNSResolver.cpp:
2567         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2568         * bindings/js/JSDOMWindowBase.cpp:
2569         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2570         (WebCore::JSDOMWindowBase::commonJSGlobalData):
2571         * bindings/js/JSEventListener.cpp:
2572         (WebCore::JSAbstractEventListener::handleEvent):
2573         * bindings/js/ScheduledAction.cpp:
2574         (WebCore::ScheduledAction::executeFunctionInContext):
2575         * bindings/js/ScriptController.cpp:
2576         (WebCore::ScriptController::evaluate):
2577         * bindings/js/WorkerScriptController.cpp:
2578         (WebCore::WorkerScriptController::evaluate):
2579         (WebCore::WorkerScriptController::forbidExecution):
2580         * bindings/objc/WebScriptObject.mm:
2581         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2582         (-[WebScriptObject evaluateWebScript:]):
2583         * bridge/NP_jsobject.cpp:
2584         (_NPN_InvokeDefault):
2585         (_NPN_Invoke):
2586         (_NPN_Evaluate):
2587         (_NPN_Construct):
2588         * bridge/jni/jni_jsobject.mm:
2589         (JavaJSObject::call):
2590         (JavaJSObject::eval):
2591
2592 2009-02-21  Hironori Bono  <hbono@chromium.org>
2593
2594         Reviewed by Alexey Proskuryakov.
2595
2596         https://bugs.webkit.org/show_bug.cgi?id=23786
2597         [Chromium] line-break characters in a complex text are treated as zero-width spaces
2598
2599         This change prevents the UniscribeHelper class from treating the line-break characters
2600         as whitespaces.
2601
2602         Tests: fast/text/international/bidi-linebreak-001.html
2603                fast/text/international/bidi-linebreak-002.html
2604                fast/text/international/bidi-linebreak-003.html
2605
2606         * platform/graphics/chromium/UniscribeHelper.cpp:
2607         (WebCore::UniscribeHelper::adjustSpaceAdvances):
2608         Make the UniscribeHelper::adjustSpaceAdvances() function treat all characters in
2609         the treatAsSpace() function (e.g. U+0020, U+000A, U+000D, U+00A0) as whitespaces,
2610         so does when Chromium renders a simple text.
2611
2612 2009-02-20  Julien Chaffraix  <jchaffraix@webkit.org>
2613
2614         Reviewed by Alexey Proskuryakov.
2615
2616         Bug 23940: Use Document::createElement(const QualifiedName&, bool) when creating a known element inside WebCore
2617
2618         Document::createElement(const QualifiedName&, bool) does not check for the prefix as opposed the the one taking an AtomicString
2619         or Document::createElementNS. This is perfectly fine internally because we know the type of element created and the check is
2620         unneeded.
2621
2622         It also removes the use of an ExceptionCode argument which was here only to check that the prefix check was fine. Finally it
2623         enables us to use some generated QualifiedName.
2624
2625         * bindings/js/JSOptionConstructor.cpp:
2626         (WebCore::constructHTMLOptionElement):
2627         * dom/Document.cpp:
2628         (WebCore::Document::setTitle):
2629         * dom/XMLTokenizer.cpp:
2630         (WebCore::createXHTMLParserErrorHeader):
2631         (WebCore::XMLTokenizer::insertErrorMessageBlock):
2632         * editing/CompositeEditCommand.cpp:
2633         (WebCore::createBlockPlaceholderElement):
2634         * editing/htmlediting.cpp:
2635         (WebCore::createTabSpanElement):
2636         * html/HTMLSelectElement.cpp:
2637         (WebCore::HTMLSelectElement::setLength):
2638         * loader/FTPDirectoryDocument.cpp:
2639         (WebCore::FTPDirectoryTokenizer::appendEntry):
2640         (WebCore::FTPDirectoryTokenizer::createTDForFilename):
2641         (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate):
2642         (WebCore::FTPDirectoryTokenizer::createBasicDocument):
2643         * loader/ImageDocument.cpp:
2644         (WebCore::ImageDocument::createDocumentStructure):
2645         * loader/MediaDocument.cpp:
2646         (WebCore::MediaTokenizer::createDocumentStructure):
2647         * loader/PluginDocument.cpp:
2648         (WebCore::PluginTokenizer::createDocumentStructure):
2649         * loader/TextDocument.cpp:
2650         (WebCore::TextTokenizer::write):
2651         * page/Frame.cpp:
2652         (WebCore::Frame::selectionComputedStyle):
2653         (WebCore::Frame::styleForSelectionStart):
2654         Document::createElement(const AtomicString&, ...) to Document::createElement(const QualifiedName&, ...) switch.
2655
2656         * xml/XPathFunctions.cpp:
2657         (WebCore::XPath::FunLang::evaluate): Re-use langAttr instead of creating a new attribute.
2658         * page/DragController.cpp:
2659         (WebCore::documentFragmentFromDragData): Use the HTMLAnchorElement directly to get rid of the static cast.
2660
2661 2009-02-19  Dimitri Glazkov  <dglazkov@chromium.org>
2662
2663         Reviewed by Eric Seidel.
2664
2665         https://bugs.webkit.org/show_bug.cgi?id=24060
2666         Fix up to accommodate for CanvasPixelArray return.
2667
2668         * platform/graphics/skia/ImageBufferSkia.cpp:
2669         (WebCore::ImageBuffer::getImageData): Added an extra data() to call.
2670         (WebCore::ImageBuffer::putImageData): Ditto.
2671
2672 2009-02-20  Eric Carlson  <eric.carlson@apple.com>
2673
2674         Simon Fraser
2675
2676         https://bugs.webkit.org/show_bug.cgi?id=24042
2677         Bug 24042: MediaPlayer should cache plug-in proxy
2678
2679         The changes in https://bugs.webkit.org/show_bug.cgi?id=23917 assume that
2680         MediaPlayer will always have created the private media player object before
2681         the plug-in is instantiated and calls back with the proxy object. This is not
2682         true on all platforms because of threading latency, so MediaPlayer should
2683         cache the plug-in proxy so it can pass it to the media engine at a later time.
2684
2685         * platform/graphics/MediaPlayer.cpp:
2686         (WebCore::NullMediaPlayerPrivate::setPoster): Null media engine implementation of proxy methods.
2687         (WebCore::NullMediaPlayerPrivate::deliverNotification): Ditto.
2688         (WebCore::NullMediaPlayerPrivate::setMediaPlayerProxy): Ditto.
2689         (WebCore::MediaPlayer::MediaPlayer): Initialize m_playerProxy.
2690         (WebCore::MediaPlayer::load): Pass m_playerProxy to newly created engine.
2691         (WebCore::MediaPlayer::setMediaPlayerProxy): Cache m_playerProxy.
2692         * platform/graphics/MediaPlayer.h: Declare m_playerProxy.
2693
2694 2009-02-20  Eric Carlson  <eric.carlson@apple.com>
2695
2696         Simon Fraser.
2697
2698         https://bugs.webkit.org/show_bug.cgi?id=24063
2699         Make it possible for a port to require a user gesture to play/pause an <audio> or <video> element
2700
2701         * html/HTMLMediaElement.cpp:
2702         (WebCore::HTMLMediaElement::HTMLMediaElement):  Rename m_loadRestrictions to m_Restrictions.
2703         Initialize m_internalCall.
2704         (WebCore::HTMLMediaElement::loadTimerFired): Increment m_internalCall around call to load().
2705         (WebCore::HTMLMediaElement::load): Call loadInternal if restrictions check out.
2706         (WebCore::HTMLMediaElement::loadInternal): New, guts of old load()
2707         (WebCore::HTMLMediaElement::setNetworkState): Fix bug introduced in r40943
2708         (WebCore::HTMLMediaElement::play): Call playInternal if restrictions check out.
2709         (WebCore::HTMLMediaElement::playInternal): New, guts of old play()
2710         (WebCore::HTMLMediaElement::pause): Call pauseInternal if restrictions check out.
2711         (WebCore::HTMLMediaElement::pauseInternal): New, guts of old pause()
2712         (WebCore::HTMLMediaElement::togglePlayState): Call playInternal/pauseInternal
2713         (WebCore::HTMLMediaElement::deliverNotification): Remove unnecessary white space.
2714         * html/HTMLMediaElement.h: Rename m_loadRestrictions to m_Restrictions, add m_internalCall,
2715         add RequireUserGestureRateChangeRestriction.
2716
2717 2009-02-20  Darin Fisher  <darin@chromium.org>
2718
2719         Fix build bustage in FileSystemWin.cpp.
2720
2721         Need to return CString() instead of 0 since there are now two CString
2722         constructors that take a pointer type.
2723
2724         * platform/win/FileSystemWin.cpp:
2725         (WebCore::openTemporaryFile):
2726
2727 2009-02-20  Dimitri Glazkov  <dglazkov@chromium.org>
2728
2729         Reviewed by Sam Weinig.
2730
2731         https://bugs.webkit.org/show_bug.cgi?id=23999
2732         Change license headers to accurately reflect code history.
2733
2734         * platform/ContentType.cpp:
2735         * platform/ContentType.h:
2736
2737 2009-02-18  Dimitri Glazkov  <dglazkov@chromium.org>
2738
2739         Reviewed by Antti Koivisto.
2740
2741         https://bugs.webkit.org/show_bug.cgi?id=23999
2742         Split off MIME type parsing into its own class.
2743
2744         * GNUmakefile.am: Added ContentType sources.
2745         * WebCore.pro: Ditto.
2746         * WebCore.scons: Ditto.
2747         * WebCore.vcproj/WebCore.vcproj: Ditto.
2748         * WebCore.xcodeproj/project.pbxproj: Ditto.
2749         * WebCoreSources.bkl: Ditto.
2750         * html/HTMLMediaElement.cpp: Changed to use ContentType.
2751         (WebCore::HTMLMediaElement::selectMediaURL):
2752         * platform/ContentType.cpp: Added.
2753         (WebCore::ContentType::ContentType):
2754         (WebCore::ContentType::parameter):
2755         (WebCore::ContentType::type):
2756         * platform/ContentType.h: Added.
2757         (WebCore::ContentType::raw):
2758         * platform/MIMETypeRegistry.cpp:
2759         * platform/MIMETypeRegistry.h:
2760         * platform/graphics/MediaPlayer.cpp:
2761         (WebCore::MediaPlayer::load):
2762         * rendering/style/ContentData.h: Renamed ContentType to StyleContentType.
2763         * rendering/style/RenderStyleConstants.h: Ditto.
2764         (WebCore::):
2765
2766 2009-02-20  Holger Hans Peter Freyther  <zecke@selfish.org>
2767
2768         Unreviewed build fix.
2769
2770         Use CString() instead of 0.
2771
2772         * platform/gtk/FileSystemGtk.cpp:
2773         (WebCore::openTemporaryFile):
2774         * platform/qt/FileSystemQt.cpp:
2775         (WebCore::openTemporaryFile):
2776
2777 2009-02-20  Gustavo Noronha Silva  <gns@gnome.org>
2778
2779         Reviewed by Holger Freyther.
2780
2781         When dealing with local files, use a path instead of an URI. GFile
2782         has problems decoding URIs with percent signs on them.
2783
2784         * platform/network/soup/ResourceHandleSoup.cpp:
2785         (WebCore::ResourceHandle::startGio):
2786
2787 2009-02-20  Gustavo Noronha Silva  <gns@gnome.org>
2788
2789         Reviewed by Holger Freyther.
2790
2791         Protect the ResourceHandle instance from being destroyed by
2792         didReceiveData inside the GIO readCallback call, so that
2793         cancelling caused by scripts is handled correctly.
2794
2795         * platform/network/soup/ResourceHandleSoup.cpp:
2796         (WebCore::readCallback):
2797
2798 2009-02-20  David Kilzer  <ddkilzer@apple.com>
2799
2800         Make IconDatabaseNone.cpp compile with -Wunused and pass check-for-exit-time-destructors
2801
2802         Reviewed by Sam Weinig.
2803
2804         * loader/icon/IconDatabaseNone.cpp:
2805         (WebCore::IconDatabase::defaultDatabaseFilename): Use DEFINE_STATIC_LOCAL().
2806         (WebCore::IconDatabase::open): Commented out unused parameter.
2807         (WebCore::IconDatabase::setPrivateBrowsingEnabled): Ditto.
2808         (WebCore::IconDatabase::iconForPageURL): Ditto.
2809         (WebCore::IconDatabase::iconURLForPageURL): Ditto.
2810         (WebCore::IconDatabase::defaultIcon): Ditto.
2811         (WebCore::IconDatabase::retainIconForPageURL): Ditto.
2812         (WebCore::IconDatabase::releaseIconForPageURL): Ditto.
2813         (WebCore::IconDatabase::setIconDataForIconURL): Ditto.
2814         (WebCore::IconDatabase::setIconURLForPageURL): Ditto.
2815         (WebCore::IconDatabase::setEnabled): Ditto.
2816         (WebCore::IconDatabase::pageURLMappingCount): Added stub.
2817         (WebCore::IconDatabase::retainedPageURLCount): Ditto.
2818         (WebCore::IconDatabase::iconRecordCount): Ditto.
2819         (WebCore::IconDatabase::iconRecordCountWithData): Ditto.
2820
2821 2009-02-20  David Kilzer  <ddkilzer@apple.com>
2822
2823         Add comment to generated code when shadowing a built-in object
2824
2825         Reviewed by Sam Weinig.
2826
2827         * bindings/scripts/CodeGeneratorJS.pm: Added comment to
2828         generated code output.
2829
2830 2009-02-20  Avi Drissman  <avi@chromium.org>
2831
2832         Reviewed by Eric Seidel.
2833
2834         https://bugs.webkit.org/show_bug.cgi?id=24036
2835         Keyboard events need disambiguation on the Linux platform too.
2836
2837         * platform/chromium/PlatformKeyboardEventChromium.cpp:
2838         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2839
2840 2009-02-19  Darin Fisher  <darin@chromium.org>
2841
2842         Reviewed by Eric Seidel.
2843
2844         https://bugs.webkit.org/show_bug.cgi?id=24046
2845
2846         Several improvements to CString:
2847         1- Make it possible to initialize a CString from a CStringBuffer
2848         2- Make it possible to get a CStringBuffer from a CString
2849         3- Change CStringBuffer::data() to return a const pointer to ward off mutation
2850         4- Remove unused releaseBuffer() methods.
2851         5- Make CStringBuffer::create() private to force consumers to get a CStringBuffer from a CString.
2852
2853         * platform/text/CString.cpp:
2854         (WebCore::CString::init):
2855         (WebCore::CString::mutableData):
2856         (WebCore::CString::newUninitialized):
2857         (WebCore::CString::copyBufferIfNeeded):
2858         * platform/text/CString.h:
2859         (WebCore::CStringBuffer::data):
2860         (WebCore::CStringBuffer::length):
2861         (WebCore::CStringBuffer::create):
2862         (WebCore::CStringBuffer::mutableData):
2863         (WebCore::CString::CString):
2864         (WebCore::CString::buffer):
2865
2866 2009-02-19  Dmitry Titov  <dimich@chromium.org>
2867
2868         Reviewed by Alexey Proskuryakov.
2869
2870         https://bugs.webkit.org/show_bug.cgi?id=24017
2871         Remove some usage of Document in Worker.
2872
2873         * dom/WorkerContext.h:
2874         (WebCore::WorkerContext::userAgent):
2875         * dom/Document.cpp:
2876         (WebCore::Document::userAgent):
2877         * dom/Document.h:
2878         * dom/ScriptExecutionContext.h:
2879         Added virtual ScriptExecutionContext::userAgent(const KURL&).
2880         Document implementation uses FrameLoader::userAgent and
2881         WorkerContext receives the string on creation and stores it in a member.
2882
2883         * dom/Worker.cpp:
2884         (WebCore::Worker::Worker):
2885         (WebCore::Worker::notifyFinished):
2886         * dom/Worker.h:
2887         (WebCore::Worker::create):
2888         Instead of Document the Worker constructor now gets a ScriptExecutionContext.
2889         Start using some methods on SEC (like completeURL() and userAgent()).
2890         For others, explicitly case to Document and add a FIXME.
2891         Remove Worker::document() too.
2892
2893 2009-02-20  Gustavo Noronha Silva  <gns@gnome.org>
2894
2895         Rubber-stamped by Holger Freyther.
2896
2897         Do not set httpStatus to SOUP_STATUS_OK when serving local files
2898         to match other ports' behavior, fixing xmlhttprequest test
2899         regressions.
2900
2901         * platform/network/soup/ResourceHandleSoup.cpp:
2902         (WebCore::queryInfoCallback):
2903
2904 2009-02-19  Dan Bernstein  <mitz@apple.com>
2905
2906         Reviewed by Sam Weinig.
2907
2908         - WebCore part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
2909           Do not send loader callbacks during CSS styling
2910
2911         Undo the iChat-specific quirk added in
2912         <http://trac.webkit.org/changeset/41071>. Instead, always suspend memory
2913         cache client callbacks during attach() and recalcStyle().
2914
2915         * WebCore.base.exp: Removed
2916         Settings::setNeedsIChatMemoryCacheCallsQuirk().
2917         * dom/ContainerNode.cpp:
2918         (WebCore::ContainerNode::suspendPostAttachCallbacks): Disable memory
2919         cache client callbacks and remember to enable them afterwards if needed.
2920         (WebCore::ContainerNode::resumePostAttachCallbacks): Re-enable memory
2921         cache client callbacks if they were disabled in
2922         suspendPostAttachCallbacks().
2923         (WebCore::ContainerNode::attach): Use suspendPostAttachCallbacks() and
2924         resumePostAttachCallbacks().
2925         * dom/ContainerNode.h: Made suspendPostAttachCallbacks()
2926         and resumePostAttachCallbacks() non-static.
2927         * dom/Document.cpp:
2928         (WebCore::Document::dispatchImageLoadEventsNow): Reverted iChat-specific
2929         workaround.
2930         * page/Settings.cpp: Removed m_needsIChatMemoryCacheCallsQuirk and
2931         related code.
2932         (WebCore::Settings::Settings):
2933         * page/Settings.h:
2934
2935 2009-02-19  Holger Hans Peter Freyther  <zecke@selfish.org>
2936
2937         Unreviewed build fix.
2938
2939         Build fix after r41092. Make the memoryUsage method
2940         public. It will be shadowed by cf/mac and for curl/soup/qt
2941         the implementation from ResourceResponseBase will be used.
2942
2943         * platform/network/ResourceResponseBase.h:
2944         (WebCore::ResourceResponseBase::memoryUsage):
2945
2946 2009-02-19  Beth Dakin  <bdakin@apple.com>
2947
2948         Reviewed by Dave Hyatt.
2949
2950         Fix for <rdar://problem/6077775> Should be able to specify
2951         inactive ::selection color
2952
2953         This patch makes the ::selction pseudo-element work with
2954         the :window-inactive pseudo type. This was, a user can specify a
2955         different ::selection style when a window is inactive.
2956
2957         * css/CSSStyleSelector.cpp:
2958         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
2959         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
2960         * rendering/RenderObject.cpp:
2961         (WebCore::RenderObject::selectionBackgroundColor):
2962         (WebCore::RenderObject::selectionForegroundColor):
2963
2964 2009-02-19  Sam Weinig  <sam@webkit.org>
2965
2966         Reviewed by Beth Dakin.
2967
2968         Patch for https://bugs.webkit.org/show_bug.cgi?id=24044
2969         Update querySelector/querySelectorAll to match the latest spec
2970
2971         Update querySelector and querySelectorAll to match the latest version
2972         of the Selectors API spec.  We now stringify null and undefined to "null"
2973         and "undefined" respectively instead of to "".
2974
2975         Test: fast/dom/SelectorAPI/undefined-null-stringify.html
2976
2977         * dom/Document.idl:
2978         * dom/DocumentFragment.idl:
2979         * dom/Element.idl:
2980
2981 2009-02-19  Dimitri Glazkov  <dglazkov@chromium.org>
2982
2983         Reviewed by Geoffrey Garen.
2984
2985         https://bugs.webkit.org/show_bug.cgi?id=23732
2986         Rework CachedResource overhead accounting to allow platforms to diverge
2987         in numbers.
2988
2989         * loader/CachedResource.cpp:
2990         (WebCore::CachedResource::overheadSize): Changed to ask ResourceResponse
2991         for its size and to use actual URL size.
2992         * platform/network/ResourceResponseBase.h:
2993         (WebCore::ResourceResponseBase::size): Added default size method.
2994         * platform/network/cf/ResourceResponse.h:
2995         (WebCore::ResourceResponse::size): Added Win/CF size method
2996         * platform/network/mac/ResourceResponse.h:
2997         (WebCore::ResourceResponse::size): Added Mac size method.
2998
2999 2009-02-19  Anders Carlsson  <andersca@apple.com>
3000
3001         Reviewed by Kevin Decker.
3002
3003         - Fix for <rdar://problem/6604968>
3004
3005         On Tiger, create an autorelease pool before creating the NSGraphicsContext and drain it immediately
3006         after the call to -[NSView displayRectIgnoringOpacity:inContext:].
3007
3008         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3009         (WebCore::MediaPlayerPrivate::paint):
3010
3011 2009-02-19  David Hyatt  <hyatt@apple.com>
3012
3013         Fix a bug where reflections didn't work properly if opacity was < 1.  Make sure that replaced elements
3014         also consider reflections to be part of their visual overflow.  This had already been done for blocks
3015         and lines, but it wasn't being done yet for replaced elements.
3016
3017         Also make sure that when the object being reflected has opacity < 1 that we don't end up popping the outer
3018         transparency layer early.  Since the reflected object paints twice, we don't want to end the transparency
3019         layer it pushed until we're done painting the real object (rather than the reflection).
3020
3021         Reviewed by Dan Bernstein
3022
3023         Added fast/reflections/reflection-masks-opacity.html
3024
3025         * rendering/RenderLayer.cpp:
3026         (WebCore::RenderLayer::paintLayer):
3027         * rendering/RenderPartObject.cpp:
3028         (WebCore::RenderPartObject::layout):
3029         * rendering/RenderReplaced.cpp:
3030         (WebCore::RenderReplaced::layout):
3031         (WebCore::RenderReplaced::adjustOverflowForBoxShadowAndReflect):
3032         * rendering/RenderReplaced.h:
3033
3034 2009-02-19  David Levin  <levin@chromium.org>
3035
3036         Reviewed by Alexey Proskuryakov.
3037
3038         Bug 23980: WorkerRunLoop needs a way to run in a given mode similar to CFRunLoopInMode.
3039         <https://bugs.webkit.org/show_bug.cgi?id=23980>
3040
3041         WorkerRunLoop has the ability to run in a mode which filters the tasks to be run.
3042         * When WorkerRunLoop::runInMode is called, only task for that mode will run.
3043         * When WorkerRunLoop::run is called (or the default mode is used), then all tasks
3044           will run regardless of their posted mode.
3045
3046         Here's a demonstration of the api:
3047
3048             RefPtr<NameResolution> nameResolution = NameResolution::create(workerRunLoop);
3049
3050             //  Internally nameResolution will do workerRunLoop.postTaskForMode(task, "MyCoolMode")
3051             //  for any tasks that need to be run during this loop.
3052             nameResolution->setTaskMode("MyCoolMode");
3053
3054             nameResolution->start();
3055             while (!nameResolution->done()) {
3056                 // Only tasks which are posted for "MyCoolMode" will run.
3057                 workerRunLoop.runInMode(context, "MyCoolMode");
3058             }
3059
3060         No observable change in behavior, so no test.
3061
3062         * dom/WorkerRunLoop.cpp:
3063         (WebCore::ModePredicate::ModePredicate):
3064         (WebCore::ModePredicate::operator()):
3065         (WebCore::WorkerRunLoop::WorkerRunLoop):
3066         (WebCore::WorkerRunLoop::~WorkerRunLoop):
3067         (WebCore::WorkerRunLoop::setSharedTimer):
3068         (WebCore::WorkerRunLoop::resetSharedTimer):
3069         (WebCore::WorkerRunLoop::run):
3070         (WebCore::WorkerRunLoop::runInMode):
3071         (WebCore::WorkerRunLoop::postTask):
3072         (WebCore::WorkerRunLoop::postTaskForMode):
3073         * dom/WorkerRunLoop.h:
3074         (WebCore::WorkerRunLoop::Task::create):
3075         (WebCore::WorkerRunLoop::Task::mode):
3076         (WebCore::WorkerRunLoop::Task::performTask):
3077         (WebCore::WorkerRunLoop::Task::Task):
3078
3079 2009-02-19  Dimitri Glazkov  <dglazkov@chromium.org>
3080
3081         Reviewed by Eric Seidel.
3082
3083         https://bugs.webkit.org/show_bug.cgi?id=24034
3084         Fix up Selection->VisibleSelection change.
3085
3086         * page/chromium/EventHandlerChromium.cpp:
3087         (WebCore::EventHandler::passMousePressEventToSubframe): Renamed Selection
3088         to VisibleSelection.
3089
3090 2009-02-19  Dimitri Glazkov  <dglazkov@chromium.org>
3091
3092         Reviewed by Eric Seidel.
3093
3094         https://bugs.webkit.org/show_bug.cgi?id=24041
3095         Correct Skia type conversion issues, fix Chromium Linux build.
3096
3097         * platform/graphics/chromium/FontLinux.cpp:
3098         (WebCore::Font::drawGlyphs): changed parameters to RGBA32, not WebCore::Color.
3099
3100 2009-02-19  Jungshik Shin <jshin@chromium.org>
3101
3102         Reviewed by Eric Seidel.
3103
3104         https://bugs.webkit.org/show_bug.cgi?id=20531
3105         Chromium-part follow-up to the patch landed in r40636
3106         for bug 20531.
3107         Remove a static member function alternateFamilyName
3108         from Chromium's Win/Linux ports of FontCache. In r40636,
3109         alternateFamilyName was customized using #ifdef PLATFORM(WIN_OS).
3110         So, there's no more need for the static member function per
3111         platform.
3112
3113         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3114         * platform/graphics/chromium/FontCacheLinux.cpp:
3115
3116 2009-02-19  Simon Fraser  <simon.fraser@apple.com>
3117
3118         Reviewed by Adele Peterson.
3119
3120         Call documentWillBecomeInactive() from Document::detach to ensure that
3121         media elements are shut down, because they may be kept alive by references
3122         from JS past document teardown.
3123
3124         documentWillBecomeInactive() calls  renderView()->willMoveOffscreen(), so no
3125         need to do that in detach() as well.
3126
3127         We no longer need to call documentWillBecomeInactive() from ~Page() (which
3128         was added for <https://bugs.webkit.org/show_bug.cgi?id=21116>), since this
3129         supersedes that change.
3130
3131         * dom/Document.cpp:
3132         (WebCore::Document::detach):
3133         * page/Page.cpp:
3134         (WebCore::Page::~Page):
3135
3136 2009-02-19  Dimitri Glazkov  <dglazkov@chromium.org>
3137
3138         Reviewed by Eric Seidel.
3139
3140         https://bugs.webkit.org/show_bug.cgi?id=24028
3141         Fix up Skia path changes.
3142
3143         * platform/graphics/skia/GraphicsContextSkia.cpp:
3144         (WebCore::GraphicsContext::strokePath): Removed illegal indirection.
3145         * platform/graphics/skia/PathSkia.cpp:
3146         (WebCore::boundingBoxForCurrentStroke): Changed call name.
3147
3148 2009-02-19  Gustavo Noronha Silva  <gns@gnome.org>
3149
3150         Reviewed by Alexey Proskuryakov.
3151
3152         Ignore ports on local URLs. This fixes a regression in
3153         fast/loader/file-URL-with-port-number.html
3154
3155         * platform/network/soup/ResourceHandleSoup.cpp:
3156         (WebCore::ResourceHandle::startGio):
3157
3158 2009-02-19  Gustavo Noronha Silva  <gns@gnome.org>
3159
3160         Reviewed by Alexey Proskuryakov.
3161
3162         https://bugs.webkit.org/show_bug.cgi?id=24011
3163         KURL's setPort doesn't unset port if 0 is given
3164
3165         Make setPort remove port if 0 is given to it, as promised by the
3166         comment in KURL's header.
3167
3168         * platform/KURL.cpp:
3169         (WebCore::KURL::setPort):
3170
3171 2009-02-18  Dan Bernstein  <mitz@apple.com>
3172
3173         Reviewed by Brady Eidson.
3174
3175         - WebCore part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
3176
3177         The crash results from re-entry into
3178         CSSMutableStyleDeclaration::setCssText, which in turn is caused by
3179         the first style change causing a cached image to load from the memory
3180         cache, causing load delegate dispatch, and iChat's delegate method
3181         calling back into WebKit.
3182
3183         The workaround is to use defer delegate callbacks for memory cache. In
3184         this case, deferring callbacks during image load event dispatch was
3185         found to be sufficient.
3186
3187         The crash is a regression. See also the discussion in
3188         <https://bugs.webkit.org/show_bug.cgi?id=22521>.
3189
3190         * WebCore.base.exp: Added
3191         Settings::setNeedsIChatMemoryCacheCallsQuirk().
3192         * dom/Document.cpp:
3193         (WebCore::Document::dispatchImageLoadEventsNow): If the quirk is
3194         enabled, defer memory cache callbacks during image load event dispatch.
3195         * page/Settings.cpp:
3196         (WebCore::Settings::Settings): Initialize
3197         m_needsIChatMemoryCacheCallsQuirk.
3198         (WebCore::Settings::setNeedsIChatMemoryCacheCallsQuirk): Added this
3199         setter.
3200         * page/Settings.h:
3201         (WebCore::Settings::needsIChatMemoryCacheCallsQuirk): Added this getter.
3202
3203 2009-02-18  Adam Roben  <aroben@apple.com>
3204
3205         Export WebCore::handCursor and Cursor.h
3206
3207         Reviewed by John Sullivan.
3208
3209         * WebCore.base.exp: Added WebCore::handCursor.
3210         * WebCore.xcodeproj/project.pbxproj: Made Cursor.h private.
3211
3212 2009-02-18  Ojan Vafai  <ojan@chromium.org>
3213
3214         Reviewed by Alexey Proskuryakov.
3215
3216         https://bugs.webkit.org/show_bug.cgi?id=23992
3217         REGRESSION: crash on windows loading http://www.stickam.com/liveStreams.do
3218
3219         Unable to reduce to a layout test.
3220
3221         * page/Frame.cpp:
3222         (WebCore::Frame::contentRenderer):
3223
3224 2009-02-18  Evan Stade  <estade@chromium.org>
3225
3226         Reviewed by Eric Seidel.
3227
3228         https://bugs.webkit.org/show_bug.cgi?id=23861
3229         Stroke font outlines on chromium linux
3230
3231         TEST=LayoutTests/svg/custom/pointer-events-text.svg
3232
3233         * platform/graphics/chromium/FontLinux.cpp:
3234         (WebCore::Font::drawGlyphs):
3235
3236 2009-02-18  Evan Stade  <estade@chromium.org>
3237
3238         Reviewed by Eric Seidel.
3239
3240         https://bugs.webkit.org/show_bug.cgi?id=23860
3241         Resync some graphics/skia files with their chromium counterparts
3242
3243         This comes from chromium patches <http://codereview.chromium.org/17633>
3244         and <http://codereview.chromium.org/17454>
3245
3246         * platform/graphics/skia/GraphicsContextSkia.cpp:
3247         (WebCore::GraphicsContext::clipPath):
3248         (WebCore::GraphicsContext::fillPath):
3249         * platform/graphics/skia/PlatformContextSkia.cpp:
3250         (PlatformContextSkia::addPath):
3251         (PlatformContextSkia::currentPath):
3252         * platform/graphics/skia/PlatformContextSkia.h:
3253
3254 2009-02-18  Gustavo Noronha Silva  <gns@gnome.org>
3255
3256         Unreviewed.
3257
3258         Build fix after r41060.
3259
3260         * GNUmakefile.am:
3261
3262 2009-02-18  Dimitri Glazkov  <dglazkov@chromium.org>
3263
3264         Reviewed by Eric Seidel.
3265
3266         https://bugs.webkit.org/show_bug.cgi?id=24005
3267         Add an include to fix Chromium build.
3268
3269         * page/animation/AnimationController.cpp: Add UnusedParam.h include.
3270
3271 2009-02-18  Gustavo Noronha Silva  <gns@gnome.org>
3272
3273         Reviewed by Holger Freyther.
3274
3275         Fix symbols.filter location, and add other missing files to the
3276         autotools build, so that make dist works.
3277
3278         * GNUmakefile.am:
3279
3280 2009-02-18  Zan Dobersek  <zandobersek@gmail.com>
3281
3282         Rubber-stamped by Holger Hans Peter Freyther.
3283
3284         Allow POST method for local requests.
3285
3286         * platform/network/soup/ResourceHandleSoup.cpp:
3287         (WebCore::ResourceHandle::startGio):
3288
3289 2009-02-18  Gustavo Noronha Silva  <gns@gnome.org>
3290
3291         Reviewed by Holger Hans Peter Freyther.
3292
3293         Use KURL in startGio instead of passing a string with the URL, so
3294         that we can handle removing refs and queries more elegantly. This
3295         is fixing more regressions that came from the curl->soup switch.
3296
3297         Original work by Zan Dobersek.
3298
3299         * platform/network/ResourceHandle.h:
3300         * platform/network/soup/ResourceHandleSoup.cpp:
3301         (WebCore::ResourceHandle::start):
3302         (WebCore::ResourceHandle::startGio):
3303
3304 2009-02-18  Holger Hans Peter Freyther  <zecke@selfish.org>
3305
3306         Reviewed by Alexey Proskuryakov.
3307
3308         Implement ResourceHandle::loadResourceSynchronously in ResourceHandleSoup.cpp
3309
3310         The implementation is needed to have synchronous loading, e.g. for
3311         JavaScript interaction. This is fixing various regressions that
3312         came from the curl->soup switch.
3313
3314         * platform/network/soup/ResourceHandleSoup.cpp:
3315         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
3316         (WebCore::WebCoreSynchronousLoader::~WebCoreSynchronousLoader):
3317         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
3318         (WebCore::WebCoreSynchronousLoader::didReceiveData):
3319         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
3320         (WebCore::WebCoreSynchronousLoader::didFail):
3321         (WebCore::WebCoreSynchronousLoader::run):
3322         (WebCore::ResourceHandle::loadResourceSynchronously):
3323
3324 2009-02-18  Xan Lopez  <xan@gnome.org>
3325
3326         Reviewed by Mark Rowe.
3327
3328         https://bugs.webkit.org/show_bug.cgi?id=23989
3329
3330         Based on a patch by Bo Yang  <techrazy.yang@gmail.com>
3331
3332         Make the cursor cache global, that's all we really need and
3333         otherwise we can miss cursor transitions in some situations (see
3334         the bug for one testcase). Also remove some now useless code.
3335
3336         * platform/Widget.h:
3337         * platform/gtk/WidgetGtk.cpp:
3338         (WebCore::Widget::Widget):
3339         (WebCore::Widget::~Widget):
3340         (WebCore::Widget::setCursor):
3341
3342 2009-02-17  Adam Roben  <aroben@apple.com>
3343
3344         Windows build fix
3345
3346         * loader/FrameLoader.cpp:
3347         (WebCore::toPlugInElement): Don't rely on #if being processed before
3348         ASSERT.
3349
3350 2009-02-17  David Levin  <levin@chromium.org>
3351
3352         Reviewed by Alexey Proskuryakov.
3353
3354         Bug 23977: Unnecessary timer related headers in files.
3355         <https://bugs.webkit.org/show_bug.cgi?id=23977>
3356
3357         No observable change in behavior, so no test.
3358
3359         * dom/Document.cpp:
3360         * dom/WorkerRunLoop.cpp:
3361         * dom/WorkerRunLoop.h:
3362
3363 2009-02-17  Peter Abrahamsen  <rainhead@gmail.com>
3364
3365         Reviewed by Sam Weinig.
3366
3367         https://bugs.webkit.org/show_bug.cgi?id=23958
3368         <rdar://problem/6587815>
3369
3370         Updated XMLHttpRequest with new header names from the latest Access
3371         Control draft: http://www.w3.org/TR/access-control/
3372         - Access-Control-Origin becomes Access-Control-Allow-Origin
3373         - Access-Control-Credentials becomes Access-Control-Allow-Credentials
3374
3375         * xml/XMLHttpRequest.cpp:
3376         (WebCore::XMLHttpRequest::accessControlCheck):
3377
3378 2009-02-17  Kevin Ollivier  <kevino@theolliviers.com>
3379
3380         wx build fix. Add missing constructor used for empty values.
3381
3382         * platform/graphics/wx/FontPlatformData.h:
3383         (WebCore::FontPlatformData::FontPlatformData):
3384
3385 2009-02-17  Antti Koivisto  <antti@apple.com>
3386
3387         Reviewed by Dave Kilzer.
3388
3389         <rdar://problem/6592446> dynamically updating page doesn't seem to draw when updated
3390
3391         Need update after callback.
3392
3393         * bindings/js/JSCustomPositionCallback.cpp:
3394         (WebCore::JSCustomPositionCallback::handleEvent):
3395         * bindings/js/JSCustomPositionErrorCallback.cpp:
3396         (WebCore::JSCustomPositionErrorCallback::handleEvent):
3397
3398 2009-02-17  Eric Carlson  <eric.carlson@apple.com>
3399
3400         Reviewed by Antti Koivisto.
3401
3402         https://bugs.webkit.org/show_bug.cgi?id=23917
3403         Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
3404         element.
3405
3406         * DerivedSources.make: add media element proxy exports to .exp file when feature is defined.
3407
3408         * WebCore.VideoProxy.exp: New, define the informal protocol exported by a media element proxy.
3409
3410         * WebCore.xcodeproj/project.pbxproj: Add MediaPlayerProxy.h.
3411
3412         * html/HTMLMediaElement.cpp:
3413         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_needWidgetUpdate.
3414         (WebCore::HTMLMediaElement::attributeChanged): Don't detach+attach when PLUGIN_PROXY_FOR_VIDEO, the
3415         proxy plug-in handles the poster frame.
3416         (WebCore::HTMLMediaElement::rendererIsNeeded): New logic for PLUGIN_PROXY_FOR_VIDEO.
3417         (WebCore::HTMLMediaElement::createRenderer): Create RenderPartObject when PLUGIN_PROXY_FOR_VIDEO.
3418         (WebCore::HTMLMediaElement::attach): Set m_needWidgetUpdate when PLUGIN_PROXY_FOR_VIDEO
3419         (WebCore::HTMLMediaElement::load): Don't reallocate MediaPlayer when PLUGIN_PROXY_FOR_VIDEO, we keep the
3420         same plug-in for the life of the element.
3421         (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged): update m_networkState when media player
3422         network state changes to EMPTY, otherwise we can get out of sync with engine.
3423         (WebCore::HTMLMediaElement::defaultEventHandler): pass event to widget when PLUGIN_PROXY_FOR_VIDEO
3424         (WebCore::HTMLMediaElement::deliverNotification): New, deliver notification from proxy plug-in to
3425         media player.
3426         (WebCore::HTMLMediaElement::setMediaPlayerProxy): New, pass proxy object to media player.
3427         (WebCore::HTMLMediaElement::initialURL): New, return the url from the "src" attr or the appropriate
3428         <source> element to be used as the initial url for the proxy.
3429         (WebCore::HTMLMediaElement::finishParsingChildren): New, allocate MediaPlayer and update widget.
3430         * html/HTMLMediaElement.h: Declare new methods for proxy, add m_needWidgetUpdate.
3431         (WebCore::HTMLMediaElement::setNeedWidgetUpdate):
3432
3433         * html/HTMLVideoElement.cpp:
3434         (WebCore::HTMLVideoElement::attach): Poster image is handled by proxy when PLUGIN_PROXY_FOR_VIDEO.
3435         (WebCore::HTMLVideoElement::parseMappedAttribute): Ditto.
3436         * html/HTMLVideoElement.h:
3437
3438         * loader/FrameLoader.cpp:
3439         (WebCore::toPlugInElement): Allow cast if element is <video> or <audio>
3440
3441         * platform/graphics/MediaPlayer.cpp:
3442         (WebCore::MediaPlayer::MediaPlayer): Remove white space.
3443         (WebCore::MediaPlayer::setPoster): New, forward call to private player.
3444         (WebCore::MediaPlayer::deliverNotification): Ditto.
3445         (WebCore::MediaPlayer::setMediaPlayerProxy): Ditto.
3446         * platform/graphics/MediaPlayer.h:
3447         (WebCore::MediaPlayer::mediaPlayerClient):
3448
3449         * platform/graphics/mac/MediaPlayerProxy.h: New, defines media player proxy interface.
3450
3451         * rendering/RenderPart.cpp:
3452         (WebCore::RenderPart::RenderPart): Change constructor to take Element* instead of Node* as a
3453         non-element node doesn't need a renderer
3454         * rendering/RenderPart.h: Ditto.
3455
3456         * rendering/RenderPartObject.cpp:
3457         (WebCore::RenderPartObject::RenderPartObject): Ditto.
3458         (WebCore::RenderPartObject::updateWidget): Package params for proxy plug-in when element is
3459         <video> or <audio>.
3460         * rendering/RenderPartObject.h:
3461
3462 2009-02-17  David Hyatt  <hyatt@apple.com>
3463
3464         Reviewed by Eric Seidel
3465
3466         Fix for https://bugs.webkit.org/show_bug.cgi?id=23985
3467
3468         Don't allow legends to be anything but display:block.
3469
3470         Added fast/forms/inline-ignored-on-legend.html
3471
3472         * GNUmakefile.am:
3473         * WebCore.pro:
3474         * WebCore.vcproj/WebCore.vcproj:
3475         * WebCore.xcodeproj/project.pbxproj:
3476         * WebCoreSources.bkl:
3477         * css/html4.css:
3478         * html/HTMLLegendElement.cpp:
3479         * html/HTMLLegendElement.h:
3480         * rendering/RenderLegend.cpp: Removed.
3481         * rendering/RenderLegend.h: Removed.
3482         * wml/WMLInsertedLegendElement.cpp:
3483         * wml/WMLInsertedLegendElement.h:
3484
3485 2009-02-13  Brett Wilson  <brettw@dhcp-172-22-71-167.mtv.corp.google.com>
3486
3487         Reviewed by Simon Fraser.
3488
3489         https://bugs.webkit.org/attachment.cgi?id=27666
3490         Fix Chromium build build: forgotten include in RenderObject, sync
3491         RenderTheme to the recent changes in RenderObject.
3492
3493         * rendering/RenderObject.cpp:
3494         * rendering/RenderThemeChromiumMac.mm:
3495         (WebCore::RenderThemeChromiumMac::updatePressedState):
3496
3497 2009-02-17  Gustavo Noronha Silva  <gns@gnome.org>
3498
3499         Reviewed by Darin Adler.
3500
3501         https://bugs.webkit.org/show_bug.cgi?id=22966
3502         crash when destroying a webview that opened a page containing <script>
3503         tags
3504
3505         Fix m_group being set to 0 instead of to m_singlePageGroup when
3506         GroupName is set to empty
3507
3508         * page/Page.cpp:
3509         (WebCore::Page::setGroupName):
3510
3511 2009-02-16  Beth Dakin  <bdakin@apple.com>
3512
3513         Reviewed by Sam Weinig.
3514
3515         Fix for <rdar://problem/6386623>
3516
3517         I made m_numParsedProperties and m_maxParsedProperties unsigned
3518         instead of int, and then added an early return from addPropery() if
3519         m_maxParsedProperties exceeds the max value.
3520
3521         * css/CSSParser.cpp:
3522         (WebCore::CSSParser::addProperty):
3523         (WebCore::CSSParser::rollbackLastProperties):
3524         (WebCore::CSSParser::clearProperties):
3525         (WebCore::CSSParser::createFontFaceRule):
3526         (WebCore::CSSParser::deleteFontFaceOnlyValues):
3527         * css/CSSParser.h:
3528
3529 2009-02-16  Justin Garcia  <justin.garcia@apple.com>
3530
3531         Reviewed by Mark Rowe.
3532
3533         https://bugs.webkit.org/show_bug.cgi?id=16309
3534         HTML5: The third execCommand argument for insert{un}orderedlist should be ignored
3535
3536         When we originally implemented this command, MSDN documentation said that IE set the
3537         id attribute of inserted lists to the third argument to execCommand, but IE doesn't
3538         do this nor do any other browsers.
3539
3540         * editing/EditorCommand.cpp:
3541         (WebCore::executeInsertOrderedList):
3542         (WebCore::executeInsertUnorderedList):
3543         * editing/IndentOutdentCommand.cpp:
3544         (WebCore::IndentOutdentCommand::outdentParagraph):
3545         * editing/InsertListCommand.cpp:
3546         (WebCore::InsertListCommand::insertList):
3547         (WebCore::InsertListCommand::InsertListCommand):
3548         (WebCore::InsertListCommand::doApply):
3549         * editing/InsertListCommand.h:
3550         (WebCore::InsertListCommand::create):
3551
3552 2009-02-16  Dan Bernstein  <mitz@apple.com>
3553
3554         Reviewed by Geoffrey Garen.
3555
3556         - fix <rdar://problem/6561077> REGRESSION (r39634): Unable to select an item in stocks widget with the mouse
3557
3558         Test: platform/mac/fast/events/pointer-events-dashboard.html
3559
3560         * css/CSSStyleSelector.cpp:
3561         (WebCore::CSSStyleSelector::applyProperty): Do not apply the
3562         pointer-events property in Dashboard backwards compatibility mode,
3563         in order to work around misuse of that property by the Stocks widget.
3564
3565 2009-02-16  Justin Garcia  <justin.garcia@apple.com>
3566
3567         Reviewed by Eric Seidel.
3568
3569         https://bugs.webkit.org/show_bug.cgi?id=15381
3570         execCommand justify modifies the contentEditable node
3571
3572         * editing/CompositeEditCommand.cpp:
3573         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Avoid modifying not just
3574         the body element, but any root editable element.
3575
3576 2009-02-16  Chris Fleizach  <cfleizach@apple.com>
3577
3578         Reviewed by Adele Peterson.
3579
3580         Bug 23979: AX: alt tag not returned for <input type="image">
3581         https://bugs.webkit.org/show_bug.cgi?id=23979
3582
3583         Test: accessibility/input-image-alt.html
3584
3585         * page/AccessibilityRenderObject.cpp:
3586         (WebCore::AccessibilityRenderObject::accessibilityDescription):
3587
3588 2009-02-16  Kevin Watters  <kevinwatters@gmail.com>
3589
3590         Reviewed by Kevin Ollivier.
3591
3592         The ref data is not properly set unless we use the CreateMatrix function.
3593
3594         https://bugs.webkit.org/show_bug.cgi?id=23978
3595
3596         * platform/graphics/wx/TransformationMatrixWx.cpp:
3597         (WebCore::TransformationMatrix::operator wxGraphicsMatrix):
3598
3599 2009-02-16  Dan Bernstein  <mitz@apple.com>
3600
3601         Reviewed by John Sullivan.
3602
3603         - fix <rdar://problem/6516829> FontPlatformData constructor passes NULL to CTFontCopyGraphicsFont and CTFontGetPlatformFont
3604
3605         * platform/graphics/FontCache.cpp:
3606         (WebCore::FontDataCacheKeyTraits::emptyValue): Changed to use the
3607         FontPlatformData(float, bool, bool) constructor.
3608         * platform/graphics/mac/FontCacheMac.mm:
3609         (WebCore::FontCache::createFontPlatformData): Changed to pass a valid
3610         NSFont to the FontPlatformData constructor, instead of implicitly
3611         passing 0 and then calling setFont().
3612         * platform/graphics/mac/FontPlatformData.h: Made the NSFont parameter
3613         of the constructor mandatory.
3614
3615 2009-02-15  David Kilzer  <ddkilzer@apple.com>
3616
3617         Move duplicate caretWidth constants to RenderObject.h
3618
3619         Reviewed by Dan Bernstein.
3620
3621         No test since no change in behavior.
3622
3623         * rendering/RenderBlock.cpp: