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