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