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