2009-03-13 John Abd-El-Malek <jam@google.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2009-03-13  John Abd-El-Malek  <jam@google.com>
2
3         Reviewed by Darin Fisher.
4
5         https://bugs.webkit.org/show_bug.cgi?id=24593
6         Added requestorID so we can track the request to its WebView without using frame (which was removed).
7
8         * platform/network/chromium/ResourceRequest.h:
9         (WebCore::ResourceRequest::ResourceRequest):
10         (WebCore::ResourceRequest::requestorID):
11         (WebCore::ResourceRequest::setRequestorID):
12         (WebCore::ResourceRequest::setTargetType):
13         (WebCore::ResourceRequest::policyURL):
14         (WebCore::ResourceRequest::setPolicyURL):
15         (WebCore::ResourceRequest::requestorPid):
16         (WebCore::ResourceRequest::setRequestorPid):
17
18 2009-03-13  Mike Belshe  <mike@belshe.com>
19
20         Reviewed by Dimitri Glazkov.
21
22         https://bugs.webkit.org/show_bug.cgi?id=24561
23         Add custom V8 bindings for HTMLElementCanvas, Location.
24
25         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: Added.
26         * bindings/v8/custom/V8LocationCustom.cpp: Added.
27
28 2009-03-13  Stephen White  <senorblanco@chromium.org>
29
30         Reviewed by Eric Seidel.
31
32         https://bugs.webkit.org/show_bug.cgi?id=24584
33
34         Fix transparent text rendering on Chromium.  FontChromiumWin
35         was calling beginTransparencyLayer()/endTransparencyLayer(), with
36         a TransparencyWin inside to do GDI ClearType rendering over an
37         opaque background.  TransparencyWin does its special sauce
38         in the destructor, but it was being called too late to be used
39         correctly in the layer.  Put the special sauce into a new function,
40         composite(), and call that explicitly instead.
41
42         * platform/graphics/chromium/FontChromiumWin.cpp:
43         (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter):
44         * platform/graphics/chromium/TransparencyWin.cpp:
45         (WebCore::TransparencyWin::~TransparencyWin):
46         (WebCore::TransparencyWin::composite):
47         (WebCore::TransparencyWin::init):
48         * platform/graphics/chromium/TransparencyWin.h:
49         * rendering/RenderThemeChromiumWin.cpp:
50         (WebCore::):
51
52 2009-03-13  Mike Belshe  <mike@belshe.com>
53
54         Reviewed by Dimitri Glazkov.
55
56         https://bugs.webkit.org/show_bug.cgi?id=24562
57         Add custom implementation for getCSSCanvasContext to V8 bindings.
58
59         * bindings/v8/custom/V8DocumentCustom.cpp: Added new method.
60
61 2009-03-13  Mike Belshe  <mike@belse.com>
62
63         Reviewed by Dimitri Glazkov.
64
65         https://bugs.webkit.org/show_bug.cgi?id=24580
66         Fix query() to match KURL behavior.
67
68         * platform/KURLGoogle.cpp:
69         (WebCore::KURL::query): remove extra logic around question mark.
70
71 2009-03-13  Chris Fleizach  <cfleizach@apple.com>
72
73         Reviewed by Beth Dakin.
74
75         Bug 24474: AX: in multi-body tables, asking for a cell at a specific coordinate can return nil
76         https://bugs.webkit.org/show_bug.cgi?id=24474
77
78         Test: platform/mac-snowleopard/accessibility/table-multi-bodies.html
79
80         * page/AccessibilityTable.cpp:
81         (WebCore::AccessibilityTable::cellForColumnAndRow):
82
83 2009-03-13  Jian Li  <jianli@chromium.org>
84
85         Reviewed by Dimitri Glazkov.
86
87         https://bugs.webkit.org/show_bug.cgi?id=24589
88         Upstream changes to V8 event listeners (Chromium r11133) in order to
89         fix worker functionality break in Chromium.
90
91         * bindings/v8/V8AbstractEventListener.cpp:
92         (WebCore::V8AbstractEventListener::invokeEventHandler):
93         (WebCore::V8AbstractEventListener::handleEvent):
94         * bindings/v8/V8AbstractEventListener.h:
95         * bindings/v8/V8WorkerContextEventListener.cpp:
96         (WebCore::V8WorkerContextEventListener::handleEvent):
97
98 2009-03-13  Dimitri Glazkov  <dglazkov@chromium.org>
99
100         Reviewed by Timothy Hatcher.
101
102         https://bugs.webkit.org/show_bug.cgi?id=24524
103         Introduce ScriptObject and ScriptFunctionCall abstractions.
104
105         * GNUmakefile.am: Added ScriptObject and ScriptFunctionCall to project.
106         * WebCore.pro: Ditto.
107         * WebCore.vcproj/WebCore.vcproj: Ditto.
108         * WebCore.xcodeproj/project.pbxproj: Ditto.
109         * WebCoreSources.bkl: Ditto.
110         * bindings/js/ScriptFunctionCall.cpp: Added.
111         * bindings/js/ScriptFunctionCall.h: Added.
112         * bindings/js/ScriptObject.cpp: Added.
113         * bindings/js/ScriptObject.h: Added.
114         * bindings/js/ScriptObjectQuarantine.cpp: Added.
115         * bindings/js/ScriptObjectQuarantine.h: Added.
116         * inspector/InspectorController.cpp:
117         (WebCore::InspectorController::populateScriptObjects): Changed to use InspectorDatabaseResource::bind.
118         (WebCore::InspectorController::resetScriptObjects): Changed to use InspectorDatabaseResource::unbind.
119         (WebCore::InspectorController::didOpenDatabase): Changed to use InspectorDatabaseResource::unbind.
120         * inspector/InspectorController.h: Removed addScriptDatabaseResource and
121         removeScriptDatabaseResource declarations.
122         * inspector/InspectorDatabaseResource.cpp:
123         (WebCore::InspectorDatabaseResource::InspectorDatabaseResource):
124         (WebCore::InspectorDatabaseResource::bind): Added.
125         (WebCore::InspectorDatabaseResource::unbind): Added.
126         * inspector/InspectorDatabaseResource.h: Added bind and unbind declarations.
127
128 2009-03-13  Peter Kasting  <pkasting@google.com>
129
130         Reviewed by Eric Seidel.
131
132         https://bugs.webkit.org/show_bug.cgi?id=24467
133         Make Skia drawRect() and stroke behavior match CG.
134
135         This makes drawRect() ignore the stroke width (like CG does), and
136         adds a warning comment about that to the appropriate header.
137
138         It also eliminates some hacky code in Skia's stroke preparation,
139         which tried to adjust odd-width strokes to fall on pixel boundaries.
140         Not only did this not match CG, it wouldn't necessarily work right,
141         because there could be other transforms (e.g. full-page zoom) that
142         would affect the stroke before it reached the device pixel level.
143
144         * platform/graphics/GraphicsContext.h:
145         * platform/graphics/skia/GraphicsContextSkia.cpp:
146         (WebCore::GraphicsContext::drawRect):
147         (WebCore::GraphicsContext::fillRect):
148         * platform/graphics/skia/PlatformContextSkia.cpp:
149         (PlatformContextSkia::drawRect):
150         (PlatformContextSkia::setupPaintForStroking):
151
152 2009-03-13  Jian Li  <jianli@chromium.org>
153
154         Reviewed by Dimitri Glazkov.
155
156         https://bugs.webkit.org/show_bug.cgi?id=24583
157         Need to change scope of constructor and destructor of V8ObjectEventListener from private
158         to protected so that they could be used in its derived class V8WorkerContextEventListener.
159
160         * bindings/v8/V8ObjectEventListener.h:
161
162 2009-03-13  David Levin  <levin@chromium.org>
163
164         Reviewed by Dimitri Glazkov.
165
166         https://bugs.webkit.org/show_bug.cgi?id=24579
167         Many V8*Event* files are misplaced.
168
169         This code is infrastructure for supporting the bindings and thus should
170         be in the bindings/v8 directory.
171
172         * bindings/v8/V8AbstractEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8AbstractEventListener.cpp.
173         * bindings/v8/V8AbstractEventListener.h: Renamed from WebCore/bindings/v8/custom/V8AbstractEventListener.h.
174         * bindings/v8/V8LazyEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8LazyEventListener.cpp.
175         * bindings/v8/V8LazyEventListener.h: Renamed from WebCore/bindings/v8/custom/V8LazyEventListener.h.
176         * bindings/v8/V8ObjectEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8ObjectEventListener.cpp.
177         * bindings/v8/V8ObjectEventListener.h: Renamed from WebCore/bindings/v8/custom/V8ObjectEventListener.h.
178         * bindings/v8/V8WorkerContextEventListener.cpp: Renamed from WebCore/bindings/v8/custom/V8WorkerContextEventListener.cpp.
179         * bindings/v8/V8WorkerContextEventListener.h: Renamed from WebCore/bindings/v8/custom/V8WorkerContextEventListener.h.
180
181 2009-03-13  Adele Peterson  <adele@apple.com>
182
183         Reviewed by Justin Garcia.
184
185         Fix for <rdar://problem/5089327> Color of quoted content is wrong when pasted inside other quoted content
186
187         Test: editing/pasteboard/5089327.html
188
189         Handle spans being pasted within a quoted region in the same way we handle "paste as quotation" content.
190
191         * editing/ReplaceSelectionCommand.cpp:
192         (WebCore::handleStyleSpansBeforeInsertion):
193         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
194
195 2009-03-13  Greg Bolsinga  <bolsinga@apple.com>
196
197         Reviewed by Simon Fraser.
198
199         Update Geolocation perimission dialogs to be asynchronous.
200         https://bugs.webkit.org/show_bug.cgi?id=24505
201
202         Geolocation now requests permission from the Chrome asynchronously.
203         The Chrome is passed the Geolocation object, and the Chrome sets the permission
204         on the Geolocation. Geolocation also tracks if the Chrome should clear its cache
205         of SecurityOrigins with geolocation permission. This is so that the GeolocationService
206         can inform the Chrome of its request, and the Chrome is also free to implement its
207         own policy.
208         
209         * WebCore.base.exp:
210         * WebCore.xcodeproj/project.pbxproj:
211         * page/Chrome.cpp:
212         (WebCore::Chrome::requestGeolocationPermissionForFrame):
213         * page/Chrome.h:
214         * page/ChromeClient.h:
215         (WebCore::ChromeClient::requestGeolocationPermissionForFrame):
216         * page/Geolocation.cpp:
217         (WebCore::Geolocation::Geolocation):
218         (WebCore::Geolocation::getCurrentPosition):
219         (WebCore::Geolocation::watchPosition):
220         (WebCore::Geolocation::setIsAllowed):
221         (WebCore::Geolocation::displayChallengeIfNecessary):
222         (WebCore::Geolocation::geolocationServicePositionChanged):
223         * page/Geolocation.h:
224         (WebCore::Geolocation::isAllowed):
225         (WebCore::Geolocation::setShouldClearCache):
226         (WebCore::Geolocation::shouldClearCache):
227         (WebCore::Geolocation::):
228
229 2009-03-13  Anders Carlsson  <andersca@apple.com>
230
231         Reviewed by Dan Bernstein.
232
233         <rdar://problem/6610666> Revise the Cocoa event model text API
234         
235         Add a NPCocoaEventTextInput event type. Remove the text input variables.
236         
237         * bridge/npapi.h:
238         (_NPCocoaEvent::):
239
240 2009-03-13  Kevin Decker  <kdecker@apple.com>
241
242         Reviewed by Anders.
243
244         <rdar://problem/6630340> REGRESSION (39114-39115): Unity Web Player no longer works if Flip4Mac is also installed
245         
246         The code assumed if we have a plug-in that supports "application/x-oleobject" we should always prefer the object tag
247         over of an embed tag. That assumption can cause the Mac platform to load the wrong plug-in, as Flip4Mac claims supports
248         for x-oleobject.
249         
250         * rendering/RenderPartObject.cpp:
251         (WebCore::shouldUseEmbedDescendant): Made the Mac platform always return true here. 
252
253 2009-03-13  Jian Li  <jianli@chromium.org>
254
255         Reviewed by Dimitri Glazkov.
256
257         https://bugs.webkit.org/show_bug.cgi?id=24559
258         Need to port JSC fix (r41565) to V8 in order to fix layout test onload-single-line-comment.html.
259
260         * bindings/v8/custom/V8LazyEventListener.cpp:
261         (WebCore::V8LazyEventListener::getListenerFunction):
262         (WebCore::V8LazyEventListener::getWrappedListenerFunction):
263
264 2009-03-13  Jian Li  <jianli@chromium.org>
265
266         Reviewed by Dimitri Glazkov.
267
268         https://bugs.webkit.org/show_bug.cgi?id=24557
269         This is to support running multiple workers in a single worker process in chromium.
270
271         * bindings/v8/custom/V8WorkerContextEventListener.cpp:
272         (WebCore::V8WorkerContextEventListener::handleEvent):
273         Add locker to v8 event listener of worker context.
274
275 2009-03-13  Alexey Proskuryakov  <ap@webkit.org>
276
277         Reviewed by Sam Weinig.
278
279         https://bugs.webkit.org/show_bug.cgi?id=24575
280         XHR response is incorrect after a network error.
281
282         Tests: http/tests/xmlhttprequest/cross-site-denied-response-sync-2.html
283                http/tests/xmlhttprequest/cross-site-denied-response-sync.html
284                http/tests/xmlhttprequest/cross-site-denied-response.html
285
286         * xml/XMLHttpRequest.cpp:
287         (WebCore::XMLHttpRequest::networkError): Call internalAbort() to fully reset the request.
288         (WebCore::XMLHttpRequest::didFailRedirectCheck): No need to call internalAbort() here. Note
289         that since internalAbort() can drop GC protection, it is not safe to use the object after
290         this call.
291         (WebCore::XMLHttpRequest::didReceiveData): Check that the request wasn't aborted, and
292         return early if it was. This can happen during sync requests, as the loader does not know
293         that it was aborted, and just synthesizes all callbacks.
294
295 2009-03-13  Adam Bergkvist <adam.bergkvist@ericsson.com>
296
297         Reviewed by Alexey Proskuryakov.
298
299         https://bugs.webkit.org/show_bug.cgi?id=3547
300         XMLHttpRequest.statusText returns always "OK"
301
302         Covered by existing tests (which now pass on all platforms but Mac).
303
304         * xml/XMLHttpRequest.cpp:
305         (WebCore::XMLHttpRequest::statusText): Return ResourceResponse status text. It is now up
306         to each platform to correctly set the status text or set it to "OK" to retain current
307         behavior.
308
309 2009-03-13  Adam Bergkvist <adam.bergkvist@ericsson.com>
310
311         Reviewed by Alexey Proskuryakov.
312
313         https://bugs.webkit.org/show_bug.cgi?id=24349
314         [QT] HTTP status text is never set
315
316         Set HTTP status text to the reason phrase attribute of QNetworkReply.
317
318         * platform/network/qt/QNetworkReplyHandler.cpp:
319         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
320
321 2009-03-12  Simon Fraser  <simon.fraser@apple.com>
322
323         Reviewed by Mark Rowe
324
325         <rdar://problem/6622300>: Reproducible crash on
326         <http://www.editgrid.com/explore/tnc/dave/FusionChart%3A_Candlestick>
327         
328         Prevent CSSStyleSheet::checkLoaded() writing to freed memory when it gets
329         deleted from under itself. The sheetLoaded() notification can allow scripts
330         to run via HTMLTokenizer::executeScriptsWaitingForStylesheets(),
331         which can cause the last ref to the CSSStyleSheet to be released.
332
333         * css/CSSStyleSheet.cpp:
334         (WebCore::CSSStyleSheet::checkLoaded):
335
336 2009-03-12  Kevin Ollivier  <kevino@theolliviers.com>
337
338         wx build fix. Allow make-generated-sources.sh to pass args down to DerivedSources.make
339
340         * make-generated-sources.sh:
341
342 2009-03-12  Adam Treat  <adam.treat@torchmobile.com>
343
344         Reviewed by Oliver Hunt.
345
346         https://bugs.webkit.org/show_bug.cgi?id=24498
347         Fix the Qt port to use the same algorithm for drawing dashed and dotted
348         borders as the other ports.  This makes the Qt port pixel-for-pixel perfect
349         compared to border drawing with Apple's canonical mac port and much closer
350         to konqueror and firefox behavior.
351
352         * platform/graphics/qt/GraphicsContextQt.cpp:
353         (WebCore::GraphicsContext::drawLine):
354
355 2009-02-26  Eric Seidel  <eric@webkit.org>
356
357         Reviewed by Justin Garcia.
358
359         Clean up DOMSelection to use some helper functions
360         making the code smaller, and less error-prone.
361         https://bugs.webkit.org/show_bug.cgi?id=19221
362
363         I tried moving DOMSelection off of rangeCompliantEquivalent
364         but failed.  VisibleSelection holds positions like (table, 1) to mean
365         "after the table".
366
367         * page/DOMSelection.cpp:
368         (WebCore::DOMSelection::visibleSelection):
369         (WebCore::anchorPosition):
370         (WebCore::focusPosition):
371         (WebCore::basePosition):
372         (WebCore::extentPosition):
373         (WebCore::DOMSelection::anchorNode):
374         (WebCore::DOMSelection::anchorOffset):
375         (WebCore::DOMSelection::focusNode):
376         (WebCore::DOMSelection::focusOffset):
377         (WebCore::DOMSelection::baseNode):
378         (WebCore::DOMSelection::baseOffset):
379         (WebCore::DOMSelection::extentNode):
380         (WebCore::DOMSelection::extentOffset):
381         * page/DOMSelection.h:
382
383 2009-03-12  Dmitry Titov  <dimich@chromium.org>
384
385         Reviewed by Dimitri Glazkov.
386
387         https://bugs.webkit.org/show_bug.cgi?id=24563
388         Change ResourceRequest to be a struct rather then a class to match other declarations.
389
390         * platform/network/chromium/ResourceRequest.h:
391
392 2009-03-12  David Levin  <levin@chromium.org>
393
394         Reviewed by  Darin Fisher.
395
396         Bug 24530: width100percent-searchfield.html should be fixed for chromium.
397         <https://bugs.webkit.org/show_bug.cgi?id=24530>
398
399         Compensate for r39924 in chromium, which broke LayoutTests/fast/replaced/width100percent-searchfield.html
400
401         * css/themeChromiumWin.css: Added.
402         Overrides the changes to start supporting input[type="search"] on Windows (since
403         Chromium doesn't do anything special for this).
404
405         * rendering/RenderThemeChromiumWin.cpp:
406         (WebCore::supportsFocus):
407         (WebCore::RenderThemeChromiumWin::extraDefaultStyleSheet):
408         (WebCore::RenderThemeChromiumWin::determineState):
409         (WebCore::RenderThemeChromiumWin::getThemeData):
410
411 2009-03-12  Greg Bolsinga  <bolsinga@apple.com>
412
413         Reviewed by Antti Koivisto.
414
415         https://bugs.webkit.org/show_bug.cgi?id=24506
416         Geolocation in Safari differs from the spec, no Coordinates attribute on Position
417         
418         Get up to date.
419
420         * DerivedSources.make:
421         * GNUmakefile.am:
422         * WebCore.pro:
423         * WebCore.scons:
424         * WebCore.vcproj/WebCore.vcproj:
425         * WebCore.xcodeproj/project.pbxproj:
426         * WebCoreSources.bkl:
427         * bindings/js/JSGeolocationCustom.cpp:
428         (WebCore::createPositionOptions):
429         * page/Coordinates.cpp: Added.
430         (WebCore::Coordinates::toString):
431         * page/Coordinates.h: Added.
432         (WebCore::Coordinates::create):
433         (WebCore::Coordinates::latitude):
434         (WebCore::Coordinates::longitude):
435         (WebCore::Coordinates::altitude):
436         (WebCore::Coordinates::accuracy):
437         (WebCore::Coordinates::altitudeAccuracy):
438         (WebCore::Coordinates::heading):
439         (WebCore::Coordinates::speed):
440         (WebCore::Coordinates::Coordinates):
441         * page/Coordinates.idl: Added.
442         * page/Geoposition.cpp:
443         (WebCore::Geoposition::toString):
444         * page/Geoposition.h:
445         (WebCore::Geoposition::create):
446         (WebCore::Geoposition::coords):
447         (WebCore::Geoposition::Geoposition):
448         * page/Geoposition.idl:
449         * page/PositionOptions.h:
450         (WebCore::PositionOptions::create):
451         (WebCore::PositionOptions::maximumAge):
452         (WebCore::PositionOptions::setMaximumAge):
453         (WebCore::PositionOptions::PositionOptions):
454         * platform/mac/GeolocationServiceMac.mm:
455         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
456
457 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
458
459         Reviewed by Darin Fisher.
460
461         https://bugs.webkit.org/show_bug.cgi?id=24496
462         Fix console logging of non-string values by coercing the argument to
463         a string, for V8 bindings.
464
465         Test: fast/js/console-non-string-values.html
466
467         * bindings/v8/ScriptValue.cpp: Added toString method.
468         (WebCore::ScriptValue::toString):
469         * bindings/v8/ScriptValue.h: Added PlatformString, ScriptState includes
470             and toString declaration.
471
472 2009-03-12  Darin Fisher  <darin@chromium.org>
473
474         Reviewed by Dimitri Glazkov.
475
476         Eliminate ChromiumBridge::uiResourceProtocol
477         https://bugs.webkit.org/show_bug.cgi?id=24558
478
479         * platform/chromium/ChromiumBridge.h:
480
481 2009-03-12  Greg Bolsinga  <bolsinga@apple.com>
482
483         Reviewed by Simon Fraser.
484
485         Missing breaks in switch statement
486         https://bugs.webkit.org/show_bug.cgi?id=24556
487
488         * platform/mac/GeolocationServiceMac.mm:
489         (-[WebCoreCoreLocationObserver locationManager:didFailWithError:]):
490
491 2009-03-12  Darin Fisher  <darin@chromium.org>
492
493         Reviewed by Dimitri Glazkov.
494
495         https://bugs.webkit.org/show_bug.cgi?id=24554
496         Remove some unused functions from ChromiumBridge.
497
498         * platform/chromium/ChromiumBridge.h:
499
500 2009-03-02  Eric Seidel  <eric@webkit.org>
501
502         Reviewed by Darin Fisher and Justin Garcia.
503
504         Safari crashes during drag and drop in Google presentations
505         due to mutation event handlers removing DOM content during insertNode
506         https://bugs.webkit.org/show_bug.cgi?id=22634
507
508         Added a bunch of "null" checks to make sure nodes are still
509         in the document before we operate on them.  This is an
510         inelegant solution, but it's the best we have for now.
511         
512         Test: editing/selection/crash-on-drag-with-mutation-events.html
513
514         * editing/CompositeEditCommand.cpp:
515         (WebCore::CompositeEditCommand::insertNodeAt):
516         * editing/ReplaceSelectionCommand.cpp:
517         (WebCore::ReplaceSelectionCommand::doApply):
518
519 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
520
521         Reviewed by Adam Treat.
522
523         https://bugs.webkit.org/show_bug.cgi?id=24525
524         REGRESSION: Inspector window doesn't close when inspected page is
525         destroyed. This is a revert of r41158, which became unnecessary when
526         InspectorController became ref-counted in r41462.
527
528         * inspector/InspectorController.cpp:
529         (WebCore::InspectorController::inspectedPageDestroyed): Reset m_inspectedPage
530             after calling close().
531         (WebCore::InspectorController::stopUserInitiatedProfiling): Remove
532             m_inspectedPage check guard around profile logic.
533
534 2009-03-12  Peter Kasting  <pkasting@google.com>
535
536         Reviewed by Darin Fisher.
537
538         https://bugs.webkit.org/show_bug.cgi?id=24502
539         Make horizontal scrolling on Windows always go the correct direction.
540
541         * platform/PlatformWheelEvent.h:
542         * platform/win/WheelEventWin.cpp:
543         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
544
545 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
546
547         Reviewed by Simon Fraser.
548
549         https://bugs.webkit.org/show_bug.cgi?id=24496
550         Fix console logging of non-string values by coercing the argument to
551         a string.
552
553         Test: fast/js/console-non-string-values.html
554
555         * bindings/js/ScriptValue.cpp: Removed PlatformString include.
556         * bindings/js/ScriptValue.h: Added toString method.
557         (WebCore::ScriptValue::toString):
558         * page/Console.cpp:
559         (WebCore::getFirstArgumentAsString): Changed firstArgumentAsString method to use
560             ScriptValue::toString.
561         (WebCore::Console::addMessage): added extra ScriptState argument to callsite.
562         (WebCore::Console::count): Ditto.
563
564 2009-03-12  Simon Fraser  <simon.fraser@apple.com>
565
566         Reviewed by Adele Peterson.
567         
568         https://bugs.webkit.org/show_bug.cgi?id=24508
569         
570         Fix updating of text field with placeholder text when value is set
571         by ensuring that updatePlaceholderVisibility() is called after
572         the value has been updated, not before.
573
574         Test: fast/forms/placeholder-set-value.html
575
576         * html/HTMLInputElement.cpp:
577         (WebCore::HTMLInputElement::setValue):
578
579 2009-03-12  Simon Fraser  <simon.fraser@apple.com>
580
581         Reviewed by Dave Hyatt
582         
583         https://bugs.webkit.org/show_bug.cgi?id=24552
584         
585         Hit testing involving normal flow, self-painting layers (e.g. reflections)
586         was broken because it was not null-testing the result of hitTestLayer(),
587         so bailing early with a nil hit layer.
588
589         Test: fast/layers/normal-flow-hit-test.html
590
591         * rendering/RenderLayer.cpp:
592         (WebCore::RenderLayer::hitTestLayer):
593
594 2009-03-12  Dimitri Glazkov  <dglazkov@chromium.org>
595
596         Reviewed by Cameron Zwarich.
597
598         Removed zero-sized files, left over from improperly applied patch.
599
600         * platform/graphics/chromium/ThemeHelperChromiumWin.cpp: Removed.
601         * platform/graphics/chromium/ThemeHelperChromiumWin.h: Removed.
602
603 2009-03-12  Adam Treat  <adam.treat@torchmobile.com>
604
605         Reviewed by George Staikos.
606
607         Do not ignore alpha color in optimization.  Hard to believe, but there
608         are websites that fill the entire page with a tiled image consisting of
609         nothing but a 100% transparent 1x1 image. <cough>orbitz.com</cough>
610
611         * platform/graphics/qt/ImageQt.cpp:
612         (WebCore::BitmapImage::checkForSolidColor):
613
614 2009-03-12  Julien Chaffraix  <jchaffraix@webkit.org>
615
616         Reviewed by Darin Adler.
617
618         Bug 24110: cloneNode should call cloneElement and not the reverse
619
620         - Splitted the code from cloneNode into cloneElementWithChildren and cloneElementWithChildren.
621           Now cloneNode calls one of the 2 previous methods.
622
623         - Renamed cloneElement to cloneElementWithoutChildren as it was the previous behaviour.
624
625         - Moved cloneNode to the Element private section so that WebCore callers cannot use it.
626
627         - Removed Element::cloneNode usage through WebCore.
628
629         * dom/Element.cpp:
630         (WebCore::Element::cloneNode): Moved to Element's private section and it
631         now calls the two next methods.
632         (WebCore::Element::cloneElementWithChildren): Added.
633         (WebCore::Element::cloneElementWithoutChildren): Renamed from cloneElement
634         to avoid ambiguity.
635         * dom/Element.h:
636
637         * editing/ApplyStyleCommand.cpp:
638         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Changed call to cloneElement
639         to call to cloneElementWithoutChildren.
640         * editing/BreakBlockquoteCommand.cpp:
641         (WebCore::BreakBlockquoteCommand::doApply): Ditto.
642         * editing/IndentOutdentCommand.cpp:
643         (WebCore::IndentOutdentCommand::indentRegion): Ditto.
644         * editing/InsertParagraphSeparatorCommand.cpp:
645         (WebCore::InsertParagraphSeparatorCommand::doApply): Ditto.
646         * editing/ModifySelectionListLevel.cpp:
647         (WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
648         * editing/SplitElementCommand.cpp:
649         (WebCore::SplitElementCommand::doApply): Ditto.
650         * editing/markup.cpp:
651         (WebCore::createFragmentFromText): Ditto.
652         * svg/SVGUseElement.cpp:
653         (WebCore::SVGUseElement::buildShadowTree): Ditto.
654         (WebCore::SVGUseElement::expandUseElementsInShadowTree): Ditto.
655
656 2009-03-12  Dirk Schulze  <krit@webkit.org>
657
658         Reviewed by Oliver Hunt.
659
660         Fixed a crash on the 1x1 pixel check for background image in gtk.
661         We need to load the image first and need to be sure that the image
662         is not null before checking the type. 
663
664         * platform/graphics/cairo/ImageCairo.cpp:
665         (WebCore::BitmapImage::checkForSolidColor):
666
667 2009-03-12  Xan Lopez  <xlopez@igalia.com>
668
669         Reviewed by Alexey Proskuryakov.
670
671         https://bugs.webkit.org/show_bug.cgi?id=24544
672         Rename setUrl to setURL
673
674         Use proper case for setUrl method, rename it to setURL.
675
676         * platform/network/ResourceResponseBase.cpp:
677         (WebCore::ResourceResponseBase::adopt):
678         * platform/network/ResourceResponseBase.h:
679         * platform/network/curl/ResourceHandleManager.cpp:
680         (WebCore::writeCallback):
681         (WebCore::headerCallback):
682         * platform/network/soup/ResourceHandleSoup.cpp:
683         (WebCore::fillResponseFromMessage):
684         (WebCore::queryInfoCallback):
685
686 2009-03-12  Xan Lopez  <xlopez@igalia.com>
687
688         Reviewed by Alexey Proskuryakov.
689
690         https://bugs.webkit.org/show_bug.cgi?id=24519
691         [GTK] Use two argument KURL ctor in ResourceHandleSoup
692
693         Use two argument KURL ctor, the single argument ctor expects its
694         input to be the output of a previous KURL::parse call, which is
695         not the case here.
696
697         * platform/network/soup/ResourceHandleSoup.cpp:
698         (WebCore::fillResponseFromMessage):
699         (WebCore::queryInfoCallback):
700
701 2009-03-11  Jon Honeycutt  <jhoneycutt@apple.com>
702
703         Fix for <rdar://6418681>
704         https://bugs.webkit.org/show_bug.cgi?id=22644
705
706         Reviewed by Steve Falkenburg.
707
708         * plugins/win/PluginPackageWin.cpp:
709         (WebCore::PluginPackage::isPluginBlacklisted): Add the Citrix ICA
710         Client plug-in to the blacklist; it requires a Mozilla-based browser.
711
712 2009-03-12  Oliver Hunt  <oliver@apple.com>
713
714         Reviewed by NOBODY (build fix).
715
716         build fix.
717
718         * html/CanvasRenderingContext2D.h:
719
720 2009-03-11  Oliver Hunt  <oliver@apple.com>
721
722         Reviewed by Adele Peterson.
723
724         <rdar://problem/6673852> Widget "Simple World Clock" does not display with Safari 4
725
726         A number of dashboard widgets rely on canvas failing silently when given invalid
727         colors for gradient stops, but both the spec and firefox throw exceptions here.
728         So we work around this by creating a dashboard quirk that will only suppress the
729         exception in dashboard compatibility mode.
730
731         Test: fast/canvas/canvas-gradient-addStop-error.html
732
733         * html/CanvasGradient.cpp:
734         (WebCore::CanvasGradient::CanvasGradient):
735         (WebCore::CanvasGradient::addColorStop):
736         * html/CanvasGradient.h:
737         (WebCore::CanvasGradient::setDashboardCompatibilityMode):
738         * html/CanvasRenderingContext2D.cpp:
739         (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard):
740         (WebCore::CanvasRenderingContext2D::createLinearGradient):
741         (WebCore::CanvasRenderingContext2D::createRadialGradient):
742         * html/CanvasRenderingContext2D.h:
743
744 2009-03-11  David Kilzer  <ddkilzer@apple.com>
745
746         Clarify comments regarding order of FEATURE_DEFINES
747
748         Rubber-stamped by Mark Rowe.
749
750         * Configurations/WebCore.xcconfig: Added warning about the
751         consequences when FEATURE_DEFINES are not kept in sync.
752
753 2009-03-11  Gustavo Noronha Silva  <gns@gnome.org>
754
755         Reviewed by Holger Freyther.
756
757         https://bugs.webkit.org/show_bug.cgi?id=24515
758         [GTK] soup backend should use GMappedFile instead of mmap directly
759
760         Rewrite mmap code used to upload files to use GMappedFile, so that
761         it is platform-independent.
762
763         * platform/network/soup/ResourceHandleSoup.cpp:
764         (WebCore::ResourceHandle::startHttp):
765
766 2009-03-11  Dan Bernstein  <mitz@apple.com>
767
768         Reviewed by Darin Adler.
769
770         - WebCore part of fixing <rdar://problem/3919124> Thai text selection
771           in Safari is incorrect
772
773         Test: platform/mac/editing/selection/word-thai.html
774
775         Tested on Mac, but should work on all ICU platforms (or more precisely
776         on all platforms that implement
777         WTF::Unicode::hasLineBreakingPropertyComplexContext() correctly).
778
779         * editing/TextIterator.cpp:
780         (WebCore::BackwardsCharacterIterator::BackwardsCharacterIterator):
781         Added.
782         (WebCore::BackwardsCharacterIterator::range): Added.
783         (WebCore::BackwardsCharacterIterator::advance): Added.
784
785         * editing/TextIterator.h: Added BackwardsCharacterIterator with the
786         minimal functionality required for this patch.
787         (WebCore::BackwardsCharacterIterator::atEnd): Added.
788
789         * editing/visible_units.cpp:
790         (WebCore::firstNonComplexContextLineBreak): Added this helper function
791         that returns the index of the first character in the string whose
792         Unicode line breaking property value is not SA ("Complex Context"), or
793         the length of the string if there is no such character.
794         (WebCore::lastNonComplexContextLineBreak): Added this helper function
795         that returns the index of the last character in the string whose
796         Unicode line breaking property value is not SA ("Complex Context"), or
797         -1 if there is no such character.
798         (WebCore::previousBoundary): Changed the signature of the search
799         function to include an offset parameter. Renamed the 'exception' local
800         variable to 'ec' and changed its type to ExceptionCode. Extend the
801         string forwards until the first character with Unicode line breaking
802         property value other than SA. This gives the boundary search function
803         enough context in the forward direction. Changed to use a
804         BackwardsCharacterIterator for translating the backwards offset into
805         a position.
806         (WebCore::nextBoundary): Changed the signature of the search
807         function to include an offset parameter. Extend the string backwards
808         until the first character with Unicode line breaking property value
809         other than SA. This gives the boundary search function enough context in
810         the backwards direction. Restricted the workaround for <rdar://5192593>
811         only to the line break case, because it was causing an extra character
812         to be selected following a word that ended with a combining mark.
813         (WebCore::startWordBoundary): Added an offset parameter. Check that
814         going backwards from the given offset, there is a character with Unicode
815         line breaking property value other than SA, and otherwise return 0 to
816         request more context.
817         (WebCore::endWordBoundary): Similar, but in reverse.
818         (WebCore::previousWordPositionBoundary): Similar.
819         (WebCore::nextWordPositionBoundary): Similar.
820         (WebCore::startSentenceBoundary): Updated for the new search function
821         signature.
822         (WebCore::endSentenceBoundary): Ditto.
823         (WebCore::previousSentencePositionBoundary): Ditto.
824         (WebCore::nextSentencePositionBoundary): Ditto.
825
826 2009-03-11  Darin Adler  <darin@apple.com>
827
828         Reviewed by Mark Rowe.
829
830         Don't use "::" in thread names because it is ugly!
831
832         * loader/icon/IconDatabase.cpp:
833         (WebCore::IconDatabase::open): Use "WebCore: " instead of "WebCore::".
834         * platform/network/cf/ResourceHandleCFNet.cpp:
835         (WebCore::ResourceHandle::loaderRunLoop): Call this "WebCore: CFNetwork Loader" to make
836         it clear this is a WebCore-created thread.
837         * storage/DatabaseThread.cpp:
838         (WebCore::DatabaseThread::start): Use "WebCore: " instead of "WebCore::".
839         * storage/LocalStorageThread.cpp:
840         (WebCore::LocalStorageThread::start): Use "WebCore: " instead of "WebCore::".
841         * workers/WorkerThread.cpp:
842         (WebCore::WorkerThread::start): Use "WebCore: " instead of "WebCore::".
843
844 2009-03-11  Mark Rowe  <mrowe@apple.com>
845
846         Rubber-stamped by Darin Adler.
847
848         <rdar://problem/6653286> WebCore's implementation of screenIsMonochrome is needlessly complex
849
850         * platform/mac/PlatformScreenMac.mm:
851         (WebCore::screenIsMonochrome): Return false.
852
853 2009-03-11  Beth Dakin  <bdakin@apple.com>
854
855         Reviewed by Dan Bernstein.
856
857         Fix for https://bugs.webkit.org/show_bug.cgi?id=14749 percentage 
858         top value on position:relative child not calculated correctly if 
859         parent has percentage height
860         - and corresponding -
861         <rdar://problem/6172925>
862
863         * rendering/RenderBoxModelObject.cpp:
864         (WebCore::RenderBoxModelObject::relativePositionOffsetY):
865
866 2009-03-11  Jian Li  <jianli@chromium.org>
867
868         Reviewed by Dimitri Glazkov.
869
870         Implement ScriptValue::hasNoValue for V8.
871         https://bugs.webkit.org/show_bug.cgi?id=24507
872
873         * bindings/v8/ScriptValue.h:
874         (WebCore::ScriptValue::hasNoValue):
875
876 2009-03-11  David Levin  <levin@chromium.org>
877
878         Reviewed by Dimitri Glazkov.
879
880         Bug 24459: Add v8 bindings for event.
881         <https://bugs.webkit.org/show_bug.cgi?id=24459>
882
883         Adding custom event bindings.
884
885         * bindings/v8/custom/V8AbstractEventListener.cpp: Added.
886         * bindings/v8/custom/V8AbstractEventListener.h: Added.
887         * bindings/v8/custom/V8AttrCustom.cpp:
888         Fixed messed up copyright header.
889         * bindings/v8/custom/V8CustomEventListener.cpp: Added.
890         * bindings/v8/custom/V8CustomEventListener.h:
891         Replaced forwarding header with the real implementation.
892         * bindings/v8/custom/V8ElementCustom.cpp:
893         * bindings/v8/custom/V8LazyEventListener.cpp: Added.
894         * bindings/v8/custom/V8LazyEventListener.h: Added.
895         * bindings/v8/custom/V8ObjectEventListener.cpp: Added.
896         * bindings/v8/custom/V8ObjectEventListener.h: Added.
897         * bindings/v8/custom/V8WorkerContextEventListener.cpp: Added.
898         * bindings/v8/custom/V8WorkerContextEventListener.h: Added.
899
900 2009-03-11  Darin Fisher  <darin@chromium.org>
901
902         Reviewed by Dimitri Glazkov.
903
904         https://bugs.webkit.org/show_bug.cgi?id=24521
905         Add some missing includes for the non-JSC build.
906
907         * platform/text/PlatformString.h: added OwnPtr.h
908         * xml/XMLHttpRequest.cpp: added SecurityOrigin.h
909
910 2009-03-11  Simon Fraser  <simon.fraser@apple.com>
911
912         Reviewed by Darin Adler
913
914         https://bugs.webkit.org/show_bug.cgi?id=24531
915         
916         Make sure that AnimationControllerPrivate::getAnimatedStyleForRenderer() never
917         returns a null style if it has a valid renderer, which could happen if a
918         CompositeAnimation existed, but wasn't running any animations or transitions.
919
920         * page/animation/AnimationController.cpp:
921         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
922
923 2009-03-11  Simon Fraser  <simon.fraser@apple.com>
924
925         Fix Scons build. Patch from Alexander Guy.
926
927         * WebCore.scons:
928
929 2009-03-11  Simon Fraser  <simon.fraser@apple.com>
930
931         Reviewed by Dan Bernstein
932        
933         https://bugs.webkit.org/show_bug.cgi?id=23093
934         
935         When the cancel button in the search field is shown or hidden,
936         we need to explicitly setStyle() on the cancel button's renderer,
937         to ensure that repaint happens. Changing the style without telling
938         the renderer won't work.
939
940         Test: fast/repaint/search-field-cancel.html
941
942         * rendering/RenderTextControlSingleLine.cpp:
943         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
944         (WebCore::RenderTextControlSingleLine::updateFromElement):
945         (WebCore::RenderTextControlSingleLine::createCancelButtonStyle):
946         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility):
947         (WebCore::RenderTextControlSingleLine::visibilityForCancelButton):
948         * rendering/RenderTextControlSingleLine.h:
949
950 2009-03-11  Hironori Bono  <hbono@chromium.org>
951
952         Reviewed by Alexey Proskuryakov.
953
954         https://bugs.webkit.org/show_bug.cgi?id=15790
955         Ligatures aren't accounted for when manipulating VisiblePositions
956
957         Changed cursorMovementIterator rules to prevent a cursor from moving in the middle of an
958         Indic ligature which uses a virama sign.
959         
960         Test: editing/deleting/skip-virama-001.html
961
962         * platform/text/TextBreakIteratorICU.cpp:
963         (WebCore::cursorMovementIterator):
964
965 2009-03-11  Alexey Proskuryakov  <ap@webkit.org>
966
967         Reviewed by George Staikos.
968
969         https://bugs.webkit.org/show_bug.cgi?id=24513
970         REGRESSION: Cursor movement doesn't work on Tiger (ICU 3.2)
971
972         Fixes existing tests on Tiger.
973
974         * platform/text/TextBreakIteratorICU.cpp: (WebCore::cursorMovementIterator):
975         Use characterBreakIterator on Tiger (like we used to do).
976
977 2009-03-11  Alexey Proskuryakov  <ap@webkit.org>
978
979         Reviewed by Oliver Hunt.
980
981         <rdar://problem/4072827> Downloaded non-ASCII file name becomes garbled
982
983         * platform/network/mac/ResourceRequestMac.mm:
984         (WebCore::ResourceRequest::doUpdatePlatformRequest): Correct selector name
985         in instancesRespondToSelector.
986
987 2009-03-11  Jan Michael Alonzo  <jmalonzo@webkit.org>
988
989         Reviewed by Holger Freyther.
990
991         [GTK]DumpRenderTree doesn't compile for non-X11 GTK ports anymore
992         https://bugs.webkit.org/show_bug.cgi?id=2260
993
994         Add missing stdio.h include to get the build going
995
996         * plugins/gtk/PluginPackageGtk.cpp:
997
998 2009-03-10  Justin Garcia  <justin.garcia@apple.com>
999
1000         Reviewed by Ken Kocienda.
1001
1002         * dom/Range.cpp:
1003         (WebCore::Range::addLineBoxRects): If the range ended at [div, 0], addLineBoxRects
1004         would include rects for the divs contents.  Set the correct RenderObject to stop at.
1005
1006 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
1007
1008         Reviewed by Sam Weinig.
1009
1010         <rdar://problem/6123770> Restrict access to document.cookie when making a cross-site XHR
1011
1012         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseXML): Removed an incorrect
1013         comment about cookie support. Firefox doesn't expose cookies on responseXML at all, and
1014         there are security concerns with exposing them for cross-origin requests, so it's not clear
1015         if we want to change anything here.
1016
1017 2009-03-10  Simon Fraser  <simon.fraser@apple.com>
1018
1019         Reviewed by Darin Adler
1020
1021         https://bugs.webkit.org/show_bug.cgi?id=24503
1022         
1023         Fix hit testing of absolutely positioned single line text controls by
1024         ensuring that we set result.innerNode() correctly. If the hit node is
1025         a descendant of the inner text element or if it is the <input> itself,
1026         then we say we hit the innerTextElement.
1027         
1028         Rename hitInnerTextBlock() to hitInnerTextElement() to match the
1029         'innerTextElement' terminology used elsewhere.
1030         
1031         Assert that if renderer()->hitTest() returns false, no-one set
1032         result.innerNode().
1033
1034         Test: fast/forms/search-abs-pos-cancel-button.html
1035
1036         * rendering/RenderLayer.cpp:
1037         (WebCore::RenderLayer::hitTestContents):
1038         * rendering/RenderTextControl.cpp:
1039         (WebCore::RenderTextControl::hitInnerTextElement):
1040         * rendering/RenderTextControl.h:
1041         * rendering/RenderTextControlMultiLine.cpp:
1042         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
1043         * rendering/RenderTextControlSingleLine.cpp:
1044         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
1045
1046 2009-03-10  Antti Koivisto  <antti@apple.com>
1047
1048         Reviewed by Mark Rowe.
1049
1050         <rdar://problem/6668238> WebCore is registering text encodings needlessly from KURL constructor.
1051         
1052         Another case where we would trigger extended encoding loading needlessly.
1053
1054         * platform/text/TextEncoding.cpp:
1055         (WebCore::TextEncoding::isNonByteBasedEncoding):
1056
1057 2009-03-10  Beth Dakin  <bdakin@apple.com>
1058
1059         Reviewed by Darin Adler.
1060
1061         Fix for <rdar://problem/6624769> REGRESSION (Safari 4 PB): No 
1062         scroll bar appears for long line of text with NOWRAP set
1063
1064         This is a regression from http://trac.webkit.org/changeset/32226
1065         I talked with Dan about the original change, and we decided that 
1066         the best fix was to remove his small potential-optimization that 
1067         only created a separate line box for whitespace under certain 
1068         circumstances. This new code will always create a separate line 
1069         box.
1070
1071         * rendering/bidi.cpp:
1072         (WebCore::RenderBlock::layoutInlineChildren):
1073
1074 2009-03-10  Sam Weinig  <sam@webkit.org>
1075
1076         Reviewed by Geoffrey Garen.
1077
1078         Fix for <rdar://problem/6166844>
1079         https://bugs.webkit.org/show_bug.cgi?id=24495
1080
1081         Use same rule for loading java applets as we do for images.
1082
1083         * html/HTMLAppletElement.cpp:
1084         (WebCore::HTMLAppletElement::createRenderer):
1085         * loader/FrameLoader.cpp:
1086         (WebCore::FrameLoader::loadItem):
1087
1088 2009-03-10  Justin Garcia  <justin.garcia@apple.com>
1089
1090         Reviewed by David Kilzer.
1091
1092         Get rid of revealCaret and use revealSelection instead.
1093
1094         * WebCore.base.exp:
1095         * editing/SelectionController.cpp:
1096         (WebCore::SelectionController::setSelection):
1097         * page/Frame.cpp:
1098         (WebCore::Frame::revealSelection):
1099         * page/Frame.h:
1100
1101 2009-03-10  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1102
1103         Reviewed by Geoff Garen.
1104
1105         Bug 23736: WebKit Crashes on http://g-conquest.fr/~server2
1106         <https://bugs.webkit.org/show_bug.cgi?id=23736>
1107         <rdar://problem/6560278>
1108
1109         Before replacing the document, FrameLoader::executeIfJavaScriptURL()
1110         should call stopAllLoaders(), just like continueLoadAfterNavigationPolicy().
1111
1112         * loader/FrameLoader.cpp:
1113         (WebCore::FrameLoader::executeIfJavaScriptURL):
1114
1115 2009-03-10  Darin Adler  <darin@apple.com>
1116
1117         Reviewed by Alexey Proskuryakov.
1118
1119         Bug 24494: crash when deleting at end of document and merging paragraphs
1120         https://bugs.webkit.org/show_bug.cgi?id=24494
1121         rdar://problem/6571537
1122
1123         Test: editing/deleting/merge-at-end-of-document.html
1124
1125         * dom/Range.cpp:
1126         (WebCore::Range::compareBoundaryPoints): Split out assertion. It's better not to
1127         use && in assertions since we'd like to know which condition is failing.
1128
1129         * editing/ApplyStyleCommand.cpp:
1130         (WebCore::ApplyStyleCommand::applyInlineStyleToRange): Added a null check before
1131         calling compareBoundaryPoints, since a 0 for the node is ambiguous and so the
1132         function doesn't know which value to return.
1133
1134 2009-03-10  Dirk Schulze  <krit@webkit.org>
1135
1136         Reviewed by Eric Seidel. Math checked by Oliver Hunt.
1137
1138         Implement the Cairo version of the checkForSolidColor() method. This halfes the
1139         time to draw on 1x1 px background images.
1140         I added two new calls to Color for the pixel manipulation on cairo_surface's.
1141         They are neede to premultiply/unpremultiply the colors of the surface.
1142
1143         [CAIRO] Introduce single-pixel image optimizations
1144         https://bugs.webkit.org/show_bug.cgi?id=17284
1145
1146         * platform/graphics/Color.cpp:
1147         (WebCore::colorFromPremultipliedARGB):
1148         (WebCore::premultipliedARGBFromColor):
1149         * platform/graphics/Color.h:
1150         * platform/graphics/cairo/ImageBufferCairo.cpp:
1151         (WebCore::ImageBuffer::getImageData):
1152         (WebCore::ImageBuffer::putImageData):
1153         * platform/graphics/cairo/ImageCairo.cpp:
1154         (WebCore::BitmapImage::checkForSolidColor):
1155
1156 2009-03-06  Darin Fisher  <darin@chromium.org>
1157
1158         Reviewed by Sam Weinig.
1159
1160         https://bugs.webkit.org/show_bug.cgi?id=24437
1161
1162         Add support for registering noAccess URL schemes:
1163         1-  Add FrameLoader::registerURLSchemeAsNoAccess, and have SecurityOrigin check
1164         that list upon construction (similar to how isLocal is implemented).
1165         2-  Make InspectorController call grantUniversalAccess on its Document's
1166         SecurityOrigin at the time when windowScriptObjectAvailable is called.
1167
1168         This enables content such as the inspector to be loaded from a custom (non-file)
1169         URL, which is how Chromium loads the inspector.  It also allows other URL schemes
1170         to be treated like data: URLs, which Chromium utilizes for its various HTML-based
1171         UI panels.
1172
1173         * inspector/InspectorController.cpp:
1174         (WebCore::InspectorController::windowScriptObjectAvailable):
1175         * loader/FrameLoader.cpp:
1176         (WebCore::localSchemes):
1177         (WebCore::noAccessSchemes):
1178         (WebCore::FrameLoader::loadItem):
1179         * loader/FrameLoader.h:
1180         * page/SecurityOrigin.cpp:
1181         (WebCore::SecurityOrigin::SecurityOrigin):
1182         (WebCore::SecurityOrigin::isLocal):
1183
1184 2009-03-10  Xan Lopez  <xlopez@igalia.com>
1185
1186         Build fix, no review
1187
1188         * page/mac/AccessibilityObjectWrapper.mm:
1189         (textMarkerForVisiblePosition):
1190         (visiblePositionForTextMarker):
1191
1192 2009-03-10  Xan Lopez  <xlopez@igalia.com>
1193
1194         Reviewed by Darin Adler.
1195
1196         https://bugs.webkit.org/show_bug.cgi?id=24491
1197         Rename posOffset to m_offset, get rid of accessor
1198
1199         As suggested in dom/Position.h, this patch gets rid of the
1200         'offset()' accessor and renames posOffset to m_offset. I've used
1201         m_offset instead of offset to follow the style guide lines, since
1202         Position is still a class and not a structure. If the long term
1203         plan is still to make it a structure it would be pretty easy to
1204         just s/m_offset/offset/ globally when that is achieved.
1205
1206         * dom/Position.cpp:
1207         (WebCore::Position::previous):
1208         (WebCore::Position::next):
1209         (WebCore::Position::atStart):
1210         (WebCore::Position::atEnd):
1211         (WebCore::Position::renderedOffset):
1212         (WebCore::Position::isCandidate):
1213         (WebCore::Position::inRenderedText):
1214         (WebCore::Position::isRenderedCharacter):
1215         (WebCore::Position::rendersInDifferentPosition):
1216         (WebCore::Position::leadingWhitespacePosition):
1217         (WebCore::Position::debugPosition):
1218         (WebCore::Position::formatForDebugger):
1219         * dom/Position.h:
1220         (WebCore::Position::Position):
1221         * dom/PositionIterator.h:
1222         (WebCore::PositionIterator::PositionIterator):
1223         * dom/Range.cpp:
1224         * dom/RangeBoundaryPoint.h:
1225         (WebCore::RangeBoundaryPoint::position):
1226         (WebCore::RangeBoundaryPoint::set):
1227         (WebCore::RangeBoundaryPoint::setOffset):
1228         (WebCore::RangeBoundaryPoint::setToChild):
1229         (WebCore::RangeBoundaryPoint::setToStart):
1230         (WebCore::RangeBoundaryPoint::setToEnd):
1231         (WebCore::RangeBoundaryPoint::childBeforeWillBeRemoved):
1232         * editing/ApplyStyleCommand.cpp:
1233         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1234         (WebCore::ApplyStyleCommand::applyInlineStyleToRange):
1235         (WebCore::ApplyStyleCommand::removeInlineStyle):
1236         (WebCore::ApplyStyleCommand::nodeFullySelected):
1237         (WebCore::ApplyStyleCommand::nodeFullyUnselected):
1238         (WebCore::ApplyStyleCommand::splitTextAtStartIfNeeded):
1239         (WebCore::ApplyStyleCommand::splitTextAtEndIfNeeded):
1240         (WebCore::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
1241         (WebCore::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
1242         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
1243         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
1244         (WebCore::ApplyStyleCommand::joinChildTextNodes):
1245         * editing/BreakBlockquoteCommand.cpp:
1246         (WebCore::BreakBlockquoteCommand::doApply):
1247         * editing/CompositeEditCommand.cpp:
1248         (WebCore::CompositeEditCommand::insertNodeAt):
1249         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
1250         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
1251         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
1252         (WebCore::CompositeEditCommand::deleteInsignificantText):
1253         (WebCore::CompositeEditCommand::removePlaceholderAt):
1254         (WebCore::CompositeEditCommand::moveParagraphs):
1255         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
1256         * editing/DeleteSelectionCommand.cpp:
1257         (WebCore::updatePositionForNodeRemoval):
1258         (WebCore::updatePositionForTextRemoval):
1259         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1260         (WebCore::DeleteSelectionCommand::fixupWhitespace):
1261         * editing/Editor.cpp:
1262         (WebCore::Editor::setComposition):
1263         (WebCore::Editor::advanceToNextMisspelling):
1264         (WebCore::Editor::getCompositionSelection):
1265         * editing/InsertLineBreakCommand.cpp:
1266         (WebCore::InsertLineBreakCommand::doApply):
1267         * editing/InsertParagraphSeparatorCommand.cpp:
1268         (WebCore::InsertParagraphSeparatorCommand::doApply):
1269         * editing/InsertTextCommand.cpp:
1270         (WebCore::InsertTextCommand::performTrivialReplace):
1271         (WebCore::InsertTextCommand::input):
1272         (WebCore::InsertTextCommand::insertTab):
1273         * editing/MoveSelectionCommand.cpp:
1274         (WebCore::MoveSelectionCommand::doApply):
1275         * editing/ReplaceSelectionCommand.cpp:
1276         (WebCore::ReplaceSelectionCommand::doApply):
1277         * editing/SelectionController.cpp:
1278         (WebCore::SelectionController::debugRenderer):
1279         * editing/TextIterator.cpp:
1280         (WebCore::TextIterator::rangeFromLocationAndLength):
1281         * editing/TypingCommand.cpp:
1282         (WebCore::TypingCommand::deleteKeyPressed):
1283         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1284         * editing/VisiblePosition.cpp:
1285         (WebCore::VisiblePosition::characterAfter):
1286         (WebCore::VisiblePosition::debugPosition):
1287         (WebCore::makeRange):
1288         (WebCore::setStart):
1289         (WebCore::setEnd):
1290         * editing/VisibleSelection.cpp:
1291         (WebCore::VisibleSelection::toNormalizedRange):
1292         (WebCore::makeSearchRange):
1293         (WebCore::VisibleSelection::debugPosition):
1294         (WebCore::VisibleSelection::showTreeForThis):
1295         * editing/htmlediting.cpp:
1296         (WebCore::comparePositions):
1297         (WebCore::rangeCompliantEquivalent):
1298         (WebCore::isFirstPositionAfterTable):
1299         (WebCore::isLastPositionBeforeTable):
1300         * editing/visible_units.cpp:
1301         (WebCore::previousBoundary):
1302         (WebCore::nextBoundary):
1303         (WebCore::startPositionForLine):
1304         (WebCore::startOfLine):
1305         (WebCore::endPositionForLine):
1306         (WebCore::nextLinePosition):
1307         (WebCore::startOfParagraph):
1308         (WebCore::endOfParagraph):
1309         * page/AccessibilityObject.cpp:
1310         (WebCore::updateAXLineStartForVisiblePosition):
1311         * page/AccessibilityRenderObject.cpp:
1312         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
1313         * page/DOMSelection.cpp:
1314         (WebCore::DOMSelection::anchorOffset):
1315         (WebCore::DOMSelection::baseOffset):
1316         (WebCore::DOMSelection::focusOffset):
1317         (WebCore::DOMSelection::extentOffset):
1318         * page/EventHandler.cpp:
1319         (WebCore::EventHandler::handleMousePressEventSingleClick):
1320         * page/Frame.cpp:
1321         (WebCore::Frame::selectionLayoutChanged):
1322         * rendering/RenderTextControl.cpp:
1323         (WebCore::RenderTextControl::indexForVisiblePosition):
1324         * rendering/RenderTreeAsText.cpp:
1325         (WebCore::writeSelection):
1326
1327 2009-03-10  Darin Adler  <darin@apple.com>
1328
1329         Reviewed by Dan Bernstein.
1330
1331         Bug 23564: REGRESSION (r39230-39286): crash loading page that changes <input> display type and then calls innerHTML
1332         https://bugs.webkit.org/show_bug.cgi?id=23564
1333         rdar://problem/6537238
1334
1335         Test: fast/dom/HTMLElement/innerHTML-selection-crash.html
1336
1337         * editing/markup.cpp: (WebCore::createMarkup): Added updateLayoutIgnorePendingStylesheets
1338         call to the one of the two overloads of this function that wasn't calling it. This fixes
1339         this crash and other possible crashes inside innerHTML.
1340
1341 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
1342
1343         Reviewed by Darin Adler.
1344
1345         https://bugs.webkit.org/show_bug.cgi?id=24285
1346         Text resource loading checks for BOM twice
1347
1348         This removes TextDecoder class, since its only purpose was to check for BOM, which is
1349         already done in TextResourceDecoder. Callers that use TextEncoding::decode() won't get
1350         BOM checked, but I didn't find any cases where it would significantly change behavior.
1351
1352         * GNUmakefile.am:
1353         * WebCore.pro:
1354         * WebCore.scons:
1355         * WebCore.vcproj/WebCore.vcproj:
1356         * WebCore.xcodeproj/project.pbxproj:
1357         * WebCoreSources.bkl:
1358         Remove TextDecoder.{h,cpp}.
1359
1360         * platform/text/TextDecoder.cpp: Removed.
1361         * platform/text/TextDecoder.h: Removed.
1362
1363         * loader/TextResourceDecoder.h: Instead of a TextDecoder object, keep TextEncoding and
1364         TextCodec separately.
1365
1366         * loader/TextResourceDecoder.cpp:
1367         (WebCore::TextResourceDecoder::TextResourceDecoder): Updated for m_encoding being a member.
1368         (WebCore::TextResourceDecoder::setEncoding): Ditto.
1369         (WebCore::TextResourceDecoder::checkForBOM): Removed a FIXME saying that a BOM could override
1370         even a user-chosen encoding - this is how it already worked due to TextDecoder checking for
1371         BOM again. Made this function return the detected BOM length.
1372         (WebCore::TextResourceDecoder::decode): Skip the BOM if it was found at the beginning of
1373         a text resource.
1374         (WebCore::TextResourceDecoder::flush): Reset m_checkedForBOM, so that re-decoding the same
1375         resource again (as frequently done by CachedResource subclasses) will skip the BOM correctly.
1376
1377         * platform/text/TextEncoding.cpp: (WebCore::TextEncoding::decode):
1378         Use TextCodec directly without a TextDecoder wrapper. This means that this method no longer
1379         checks for BOM, which was a counter-intuitive feature.
1380
1381         * loader/CachedScript.cpp:
1382         (WebCore::CachedScript::CachedScript):
1383         (WebCore::CachedScript::setEncoding):
1384         (WebCore::CachedScript::encoding):
1385         (WebCore::CachedScript::script):
1386         * loader/CachedScript.h:
1387         * loader/appcache/ManifestParser.cpp:
1388         (WebCore::parseManifest):
1389         Use TextResourceDecoder, as TextEncoding::decode() no longer checks for BOM.
1390         A side effect of this is that these resources will now be subject to encoding auto-detection.
1391
1392         * loader/CachedFont.cpp: (WebCore::CachedFont::ensureSVGFontData):
1393         * page/Page.cpp: (WebCore::Page::userStyleSheet):
1394         Be sure to flush TextResourceDecoder, pushing any remaining bytes out, and making the decoder
1395         re-usable (for repeated decoding of the same resource).
1396
1397         * platform/text/TextEncodingRegistry.h: Updated comments for newTextCodec().
1398
1399 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
1400
1401         Reviewed by Darin Adler.
1402
1403         https://bugs.webkit.org/show_bug.cgi?id=24488
1404         An assertion failure when updating an offline application cache after emptying caches
1405
1406         Emptying appcache cannot be performed automatically, so no test.
1407
1408         * loader/appcache/ApplicationCacheGroup.cpp:
1409         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Ensure that the cache is in disk
1410         storage, even if the application wasn't updated server side.
1411
1412 2009-03-10  Oliver Hunt  <oliver@apple.com>
1413
1414         Reviewed by Alexey Proskuryakov.
1415
1416         <rdar://problem/6425807> Implement WorkerUtils.importScripts()
1417         <https://bugs.webkit.org/show_bug.cgi?id=22721>
1418
1419         Implement importScripts, currently uses a series of synchronous loads
1420         to fetch the scripts, but this is simpler than a synchronous load of
1421         multiple loads in parallel.  In future we'll want to switch to parallel
1422         loading, but this will do for now.
1423         
1424         Test: http/tests/workers/worker-importScripts.html
1425
1426         * GNUmakefile.am:
1427         * WebCore.vcproj/WebCore.vcproj:
1428         * WebCore.xcodeproj/project.pbxproj:
1429         * bindings/js/JSWorkerContextCustom.cpp:
1430         (WebCore::JSWorkerContext::importScripts):
1431         * bindings/js/ScriptValue.h:
1432         (WebCore::ScriptValue::hasNoValue):
1433         * bindings/js/WorkerScriptController.cpp:
1434         (WebCore::WorkerScriptController::evaluate):
1435         (WebCore::WorkerScriptController::setException):
1436         * bindings/js/WorkerScriptController.h:
1437         * dom/Document.cpp:
1438         (WebCore::Document::scriptImported):
1439         * dom/Document.h:
1440         * dom/ScriptExecutionContext.h:
1441         * inspector/InspectorController.cpp:
1442         (WebCore::InspectorController::scriptImported):
1443         * inspector/InspectorController.h:
1444         * inspector/InspectorResource.cpp:
1445         (WebCore::InspectorResource::setScriptProperties):
1446         * inspector/InspectorResource.h:
1447         * workers/WorkerContext.cpp:
1448         (WebCore::WorkerContext::scriptImported):
1449         (WebCore::WorkerContext::importScripts):
1450         * workers/WorkerContext.h:
1451         * workers/WorkerContext.idl:
1452         * workers/WorkerImportScriptsClient.cpp: Added.
1453         (WebCore::WorkerImportScriptsClient::didReceiveResponse):
1454         (WebCore::WorkerImportScriptsClient::didReceiveData):
1455         (WebCore::WorkerImportScriptsClient::didFinishLoading):
1456         (WebCore::WorkerImportScriptsClient::didFail):
1457         (WebCore::WorkerImportScriptsClient::didFailRedirectCheck):
1458         (WebCore::WorkerImportScriptsClient::didReceiveAuthenticationCancellation):
1459         * workers/WorkerImportScriptsClient.h: Added.
1460         (WebCore::WorkerImportScriptsClient::WorkerImportScriptsClient):
1461         (WebCore::WorkerImportScriptsClient::script):
1462         (WebCore::WorkerImportScriptsClient::failed):
1463
1464 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
1465
1466         Reviewed by Darin Adler.
1467
1468         https://bugs.webkit.org/show_bug.cgi?id=24462
1469         Move cross-origin access control code out of XMLHttpRequest
1470
1471         Step 1: move preflight result cache and access control helper functions.
1472
1473         No change in behavior, so no test.
1474
1475         * GNUmakefile.am:
1476         * WebCore.pro:
1477         * WebCore.scons:
1478         * WebCore.vcproj/WebCore.vcproj:
1479         * WebCore.xcodeproj/project.pbxproj:
1480         * WebCoreSources.bkl:
1481         * loader/CrossOriginAccessControl.cpp: Added.
1482         (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist):
1483         (WebCore::isSimpleCrossOriginAccessRequest):
1484         (WebCore::createAllowedCrossOriginResponseHeadersSet):
1485         (WebCore::isOnAccessControlResponseHeaderWhitelist):
1486         (WebCore::passesAccessControlCheck):
1487         * loader/CrossOriginAccessControl.h: Added.
1488         * loader/CrossOriginPreflightResultCache.cpp: Added.
1489         (WebCore::parseAccessControlMaxAge):
1490         (WebCore::addToAccessControlAllowList):
1491         (WebCore::parseAccessControlAllowList):
1492         (WebCore::CrossOriginPreflightResultCacheItem::parse):
1493         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod):
1494         (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):
1495         (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest):
1496         (WebCore::CrossOriginPreflightResultCache::shared):
1497         (WebCore::CrossOriginPreflightResultCache::appendEntry):
1498         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
1499         * loader/CrossOriginPreflightResultCache.h: Added.
1500         (WebCore::CrossOriginPreflightResultCacheItem::CrossOriginPreflightResultCacheItem):
1501         (WebCore::CrossOriginPreflightResultCache::CrossOriginPreflightResultCache):
1502         * xml/XMLHttpRequest.cpp:
1503         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData):
1504         (WebCore::XMLHttpRequest::createRequest):
1505         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequest):
1506         (WebCore::XMLHttpRequest::makeSimpleCrossOriginAccessRequest):
1507         (WebCore::XMLHttpRequest::makeCrossOriginAccessRequestWithPreflight):
1508         (WebCore::XMLHttpRequest::didReceiveResponse):
1509         (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
1510         * xml/XMLHttpRequest.h:
1511
1512 2009-03-10  Alexey Proskuryakov  <ap@webkit.org>
1513
1514         Reviewed by Darin Adler.
1515
1516         https://bugs.webkit.org/show_bug.cgi?id=19797
1517         Bring the list of forbidden headers in sync with XMLHttpRequest spec draft
1518
1519         Added new checks to http/tests/xmlhttprequest/set-dangerous-headers.html.
1520
1521         * xml/XMLHttpRequest.cpp:
1522         (WebCore::XMLHttpRequestStaticData::XMLHttpRequestStaticData): Added all headers from
1523         XMLHttpRequest 2 draft.
1524
1525 2009-03-10  Dan Bernstein  <mitz@apple.com>
1526
1527         Reviewed by Adele Peterson.
1528
1529         - fix https://bugs.webkit.org/show_bug.cgi?id=23975
1530           <rdar://problem/6593610> REGRESSION: Scrollbar arrow not repainted
1531
1532         * rendering/RenderLayer.cpp:
1533         (WebCore::RenderLayer::invalidateScrollbarRect): Corrected the vertical
1534         scrollbar rect calculation.
1535
1536 2009-03-09  Simon Fraser  <simon.fraser@apple.com>
1537
1538         Reviewed by Dan Bernstein, Oliver Hunt
1539
1540         https://bugs.webkit.org/show_bug.cgi?id=24475
1541         
1542         When repainting replaced elements, need to union the selection
1543         and overflow rects because either may extend outside the other.
1544         
1545         Test: fast/repaint/transform-replaced-shadows.html
1546
1547         * rendering/RenderReplaced.cpp:
1548         (WebCore::RenderReplaced::clippedOverflowRectForRepaint):
1549
1550 2009-03-09  Stephanie Lewis  <slewis@apple.com>
1551
1552         Fix build.
1553
1554         * editing/Editor.cpp:
1555         (WebCore::Editor::advanceToNextMisspelling):
1556         (WebCore::markAllMisspellingsAndBadGrammarInRanges):
1557
1558 2009-03-09  Kim Christensen  <kimworking@gmail.com>
1559
1560         Reviewed by Darin Fisher.
1561
1562         https://bugs.webkit.org/show_bug.cgi?id=24276
1563         Dropdown / select boxes do not consider the windows task bar in Chromium.
1564
1565         * platform/chromium/PopupMenuChromium.cpp:
1566         (WebCore::PopupContainer::showPopup):
1567
1568 2009-03-09  Dan Bernstein  <mitz@apple.com>
1569
1570         Reviewed by Adele Peterson and Dave Hyatt.
1571
1572         - fix <rdar://problem/6654344> REGRESSION (r41041): Zillow.com has
1573           misaligned edit fields
1574
1575         Test: fast/forms/legend-display-none.html
1576
1577         * css/CSSStyleSelector.cpp:
1578         (WebCore::CSSStyleSelector::adjustRenderStyle): Change the display
1579         property of legend elements to 'block' unless it is 'none'.
1580         * css/html4.css: Do not force the display property of legend elements to
1581         'block' using CSS, because that prevents style rules from setting it to
1582         'none'.
1583
1584 2009-03-09  Alpha Lam  <hclam@chromium.org>
1585
1586         Reviewed by Dave Hyatt.
1587
1588         https://bugs.webkit.org/show_bug.cgi?id=23024
1589
1590         Fix an incorrect criteria in the if statement that leaves references to
1591         deleted floating objects in RenderBlock.
1592
1593         Test: fast/block/float/crash-on-absolute-positioning.html
1594
1595         * rendering/RenderBlock.cpp:
1596         (WebCore::RenderBlock::markAllDescendantsWithFloatsForLayout):
1597
1598 2009-03-09  Mike Belshe  <mike@belshe.com>
1599
1600         Reviewed by Eric Seidel.
1601
1602         Unify JSC/V8 idl file.
1603         https://bugs.webkit.org/show_bug.cgi?id=24424
1604
1605         * page/Location.idl:
1606
1607 2009-03-09  Mike Belshe  <mike@belshe.com>
1608
1609         Reviewed by Eric Seidel.
1610
1611         Unify JSC/V8 for History.idl.
1612
1613         * page/History.idl:
1614
1615 2009-03-09  Mike Belshe  <mike@belshe.com>
1616
1617         Reviewed by Eric Seidel.
1618
1619         Unify JSC/V8 implementations of DOMWindow.idl.
1620
1621         * page/DOMWindow.idl:
1622
1623 2009-03-09  Simon Fraser  <simon.fraser@apple.com>
1624
1625         Reviewed by Dave Hyatt
1626
1627         https://bugs.webkit.org/show_bug.cgi?id=24163
1628         
1629         Implement mapping of FloatQuads through 3D transforms.
1630         
1631         Removed the redundant localToContainerQuad() methods, which can now 
1632         shared code with the old mapLocalToAbsolutePoint(), which was
1633         renamed to mapLocalToContainer(). This can now convert a point,
1634         and optionally a FloatQuad, which are carried along in the TransformState.
1635         
1636         Optimized TransformState to reduce to simple FloatPoint.move()
1637         if there are no transforms, and to heap-allocate a transform only if
1638         necessary to accumulate transforms (when using preserve-3d).
1639         
1640         Tested by 3d point mapping tests, and the inspector highlight (which now shows
1641         the correct quads for 3d-transformed elements).
1642
1643         * platform/graphics/transforms/TransformationMatrix.cpp:
1644         (WebCore::TransformationMatrix::projectQuad):
1645         (WebCore::TransformationMatrix::translateRight):
1646         (WebCore::TransformationMatrix::translateRight3d):
1647         * platform/graphics/transforms/TransformationMatrix.h:
1648         * rendering/RenderBox.cpp:
1649         (WebCore::RenderBox::mapLocalToContainer):
1650         (WebCore::RenderBox::mapAbsoluteToLocalPoint):
1651         * rendering/RenderBox.h:
1652         * rendering/RenderObject.cpp:
1653         (WebCore::RenderObject::localToAbsolute):
1654         (WebCore::RenderObject::absoluteToLocal):
1655         (WebCore::RenderObject::mapLocalToContainer):
1656         (WebCore::RenderObject::localToContainerQuad):
1657         * rendering/RenderObject.h:
1658         * rendering/RenderTableCell.cpp:
1659         (WebCore::RenderTableCell::mapLocalToContainer):
1660         * rendering/RenderTableCell.h:
1661         * rendering/RenderView.cpp:
1662         (WebCore::RenderView::mapLocalToContainer):
1663         * rendering/RenderView.h:
1664         * rendering/TransformState.cpp:
1665         (WebCore::TransformState::move):
1666         (WebCore::TransformState::applyTransform):
1667         (WebCore::TransformState::flatten):
1668         (WebCore::TransformState::mappedPoint):
1669         (WebCore::TransformState::mappedQuad):
1670         (WebCore::TransformState::flattenWithTransform):
1671         (WebCore::HitTestingTransformState::mappedQuad):
1672         * rendering/TransformState.h:
1673         (WebCore::TransformState::TransformState):
1674         (WebCore::TransformState::move):
1675         (WebCore::TransformState::lastPlanarPoint):
1676         (WebCore::TransformState::lastPlanarQuad):
1677         * rendering/style/RenderStyle.h:
1678         (WebCore::InheritedFlags::preserves3D):
1679
1680 2009-03-09  Simon Fraser  <simon.fraser@apple.com>
1681
1682         Reviewed by Dave Hyatt
1683
1684         https://bugs.webkit.org/show_bug.cgi?id=24433
1685         
1686         During hit testing with transforms, if a layer has backface-visibility: hidden,
1687         we need to check for it whether or not the layer has a transform, because it
1688         might be an ancestor that is transformed.
1689
1690         Test: transforms/3d/hit-testing/backface-no-transform-hit-test.html
1691
1692         * rendering/RenderLayer.cpp:
1693         (WebCore::RenderLayer::hitTestLayer):
1694
1695 2009-03-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1696
1697         Reviewed by George Staikos.
1698
1699         https://bugs.webkit.org/show_bug.cgi?id=24353
1700         Allow to overrule default build options for Qt build.
1701
1702         * WebCore.pro: Allow to overrule ENABLE_VIDEO and ENABLE_NETSCAPE_PLUGIN_API
1703
1704 2009-03-09  Adam Treat  <adam.treat@torchmobile.com>
1705
1706         Reviewed by George Staikos.
1707
1708         https://bugs.webkit.org/show_bug.cgi?id=24463
1709         WebCore::qstring is detaching and copying twice for every single
1710         WebCore::TextRun that is processed and drawn.  This elevates this method
1711         to one of the top-ten most expensive methods in all of QtWebKit according
1712         to profiling.  This changes the method so that QString only detaches
1713         when absolutely necessary.
1714
1715         * platform/graphics/qt/FontQt.cpp:
1716         (WebCore::qstring):
1717         (WebCore::fixSpacing):
1718         (WebCore::Font::drawComplexText):
1719         (WebCore::Font::floatWidthForComplexText):
1720         (WebCore::Font::offsetForPositionForComplexText):
1721         (WebCore::Font::selectionRectForComplexText):
1722
1723 2009-03-08  Mark Rowe  <mrowe@apple.com>
1724
1725         Reviewed by Oliver Hunt.
1726
1727         Split ScrollAlignment and ScrollBehavior out of RenderLayer.h so that
1728         Frame.h no longer needs to include it.  This cuts the size of the symbols
1729         for a debug build by around 3%.
1730
1731         * dom/Element.cpp:
1732         (WebCore::Element::scrollIntoView):
1733         (WebCore::Element::scrollIntoViewIfNeeded):
1734         * editing/Editor.cpp:
1735         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1736         (WebCore::Editor::revealSelectionAfterEditingOperation):
1737         * editing/SelectionController.cpp:
1738         (WebCore::SelectionController::setSelection):
1739         * loader/FrameLoader.cpp:
1740         (WebCore::FrameLoader::gotoAnchor):
1741         * page/ContextMenuController.cpp:
1742         (WebCore::ContextMenuController::contextMenuItemSelected):
1743         * page/Frame.cpp:
1744         (WebCore::Frame::revealSelection):
1745         (WebCore::Frame::revealCaret):
1746         * page/Frame.h:
1747         * rendering/RenderLayer.cpp:
1748         (WebCore::RenderLayer::getRectToExpose):
1749         (WebCore::RenderLayer::autoscroll):
1750         * rendering/RenderLayer.h:
1751         * rendering/ScrollBehavior.cpp: Added.
1752         (WebCore::):
1753         * rendering/ScrollBehavior.h: Added.
1754         (WebCore::):
1755         (WebCore::ScrollAlignment::getVisibleBehavior):
1756         (WebCore::ScrollAlignment::getPartialBehavior):
1757         (WebCore::ScrollAlignment::getHiddenBehavior):
1758
1759         Add the new files to the build systems:
1760         * GNUmakefile.am:
1761         * WebCore.base.exp:
1762         * WebCore.pro:
1763         * WebCore.scons:
1764         * WebCore.vcproj/WebCore.vcproj:
1765         * WebCore.xcodeproj/project.pbxproj:
1766         * WebCoreSources.bkl:
1767
1768         Add includes that were previously pulled in by way of RenderLayer.h from Frame.h:
1769         * dom/Clipboard.cpp:
1770         * editing/EditorCommand.cpp:
1771         * editing/InsertLineBreakCommand.cpp:
1772         * editing/TypingCommand.cpp:
1773         * html/HTMLFormControlElement.cpp:
1774         * loader/archive/cf/LegacyWebArchive.cpp:
1775         * loader/icon/IconLoader.cpp:
1776         * page/animation/AnimationController.cpp:
1777         * rendering/RenderSlider.cpp:
1778         * rendering/RenderTextControl.cpp:
1779
1780
1781 2009-03-08  Mark Rowe  <mrowe@apple.com>
1782
1783         Reviewed Dan Bernstein.
1784
1785         Push the include of Frame.h out of RenderView.h and down to those files
1786         that need it.  This cuts the size of symbols for RenderFoo object files
1787         by around 15% in a debug build.
1788
1789         * bindings/objc/DOM.mm:
1790         * rendering/RenderFileUploadControl.cpp:
1791         * rendering/RenderInline.cpp:
1792         * rendering/RenderObject.cpp:
1793         * rendering/RenderReplaced.cpp:
1794         * rendering/RenderText.cpp:
1795         * rendering/RenderView.cpp:
1796         (WebCore::RenderView::zoomFactor):
1797         * rendering/RenderView.h:
1798
1799 2009-03-08  Mark Rowe  <mrowe@apple.com>
1800
1801         Rubber-stamped by Dan Bernstein.
1802
1803         Remove some unnecessary or redundant includes from files related to the JS bindings.
1804         This cuts the size of the symbols for a debug build by around 3%.
1805
1806         * bindings/js/JSCustomPositionCallback.cpp:
1807         * bindings/js/JSCustomPositionErrorCallback.cpp:
1808         * bindings/js/JSCustomSQLStatementCallback.cpp:
1809         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1810         * bindings/js/JSCustomSQLTransactionCallback.cpp:
1811         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
1812         * bindings/js/JSCustomVoidCallback.cpp:
1813         * bindings/js/JSCustomXPathNSResolver.cpp:
1814         * bindings/js/JSDocumentCustom.cpp:
1815         * bindings/js/JSPluginElementFunctions.cpp:
1816         * bindings/js/JSSVGPODTypeWrapper.h:
1817
1818 2009-03-08  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
1819
1820         Reviewed by Oliver Hunt.
1821
1822         Remove the unused methods previousHistoryItem(), setPreviousHistoryItem()
1823         and provisionalHistoryItem() from FrameLoader.
1824
1825         * WebCore.base.exp:
1826         * WebCore.order:
1827         * loader/FrameLoader.cpp:
1828         (WebCore::FrameLoader::frameLoadCompleted):
1829         (WebCore::FrameLoader::loadItem):
1830         * loader/FrameLoader.h:
1831
1832 2009-03-08  Gustavo Noronha Silva  <gns@gnome.org>
1833
1834         Reviewed by Holger Freyther.
1835
1836         Implement proper logging for the GTK+ port, inspired by the one in
1837         Qt. We use the WEBKIT_DEBUG environment variable which was already
1838         being used to decide whether to setup a logger for soup or not.
1839
1840         * platform/gtk/LoggingGtk.cpp:
1841         (WebCore::getChannelFromName):
1842         (WebCore::InitializeLoggingChannelsIfNecessary):
1843         * platform/network/soup/ResourceHandleSoup.cpp:
1844         (WebCore::ensureSessionIsInitialized):
1845
1846 2009-03-07  Dan Bernstein  <mitz@apple.com>
1847
1848         Reviewed by Mark Rowe.
1849
1850         - WebCore part of removing build-time and run-time support for legacy
1851           versions of CFNetwork and Core Graphics
1852
1853         * platform/graphics/win/FontCGWin.cpp:
1854         (WebCore::Font::drawGlyphs):
1855         * platform/graphics/win/FontCustomPlatformData.cpp:
1856         (WebCore::FontCustomPlatformData::fontPlatformData):
1857         * platform/graphics/win/FontPlatformDataCGWin.cpp:
1858         (WebCore::FontPlatformData::platformDataInit):
1859         * platform/network/cf/FormDataStreamCFNet.cpp:
1860         (WebCore::setHTTPBody):
1861         (WebCore::httpBodyFromRequest):
1862         * platform/network/cf/ResourceHandleCFNet.cpp:
1863         (WebCore::didSendBodyData):
1864         (WebCore::shouldUseCredentialStorageCallback):
1865         (WebCore::ResourceHandle::start):
1866         * platform/network/win/CookieJarCFNetWin.cpp:
1867         (WebCore::filterCookies):
1868
1869 2009-03-07  Adele Peterson  <adele@apple.com>
1870
1871         Reviewed by Dan Bernstein.
1872
1873         Fix for https://bugs.webkit.org/show_bug.cgi?id=24444
1874         No multiple JS property for <input type="file" multiple />
1875
1876         * html/HTMLInputElement.cpp:
1877         (WebCore::HTMLInputElement::multiple):
1878         (WebCore::HTMLInputElement::setMultiple):
1879         * html/HTMLInputElement.h:
1880         * html/HTMLInputElement.idl:
1881
1882 2009-03-07  Xan Lopez  <xan@gnome.org>
1883
1884         Reviewed by Holger Freyther.
1885
1886         https://bugs.webkit.org/show_bug.cgi?id=24358
1887         [GTK] Scrollbars not clipped correctly
1888
1889         ScrollView scrollbars in subframes are *not* native, so take that
1890         into account again.
1891
1892         * platform/gtk/ScrollbarGtk.cpp:
1893         (ScrollbarGtk::getLocationInParentWindow):
1894         (ScrollbarGtk::frameRectsChanged):
1895         (ScrollbarGtk::paint):
1896         * platform/gtk/ScrollbarGtk.h:
1897
1898 2009-03-06  Peter Kasting  <pkasting@google.com>
1899
1900         Reviewed by Darin Fisher.
1901
1902         https://bugs.webkit.org/show_bug.cgi?id=24405
1903         Horizontal scrolling on Windows was reversed from Mac (and intuition).
1904
1905         * platform/gtk/WheelEventGtk.cpp:
1906         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1907         * platform/win/WheelEventWin.cpp:
1908         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1909
1910 2009-03-06  Peter Kasting  <pkasting@google.com>
1911
1912         Reviewed by Sam Weinig.
1913
1914         Convert some C-style casts to static_cast<>()s.
1915
1916         * platform/gtk/WheelEventGtk.cpp:
1917         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1918         * platform/mac/WheelEventMac.mm:
1919         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1920         * platform/win/WheelEventWin.cpp:
1921         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1922         * platform/wx/MouseWheelEventWx.cpp:
1923         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1924
1925 2009-03-06  Adele Peterson  <adele@apple.com>
1926
1927         Reviewed by Oliver Hunt.
1928
1929         Fix for <rdar://problem/6607524> REGRESSION (Safari 3-4): I can't tab back to the URL field in an empty window (key loop is broken)
1930
1931         I haven't been able to make a test for this since the problem is not reproducible within an empty iframe.
1932
1933         * page/EventHandler.cpp: (WebCore::eventTargetNodeForDocument): We used to ensure that every html document had a body element.
1934           That is no longer true, so we should return the document element for a truly empty document.
1935
1936 2009-03-06  Jay Campan  <jcampan@google.com>
1937
1938         Reviewed by Darin Fisher.
1939
1940         https://bugs.webkit.org/show_bug.cgi?id=24306
1941
1942         Adding a flag to ResourceRequestBase to indicate whether or not upload
1943         progress notifications are needed for a resource. This is useful to
1944         avoid sending these notifications when there are no consumers
1945         (especially in the Chromium case where IPC is involved). 
1946
1947         * platform/network/ResourceRequestBase.h:
1948         (WebCore::ResourceRequestBase::reportUploadProgress):
1949         (WebCore::ResourceRequestBase::setReportUploadProgress):
1950         (WebCore::ResourceRequestBase::ResourceRequestBase):
1951         * xml/XMLHttpRequest.cpp:
1952         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
1953
1954 2009-03-06  Dmitry Titov  <dimich@chromium.org>
1955
1956         Reviewed by Alexey Proskuryakov.
1957
1958         https://bugs.webkit.org/show_bug.cgi?id=24150
1959         Add virtual ScriptExecutionContext::encoding()
1960
1961         Test: http/tests/workers/text-encoding.html
1962
1963         * dom/Document.cpp:
1964         (WebCore::Document::encoding):
1965         * dom/Document.h:
1966         (WebCore::Document::inputEncoding):
1967         (WebCore::Document::charset):
1968         (WebCore::Document::characterSet):
1969         Add new virtual method and route DOM synonym functions on Document through it.
1970
1971         * dom/ScriptExecutionContext.h:
1972         * workers/Worker.cpp:
1973         (WebCore::Worker::Worker):
1974         (WebCore::Worker::notifyFinished):
1975         * workers/WorkerContext.cpp:
1976         (WebCore::WorkerContext::WorkerContext):
1977         (WebCore::WorkerContext::encoding):
1978         (WebCore::WorkerContext::completeURL): Added comment on why this is different from Document::completeURL
1979         * workers/WorkerContext.h:
1980         (WebCore::WorkerContext::create):
1981         * workers/WorkerContextProxy.h:
1982         * workers/WorkerMessagingProxy.cpp:
1983         (WebCore::WorkerMessagingProxy::startWorkerContext):
1984         * workers/WorkerMessagingProxy.h:
1985         * workers/WorkerThread.cpp:
1986         (WebCore::WorkerThreadStartupData::create):
1987         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
1988         (WebCore::WorkerThread::create):
1989         (WebCore::WorkerThread::WorkerThread):
1990         (WebCore::WorkerThread::workerThread):
1991         * workers/WorkerThread.h:
1992         All of the above route the 'encoding' parameter of parent context to the new
1993         instance of WorkerContext - from Worker::notifyFinished() via WorkerMessagingProxy
1994         through WorkerThread through WorkerThreadStartupData and into constructor of WorkerContext.
1995
1996 2009-03-06  Peter Kasting  <pkasting@google.com>
1997
1998         Build bustage fix.
1999
2000         * dom/Node.cpp:
2001         (WebCore::Node::dispatchWheelEvent):
2002
2003 2009-03-06  Eric Carlson  <eric.carlson@apple.com>
2004
2005         Reviewed by Antti Koivisto.
2006
2007         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2008         (WebCore::MediaPlayerPrivate::createQTMovieView):  Delay callback while setting up movieview.
2009
2010 2009-03-06  Douglas R. Davidson  <ddavidso@apple.com>
2011
2012         Reviewed by Justin Garcia.
2013         
2014         https://bugs.webkit.org/show_bug.cgi?id=24108
2015
2016         Update spelling and grammar checking to use the new combined text 
2017         checking (with automatic language identification) on Snow Leopard. 
2018         Tested manually in Mail and Safari; automated tests to come later. 
2019         
2020         * editing/Editor.cpp:
2021         (WebCore::findFirstMisspellingOrBadGrammarInRange):
2022         (WebCore::Editor::advanceToNextMisspelling):
2023         (WebCore::guessesForMisspelledOrUngrammaticalRange):
2024         (WebCore::Editor::guessesForMisspelledOrUngrammaticalSelection):
2025         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
2026         (WebCore::markAllMisspellingsAndBadGrammarInRanges):
2027         (WebCore::Editor::markMisspellingsAndBadGrammar):
2028         * editing/Editor.h:
2029         * loader/EmptyClients.h:
2030         (WebCore::EmptyEditorClient::checkSpellingAndGrammarOfParagraph):
2031         * page/EditorClient.h:
2032         * page/Frame.cpp:
2033         (WebCore::Frame::respondToChangedSelection):
2034         * platform/ContextMenu.cpp:
2035         (WebCore::ContextMenu::populate):
2036
2037 2009-03-06  Peter Kasting  <pkasting@google.com>
2038
2039         Reviewed by Darin Fisher.
2040
2041         https://bugs.webkit.org/show_bug.cgi?id=24407
2042         Windows scroll amount was too small, and wheel scroll distance
2043         conversion code was overly complex.
2044
2045         * page/EventHandler.cpp:
2046         (WebCore::scrollAndAcceptEvent):
2047         * platform/PlatformWheelEvent.h:
2048         (WebCore::):
2049         * platform/ScrollView.cpp:
2050         (WebCore::ScrollView::wheelEvent):
2051         * platform/Scrollbar.h:
2052         * platform/gtk/WheelEventGtk.cpp:
2053         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2054         * platform/mac/WheelEventMac.mm:
2055         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2056         * platform/qt/WheelEventQt.cpp:
2057         * platform/win/WheelEventWin.cpp:
2058         (WebCore::horizontalScrollChars):
2059         (WebCore::verticalScrollLines):
2060         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2061         * platform/wx/MouseWheelEventWx.cpp:
2062         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2063
2064 2009-03-06  Dimitri Glazkov  <dglazkov@chromium.org>
2065
2066         Reviewed by Adam Roben.
2067
2068         Generate valid bindings with HTML5 database support disabled. 
2069
2070         * inspector/InspectorController.idl: Added feature guard around 
2071         databaseTableNames definition.
2072
2073 2009-03-04  Xan Lopez  <xan@gnome.org>
2074
2075         Reviewed by Holger Freyther.
2076
2077         https://bugs.webkit.org/show_bug.cgi?id=24358
2078         [GTK] Scrollbars not clipped correctly
2079
2080         Do not take into account the case of being a ScrollView scrollbar,
2081         since those are native in our case.
2082
2083         * platform/gtk/ScrollbarGtk.cpp:
2084         (ScrollbarGtk::frameRectsChanged):
2085
2086 2009-03-04  Xan Lopez  <xan@gnome.org>
2087
2088         Reviewed by Holger Freyther.
2089
2090         https://bugs.webkit.org/show_bug.cgi?id=24358
2091         [GTK] Scrollbars not clipped correctly
2092
2093         Move Widget::paint to ScrollbarGtk::paint, since it's scrollbar
2094         specific and it's our only Widget anyway.
2095
2096         * platform/gtk/ScrollbarGtk.cpp:
2097         (ScrollbarGtk::paint):
2098         * platform/gtk/ScrollbarGtk.h:
2099         * platform/gtk/WidgetGtk.cpp:
2100
2101 2009-03-04  Xan Lopez  <xan@gnome.org>
2102
2103         Reviewed by Holger Freyther.
2104
2105         https://bugs.webkit.org/show_bug.cgi?id=24358
2106         [GTK] Scrollbars not clipped correctly
2107
2108         Use correct clip rectangle and apply coordinate translation needed
2109         for non-ScrollView scrollbars.
2110
2111         We were ignoring the clip rectangle passed as parameter, which is
2112         wrong in the case of non coalesced expose events. This, in turn,
2113         uncovers the fact that we were not applying coordinate translation
2114         to our position.
2115
2116         * platform/gtk/WidgetGtk.cpp:
2117         (WebCore::Widget::paint):
2118
2119 2009-03-06  Eric Carlson  <eric.carlson@apple.com>
2120
2121         Build fix, no review
2122
2123         * platform/graphics/chromium/MediaPlayerPrivateChromium.h: fix setSize declaration
2124
2125 2009-03-06  Eric Carlson  <eric.carlson@apple.com>
2126
2127         Reviewed by Simon Fraser.
2128
2129         https://bugs.webkit.org/show_bug.cgi?id=22790
2130         Bug 22790: [Transforms] MediaPlayer::setRect() makes no sense with transforms
2131         Replace media engine setRect with setSize since they don't use about the 
2132         position anyway.
2133
2134         * platform/graphics/MediaPlayer.cpp:
2135         (WebCore::NullMediaPlayerPrivate::setSize): Changed from setRect.
2136         (WebCore::MediaPlayer::setSize): Ditto.
2137         * platform/graphics/MediaPlayer.h:
2138         (WebCore::MediaPlayer::size): Changed from rect().
2139
2140         * platform/graphics/MediaPlayerPrivate.h: Changed setRect to setSize.
2141
2142         * platform/graphics/chromium/MediaPlayerPrivateChromium.h: Ditto.
2143
2144         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: 
2145         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_size instead of m_rect
2146         (WebCore::MediaPlayerPrivate::setSize): Changed from setRect
2147         (WebCore::MediaPlayerPrivate::paint): update comment
2148         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: m_rect -> m_size.
2149
2150         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:  m_rect
2151         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2152         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): Initialize m_rect.
2153         (WebCore::MediaPlayerPrivate::createQTMovieView): setRect-> setSize.
2154         (WebCore::MediaPlayerPrivate::setSize): Changed from setRect
2155         (WebCore::MediaPlayerPrivate::paint): Call view:setFrame: when in a media document so 
2156         the movie is drawn in the correct location.
2157
2158         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
2159         (WebCore::MediaPlayerPrivate::setSize):  Changed from setRect
2160         * platform/graphics/qt/MediaPlayerPrivatePhonon.h:
2161
2162         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2163         (WebCore::MediaPlayerPrivate::setSize):  Changed from setRect
2164         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
2165
2166         * rendering/RenderVideo.cpp:
2167         (WebCore::RenderVideo::updatePlayer): Call setSize instead of setRect.
2168
2169 2009-03-06  Darin Adler  <darin@apple.com>
2170
2171         Reviewed by Darin Fisher.
2172
2173         Bug 24422: REGRESSION: null-URL crash in FrameLoader setting location.hash on new window
2174         https://bugs.webkit.org/show_bug.cgi?id=24422
2175         rdar://problem/6402208
2176
2177         Test: fast/dom/location-new-window-no-crash.html
2178
2179         The issue here is empty (or null) URLs. I picked the "schedule navigation" bottleneck
2180         to add some checks for empty URLs. We could also put the empty URL checks at some
2181         other bottleneck level and add more assertions over time. I tried adding a few more
2182         assertions to functions like loadURL and hit them while running the regression tests,
2183         so it's probably going to be a bit tricky to clean this up throughout the loader.
2184
2185         * loader/FrameLoader.cpp:
2186         (WebCore::ScheduledRedirection::ScheduledRedirection): Explicitly marked this struct
2187         immutable by making all its members const. Added assertions about the arguments,
2188         including that the URL is not empty. Initialized one uninitialized member in one of
2189         the constructors.
2190         (WebCore::FrameLoader::scheduleHTTPRedirection): Added an early exit to make this
2191         a no-op if passed an empty URL.
2192         (WebCore::FrameLoader::scheduleLocationChange): Ditto.
2193         (WebCore::FrameLoader::scheduleRefresh): Ditto.
2194
2195 2009-03-06  Gustavo Noronha Silva  <gns@gnome.org>
2196
2197         Reviewed by Holger Freyther.
2198
2199         https://bugs.webkit.org/show_bug.cgi?id=24423
2200         Use new soup_message_body_set_accumulate API in soup backend
2201
2202         Disable accumulating chunks for request_body on file uploads,
2203         using the new soup API.
2204
2205         * platform/network/soup/ResourceHandleSoup.cpp:
2206         (WebCore::ResourceHandle::startHttp):
2207
2208 2009-03-06  Gustavo Noronha Silva  <gns@gnome.org>
2209
2210         Reviewed by Holger Freyther.
2211
2212         Replace use of deprecated SOUP_MESSAGE_OVERWRITE_CHUNKS flag with
2213         the new soup_message_body_set_accumulate API in soup.
2214
2215         * platform/network/soup/ResourceHandleSoup.cpp:
2216         (WebCore::gotHeadersCallback):
2217         (WebCore::ResourceHandle::startHttp):
2218
2219 2009-03-06  Gustavo Noronha Silva  <gns@gnome.org>
2220
2221         Reviewed by Holger Freyther.
2222
2223         https://bugs.webkit.org/show_bug.cgi?id=24051
2224         Soup backend needs content sniffing capabilities
2225
2226         Perform content sniffing when using soup, so that we have a chance
2227         of figuring out the Content-Type of the file if it's not sent by
2228         the server.
2229
2230         * platform/network/ResourceHandleInternal.h:
2231         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2232         * platform/network/soup/ResourceHandleSoup.cpp:
2233         (WebCore::gotHeadersCallback):
2234         (WebCore::gotChunkCallback):
2235
2236 2009-03-06  Hironori Bono  <hbono@chromium.org>
2237
2238         Reviewed by Alexey Proskuryakov.
2239
2240         https://bugs.webkit.org/show_bug.cgi?id=24342
2241         Cannot insert a Thai character after a Thai prepend character when using ICU 4.0
2242
2243         This change creates a new break iterator "cursorMovementIterator" for
2244         moving cursors and use it when moving an input cursor.
2245         In "TextBreakIteratorICU.cpp", this break iterator uses custom ruleset
2246         based on the one of ICU 3.8.
2247         On the other hand, in "TextBreakIteratorQt.cpp", this break iterator
2248         just calls the characterBreakIterator() function.
2249
2250         Test: editing/inserting/insert-thai-characters-001.html
2251
2252         * platform/text/TextBreakIterator.h: Added a new function cursorMovementIterator().
2253         * platform/text/TextBreakIteratorICU.cpp: Implemented the cursorMovementIterator() function for ICU.
2254         (WebCore::setUpIteratorWithRules): Ditto.
2255         (WebCore::cursorMovementIterator): Ditto.
2256         * platform/text/qt/TextBreakIteratorQt.cpp: Implemented the cursorMovementIterator() function for Qt.
2257         (WebCore::cursorMovementIterator): Ditto.
2258         * rendering/RenderText.cpp: Call the cursorMovementIterator() function when moving an input cursor.
2259         (WebCore::RenderText::previousOffset): Ditto.
2260         (WebCore::RenderText::nextOffset): Ditto.
2261
2262 2009-03-05  Alexey Proskuryakov  <ap@webkit.org>
2263
2264         Reviewed by Oliver Hunt.
2265
2266         <rdar://problem/6621701> Safari 4 Beta Breaks XMLHttpRequest Response Text With Special
2267         Characters (a compatibility issue with widgets).
2268
2269         Test: http/tests/xmlhttprequest/broken-xml-encoding.html
2270
2271         Revert part of an Acid 3 fix - now we are no longer strict when decoding XMLHttpRequest XML
2272         responses.
2273
2274         * loader/TextResourceDecoder.cpp:
2275         (WebCore::TextResourceDecoder::TextResourceDecoder):
2276         (WebCore::TextResourceDecoder::decode):
2277         (WebCore::TextResourceDecoder::flush):
2278         * loader/TextResourceDecoder.h:
2279         (WebCore::TextResourceDecoder::useLenientXMLDecoding):
2280         Don't stop on XML decoding errors if useLenientXMLDecoding() was called.
2281
2282         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::didReceiveData): Don't stop on XML
2283         decoding errors. This behavior is now limited to other kinds of XML content.
2284
2285 2009-03-05  Simone Fiorentino  <simone.fiorentino@consulenti.fastweb.it>
2286
2287         Bug 24382: request to add SH4 platform
2288
2289         <https://bugs.webkit.org/show_bug.cgi?id=24382>
2290
2291         Reviewed by David Kilzer.
2292
2293         * platform/text/AtomicString.cpp:
2294         (WebCore::equal): Aligned memory access on SH4 platform.
2295
2296 2009-03-05  Jeremy Moskovich  <jeremy@chromium.org>
2297
2298         Reviewed by Simon Fraser.
2299
2300         Fix for https://bugs.webkit.org/show_bug.cgi?id=24215
2301
2302         Gears expects an object tag with display:none to instantiate the plugin,
2303         so we add a workaround to make this work and fix Gears on WebKit trunk.
2304
2305         * html/HTMLObjectElement.cpp:
2306         (WebCore::HTMLObjectElement::rendererIsNeeded):
2307
2308 2009-03-05  Avi Drissman  <avi@chromium.org>
2309
2310         Reviewed by Darin Fisher.
2311
2312         Need to have Chromium Mac match Safari Mac's accesskey handling
2313         https://bugs.webkit.org/show_bug.cgi?id=24404
2314
2315         * page/chromium/EventHandlerChromium.cpp:
2316         (WebCore::EventHandler::accessKeyModifiers): Share access key modifiers with Mac Safari when building for the Mac.
2317
2318 2009-03-05  Simon Fraser  <simon.fraser@apple.com>
2319
2320         Reviewed by Dave Hyatt
2321
2322         https://bugs.webkit.org/show_bug.cgi?id=24412
2323         
2324         Fix crash when hit-testing elements with -webkit-transform-style: preserve-3d
2325         but no transform. We need to make localTransformState if we see preserve-3d.
2326         Also need to call update3DTransformedDescendantStatus() before we test
2327         m_has3DTransformedDescendant.
2328
2329         Test: transforms/3d/hit-testing/hit-preserves-3d.html
2330
2331         * rendering/RenderLayer.cpp:
2332         (WebCore::RenderLayer::hitTestLayer):
2333
2334 2009-03-05  Eric Seidel  <eric@webkit.org>
2335
2336         Reviewed by David Hyatt.
2337
2338         Changes to RenderLayer destruction to hopefully help catch an elusive crasher
2339         https://bugs.webkit.org/show_bug.cgi?id=24409
2340         
2341         Added a new RenderBoxModelObject::destroyLayer() call which is
2342         now the only way which RenderLayers should ever be destroyed.
2343         This ensures that the pointer to the layer is cleared in the
2344         RenderObject after destruction, allowing us to ASSERT in the
2345         RenderBoxModelObject destructor.
2346
2347         * rendering/RenderBox.cpp:
2348         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
2349         * rendering/RenderBoxModelObject.cpp:
2350         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
2351         (WebCore::RenderBoxModelObject::destroyLayer):
2352         (WebCore::RenderBoxModelObject::destroy):
2353         (WebCore::RenderBoxModelObject::styleDidChange):
2354         * rendering/RenderBoxModelObject.h:
2355         * rendering/RenderLayer.cpp:
2356         (WebCore::RenderLayer::stackingContext):
2357         (WebCore::RenderLayer::destroy):
2358         (WebCore::RenderLayer::removeOnlyThisLayer):
2359         * rendering/RenderLayer.h:
2360         * rendering/RenderObject.cpp:
2361         (WebCore::RenderObject::destroy):
2362         * rendering/RenderWidget.cpp:
2363         (WebCore::RenderWidget::destroy):
2364
2365 2009-03-05  Eric Seidel  <eric@webkit.org>
2366
2367         Reviewed by David Hyatt.
2368
2369         Remove old, unused IE 5.5 scrollbar-* CSS properties.
2370         Sort the unimplemented getComputedStyle properties so it's
2371         easier to see which ones actually need implementation.
2372
2373         * css/CSSComputedStyleDeclaration.cpp:
2374         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2375         * css/CSSParser.cpp:
2376         (WebCore::CSSParser::parseValue):
2377         * css/CSSPropertyNames.in:
2378         * css/CSSStyleSelector.cpp:
2379         (WebCore::CSSStyleSelector::applyProperty):
2380
2381 2009-03-05  Justin Garcia  <justin.garcia@apple.com>
2382
2383         Reviewed by Darin Adler.
2384         
2385         WebViewDidChangeSelectionNotifications weren't being sent for commands that change the selection's position
2386         within the document without changing its position in the DOM.  For example, pressing return in (caret marked by ^):
2387         <div contentEditable="true"><div>^Hello</div></div>
2388         Undo was being enabled, shouldDeleteDOMRange called, etc. when doing no-op deletes (a delete in an empty document 
2389         for example). 
2390
2391         Changes to layout tests demonstrate fix.
2392         
2393         * editing/EditCommand.cpp:
2394         (WebCore::EditCommand::apply): Don't call applyEditing for a TypingCommand.  The TypingCommand knows whether or
2395         not it did work that needs to be applied.
2396         * editing/Editor.cpp:
2397         (WebCore::Editor::appliedEditing): Moved code (but did not alter) to changeSelectionAfterCommand.
2398         (WebCore::Editor::unappliedEditing): Ditto.
2399         (WebCore::Editor::reappliedEditing): Ditto.
2400         (WebCore::Editor::changeSelectionAfterCommand): Moved code from *appliedEditing into here.  Also call out to
2401         EditorClient::respondToChangedSelection() for commands that changed the selection's position in the document
2402         even if they did not change it's position in the DOM.  Any TypingCommand that gets this far changed it's position
2403         in the document.
2404         * editing/Editor.h:
2405         * editing/TypingCommand.cpp:
2406         (WebCore::TypingCommand::TypingCommand): Removed unused m_appliedEditing.
2407         (WebCore::TypingCommand::typingAddedToOpenCommand): Always apply editing.  We won't get this far if we don't need to.
2408         (WebCore::TypingCommand::deleteKeyPressed): Don't do any of the things that only make sense for Range selections, like
2409         adding to the killring and responding to a change in selections if the delete was a no-op.
2410         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2411         * editing/TypingCommand.h:
2412
2413 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
2414
2415         Reviewed by Adam Roben.
2416
2417         Eliminate a ref-counting leak in InspectorController.
2418
2419         * inspector/InspectorController.h: Made constructor private, added static create method.
2420         * page/Page.cpp:
2421         (WebCore::Page::Page): Change initializer to use static create method.
2422
2423 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
2424
2425         Reviewed by Timothy Hatcher.
2426
2427         https://bugs.webkit.org/show_bug.cgi?id=24355
2428         Add InspectorController.idl and convert InspectorController.cpp to use
2429         JSC bindings.
2430
2431         * DerivedSources.make: Added InspectorController.idl
2432         * WebCore.xcodeproj/project.pbxproj: Added idl, bindings files.
2433         * bindings/js/JSInspectorControllerCustom.cpp: Added.
2434         * bindings/scripts/CodeGeneratorJS.pm: Added Array to no-header types.
2435         * inspector/InspectorController.cpp: Removed hand-rolled bindings.
2436         * inspector/InspectorController.h: Added platform and addSourceToFrame methods.
2437         * inspector/InspectorController.idl: Added.
2438         * page/Page.h: Changed member to RefPtr since InspectorController is now ref-counted.
2439
2440 2009-03-05  Eric Carlson  <eric.carlson@apple.com>
2441
2442         Reviewed by Simon Fraser.
2443
2444         https://bugs.webkit.org/show_bug.cgi?id=24400
2445         Bug 24400: Remove "start", "end", "loopStart", "loopEnd", "currentLoop", and "playCount" 
2446         media element attributes
2447
2448         Test: media/video-loop.html
2449
2450         * html/HTMLMediaElement.cpp:
2451         (WebCore::HTMLMediaElement::HTMLMediaElement):
2452         (WebCore::HTMLMediaElement::loadInternal):
2453         (WebCore::HTMLMediaElement::setNetworkState):
2454         (WebCore::HTMLMediaElement::seek):
2455         (WebCore::HTMLMediaElement::playInternal):
2456         (WebCore::HTMLMediaElement::loop):
2457         (WebCore::HTMLMediaElement::setLoop):
2458         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2459         (WebCore::HTMLMediaElement::endedPlayback):
2460         (WebCore::HTMLMediaElement::updatePlayState):
2461         * html/HTMLMediaElement.h:
2462         * html/HTMLMediaElement.idl:
2463
2464 2009-03-05  Steve Falkenburg  <sfalken@apple.com>
2465
2466         <rdar://problem/6651112> Safari asks about re-posting a form even when page is cached
2467         
2468         Reviewed by Ada Chan.
2469
2470         * platform/network/cf/ResourceHandleCFNet.cpp:
2471         (WebCore::ResourceHandle::willLoadFromCache): Ported from Mac version.
2472
2473 2009-03-05  David Hyatt  <hyatt@apple.com>
2474
2475         Reviewed by Eric Seidel
2476
2477         https://bugs.webkit.org/show_bug.cgi?id=24248
2478
2479         Make sure painting of overflow controls checks that visibility:visible is set on the block before
2480         painting.  Pixel tests caught this regression.
2481
2482         Make sure resizer painting pushes a clip of the corner rect.  It was relying on the clip layers happened
2483         to do to their bounds (which had nothing to do with overflow).
2484
2485         * rendering/RenderBlock.cpp:
2486         (WebCore::RenderBlock::paint):
2487         * rendering/RenderLayer.cpp:
2488         (WebCore::RenderLayer::paintResizer):
2489
2490 2009-03-05  Yong Li  <yong.li@torchmobile.com>
2491
2492         Reviewed by Simon Fraser.
2493
2494         https://bugs.webkit.org/show_bug.cgi?id=24386
2495         A faster implementation of extractMIMETypeFromMediaType.
2496
2497         * platform/network/HTTPParsers.cpp:
2498         (WebCore::extractMIMETypeFromMediaType):
2499
2500 2009-03-05  Yong Li  <yong.li@torchmobile.com>
2501
2502         Reviewed by Antti Koivisto.
2503
2504         https://bugs.webkit.org/show_bug.cgi?id=24392
2505         Do not get the current time for unless we're doing PRELOAD_DEBUG as this
2506         can be unnecessarily expensive.
2507
2508         * html/PreloadScanner.cpp:
2509         (WebCore::PreloadScanner::write):
2510
2511 2009-03-04  Simon Fraser  <simon.fraser@apple.com>
2512
2513         Reviewed by Dave Hyatt
2514
2515         https://bugs.webkit.org/show_bug.cgi?id=24327
2516         
2517         When mapping points and hit testing through transforms, work
2518         correctly when acclerated animations of transforms are running.
2519         
2520         Tested by LayoutTests/animations/animation-hit-test-transform.html,
2521         which only failed when ACCELERATED_COMPOSITING was turned on.
2522
2523         * rendering/RenderLayer.cpp:
2524         (WebCore::RenderLayer::currentTransform):
2525         * rendering/RenderLayer.h:
2526         * rendering/RenderObject.cpp:
2527         (WebCore::RenderObject::transformFromContainer):
2528
2529 2009-03-05  Mike Belshe  <mike@belshe.com>
2530
2531         Reviewed by Darin Fisher.
2532
2533         https://bugs.webkit.org/show_bug.cgi?id=24391
2534         Frame.cpp uses JSC specific includes
2535
2536         * page/Frame.cpp:
2537
2538 2009-03-05  Gustavo Noronha Silva  <gns@gnome.org>
2539
2540         Reviewed by Alexey Proskuryakov.
2541
2542         https://bugs.webkit.org/show_bug.cgi?id=24389
2543         WebKitGTK+ crashes when cancelling plugin loads
2544
2545         Remove bogus calls to the client's didFinishLoading method from
2546         our ResourceHandle::cancel implementation. Calling
2547         didFinishLoading here is mostly inoffensive for most loads, but
2548         causes crashes when plugin loads are cancelled.
2549
2550         * platform/network/soup/ResourceHandleSoup.cpp:
2551         (WebCore::ResourceHandle::cancel):
2552
2553 2009-03-05  Steve Falkenburg  <sfalken@apple.com>
2554
2555         Windows build fix.
2556         
2557         * WebCore.vcproj/QTMovieWin.vcproj:
2558
2559 2009-03-05  Adam Treat  <adam.treat@torchmobile.com>
2560
2561         Build fix for when ENABLE_NETSCAPE_PLUGIN_API = 0.  The method
2562         ScriptController::jsObjectForPluginElement(HTMLPlugInElement*); is not
2563         protected by an #if and uses HTMLPlugInElement so it must be included.
2564
2565         * bindings/js/ScriptController.cpp:
2566
2567 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
2568
2569         GTK Build fix.
2570
2571         * inspector/ConsoleMessage.h: Use proper header.
2572
2573 2009-03-05  Dimitri Glazkov  <dglazkov@chromium.org>
2574
2575         Reviewed by Timothy Hatcher.
2576
2577         https://bugs.webkit.org/show_bug.cgi?id=24376
2578         Split InspectorController.cpp file into separate classes.
2579
2580         * GNUmakefile.am: Modified to include new files.
2581         * WebCore.pro: Ditto.
2582         * WebCore.scons: Ditto.
2583         * WebCore.vcproj/WebCore.vcproj: Ditto.
2584         * WebCore.xcodeproj/project.pbxproj: Ditto.
2585         * WebCoreSources.bkl: Ditto.
2586         * inspector/ConsoleMessage.cpp: Added.
2587         * inspector/ConsoleMessage.h: Added.
2588         * inspector/InspectorController.cpp:
2589         * inspector/InspectorDOMStorageResource.cpp: Added.
2590         * inspector/InspectorDOMStorageResource.h: Added.
2591         * inspector/InspectorDatabaseResource.cpp: Added.
2592         * inspector/InspectorDatabaseResource.h: Added.
2593         * inspector/InspectorResource.cpp: Added.
2594         * inspector/InspectorResource.h: Added.
2595
2596 2009-03-05  Eric Carlson  <eric.carlson@apple.com>
2597
2598         Reviewed by Darin Adler
2599
2600         https://bugs.webkit.org/show_bug.cgi?id=24387
2601         Remove media element bufferingRate attribute. No test necessary as there
2602         were none for this attribute.
2603
2604         * html/HTMLMediaElement.cpp:
2605         (WebCore::HTMLMediaElement::HTMLMediaElement): Don't initialize m_bufferingRate.
2606         (WebCore::HTMLMediaElement::loadInternal): Ditto.
2607         (WebCore::HTMLMediaElement::setNetworkState): Ditto.
2608         (WebCore::HTMLMediaElement::progressEventTimerFired): Don't calculate m_bufferingRate.
2609         * html/HTMLMediaElement.h: Remove m_bufferingRate.
2610         * html/HTMLMediaElement.idl: Ditto.
2611
2612 2009-03-05  Xan Lopez  <xan@gnome.org>
2613
2614         Reviewed by Mark Rowe.
2615
2616         https://bugs.webkit.org/show_bug.cgi?id=24377
2617         [GTK] Comply better with coding style guidelines in ResourceHandleSoup
2618
2619         Use C++ booleans, 0 instead of NULL, prefix boolean variables with
2620         'is', do not use 'else if' if the previous if had a return, delete
2621         trailing whitespace, etc.
2622
2623         * platform/network/ResourceHandleInternal.h:
2624         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2625         * platform/network/soup/ResourceHandleSoup.cpp:
2626         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
2627         (WebCore::fillResponseFromMessage):
2628         (WebCore::restartedCallback):
2629         (WebCore::finishedCallback):
2630         (WebCore::parseDataUrl):
2631         (WebCore::ensureSessionIsInitialized):
2632         (WebCore::ResourceHandle::startHttp):
2633         (WebCore::reportUnknownProtocolError):
2634         (WebCore::ResourceHandle::start):
2635         (WebCore::cleanupGioOperation):
2636         (WebCore::closeCallback):
2637         (WebCore::readCallback):
2638         (WebCore::openCallback):
2639         (WebCore::queryInfoCallback):
2640         (WebCore::ResourceHandle::startGio):
2641
2642 2009-03-04  Simon Fraser  <simon.fraser@apple.com>
2643
2644         Reviewed by Eric Seidel
2645
2646         https://bugs.webkit.org/show_bug.cgi?id=24328
2647         
2648         If an element has backface-visibility: hidden, hit testing should not
2649         hit the back sides of elements. Test for that by inverting the accumulated
2650         transform and looking at the z vector.
2651
2652         Tested by transforms/3d/hit-testing/backface-hit-test.html
2653         
2654         * rendering/RenderLayer.cpp:
2655         (WebCore::RenderLayer::hitTestLayer):
2656
2657 2009-03-04  Adam Langley  <agl@google.com>
2658
2659         Reviewed by Darin Fisher.
2660
2661         r41362 mistakenly added functions "RenderThemeWin::" into
2662         RenderThemeChromiumGtk.cpp. When correcting this, I somehow changed
2663         them to void return types. This patch switches them back to ints.
2664
2665         https://bugs.webkit.org/show_bug.cgi?id=24360
2666
2667         * rendering/RenderThemeChromiumLinux.cpp:
2668         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingLeft):
2669         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingRight):
2670         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingTop):
2671         (WebCore::RenderThemeChromiumLinux::buttonInternalPaddingBottom):
2672
2673 2009-03-04  Adam Langley  <agl@google.com>
2674
2675         Reviewed by Darin Fisher.
2676
2677         Chromium Linux: change some metrics to better match Windows after
2678         r41416. Aesthetically this may be worse, but web-compat is king.
2679
2680         Also, the previous code had an off by one error when drawing
2681         scrollbars which caused the scrollbar to overflow it's bounds by 1px
2682         at the right and bottom edges.
2683
2684         https://bugs.webkit.org/show_bug.cgi?id=24369
2685
2686         * rendering/RenderThemeChromiumLinux.cpp:
2687         (WebCore::):
2688         (WebCore::RenderThemeChromiumLinux::systemFont):
2689         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
2690         (WebCore::ScrollbarThemeChromium::paintTrackPiece):
2691
2692 2009-03-04  Eric Seidel  <eric@webkit.org>
2693
2694         Reviewed by Adam Roben.
2695
2696         Add an ASSERT to better demonstrate the cause of the crash in
2697         https://bugs.webkit.org/show_bug.cgi?id=23736
2698
2699         * loader/DocLoader.cpp:
2700         (WebCore::DocLoader::~DocLoader):
2701
2702 2009-03-04  David Levin  <levin@chromium.org>
2703
2704         Reviewed by Alexey Proskuryakov.
2705
2706         Bug 24337: Assert when doing sync XHR in a worker for a cacheable response.
2707         <https://bugs.webkit.org/show_bug.cgi?id=24337>
2708
2709         Tests: http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache.html
2710                http/tests/xmlhttprequest/workers/xmlhttprequest-file-not-found.html
2711
2712         * loader/mac/ResourceLoaderMac.mm:
2713         (WebCore::ResourceLoader::willCacheResponse):
2714         An identifier is only asssigned if resource load callbacks are done.  So don't send
2715         willCacheResponse which uses identifier if resource load callbacks aren't being sent.
2716
2717 2009-03-04  David Levin  <levin@chromium.org>
2718
2719         Reviewed by Alexey Proskuryakov.
2720
2721         Bug 24330: Sync xhr in workers should send an abort exception when the worker is terminated.
2722         <https://bugs.webkit.org/show_bug.cgi?id=24330>
2723
2724         Test: http/tests/xmlhttprequest/workers/abort-exception-assert.html
2725
2726         * dom/ExceptionCode.cpp:
2727         (WebCore::xmlHttpRequestExceptionNames):
2728         Added missing ABORT_ERR whose absence caused an assert.
2729
2730         * loader/WorkerThreadableLoader.cpp:
2731         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
2732         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
2733         Add more logic to handle the termination case for sync xhr.
2734
2735 2009-03-04  Eric Carlson  <eric.carlson@apple.com>
2736
2737         Reviewed by Antti Koivisto.
2738
2739         https://bugs.webkit.org/show_bug.cgi?id=24364
2740         Add support for HTMLMediaElement canPlayType method. Make
2741         MediaPlayer::supportsType take a ContentType instead of a
2742         separate mime type and codecs parameter.
2743
2744         Test: media/video-can-play-type.html
2745
2746         * dom/DOMImplementation.cpp:
2747         (WebCore::DOMImplementation::createDocument):
2748         * html/HTMLMediaElement.cpp:
2749         (WebCore::HTMLMediaElement::canPlayType): Add canPlayType method.
2750         (WebCore::HTMLMediaElement::loadInternal): selectMediaURL returns a ContentType.
2751         (WebCore::HTMLMediaElement::selectMediaURL): Return a ContentType instead of raw MIME type.
2752         (WebCore::HTMLMediaElement::initialURL): selectMediaURL returns a ContentType.
2753         * html/HTMLMediaElement.h: Add prototype.
2754         * html/HTMLMediaElement.idl: Ditto.
2755         * platform/graphics/MediaPlayer.cpp:
2756         (WebCore::MediaPlayer::load): Take a ContentType instead of raw MIME type.
2757         (WebCore::MediaPlayer::supportsType): Ditto.
2758         * platform/graphics/MediaPlayer.h:
2759
2760 2009-03-04  Antti Koivisto  <antti@apple.com>
2761
2762         Reviewed by Dave Hyatt.
2763
2764         https://bugs.webkit.org/show_bug.cgi?id=24359
2765         Repaint throttling mechanism
2766         
2767         Excessive repainting can slow down page loadind. This implements a timer
2768         based throttling mechanism. It is behind ENABLE(REPAINT_THROTTLING) and not 
2769         enabled by default.
2770
2771         * loader/FrameLoader.cpp:
2772         (WebCore::FrameLoader::checkCompleted):
2773         * page/EventHandler.cpp:
2774         (WebCore::EventHandler::dispatchDragEvent):
2775         (WebCore::EventHandler::dispatchMouseEvent):
2776         (WebCore::EventHandler::keyEvent):
2777         (WebCore::EventHandler::handleTextInputEvent):
2778         * page/FrameView.cpp:
2779         (WebCore::FrameView::FrameView):
2780         (WebCore::FrameView::reset):
2781         (WebCore::FrameView::repaintContentRectangle):
2782         (WebCore::FrameView::beginDeferredRepaints):
2783         (WebCore::FrameView::endDeferredRepaints):
2784         (WebCore::FrameView::checkStopDelayingDeferredRepaints):
2785         (WebCore::FrameView::doDeferredRepaints):
2786         (WebCore::FrameView::updateDeferredRepaintDelay):
2787         (WebCore::FrameView::resetDeferredRepaintDelay):
2788         (WebCore::FrameView::adjustedDeferredRepaintDelay):
2789         (WebCore::FrameView::deferredRepaintTimerFired):
2790         (WebCore::FrameView::paintContents):
2791         * page/FrameView.h:
2792
2793 2009-03-04  Sam Weinig  <sam@webkit.org>
2794
2795         Rubber-stamped by Antti Koivisto.
2796
2797         Remove LOW_BANDWIDTH_DISPLAY as it is not being used by any platforms.
2798
2799         * dom/Document.cpp:
2800         (WebCore::Document::Document):
2801         * dom/Document.h:
2802         (WebCore::Document::haveStylesheetsLoaded):
2803         * html/HTMLTokenizer.cpp:
2804         (WebCore::HTMLTokenizer::scriptHandler):
2805         * loader/Cache.cpp:
2806         (WebCore::Cache::requestResource):
2807         * loader/CachedCSSStyleSheet.cpp:
2808         (WebCore::CachedCSSStyleSheet::checkNotify):
2809         * loader/DocLoader.h:
2810         * loader/FrameLoader.cpp:
2811         (WebCore::FrameLoader::FrameLoader):
2812         (WebCore::FrameLoader::requestFrame):
2813         (WebCore::FrameLoader::stopLoading):
2814         (WebCore::FrameLoader::begin):
2815         (WebCore::FrameLoader::write):
2816         (WebCore::FrameLoader::endIfNotLoadingMainResource):
2817         (WebCore::FrameLoader::checkCompleted):
2818         (WebCore::FrameLoader::requestObject):
2819         (WebCore::FrameLoader::loadItem):
2820         * loader/FrameLoader.h:
2821
2822 2009-03-02  Xan Lopez  <xan@gnome.org>
2823
2824         Reviewed by Mark Rowe.
2825
2826         https://bugs.webkit.org/show_bug.cgi?id=24287
2827         [GTK] Move auth dialog feature to WebKit/
2828
2829         Remove WebKitSoupAuthDialog files from build and stop using it.
2830
2831         * GNUmakefile.am:
2832         * platform/network/soup/ResourceHandleSoup.cpp:
2833         (WebCore::ensureSessionIsInitialized):
2834         * platform/network/soup/webkit-soup-auth-dialog.c: Removed.
2835         * platform/network/soup/webkit-soup-auth-dialog.h: Removed.
2836
2837 2009-03-04  Simon Fraser  <simon.fraser@apple.com>
2838
2839         Reviewed by Dave Hyatt
2840         
2841         https://bugs.webkit.org/show_bug.cgi?id=24361
2842         
2843         Reinstate code that sets result.innerNode when hitTest() returns true,
2844         but never filled in the innerNode. Fixes hit testing of generated content.
2845
2846         Test: fast/css-generated-content/hit-test-generated-content.html
2847
2848         * rendering/RenderLayer.cpp:
2849         (WebCore::RenderLayer::hitTestContents):
2850
2851 2009-03-04  Adam Barth  <abath@webkit.org>
2852
2853         Reviewed by Alexey Proskuryakov.
2854
2855         https://bugs.webkit.org/show_bug.cgi?id=24356
2856
2857         Fix WebKit style for allowUniversalAccessFromFileURLs.
2858
2859         * WebCore.base.exp:
2860         * dom/Document.cpp:
2861         (WebCore::Document::initSecurityContext):
2862         * page/Settings.cpp:
2863         (WebCore::Settings::Settings):
2864         (WebCore::Settings::setAllowUniversalAccessFromFileURLs):
2865         * page/Settings.h:
2866         (WebCore::Settings::allowUniversalAccessFromFileURLs):
2867
2868 2009-03-04  Brady Eidson  <beidson@apple.com>
2869
2870         Reviewed by Darin Adler
2871
2872         <rdar://problem/6619630> Quick Look of vCards stuck on image of first card opened.
2873
2874         I narrowed this down to http://trac.webkit.org/changeset/39304 which, among other things,
2875         consolidated some of the various decision making pieces of the Cache into the new method
2876         FrameLoader::cachePolicy().
2877
2878         Before 39304, when deciding whether to use an existing CachedResource, we checked if the FrameLoader 
2879         is reloading.  If it is, we'd evict any existing resource then recreate it.  Quick looks uses the
2880         same URL for this image every time and expects it to be reloaded with each new card.
2881
2882         The FrameLoader::isReloading() check did one thing - Ask the DocumentLoader if it's cache policy
2883         is "ReloadIgnoringCacheData".  This check was lost in the consolidation to the new method.  
2884
2885         * loader/FrameLoader.cpp:
2886         (WebCore::FrameLoader::cachePolicy): Restore the DocumentLoader's cachePolicy check as a possible
2887           condition for returning CachePolicyReload.
2888
2889 2009-03-04  Timothy Hatcher  <timothy@apple.com>
2890
2891         * English.lproj/localizedStrings.js: Update strings to include "DATABASES",
2892         "LOCAL STORAGE" and "SESSION STORAGE".
2893
2894 2009-03-04  Timothy Hatcher  <timothy@apple.com>
2895
2896         Fix a regression where the Web Inspector console would not animate
2897         in or out correctly.
2898
2899         Reviewed by Anders Carlsson.
2900
2901         * inspector/front-end/inspector.css: Move a z-index to a child element
2902         to get the correct stacking order during the animation.
2903
2904 2009-03-03  David Hyatt  <hyatt@apple.com>
2905
2906         https://bugs.webkit.org/show_bug.cgi?id=24201, pathologically bad block layout.
2907
2908         Make sure to factor clear deltas into y position estimates.  Also avoid doing the comparison of
2909         the final position against the y position estimate until after the clear has happened.  This gets rid
2910         of some duplicated cut/pasted code and also ensures a layout delta only has to be put in once.
2911
2912         Reviewed by Dan Bernstein
2913
2914         Added fast/block/float/nested-clearance.html
2915
2916         * rendering/RenderBlock.cpp:
2917         (WebCore::RenderBlock::collapseMargins):
2918         (WebCore::RenderBlock::clearFloatsIfNeeded):
2919         (WebCore::RenderBlock::estimateVerticalPosition):
2920         (WebCore::RenderBlock::layoutBlockChildren):
2921         (WebCore::RenderBlock::getClearDelta):
2922         * rendering/RenderBlock.h:
2923
2924 2009-03-02  Kim Grönholm  <kim.gronholm@nomovok.com>
2925
2926         Reviewed by Simon Hausmann.
2927
2928         Improvement to 3d transformations rendering in QtWebKit. QTransform is used
2929         instead of QMatrix. This allows perspective transformations since QTransform is
2930         a true 3x3 matrix.
2931
2932         * platform/graphics/qt/GraphicsContextQt.cpp: Use QTransform instead of QMatrix everywhere.
2933         (WebCore::GraphicsContext::getCTM):
2934         (WebCore::GraphicsContext::restorePlatformState):
2935         (WebCore::GraphicsContext::fillPath):
2936         (WebCore::GraphicsContext::strokePath):
2937         (WebCore::GraphicsContext::fillRect):
2938         (WebCore::GraphicsContext::translate):
2939         (WebCore::GraphicsContext::rotate):
2940         (WebCore::GraphicsContext::scale):
2941         (WebCore::GraphicsContext::concatCTM):
2942         * platform/graphics/qt/ImageQt.cpp:
2943         (WebCore::Image::drawPattern):
2944         * platform/graphics/qt/PathQt.cpp:
2945         (WebCore::Path::translate):
2946         (WebCore::Path::transform):
2947         * platform/graphics/qt/PatternQt.cpp:
2948         (WebCore::Pattern::createPlatformPattern):
2949         * platform/graphics/qt/TransformationMatrixQt.cpp:
2950         (WebCore::TransformationMatrix::operator QTransform): Replace the conversion operator
2951         to QMatrix with one to QTransform.
2952         * platform/graphics/transforms/TransformationMatrix.h:
2953         * platform/graphics/qt/FontQt.cpp:
2954
2955 2009-02-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2956
2957         Reviewed by Simon Hausmann.
2958
2959         https://bugs.webkit.org/show_bug.cgi?id=24151
2960         Fix Qt/S60 build break
2961
2962         * platform/FileSystem.h: Create a default case for non-win and non-mac Qt builds
2963         * platform/qt/FileSystemQt.cpp: Ditto
2964         (WebCore::unloadModule):
2965
2966 2009-03-03  Mike Belshe  <mike@belshe.com>
2967
2968         Reviewed by Alexey Proskuryakov.
2969
2970         https://bugs.webkit.org/show_bug.cgi?id=21939
2971         Uninitialized ExceptionCode in DOMWindow::postMessage
2972
2973         * dom/MessagePort.cpp:
2974         (WebCore::MessagePort::postMessage):
2975
2976 2009-03-03  David Kilzer  <ddkilzer@apple.com>
2977
2978         <rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase
2979
2980         Reviewed by Mark Rowe.
2981
2982         The fix is to add INSTALLHDRS_COPY_PHASE = YES and
2983         INSTALLHDRS_SCRIPT_PHASE = YES to WebCore.xcconfig, then to make
2984         sure various build phase scripts work with the installhdrs build
2985         phase.
2986
2987         * Configurations/Base.xcconfig: Defined REAL_PLATFORM_NAME
2988         based on PLATFORM_NAME to work around the missing definition on
2989         Tiger.
2990         * Configurations/WebCore.xcconfig: Added
2991         JAVASCRIPTCORE_PRIVATE_HEADERS_DIR variable to simplify logic in
2992         the "Generate Derived Sources" script.  Added
2993         INSTALLHDRS_COPY_PHASE = YES and INSTALLHDRS_SCRIPT_PHASE = YES.
2994
2995         * WebCore.xcodeproj/project.pbxproj:
2996         - Added shell code to prevent running "Check For Global
2997           Initializers", "Check For Exit Time Destructors" and "Check
2998           For Weak VTables" scripts during the installhdrs build phase.
2999         - Made "Generate Derived Sources" work for the installhdrs build
3000           phase.  Also simplified setting of CREATE_HASH_TABLE by using
3001           JAVASCRIPTCORE_PRIVATE_HEADERS_DIR.
3002
3003 2009-03-02  Adam Langley  <agl@google.com>
3004
3005         Reviewed by Darin Fisher.
3006
3007         Chromium Linux: Switch to using Skia to render widgets.
3008
3009         In order to sandbox the Chromium renderer on Linux we need to remove
3010         the X connection. GTK cannot render without an X connection so, for
3011         now, we render widgets ourselves.
3012
3013         Previously didn't use anti-alias fonts in order to match Windows font
3014         rendering exactly. This was helpful when bootstrapping our layout
3015         tests. Now, however, we are ready to enable it.
3016
3017         https://bugs.webkit.org/show_bug.cgi?id=24244
3018
3019         * platform/chromium/ScrollbarThemeChromium.cpp:
3020         (WebCore::ScrollbarThemeChromium::buttonSize):
3021         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
3022         (WebCore::ScrollbarThemeChromium::scrollbarThickness):
3023         (WebCore::ScrollbarThemeChromium::paintTrackPiece):
3024         (WebCore::ScrollbarThemeChromium::paintButton):
3025         (WebCore::ScrollbarThemeChromium::paintThumb):
3026         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
3027         (WebCore::FontPlatformData::setupPaint):
3028         * platform/graphics/skia/PlatformContextSkia.cpp:
3029         (PlatformContextSkia::PlatformContextSkia):
3030         (PlatformContextSkia::~PlatformContextSkia):
3031         * platform/graphics/skia/PlatformContextSkia.h:
3032         * rendering/RenderThemeChromiumGtk.cpp: Removed.
3033         * rendering/RenderThemeChromiumGtk.h: Removed.
3034         * rendering/RenderThemeChromiumLinux.cpp: Added.
3035         * rendering/RenderThemeChromiumLinux.h: Added.
3036
3037 2009-03-03  Dimitri Glazkov  <dglazkov@chromium.org>
3038
3039         Reviewed by Darin Fisher.
3040
3041         https://bugs.webkit.org/show_bug.cgi?id=24261
3042         Fix return types.
3043
3044         Test: LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.svg
3045
3046         * bindings/v8/V8Binding.h:
3047         (WebCore::toInt32): change return type to int
3048         (WebCore::toFloat): change return type to float.
3049
3050 2009-03-03  Anders Carlsson  <andersca@apple.com>
3051
3052         Reviewed by John Sullivan.
3053
3054         https://bugs.webkit.org/show_bug.cgi?id=22884
3055         <rdar://problem/6449783>
3056         modified layout test crashes Safari
3057
3058         Null check NPStream before dereferencing it.
3059         
3060         * plugins/PluginView.cpp:
3061         (WebCore::PluginView::destroyStream):
3062
3063 2009-03-03  Eric Carlson  <eric.carlson@apple.com>
3064
3065         Reviewed by Simon Fraser.
3066
3067         Fix for <rdar://problem/6641045>
3068         Don't call QTKit to get movie properties until movie metadata has been loaded.
3069
3070         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3071         (WebCore::MediaPlayerPrivate::metaDataAvailable): defined
3072         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3073         (WebCore::MediaPlayerPrivate::createQTTime): return default if !metaDataAvailable.
3074         (WebCore::MediaPlayerPrivate::play): Ditto.
3075         (WebCore::MediaPlayerPrivate::pause): Ditto.
3076         (WebCore::MediaPlayerPrivate::duration): Ditto.
3077         (WebCore::MediaPlayerPrivate::currentTime): Ditto.
3078         (WebCore::MediaPlayerPrivate::seek): Ditto.
3079         (WebCore::MediaPlayerPrivate::seekTimerFired): Ditto.
3080         (WebCore::MediaPlayerPrivate::paused): Ditto.
3081         (WebCore::MediaPlayerPrivate::seeking): Ditto.
3082         (WebCore::MediaPlayerPrivate::naturalSize): Ditto.
3083         (WebCore::MediaPlayerPrivate::hasVideo): Ditto.
3084         (WebCore::MediaPlayerPrivate::setVolume): Ditto.
3085         (WebCore::MediaPlayerPrivate::setRate): Ditto.
3086         (WebCore::MediaPlayerPrivate::dataRate): Ditto.
3087         (WebCore::MediaPlayerPrivate::maxTimeLoaded): Ditto.
3088         (WebCore::MediaPlayerPrivate::totalBytes): Ditto.
3089
3090 2009-03-03  Kevin McCullough  <kmccullough@apple.com>
3091
3092         - Spelling fix.
3093
3094         * page/Console.cpp:
3095         (WebCore::Console::profile):
3096
3097 2009-03-03  Dimitri Glazkov  <dglazkov@chromium.org>
3098
3099         Reviewed by Darin Fisher.
3100
3101         https://bugs.webkit.org/show_bug.cgi?id=23657
3102         Remove Database API callback IDLs from the project. 
3103         They were removed in r40633.
3104
3105         * WebCore.xcodeproj/project.pbxproj: Removed IDL files from the project.
3106
3107 2009-03-03  Kevin McCullough  <kmccullough@apple.com>
3108
3109         Reviewed by Oliver Hunt.
3110
3111         <rdar://problem/6639110> console.profile() doesn't work without a title
3112
3113         * page/Console.cpp:
3114         (WebCore::Console::profile): If there is no title assume this is a user
3115         initiated profile and give it the next incremented title name.
3116
3117 2009-03-03  Timothy Hatcher  <timothy@apple.com>
3118
3119         Fix a regression that broke dirxml and caused an ASSERT in debug builds. Also simplified
3120         the console code and refactored things to have fewer code paths and duplication.
3121
3122         rdar://problem/6367127
3123         https://bugs.webkit.org/show_bug.cgi?id=24329
3124
3125         Reviewed by Kevin McCullough.
3126
3127         Test: manual-tests/inspector/console-dir.html
3128
3129         * bindings/js/JSInspectedObjectWrapper.cpp:
3130         (WebCore::JSInspectedObjectWrapper::wrap): Use the lexicalGlobalObject instead of dynamicGlobalObject
3131         to fix an ASSERT about using a wrapper from the wrong ExecState.
3132         * bindings/js/JSQuarantinedObjectWrapper.cpp:
3133         (WebCore::JSQuarantinedObjectWrapper::JSQuarantinedObjectWrapper): Ditto.
3134         (WebCore::JSQuarantinedObjectWrapper::allowsUnwrappedAccessFrom): Ditto.
3135         * inspector/front-end/Console.js:
3136         (WebInspector.Console.prototype._format): Remove the inline argument and add forceObjectFormat.
3137         When forceObjectFormat is true, the only formatter used is _formatobject.
3138         (WebInspector.Console.prototype._formatvalue): Remove the inline argument.
3139         (WebInspector.Console.prototype._formatstring): Ditto.
3140         (WebInspector.Console.prototype._formatregexp): Ditto.
3141         (WebInspector.Console.prototype._formatarray): Ditto.
3142         (WebInspector.Console.prototype._formatnode): Remove the inline argument and make a DOM tree instead of an anchor.
3143         (WebInspector.Console.prototype._formatobject): Remove the inline argument and always make a property graph.
3144         (WebInspector.Console.prototype._formaterror): Remove the inline argument.
3145         (WebInspector.ConsoleMessage): Remove the case for MessageLevel.Node and
3146         simplify the case for MessageLevel.Object to use the normal _format code path with the %O formatter.
3147         (WebInspector.ConsoleMessage.prototype._format.formatForConsole): Don't pass an additional true argument for inline.
3148         (WebInspector.ConsoleMessage.prototype._format.formatAsObjectForConsole): Added. Pass a true argument for forceObjectFormat.
3149         (WebInspector.ConsoleMessage.prototype._format): Added support for the %O formatter. Use formatForConsole for all arguments.
3150         (WebInspector.ConsoleMessage.prototype.toString): Add the other message levels.
3151         * inspector/front-end/inspector.css: Tweak styles to look and work correctly.
3152         * inspector/front-end/utilities.js:
3153         (Object.type): Return "node" for Node objects.
3154         (Object.describe): Handle the "node" type.
3155         * page/Console.cpp:
3156         (WebCore::printMessageSourceAndLevelPrefix): Fix an assert by adding the other message level types.
3157         (WebCore::Console::dirxml): Use the standard log fuction since it prints a DOM tree for nodes by default.
3158         * page/Console.h:
3159         (WebCore::enum MessageLevel): Removed NodeMessageLevel. Added a FIXME.
3160
3161 2009-03-03  Scott Violet  <sky@google.com>
3162
3163         Reviewed by Eric Seidel.
3164
3165         https://bugs.webkit.org/show_bug.cgi?id=24325
3166         Crash on replacing document contents during drop.
3167
3168         Makes sure a node is in the document during a move before using it.
3169
3170         Test: fast/events/crash-on-mutate-during-drop.html
3171
3172         * editing/MoveSelectionCommand.cpp:
3173         (WebCore::MoveSelectionCommand::doApply):
3174
3175 2009-03-03  Jungshik Shin <jshin@chromium.org>
3176
3177         Reviewed by Eric Seidel.
3178
3179         https://bugs.webkit.org/show_bug.cgi?id=23028
3180         Enable dynamic web font support to Chromium on Windows.
3181         Files that were omitted by mistake in the latest patch
3182         that was landed.
3183
3184         * loader/CachedFont.cpp:
3185         (WebCore::CachedFont::~CachedFont):
3186         (WebCore::CachedFont::ensureCustomFontData):
3187         (WebCore::CachedFont::platformDataFromCustomData):
3188         (WebCore::CachedFont::allClientsRemoved):
3189         * platform/graphics/chromium/FontCustomPlatformData.cpp:
3190         (WebCore::EOTStream::EOTStream):
3191         (WebCore::createFontCustomPlatformData):
3192         * platform/graphics/win/FontCustomPlatformData.cpp:
3193         (WebCore::EOTStream::EOTStream):
3194         (WebCore::createFontCustomPlatformData):
3195
3196 2009-03-03  Gustavo Noronha Silva  <gns@gnome.org>
3197
3198         Reviewed by Alexey Proskuryakov.
3199
3200         https://bugs.webkit.org/show_bug.cgi?id=16826
3201         [Gtk] Implement WebKitDownload
3202
3203         Make the Soup backend able to handle requests without a frame,
3204         since we may have such things now that we support downloads.
3205
3206         * platform/network/ResourceHandleInternal.h:
3207         * platform/network/soup/ResourceHandleSoup.cpp:
3208         (WebCore::ResourceHandle::start):
3209
3210 2009-03-03  Dimitri Glazkov  <dglazkov@chromium.org>
3211
3212         Reviewed by Eric Seidel.
3213
3214         https://bugs.webkit.org/show_bug.cgi?id=24331
3215         Add custom V8 bindings for Element, Attr, HTMLFrame, and HTMLIFrame.
3216
3217         * bindings/v8/custom/V8AttrCustom.cpp: Added.
3218         * bindings/v8/custom/V8CustomBinding.cpp: Added.
3219         * bindings/v8/custom/V8CustomBinding.h: Added attribute-checking helpers.
3220         * bindings/v8/custom/V8ElementCustom.cpp: Added.
3221         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp: Added.
3222         * bindings/v8/custom/V8HTMLIFrameElementCustom.cpp: Added.
3223
3224 2009-03-03  Brady Eidson  <beidson@apple.com>
3225
3226         Reviewed by Darin Adler
3227
3228         <rdar://problem/6616664> - Quick looks of various file types is broken
3229
3230         In http://trac.webkit.org/changeset/40553 there was an attempt to prevent NSURLRequest churn
3231         for non-HTTP loads when the underlying ResourceRequest changed.  Unfortunately it was a little
3232         overzealous as the mainDocumentURL is relevant for all loads, not only HTTP/HTTPS loads.
3233
3234         Partially reverted behavior to always set the mainDocumentURL in situations when we would've
3235         before that patch.
3236
3237         * loader/FrameLoader.cpp:
3238         (WebCore::FrameLoader::addExtraFieldsToRequest):
3239
3240         * platform/network/ResourceRequestBase.cpp:
3241         (WebCore::ResourceRequestBase::setMainDocumentURL):
3242
3243 2009-03-03  Chris Marrin  <cmarrin@apple.com>
3244
3245         Reviewed by Simon Fraser.
3246
3247         https://bugs.webkit.org/show_bug.cgi?id=24256
3248
3249         Added a WebCoreForceSoftwareAnimation flag.
3250
3251         * platform/graphics/mac/GraphicsLayerCA.mm:
3252         (WebCore::forceSoftwareAnimation):
3253         (WebCore::GraphicsLayerCA::setOpacity):
3254         (WebCore::GraphicsLayerCA::animateTransform):
3255         (WebCore::GraphicsLayerCA::animateFloat):
3256
3257 2009-03-02  Chris Marrin  <cmarrin@apple.com>
3258
3259         Reviewed by Sam Weinig.
3260
3261         https://bugs.webkit.org/show_bug.cgi?id=24257
3262
3263         Added prototype properties for several classes with constructors that
3264         were missing them, including the one mentioned in the bug.
3265
3266         Test: fast/dom/Window/custom-constructors.html
3267
3268         * bindings/js/JSAudioConstructor.cpp:
3269         (WebCore::JSAudioConstructor::JSAudioConstructor):
3270         * bindings/js/JSDOMWindowBase.cpp:
3271         (jsDOMWindowBaseWebKitCSSMatrix):
3272         * bindings/js/JSImageConstructor.cpp:
3273         (WebCore::JSImageConstructor::JSImageConstructor):
3274         * bindings/js/JSOptionConstructor.cpp:
3275         (WebCore::JSOptionConstructor::JSOptionConstructor):
3276         * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
3277         (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor):
3278         * bindings/js/JSWebKitCSSMatrixConstructor.h:
3279         * bindings/js/JSWebKitPointConstructor.cpp:
3280         (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
3281         * bindings/js/JSWorkerConstructor.cpp:
3282         (WebCore::JSWorkerConstructor::JSWorkerConstructor):
3283
3284 2009-03-03  Dimitri Glazkov  <dglazkov@chromium.org>
3285
3286         Reviewed by Darin Fisher.
3287
3288         https://bugs.webkit.org/show_bug.cgi?id=24321
3289         Add V8 bindings headers.
3290
3291         * bindings/v8/V8Binding.h: Added.
3292         * bindings/v8/V8Proxy.h: Added.
3293         * bindings/v8/custom/V8CustomBinding.h: Added.
3294         * bindings/v8/custom/V8CustomEventListener.h: Added.
3295
3296 2009-03-03  Jungshik Shin <jshin@chromium.org>
3297
3298         Reviewed by Eric Seidel.
3299
3300         https://bugs.webkit.org/show_bug.cgi?id=23803
3301         Fix an 'off-by-1' error in ChromiumWin's font fallback.
3302
3303         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
3304         (WebCore::FontCache::getFontDataForCharacters):
3305
3306 2009-03-03  Jungshik Shin  <jshin@chromium.org>
3307
3308         Reviewed by Eric Seidel.
3309
3310         http://bugs.webkit.org/show_bug.cgi?id=23028
3311         Enable dynamic web font support to Chromium on Windows: Part 1
3312         - Move OpenTypeUtilities.{cpp,h} to platform/graphics/opentype
3313           from platform/graphics/win because both Windows port and Chromium Windows
3314           port will use them.
3315         - Adjust WebCore.vcproj accordingly.
3316
3317         * WebCore.vcproj/WebCore.vcproj:
3318         * platform/graphics/opentype: Added.
3319         * platform/graphics/opentype/OpenTypeUtilities.cpp: Copied from WebCore/platform/graphics/win/OpenTypeUtilities.cpp.
3320         * platform/graphics/opentype/OpenTypeUtilities.h: Copied from WebCore/platform/graphics/win/OpenTypeUtilities.h.
3321         * platform/graphics/win/OpenTypeUtilities.cpp: Removed.
3322         * platform/graphics/win/OpenTypeUtilities.h: Removed.
3323
3324 2009-03-03  Simon Fraser  <simon.fraser@apple.com>
3325
3326         Reviewed by Dave Hyatt
3327
3328         https://bugs.webkit.org/show_bug.cgi?id=24312
3329         
3330         Take 3D transforms into account when hit testing:
3331         
3332         1. Maintain a bit on each RenderLayer that is set when the layer
3333            has 3d descendants, so that we know when to fall into the slow
3334            hit testing path.
3335            
3336         2. Make a ref-counted HitTestingTransformState, which is used to store
3337            an accumulated transform, and the hit test point, and hitTestRect
3338            in the plane of the ancestor non-3d ('flattening') layer.
3339            
3340            It's ref-counted so we can heap allocate it (to avoid stack bloat),
3341            and avoid copying when hitTestLayer calls itself after applying the transform.
3342            
3343         3. Add logic to hitTestLayer to depth-test just direct descendants, if any have
3344            3D transforms, or to do deep depth-testing when traversing a preserves-3d
3345            hierarchy. When hit, layers compute a z-offset from the ancestor flattening
3346            layer, which allows for correct depth testing.
3347            
3348            The existing early-return codepath is unaffected when there are no 3d transforms
3349            and no preserve-3d.
3350
3351         * rendering/RenderLayer.cpp:
3352         (WebCore::RenderLayer::RenderLayer):
3353         (WebCore::RenderLayer::updateTransform):
3354         (WebCore::RenderLayer::dirty3DTransformedDescendantStatus):
3355         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
3356         (WebCore::RenderLayer::hitTest):
3357         (WebCore::computeZOffset):
3358         (WebCore::RenderLayer::createLocalTransformState):
3359         (WebCore::RenderLayer::hitTestLayer):
3360         (WebCore::RenderLayer::hitTestContents):
3361         * rendering/RenderLayer.h:
3362         (WebCore::RenderLayer::preserves3D):
3363         (WebCore::RenderLayer::has3DTransform):
3364         (WebCore::RenderLayer::setHas3DTransformedDescendant):
3365         (WebCore::RenderLayer::has3DTransformedDescendant):
3366         * rendering/RenderLayerBacking.cpp:
3367         * rendering/TransformState.cpp:
3368         (WebCore::TransformState::flatten):
3369         (WebCore::TransformState::mappedPoint):
3370         (WebCore::HitTestingTransformState::move):
3371         (WebCore::HitTestingTransformState::applyTransform):
3372         (WebCore::HitTestingTransformState::flatten):
3373         (WebCore::HitTestingTransformState::mappedPoint):
3374         (WebCore::HitTestingTransformState::mappedQuad):
3375         * rendering/TransformState.h:
3376         (WebCore::TransformState::TransformState):
3377         (WebCore::HitTestingTransformState::create):
3378         (WebCore::HitTestingTransformState::move):
3379         (WebCore::HitTestingTransformState::HitTestingTransformState):
3380
3381 2009-03-03  Brett Wilson  <brettw@chromium.org>
3382
3383         Fix uninitialized memory reads in the Chromium Windows transparency
3384         code that were identified by Purify,
3385
3386         Reviewed by Darin Fisher.
3387
3388         * platform/graphics/chromium/TransparencyWin.cpp:
3389         (WebCore::TransparencyWin::OwnedBuffers::OwnedBuffers):
3390         (WebCore::TransparencyWin::initializeNewContext):
3391
3392 2009-03-03  Simon Fraser  <simon.fraser@apple.com>
3393
3394         Reviewed by Dave Hyatt
3395
3396         https://bugs.webkit.org/show_bug.cgi?id=24312
3397         
3398         Factor the code that compute a transform relative to the container
3399         into RenderObject::transformFromContainer().
3400         
3401         * rendering/RenderBox.cpp:
3402         (WebCore::RenderBox::mapLocalToAbsolutePoint):
3403         (WebCore::RenderBox::mapAbsoluteToLocalPoint):
3404         * rendering/RenderObject.cpp:
3405         (WebCore::RenderObject::transformFromContainer):
3406         * rendering/RenderObject.h:
3407
3408 2009-03-03  Simon Fraser  <simon.fraser@apple.com>
3409
3410         Reviewed by Dave Hyatt
3411
3412         https://bugs.webkit.org/show_bug.cgi?id=24317
3413         
3414         Always return |true| from RenderTextControlMultiLine::nodeAtPoint() if
3415         the superclass found a node, otherwise we set the innerNode of the
3416         HitTestResult, but don't actually report that we found a hit.
3417
3418         * rendering/RenderTextControlMultiLine.cpp:
3419         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
3420
3421 2009-03-03  Onne Gorter  <onne.gorter@avinity.net>
3422
3423         Reviewed by Anders Carlsson.
3424
3425         https://bugs.webkit.org/show_bug.cgi?id=23707
3426         resizing plugins does not work, because the plugin never gets informed
3427
3428         Make gtk plugins resize correctly, by sending them the setwindow event
3429         correctly. Also ensure that all plugin eventing is done with correct
3430         locking/calling. Mostly copied from mac implementation.
3431
3432         manual test: manual-tests/gtk/plugin-resize-scroll.html
3433
3434         * plugins/PluginView.h:
3435         * plugins/gtk/PluginViewGtk.cpp:
3436         (WebCore::PluginView::dispatchNPEvent):
3437         ensure locking/calling for NPEvents
3438         (WebCore::PluginView::updatePluginWidget):
3439         if something changed, let setNPWindowIfNeeded handle it
3440         (WebCore::PluginView::paint):
3441         (WebCore::PluginView::handleKeyboardEvent):
3442         (WebCore::PluginView::handleMouseEvent):
3443         ensure calling conventions
3444         (WebCore::PluginView::setNPWindowRect):
3445         just pass control to setNPWindowIfNeeded
3446         (WebCore::PluginView::setNPWindowIfNeeded):
3447         event the plugin correctly of new window
3448         (WebCore::PluginView::init):
3449         init through the new setup
3450
3451 2009-03-03  Mike Belshe  <mike@belshe.com>
3452
3453         Reviewed by Darin Fisher.
3454
3455         https://bugs.webkit.org/show_bug.cgi?id=24311
3456         Make IDL returning DOMObject use [V8Custom]
3457
3458         * dom/Document.idl:
3459         * html/HTMLCanvasElement.idl:
3460
3461 2009-03-02  Simon Fraser  <simon.fraser@apple.com>
3462
3463         Reviewed by Adele Peterson
3464
3465         https://bugs.webkit.org/show_bug.cgi?id=24313
3466         
3467         If RenderTextControlSingleLine::nodeAtPoint() pokes a node into the
3468         HitTestResult, then it had better well return |true|. And m_innerBlock
3469         could never have been set as the hit node by the superclass, because
3470         the superclass knows nothing about m_innerBlock.
3471         
3472         Test: fast/forms/input-hit-test-border.html
3473
3474         * rendering/RenderTextControlSingleLine.cpp:
3475         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
3476
3477 2009-03-02  Sam Weinig  <sam@webkit.org>
3478
3479         Reviewed by Mark Rowe.
3480
3481         Enable Geolocation (except on Tiger and Leopard).
3482
3483         * Configurations/WebCore.xcconfig:
3484
3485 2009-03-02  Ojan Vafai  <ojan@chromium.org>
3486
3487         Reviewed by Adele Peterson.
3488
3489         Fix https://bugs.webkit.org/show_bug.cgi?id=24307
3490         Null out m_highlightedNode on hideHighlight().
3491         Ran WebCore/manual-tests/inspector/highlight-nodes.html.
3492
3493         * inspector/InspectorController.cpp:
3494         (WebCore::InspectorController::hideHighlight):
3495
3496 2009-03-02  Sam Weinig  <sam@webkit.org>
3497
3498         Reviewed by Geoffrey Garen.
3499
3500         Fix for <rdar://problem/6507404> Add Geolocation support.
3501
3502         This is not yet turned on for any Mac platform.
3503
3504         * WebCore.xcodeproj/project.pbxproj:
3505         * page/Chrome.cpp:
3506         (WebCore::Chrome::shouldAllowGeolocationForFrame):
3507         * page/Chrome.h:
3508         * page/ChromeClient.h:
3509         (WebCore::ChromeClient::shouldAllowGeolocationForFrame):
3510         * page/Geolocation.cpp:
3511         (WebCore::Geolocation::Geolocation):
3512         (WebCore::Geolocation::disconnectFrame): Remove call to setUsingGeolocation as the document
3513         will not be alive at this point.
3514         (WebCore::Geolocation::getCurrentPosition): Check if the embedding app allows geolocation and
3515         return a PERMISSION_DENIED if not.
3516         (WebCore::Geolocation::watchPosition): Ditto.
3517         (WebCore::Geolocation::shouldAllowGeolocation): Perform request to embedding layer of whether
3518         to allow geolocation and cache the result. 
3519         * page/Geolocation.h:
3520         (WebCore::Geolocation::):
3521         * platform/GeolocationService.cpp:
3522         * platform/GeolocationService.h:
3523         (WebCore::GeolocationService::~GeolocationService):
3524         (WebCore::GeolocationService::stopUpdating):
3525         * platform/mac/GeolocationServiceMac.h: Added.
3526         (WebCore::GeolocationServiceMac::lastPosition):
3527         (WebCore::GeolocationServiceMac::lastError):
3528         * platform/mac/GeolocationServiceMac.mm: Added.
3529         (WebCore::GeolocationService::create):
3530         (WebCore::GeolocationServiceMac::GeolocationServiceMac):
3531         (WebCore::GeolocationServiceMac::~GeolocationServiceMac):
3532         (WebCore::GeolocationServiceMac::startUpdating):
3533         (WebCore::GeolocationServiceMac::stopUpdating):
3534         (WebCore::GeolocationServiceMac::suspend):
3535         (WebCore::GeolocationServiceMac::resume):
3536         (WebCore::GeolocationServiceMac::positionChanged):
3537         (WebCore::GeolocationServiceMac::errorOccurred):
3538         (-[WebCoreCoreLocationObserver initWithCallback:]):
3539         (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
3540         (-[WebCoreCoreLocationObserver locationManager:didFailWithError:]):
3541
3542 2009-03-02  Kevin Ollivier  <kevino@theolliviers.com>
3543
3544         Build fixes for wxWidgets Mac trunk build.
3545
3546         * platform/wx/wxcode/mac/carbon/fontprops.cpp:
3547         (wxFontProperties::wxFontProperties):
3548         (GetTextExtent):
3549         * webcore-wx.bkl:
3550
3551 2009-03-02  Kevin Ollivier  <kevino@theolliviers.com>
3552
3553         wxGTK missing header build fix.
3554
3555         * platform/wx/wxcode/gtk/fontprops.cpp:
3556
3557 2009-03-02  Dan Bernstein  <mitz@apple.com>
3558
3559         Reviewed by Adam Roben.
3560
3561         - fix https://bugs.webkit.org/show_bug.cgi?id=21811
3562           REGRESSION: Windows Build Not Selecting Proper Font
3563
3564         * platform/graphics/win/FontCacheWin.cpp:
3565         (WebCore::createGDIFont): Added back code to verify that the created
3566         HFONT has the requested face name.
3567
3568 2009-03-02  Timothy Hatcher  <timothy@apple.com>
3569
3570         Fixes a regression caused by splitting the input and output of console commands.
3571
3572         https://bugs.webkit.org/show_bug.cgi?id=24293
3573
3574         Reviewed by Kevin McCullough.
3575
3576         * inspector/front-end/Console.js:
3577         (WebInspector.Console.prototype.addMessage): Don't treat ConsoleCommandResult as a
3578         normal ConsoleMessage when appending. This prevents resetting repeatCounts incorrectly.
3579
3580 2009-03-02  Timothy Hatcher  <timothy@apple.com>
3581
3582         Make exception messages and logged Error objects display consistently.
3583
3584         https://bugs.webkit.org/show_bug.cgi?id=18983
3585
3586         Reviewed by Adam Roben.
3587
3588         * English.lproj/localizedStrings.js: Remove a string for line numbers.
3589         * inspector/front-end/Console.js:
3590         (WebInspector.Console.prototype._enterKeyPressed): Pass the exception
3591         boolean to the ConsoleCommandResult constructor and don't pass level.
3592         (WebInspector.Console.prototype._formatnode): Fix a className typo.
3593         (WebInspector.Console.prototype._formaterror): Add an error-message
3594         classed span around the message to show in red and remove the
3595         console-message-url class from the link so it doesn't float right.
3596         Instead enclose the link in parentheses and use displayNameForURL
3597         to shorten the URL in the link.
3598         (WebInspector.ConsoleMessage.prototype.toMessageElement): Simplify
3599         how line numbers are shown since link underlining a string with
3600         parentheses looks bad.
3601         (WebInspector.ConsoleCommandResult): Take an exception boolean flag
3602         instead of a level and get line and URL based on that flag.
3603         * inspector/front-end/inspector.css: Tweaks to the styles.
3604
3605 2009-03-02  Ojan Vafai  <ojan@chromium.org>
3606
3607         Reviewed by Adele Peterson.
3608
3609         Bug 24048: extra windows button padding doesn't apply when there's no&n