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