JavaScriptCore:
[WebKit-https.git] / WebCore / ChangeLog
1 2007-02-17  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2
3         Reviewed by Adam Roben.
4
5         Fix crashes on ARM due to different struct packing. Based on a patch
6         from Mike Emmel.
7
8         * platform/DeprecatedString.cpp: compile-time assert to make sure sizeof(DeprecatedChar) == 2
9         * platform/DeprecatedString.h: pack DeprecatedChar struct to ensure that
10         sizeof(DeprecatedChar) == 2. Move _internalBuffer in DeprecatedStringData
11         to the end, to avoid crashes on ARM due to different struct packing.
12
13 2007-02-16  Adele Peterson  <adele@apple.com>
14
15         Reviewed by Mitz.
16
17         Fix for http://bugs.webkit.org/show_bug.cgi?id=11534
18         <rdar://problem/4946947> REGRESSION: Readonly text fields don't scroll when selecting content
19
20         Test: fast/forms/input-readonly-autoscroll.html
21
22         Implemented autoscroll methods for RenderTextControl, so this works on non-editable text controls.
23
24         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::autoscroll):
25         * rendering/RenderTextControl.h: (WebCore::RenderTextControl::shouldAutoscroll):
26
27 2007-02-17  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
28
29         Reviewed by Adam Roben.
30
31         Curl networking improvements inspired by Mike Emmel's patches in
32         http://bugs.webkit.org/show_bug.cgi?id=11332.
33         Fix FrameLoaderClientGdk due to changed FrameLoaderClient API.
34
35         * loader/gdk/FrameLoaderClientGdk.cpp: Massage for changed API.
36         (WebCore::FrameLoaderClientGdk::saveViewStateToItem):
37         (WebCore::FrameLoaderClientGdk::restoreViewState):
38         (WebCore::FrameLoaderClientGdk::generatedMIMETypeForURLScheme):
39         (WebCore::FrameLoaderClientGdk::willUseArchive):
40         * loader/gdk/FrameLoaderClientGdk.h: Ditto.
41         * platform/network/ResourceHandleInternal.h: Remember url and custom headers
42         for the request lifetime and free them at the end.
43         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
44         * platform/network/gdk/ResourceHandleCurl.cpp: Ditto.
45         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
46         * platform/network/gdk/ResourceHandleManager.cpp: url improvements:
47         - remove m_useSimple code-path since it wasn't used anywhere
48         - don't use hashmap for keeping track of outstanding jobs - curl does it anyway
49         - set custom headers from request
50         - enable gzip and deflate through Accept-Encoding
51         - setup curl to share cookies and DNS cache between requests
52         - enable persisting of cookies in a file (if client provides file name
53           for cookies via ResourceHandleManager::setCookieJarFileName())
54         (WebCore::ResourceHandleManager::ResourceHandleManager):
55         (WebCore::ResourceHandleManager::setCookieJarFileName):
56         (WebCore::ResourceHandleManager::downloadTimerCallback):
57         (WebCore::ResourceHandleManager::removeFromCurl):
58         (WebCore::ResourceHandleManager::setupPUT):
59         (WebCore::ResourceHandleManager::setupPOST):
60         (WebCore::ResourceHandleManager::add):
61         (WebCore::ResourceHandleManager::cancel):
62         * platform/network/gdk/ResourceHandleManager.h:
63
64 2007-02-17  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
65
66         Reviewed by Adam Roben.
67
68         Gdk fixes.
69
70         * page/gdk/EventHandlerGdk.cpp: Comment out chatty message.
71         (WebCore::EventHandler::handleDrag):
72         * platform/gdk/EditorClientGdk.cpp: Enable entering text into text field.
73         (WebCore::EditorClientGdk::shouldInsertText):
74
75 2007-02-16  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
76
77         Reviewed by Adam Roben.
78
79         Move Path implementation from TemporaryLinkStubs.cpp to
80         its own file.
81         Implement setLineCap, setLineJoin and setMiterLimit for
82         cairo's GraphicsContext.
83
84         * WebCoreSources.bkl:
85         * platform/gdk/TemporaryLinkStubs.cpp:
86         * platform/graphics/cairo/GraphicsContextCairo.cpp:
87         (WebCore::GraphicsContext::setPlatformFillColor):
88         (WebCore::GraphicsContext::setPlatformStrokeColor):
89         (WebCore::GraphicsContext::setLineCap):
90         (WebCore::GraphicsContext::setLineJoin):
91         (WebCore::GraphicsContext::setMiterLimit):
92         * platform/graphics/cairo/PathCairo.cpp: Added.
93         (WebCore::Path::Path):
94         (WebCore::Path::~Path):
95         (WebCore::Path::contains):
96         (WebCore::Path::translate):
97         (WebCore::Path::boundingRect):
98         (WebCore::Path::operator=):
99         (WebCore::Path::clear):
100         (WebCore::Path::moveTo):
101         (WebCore::Path::addLineTo):
102         (WebCore::Path::addQuadCurveTo):
103         (WebCore::Path::addBezierCurveTo):
104         (WebCore::Path::addArcTo):
105         (WebCore::Path::closeSubpath):
106         (WebCore::Path::addArc):
107         (WebCore::Path::addRect):
108         (WebCore::Path::addEllipse):
109         (WebCore::Path::transform):
110         (WebCore::Path::apply):
111
112 2007-02-16  Ada Chan  <adachan@apple.com>
113
114         Reviewed by Adam and Maciej.
115
116         Use a RefPtr to store the old hover node.
117
118         * rendering/RenderLayer.cpp:
119         (WebCore::RenderLayer::updateHoverActiveState):
120
121 2007-02-16  Darin Adler  <darin@apple.com>
122
123         Reviewed by Adele.
124
125         - fix <rdar://problem/4990864> ASSERT in FormDelegate.m while dragging text between frames
126
127         This symptom is specific to Safari, so no layout test.
128
129         * editing/DeleteSelectionCommand.cpp:
130         (WebCore::DeleteSelectionCommand::doApply): Only call textWillBeDeletedInTextField if the
131         text field is focused.
132         * html/HTMLInputElement.cpp:
133         (WebCore::HTMLInputElement::aboutToUnload): Only call textFieldDidEndEditing if the text
134         field is focused.
135         (WebCore::HTMLInputElement::dispatchBlurEvent): Remove unneeded type cast.
136         (WebCore::HTMLInputElement::defaultEventHandler): Only call doTextFieldCommandFromEvent if
137         the text field is focused.
138         * rendering/RenderTextControl.cpp:
139         (WebCore::RenderTextControl::subtreeHasChanged): Only call textDidChangeInTextArea,
140         textFieldDidBeginEditing, and textDidChangeInTextField if the element is focused.
141
142 2007-02-16  Anders Carlsson  <acarlsson@apple.com>
143
144         Reviewed by Adam.
145
146         <rdar://problem/4943985> 
147         REGRESSION: Dragging standalone images to Finder fails to download the image file
148         
149         Set the data and response on the image resource. Also, since this is platform-independent we don't need to do it in 
150         ImageDocumentMac.mm
151         
152         * loader/ImageDocument.cpp:
153         (WebCore::ImageTokenizer::finish):
154         * loader/mac/ImageDocumentMac.h:
155         * loader/mac/ImageDocumentMac.mm:
156         (WebCore::finishImageLoad):
157
158 2007-02-16  David Harrison  <harrison@apple.com>
159
160         Reviewed by Adam.
161
162         <rdar://problem/5004746> Need mechanism to protect against WebKit calls from secondary threads (DOM APIs)
163
164         * platform/mac/LoggingMac.mm:
165         (WebCore::_WebCoreThreadViolationCheck):
166         Change the default to log the violations.
167
168 2007-02-16  Adele Peterson  <adele@apple.com>
169
170         Reviewed by Mitz.
171
172         Fixed: http://bugs.webkit.org/show_bug.cgi?id=12768
173         <rdar://problem/4995250> REGRESSION: Crash occurs at WebCore::RenderLayer::scrollToOffset() when leaving page that has focus in field
174
175         No test case added.  This crash doesn't occur in DumpRenderTree because the B/F cache is turned off.
176
177         * dom/Node.cpp: (WebCore::Node::willRemove): Check that the document is not in the page cache before 
178
179         * dom/Element.cpp: (WebCore::Element::updateFocusAppearance): Added restorePreviousSelection argument, with appropriate default values.
180         * dom/Element.h: ditto.
181         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateFocusAppearance): ditto.
182         * html/HTMLInputElement.h: ditto.
183         * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateFocusAppearance): ditto.
184         * html/HTMLTextAreaElement.h: ditto.
185
186         * page/PageState.cpp: (WebCore::PageState::restore): Call updateFocusAppearance on the focused node for this page.  Pass true for the
187           restorePreviousSelection argument.
188
189         * rendering/RenderLayer.cpp: Added ASSERTS and nil checks on the RenderView.  It shouldn't be null, but if it is, 
190           we'll fail silently on release builds.
191         (WebCore::RenderLayer::updateLayerPositions):
192         (WebCore::RenderLayer::scrollToOffset):
193         (WebCore::RenderLayer::windowClipRect):
194         (WebCore::RenderLayer::calculateClipRects):
195         (WebCore::RenderLayer::calculateRects):
196         (WebCore::RenderLayer::intersectsDamageRect):
197         (WebCore::RenderLayer::absoluteBoundingBox):
198
199 2007-02-16  Anders Carlsson  <acarlsson@apple.com>
200
201         Reviewed by Darin.
202
203         <rdar://problem/4993055> auto_refcount_underflow_error: WebCore::FrameLoader::continueAfterNavigationPolicy () over-releases under GC
204
205         Add ::adoptNS and ::adoptCF methods to RetainPtr to indicate what type of reference to adopt.
206         
207         * platform/cf/RetainPtr.h:
208         (WebCore::):
209         (WebCore::adoptNSReference):
210         (WebCore::RetainPtr::RetainPtr):
211         (WebCore::::adoptCF):
212         (WebCore::::adoptNS):
213         * platform/mac/FileChooserMac.mm:
214         (WebCore::FileChooser::FileChooser):
215         * platform/network/mac/ResourceErrorMac.mm:
216         (WebCore::ResourceError::operator NSError*):
217         * platform/network/mac/ResourceRequestMac.mm:
218         (WebCore::ResourceRequest::doUpdatePlatformRequest):
219         * platform/network/mac/ResourceResponseMac.mm:
220         (WebCore::ResourceResponse::nsURLResponse):
221
222 2007-02-15  Brady Eidson  <beidson@apple.com>
223
224         Reviewed by Lost Objective-C Hippyness (or hippiness)
225
226         Oh boy, did I ever botch this one up...
227
228         * loader/FrameLoader.cpp:
229         (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem): Null check the FrameView
230
231 2007-02-15  Brady Eidson  <beidson@apple.com>
232
233         Reviewed by Adam's complaint
234
235         Adam wanted me to do an early return, instead.
236
237         * loader/FrameLoader.cpp:
238         (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem):
239
240 2007-02-15  Brady Eidson  <beidson@apple.com>
241
242         Reviewed by Adele
243
244         Forgot to bring the null check with me when I backed this code out of 
245         the FrameLoaderClient
246
247         * loader/FrameLoader.cpp:
248         (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem): null check the HistoryItem
249
250 2007-02-15  Brady Eidson  <beidson@apple.com>
251
252         Reviewed by Adam
253
254         Save scroll state for back/forward navigation in FrameLoader, not the client
255
256        * loader/FrameLoader.cpp:
257         (WebCore::FrameLoader::saveScrollPositionAndViewStateToItem): Actually save the scroll position
258          here instead of asking the FrameLoaderClient
259         (WebCore::FrameLoader::restoreScrollPositionAndViewState): Ditto
260
261         * loader/FrameLoaderClient.h: Renamed/repurposed 2 methods
262
263         * platform/graphics/svg/SVGImageEmptyClients.h:
264         (WebCore::SVGEmptyFrameLoaderClient::restoreViewState): Ditto
265         (WebCore::SVGEmptyFrameLoaderClient::saveViewStateToItem): Ditto
266
267 2007-02-15  Justin Garcia  <justin.garcia@apple.com>
268
269         Reviewed by harrison
270         
271         <rdar://problem/4989774>
272         REGRESSION: Pasting a image into a plain text message can place image on a new line
273
274         <span><img><span><img></span></span> will appear as two
275         images on different lines because of a layout/rendering
276         bug.  This patch avoids the bug by producing cleaner
277         markup so that the paste code can safely remove the style 
278         spans.
279
280         * editing/markup.cpp:
281         (WebCore::createMarkup): Get the default style from the
282         editable root or body instead of the document element.
283         This produces cleaner markup since we don't inline the 
284         root's styles.
285
286 2007-02-15  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
287
288         Reviewed by Adam Roben.
289
290         Add gdk version of ContextMenuClient based on qt version.
291
292         * WebCoreSources.bkl:
293         * page/gdk/ContextMenuClientGdk.cpp: Added.
294         (WebCore::ContextMenuClientGdk::contextMenuDestroyed):
295         (WebCore::ContextMenuClientGdk::getCustomMenuFromDefaultItems):
296         (WebCore::ContextMenuClientGdk::contextMenuItemSelected):
297         (WebCore::ContextMenuClientGdk::downloadURL):
298         (WebCore::ContextMenuClientGdk::copyImageToClipboard):
299         (WebCore::ContextMenuClientGdk::searchWithGoogle):
300         (WebCore::ContextMenuClientGdk::lookUpInDictionary):
301         (WebCore::ContextMenuClientGdk::speak):
302         (WebCore::ContextMenuClientGdk::stopSpeaking):
303         * page/gdk/ContextMenuClientGdk.h: Added.
304         * webcore-base.bkl: curl is needed when building webcore_base files.
305
306 2007-02-15  Kevin Decker  <kdecker@apple.com>
307
308        Reviewed by Darin.
309
310        Fixed: <rdar://problem/4983883> Background of a .mov window should not be white
311
312        * loader/PluginDocument.cpp: 
313        (WebCore::PluginTokenizer::createDocumentStructure): Set a background color of gray
314        for full frame plug-ins, which makes it easier on the eyes. It's also the same 
315        gray that PDFKit uses, too.
316
317 2007-02-15  Mitz Pettel  <mitz@webkit.org>
318
319         Reviewed by Darin.
320
321         - fix http://bugs.webkit.org/show_bug.cgi?id=12625
322           REGRESSION: Crash when closing the web inspector with text selected
323
324         The problem was that selectionRect() was being called on a render tree that
325         had pending style changes. The changes were committed as a side effect in
326         the middle of traversing the render tree, and the current object got
327         deleted as a result. The solution is to update the render tree before
328         starting to traverse it.
329
330         The inspector was affected because it makes style changes in response to
331         an AppKit notification that's sent right before the windowDidResignKey:
332         notification, under which WebKit calls selectionRect(). I couldn't recreate
333         the same conditions (having uncommitted style changes in the tree when the
334         window becomes inactive) using HTML/JS in Safari, hence the lack of
335         a regression test to go with this patch.
336
337         * rendering/RenderView.cpp:
338         (WebCore::RenderView::selectionRect): Added call to updateRendering().
339
340 2007-02-15  Mitz Pettel  <mitz@webkit.org>
341
342         Reviewed by Darin.
343
344         - fix http://bugs.webkit.org/show_bug.cgi?id=10127
345           REGRESSION: Crash undoing delete in textarea
346
347         Document::removeMarkers() was using a Vector iterator (which is just a
348         pointer) and inserting into the Vector at the same time, which made the
349         iterator invalid as the Vector's data buffer was relocated.
350         
351         Replaced all instances of Vector<DocumentMarker>::iterator with indices.
352
353         * dom/Document.cpp:
354         (WebCore::Document::addMarker):
355         (WebCore::Document::copyMarkers):
356         (WebCore::Document::removeMarkers):
357         (WebCore::Document::repaintMarkers):
358         (WebCore::Document::shiftMarkers):
359
360 2007-02-15  Mitz Pettel  <mitz@webkit.org>
361
362         Reviewed by Darin.
363
364         - http://bugs.webkit.org/show_bug.cgi?id=12777
365           REGRESSION (r18574): User profile pages display incorrectly at ebay.ca
366
367         Fixes existing layout tests: tables/mozilla/bugs/bug45486.html
368                                      tables/mozilla_expected_failures/core/col_span2.html
369
370         * rendering/AutoTableLayout.cpp:
371         (WebCore::AutoTableLayout::calcEffectiveWidth): Fixed a mismatch between which
372         columns count as percentage columns when adding up the total percent and
373         which columns count as percentage columns when converting non-percentage
374         columns to effectively-percentage.
375
376 2007-02-14  Mitz Pettel  <mitz@webkit.org>
377
378         Reviewed by Sam Weinig!
379
380         - fix http://bugs.webkit.org/show_bug.cgi?id=12773
381           REGRESSION (r19490): Crash on ipx-server.de
382
383         * manual-tests/background-image-change-in-page-cache.html: Added.
384         * rendering/RenderBox.cpp:
385         (WebCore::RenderBox::imageChanged): Bail out if the object is not in a view,
386         which can happen if the document is in the page cache and the same cached
387         image used for its background is also being used in another document that
388         is currently in view.
389
390 2007-02-14  Adam Roben  <aroben@apple.com>
391
392         Reviewed by Darin.
393
394         Fix http://bugs.webkit.org/show_bug.cgi?id=12517
395         <rdar://problem/4971227> REGRESSION: Tab order incorrect when input
396         inside frame/iframe gets initial focus (12517)
397
398         Test: fast/events/frame-programmatic-focus.html
399
400         * dom/Element.cpp:
401         (WebCore::Element::focus): Call FocusController::setFocusedNode to set
402         the focus for the whole page.
403         * html/HTMLInputElement.cpp:
404         (WebCore::HTMLInputElement::focus): Ditto.
405         * html/HTMLTextAreaElement.cpp:
406         (WebCore::HTMLTextAreaElement::focus): Ditto.
407         * page/EventHandler.cpp:
408         (WebCore::EventHandler::handleTextInputEvent): Send the textInput
409         event to the same target that was sent the keypress event before it.
410         * page/FocusController.cpp:
411         (WebCore::FocusController::advanceFocus): Added a FIXME.
412         (WebCore::FocusController::setFocusedNode): Added. Sets the focused
413         node for a whole page.
414         * page/FocusController.h: Added declaration.
415         * platform/cf/RetainPtr.h: Removed unused pointer_cast functions.
416
417 2007-02-14  Justin Garcia  <justin.garcia@apple.com>
418
419         Reviewed by adele
420         
421         <rdar://problem/4976800>
422         Outdent combines 2 separate strings on 2 different lines
423
424         * editing/IndentOutdentCommand.cpp:
425         (WebCore::IndentOutdentCommand::outdentParagraph): Add line breaks
426         if removing the indented node causes content before or after it to
427         collapse into the same paragraph as its content.
428
429 2007-02-14  Justin Garcia  <justin.garcia@apple.com>
430
431         Reviewed by adele
432         
433         <rdar://problem/4960120>
434         REGRESSION: First Enter key ignored on initial focus of textarea after page load (11967)
435         
436         We'd insert a newline, but into an empty div.  We need two newlines
437         in that case.
438
439         * editing/InsertLineBreakCommand.cpp:
440         (WebCore::lineBreakExistsAtPosition): Returns true if there is a
441         br or a '\n' in text that preserves newlines at the incoming position.
442         (WebCore::InsertLineBreakCommand::doApply): Fixed to handle the empty
443         block case, the anonymous block case.
444
445 2007-02-14  Darin Adler  <darin@apple.com>
446
447         Reviewed by Hyatt.
448
449         - test or http://bugs.webkit.org/show_bug.cgi?id=12417
450           <rdar://problem/4990046> REGRESSION: pressing "Return" in a <select>
451           box does not submit the form (12697)
452
453         Test: fast/forms/select-enter-key.html
454
455         * html/HTMLSelectElement.cpp:
456         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
457         Add code to submit when someone hits the Enter key.
458
459 2007-02-14  Anders Carlsson  <acarlsson@apple.com>
460
461         Reviewed by Darin.
462
463         <rdar://problem/4960112>
464         http://bugs.webkit.org/show_bug.cgi?id=12417
465         REGRESSION: "Are you sure you want to send a form again?" sheet is displayed twice (validator.w3.org)
466         
467         The problem was that doing a reload would cause the "Cache-Control" HTTP header to be set on the request _after_ the first
468         navigation policy delegate callback was called. This would break the request equality check that's used to prevent multiple policy
469         delegate callbacks from getting called for the same request. The solution is to set the header as early as possible.
470         
471         This patch also fixes some bugs in the ResourceRequest equality operator.
472         
473         * loader/FrameLoader.cpp:
474         (WebCore::FrameLoader::reload):
475         Set the "Cache-Control" header field on the request here.
476         
477         * platform/network/FormData.h:
478         (WebCore::operator==):
479         Short-circuit if the pointers are the same.
480         
481         * platform/network/ResourceRequest.cpp:
482         (WebCore::operator==):
483         Check the equality of the objects, not the pointers.
484
485 2007-02-14  David Hyatt  <hyatt@apple.com>
486
487         Move setPlatformData out of FontFallbackListMac.mm and delete the file.  The function was completely
488         cross-platform already.
489
490         Reviewed by Ada
491
492         * WebCore.xcodeproj/project.pbxproj:
493         * platform/FontFallbackList.cpp:
494         (WebCore::FontFallbackList::setPlatformFont):
495
496 2007-02-14  David Hyatt  <hyatt@apple.com>
497
498         Make the Font constructor that takes a FontPlatformData cross-platform, since the implementation was already
499         completely cross-platform.
500
501         Reviewed by Ada
502
503         * platform/Font.cpp:
504         (WebCore::Font::Font):
505         * platform/Font.h:
506         * platform/mac/FontMac.mm:
507
508 2007-02-14  Antti Koivisto  <antti@apple.com>
509
510         Reverting http://bugs.webkit.org/show_bug.cgi?id=11974, it causes repainting problems in some cases.
511
512         * rendering/RenderTextControl.h:
513         (WebCore::RenderTextControl::avoidsFloats):
514
515 2007-02-14  Antti Koivisto  <antti@apple.com>
516
517         Reviewed by Maciej.
518         
519         - fix http://bugs.webkit.org/show_bug.cgi?id=11974
520         REGRESSION: Caret drawn over input when smaller than font size on initial focus
521         <rdar://problem/4960258>
522         
523         Set controlClip for non-search text controls.
524
525         * rendering/RenderTextControl.h:
526         (WebCore::RenderTextControl::hasControlClip):
527
528 2007-02-14  Mitz Pettel  <mitz@webkit.org>
529
530         Reviewed by Hyatt.
531
532         - fix http://bugs.webkit.org/show_bug.cgi?id=12726
533           REGRESSION (r12073): Text wraps in the middle of a word instead of wrapping at the space before the word
534
535         Test: fast/text/break-word.html
536
537         The wrapW variable used to keep track of the width of the characters scanned
538         so far by adding up the widths of individual characters. Because of the
539         rounding hack, the total ended up being bigger than the width of the same characters
540         when measured together as a single run.
541
542         The fix is to use wrapW only as an upper bound, and once it overflows the line's width,
543         fall back on measuring everything from the beginning of the line as one run.
544
545         * rendering/bidi.cpp:
546         (WebCore::RenderBlock::findNextLineBreak): Implemented the above fix, including not measuring
547         additional single characters once wrapW overflows the line. Also moved the assignment
548         to breakNBSP out of the loop since it is constant for the entire text object, made breakWords and
549         midWordBreak update only when they might change, and cleaned up a few things.
550
551 2007-02-14  Antti Koivisto  <antti@apple.com>
552
553         Reviewed by Hyatt.
554
555         - fix http://bugs.webkit.org/show_bug.cgi?id=11923
556         REGRESSION: Placeholder text in password field shows as bullets
557         <rdar://problem/4960257> 
558         
559         Disable textSecurity when placeholder is visible.
560         
561         * rendering/RenderTextControl.cpp:
562         (WebCore::RenderTextControl::updatePlaceholder):
563
564 2007-02-13  Alexey Proskuryakov  <ap@webkit.org>
565
566         Reviewed by Mark Rowe.
567
568         http://bugs.webkit.org/show_bug.cgi?id=12763
569         REGRESSION: button title is displayed incorrectly at quotes.burntelectrons.org
570
571         Test: fast/parser/entities-in-attributes.xhtml
572
573         * dom/XMLTokenizer.cpp:
574         (WebCore::getEntityHandler): Set a correct type for the found entity (I'm not really
575         sure if XML_INTERNAL_GENERAL_ENTITY is _the_ correct one, but it fixes the problem).
576
577 2007-02-13  Darin Adler  <darin@apple.com>
578
579         Reviewed by Hyatt.
580
581         - removed some bogus names (Hyatt smacked me since this doesn't fix a P1)
582
583         * dom/EventNames.h: Removed half-implemented khtmlDragdrop and khtmlMove
584         (you could add listeners, but nobody ever sent the events). Renamed the
585         other two khtml-prefixed internal event names to use the webkit prefix.
586
587         * bindings/js/kjs_dom.cpp:
588         (KJS::DOMEventTargetNode::getValueProperty): Removed ondragdrop and onmove.
589         (KJS::DOMEventTargetNode::putValueProperty): Ditto.
590         * bindings/js/kjs_dom.h:
591         * bindings/js/kjs_window.cpp:
592         (KJS::Window::getValueProperty): Ditto.
593         (KJS::Window::put): Ditto.
594         * bindings/js/kjs_window.h:
595
596         * dom/BeforeTextInsertedEvent.cpp:
597         (WebCore::BeforeTextInsertedEvent::BeforeTextInsertedEvent): Renamed to webkit.
598         * editing/Editor.cpp:
599         (WebCore::dispatchEditableContentChangedEvents): Ditto.
600         * editing/ReplaceSelectionCommand.cpp:
601         (WebCore::ReplacementFragment::ReplacementFragment): Ditto.
602         * html/HTMLTextFieldInnerElement.cpp:
603         (WebCore::HTMLTextFieldInnerTextElement::defaultEventHandler): Ditto.
604
605 2007-02-13  Darin Adler  <darin@apple.com>
606
607         Rubber stamped by Maciej.
608
609         * dom/EventNames.h: Resort names. Removed unused names.
610
611 2007-02-13  Anders Carlsson  <acarlsson@apple.com>
612
613         Reviewed by Kevin Decker.
614
615         <rdar://problem/4990049> 
616         http://bugs.webkit.org/show_bug.cgi?id=12718
617         REGRESSION: Segmentation fault when loading abc.go.com (12718)
618
619         The problem is that redirecting to about:blank causes the delegate to be released even though the load wasn't finished.
620         This is usally not a problem since NSURLConnection retains its delegate. However, the proxy delegate does not retain _it's_ 
621         delegate. The solution is to make releaseDelegate clear out the proxy delegate's delegate.
622         
623         * platform/network/mac/ResourceHandleMac.mm:
624         (WebCore::ResourceHandle::releaseDelegate):
625         If there's a proxy, nil out its delegate too.
626
627 2007-02-13  Dex Deacon  <occupant4@gmail.com>
628
629         Reviewed by Darin.
630
631         - fix for http://bugs.webkit.org/show_bug.cgi?id=12750
632           Vector operator== was not defined correctly. It returned void,
633           did not accept const Vectors, and used an int instead of size_t. 
634
635         * rendering/RenderStyle.h: Added a != operator for StyleDashboardRegion.
636         The only reason this compiled before was that the comparing two vectors
637         with a != was simply comparing the pointers.
638
639 2007-02-13  Darin Adler  <darin@apple.com>
640
641         - roll out fix for <rdar://problem/4874059> REGRESSION: Painter IX:register -
642           Crash in WebCore:: ResourceLoader::willSendRequest()
643
644         This fix was causing a crash in at least one layout test.
645
646         * loader/FrameLoader.cpp:
647         (WebCore::FrameLoader::stopAllLoaders):
648         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
649
650 2007-02-13  Mitz Pettel  <mitz@webkit.org>
651
652         Reviewed by Hyatt.
653
654         - fix http://bugs.webkit.org/show_bug.cgi?id=12746
655         REGRESSION (r13853): List item's first line overflows containing div
656
657         Test: fast/lists/item-not-in-list-line-wrapping.html
658
659         * rendering/bidi.cpp:
660         (WebCore::RenderBlock::findNextLineBreak): Use the list marker's isInside()
661         instead of looking at its style()->listStylePosition(), since if the
662         list item is not in a list, the marker is inside regardless of the style.
663
664 2007-02-13  Rob Buis  <buis@kde.org>
665
666         Reviewed by Maciej.
667
668         http://bugs.webkit.org/show_bug.cgi?id=12578
669         WebKit incorrectly strokes zero-width/height rectangles
670
671         Create an empty path when encountering zero-width/height rectangles, similar to circles with zero radius.
672
673         * platform/graphics/Path.cpp:
674         (WebCore::Path::createRectangle):
675
676 2007-02-13  Rob Buis  <buis@kde.org>
677
678         Reviewed by Maciej.
679
680         Remove SVGDOMImplementation from the project.
681
682         * CMakeLists.txt:
683         * WebCore.pro:
684         * ksvg2/svg/SVGDOMImplementation.cpp: Removed.
685         * ksvg2/svg/SVGDOMImplementation.h: Removed.
686
687 2007-02-13  Brady Eidson <beidson@apple.com>
688
689         Reviewed by Maciej and Adam
690
691         Fixes <rdar://problem/4985497> - Crash when opening a new window to "Same Page"
692
693         * loader/FrameLoader.cpp:
694         (WebCore::FrameLoader::loadItem): Null check documentLoader() since if we're a brand new 
695           WebView, cloning the history of another view, we have no documentLoader()
696
697 2007-02-12  Antti Koivisto  <antti@apple.com>
698
699         Reviewed by Maciej.
700
701         -fix REGRESSION: <select disabled size="5"> listbox cannot be scrolled
702         http://bugs.webkit.org/show_bug.cgi?id=11852
703         <rdar://problem/4960129>
704         
705         Pass mouse press events to scrollbars even if event is swallowed.
706         
707         No layout test, DumpRenderTree eventSender can't hit scrollbars.
708
709         * page/EventHandler.cpp:
710         (WebCore::EventHandler::handleMousePressEvent):
711
712 2007-02-12  David Hyatt  <hyatt@apple.com>
713
714         Fix for bug 12149 (Radar Bug#4928692), external CSS causes incomplete
715         text field focus.
716
717         Make sure to clear out the focus node in willRemove() rather than in
718         detach(), since detach/attach caused by style recalc should not affect
719         the focused node.
720
721         Reviewed by aroben
722
723         * dom/ContainerNode.cpp:
724         (WebCore::ContainerNode::willRemove):
725         * dom/Document.cpp:
726         (WebCore::Document::focusedNodeRemoved):
727         (WebCore::Document::setFocusedNode):
728         * dom/Document.h:
729         * dom/Element.cpp:
730         (WebCore::Element::updateFocusAppearance):
731         * dom/Node.cpp:
732         (WebCore::Node::willRemove):
733         (WebCore::Node::detach):
734         * html/HTMLInputElement.cpp:
735         (WebCore::HTMLInputElement::updateFocusAppearance):
736
737 2007-02-12  Kevin McCullough  <kmccullough@apple.com>
738
739         - reverting fix for rdar://problem/4922454 because it caused regressions
740           and performance problems
741
742         * bindings/objc/DOM.mm:
743         (-[DOMElement image]):
744         (-[DOMElement _imageTIFFRepresentation]):
745         * dom/XMLTokenizer.cpp:
746         (WebCore::XMLTokenizer::notifyFinished):
747         * html/HTMLImageLoader.cpp:
748         (WebCore::HTMLImageLoader::dispatchLoadEvent):
749         * html/HTMLTokenizer.cpp:
750         (WebCore::HTMLTokenizer::reset):
751         (WebCore::HTMLTokenizer::notifyFinished):
752         * ksvg2/misc/SVGImageLoader.cpp:
753         (WebCore::SVGImageLoader::dispatchLoadEvent):
754         * loader/Cache.cpp:
755         (WebCore::Cache::requestResource):
756         (WebCore::Cache::remove):
757         * loader/CachedImage.h:
758         (WebCore::CachedImage::canRender):
759         (WebCore::CachedImage::isErrorImage):
760         * loader/CachedResource.h:
761         * loader/CachedScript.h:
762         (WebCore::CachedScript::errorOccurred):
763         * loader/DocLoader.cpp:
764         (WebCore::DocLoader::requestResource):
765         (WebCore::DocLoader::setLoadInProgress):
766         * loader/FrameLoader.cpp:
767         (WebCore::FrameLoader::canLoad):
768         * page/EventHandler.cpp:
769         (WebCore::selectCursor):
770         * rendering/HitTestResult.cpp:
771         (WebCore::HitTestResult::image):
772         * rendering/RenderImage.cpp:
773         (WebCore::RenderImage::setCachedImage):
774         (WebCore::RenderImage::imageChanged):
775         (WebCore::RenderImage::paint):
776         (WebCore::RenderImage::layout):
777         (WebCore::RenderImage::calcAspectRatioWidth):
778         (WebCore::RenderImage::calcAspectRatioHeight):
779         * rendering/RenderImage.h:
780         (WebCore::RenderImage::isErrorImage):
781         * rendering/RenderListItem.cpp:
782         (WebCore::RenderListItem::setStyle):
783         * rendering/RenderListMarker.cpp:
784         (WebCore::RenderListMarker::isImage):
785
786 2007-02-12  Mitz Pettel  <mitz@webkit.org>
787
788         Reviewed by Dave Hyatt.
789
790         - fix http://bugs.webkit.org/show_bug.cgi?id=12123
791           REGRESSION: Incomplete repaint of floats' overflows
792
793         Tests: fast/repaint/float-overflow.html
794                fast/repaint/float-overflow-right.html
795
796         - fix http://bugs.webkit.org/show_bug.cgi?id=10116
797           REGRESSION: Menu item drawn 2 pixels short on WWDC 2006 Attendee Site
798
799         Reflected in existing test results.
800
801         Unified floats and overflow for the purposes of painting and hit-testing.
802         Overhanging and overflowing floats are now factored into a block's overflow
803         unless their painting has been propagated to an ancestor.
804
805         Changed table cells to no longer expand to enclose overflow, thus making
806         it purely "visual overflow", having no effect on layout in WebCore. It
807         still determines scrolling dimensions.
808
809         * rendering/InlineFlowBox.cpp:
810         (WebCore::InlineFlowBox::placeBoxesHorizontally): Include inline blocks'
811         horizontal overflow in the inline box's dimensions.
812         * rendering/RenderBlock.cpp:
813         (WebCore::RenderBlock::layoutBlock): Removed the expand to enclose overflows
814         behavior. Added code to add this block's floats (and their overflow) to its
815         overflow rect if it is not in a block formatting context. Otherwise, the
816         inclusion of floats in the overflow is deferred until this block's parent
817         examines its floats and possibly adopts overhanging floats.
818         (WebCore::RenderBlock::layoutBlockChildren):
819         (WebCore::RenderBlock::paint): 
820         (WebCore::RenderBlock::floatRect): Changed to return an empty rect if there
821         are no floats or the floats are clipped, instead of returning the border box.
822         (WebCore::RenderBlock::addOverhangingFloats): Any floats of the child that
823         are not to be painted by the parent are added to the child's overflow rect.
824         (WebCore::RenderBlock::addVisualOverflow): Added. Adjusts the overflow
825         bounds to include the given rect.
826         (WebCore::RenderBlock::nodeAtPoint):
827         * rendering/RenderBlock.h:
828         * rendering/RenderFlexibleBox.cpp:
829         (WebCore::RenderFlexibleBox::layoutBlock): 
830         (WebCore::RenderFlexibleBox::layoutHorizontalBox): After placing a normal
831         child, add its floats to its overflow, since painting of floats does not
832         propagate to flexible boxes. 
833         (WebCore::RenderFlexibleBox::layoutVerticalBox): Ditto.
834         * rendering/RenderForeignObject.cpp:
835         (WebCore::RenderForeignObject::layout):
836         * rendering/RenderHTMLCanvas.cpp:
837         (WebCore::RenderHTMLCanvas::layout):
838         * rendering/RenderImage.cpp:
839         (WebCore::RenderImage::layout):
840         * rendering/RenderLayer.cpp:
841         (WebCore::RenderLayer::updateLayerPositions):
842         (WebCore::RenderLayer::absoluteBoundingBox):
843         * rendering/RenderLayer.h:
844         * rendering/RenderObject.cpp:
845         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
846         * rendering/RenderObject.h:
847         (WebCore::RenderObject::expandsToEncloseOverhangingFloats):
848         * rendering/RenderPath.cpp:
849         (WebCore::RenderPath::layout):
850         * rendering/RenderSVGContainer.cpp:
851         (WebCore::RenderSVGContainer::layout):
852         * rendering/RenderSVGText.cpp:
853         (WebCore::RenderSVGText::layout):
854         * rendering/RenderTable.cpp:
855         (WebCore::RenderTable::layout):
856         * rendering/RenderTableCell.h:
857         (WebCore::RenderTableCell::expandsToEncloseOverhangingFloats):
858
859 2007-02-12  Darin Adler  <darin@apple.com>
860
861         Reviewed by Hyatt.
862
863         - fix http://bugs.webkit.org/show_bug.cgi?id=12668
864           <rdar://problem/4893344> REGRESSION: underline not visible for the international
865           input inline hole in most text fields (12668)
866
867         - fix bug where overline and line-through were 1px lower than we intended
868
869         * platform/graphics/GraphicsContext.h: Removed unneeded y offset parameter.
870         * platform/graphics/cairo/GraphicsContextCairo.cpp:
871         (WebCore::GraphicsContext::drawLineForText): Removed bogus y offset and +1.
872         * platform/graphics/cg/GraphicsContextCG.cpp:
873         (WebCore::GraphicsContext::drawLineForText): Ditto.
874         * platform/graphics/qt/GraphicsContextQt.cpp:
875         (WebCore::GraphicsContext::drawLineForText): Ditto.
876
877         * rendering/InlineFlowBox.cpp:
878         (WebCore::InlineFlowBox::paintTextDecorations): Added the "+1" that used to be
879         inside drawLineForText to the underline-drawing code. Changed the other callers
880         of drawLineForText to include the y offset in the y coordinate.
881         * rendering/InlineTextBox.cpp:
882         (WebCore::InlineTextBox::paintDecoration): Ditto. Also renamed _tx and _ty to
883         remove the gratuitious underscores.
884         (WebCore::InlineTextBox::paintMarkedTextUnderline): Made the default thickness
885         be 1px instead of 0 (which ends up being roughly 1px in the CG code path anyway).
886         Fixed the code computing the position to put the underline at the bottom of the
887         line (different from regular underlines which are put 1px under the baseline).
888         The old code used to put the underline 1px further down in the thick case, and
889         2px further down in the non-thick case. Both of those are bad, because they
890         could be completely clipped out in many cases.
891
892 2007-02-12  Anders Carlsson  <acarlsson@apple.com>
893
894         Reviewed by Darin.
895
896         <rdar://problem/4846962>
897         Aperture: Aperture 1.5 - DOM exception occurs when exporting a web gallery
898
899         * dom/ContainerNode.cpp:
900         (WebCore::ContainerNode::replaceChild):
901         Call checkReplaceChild here.
902         
903         * dom/Document.cpp:
904         (WebCore::Document::canReplaceChild):
905         * dom/Document.h:
906         Add implementation of canReplaceChild that makes sure that doing the replacement won't cause
907         more than one element and document type node to end up in the document.
908         
909         * dom/Node.cpp:
910         (WebCore::Node::canReplaceChild):
911         Base implementation of canReplaceChild.
912         
913         (WebCore::Node::checkReplaceChild):
914         New function that does what checAddChild does but calls canReplaceChild.
915         
916 2007-02-12  Kevin Decker <kdecker@apple.com>
917
918         Reviewed by Anders.
919
920         Fixed: <rdar://problem/4874059> REGRESSION: Painter IX:register - Crash in WebCore:: ResourceLoader::willSendRequest()
921         
922         What happened here was that a WebDataSource was being dealloced *while* a load for that resource is still in progress. 
923
924         * loader/FrameLoader.cpp:
925         (WebCore::FrameLoader::stopAllLoaders): Calling stopAllLoaders cancels loads and informs the frame load delegate accordingly.
926         The delegate however may decide to kick off a new provisional load as the result of the cancel. Therefore a local variable 
927         for the provisional and main doucment loader is introduced, and we now only nil out the provisional loader if the local and
928         member provisional variables represent the exact same load.
929         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): Added the same check here, too.
930
931 2007-02-12  Lars Knoll  <lars@trolltech.com>
932
933         Reviewed by Mitz.
934
935         Do not create child renderers for table column groups
936         if the child has not a table column display type.
937
938         * dom/Node.cpp:
939         (WebCore::Node::createRendererIfNeeded):
940         * rendering/RenderObject.h:
941         (WebCore::RenderObject::isChildAllowed):
942         * rendering/RenderTableCol.cpp:
943         (WebCore::RenderTableCol::isChildAllowed):
944         * rendering/RenderTableCol.h:
945
946 2007-02-12  Antti Koivisto  <antti@apple.com>
947
948         Reviewed by Mitz
949
950         Fix assertion failure in layout test.
951
952         * html/HTMLMapElement.cpp:
953         (WebCore::HTMLMapElement::parseMappedAttribute):
954
955 2007-02-12  Kevin McCulough  <kmccullough@apple.com>
956
957         Reviewed by Brady.
958
959         - Fixing a performance regression caused by r19500.  The heart of the matter
960         is that we now call canLoad on every resource request even ones in the cache,
961         to avoid a security issue. So I could not take out the canLoad call, but I
962         but I could try to make it more efficient.
963
964         * loader/DocLoader.cpp:
965         (WebCore::DocLoader::requestResource):
966         (WebCore::DocLoader::setLoadInProgress):
967         * loader/FrameLoader.cpp:
968         (WebCore::FrameLoader::canLoad):
969
970 2007-02-12  Darin Adler  <darin@apple.com>
971
972         Reviewed by Oliver.
973
974         - fix http://bugs.webkit.org/show_bug.cgi?id=12677
975           <rdar://problem/4759563> REGRESSION: Return key is always sent when you confirm
976           a clause in kotoeri (12677)
977
978         - fix http://bugs.webkit.org/show_bug.cgi?id=12596
979           <rdar://problem/4794346> REGRESSION: Tab key shifts form field focus instead of
980           navigating prediction window (12596)
981
982         - fix http://bugs.webkit.org/show_bug.cgi?id=10010
983           <rdar://problem/4822935> REGRESSION: Pressing Return with unconfirmed text in
984           Hangul inserts carriage return (10010)
985
986         - fix http://bugs.webkit.org/show_bug.cgi?id=12531
987           <rdar://problem/4975126> REGRESSION: Inline text input types repeated keys in
988           latest nightly (r19336) (12531)
989
990         - fix http://bugs.webkit.org/show_bug.cgi?id=12539
991           <rdar://problem/4975130> REGRESSION: Pressing Backspace while in inline input
992           area moves to the previous page in history (12539)
993
994         This area still needs work because keypress events are being sent for all the
995         events before they go to the input methods, and it seems that this is not
996         compatible with what other browsers do and with what sites assume. That's covered
997         by this bug:
998
999             http://bugs.webkit.org/show_bug.cgi?id=10871
1000             <rdar://problem/4823129> REGRESSION: IME key events different in nightly (10871)
1001
1002         which is still open.
1003
1004         * bindings/objc/ExceptionHandlers.h: Remove selectRange helper that doesn't really
1005         belong here, and also isn't needed since the callers don't want to raise ObjC
1006         exceptions.
1007         * bindings/objc/ExceptionHandlers.mm: Ditto. Also removed unneeded external globals
1008         that aren't exported anyway and unneeded includes.
1009
1010         * bridge/EditorClient.h: Added Mac-specific function, markedTextAbandoned. Long term
1011         this might move into platform instead, but it's fine to have it on the client for now
1012         as long as it doesn't cause trouble for platforms other than Mac.
1013
1014         * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler): Since
1015         all the event handling code in this function is intended to run on the node itself,
1016         not parent nodes, check and do nothing if this event is bubbling up from another
1017         node. Added code to call a function on EventHandler for default handling of text
1018         input events.
1019
1020         * dom/KeyboardEvent.h:
1021         * dom/KeyboardEvent.cpp: (WebCore::findKeyboardEvent): Added. Just like the
1022         findUIEventWithKeyState function, but specific to keyboard events.
1023
1024         * dom/TextEvent.h: Added isLineBreak and isBackTab flags so that we can carry
1025         additional information about what a text input event is trying to do, but still
1026         go through the DOM event machinery.
1027         * dom/TextEvent.cpp: Ditto.
1028
1029         * editing/Editor.h:
1030         * editing/Editor.cpp:
1031         (WebCore::Editor::handleKeyPress): Removed unneeded check of isCaretOrRange, since
1032         isContentEditable already checks that.
1033         (WebCore::Editor::canEdit): Ditto.
1034         (WebCore::Editor::canEditRichly): Ditto.
1035         (WebCore::Editor::canPaste): Changed to call canEdit for brevity.
1036         (WebCore::Editor::replaceSelectionWithText): Changed to take a const String&.
1037         (WebCore::Editor::shouldInsertText): Ditto.
1038         (WebCore::hasEditableSelection): Removed unneeded check of isCaretOrRange, since
1039         isContentEditable already checks that.
1040         (WebCore::Editor::Editor): Initialize the new m_ignoreMarkedTextSelectionChange
1041         flag. Moved here from WebHTMLView.
1042         (WebCore::Editor::insertText): Moved most of the code from -[WebHTMLView insertText:]
1043         here, since this needs to be done in response to a text input event and we don't want
1044         to go back over the WebKit side for that.
1045         (WebCore::Editor::insertLineBreak): Added. Moved here from -[WebHTMLView insertLineBreak:]
1046         for the same reason -- needs to be done in response to text input events.
1047         (WebCore::Editor::insertParagraphSeparator): Ditto.
1048         (WebCore::Editor::selectMarkedText): Added. Used by insertText.
1049         (WebCore::Editor::discardMarkedText): Added. Used by insertText.
1050         (WebCore::Editor::unmarkText): Added. Used by insertText.
1051         * editing/mac/EditorMac.mm:
1052         (WebCore::Editor::unmarkText): Added. Used by insertText.
1053
1054         * html/HTMLInputElement.cpp:
1055         (WebCore::HTMLInputElement::canHaveSelection): Changed to use isTextField to avoid repeating
1056         the switch statement.
1057         (WebCore::HTMLInputElement::selectionStart): Ditto.
1058         (WebCore::HTMLInputElement::selectionEnd): Ditto.
1059         (WebCore::HTMLInputElement::setSelectionStart): Ditto.
1060         (WebCore::HTMLInputElement::setSelectionEnd): Ditto.
1061         (WebCore::HTMLInputElement::select): Ditto.
1062         (WebCore::HTMLInputElement::setSelectionRange): Ditto.
1063         (WebCore::HTMLInputElement::createRenderer): Resorted cases alphaebtically.
1064         (WebCore::HTMLInputElement::defaultEventHandler): Added code to make hitting return cause the
1065         form to be submitted when it comes through as a text input event. This is now the normal case
1066         on Macintosh, because enter key presses normally turn into this. In addition, change the other
1067         event handling to run only after trying the base defaultEventHandler. That makes the key
1068         handling done in EventTargetNode take precedence over the event handling here for editable text
1069         fields, which is what we want. This gets rid of the need for the hack where we check
1070         inputManagerHasMarkedText and suppress the handling of the enter key.
1071
1072         * page/EventHandler.h: Removed unneeded includes. Moved EventHandlerDragState down into the
1073         private part of the class. Changed sendContextMenuEvent to take a const&. Added new
1074         handleTextInputEvent and defaultTextInputEventHandler functions. Made eventLoopHandleMouseUp
1075         and eventLoopHandleMouseDragged private. Added private defaultTabEventHandler function.
1076         * page/EventHandler.cpp:
1077         (WebCore::EventHandler::sendContextMenuEvent): Changed parameter to be a const&.
1078         (WebCore::EventHandler::defaultKeyboardEventHandler): Rearranged things so that the key bindings
1079         handling in handleKeyPress comes before special tab event handling. In cases where the tab turns
1080         into text to insert, we now handle it in the text input event handler.
1081         (WebCore::EventHandler::handleTextInputEvent): Added. Creates and dispatches a text input event.
1082         (WebCore::EventHandler::defaultTextInputEventHandler): Added. Inserts text, but has special cases
1083         for the tab and newline character cases.
1084         (WebCore::EventHandler::defaultTabEventHandler): Added. Shared by the tab-handling code in
1085         the keyboard event and text input event handlers.
1086         * page/mac/EventHandlerMac.mm: Tweak formatting, remove some unused functions.
1087
1088         * page/FocusController.h: Removed unnneded includes and forwards, and added an overload of
1089         advanceFocus that takes a FocusDirection parameter.
1090         * page/FocusController.cpp: (WebCore::FocusController::advanceFocus): Changed to allow a 0 for
1091         the event pointer. Also added a version where the direction is passed explicitly, to be used
1092         for cases where we want to tab backward even if the event doesn't have a shift modifier key set.
1093
1094         * platform/graphics/svg/SVGImageEmptyClients.h: Updated for change to EditorClient.
1095         This should really probably just use 0 for the EditorClient.
1096
1097         * WebCore.exp: Update both for newly used and no-longer-used entry points.
1098
1099         * page/mac/WebCoreFrameBridge.h:
1100         * page/mac/WebCoreFrameBridge.mm: Removed two unused methods.
1101
1102 2007-02-12  Antti Koivisto  <antti@apple.com>
1103
1104         Reviewed by Darin.
1105
1106         - fixed Imagemap not clickable in www.toptenbooks.net/
1107         http://bugs.webkit.org/show_bug.cgi?id=12738
1108         
1109         Make imagemap names case insensitive in HTML mode
1110
1111         * dom/Document.cpp:
1112         (WebCore::Document::getImageMap):
1113         * html/HTMLMapElement.cpp:
1114         (WebCore::HTMLMapElement::parseMappedAttribute):
1115
1116 2007-02-12  Maciej Stachowiak  <mjs@apple.com>
1117
1118         Reviewed by Antti.
1119
1120         - fixed <rdar://problem/4928675> REGRESSION: Crash in CGBlt_copyBytes under WebCore::Font::drawGlyphs (12083)
1121         http://bugs.webkit.org/show_bug.cgi?id=12083
1122         
1123         Test: fast/text/text-shadow-extreme-value.html
1124
1125         * platform/graphics/cg/GraphicsContextCG.cpp:
1126         (WebCore::GraphicsContext::setShadow): Clamp shadow value to 1000px, anything more seems to 
1127         make CG unhappy.
1128
1129 2007-02-11  Brady Eidson <beidson@apple.com>
1130
1131         Reviewed by Maciej.
1132
1133         First in what will be a series of HistoryItem enhancements to help debugging
1134
1135         * history/HistoryItem.cpp:
1136         (WebCore::HistoryItem::showTree):
1137         (WebCore::HistoryItem::showTreeWithIndent):
1138         (showTree): Outside of WebCore namespace, and extern "C" - to make even the 
1139           DWARF debugger able to find it...  *sigh* 
1140         * history/HistoryItem.h:
1141
1142 2007-02-11  Eric Seidel  <eric@webkit.org>
1143
1144         Reviewed by Anders.
1145
1146         - fixed <rdar://problem/4975133> ASSERT failure and crash right-clicking on image in SVG use test
1147         http://bugs.webkit.org/show_bug.cgi?id=12580
1148         
1149         Test: svg/cust/use-events-crash.svg
1150
1151         * bindings/js/kjs_dom.cpp:
1152         (KJS::toJS):
1153         * ksvg2/svg/SVGElementInstance.cpp:
1154         (WebCore::SVGElementInstance::toNode):
1155         * ksvg2/svg/SVGElementInstance.h:
1156
1157 2007-02-11  Mitz Pettel  <mitz@webkit.org>
1158
1159         Reviewed by Maciej.
1160
1161         - fix http://bugs.webkit.org/show_bug.cgi?id=10144
1162           REGRESSION: Reproducible assertion failure in DeleteSelectionCommand::fixupWhitespace()
1163
1164         Test: fast/text/delete-hard-break-character.html
1165
1166         The bug was caused by not updating a line whose line break object and offset
1167         has been deleted. When deleting text, all lines containing the deleted text
1168         are marked dirty. However, if the first character being deleted is a newline
1169         which serves as a hard line break for the previous line, then that line will
1170         not be marked, and since it will be a clean line ending with a line break,
1171         relayout will begin at the next line. The fix is to check for this when
1172         determining where to relayout from. 
1173
1174         * rendering/bidi.cpp:
1175         (WebCore::RenderBlock::determineStartPosition): Changed the condition for
1176         including the last clean line in relayout to include the case where the
1177         last clean line ends with a line break, but that line break is a newline that
1178         has been deleted.
1179
1180 2007-02-12  Antti Koivisto  <antti@apple.com>
1181
1182         Reviewed by Maciej.
1183         
1184         REGRESSION: Google Calendar cell highlight misplaced
1185         http://bugs.webkit.org/show_bug.cgi?id=12687
1186         
1187         Make offsetLeft/offsetTop/offsetParent behavior match Firefox.
1188
1189         * rendering/RenderObject.cpp:
1190         (WebCore::RenderObject::offsetLeft):
1191         (WebCore::RenderObject::offsetTop):
1192         (WebCore::RenderObject::offsetParent):
1193
1194 2007-02-10  Antti Koivisto  <antti@apple.com>
1195
1196         Reviewed by Maciej.
1197
1198         - fixed REGRESSION: No day/week scrollbar in Google Calendar
1199         http://bugs.webkit.org/show_bug.cgi?id=11985
1200
1201         Make sure overflow:auto scrollbars are always enabled. If they were overflow:scroll
1202         and dynamically changed to auto they might still be disabled.
1203
1204         * rendering/RenderLayer.cpp:
1205         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1206
1207 2007-02-11  Alexey Proskuryakov  <ap@webkit.org>
1208
1209         Reviewed by Hyatt.
1210
1211         http://bugs.webkit.org/show_bug.cgi?id=12581
1212         XPath //title shouldn't match <title> in XHTML
1213
1214         Test: fast/xpath/ensure-null-namespace.xhtml
1215
1216         * xml/XPathStep.cpp:
1217         (WebCore::XPath::Step::nodeTestMatches): Only let a null namespace match any for HTML.
1218
1219 2007-02-10  Alexey Proskuryakov  <ap@webkit.org>
1220
1221         Reviewed by Adam.
1222
1223         http://bugs.webkit.org/show_bug.cgi?id=12701
1224         REGRESSION: After javascript, onChange not triggered when selecting same option
1225
1226         * html/HTMLSelectElement.cpp:
1227         (WebCore::HTMLSelectElement::setSelectedIndex): Remember m_lastOnChangeIndex value,
1228         as it can change from setSelected() now.
1229         (WebCore::HTMLSelectElement::notifyOptionSelected): Update m_lastOnChangeIndex.
1230
1231         * manual-tests/select-onchange-after-js.html: Added. Also tests for bug 11402.
1232
1233 2007-02-10  David Carson  <dacarson@gmail.com>`
1234
1235         Reviewed by Maciej.
1236
1237         Manual tests for http://bugs.webkit.org/show_bug.cgi?id=12636
1238         Call different Java methods that take a variety of Array parameters
1239         from Javascript, passing a Javascript array.
1240
1241         * manual-tests/liveconnect-applet-array-parameters.html: Added.
1242         * manual-tests/resources/ArrayParameterTestApplet.class: Added.
1243         * manual-tests/resources/ArrayParameterTestApplet.java: Added.
1244
1245 2007-02-10  Alexey Proskuryakov  <ap@webkit.org>
1246
1247         Reviewed by Maciej.
1248
1249         http://bugs.webkit.org/show_bug.cgi?id=12724
1250         Crash when enumerating XPath namespace axis
1251
1252         * xml/XPathStep.cpp:
1253         (WebCore::XPath::Step::nodesInAxis): Namespace axis enumeration was broken in that it crashed, and also in that
1254         it returned attribute nodes instead of XPath namespace ones. Removed it altogether.
1255
1256 2007-02-10  Mitz Pettel  <mitz@webkit.org>
1257
1258         Reviewed by Adam.
1259
1260         - fix http://bugs.webkit.org/show_bug.cgi?id=12565
1261           ASSERTION failure on some declarative animations <rdar://problem/4975132>
1262
1263         * ksvg2/svg/SVGAnimationElement.cpp:
1264         (WebCore::parseValues): Changed the string length math to avoid truncating
1265         the last character of each value.
1266         * manual-tests/svg-animation-parseValues.svg: Added.
1267
1268 2007-02-10  Mitz Pettel  <mitz@webkit.org>
1269
1270         Reviewed by Adam.
1271
1272         - fix http://bugs.webkit.org/show_bug.cgi?id=11621
1273           REGRESSION (Native slider): slider thumb not updated when the mouse is dragged/released out of range
1274
1275         No automated test case because dumping the render tree updates layer positions anyway.
1276
1277         * manual-tests/slider-thumb-tracking.html: Added.
1278         * rendering/RenderSlider.cpp:
1279         (WebCore::RenderSlider::setCurrentPosition): Added call to updateLayerPosition()
1280         for the thumb's layer.
1281
1282 2007-02-09  Brady Eidson <beidson@apple.com>
1283
1284         Reviewed by Maciej
1285
1286         <rdar://problem/4965133> WebKit sends file:// url referrers
1287
1288         * loader/SubresourceLoader.cpp:
1289         (WebCore::SubresourceLoader::create): In SubresourceLoader::create(), we make a copy of the original request
1290         to use for the load.  We then call FrameLoader::canLoad() which tells us if we should hide the referer.  Before 
1291         this fix if it said to hide the referrer, we would simply not apply a new referrer to our copy of the request.
1292         But if the original request already had a referrer, so did our copy.  We simply have to clear the referrer from
1293         the copied request.
1294
1295 2007-02-10  Maciej Stachowiak  <mjs@apple.com>
1296
1297         Reviewed by me, patch from Ian Eng (cleaned up by me some).
1298
1299         - fixed <rdar://problem/4988091> objects attached to Window not cleared (memory leak)
1300         
1301         Test case: fast/dom/Window/window-appendages-cleared.html
1302
1303         * bindings/js/kjs_window.cpp:
1304         (KJS::Window::clearHelperObjectProperties):
1305         (KJS::Window::clear):
1306         * bindings/js/kjs_window.h:
1307
1308 2007-02-09  Brady Eidson  <beidson@apple.com>
1309
1310         Reviewed by Tim Hatcher
1311
1312         <rdar://problem/4985497> - Plugs a potential null DocumentLoader deref when 
1313         transitioning out of the Bookmarks View
1314
1315         * loader/FrameLoader.cpp:
1316         (WebCore::FrameLoader::recursiveGoToItem): add a null check
1317
1318 2007-02-09  Beth Dakin  <bdakin@apple.com>
1319
1320         Rubber-stamped by John . . . and Adam.
1321
1322         * page/ContextMenuController.cpp:
1323         (WebCore::ContextMenuController::contextMenuItemSelected): Missing 
1324         break.
1325
1326 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
1327
1328         Reviewed by darin
1329
1330         <rdar://problem/4975120>
1331         REGRESSION: double-cursor after switching window away/back (11770)
1332         <http://bugs.webkit.org/show_bug.cgi?id=11328>
1333         Gmail Editor: Caret can simultaneously appear in both the TO: and message body fields
1334
1335         * page/mac/WebCoreFrameBridge.h: Removed two unused methods
1336         left over from the old form control implementation.
1337
1338 2007-02-09  John Sullivan  <sullivan@apple.com>
1339
1340         * rendering/bidi.cpp:
1341         (WebCore::bidiNext):
1342         At Darin's suggestion, moved the "next = 0" line from my previous patch to the start of the loop body
1343
1344 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
1345
1346         Reviewed by john
1347         
1348         <rdar://problem/4960116>
1349         REGRESSION: Nightly Safari crashes in WebCore::SelectionController::xPosForVerticalArrowNavigation (12416)
1350
1351         * editing/SelectionController.cpp:
1352         (WebCore::SelectionController::xPosForVerticalArrowNavigation):
1353         Null check.  VisiblePosition creation can fail if a node that 
1354         contains the selection was made invisible after the selection 
1355         was made and before this function is called during a selection 
1356         modification operation.
1357
1358 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
1359
1360         Reviewed by john
1361         
1362         <rdar://problem/4983858>
1363         REGRESSION: In a new mail message, attempting to select a single word causes the selection to extend to the previous line
1364
1365         * editing/TextIterator.cpp:
1366         (WebCore::SimplifiedBackwardsTextIterator::exitNode):
1367         We recently split shouldEmitNewlineForNode into
1368         shouldEmitNewline{Before, After}Node, so this function now
1369         needs an implementation that is different from
1370         SimplifiedBackwardsTextIterator::handleNonTextNode.  The
1371         difference is that we must call shouldEmit*BeforeNode
1372         instead of shouldEmit*AfterNode since we are a) exiting
1373         nodes and b) moving backward.
1374
1375 2007-02-09  Justin Garcia  <justin.garcia@apple.com>
1376
1377         Reviewed by john
1378
1379         <rdar://problem/4916541>
1380         Some of the selection isn't preserved during an Indent opreration
1381
1382         * editing/IndentOutdentCommand.cpp:
1383         (WebCore::indexForVisiblePosition): Added.
1384         (WebCore::IndentOutdentCommand::indentRegion): Use rangeLength
1385         and rangeFromLocationAndLength to restore the selection after
1386         the repeated moveParagraph calls necessary to perform indent are
1387         finished.
1388
1389 2007-02-09  John Sullivan  <sullivan@apple.com>
1390
1391         Reviewed by Kevin Decker
1392         
1393         - fixed <rdar://problem/4960095> REPRODUCIBLE HANG: WebKit freezes when printing as PDF
1394           a certain kind of code (12449)
1395  
1396         No test case because I don't know how to make the bug occur without printing.
1397
1398         * rendering/bidi.cpp:
1399         (WebCore::bidiNext):
1400         reset loop's "next" variable after using it; we were setting "current" to the same value
1401         of "next" each subsequent time through the loop, which is not helpful.
1402
1403 2007-02-09  Darin Adler  <darin@apple.com>
1404
1405         Reviewed by Adele.
1406
1407         - Add TextEvent to the DOM (based on the proposed DOM level 3)
1408           to be used to fix some international input bugs soon.
1409           At this point, we don't send any text events.
1410
1411         - Remove some obsolete files.
1412
1413         * CMakeLists.txt:
1414         * WebCore.pro:
1415         * WebCore.xcodeproj/project.pbxproj:
1416         * WebCoreSources.bkl:
1417         Add new files, remove obsolete files.
1418
1419         * DerivedSources.make: Add TextEvent to the Objective-C and JavaScript bindings lists.
1420         * WebCore.exp: Export DOMTextEvent Objective-C wrapper.
1421
1422         * bindings/js/kjs_events.cpp: (KJS::toJS): Added TextEvent to the list of Event subclasses
1423         so we make the right kind of JS wrapper.
1424         * bindings/objc/DOMEvents.mm: (+[DOMEvent _eventWith:]): Same thing, for Objective-C.
1425
1426         * bindings/objc/DOMInternal.h: Added DOMTextEventInternal.h.
1427
1428         * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::hasFeature):
1429         Added "TextEvents", "3.0" to the list of things we'll answer true for
1430         (as specified in the DOM Level 3 documentation).
1431         This isn't so great until we actually send textInput events, but that's coming soon.
1432
1433         * dom/Document.cpp: (WebCore::Document::createEvent): Add "TextEvent" as a way to make
1434         a TextEvent (as specified in the DOM Level 3 documentation).
1435
1436         * dom/Event.h:
1437         * dom/Event.cpp: (WebCore::Event::isTextEvent): Added virtual function to be used
1438         for runtime type checking of Event objects (as for other event types).
1439
1440         * dom/TextEvent.cpp: Added.
1441         * dom/TextEvent.h: Added.
1442         * dom/TextEvent.idl: Added.
1443
1444         * platform/mac/WebCoreWidgetHolder.h: Removed.
1445         * rendering/CounterListItem.h: Removed.
1446         * rendering/CounterResetNode.cpp: Removed.
1447         * rendering/CounterResetNode.h: Removed.
1448
1449 2007-02-09  Anders Carlsson  <acarlsson@apple.com>
1450
1451         Reviewed by Geoff.
1452
1453         <rdar://problem/4816376> 
1454         REGRESSION: NetNewsWire 3.0 - Crashes in WebDocumentLoaderMac::attachToFrame() (12674)
1455         
1456         The bug was that the NNW policy delegate never calls back on the policy listener so we'll try to do a load
1457         while there's a policy decision underway. The extra call to setPolicyDocumentLoader would cause a detached (and deallocated)
1458         WebDataSource to be reattached and thus causing a crash.
1459         
1460         * loader/FrameLoader.cpp:
1461         (WebCore::FrameLoader::load):
1462         Remove extra call to setPolicyDocumentLoader.
1463
1464 2007-02-09  Beth Dakin  <bdakin@apple.com>
1465
1466         Reviewed by Darin.
1467
1468         Fix for <rdar://problem/4674537> REGRESSION: Adobe Acrobat 8 - Text 
1469         blinks when mouse is moved, and is invisible otherwise
1470
1471         Acrobat 8 was relying on a WebKit bug that was fixed about a year 
1472         ago with r12753. The bug was that we would not reload a page if the 
1473         source of an iframe was set to the same value it already was. Now 
1474         that we have fixed the bug, Acrobat constantly reloads their EULA, 
1475         making it blinky and impossible to read. 
1476
1477         No layout test since the fix is to add an Acrobat-specific quirk.
1478
1479         * WebCore.exp:
1480         * html/HTMLFrameElementBase.cpp:
1481         (WebCore::HTMLFrameElementBase::setLocation): If the new url is the 
1482         same as the old one and we are honoring the Acrobat quirk, don't do 
1483         anything.
1484         * page/Settings.cpp:
1485         (WebCore::Settings::Settings):
1486         (WebCore::Settings::setNeedsAcrobatFrameReloadingQuirk):
1487         * page/Settings.h:
1488         (WebCore::Settings::needsAcrobatFrameReloadingQuirk):
1489
1490 2007-02-09  Brady Eidson  <beidson@apple.com>
1491
1492         Rubberstamped by Dave Harrison
1493
1494         Disable the thread-check assertion in WebCore, as well as Webkit
1495
1496         * WebCore.xcodeproj/project.pbxproj:
1497
1498 2007-02-08  Anders Carlsson  <acarlsson@apple.com>
1499
1500         Reviewed by Geoff.
1501
1502         No need to pause timeout checks anymore.
1503         
1504         * bindings/js/kjs_window.cpp:
1505         (KJS::WindowFunc::callAsFunction):
1506
1507 2007-02-09  John Sullivan  <sullivan@apple.com>
1508
1509         Reviewed by Beth
1510         
1511         - WebCore part of fix for radar 4939636, problems with context menu items and binaries linked
1512           against WebKit 2.0.
1513
1514         * platform/ContextMenuItem.h:
1515         (WebCore::):
1516         Tweaked comment; bumped enum value for new SPI tags to avoid conflict with pre-3.0 SPI tag values.
1517
1518 2007-02-09  Nicholas Shanks  <webkit@nickshanks.com>
1519
1520         Reviewed by Dave Hyatt.
1521
1522         Removed broken recognition of :last-* and :only-* selectors
1523
1524         * css/CSSGrammar.y:
1525         * css/CSSSelector.cpp:
1526         (WebCore::CSSSelector::extractPseudoType):
1527         * css/CSSSelector.h:
1528         (WebCore::CSSSelector::):
1529         * css/cssstyleselector.cpp:
1530         (WebCore::CSSStyleSelector::checkOneSelector):
1531
1532 2007-02-09  Maciej Stachowiak  <mjs@apple.com>
1533
1534         Reviewed by Mark.
1535
1536         <rdar://problem/4980176>
1537
1538         * page/Frame.cpp:
1539         (WebCore::Frame::pageDestroyed): Since this frame is getting
1540         disconnected from its page, ensure it is not the focus node.
1541
1542 2007-02-09  Krzysztof  <kkowalczyk@gmail.com>
1543
1544         Reviewed by Maciej.
1545
1546         gdklauncher crashes when compiled with NDEBUG defined.
1547
1548         * Projects/gdk/webcore-gdk.bkl:
1549
1550 2007-02-09  Maciej Stachowiak  <mjs@apple.com>
1551
1552         Reviewed by Mitz.
1553
1554         <rdar://problem/4971224> REGRESSION: ASSERT in WebCore with Mail (12491)
1555         http://bugs.webkit.org/show_bug.cgi?id=12491
1556
1557         No test case. Not testable since there is no way to do substitute
1558         data loads from layout tests.
1559         
1560         * loader/MainResourceLoader.cpp:
1561         (WebCore::MainResourceLoader::continueAfterContentPolicy): Don't dispatch data load
1562         callback when loading empty data.
1563
1564 2007-02-09  Mark Rowe  <mrowe@apple.com>
1565
1566         Reviewed by Maciej.
1567
1568         http://bugs.webkit.org/show_bug.cgi?id=12705
1569         REGRESSION: Crash with user stylesheet set
1570
1571         Allow the Frame::canLoad check to skipped so that user stylesheets can be loaded in remote documents.
1572
1573         * ChangeLog:
1574         * loader/DocLoader.cpp:
1575         (WebCore::DocLoader::requestCSSStyleSheet): Skip canLoad check if this is a user stylesheet.
1576         (WebCore::DocLoader::requestUserCSSStyleSheet):
1577         (WebCore::DocLoader::requestResource): Allow canLoad check to be skipped.
1578         * loader/DocLoader.h:
1579         * page/Frame.cpp:
1580         (WebCore::UserStyleSheetLoader::UserStyleSheetLoader):
1581
1582 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1583
1584         Reviewed by Darin.
1585
1586         Linux/gdk build fixes.
1587
1588         * Projects/gdk/webcore-gdk.bkl: Account for file renaming.
1589         * platform/gdk/KeyEventGdk.cpp: Make gdk's tab key recognized as tab so that
1590         keyboard link walking works on gdk.
1591         (WebCore::keyIdentifierForGdkKeyCode):
1592
1593 2007-02-08  Adele Peterson  <adele@apple.com>
1594
1595         Reviewed by Brady.
1596
1597         Fix for http://bugs.webkit.org/show_bug.cgi?id=12599
1598         <rdar://problem/4973507> REGRESSION: When replying in Gmail, the caret disappears when you start to type (12599)
1599
1600         When a frame's window was focused, the page didn't get updated about the new frame getting focus.
1601         This was causing handleKeyPress to fail because it kept getting a selection for the wrong frame (which wasn't editable).
1602
1603         Test: fast/frames/iframe-window-focus.html
1604
1605         * page/Frame.cpp:
1606         (WebCore::Frame::focusWindow):
1607         (WebCore::Frame::unfocusWindow):
1608         * page/Frame.h:
1609         * page/mac/FrameMac.mm:
1610         (WebCore::FrameMac::focusWindow):
1611         (WebCore::FrameMac::unfocusWindow):
1612
1613 2007-02-08  Adele Peterson  <adele@apple.com>
1614
1615         Reviewed by Brady.
1616
1617         Fix for http://bugs.webkit.org/show_bug.cgi?id=12480
1618         <rdar://problem/4971222> REGRESSION (NativeListBox): Deselecting option causes list to jump to top
1619
1620         Test: fast/forms/listbox-deselect-scroll.html
1621
1622         * html/HTMLSelectElement.cpp:
1623         (WebCore::HTMLSelectElement::activeSelectionStartListIndex): Added.  Returns the index for the active selection.  If there is no active selection,
1624          it returns the first selected index.
1625         (WebCore::HTMLSelectElement::activeSelectionEndListIndex): Added.  If there is no active selection, it returns the last selected index.
1626         * html/HTMLSelectElement.h:
1627         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::scrollToRevealSelection): Instead of using the first and last selected indices,
1628           use the active selection indices to determine which item to reveal.  This way, when you're selecting with the keyboard, or the mouse,
1629           no unnecessary scrolling will occur if the end of your active selection is already visible.
1630
1631 2007-02-08  Adele Peterson  <adele@apple.com>
1632
1633         Reviewed by Hyatt.
1634
1635         Fix for <rdar://problem/4963411> Items of SELECT element are incorrectly highlighted when display:block is set
1636
1637         Test: fast/forms/select-block-background.html
1638
1639         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintObject):
1640           Paint the item backgrounds during the PaintPhaseChildBlockBackground or PaintPhaseChildBlockBackgrounds phase.
1641
1642 2007-02-08  Mitz Pettel  <mitz@webkit.org>
1643
1644         Reviewed by Adele.
1645
1646         - fix http://bugs.webkit.org/show_bug.cgi?id=11047
1647           REGRESSION: Empty options cause the entire select to collapse
1648         
1649         Test: fast/forms/select-empty-option-height.html
1650
1651         - fix http://bugs.webkit.org/show_bug.cgi?id=10783
1652           REGRESSION (r16044): Clicking a popup changes layout around it
1653
1654         * rendering/RenderMenuList.cpp:
1655         (WebCore::RenderMenuList::setText): If the option text is empty, use a RenderBR
1656         as inner text, to ensure that the inner div has line height.
1657
1658 2007-02-08  Geoffrey Garen  <ggaren@apple.com>
1659
1660         Reviewed by Beth Dakin.
1661
1662         Added a hard counter for SubresourceLoaders because the leaks tool now
1663         ignores them.
1664         
1665         * loader/SubresourceLoader.cpp:
1666         (WebCore::):
1667         (WebCore::SubresourceLoaderCounter::~SubresourceLoaderCounter):
1668         (WebCore::SubresourceLoader::SubresourceLoader):
1669         (WebCore::SubresourceLoader::~SubresourceLoader):
1670         * page/Frame.cpp: Removed unnecessary #define
1671
1672 2007-02-08  Geoffrey Garen  <ggaren@apple.com>
1673
1674         Reviewed by Beth Dakin.
1675
1676         Fixed <rdar://problem/4982374> CSSComputedStyleDeclaration::getPropertyCSSValue 
1677         leak reported by buildbot
1678         
1679         The leak was a typo: "new" instead of "return new". I also generously
1680         deployed RefPtr in places that were holding ref-counted objects in
1681         bare pointers.
1682
1683         * css/CSSComputedStyleDeclaration.cpp:
1684         (WebCore::valueForShadow):
1685         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1686
1687 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1688
1689         Reviewed by Adam Roben.
1690
1691         Linux/gdk build fixes.
1692
1693         * platform/gdk/EditorClientGdk.cpp: Added. Based on qt version.
1694         (WebCore::EditorClientGdk::shouldDeleteRange):
1695         (WebCore::EditorClientGdk::shouldShowDeleteInterface):
1696         (WebCore::EditorClientGdk::isContinuousSpellCheckingEnabled):
1697         (WebCore::EditorClientGdk::isGrammarCheckingEnabled):
1698         (WebCore::EditorClientGdk::spellCheckerDocumentTag):
1699         (WebCore::EditorClientGdk::shouldBeginEditing):
1700         (WebCore::EditorClientGdk::shouldEndEditing):
1701         (WebCore::EditorClientGdk::shouldInsertText):
1702         (WebCore::EditorClientGdk::shouldApplyStyle):
1703         (WebCore::EditorClientGdk::didBeginEditing):
1704         (WebCore::EditorClientGdk::respondToChangedContents):
1705         (WebCore::EditorClientGdk::didEndEditing):
1706         (WebCore::EditorClientGdk::didWriteSelectionToPasteboard):
1707         (WebCore::EditorClientGdk::didSetSelectionTypesForPasteboard):
1708         (WebCore::EditorClientGdk::selectWordBeforeMenuEvent):
1709         (WebCore::EditorClientGdk::isEditable):
1710         (WebCore::EditorClientGdk::registerCommandForUndo):
1711         (WebCore::EditorClientGdk::registerCommandForRedo):
1712         (WebCore::EditorClientGdk::clearUndoRedoOperations):
1713         (WebCore::EditorClientGdk::canUndo):
1714         (WebCore::EditorClientGdk::canRedo):
1715         (WebCore::EditorClientGdk::undo):
1716         (WebCore::EditorClientGdk::redo):
1717         (WebCore::EditorClientGdk::shouldInsertNode):
1718         (WebCore::EditorClientGdk::pageDestroyed):
1719         (WebCore::EditorClientGdk::smartInsertDeleteEnabled):
1720         (WebCore::EditorClientGdk::toggleContinuousSpellChecking):
1721         (WebCore::EditorClientGdk::toggleGrammarChecking):
1722         (WebCore::EditorClientGdk::handleKeyPress):
1723         (WebCore::EditorClientGdk::EditorClientGdk):
1724         (WebCore::EditorClientGdk::setPage):
1725         * platform/gdk/EditorClientGdk.h: Added. Ditto.
1726         * platform/gdk/FrameGdk.cpp: Add exitAfterLoading and dumpRenderTreeAfterLoading
1727         as small debugging features. Remove FrameGdkClient as no other platform has Frame*Client
1728         anymore. Adjust for new APIs.
1729         (WebCore::FrameGdk::FrameGdk):
1730         (WebCore::FrameGdk::onDidFinishLoad):
1731         (WebCore::FrameGdk::dumpRenderTree):
1732         (WebCore::FrameGdk::keyPress):
1733         (WebCore::FrameGdk::handleGdkEvent):
1734         (WebCore::FrameGdk::focusWindow):
1735         (WebCore::FrameGdk::unfocusWindow):
1736         (WebCore::FrameGdk::getObjectInstanceForWidget):
1737         (WebCore::FrameGdk::getEmbedInstanceForWidget):
1738         (WebCore::FrameGdk::bindingRootObject):
1739         (WebCore::FrameGdk::print):
1740         (WebCore::FrameGdk::getAppletInstanceForWidget):
1741         (WebCore::FrameGdk::issueCutCommand):
1742         (WebCore::FrameGdk::issueCopyCommand):
1743         (WebCore::FrameGdk::issuePasteCommand):
1744         (WebCore::FrameGdk::issueTransposeCommand):
1745         (WebCore::FrameGdk::issuePasteAndMatchStyleCommand):
1746         (WebCore::FrameGdk::markedTextRange):
1747         (WebCore::FrameGdk::shouldChangeSelection):
1748         (WebCore::FrameGdk::respondToChangedSelection):
1749         (WebCore::FrameGdk::mimeTypeForFileName):
1750         * platform/gdk/FrameGdk.h: Ditto.
1751         (WebCore::FrameGdk::setExitAfterLoading):
1752         (WebCore::FrameGdk::exitAfterLoading):
1753         (WebCore::FrameGdk::setDumpRenderTreeAfterLoading):
1754         (WebCore::FrameGdk::dumpRenderTreeAfterLoading):
1755         (WebCore::GdkFrame):
1756         * platform/gdk/TemporaryLinkStubs.cpp: Adjust to new APIs. Small cleanups.
1757         (FrameView::updateBorder):
1758         (Widget::setEnabled):
1759         (Widget::isEnabled):
1760         (Widget::enableFlushDrawing):
1761         (Widget::removeFromParent):
1762         (Widget::paint):
1763         (Widget::setIsSelected):
1764         (Widget::invalidate):
1765         (Widget::invalidateRect):
1766         (PlatformMouseEvent::PlatformMouseEvent):
1767         (WebCore::findWordBoundary):
1768         (ChromeClientGdk::chromeDestroyed):
1769         (ChromeClientGdk::closeWindowSoon):
1770         (ChromeClientGdk::canTakeFocus):
1771         (ChromeClientGdk::takeFocus):
1772         (ChromeClientGdk::canRunBeforeUnloadConfirmPanel):
1773         (ChromeClientGdk::addMessageToConsole):
1774         (ChromeClientGdk::runBeforeUnloadConfirmPanel):
1775         (ChromeClientGdk::runJavaScriptAlert):
1776         (ChromeClientGdk::runJavaScriptConfirm):
1777         (ChromeClientGdk::runJavaScriptPrompt):
1778         (ChromeClientGdk::setStatusbarText):
1779         (ChromeClientGdk::shouldInterruptJavaScript):
1780         (WebCore::inputElementAltText):
1781         (WebCore::resetButtonDefaultLabel):
1782         (WebCore::searchableIndexIntroduction):
1783         (WebCore::fileButtonChooseFileLabel):
1784         (WebCore::fileButtonNoFileSelectedLabel):
1785         (WebCore::contextMenuItemTagOpenLinkInNewWindow):
1786         (WebCore::contextMenuItemTagDownloadLinkToDisk):
1787         (WebCore::contextMenuItemTagCopyLinkToClipboard):
1788         (WebCore::contextMenuItemTagOpenImageInNewWindow):
1789         (WebCore::contextMenuItemTagDownloadImageToDisk):
1790         (WebCore::contextMenuItemTagCopyImageToClipboard):
1791         (WebCore::contextMenuItemTagOpenFrameInNewWindow):
1792         (WebCore::contextMenuItemTagCopy):
1793         (WebCore::contextMenuItemTagGoBack):
1794         (WebCore::contextMenuItemTagGoForward):
1795         (WebCore::contextMenuItemTagStop):
1796         (WebCore::contextMenuItemTagReload):
1797         (WebCore::contextMenuItemTagCut):
1798         (WebCore::contextMenuItemTagPaste):
1799         (WebCore::contextMenuItemTagNoGuessesFound):
1800         (WebCore::contextMenuItemTagIgnoreSpelling):
1801         (WebCore::contextMenuItemTagLearnSpelling):
1802         (WebCore::contextMenuItemTagSearchWeb):
1803         (WebCore::contextMenuItemTagLookUpInDictionary):
1804         (WebCore::contextMenuItemTagOpenLink):
1805         (WebCore::contextMenuItemTagIgnoreGrammar):
1806         (WebCore::contextMenuItemTagSpellingMenu):
1807         (WebCore::contextMenuItemTagShowSpellingPanel):
1808         (WebCore::contextMenuItemTagCheckSpelling):
1809         (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
1810         (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
1811         (WebCore::contextMenuItemTagFontMenu):
1812         (WebCore::contextMenuItemTagBold):
1813         (WebCore::contextMenuItemTagItalic):
1814         (WebCore::contextMenuItemTagUnderline):
1815         (WebCore::contextMenuItemTagOutline):
1816         (WebCore::contextMenuItemTagWritingDirectionMenu):
1817         (WebCore::contextMenuItemTagDefaultDirection):
1818         (WebCore::contextMenuItemTagLeftToRight):
1819         (WebCore::contextMenuItemTagRightToLeft):
1820         (PlugInInfoStore::createPluginInfoForPluginAtIndex):
1821         (PlugInInfoStore::pluginCount):
1822         (WebCore::PlugInInfoStore::supportsMIMEType):
1823         (WebCore::refreshPlugins):
1824         (SearchPopupMenu::saveRecentSearches):
1825         (SearchPopupMenu::loadRecentSearches):
1826         (SearchPopupMenu::SearchPopupMenu):
1827         (Path::apply):
1828         (PlatformScrollbar::PlatformScrollbar):
1829         (PlatformScrollbar::~PlatformScrollbar):
1830         (PlatformScrollbar::width):
1831         (PlatformScrollbar::height):
1832         (PlatformScrollbar::setEnabled):
1833         (PlatformScrollbar::paint):
1834         (PlatformScrollbar::updateThumbPosition):
1835         (PlatformScrollbar::updateThumbProportion):
1836         (PlatformScrollbar::setRect):
1837         (ResourceHandle::willLoadFromCache):
1838         (ResourceHandle::loadsBlocked):
1839         (ResourceHandle::loadResourceSynchronously):
1840         (PageCache::close):
1841         (Editor::ignoreSpelling):
1842         (Editor::learnSpelling):
1843         (Editor::isSelectionUngrammatical):
1844         (Editor::isSelectionMisspelled):
1845         (Editor::guessesForMisspelledSelection):
1846         (Editor::guessesForUngrammaticalSelection):
1847         (Editor::markMisspellingsAfterTypingToPosition):
1848         (Editor::newGeneralClipboard):
1849         (Pasteboard::generalPasteboard):
1850         (Pasteboard::writeSelection):
1851         (Pasteboard::writeURL):
1852         (Pasteboard::clear):
1853         (Pasteboard::canSmartReplace):
1854         (Pasteboard::documentFragment):
1855         (Pasteboard::plainText):
1856         (Pasteboard::Pasteboard):
1857         (Pasteboard::~Pasteboard):
1858         (ContextMenu::ContextMenu):
1859         (ContextMenu::~ContextMenu):
1860         (ContextMenu::appendItem):
1861         (ContextMenu::setPlatformDescription):
1862         (ContextMenu::platformDescription):
1863         (ContextMenuItem::ContextMenuItem):
1864         (ContextMenuItem::~ContextMenuItem):
1865         (ContextMenuItem::releasePlatformDescription):
1866         (ContextMenuItem::type):
1867         (ContextMenuItem::setType):
1868         (ContextMenuItem::action):
1869         (ContextMenuItem::setAction):
1870         (ContextMenuItem::title):
1871         (ContextMenuItem::setTitle):
1872         (ContextMenuItem::platformSubMenu):
1873         (ContextMenuItem::setSubMenu):
1874         (ContextMenuItem::setChecked):
1875         (ContextMenuItem::setEnabled):
1876         (WebCore::systemBeep):
1877         (WebCore::userIdleTime):
1878
1879 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1880
1881         Reviewed by Adam Roben.
1882
1883         Linux/gdk build fixes.
1884
1885         * platform/GlyphPageTreeNode.h: Fix header guard name.
1886         * platform/gdk/ChromeClientGdk.h:
1887         * platform/gdk/CursorGdk.cpp:
1888         (WebCore::verticalTextCursor):
1889         (WebCore::cellCursor):
1890         (WebCore::contextMenuCursor):
1891         (WebCore::noDropCursor):
1892         (WebCore::copyCursor):
1893         (WebCore::progressCursor):
1894         (WebCore::aliasCursor):
1895         * platform/gdk/MouseEventGdk.cpp:
1896         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1897         * platform/gdk/PageGdk.cpp: Removed. No longer used.
1898         * platform/gdk/RenderThemeGdk.cpp:
1899         (WebCore::RenderThemeGdk::getThemeData):
1900         (WebCore::RenderThemeGdk::setCheckboxSize):
1901         (WebCore::RenderThemeGdk::paintCheckbox):
1902         (WebCore::RenderThemeGdk::setRadioSize):
1903         (WebCore::RenderThemeGdk::paintRadio):
1904         (WebCore::RenderThemeGdk::paintButton):
1905         (WebCore::RenderThemeGdk::adjustTextFieldStyle):
1906         (WebCore::RenderThemeGdk::paintTextField):
1907         (WebCore::RenderThemeGdk::paintTextArea):
1908         (WebCore::RenderThemeGdk::systemFont):
1909         * platform/gdk/RenderThemeGdk.h:
1910         * platform/gdk/ScreenGdk.cpp:
1911         (WebCore::screenDepth):
1912         (WebCore::screenDepthPerComponent):
1913         (WebCore::screenIsMonochrome):
1914         (WebCore::screenRect):
1915         (WebCore::screenAvailableRect):
1916
1917 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1918
1919         Reviewed by Adam Roben.
1920
1921         Linux/gdk build fixes for cairo.
1922
1923         * platform/graphics/GraphicsContext.cpp:
1924         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1925         (WebCore::GraphicsContext::GraphicsContext):
1926         (WebCore::GraphicsContext::strokeArc):
1927         (WebCore::GraphicsContext::drawFocusRing):
1928         (WebCore::GraphicsContext::setFocusRingClip):
1929         (WebCore::GraphicsContext::clearFocusRingClip):
1930         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
1931         (WebCore::GraphicsContext::origin):
1932         (WebCore::GraphicsContext::setPlatformFillColor):
1933         (WebCore::GraphicsContext::setPlatformStrokeColor):
1934         (WebCore::GraphicsContext::setPlatformStrokeThickness):
1935         (WebCore::GraphicsContext::setPlatformStrokeStyle):
1936         (WebCore::GraphicsContext::setPlatformFont):
1937         (WebCore::GraphicsContext::setURLForRect):
1938         (WebCore::GraphicsContext::addRoundedRectClip):
1939         (WebCore::GraphicsContext::addInnerRoundedRectClip):
1940         (WebCore::GraphicsContext::setShadow):
1941         (WebCore::GraphicsContext::clearShadow):
1942         (WebCore::GraphicsContext::beginTransparencyLayer):
1943         (WebCore::GraphicsContext::endTransparencyLayer):
1944         (WebCore::GraphicsContext::clearRect):
1945         (WebCore::GraphicsContext::strokeRect):
1946         (WebCore::GraphicsContext::setLineCap):
1947         (WebCore::GraphicsContext::setLineJoin):
1948         (WebCore::GraphicsContext::setMiterLimit):
1949         (WebCore::GraphicsContext::setAlpha):
1950         (WebCore::toCairoOperator):
1951         (WebCore::GraphicsContext::setCompositeOperation):
1952         (WebCore::GraphicsContext::clip):
1953         (WebCore::GraphicsContext::rotate):
1954         (WebCore::GraphicsContext::scale):
1955         (WebCore::GraphicsContext::clipOut):
1956         (WebCore::GraphicsContext::clipOutEllipseInRect):
1957         (WebCore::GraphicsContext::fillRoundedRect):
1958
1959 2007-02-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1960
1961         Reviewed by Adam Roben.
1962
1963         Linux/gdk build fixes.
1964
1965         * Projects/gdk/webcore-gdk.bkl:
1966         * WebCoreSources.bkl:
1967         * webcore-base.bkl:
1968
1969 2007-02-08  Brady Eidson  <beidson@apple.com>
1970
1971         Reviewed by Tim Hatcher
1972
1973         Tweaked the thread violation behavior to be disabled by default, and to provide
1974         an easy breakpoint to set.  
1975         The possibilities for the "WebCoreThreadCheck" user defaults key are -
1976           - The value "None" disables thread checking
1977           - The value "Log" causes an NSLog on a violation
1978           - The value "Exception" causes exceptions to be raised on a violation
1979
1980         * platform/Logging.h:
1981         * platform/mac/LoggingMac.mm:
1982         (WebCore::_WebCoreThreadViolationCheck):
1983         (WebCoreReportThreadViolation):  In the global namespace, making breakpoints cake!
1984
1985 2007-02-08  Brady Eidson  <beidson@apple.com>
1986
1987         Reviewed by Tim Hatcher
1988
1989         <rdar://problem/4983515> Need mechanism to protect against WebKit calls from secondary threads
1990         This initial landing is a conservative move until we can be certain of performance impact.
1991         By writing to the user defaults key @"WebCoreThreadCheck" for the WebKit app you're running -
1992           - The value "None" disables thread checking
1993           - The value "Exception" causes exceptions to be raised on a violation
1994           - The default is to do the check, and NSLog each violation
1995
1996         * bindings/objc/ExceptionHandlers.h:  Add a "Is Main Thread" assert macro
1997         * bindings/scripts/CodeGeneratorObjC.pm: Use new mechanism in allocs and deallocs for now
1998
1999         * platform/Logging.h: Added WebCoreThreadViolationCheck macro
2000         * platform/mac/LoggingMac.mm:
2001         (WebCore::_WebCoreThreadViolationCheck): Check for main-threadedness, and do some stuff
2002
2003 2007-02-08  Kevin McCullough  <KMcCullough@apple.com>
2004
2005         Reviewed by Maciej, Darin, and Mark.
2006
2007         rdar://problem/4922454
2008         - Prevents remote sites from executing local scripts.
2009
2010         * bindings/objc/DOM.mm: - renamed a function that is now in the base class
2011         (-[DOMElement image]):
2012         (-[DOMElement _imageTIFFRepresentation]):
2013         * dom/XMLTokenizer.cpp: - removed needless asserts
2014         (WebCore::XMLTokenizer::notifyFinished):
2015         * html/HTMLImageLoader.cpp: - renamed a function that is now in the base class
2016         (WebCore::HTMLImageLoader::dispatchLoadEvent):
2017         * html/HTMLTokenizer.cpp: - removed needless asserts
2018         (WebCore::HTMLTokenizer::reset):
2019         (WebCore::HTMLTokenizer::notifyFinished):
2020         * ksvg2/misc/SVGImageLoader.cpp: - renamed a function that is now in the base class
2021         (WebCore::SVGImageLoader::dispatchLoadEvent):
2022         * loader/Cache.cpp: - return early if an error occured
2023         (WebCore::Cache::requestResource):
2024         (WebCore::Cache::remove):
2025         * loader/CachedImage.h: - renamed a function that is now in the base class
2026         (WebCore::CachedImage::canRender):
2027         * loader/CachedResource.h: - renamed a function that is now in the base class
2028         (WebCore::CachedResource::errorOccurred):
2029         * loader/CachedScript.h: - renamed a function that is now in the base class 
2030         (WebCore::CachedScript::schedule):
2031         * loader/DocLoader.cpp: - The heart of the fix, prevents resources from being created or retrieved from the cache if a remote site is requesting the local resource.
2032         (WebCore::DocLoader::requestResource):
2033         (WebCore::DocLoader::setLoadInProgress):
2034         * page/EventHandler.cpp: - renamed a function that is now in the base class
2035         (WebCore::selectCursor):
2036         * rendering/HitTestResult.cpp: - renamed a function that is now in the base class
2037         (WebCore::HitTestResult::image):
2038         * rendering/RenderImage.cpp: - renamed a function that is now in the base class
2039         (WebCore::RenderImage::setCachedImage):
2040         (WebCore::RenderImage::imageChanged):
2041         (WebCore::RenderImage::paint):
2042         (WebCore::RenderImage::layout):
2043         (WebCore::RenderImage::calcAspectRatioWidth):
2044         (WebCore::RenderImage::calcAspectRatioHeight):
2045         * rendering/RenderImage.h: - renamed a function that is now in the base class
2046         (WebCore::RenderImage::errorOccurred):
2047         * rendering/RenderListItem.cpp: - renamed a function that is now in the base class
2048         (WebCore::RenderListItem::setStyle):
2049         * rendering/RenderListMarker.cpp: - renamed a function that is now in the base class
2050         (WebCore::RenderListMarker::isImage):
2051
2052 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2053
2054         Reviewed by Maciej.
2055
2056         Add updateGeometry() to gdk's ScrollView. Needed to fix resizing of the window
2057         in gdk.
2058
2059         * platform/ScrollView.h:
2060         * platform/gdk/ScrollViewGdk.cpp:
2061         (WebCore::ScrollView::updateGeometry):
2062         (WebCore::ScrollView::setDrawable):
2063
2064 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2065
2066         Reviewed by Maciej.
2067
2068         Linux/gdk build fixes.
2069
2070         * platform/ContextMenuItem.h:
2071         * platform/PlatformMenuDescription.h:
2072         * platform/gdk/PopupMenuGdk.cpp: Added. Renamed from RenderPopupMenuGdk.cpp for
2073         consistency with other platforms.
2074         (WebCore::PopupMenu::PopupMenu):
2075         (WebCore::PopupMenu::~PopupMenu):
2076         * platform/gdk/RenderPopupMenuGdk.cpp: Removed.
2077         * platform/gdk/RenderPopupMenuGdk.h: Removed.
2078
2079 2007-02-07  Mitz Pettel  <mitz@webkit.org>
2080
2081         Reviewed by Maciej.
2082
2083         - fix http://bugs.webkit.org/show_bug.cgi?id=12608
2084           Incorrect min. width calculation of a series of floats with clear:both and white-space:nowrap
2085
2086         Test: fast/block/float/nowrap-clear-min-width.html
2087
2088         * rendering/RenderBlock.cpp:
2089         (WebCore::RenderBlock::calcInlineMinMaxWidth):
2090
2091 2007-02-07  Mitz Pettel  <mitz@webkit.org>
2092
2093         Reviewed by Dave Hyatt.
2094
2095         - fix http://bugs.webkit.org/show_bug.cgi?id=10522
2096           REGRESSION: Incomplete repaint after table relayout that decreases height
2097
2098         Test: fast/repaint/intermediate-layout-position.html
2099
2100         * rendering/RenderBlock.cpp:
2101         (WebCore::RenderBlock::layoutBlock): Adjust the old bounds by the layout delta,
2102         to get the block's absolute bounds as they were before its ancestors moved it
2103         during layout.
2104         (WebCore::RenderBlock::collapseMargins): Update the layout delta for the child
2105         when moving it.
2106         (WebCore::RenderBlock::clearFloatsIfNeeded): Ditto.
2107         (WebCore::RenderBlock::determineHorizontalPosition): Ditto.
2108         (WebCore::RenderBlock::layoutBlockChildren): Ditto.
2109         * rendering/RenderFlexibleBox.cpp:
2110         (WebCore::RenderFlexibleBox::layoutBlock): Adjust the old bounds by the current
2111         layout delta.
2112         * rendering/RenderHTMLCanvas.cpp:
2113         (WebCore::RenderHTMLCanvas::layout): Ditto.
2114         * rendering/RenderImage.cpp:
2115         (WebCore::RenderImage::layout): Ditto.
2116         * rendering/RenderTable.cpp:
2117         (WebCore::RenderTable::layout): Ditto.
2118         * rendering/RenderView.h:
2119         (WebCore::RenderView::layoutDelta): Added. Keeps track of the offset between
2120         the position of the object currently being laid out and its position at the
2121         end of the last layout.
2122         (WebCore::RenderView::addLayoutDelta): Added.
2123
2124 2007-02-07  Christopher Brichford  <chrisb@adobe.com>
2125
2126         Reviewed by Brady.
2127
2128         http://bugs.webkit.org/show_bug.cgi?id=6286
2129         Very large (~500MB) images cause reproducible Safari crash
2130
2131         * loader/CachedImage.cpp: 
2132         (WebCore::CachedImage::bufferData): Detect failure to create a
2133         large Vector<> and call error() when that happens.
2134
2135 2007-02-07  Mitz Pettel  <mitz@webkit.org>
2136
2137         Reviewed by Dave Hyatt.
2138
2139         - fix http://bugs.webkit.org/show_bug.cgi?id=5399
2140           no-repeat on negatively positioned background images are ignored
2141
2142         Test: fast/backgrounds/repeat/negative-offset-repeat.html
2143
2144         - fix http://bugs.webkit.org/show_bug.cgi?id=5821
2145           Changing background of <col> doesn't repaint the column
2146
2147         Test: fast/repaint/table-col-background.html
2148
2149         - fix http://bugs.webkit.org/show_bug.cgi?id=11720
2150           REGRESSION: large amounts of CPU consumed viewing this site
2151
2152         * rendering/RenderBox.cpp:
2153         (WebCore::RenderBox::imageChanged): Added. Finds the border and/or background
2154         layer(s) that use the image and invalidates only the rect in which the image
2155         actually paints. There are two special cases in this function: 1) for the body
2156         element, the background is propagated to the root; 2) inline flows do a full
2157         repaint.
2158         (WebCore::RenderBox::calculateBackgroundImageGeometry): Added. Factored out,
2159         simplified and corrected the calculation of the rectangle into which the background
2160         image paints, the tile size and the pattern phase.
2161         (WebCore::RenderBox::paintBackgroundExtended):
2162         * rendering/RenderBox.h:
2163         * rendering/RenderObject.cpp:
2164         * rendering/RenderObject.h:
2165         (WebCore::RenderObject::imageChanged): Moved the implementation to RenderBox.
2166         * rendering/RenderTableCol.cpp:
2167         (WebCore::RenderTableCol::getAbsoluteRepaintRect): Overridden to return the
2168         table's repaint rect.
2169         (WebCore::RenderTableCol::imageChanged): Overridden to do a full repaint, which
2170         currently repaints the entire table.
2171         * rendering/RenderTableCol.h:
2172         * rendering/RenderTableRow.cpp:
2173         (WebCore::RenderTableRow::imageChanged): Overridden to do a full repaint
2174         of the row, since the backgrounds are painted by the cells.
2175         * rendering/RenderTableRow.h:
2176         * rendering/RenderTableSection.cpp:
2177         (WebCore::RenderTableSection::imageChanged): Overridden to do a full
2178         repaint of the section, since the backgrounds are painted by the cells.
2179         * rendering/RenderTableSection.h:
2180
2181 2007-02-07  Anders Carlsson  <acarlsson@apple.com>
2182
2183         Reviewed by Maciej.
2184
2185         Move shouldInterruptJavaScript to the Chrome.
2186
2187         * bindings/js/kjs_binding.cpp:
2188         (KJS::ScriptInterpreter::shouldInterruptScript):
2189         * page/Chrome.cpp:
2190         (WebCore::Chrome::shouldInterruptJavaScript):
2191         * page/Chrome.h:
2192         * page/ChromeClient.h:
2193         * page/Frame.h:
2194         * page/mac/FrameMac.h:
2195         * page/mac/FrameMac.mm:
2196         * page/mac/WebCoreFrameBridge.h:
2197         * platform/graphics/svg/SVGImageEmptyClients.h:
2198         (WebCore::SVGEmptyChromeClient::shouldInterruptJavaScript):
2199
2200 2007-02-07  Darin Adler  <darin@apple.com>
2201
2202         Reviewed by Maciej.
2203
2204         - <rdar://problem/4826861> WebKit tests show memory leaks in NSHTMLReader, caused by method named "hash"
2205
2206         * bindings/scripts/CodeGeneratorObjC.pm: Added a list of method names we should never use, since they
2207         are in base classes WebScriptObject and NSObject. Luckily, only "hash" is causing trouble. Added
2208         "hash" to the existing special case for "id". Now "hash" is "hashName" just as "id" is "idName".
2209
2210 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2211
2212         Reviewed by Adam Roben.
2213
2214         Linux/gdk build fixes for graphics-related stuff.
2215
2216         * platform/graphics/cairo/ImageCairo.cpp:
2217         (WebCore::BitmapImage::checkForSolidColor):
2218         * platform/graphics/cairo/ImageSourceCairo.cpp:
2219         (WebCore::ImageSource::setData):
2220         * platform/graphics/gdk/ImageGdk.cpp:
2221         (WebCore::BitmapImage::initPlatformData):
2222         (WebCore::BitmapImage::invalidatePlatformData):
2223         (WebCore::Image::loadPlatformResource):
2224         (WebCore::Image::drawPattern):
2225
2226 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2227
2228         Reviewed by Maciej.
2229
2230         Linux/gdk build fixes related to networking.
2231
2232         * platform/network/ResourceHandleInternal.h: Add accessor for m_client.
2233         (WebCore::ResourceHandleInternal::client):
2234         * platform/network/gdk/ResourceHandleCurl.cpp: Add missing functions and
2235         massage for changed APIs.
2236         (WebCore::ResourceHandle::start):
2237         (WebCore::ResourceHandle::cancel):
2238         (WebCore::ResourceHandle::bufferedData):
2239         (WebCore::ResourceHandle::supportsBufferedData):
2240         (WebCore::ResourceHandle::setDefersLoading):
2241         * platform/network/gdk/ResourceHandleManager.cpp: Rename get() to
2242         sharedInstance(). Massaged for changed APIs.
2243         (WebCore::ResourceHandleManager::sharedInstance):
2244         (WebCore::writeCallback):
2245         (WebCore::ResourceHandleManager::downloadTimerCallback):
2246         (WebCore::ResourceHandleManager::remove):
2247         * platform/network/gdk/ResourceHandleManager.h: Ditto.
2248
2249 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2250
2251         Reviewed by Maciej.
2252
2253         Mismatched type of alloc/free function crashes gdk build.
2254
2255         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2256         (WebCore::JPEGImageReader::close):
2257
2258 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2259
2260         Reviewed by Adam Roben.
2261
2262         Linux/gdk build fixes - add file based on qt implementation.
2263
2264         * platform/DragData.h:
2265         * platform/gdk/DragDataGdk.cpp: Added.
2266
2267 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2268
2269         Reviewed by Adam Roben.
2270
2271         Linux/gdk build fixes - add new files based on qt implementation.
2272
2273         * page/gdk/DragControllerGdk.cpp: Added.
2274         (WebCore::DragController::dragOperation):
2275         * page/gdk/EventHandlerGdk.cpp: Added.
2276         (WebCore::EventHandler::focusDocumentView):
2277         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2278         (WebCore::EventHandler::handleDrag):
2279         (WebCore::EventHandler::eventActivatedView):
2280
2281 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2282
2283         Reviewed by Adam Roben.
2284
2285         Linux/gdk build fixes - add new files based on Qt implementation.
2286
2287         * loader/gdk/DocumentLoaderGdk.cpp: Added.
2288         (WebCore::DocumentLoader::getResponseModifiedHeader):
2289         * loader/gdk/FrameLoaderClientGdk.cpp: Added.
2290         (WebCore::FrameLoaderClientGdk::FrameLoaderClientGdk):
2291         (WebCore::FrameLoaderClientGdk::frame):
2292         (WebCore::FrameLoaderClientGdk::userAgent):
2293         (WebCore::FrameLoaderClientGdk::createDocumentLoader):
2294         (WebCore::FrameLoaderClientGdk::dispatchWillSubmitForm):
2295         (WebCore::FrameLoaderClientGdk::committedLoad):
2296         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveAuthenticationChallenge):
2297         (WebCore::FrameLoaderClientGdk::dispatchDidCancelAuthenticationChallenge):
2298         (WebCore::FrameLoaderClientGdk::dispatchWillSendRequest):
2299         (WebCore::FrameLoaderClientGdk::assignIdentifierToInitialRequest):
2300         (WebCore::FrameLoaderClientGdk::postProgressStartedNotification):
2301         (WebCore::FrameLoaderClientGdk::postProgressEstimateChangedNotification):
2302         (WebCore::FrameLoaderClientGdk::postProgressFinishedNotification):
2303         (WebCore::FrameLoaderClientGdk::frameLoaderDestroyed):
2304         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveResponse):
2305         (WebCore::FrameLoaderClientGdk::dispatchDecidePolicyForMIMEType):
2306         (WebCore::FrameLoaderClientGdk::dispatchDecidePolicyForNewWindowAction):
2307         (WebCore::FrameLoaderClientGdk::dispatchDecidePolicyForNavigationAction):
2308         (WebCore::FrameLoaderClientGdk::createPlugin):
2309         (WebCore::FrameLoaderClientGdk::createFrame):
2310         (WebCore::FrameLoaderClientGdk::redirectDataToPlugin):
2311         (WebCore::FrameLoaderClientGdk::createJavaAppletWidget):
2312         (WebCore::FrameLoaderClientGdk::objectContentType):
2313         (WebCore::FrameLoaderClientGdk::overrideMediaType):
2314         (WebCore::FrameLoaderClientGdk::windowObjectCleared):
2315         (WebCore::FrameLoaderClientGdk::setMainFrameDocumentReady):
2316         (WebCore::FrameLoaderClientGdk::hasWebView):
2317         (WebCore::FrameLoaderClientGdk::hasFrameView):
2318         (WebCore::FrameLoaderClientGdk::dispatchDidFinishLoad):
2319         (WebCore::FrameLoaderClientGdk::frameLoadCompleted):
2320         (WebCore::FrameLoaderClientGdk::privateBrowsingEnabled):
2321         (WebCore::FrameLoaderClientGdk::makeDocumentView):
2322         (WebCore::FrameLoaderClientGdk::makeRepresentation):
2323         (WebCore::FrameLoaderClientGdk::forceLayout):
2324         (WebCore::FrameLoaderClientGdk::forceLayoutForNonHTML):
2325         (WebCore::FrameLoaderClientGdk::setCopiesOnScroll):
2326         (WebCore::FrameLoaderClientGdk::detachedFromParent1):
2327         (WebCore::FrameLoaderClientGdk::detachedFromParent2):
2328         (WebCore::FrameLoaderClientGdk::detachedFromParent3):
2329         (WebCore::FrameLoaderClientGdk::detachedFromParent4):
2330         (WebCore::FrameLoaderClientGdk::loadedFromPageCache):
2331         (WebCore::FrameLoaderClientGdk::dispatchDidHandleOnloadEvents):
2332         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveServerRedirectForProvisionalLoad):
2333         (WebCore::FrameLoaderClientGdk::dispatchDidCancelClientRedirect):
2334         (WebCore::FrameLoaderClientGdk::dispatchWillPerformClientRedirect):
2335         (WebCore::FrameLoaderClientGdk::dispatchDidChangeLocationWithinPage):
2336         (WebCore::FrameLoaderClientGdk::dispatchWillClose):
2337         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveIcon):
2338         (WebCore::FrameLoaderClientGdk::dispatchDidStartProvisionalLoad):
2339         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveTitle):
2340         (WebCore::FrameLoaderClientGdk::dispatchDidCommitLoad):
2341         (WebCore::FrameLoaderClientGdk::dispatchDidFinishDocumentLoad):
2342         (WebCore::FrameLoaderClientGdk::dispatchDidFirstLayout):
2343         (WebCore::FrameLoaderClientGdk::dispatchShow):
2344         (WebCore::FrameLoaderClientGdk::cancelPolicyCheck):
2345         (WebCore::FrameLoaderClientGdk::dispatchDidLoadMainResource):
2346         (WebCore::FrameLoaderClientGdk::revertToProvisionalState):
2347         (WebCore::FrameLoaderClientGdk::clearUnarchivingState):
2348         (WebCore::FrameLoaderClientGdk::willChangeTitle):
2349         (WebCore::FrameLoaderClientGdk::didChangeTitle):
2350         (WebCore::FrameLoaderClientGdk::finishedLoading):
2351         (WebCore::FrameLoaderClientGdk::finalSetupForReplace):
2352         (WebCore::FrameLoaderClientGdk::setDefersLoading):
2353         (WebCore::FrameLoaderClientGdk::isArchiveLoadPending):
2354         (WebCore::FrameLoaderClientGdk::cancelPendingArchiveLoad):
2355         (WebCore::FrameLoaderClientGdk::clearArchivedResources):
2356         (WebCore::FrameLoaderClientGdk::canHandleRequest):
2357         (WebCore::FrameLoaderClientGdk::canShowMIMEType):
2358         (WebCore::FrameLoaderClientGdk::representationExistsForURLScheme):
2359         (WebCore::FrameLoaderClientGdk::generatedMIMETypeForURLScheme):
2360         (WebCore::FrameLoaderClientGdk::restoreScrollPositionAndViewState):
2361         (WebCore::FrameLoaderClientGdk::provisionalLoadStarted):
2362         (WebCore::FrameLoaderClientGdk::didFinishLoad):
2363         (WebCore::FrameLoaderClientGdk::prepareForDataSourceReplacement):
2364         (WebCore::FrameLoaderClientGdk::setTitle):
2365         (WebCore::FrameLoaderClientGdk::setDocumentViewFromPageCache):
2366         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveContentLength):
2367         (WebCore::FrameLoaderClientGdk::dispatchDidFinishLoading):
2368         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoading):
2369         (WebCore::FrameLoaderClientGdk::dispatchDidLoadResourceFromMemoryCache):
2370         (WebCore::FrameLoaderClientGdk::dispatchDidFailProvisionalLoad):
2371         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoad):
2372         (WebCore::FrameLoaderClientGdk::download):
2373         (WebCore::FrameLoaderClientGdk::cancelledError):
2374         (WebCore::FrameLoaderClientGdk::cannotShowURLError):
2375         (WebCore::FrameLoaderClientGdk::interruptForPolicyChangeError):
2376         (WebCore::FrameLoaderClientGdk::cannotShowMIMETypeError):
2377         (WebCore::FrameLoaderClientGdk::fileDoesNotExistError):
2378         (WebCore::FrameLoaderClientGdk::shouldFallBack):
2379         (WebCore::FrameLoaderClientGdk::willUseArchive):
2380         (WebCore::FrameLoaderClientGdk::saveScrollPositionAndViewStateToItem):
2381         (WebCore::FrameLoaderClientGdk::saveDocumentViewToPageCache):
2382         (WebCore::FrameLoaderClientGdk::canCachePage):
2383         (WebCore::FrameLoaderClientGdk::dispatchCreatePage):
2384         (WebCore::FrameLoaderClientGdk::dispatchUnableToImplementPolicy):
2385         (WebCore::FrameLoaderClientGdk::setMainDocumentError):
2386         (WebCore::FrameLoaderClientGdk::startDownload):
2387         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForStandardLoad):
2388         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForReload):
2389         (WebCore::FrameLoaderClientGdk::shouldGoToHistoryItem):
2390         * loader/gdk/FrameLoaderClientGdk.h: Added.
2391         (WebCore::FrameLoaderClientGdk::~FrameLoaderClientGdk):
2392         (WebCore::FrameLoaderClientGdk::setFrame):
2393
2394 2007-02-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2395
2396         Reviewed by Maciej.
2397
2398         Linux/gdk fixes related to fonts.
2399
2400         * platform/gdk/FontDataGdk.cpp:
2401         (WebCore::FontData::platformInit): remove a work-around for older cairo versions
2402         since Ubuntu 6.10 ships with cairo that is new enough
2403         * platform/gdk/FontGdk.cpp:
2404         (WebCore::Font::drawGlyphs):
2405         * platform/gdk/FontPlatformDataGdk.cpp: Remove unused variables.
2406         (WebCore::FontPlatformData::FontPlatformData):
2407
2408 2007-02-07  Alexey Proskuryakov  <ap@webkit.org>
2409
2410         Reviewed by Darin.
2411
2412         http://bugs.webkit.org/show_bug.cgi?id=12582
2413         REGRESSION: Unclosed <title> makes the window display garbage or empty title
2414
2415         Automatic testing is not possible, and manual testing probably doesn't make sense.
2416
2417         * loader/DocumentLoader.cpp:
2418         (WebCore::canonicalizedTitle): Bail out early if the passed in string is all whitespace.
2419
2420 2007-02-06  Anders Carlsson  <acarlsson@apple.com>
2421
2422         Reviewed by John Sullivan.
2423
2424         <rdar://problem/4977952>
2425         REGRESSION: Yahoo Messenger IM is totally blank
2426         
2427         * loader/FrameLoader.cpp:
2428         (WebCore::FrameLoader::checkContentPolicy):
2429         Don't ask the policy delegate for content that has valid substitute data.
2430         
2431         (WebCore::FrameLoader::checkNavigationPolicy):
2432         If the loader has substitute data but doesn't have an unreachable URL, let the policy
2433         delegate decide what to do.
2434
2435 2007-02-07  Geoffrey Garen  <ggaren@apple.com>
2436
2437         Reviewed by Darin Adler.
2438
2439         Restoring some of the functionality I removed in r19445. It's insufficient for
2440         each page to cancel keepAlive only for its child frames, because a frame
2441         can be removed from the page before we get a chance to cancel its keepAlive.
2442         So, the page destructor has to cancel keepAlive for all frames. This is safe
2443         because we prohibit closing a WebView while JavaScript is executing.
2444
2445         * page/Frame.cpp:
2446         (WebCore::keepAliveSet):
2447         (WebCore::Frame::keepAlive):
2448         (WebCore::Frame::cancelAllKeepAlive):
2449         (WebCore::Frame::lifeSupportTimerFired):
2450         * page/Frame.h:
2451         * page/Page.cpp:
2452         (WebCore::Page::~Page):
2453
2454 2007-02-07  Alexey Proskuryakov  <ap@webkit.org>
2455
2456         Reviewed by Darin.
2457
2458         http://bugs.webkit.org/show_bug.cgi?id=12603
2459         A crash when trying to use XPath functions normalize-space(), string-length() and number()
2460
2461         Test: fast/xpath/implicit-node-args.html
2462
2463         * xml/XPathFunctions.cpp:
2464         (WebCore::XPath::FunNumber::doEvaluate): Implemented zero parameter case.
2465         (WebCore::XPath::FunctionMapping::): Corrected descriptions of these functions, as they
2466         do allow zero parameters.
2467         (WebCore::XPath::createFunction): Combined the two failure cases to ensure that this
2468         function never returns 0.
2469
2470 2007-02-07  Zack Rusin  <zrusin@trolltech.com>
2471
2472         Fix compilation
2473
2474         * page/qt/EventHandlerQt.cpp:
2475         (WebCore::EventHandler::eventActivatedView):
2476
2477 2007-02-06  Alice Liu  <alice.liu@apple.com>
2478
2479         Reviewed by Maciej.
2480
2481         Added editing command functions for scrolling by page and moving the caret
2482
2483         * editing/Editor.cpp:
2484         (WebCore::execMoveUpByPageAndModifyCaret):
2485         (WebCore::execMoveDownByPageAndModifyCaret):
2486         (WebCore::CommandEntry::):
2487
2488 2007-02-06  Justin Garcia  <justin.garcia@apple.com>
2489
2490         Reviewed by john
2491
2492         <rdar://problem/4922367>
2493         WebView selectLine: followed by deleteBackward: deletes TABLE element of following line
2494
2495         * editing/AppendNodeCommand.cpp:
2496         (WebCore::AppendNodeCommand::doApply): Don't ASSERT when manipulating
2497         non-editable content that is embedded in editable content.  We'll do 
2498         this kind of manipulation when removing redundant style spans after
2499         pasting content that has non-editable pieces.
2500         * editing/InsertNodeBeforeCommand.cpp:
2501         (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
2502         * editing/htmlediting.cpp:
2503         (WebCore::isContentEditable): Added, wrapper for Node::isContentEditable
2504         (WebCore::rangeCompliantEquivalent): Although legal, 
2505         [{table, select, etc.}, {0, numChildren}] don't refer to children of the element, 
2506         but positions before and after the element.  So, rangeCompliantEquivalent is 
2507         really responsible for converting illegal positions *and* legal positions 
2508         that have a special meaning internally.
2509         * editing/htmlediting.h:
2510
2511 2007-02-06  Anders Carlsson  <acarlsson@apple.com>
2512
2513         Reviewed by Brady.
2514
2515         * platform/String.cpp:
2516         (WebCore::String::ascii):
2517         Fix dumping null Strings.
2518
2519 2007-02-06  Anders Carlsson  <acarlsson@apple.com>
2520
2521         Reviewed by Geoff.
2522
2523         Fix <rdar://problem/4979484>
2524         
2525         * css/CSSPrimitiveValue.cpp:
2526         (WebCore::isCSSTokenizerIdentifier):
2527         Do the range check before calling isalpha or isalnum.
2528
2529 2007-02-06  Geoffrey Garen  <ggaren@apple.com>
2530
2531         Reviewed by Darin Adler.
2532
2533         Fixed Frame/RenderObject/Node leak report seen while running SVG image tests.
2534         (We'll need this fix if we ever re-enable SVG image.)
2535         
2536         The extra reference belonged to the Frame keepAlive timer (so this was
2537         not a "real" leak, in the end). The Page destructor has code to cancel all 
2538         Frame keepAlive timers upon the destruction of the last Page, but an SVG 
2539         image puts a Page within a Page, making this condition impossible to meet.
2540         
2541         The fix here is to have each individual page cancel the keepAlive timers 
2542         belonging to its child frames.
2543         
2544         * page/Frame.cpp: Changed the FrameCounter to use WTF logging.
2545         (WebCore::): Nixed the lifeSupportSet, since it's no longer used.
2546         (WebCore::Frame::cancelKeepAlive): Renamed from "endLifeSupport" to match
2547         the name "keepAlive".
2548         * page/Page.cpp:
2549         (WebCore::Page::~Page): Made each page cancel its child keepAlive timers 
2550         and clear its mainFrame, since we may never reach the condition of having 0 Pages.
2551
2552 2007-02-06  Adam Roben  <aroben@apple.com>
2553
2554         Rubberstamped by Brady.
2555
2556         Revert the log channel constants to their old values for all you pretty
2557         people out there who were using the old ones. I also renamed
2558         LogResources to LogPlatformLeaks to be a bit more specific.
2559
2560         * platform/Logging.cpp:
2561         (WebCore::):
2562         * platform/Logging.h:
2563
2564 2007-02-05  Justin Garcia  <justin.garcia@apple.com>
2565
2566         Reviewed by john
2567
2568         <rdar://problem/4959067>
2569         Bullets get erased or moved down to another line
2570         <rdar://problem/4912529>
2571         Seed: Bulleted list in Note in Mail.app does not work with Japanese input mode
2572         
2573         Do not expand the selection to include fully selected 
2574         special elements when insering text over a selection.
2575
2576         * editing/CompositeEditCommand.cpp:
2577         (WebCore::CompositeEditCommand::deleteSelection): Pass
2578         expandForSpecialElements through to DeleteSelectionCommand's constructor.
2579         (WebCore::CompositeEditCommand::moveParagraphs): Use the 
2580         convenience function.
2581         * editing/CompositeEditCommand.h:
2582         * editing/DeleteSelectionCommand.h:
2583         * editing/InsertTextCommand.cpp:
2584         (WebCore::InsertTextCommand::input): Do not expand the selection
2585         to be deleted for special elements.
2586         * editing/ReplaceSelectionCommand.cpp:
2587         (WebCore::ReplaceSelectionCommand::doApply): Added a FIXME about 
2588         when we should expand the selection.
2589
2590 2007-02-06  Geoffrey Garen  <ggaren@apple.com>
2591
2592         Reviewed by Anders Carlsson.
2593         
2594         Disabled support for SVG image because it crashes all the time.
2595
2596         * loader/CachedImage.cpp:
2597         (WebCore::CachedImage::createImage):
2598
2599 2007-02-06  Mitz Pettel  <mitz@webkit.org>
2600
2601         Reviewed by Darin.
2602
2603         - fix http://bugs.webkit.org/show_bug.cgi?id=12518
2604           Betsson.com crashes browser
2605
2606         Test: fast/layers/generated-layer-scrollbar-crash.html
2607
2608         * rendering/RenderLayer.cpp:
2609         (WebCore::RenderLayer::createScrollbar): Changed element()->document() to
2610         document() to work with anonymous objects.
2611         (WebCore::RenderLayer::updateOverflowStatus): Ditto.
2612
2613 2007-02-06  Eric Seidel  <eric@webkit.org>
2614
2615         Reviewed by mitz.
2616
2617         WebKit ignores floating point values for stroke-miterlimit
2618         http://bugs.webkit.org/show_bug.cgi?id=12577
2619         
2620         Test: svg/W3C-SVG-1.1/painting-stroke-07-t.svg
2621
2622         * ksvg2/css/SVGCSSParser.cpp:
2623         (WebCore::CSSParser::parseSVGValue):
2624         * ksvg2/css/SVGCSSStyleSelector.cpp:
2625         (WebCore::CSSStyleSelector::applySVGProperty):
2626         * ksvg2/css/SVGRenderStyle.h:
2627         * ksvg2/css/SVGRenderStyleDefs.h:
2628         (WebCore::StyleStrokeData::operator!=):
2629
2630 2007-02-06  Adam Roben  <aroben@apple.com>
2631
2632         Reviewed by Ada and Oliver.
2633
2634         Adding a new LogResources channel for tracking platform resource usage.
2635
2636         * platform/Logging.cpp: Added new channel, cleaned up constants to be more readable.
2637         * platform/Logging.h: Declare new channel.
2638
2639 2007-02-06  Alexey Proskuryakov  <ap@webkit.org>
2640
2641         Reviewed by Geoff.
2642
2643         http://bugs.webkit.org/show_bug.cgi?id=12619
2644         Non-abbreviated XPaths don't work
2645
2646         Test: fast/xpath/ancestor-axis.html
2647
2648         * xml/XPathParser.cpp:
2649         (WebCore::XPath::Parser::lex): Fix axis name parsing to actually work.
2650         * xml/XPathStep.cpp:
2651         (WebCore::XPath::Step::nodeTestMatches): Fix "*" node test to actually work.
2652
2653 2007-02-06  Mark Rowe  <mrowe@apple.com>
2654
2655         Roll out incomplete support for font-stretch (r19350) at Dave Hyatt's request.
2656         See http://bugs.webkit.org/show_bug.cgi?id=12530#c9 for more info.
2657
2658         * css/CSSComputedStyleDeclaration.cpp:
2659         (WebCore::):
2660         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2661         * css/cssparser.cpp:
2662         (WebCore::CSSParser::parseValue):
2663         * css/cssstyleselector.cpp:
2664         (WebCore::CSSStyleSelector::applyDeclarations):
2665         (WebCore::CSSStyleSelector::applyProperty):
2666         * platform/FontCache.cpp:
2667         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
2668         (WebCore::FontPlatformDataCacheKey::operator==):
2669         (WebCore::computeHash):
2670         (WebCore::FontPlatformDataCacheKeyTraits::deletedValue):
2671         (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
2672         (WebCore::FontCache::getCachedFontPlatformData):
2673         * platform/FontDescription.h:
2674         (WebCore::FontDescription::FontDescription):
2675         (WebCore::FontDescription::weight):
2676         (WebCore::FontDescription::setWeight):
2677         (WebCore::FontDescription::operator==):
2678         * platform/mac/FontCacheMac.mm:
2679         (WebCore::FontCache::createFontPlatformData):
2680         * platform/mac/WebFontCache.mm:
2681         (acceptableChoice):
2682         (betterChoice):
2683         (+[WebFontCache fontWithFamily:traits:size:]):
2684
2685 2007-02-05  Adele Peterson  <adele@apple.com>
2686
2687         Reviewed by Darin.
2688
2689         A few small updates to my bidi patch.
2690
2691         * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): Moved the declaration of the CharacterBuffer outside the if statement since we use its data outside that scope.
2692         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): ditto.
2693         * rendering/bidi.cpp: (WebCore::RenderBlock::bidiReorderCharacters): Used a PassRefPtr for the BidiContext.
2694
2695 2007-02-05  Adele Peterson  <adele@apple.com>
2696
2697         Reviewed by Adam.
2698
2699         Fix for assertion failure in fast/events/objc-keyboard-event-creation.html
2700
2701         * html/HTMLInputElement.cpp:
2702         (WebCore::HTMLInputElement::selectionStart): Check that the selection offsets are not equal to -1 (which is means the selection has never been set) instead of checking for >= 0.
2703         (WebCore::HTMLInputElement::selectionEnd): ditto.
2704         (WebCore::HTMLInputElement::setValue): ditto.
2705         (WebCore::HTMLInputElement::selection): Return an empty selection if the input is not a text field or if no selection has ever been set in the text field.
2706         * html/HTMLTextAreaElement.cpp:
2707         (WebCore::HTMLTextAreaElement::selectionStart): Check that the selection offsets are not equal to -1.
2708         (WebCore::HTMLTextAreaElement::selectionEnd): ditto.
2709         (WebCore::HTMLTextAreaElement::setValue): ditto.
2710         (WebCore::HTMLTextAreaElement::selection): Return an empty selection if no selection has ever been set in the textarea.
2711
2712         * dom/Position.cpp: Added FIXMEs that we should catch the negative offset earlier.
2713         (WebCore::Position::previous):
2714         (WebCore::Position::next):
2715
2716 2007-02-05  Justin Garcia  <justin.garcia@apple.com>
2717
2718         Reviewed by harrison
2719
2720         <rdar://problem/4947387>
2721         REGRESSION Shift Command Left should only select to the beginning of the line
2722
2723         * editing/Editor.cpp:
2724         (WebCore::CommandEntry::): Never copy/paste code.
2725
2726 2007-02-05  Darin Adler  <darin@apple.com>
2727
2728         Reviewed by John Sullivan.
2729
2730         - fix http://bugs.webkit.org/show_bug.cgi?id=11535
2731           <rdar://problem/4946959> REGRESSION: onclick="this.select();" not working on new forms (11535)
2732
2733         Test: fast/forms/input-select-on-click.html
2734
2735         * page/EventHandler.h: Added m_mouseDownWasSingleClickInSelection boolean.
2736         Organized other booleans a bit more logically.
2737         * page/EventHandler.cpp:
2738         (WebCore::EventHandler::EventHandler): Rearrange order to match EventHandler.h, add
2739         m_mouseDownWasSingleClickInSelection initialization.
2740         (WebCore::EventHandler::handleMousePressEventSingleClick): Set m_mouseDownWasSingleClickInSelection
2741         to true in the appropriate special case.
2742         (WebCore::EventHandler::handleMousePressEvent): Set m_mouseDownWasSingleClickInSelection to false.
2743         (WebCore::EventHandler::handleMouseReleaseEvent): Change code to clear selection or set to caret to
2744         only fire if m_mouseDownWasSingleClickInSelection was true rather than firing for any
2745         m_mouseDownMayStartSelect case.
2746
2747 2007-02-05  George Staikos  <staikos@kde.org>
2748
2749         Reviewed by Maciej.
2750
2751         Send HTTP cookies.
2752
2753         * platform/network/qt/ResourceHandleManagerQt.cpp:
2754         (WebCore::RequestQt::RequestQt):
2755
2756 2007-02-05  Adele Peterson  <adele@apple.com>
2757
2758         Reviewed by Mitz and Anders.
2759
2760         Fix for http://bugs.webkit.org/show_bug.cgi?id=11811
2761         <rdar://problem/4947184> REGRESSION (r11783): Hebrew text in list boxes is reversed
2762
2763         http://bugs.webkit.org/show_bug.cgi?id=11812
2764         <rdar://problem/4960269> REGRESSION (Native file upload): Hebrew filenames are reversed
2765
2766         Tests: 
2767         fast/text/international/bidi-listbox.html
2768         fast/text/international/bidi-listbox-atsui.html
2769
2770         * rendering/RenderBlock.h: Added static bidiReorderCharacters that will run the bidi algorithm on a character buffer.
2771         * rendering/bidi.cpp:
2772         (WebCore::RenderBlock::bidiReorderCharacters): Added. Creates an anonymous RenderBlock and RenderText to feed into bidiReorderLines.
2773         (WebCore::RenderBlock::constructLine): Uses the new convenience methods on BidiRun.
2774         * rendering/bidi.h:
2775         (WebCore::BidiRun::reversed): Added convenience method.
2776         (WebCore::BidiRun::dirOverride): ditto.
2777
2778         * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::paintObject): Creates a buffer and calls bidiReorderCharacters
2779           to get a correctly ordered character buffer for drawText.
2780         * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): ditto.
2781
2782 2007-02-05  Mitz Pettel  <mitz@webkit.org>
2783
2784         Reviewed by Darin.
2785
2786         - fix http://bugs.webkit.org/show_bug.cgi?id=12590
2787           REGRESSION: Text selection is weird in textareas in Trac wiki editing pages
2788
2789         Test: fast/repaint/selection-gap-overflow-scroll.html
2790
2791         * rendering/RenderBlock.cpp:
2792         (WebCore::RenderBlock::selectionGapRects): Adjust for overflow scroll.
2793
2794 2007-02-05  Mitz Pettel  <mitz@webkit.org>
2795
2796         Reviewed by Adele.
2797
2798         - fix http://bugs.webkit.org/show_bug.cgi?id=11916
2799           REGRESSION (SearchField): RTL search fields are mixed up
2800
2801         Test: fast/forms/search-rtl.html
2802
2803         * rendering/RenderTextControl.cpp:
2804         (WebCore::RenderTextControl::createInnerBlockStyle): Always make the inner
2805         block LTR so that the results button will be on the left and the cancel
2806         button will be on the right.
2807         (WebCore::RenderTextControl::createInnerTextStyle): Inherit the direction
2808         property directly from the control so that it won't be masked by the inner
2809         block's LTR override.
2810         (WebCore::RenderTextControl::nodeAtPoint): Removed code that swapped the
2811         results and cancel buttons for RTL.
2812         (WebCore::RenderTextControl::forwardEvent): Ditto.
2813         (WebCore::RenderTextControl::clientPaddingLeft): Ditto.
2814         (WebCore::RenderTextControl::clientPaddingRight): Ditto.
2815
2816 2007-02-05  Mitz Pettel  <mitz@webkit.org>
2817
2818         Reviewed by Adele.
2819
2820         - fix http://bugs.webkit.org/show_bug.cgi?id=12618
2821           REGRESSION (SearchField): Dragging across the text and releasing over the clear button clears the field
2822
2823         Test: fast/forms/search-cancel-button-mouseup.html
2824
2825         Made the cancel button capturing.
2826
2827         * html/HTMLTextFieldInnerElement.cpp:
2828         (WebCore::HTMLSearchFieldCancelButtonElement::HTMLSearchFieldCancelButtonElement):
2829         (WebCore::HTMLSearchFieldCancelButtonElement::defaultEventHandler):
2830         * html/HTMLTextFieldInnerElement.h:
2831
2832 2007-02-05  Mitz Pettel  <mitz@webkit.org>
2833
2834         Reviewed by Darin.
2835
2836         - fix http://bugs.webkit.org/show_bug.cgi?id=6626
2837           Arabic & Farsi rendered with no shaping (all glyphs separate, unreadable!)
2838
2839         No test possible since Mac OS X only ships with fonts that contain shaping
2840         information.
2841
2842         * icu/unicode/ushape.h: Added from
2843         http://www.opensource.apple.com/darwinsource/10.4.8.ppc/ICU-6.2.9/icuSources/common/unicode/
2844         * platform/FontData.h:
2845         (WebCore::FontData::shapesArabic): Added. Returns whether the font contains
2846         shaping information for Arabic or not.
2847         * platform/mac/FontDataMac.mm:
2848         (WebCore::FontData::platformInit):
2849         (WebCore::FontData::checkShapesArabic): Added. Checks whether the font contains
2850         a glyph metamorphosis table. The heuristic is that if a font contains Arabic glyphs
2851         and a metamorphosis table, then it includes shaping information for Arabic.
2852         * platform/mac/FontMac.mm:
2853         (WebCore::overrideLayoutOperation): Changed to use the same character buffer passed
2854         to ATSUI instead of the original character buffer and to give zero-width spaces zero
2855         width.
2856         (WebCore::isArabicLamWithAlefLigature): Added. Checks if the character is one
2857         of the Arabic presentation forms of Lam with Alef.
2858         (WebCore::shapeArabic): Added. This is a wrapper around the ICU Arabic shaping routine
2859         that replaces each space following a Lam with Alef ligature resulting from shaping
2860         with a zero-width space.
2861         (WebCore::ATSULayoutParameters::initialize): Changed to allocate the auxiliary buffer
2862         lazily for mirroring and Arabic shaping. Added a call to shapeArabic() when required.
2863
2864 2007-02-05  Eric Seidel  <eric@webkit.org>
2865
2866         No review, build fix only.
2867
2868         * ksvg2/svg/SVGStyleElement.cpp: add forgotten header.
2869
2870 2007-02-05  Eric Seidel  <eric@webkit.org>
2871
2872         Reviewed by bdash.
2873
2874         Fix style name testcase which I broke in my last commit.
2875
2876         * ksvg2/svg/SVGStyleElement.cpp:
2877         (WebCore::SVGStyleElement::xmlspace):
2878         (WebCore::SVGStyleElement::title): override Element::title()
2879         (WebCore::SVGStyleElement::parseMappedAttribute):
2880         * ksvg2/svg/SVGStyleElement.h:
2881
2882 2007-02-04  Eric Seidel  <eric@webkit.org>
2883
2884         Reviewed by darin.
2885
2886         Fix hand cursor on link hover for SVG
2887         Fix status text on link hover for SVG
2888         Fix tooltips on link hover for SVG
2889         Fix link dragging for SVG
2890         http://bugs.webkit.org/show_bug.cgi?id=12575
2891         
2892         Test: added manual-tests/svg-links.svg
2893
2894         * dom/Document.cpp:
2895         (WebCore::Document::prepareMouseEvent):
2896         * dom/Element.cpp:
2897         (WebCore::Element::title):
2898         * dom/Element.h:
2899         * html/HTMLElement.cpp:
2900         (WebCore::HTMLElement::setId):
2901         (WebCore::HTMLElement::title):
2902         (WebCore::HTMLElement::setTitle):
2903         (WebCore::HTMLElement::setLang):
2904         * html/HTMLElement.h:
2905         * ksvg2/svg/SVGAElement.cpp:
2906         (WebCore::SVGAElement::title):
2907         (WebCore::SVGAElement::parseMappedAttribute):
2908         (WebCore::SVGAElement::defaultEventHandler):
2909         * ksvg2/svg/SVGAElement.h:
2910         * ksvg2/svg/SVGTitleElement.cpp:
2911         * ksvg2/svg/SVGTitleElement.h:
2912         * manual-tests/svg-links.svg: Added.
2913         * rendering/HitTestResult.cpp:
2914         (WebCore::HitTestResult::title):
2915         (WebCore::HitTestResult::absoluteImageURL):
2916         (WebCore::HitTestResult::absoluteLinkURL):
2917         (WebCore::HitTestResult::isLiveLink):
2918         (WebCore::HitTestResult::titleDisplayString):
2919
2920 2007-02-04  Alexey Proskuryakov  <ap@webkit.org>
2921
2922         Reviewed by Darin.
2923
2924         http://bugs.webkit.org/show_bug.cgi?id=12602
2925         XPath functions string(), normalize-space() and string-length() don't work
2926         without arguments
2927
2928         Test: fast/xpath/implicit-node-args.html
2929
2930         * xml/XPathFunctions.cpp:
2931         (WebCore::XPath::FunString::doEvaluate):
2932         (WebCore::XPath::FunStringLength::doEvaluate):
2933         (WebCore::XPath::FunNormalizeSpace::doEvaluate):
2934         Don't try to pass RefPtr<Node> to the Value ctor.
2935
2936 2007-02-04  Alexey Proskuryakov  <ap@webkit.org>
2937
2938         Reviewed by Darin.
2939
2940         http://bugs.webkit.org/show_bug.cgi?id=8791
2941         XPath should support custom node resolvers
2942
2943         * bindings/js/JSCustomXPathNSResolver.cpp: Added.
2944         (WebCore::JSCustomXPathNSResolver::create):
2945         (WebCore::JSCustomXPathNSResolver::JSCustomXPathNSResolver):
2946         (WebCore::JSCustomXPathNSResolver::~JSCustomXPathNSResolver):
2947         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2948         * bindings/js/JSCustomXPathNSResolver.h: Added.
2949         * bindings/objc/DOMCustomXPathNSResolver.h: Added.
2950         * bindings/objc/DOMCustomXPathNSResolver.mm: Added.
2951         (WebCore::DOMCustomXPathNSResolver::DOMCustomXPathNSResolver):
2952         (WebCore::DOMCustomXPathNSResolver::~DOMCustomXPathNSResolver):
2953         (WebCore::DOMCustomXPathNSResolver::lookupNamespaceURI):
2954         Wrappers for JS/ObjC objects that can be used as resolvers.
2955
2956         * bindings/scripts/CodeGeneratorJS.pm:
2957         * bindings/scripts/CodeGeneratorObjC.pm:
2958         Use the above wrappers to support custom resolvers.
2959
2960         * xml/XPathNSResolver.cpp:
2961         * xml/XPathNSResolver.h:
2962         Turned this class into an abstract one.
2963
2964         * xml/NativeXPathNSResolver.cpp: Added.
2965         (WebCore::NativeXPathNSResolver::NativeXPathNSResolver):
2966         (WebCore::NativeXPathNSResolver::~NativeXPathNSResolver):
2967         (WebCore::NativeXPathNSResolver::lookupNamespaceURI):
2968         * xml/NativeXPathNSResolver.h: Added.
2969         A XPathNSResolver subclass, doing what XPathNSResolver used to do.
2970
2971         * xml/XPathEvaluator.cpp:
2972         (WebCore::XPathEvaluator::createNSResolver): Create a NativeXPathNSResolver.
2973
2974         * WebCore.xcodeproj/project.pbxproj: Added new files.
2975
2976 2007-02-04  Oliver Hunt  <oliver@apple.com>
2977
2978         Reviewed by Adam.
2979
2980         Tidying up EventHandler, and moving more of
2981         EventHandlerMac.mm to EventHandler.cpp
2982
2983         Also added EventHandler::eventLoopHandleMouse[Dragged,Up]
2984         these are basically helper functions to allow correct event
2985         handling on MacOS.        
2986
2987         * page/EventHandler.cpp:
2988         (WebCore::EventHandler::handleMouseUp):
2989         (WebCore::EventHandler::dragSourceMovedTo):
2990         (WebCore::EventHandler::dragSourceEndedAt):
2991         (WebCore::EventHandler::dispatchDragSrcEvent):
2992            Moved from EventHandlerMac to EventHandler
2993
2994         * page/EventHandler.h:
2995         (WebCore::EventHandler::eventLoopHandleMouseUp):
2996         (WebCore::EventHandler::eventLoopHandleMouseDragged):
2997           Null implementations of two Mac helper functions
2998         * page/mac/EventHandlerMac.mm:
2999         (WebCore::EventHandler::eventLoopHandleMouseDragged):           
3000         (WebCore::EventHandler::handleDrag):
3001           Much tidying, reduced nesting, made less dependent on NS types   
3002         (WebCore::EventHandler::eventLoopHandleMouseDragged):
3003         (WebCore::EventHandler::eventLoopHandleMouseUp):  
3004           Helper functions to let us process events properly on MacOS
3005
3006         * page/mac/WebCoreFrameBridge.mm:
3007         (-[WebCoreFrameBridge dragSourceEndedAt:operation:]):
3008
3009 2007-02-04  George Staikos  <staikos@kde.org>
3010
3011         Reviewed by Zack.
3012
3013         Some Qt hacks and cleanups - makes rendering of forms much better on
3014         OS X
3015
3016         * platform/qt/PlatformKeyboardEventQt.cpp: Add Key_Return/Enter
3017         (WebCore::keyIdentifierForQtKeyCode):
3018         (WebCore::windowsKeyCodeForKeyEvent):
3019         * platform/qt/RenderThemeQt.cpp: Hacks and fix buttons
3020         (WebCore::RenderThemeQt::addIntrinsicMargins):
3021         (WebCore::RenderThemeQt::setCheckboxSize):
3022         (WebCore::RenderThemeQt::supportsFocus):
3023         (WebCore::RenderThemeQt::applyTheme):
3024
3025 2007-02-03  Maciej Stachowiak  <mjs@apple.com>
3026
3027         Rubber stamped by Adam.
3028
3029         - remove obsolete code that has an annoying space in the directory name
3030
3031         * WebCore.vcproj/Image Viewer/Image Viewer.cpp: Removed.
3032         * WebCore.vcproj/Image Viewer/Image Viewer.h: Removed.
3033         * WebCore.vcproj/Image Viewer/Image Viewer.rc: Removed.
3034         * WebCore.vcproj/Image Viewer/Image Viewer.reg: Removed.
3035         * WebCore.vcproj/Image Viewer/Image Viewer.vcproj: Removed.
3036         * WebCore.vcproj/Image Viewer/ImageDocument.cpp: Removed.
3037         * WebCore.vcproj/Image Viewer/ImageDocument.h: Removed.
3038         * WebCore.vcproj/Image Viewer/ImageMainFrame.cpp: Removed.
3039         * WebCore.vcproj/Image Viewer/ImageMainFrame.h: Removed.
3040         * WebCore.vcproj/Image Viewer/ImageView.cpp: Removed.
3041         * WebCore.vcproj/Image Viewer/ImageView.h: Removed.
3042         * WebCore.vcproj/Image Viewer/Resource.h: Removed.
3043         * WebCore.vcproj/Image Viewer/res/Image Viewer.ico: Removed.
3044         * WebCore.vcproj/Image Viewer/res/Image ViewerDoc.ico: Removed.
3045         * WebCore.vcproj/Image Viewer/res/ImageViewer.rc2: Removed.
3046         * WebCore.vcproj/Image Viewer/res/Toolbar.bmp: Removed.
3047         * WebCore.vcproj/Image Viewer/stdafx.cpp: Removed.
3048         * WebCore.vcproj/Image Viewer/stdafx.h: Removed.
3049
3050 2007-02-04  Mitz Pettel  <mitz@webkit.org>
3051
3052         Reviewed by Oliver.
3053
3054         - fix http://bugs.webkit.org/show_bug.cgi?id=12564
3055           REGRESSION: Uncaught AppKit exception when using the scrollwheel while Gmail is loading
3056
3057         * platform/mac/PlatformMouseEventMac.mm:
3058         (WebCore::eventNumberForEvent): Scroll wheel events don't have an event number.
3059
3060 2007-02-04  Nikolas Zimmermann  <zimmermann@kde.org>
3061
3062         Reviewed by Sam.
3063
3064         Add support for xml:space="preserve" for SVG text.
3065         It can be modeled by using white-space="pre" and replace \n by spaces.
3066
3067         Handle xml:space="default" correctly.
3068         Always remove tabs from SVG text - as demanded by spec.
3069
3070         Added test: svg/custom/text-whitespace-handling.svg
3071
3072         * css/svg.css:
3073         * ksvg2/svg/SVGTextContentElement.cpp:
3074         (WebCore::SVGTextContentElement::parseMappedAttribute):
3075         * rendering/RenderText.cpp:
3076         (WebCore::RenderText::setStyle):
3077         (WebCore::RenderText::setTextInternal):
3078         * rendering/bidi.cpp:
3079         (WebCore::shouldPreserveNewline):
3080         (WebCore::RenderBlock::skipWhitespace):
3081         (WebCore::RenderBlock::findNextLineBreak):
3082
3083 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
3084
3085         Reviewed by Darin.
3086
3087         http://bugs.webkit.org/show_bug.cgi?id=12560
3088         W3C XPath test Text_Nodes.svg fails
3089
3090         Covered by dom/svg/level3/xpath/Text_Nodes.svg
3091
3092         * xml/XPathStep.cpp:
3093         (WebCore::XPath::Step::nodeTestMatches): Only include the first text sibling in text() matches.
3094
3095 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
3096
3097         Reviewed by Darin.
3098
3099         http://bugs.webkit.org/show_bug.cgi?id=12485
3100         XPath id() function doesn't work as root in paths
3101
3102         Test: fast/xpath/id-path.html
3103
3104         * xml/XPathPath.cpp:
3105         (WebCore::XPath::Path::doEvaluate): Implemented.
3106         (WebCore::XPath::LocationPath::evaluate): A new overload that takes an initial NodeVector.
3107         (WebCore::XPath::LocationPath::doEvaluate): Moved most of the logic to the new evaluate().
3108
3109         * xml/XPathPath.h: Added a new evaluate() overload and a using declaration to keep the
3110         generic one visible.
3111
3112 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
3113
3114         Reviewed by Darin.
3115
3116         http://bugs.webkit.org/show_bug.cgi?id=12559
3117         REGRESSION: Crash in checkForHeadCharset() under GuardMalloc
3118
3119         No tests possible.
3120
3121         * loader/TextResourceDecoder.cpp:
3122         (WebCore::TextResourceDecoder::checkForHeadCharset): Fix end of buffer checks; sprinkle a number 
3123         of new ones over the function.
3124
3125 2007-02-03  David Kilzer  <ddkilzer@webkit.org>
3126
3127         Reviewed by NOBODY (no-svg build fix).
3128
3129         * page/EventHandler.cpp: Include FloatPoint.h.
3130
3131 2007-02-03  Alexey Proskuryakov  <ap@webkit.org>
3132
3133         Reviewed by Mitz.
3134
3135         http://bugs.webkit.org/show_bug.cgi?id=12549
3136         Wrong character encoding at www.ravmilim.co.il
3137
3138         Test: fast/encoding/meta-charset.html
3139
3140         * loader/TextResourceDecoder.cpp:
3141         (WebCore::TextResourceDecoder::checkForHeadCharset): Fix an off by one error.
3142
3143 2007-02-02  Maciej Stachowiak  <mjs@apple.com>
3144         
3145         Reviewed by Hyatt & Adele.
3146         
3147         - <rdar://problem/4896972> TV guide listings page doesn't finish loading (11674)
3148         
3149         Test case: fast/forms/disabled-select-change-index.html
3150         
3151         * html/HTMLOptionElement.cpp:
3152         (WebCore::HTMLOptionElement::setSelected): Allow changing selected state of a disabled
3153         option.
3154         
3155 2007-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
3156
3157         Build fix, not reviewed.
3158
3159         Blind attempt to fix Qt build.
3160
3161         * WebCore.pro: Add RenderSVGGradientStop.cpp / RenderSVGHiddenContainer.cpp
3162
3163 2007-02-03  Nikolas Zimmermann  <zimmermann@kde.org>
3164
3165         Reviewed by Eric & Maciej.
3166
3167         Fix serveral <use> issues:
3168         - When events are dispatch to a referenced element, the actual event.target
3169           has to be set to the corresponding SVGElementInstance object
3170
3171         - Node::shadowAncestorNode() should _not_ return the shadowParentNode for SVG elements
3172           This is only needed for the HTML forms concept and breaks event dispatching for SVG shadow tree elements.
3173
3174         - Add SVGElementInstance as possible EventTarget in bindings/js/kjs_dom.cpp
3175           (Now event.target returns the actual SVGElementInstance object for a shadow tree element)
3176
3177         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12502 (Reproducible crash when browsing SVG map.)
3178         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12511 (<use> has event dispatching issues)
3179
3180         Added test: svg/custom/use-event-handler-on-use-element.svg
3181         Added test: svg/custom/use-event-handler-on-referenced-element.svg
3182         Added test: svg/custom/use-elementInstance-event-target.svg
3183         Added test: svg/custom/use-elementInstance-methods.svg
3184
3185         * bindings/js/kjs_dom.cpp:
3186         (KJS::toJS):
3187         * dom/EventTarget.cpp:
3188         (WebCore::EventTarget::toSVGElementInstance):
3189         * dom/EventTarget.h:
3190         * dom/EventTargetNode.cpp:
3191         (WebCore::EventTargetNode::handleLocalEvents):
3192         (WebCore::EventTargetNode::dispatchGenericEvent):
3193         (WebCore::EventTargetNode::dispatchEvent):
3194         * dom/EventTargetNode.h:
3195         * dom/Node.cpp:
3196         (WebCore::Node::shadowAncestorNode):
3197         * ksvg2/svg/SVGElement.cpp:
3198         (WebCore::shadowTreeParentElementForShadowTreeElement):
3199         (WebCore::SVGElement::dispatchEvent):
3200         * ksvg2/svg/SVGElement.h:
3201         * ksvg2/svg/SVGElementInstance.cpp:
3202         (WebCore::SVGElementInstance::toSVGElementInstance):
3203         * ksvg2/svg/SVGElementInstance.h:
3204         * ksvg2/svg/SVGUseElement.cpp:
3205         (WebCore::SVGUseElement::notifyAttributeChange):
3206         (WebCore::SVGUseElement::instanceForShadowTreeElement):
3207         * ksvg2/svg/SVGUseElement.h:
3208
3209 2007-02-02  Oliver Hunt  <oliver@apple.com>
3210
3211         Reviewed by Geoff.
3212
3213         Add guard around accessing [NSEvent eventNumber] to ensure
3214         we don't attempt to access it on on non-mouse related NSEvent.
3215
3216         * platform/mac/PlatformMouseEventMac.mm:
3217         (WebCore::eventNumberForEvent):
3218         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3219
3220 2007-02-02  Adam Roben  <aroben@apple.com>
3221
3222         Reviewed by Anders.
3223
3224         Try to be a little less selfish about DocumentLoader.
3225
3226         Spotted while working on <rdar://problem/4957747>.
3227
3228         * page/ContextMenuController.cpp:
3229         (WebCore::ContextMenuController::contextMenuItemSelected):
3230             Everyone can open frames in new windows.
3231
3232 2007-02-02  Nikolas Zimmermann  <zimmermann@kde.org>
3233
3234         Reviewed by Eric.
3235
3236         Move xml:space/xml:lang from svgattrs.in to xmlattrs.in where they actually belong.
3237         Now they are actually recognized by SVGLangSpace::parseMappedAttribute.
3238         Patch implementing xml:space="preserve" coming soon, which acts as test for this stuff.
3239
3240         Always build XMLNames.cpp (not only for SVG) and replace all occourences of
3241         "http://www.w3.org/XML/1998/namespace" by "XMLNames::xmlNamespaceURI".
3242
3243         * DerivedSources.make:
3244         * dom/DOMImplementation.cpp:
3245         (WebCore::DOMImplementation::createDocument):
3246         * ksvg2/svg/SVGLangSpace.cpp:
3247         (WebCore::SVGLangSpace::SVGLangSpace):
3248         (WebCore::SVGLangSpace::parseMappedAttribute):
3249         * ksvg2/svg/SVGLangSpace.h:
3250         * ksvg2/svg/svgattrs.in:
3251         * page/Frame.cpp:
3252         (WebCore::Frame::Frame):
3253         * xml/XPathNSResolver.cpp:
3254         (WebCore::XPathNSResolver::lookupNamespaceURI):
3255         * xml/xmlattrs.in:
3256
3257 2007-02-02  Beth Dakin  <bdakin@apple.com>
3258
3259         Reviewed by Maciej.
3260
3261         Working on a layout test.
3262
3263         Fix for <rdar://problem/4966100> REGRESSION: Reproducible ASSERT 
3264         hit at Walgreens.com
3265
3266         * page/Frame.cpp:
3267         (WebCore::Frame::setView): If we are setting the view to 0 and 
3268         detaching the document, call unscheduleRealyout() on the old view 
3269         before setting it to 0.
3270
3271 2007-02-01  Geoffrey Garen  <ggaren@apple.com>
3272
3273         Reviewed by Maciej Stachowiak.
3274         
3275         Added support for selectively ignoring WebCore::Node leaks during layout
3276         tests, so that we can ignore known leaks in other components.
3277
3278         * WebCore.exp:
3279         * dom/Node.cpp:
3280         (WebCore::Node::isSupported): Moved isSupported up with the rest of the static functions.
3281
3282         (WebCore::): Added an ignoreSet, which collects WebCore::Nodes whose lifetime
3283         we want to ignore. We need to track which nodes to ignore rather than, say,
3284         just suspending the count, because node destruction depends on lots of
3285         different variables, so it would be nearly impossible to know when exactly 
3286         to suspend the count and when exactly to resume it.
3287
3288         (WebCore::NodeCounter::~NodeCounter): Changed to use WTFLog instead of fprintf.
3289
3290         (WebCore::Node::startIgnoringLeaks): Do the ignoring.
3291         (WebCore::Node::stopIgnoringLeaks): ditto
3292         (WebCore::Node::Node): ditto
3293         (WebCore::Node::~Node): ditto
3294
3295         * dom/Node.h: Moved isSupported up with the rest of the static functions.
3296
3297         * platform/mac/LoggingMac.mm:
3298         (WebCore::initializeWithUserDefault): Renamed from "initializeLoggingChannel"
3299         because the real goal here is to honor a user default -- WTFLoggingChannels
3300         need no run-time initialization. Also replaced "off by default, on if a 
3301         user default says so" behavior with "only override existing setting if a
3302         user default says so" behavior. It seemed like a bug that you would specify 
3303         a channel's on/off state in its definition, but this function would unconditionally
3304         blow that state away.
3305         (WebCore::InitializeLoggingChannelsIfNecessary):
3306
3307 2007-02-02  Eric Seidel  <eric@webkit.org>
3308
3309         Reviewed by mitz.
3310
3311         Fix gradient stop style resolution to be less of a hack, fixing style invalidation:
3312         http://bugs.webkit.org/show_bug.cgi?id=12193
3313         and fix stop-color and stop-opacity not to inherit:
3314         http://bugs.webkit.org/show_bug.cgi?id=12193
3315         
3316         Tests:
3317         * svg/custom/gradient-stops-style-change.svg: added
3318         * svg/W3C-SVG-1.1/pservers-grad-18-b.svg: updated
3319
3320         * WebCore.xcodeproj/project.pbxproj:
3321         * ksvg2/css/SVGCSSStyleSelector.cpp:
3322         (WebCore::CSSStyleSelector::applySVGProperty):
3323         * ksvg2/css/SVGRenderStyle.cpp:
3324         (WebCore::SVGRenderStyle::inheritedNotEqual):
3325         (WebCore::SVGRenderStyle::inheritFrom):
3326         * ksvg2/css/SVGRenderStyle.h:
3327         * ksvg2/svg/SVGDefsElement.cpp:
3328         (WebCore::SVGDefsElement::createRenderer):
3329         * ksvg2/svg/SVGGradientElement.cpp:
3330         (WebCore::SVGGradientElement::createRenderer):
3331         (WebCore::SVGGradientElement::buildStops):
3332         * ksvg2/svg/SVGGradientElement.h:
3333         (WebCore::SVGGradientElement::rendererIsNeeded):
3334         * ksvg2/svg/SVGStopElement.cpp:
3335         (WebCore::SVGStopElement::createRenderer):
3336         * ksvg2/svg/SVGStopElement.h:
3337         (WebCore::SVGStopElement::rendererIsNeeded):
3338         * rendering/RenderSVGGradientStop.cpp: Added.
3339         * rendering/RenderSVGGradientStop.h: Added.
3340         * rendering/RenderSVGHiddenContainer.cpp: Added.
3341         * rendering/RenderSVGHiddenContainer.h: Added.
3342         * rendering/RenderSVGContainer.cpp:
3343         * rendering/RenderSVGContainer.h:
3344
3345 2007-02-02  Zack Rusin  <zrusin@trolltech.com>
3346
3347         Reviewed by Lars
3348
3349         Fix scrolling-on-selection bug by correctly
3350         scrolling to the offset instead of trying to 
3351         ensure visibility with margins.
3352
3353         * platform/qt/ScrollViewQt.cpp:
3354         (WebCore::ScrollView::scrollPointRecursively):
3355
3356 2007-02-02  Zack Rusin  <zrusin@trolltech.com>
3357
3358         Reviewed by Lars
3359
3360         Fix drawing of dashed and colored lines. Pen
3361         has to be inherited for stroke to stay consistent.
3362
3363         * platform/graphics/qt/GraphicsContextQt.cpp:
3364         (WebCore::GraphicsContext::setAlpha):
3365         (WebCore::GraphicsContext::setPlatformStrokeColor):
3366         (WebCore::GraphicsContext::setPlatformStrokeStyle):
3367
3368 2007-02-01  Nicholas Shanks  <webkit@nickshanks.com>
3369
3370         Reviewed by Mark.
3371
3372         Add support for CSS2 font-stretch property.
3373
3374         * css/CSSComputedStyleDeclaration.cpp:
3375         (WebCore::):
3376         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3377         * css/cssparser.cpp:
3378         (WebCore::CSSParser::parseValue):
3379         * css/cssstyleselector.cpp:
3380         (WebCore::CSSStyleSelector::applyDeclarations):
3381         (WebCore::CSSStyleSelector::applyProperty):
3382         * platform/FontCache.cpp:
3383         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
3384         (WebCore::FontPlatformDataCacheKey::operator==):
3385         (WebCore::computeHash):
3386         (WebCore::FontPlatformDataCacheKeyTraits::deletedValue):
3387         (WebCore::FontPlatformDataCacheKeyTraits::emptyValue):
3388         (WebCore::FontCache::getCachedFontPlatformData):
3389         * platform/FontDescription.h:
3390         (WebCore::):
3391         (WebCore::FontDescription::FontDescription):
3392         (WebCore::FontDescription::stretch):
3393         (WebCore::FontDescription::narrowerStretch):
3394         (WebCore::FontDescription::widerStretch):
3395         (WebCore::FontDescription::setStretch):
3396         (WebCore::FontDescription::operator==):
3397         * platform/mac/FontCacheMac.mm:
3398         (WebCore::FontCache::createFontPlatformData):
3399         * platform/mac/WebFontCache.mm:
3400         (acceptableChoice):
3401         (betterChoice):
3402         (+[WebFontCache fontWithFamily:traits:size:]):
3403
3404 2007-02-01  Timothy Hatcher  <timothy@apple.com>
3405
3406         Reviewed by Mark Rowe.
3407
3408         <rdar://problem/4969201> REGRESSION: Safari applies the wrong font to BODY element at http://www.apple.com/downloads/dashboard/
3409
3410         * platform/mac/WebFontCache.mm:
3411         (+[WebFontCache fontWithFamily:traits:size:]): Don't call [NSFont fontWithName:] with the desiredFamily on Tiger.
3412
3413 2007-02-01  Alexey Proskuryakov  <ap@webkit.org>
3414
3415         Reviewed by Darin.
3416
3417         http://bugs.webkit.org/show_bug.cgi?id=12506
3418         REGRESSION: Safari doesn't display hebrew text on a web page,
3419         displayed correctly on Tiger
3420
3421         * loader/TextResourceDecoder.cpp:
3422         (WebCore::TextResourceDecoder::checkForHeadCharset): Advance the pointer when necessary.
3423
3424 2007-02-01  George Staikos  <staikos@kde.org>
3425
3426         Reviewed by Zack and Lars.
3427
3428         Add a cookie interface for the Qt build.
3429
3430         * WebCore.pro:
3431         * platform/qt/CookieJarQt.cpp:
3432         (WebCore::setCookies):
3433         (WebCore::cookies):
3434         (WebCore::cookiesEnabled):
3435
3436 2007-02-01  Maciej Stachowiak  <mjs@apple.com>
3437
3438         Reviewed by Adele.
3439         
3440         - fixed <rdar://problem/4922764> ASSERTION: (!m_contentFunction) in PolicyCheck::call trying to visit feed URL (CNN, Apple, etc.)
3441
3442         * loader/FrameLoader.cpp:
3443         (WebCore::FrameLoader::stopPolicyCheck): Call new cancel method instead of call(false) on old check.
3444         (WebCore::PolicyCheck::cancel): call any callback function that is set with false or PolicyIgnore as
3445         appropriate.
3446         * loader/FrameLoader.h:
3447
3448 2007-02-01  Beth Dakin  <bdakin@apple.com>
3449
3450         Reviewed by Hyatt.
3451
3452         Fix for http://bugs.webkit.org/show_bug.cgi?id=10517 REGRESSION 
3453         (r12065-r12082): Navigation graphic wraps to the next line on 
3454         duart.com and <rdar://problem/4960505> REGRESSION: The Awesome 
3455         Windows Vista page has a layout error in the header table (10517)
3456
3457         The problem is that we never supported a quirk that other browsers 
3458         support where, under very specific circumstances, a table cell will 
3459         grow to fit an image inside of it. This is only a regression 
3460         because a bug was fixed were we were 1 pixel off in the calculation 
3461         of overflow in some cases.
3462
3463         * rendering/RenderBlock.cpp:
3464         (WebCore::shouldGrowTableCellForImage):
3465         (WebCore::RenderBlock::calcInlineMinMaxWidth):
3466
3467 2007-02-01  Zack Rusin  <zrusin@trolltech.com>
3468
3469         Reviewed by Lars
3470
3471         Implement native look for comboboxes
3472         and fix/implement popup menus.
3473
3474         * platform/PopupMenu.h:
3475         * platform/qt/PopupMenuQt.cpp:
3476         (WebCore::PopupMenu::PopupMenu):
3477         (WebCore::PopupMenu::~PopupMenu):
3478         (WebCore::PopupMenu::clear):
3479         (WebCore::PopupMenu::populate):
3480         (WebCore::PopupMenu::show):
3481         (WebCore::PopupMenu::hide):
3482         (WebCore::PopupMenu::updateFromElement):
3483         * platform/qt/RenderThemeQt.cpp:
3484         (WebCore::RenderThemeQt::adjustMenuListStyle):
3485         (WebCore::RenderThemeQt::paintButton):
3486         (WebCore::RenderThemeQt::paintTextField):
3487         (WebCore::RenderThemeQt::paintMenuList):
3488
3489 2007-02-01  Darin Adler  <darin@apple.com>
3490
3491         Reviewed by Maciej.
3492
3493         - fix <rdar://problem/4887428> REGRESSION: Implement slight delay for firing incremental onSearch event
3494
3495         * rendering/RenderTextControl.h:
3496         * rendering/RenderTextControl.cpp:
3497         (WebCore::RenderTextControl::RenderTextControl): Set up timer.
3498         (WebCore::RenderTextControl::subtreeHasChanged): Start timer here instead of immediately sending event.
3499         (WebCore::RenderTextControl::searchEventTimerFired): Added. Sends search event.
3500         (WebCore::RenderTextControl::stopSearchEventTimer): Added.
3501         (WebCore::RenderTextControl::startSearchEventTimer): Added. Sends search event right away if there is
3502         no text. If there is some text, sets the timer using the same delay rule as NSSearchField. If you keep
3503         typing, then the timer keeps getting reset 0.2 seconds into the future until you pause.
3504
3505         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::onSearch): Tell the renderer to
3506         stop the timer, since we're sending a search event. This helps when a caller other than
3507         the timer decides to send an explicit search event.
3508
3509 2007-02-01  Maciej Stachowiak  <mjs@apple.com>
3510
3511         Fix by Darin, reviewed by Maciej.
3512
3513         - fix ~10% performance regression from encoding fix
3514
3515         * loader/TextResourceDecoder.cpp:
3516         (WebCore::TextResourceDecoder::checkForHeadCharset): Fix a logic
3517         error which made huge strings accidentally.
3518
3519 2007-02-01  Lars Knoll <lars@trolltech.com>
3520
3521         Fix the Qt build
3522
3523         * page/qt/EventHandlerQt.cpp:
3524
3525 2007-01-31  Darin Adler  <darin@apple.com>
3526
3527         Reviewed by Adam and Geoff.
3528
3529         - fix <rdar://problem/4786767> REGRESSION: <select> controls are not resized when zooming text
3530
3531         Test: fast/forms/select-width-font-change.html
3532
3533         * rendering/RenderMenuList.h: Cleaned up formatting a bit. Removed unneeded include of PopupMenu.h.
3534         Made a lot more things private, including the PopupMenuClient base class, all of the virtual
3535         functions from PopupMenuClient, and the setTextFromOption function. Added updateOptionsWidth.
3536
3537         * rendering/RenderMenuList.cpp:
3538         (WebCore::RenderMenuList::setStyle): Added code to call updateOptionsWidth when the font changes.
3539         (WebCore::RenderMenuList::updateOptionsWidth): Added. Factored code out of updateFromElement.
3540         Changed to do nothing when m_optionsWidth is already correct.
3541         (WebCore::RenderMenuList::updateFromElement): Moved code to recomputed options width to the new
3542         updateOptionsWidth function.
3543         (WebCore::RenderMenuList::text): Made const.
3544
3545 2007-01-31  Oliver Hunt  <oliver@apple.com>
3546
3547         Reviewed by Adam.
3548
3549         Migrate more drag and drop logic to WebCore, start preparing
3550         to move EventHandler::handleDrag from EventHandlerMac to EventHandler 
3551
3552         * WebCore.exp:   
3553           updating methods
3554