82d43639a1e46a088302d4778dade705818c213c
[WebKit-https.git] / WebCore / ChangeLog
1 2007-03-11  Oliver Hunt  <oliver@apple.com>
2
3         Reviewed by hyatt.
4
5         Fix for <rdar://problem/5055690> ASSERTION failure on drop into 
6         editable element with content changed on drop 
7
8         After setting the selection for a drop into an editable region 
9         we make sure the we succeeded.  If we didn't we assume a focus handler
10         or similar altered the element contents and try again, if the second
11         attempt fails we bail out.
12
13         * page/DragController.cpp:
14         (WebCore::setSelectionToDragCaret):
15         (WebCore::DragController::concludeDrag):
16
17 2007-03-11  Oliver Hunt  <oliver@apple.com>
18
19         Reviewed by Adele.
20
21         Moving Frame{Mac}::respondToChangedSelection to Frame.cpp
22         Added new EditorClient method to handle old bridge function
23         
24         * bridge/EditorClient.h:
25            Added respondToChangedSelection to replace old bridge function
26         * editing/Editor.cpp:
27         (WebCore::Editor::respondToChangedSelection):
28            Add client call to replace old bridge call from Frame::respondToChangedSelection
29         * editing/SelectionController.cpp:
30         (WebCore::SelectionController::setSelection):
31            No longer directly call Editor as Frame::respondToChangedSelection
32            makes the call
33         * page/Frame.cpp:
34         (WebCore::Frame::respondToChangedSelection):
35            Moved from FrameMac, replaced bridge call with call to Editor
36         * page/mac/FrameMac.mm:
37            Moved respondToChangedSelection to Frame.cpp
38         * page/mac/WebCoreFrameBridge.h:
39            Removed respondToChangedSelection from bridge
40         * page/qt/FrameQt.cpp:
41            Remove stub method for respondToChangedSelection
42
43 2007-03-11  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
44
45         Reviewed by Brady Eidson.
46
47         Linux/gdk fix.
48
49         * loader/gdk/FrameLoaderClientGdk.cpp:
50         (WebCore::FrameLoaderClientGdk::shouldGoToHistoryItem): return true so
51         that FrameLoader:goBackOrForwards() works.
52
53 2007-03-10  Geoffrey Garen  <ggaren@apple.com>
54
55         Reviewed by Darin Adler.
56
57         Fixed <rdar://problem/4587763> PAC file: lock inversion between QT and 
58         JSCore causes a hang @ www.panoramas.dk
59         
60         See JavaScriptCore ChangeLog for details.
61         
62         * bindings/objc/WebScriptObject.mm:
63         (_didExecute): Added helpful ASSERT.
64         (+[WebScriptObject throwException:]): Added missing JSLock.
65
66 2007-03-11  Antti Koivisto  <antti@apple.com>
67
68         Reviewed by Hyatt.
69
70         Optimize linebox memory consumption:
71         - move all bitfields to baseclass compacting them
72         - make InlineTextBox::m_truncation unsigned short and make it relative to m_start
73         - remove extremely rarely used EllipsisBox pointer from RootInlineBox and instead
74           use a global hashmap to store it if needed
75         - use minimum required number of bits to store BidiStatus enum variables in RootInlineBox
76         - move overflow variables in RootInlineBox to a separate struct that is instantiated
77           only if any of the variables is set to a value that can't trivially be derived from 
78           box x, y, width and height
79           
80         As a result line box objects shrink:
81             InlineBox: 44 -> 44 bytes
82             InlineTextBox: 68 -> 60 bytes
83             InlineFlowBox: 68 -> 64 bytes
84             RootInlineBox: 128 -> 88 bytes
85             
86         The optimizations possiblity was noticed when debugging http://bugs.webkit.org/show_bug.cgi?id=12833
87         Bug 12833: REGRESSION: Selecting text in 6.6MB txt file is sluggish as of the Feb 19th nightly
88         <rdar://problem/5028159>
89         
90         On that page the patch saves 11.5MB or some 21% of linebox memory consumption. It also
91         actually improves selection performance somewhat by improving memory locality.
92
93         * rendering/InlineBox.h:
94         (WebCore::InlineBox::InlineBox):
95         * rendering/InlineFlowBox.h:
96         (WebCore::InlineFlowBox::InlineFlowBox):
97         * rendering/InlineTextBox.cpp:
98         (WebCore::InlineTextBox::placeEllipsisBox):
99         (WebCore::InlineTextBox::nodeAtPoint):
100         (WebCore::InlineTextBox::paint):
101         (WebCore::InlineTextBox::paintDecoration):
102         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
103         (WebCore::InlineTextBox::paintMarkedTextUnderline):
104         * rendering/InlineTextBox.h:
105         (WebCore::InlineTextBox::InlineTextBox):
106         * rendering/RootInlineBox.cpp:
107         (WebCore::throw):
108         (WebCore::RootInlineBox::Overflow::operator delete):
109         (WebCore::RootInlineBox::Overflow::destroy):
110         (WebCore::RootInlineBox::destroy):
111         (WebCore::RootInlineBox::detachEllipsisBox):
112         (WebCore::RootInlineBox::clearTruncation):
113         (WebCore::RootInlineBox::placeEllipsis):
114         (WebCore::RootInlineBox::paintEllipsisBox):
115         (WebCore::RootInlineBox::addHighlightOverflow):
116         (WebCore::RootInlineBox::nodeAtPoint):
117         (WebCore::RootInlineBox::adjustPosition):
118         (WebCore::RootInlineBox::selectionTop):
119         (WebCore::RootInlineBox::setLineBreakInfo):
120         (WebCore::RootInlineBox::ellipsisBox):
121         (WebCore::RootInlineBox::setVerticalOverflowPositions):
122         (WebCore::RootInlineBox::setHorizontalOverflowPositions):
123         (WebCore::RootInlineBox::setVerticalSelectionPositions):
124         * rendering/RootInlineBox.h:
125         (WebCore::RootInlineBox::RootInlineBox):
126         (WebCore::RootInlineBox::topOverflow):
127         (WebCore::RootInlineBox::bottomOverflow):
128         (WebCore::RootInlineBox::leftOverflow):
129         (WebCore::RootInlineBox::rightOverflow):
130         (WebCore::RootInlineBox::lineBreakBidiStatus):
131         (WebCore::RootInlineBox::selectionBottom):
132         (WebCore::RootInlineBox::Overflow::Overflow):
133
134 2007-03-11  Alexey Proskuryakov  <ap@webkit.org>
135
136         Reviewed by Darin.
137
138         A partial fix for http://bugs.webkit.org/show_bug.cgi?id=13021
139         XPath can be very slow
140
141         * xml/XPathExpression.cpp:
142         (WebCore::XPathExpression::evaluate): Cache evaluationContext in a local variable.
143
144         * xml/XPathExpressionNode.cpp:
145         (WebCore::XPath::Expression::evaluationContext):
146         * xml/XPathExpressionNode.h:
147         (WebCore::XPath::Expression::addSubExpression):
148         (WebCore::XPath::Expression::subExprCount):
149         (WebCore::XPath::Expression::subExpr):
150         * xml/XPathFunctions.cpp:
151         * xml/XPathFunctions.h:
152         (WebCore::XPath::Function::setName):
153         (WebCore::XPath::Function::arg):
154         (WebCore::XPath::Function::argCount):
155         (WebCore::XPath::Function::name):
156         Made one-liners critical for performance inline.
157
158         * xml/XPathGrammar.y: Fully parse NodeTests, so that strings are no longer passed for what is
159         essentially an enum. Use LocationPath accessors to add steps, instead of directly manipulating
160         internal data members.
161
162         * xml/XPathParser.cpp:
163         (WebCore::XPath::Parser::parseStatement):
164         (WebCore::XPath::Parser::registerNodeTest):
165         (WebCore::XPath::Parser::deleteNodeTest):
166         * xml/XPathParser.h:
167         Added support methods for changes in XPathGrammar.y.
168
169         * xml/XPathPath.cpp:
170         (WebCore::XPath::Filter::evaluate): Cache evaluationContext in a local variable. Use swap() to avoid
171         performing vector assignments.
172         (WebCore::XPath::LocationPath::evaluate): Use swap() to avoid performing vector assignments.
173         (WebCore::XPath::LocationPath::optimizeStepPair): This new method is called during LocationPath construction, 
174         to simplify the path as it's being built. Currently, the only optimized case is "//*" - it is a basis for
175         important operations that cannot be efficiently written in XPath 1.0, but can be optimized with a little bit
176         of XPath 2.0.
177         (WebCore::XPath::LocationPath::appendStep): A new accessor that modifies m_steps and calls optimizeStepPair().
178         (WebCore::XPath::LocationPath::insertFirstStep): Ditto.
179         * xml/XPathPath.h:
180         (WebCore::XPath::LocationPath::setAbsolute): A new accessor.
181
182         * xml/XPathStep.h:
183         (WebCore::XPath::Step::NodeTest::):
184         (WebCore::XPath::Step::NodeTest::NodeTest):
185         (WebCore::XPath::Step::NodeTest::kind):
186         (WebCore::XPath::Step::NodeTest::data):
187         Step::NodeTest is a new sub-class that represents a fully parsed NodeTest.
188         (WebCore::XPath::Step::axis):
189         (WebCore::XPath::Step::nodeTest):
190         (WebCore::XPath::Step::nodeTestData):
191         (WebCore::XPath::Step::namespaceURI):
192         (WebCore::XPath::Step::predicates):
193         (WebCore::XPath::Step::setAxis):
194         (WebCore::XPath::Step::setNodeTest):
195         (WebCore::XPath::Step::setNodeTestData):
196         (WebCore::XPath::Step::setNamespaceURI):
197         (WebCore::XPath::Step::setPredicates):
198         New accessors that let optimizeStepPair() manipulate Step data.
199
200         * xml/XPathStep.cpp:
201         (WebCore::XPath::Step::Step): Use the new NodeTest class.
202         (WebCore::XPath::Step::evaluate): Cache evaluationContext in a local variable. Use swap() to avoid
203         performing unneeded vector assignments.
204         (WebCore::XPath::Step::nodesInAxis): Cosmetic changes.
205         (WebCore::XPath::Step::nodeTestMatches): Use NodeTest instead of parsing the test from string each time.
206         Added a partial implementation of XPath 2.0 element() node test.
207
208 2007-03-10  Alexey Proskuryakov  <ap@webkit.org>
209
210         Reviewed by Darin.
211
212         http://bugs.webkit.org/show_bug.cgi?id=12249
213         FCKeditor: <hr>, <ul> and <ol> have id="undefined"
214
215         This fixes the attached reduction, but not the original issue.
216
217         Test: editing/execCommand/default-parameters.html
218
219         * dom/Document.h:
220         * dom/Document.idl:
221         Make second and third execCommand() parameters optional.
222
223 2007-03-10  Adele Peterson  <adele@apple.com>
224
225         Reviewed by Maciej.
226
227         Fix for http://bugs.webkit.org/show_bug.cgi?id=13028
228         REGRESSION: textField:doCommandBySelector:inFrame: not being called properly
229
230         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
231           Before calling the base class defaultEventHandler, which will call handleKeypress, call doTextFieldCommandFromEvent.        
232
233 2007-03-10  Mitz Pettel  <mitz@webkit.org>
234
235         Reviewed by Darin.
236
237         - fix http://bugs.webkit.org/show_bug.cgi?id=13013
238           REGRESSION: Selection box does not scroll to where the focus jumps when pressing an alphanumeric key
239
240         Test: fast/forms/listbox-typeahead-scroll.html
241
242         * html/HTMLSelectElement.cpp:
243         (WebCore::HTMLSelectElement::setSelectedIndex): Reordered to set the active selection's
244         anchor and end before selecting the option, since the active selection is used to
245         decide where to scroll when the selection is made.
246         (WebCore::HTMLSelectElement::defaultEventHandler): Removed redundant check.
247
248 2007-03-10  Mitz Pettel  <mitz@webkit.org>
249
250         Reviewed by Darin.
251
252         - fix http://bugs.webkit.org/show_bug.cgi?id=12973
253           REGRESSION: Reproducible assert while loading this test file if css is already in the cache
254
255         Test: fast/dom/css-cached-import-rule.html
256
257         Replaced some direct calls to document->stylesheetLoaded() with calls to
258         the sheet's checkLoaded(). The latter calls back to the element's sheetLoaded() --
259         which notifies the document of the load -- and then updates the sheet's
260         loadCompleted() flag, ensuring that it stays in sync with whether the stylesheet
261         is still considered pending by the document.
262
263         * dom/ProcessingInstruction.cpp:
264         (WebCore::ProcessingInstruction::parseStyleSheet):
265         * dom/StyleElement.cpp:
266         (WebCore::StyleElement::childrenChanged):
267         * html/HTMLLinkElement.cpp:
268         (WebCore::HTMLLinkElement::process):
269         (WebCore::HTMLLinkElement::setCSSStyleSheet):
270         * ksvg2/svg/SVGStyleElement.cpp:
271         (WebCore::SVGStyleElement::sheetLoaded):
272         * ksvg2/svg/SVGStyleElement.h:
273
274 2007-03-10  David Kilzer  <ddkilzer@webkit.org>
275
276         Reviewed by Darin.
277
278         - fix http://bugs.webkit.org/show_bug.cgi?id=9609
279           REGRESSION: Missing image icon needs to be moved back to WebKit
280
281         * WebCore.exp: Export WebCore::Image::loadPlatformResource(const char*) for use in
282         [WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:].
283
284 2007-03-09  Darin Adler  <darin@apple.com>
285
286         Reviewed by Justin.
287
288         - fix http://bugs.webkit.org/show_bug.cgi?id=8928
289           <rdar://problem/5045708> REPRODUCIBLE ASSERT: Cannot paste HTML into a
290           contenteditable region in an XHTML document (8928)
291
292         Test: editing/pasteboard/paste-xml.xhtml
293
294         * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Added a check for 0
295         here, since createContextualFragment can return 0 for XML documents that fail
296         to parse. In my testing, callers all seem equipped to handle 0.
297
298 2007-03-09  Mitz Pettel  <mitz@webkit.org>
299
300         Reviewed by Darin.
301
302         - fix http://bugs.webkit.org/show_bug.cgi?id=9929
303           REGRESSION: crash on logging in on mijnpostbank.nl
304
305         Test: http/tests/misc/onload-remove-iframe-crash-2.html
306
307         The resulted from an iframe's load event handler removing the iframe
308         from the document.
309
310         * dom/Document.cpp:
311         (WebCore::Document::implicitClose): Bail out early if an event handler
312         removed the frame.
313         * loader/FrameLoader.cpp:
314         (WebCore::FrameLoader::FrameLoader):
315         (WebCore::FrameLoader::clear):
316         (WebCore::FrameLoader::checkCompleted): Protect the frame from deletion
317         by event handlers.
318         (WebCore::FrameLoader::checkCompletedTimerFired):
319         (WebCore::FrameLoader::scheduleCheckCompleted):
320         (WebCore::FrameLoader::detachFromParent): Schedule a completion check
321         on the parent (in case the child is what has been keeping it from completing).
322         * loader/FrameLoader.h:
323
324 2007-03-08  David Kilzer  <ddkilzer@webkit.org>
325
326         Reviewed by Beth.
327
328         - fix http://bugs.webkit.org/show_bug.cgi?id=13019
329           REGRESSION (r20074): Forms don't submit on a variety of websites
330
331         No tests added since LayoutTests/fast/forms/document-write.html was timing out
332         and causing a layout test failure.
333
334         * html/HTMLFormElement.cpp:
335         (WebCore::HTMLFormElement::submit): Removed stray code.
336
337 2007-03-08  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
338
339         Not reviewed - gdk build fix.
340
341         * platform/graphics/cairo/ImageSourceCairo.cpp:
342         (WebCore::ImageSource::frameIsCompleteAtIndex): add empty stub
343
344 2007-03-08  Justin Garcia  <justin.garcia@apple.com>
345
346         Reviewed by harrison
347         
348         <rdar://problem/4903193> 
349         On particular page, Copy is so slow it seems like a hang
350         
351         ~2x speedup copying:
352         http://shakespeare.mit.edu/henryviii/full.html 
353         Also produces less bloated markup.
354
355         * editing/markup.cpp:
356         (WebCore::startMarkup): Don't wrap text nodes in style spans.
357         For Elements, don't inline styles inherited from ancestors.
358         (WebCore::createMarkup): No longer necessary to find 
359         the root's default style and pass it to startMarkup.
360         Add a wrapper span around the markup with the styles
361         that all nodes in the markup inherit (the inheritable 
362         styles from the common ancestor container's computed style).
363         Added a FIXME about unecessary markup for inline ancestors 
364         up to the commonAncestorBlock.
365
366 2007-03-08  Darin Adler  <darin@apple.com>
367
368         Reviewed by Adele.
369
370         - <rdar://problem/4470381> multipart/form-data boundary security vulnerability
371
372         By making the form data boundary a string with some random data in it, we reduce
373         the possibility that anyone could take advantage of it by creating a file that
374         intentionally has the boundary string in it.
375
376         * html/HTMLFormElement.h: Removed boundary(), setBoundary(), and m_boundary.
377         Marked a lot more stuff private.
378         * html/HTMLFormElement.cpp:
379         (WebCore::HTMLFormElement::HTMLFormElement): Removed code to initialize
380         m_boundary.
381         (WebCore::randomNumber): Added. Function that returns a random number, including
382         seeding the random number generator the first time it's called. For now, usees the more
383         random function random() on Mac OS X and the more-standard rand() on other platforms.
384         (WebCore::HTMLFormElement::formData): Take a parameter with the form boundary string,
385         and use that instead of m_boundary.
386         (WebCore::getUniqueBoundaryString): Added. Makes a boundary string using random numbers
387         and base 64 encoding.
388         (WebCore::HTMLFormElement::submit): Call getUniqueBoundaryString and pass the boundary
389         string into formData for multipart form posts.
390
391 2007-03-08  Maciej Stachowiak  <mjs@apple.com>
392
393         Reviewed by Adele.
394         
395         <rdar://problem/4646563> REGRESSION: Unable to send text message from Verizon text message website: vtext.com (12588)
396         http://bugs.webkit.org/show_bug.cgi?id=12588
397
398         Carefully revised which focus operations restore previous selection, which clear it, and which
399         select the whole control contents.
400         
401         Tests:
402         fast/forms/focus-selection-input.html
403         fast/forms/focus-selection-textarea.html
404         
405         * dom/Element.cpp:
406         (WebCore::Element::focus):
407         * dom/Element.h:
408         * html/HTMLInputElement.cpp:
409         (WebCore::HTMLInputElement::focus):
410         (WebCore::HTMLInputElement::accessKeyAction):
411         * html/HTMLInputElement.h:
412         * html/HTMLLabelElement.cpp:
413         (WebCore::HTMLLabelElement::focus):
414         (WebCore::HTMLLabelElement::accessKeyAction):
415         * html/HTMLLabelElement.h:
416         * html/HTMLLegendElement.cpp:
417         (WebCore::HTMLLegendElement::focus):
418         * html/HTMLLegendElement.h:
419         * html/HTMLTextAreaElement.cpp:
420         (WebCore::HTMLTextAreaElement::focus):
421         * html/HTMLTextAreaElement.h:
422         * page/FocusController.cpp:
423         (WebCore::FocusController::advanceFocus):
424
425 2007-03-08  Justin Garcia  <justin.garcia@apple.com>
426
427         Reviewed by harrison
428
429         <http://bugs.webkit.org/show_bug.cgi?id=12244>
430         FCKeditor: Find dialog doesn't work
431
432         * bindings/js/kjs_window.cpp:
433         (KJS::Window::find): Added.  This function doesn't yet 
434         support whole word searches, searching in subframes, or
435         opening the find dialog.
436         (KJS::WindowFunc::callAsFunction):
437         * bindings/js/kjs_window.h:
438         (KJS::Window::):
439
440 2007-03-08  David Hyatt  <hyatt@apple.com>
441
442         Fix regression from throwing away frames of large animated images.  Alter
443         animated images so that they refuse to advance the animation until the
444         current displayed frame has been fully decoded.
445
446         Reviewed by ggaren
447
448         * platform/graphics/BitmapImage.cpp:
449         (WebCore::BitmapImage::startAnimation):
450         (WebCore::BitmapImage::advanceAnimation):
451         * platform/graphics/ImageSource.h:
452         * platform/graphics/cg/ImageSourceCG.cpp:
453         (WebCore::ImageSource::frameIsCompleteAtIndex):
454
455 2007-03-08  David Hyatt  <hyatt@apple.com>
456
457         Fix 2% performance regression on the PLT.  Increase the large animated
458         image cutoff from 1MB to 5MB.
459
460         In addition when pruning we will aggressively discard image sources.
461
462         Reviewed by ggaren
463
464         * platform/graphics/BitmapImage.cpp:
465         (WebCore::BitmapImage::destroyDecodedData):
466
467 2007-03-08  Timothy Hatcher  <timothy@apple.com>
468
469         Reviewed by John.
470
471         <rdar://problem/4664697> highlighter SPI needs a node parameter to give more context
472
473         Pass the RenderObject's node to customHighlightLineRect and paintCustomHighlight.
474
475         * page/Frame.h:
476         * page/mac/FrameMac.mm:
477         (WebCore::Frame::customHighlightLineRect):
478         (WebCore::Frame::paintCustomHighlight):
479         * page/mac/WebCoreFrameBridge.h:
480         * rendering/InlineTextBox.cpp:
481         (WebCore::InlineTextBox::paintCustomHighlight):
482         * rendering/RenderBox.cpp:
483         (WebCore::RenderBox::paintCustomHighlight):
484         * rendering/RootInlineBox.cpp:
485         (WebCore::RootInlineBox::addHighlightOverflow):
486         (WebCore::RootInlineBox::paintCustomHighlight):
487
488 2007-03-08  Justin Garcia  <justin.garcia@apple.com>
489
490         Reviewed by harrison
491         
492         <http://bugs.webkit.org/show_bug.cgi?id=13000>
493         Range.createContextualFragment is not supported
494
495         * dom/Range.cpp:
496         (WebCore::Range::createContextualFragment): The
497         "startContainer" may not be a container, if the
498         range starts inside text.  In that case, look
499         to the parent of the start node for an HTMLElement.
500
501 2007-03-08  Justin Garcia  <justin.garcia@apple.com>
502
503         Reviewed by harrison
504         
505         <rdar://problem/5049671>
506         Gmail Editor: With linked text, Remove Formatting doesn't always remove underline
507
508         * editing/Editor.cpp:
509         (WebCore::Editor::removeFormattingAndStyle): Clear removed
510         anchors after the deletion.
511
512 2007-03-08  David Kilzer  <ddkilzer@webkit.org>
513
514         Reviewed by NOBODY (build fix).
515
516         Added missing file for r20059:
517         <rdar://problem/4708689> -- REGRESSION: Some symbols with 2-byte display as garbage in Hotmail.
518
519         File was taken from this svn repository which contained versions of ucnv.h and ucnv_err.h
520         that were identical to ours:
521         http://source.icu-project.org/repos/icu/icu/tags/release-3-2/source/common/unicode/ucnv_cb.h
522
523         * icu/unicode/ucnv_cb.h: Added.
524
525 2007-03-08  Shrikant Gangoda  <shrikant.gangoda@celunite.com>
526
527         Gdk build fix.
528
529         * platform/graphics/cairo/ImageSourceCairo.cpp:
530         (WebCore::ImageSource::~ImageSource):
531         (WebCore::ImageSource::clear):
532
533 2007-03-08  Oliver Hunt  <oliver@apple.com>
534
535         Reviewed by Adam.
536
537         To match old TEC behaviour when using ICU we need to use 
538         a few manual fallback encodings for the GBK/EUC-CN charsets
539
540         <rdar://problem/4708689> -- REGRESSION: Some symbols with 2-byte display as garbage in Hotmail.
541
542         * platform/TextCodecICU.cpp:
543         (WebCore::TextCodecICU::TextCodecICU):
544         (WebCore::TextCodecICU::createICUConverter):
545         (WebCore::gbkEscapes):
546         (WebCore::gbkCallbackEscape):
547         (WebCore::gbkCallbackSubstitute):
548         (WebCore::TextCodecICU::encode):
549         * platform/TextCodecICU.h:
550         (WebCore::TextCodecICU::needsGBKFallbacks):
551         (WebCore::TextCodecICU::setNeedsGBKFallbacks):
552
553 2007-03-08  Alexey Proskuryakov  <ap@webkit.org>
554
555         Build fix.
556
557         * xml/XPathUtil.cpp:
558         (WebCore::XPath::stringValue):
559
560 2007-03-08  David Hyatt  <hyatt@apple.com>
561
562         This patch dramatically reduces the memory consumed by animated images.  For large animated GIFs (defined for
563         now as >1mb in terms of decoded frame buffer size), we will now aggressively flush previous frames of the
564         animated GIF and just re-decode them on the fly if the animation loops.
565
566         Whenever a large animated GIF has its animation reset, we will also just throw out everything and start
567         the animation over (in order to get rid of any cached detritus held in the ImageSource).
568
569         With this patch and the sample GIF used to test, WebKit's memory consumption went from 160MB down to 16MB.
570
571         Reviewed by mjs
572
573         * platform/graphics/BitmapImage.cpp:
574         (WebCore::BitmapImage::destroyDecodedData):
575         (WebCore::BitmapImage::resetAnimation):
576         (WebCore::BitmapImage::advanceAnimation):
577         * platform/graphics/ImageSource.h:
578         * platform/graphics/cg/ImageSourceCG.cpp:
579         (WebCore::ImageSource::~ImageSource):
580         (WebCore::ImageSource::clear):
581
582 2007-03-08  Alexey Proskuryakov  <ap@webkit.org>
583
584         Reviewed by Darin.
585
586         http://bugs.webkit.org/show_bug.cgi?id=13006
587         XPath string-value is broken for some node types
588
589         Test: fast/xpath/string-value.html
590
591         * xml/XPathUtil.cpp:
592         (WebCore::XPath::stringValue): Fix it :-)
593
594 2007-03-07  Anders Carlsson  <acarlsson@apple.com>
595
596         Reviewed by Adam.
597
598         <rdar://problem/4981000> 
599         http://bugs.webkit.org/show_bug.cgi?id=12634
600         REGRESSION: crash loading web archive (12634)
601         
602         The reason this bug wasn't always reproducible is that it involved sending an event to a plugin while 
603         the page was loading. Before we send the event to the plugin we defer loads. The problem was that
604         MainResourceLoader::setDefersLoad would not work with data loads.
605         
606         * loader/DocumentLoader.cpp:
607         (WebCore::DocumentLoader::setRequest):
608         Only set m_committed to false if we also have a valid unreachable URL.
609         
610         * loader/MainResourceLoader.cpp:
611         (WebCore::MainResourceLoader::setDefersLoading):
612         Make sure to stop and start data loads.
613
614 2007-03-07  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
615
616         Not reviewed.
617
618         Gdk build fixes.
619
620         * platform/gdk/EditorClientGdk.cpp:
621         (WebCore::EditorClientGdk::handleKeypress): renamed
622         (WebCore::EditorClientGdk::handleInputMethodKeypress): add a stub
623         * platform/gdk/EditorClientGdk.h:
624         * platform/graphics/cairo/ImageSourceCairo.cpp:
625         (WebCore::ImageSource::destroyFrameAtIndex): add a stub
626
627 2007-03-07  Alexey Proskuryakov  <ap@webkit.org>
628
629         Reviewed by Darin.
630
631         http://bugs.webkit.org/show_bug.cgi?id=13004
632         Repeatedly calling XPathExpression.evaluate() causes crashes or memory leaks
633
634         Removed XPath::Expression::optimize() and related methods, since they were buggy and almost useless.
635         Merged doEvaluate() into evaluate(), since this was all evaluate() was doing after the above changes.
636
637         Test: fast/xpath/evaluate-twice.html
638
639         * xml/XPathExpression.cpp:
640         (WebCore::XPathExpression::evaluate):
641         * xml/XPathExpressionNode.cpp:
642         (WebCore::XPath::Expression::Expression):
643         (WebCore::XPath::Expression::~Expression):
644         * xml/XPathExpressionNode.h:
645         * xml/XPathFunctions.cpp:
646         (WebCore::XPath::FunLast::evaluate):
647         (WebCore::XPath::FunPosition::evaluate):
648         (WebCore::XPath::FunId::evaluate):
649         (WebCore::XPath::FunLocalName::evaluate):
650         (WebCore::XPath::FunNamespaceURI::evaluate):
651         (WebCore::XPath::FunName::evaluate):
652         (WebCore::XPath::FunCount::evaluate):
653         (WebCore::XPath::FunString::evaluate):
654         (WebCore::XPath::FunConcat::evaluate):
655         (WebCore::XPath::FunStartsWith::evaluate):
656         (WebCore::XPath::FunContains::evaluate):
657         (WebCore::XPath::FunSubstringBefore::evaluate):
658         (WebCore::XPath::FunSubstringAfter::evaluate):
659         (WebCore::XPath::FunSubstring::evaluate):
660         (WebCore::XPath::FunStringLength::evaluate):
661         (WebCore::XPath::FunNormalizeSpace::evaluate):
662         (WebCore::XPath::FunTranslate::evaluate):
663         (WebCore::XPath::FunBoolean::evaluate):
664         (WebCore::XPath::FunNot::evaluate):
665         (WebCore::XPath::FunTrue::evaluate):
666         (WebCore::XPath::FunLang::evaluate):
667         (WebCore::XPath::FunFalse::evaluate):
668         (WebCore::XPath::FunNumber::evaluate):
669         (WebCore::XPath::FunSum::evaluate):
670         (WebCore::XPath::FunFloor::evaluate):
671         (WebCore::XPath::FunCeiling::evaluate):
672         (WebCore::XPath::FunRound::evaluate):
673         * xml/XPathPath.cpp:
674         (WebCore::XPath::Filter::evaluate):
675         (WebCore::XPath::LocationPath::evaluate):
676         (WebCore::XPath::Path::evaluate):
677         * xml/XPathPath.h:
678         * xml/XPathPredicate.cpp:
679         (WebCore::XPath::Number::evaluate):
680         (WebCore::XPath::StringExpression::evaluate):
681         (WebCore::XPath::Negative::evaluate):
682         (WebCore::XPath::NumericOp::evaluate):
683         (WebCore::XPath::EqTestOp::evaluate):
684         (WebCore::XPath::LogicalOp::evaluate):
685         (WebCore::XPath::Union::evaluate):
686         * xml/XPathPredicate.h:
687         * xml/XPathStep.cpp:
688         * xml/XPathStep.h:
689         * xml/XPathVariableReference.cpp:
690         (WebCore::XPath::VariableReference::evaluate):
691         * xml/XPathVariableReference.h:
692
693 2007-03-07  Sam Weinig  <sam@webkit.org>
694
695         Reviewed by Tim H.
696
697         Remove unused #import from Objective-C bindings and cleanup the order of #imports.
698
699         * bindings/scripts/CodeGeneratorObjC.pm:
700
701 2007-03-07  Sam Weinig  <sam@webkit.org>
702
703         Reviewed by Tim H.
704
705         Make sure the baseURI attribute generates for private Objective-C bindings.
706
707         * dom/Node.idl:
708
709 2007-03-07  Anders Carlsson  <acarlsson@apple.com>
710
711         Reviewed by Maciej.
712
713         <rdar://problem/4874059>
714         REGRESSION: Painter IX:register - Crash in WebCore:: ResourceLoader::willSendRequest()
715
716         If a load is done from inside of an error delegate method that is called because we cancel another load, 
717         the first load should be ignored since this is what shipping WebKit does. 
718         
719         (Actually, it does load the page in the data source but doesn't do anything with it since the data source
720         won't have a web frame).
721         
722         * loader/FrameLoader.cpp:
723         (WebCore::FrameLoader::load):
724         Just bail out if m_isStoppingLoad is true.
725
726 2007-03-07  David Hyatt  <hyatt@apple.com>
727
728         Use CGImageRelease instead of CFRelease.
729
730         Reviewed by aroben
731
732         * platform/graphics/cg/ImageCG.cpp:
733         (WebCore::FrameData::clear):
734         * platform/graphics/cg/ImageSourceCG.cpp:
735         (WebCore::ImageSource::destroyFrameAtIndex):
736
737 2007-03-07  David Hyatt  <hyatt@apple.com>
738
739         Fix a regression where the cache size overflows because of a double
740         subtraction per resource when they got removed from the cache.  Add an
741         assert to adjustSize to detect this case in the future.
742
743         Fix ImageSourceCG so that when we flush decoded data from our cache that
744         we also flush it from the ImageSource.
745
746         Reviewed by mjs
747
748         * loader/Cache.cpp:
749         (WebCore::Cache::adjustSize):
750         * platform/graphics/BitmapImage.cpp:
751         (WebCore::BitmapImage::~BitmapImage):
752         (WebCore::BitmapImage::destroyDecodedData):
753         * platform/graphics/Image.h:
754         * platform/graphics/ImageSource.h:
755         * platform/graphics/cg/ImageSourceCG.cpp:
756         (WebCore::ImageSource::setData):
757         (WebCore::ImageSource::destroyFrameAtIndex):
758
759 2007-03-07  Mitz Pettel  <mitz@webkit.org>
760
761         Reviewed by Darin.
762
763         - fix http://bugs.webkit.org/show_bug.cgi?id=13002
764           Incomplete repaint of inset outlines
765
766         Test: fast/repaint/outline-inset.html
767
768         * rendering/RenderObject.cpp:
769         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
770
771 2007-03-07  Oliver Hunt  <oliver@apple.com>
772
773         Reviewed by Antti.
774
775         Reset mouse down/drag state variables on mouse button release
776         
777         Fixes <rdar://problem/5044654>: Drag out of some QuickTime plug-ins converting into image drag
778
779         * page/EventHandler.cpp:
780         (WebCore::EventHandler::handleMouseReleaseEvent):
781
782 2007-03-07  Adele Peterson  <adele@apple.com>
783
784         Reviewed by Darin.
785
786         WebCore part of fix for:
787         http://bugs.webkit.org/show_bug.cgi?id=10871
788         http://bugs.webkit.org/show_bug.cgi?id=12677
789         <rdar://problem/4823129> REGRESSION: IME key events different in nightly
790         <rdar://problem/4759563> REGRESSION: Return key is always sent when you confirm a clause in kotoeri
791
792         * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler): Call handleInputMethodKeypress before actually dispatching the keypress event
793           so that input methods have a chance to handle the event.  
794           If the input method handles the event (by marking or unmarking text), then we don't need to send the keypress event.
795           If an input method doesn't handle the event, then we'll save the data we need to perform the correct action (like what text to insert or what selector to use) 
796           when we dispatch the keypress event.
797
798         * dom/KeyboardEvent.h: Added Mac-specific KeypressCommand struct, so we can store command info during handleInputMethodKeypress, and use it during handleKeypress.
799         (WebCore::KeyboardEvent::keypressCommand):
800         (WebCore::KeyboardEvent::setKeypressCommand):
801
802         * bridge/EditorClient.h:
803         * editing/Editor.cpp:
804         (WebCore::Editor::handleKeypress): Changed handleKeyPress to handleKeypress.
805         (WebCore::Editor::handleInputMethodKeypress): Added.
806         * editing/Editor.h:
807
808         * platform/graphics/svg/SVGImageEmptyClients.h:
809         (WebCore::SVGEmptyEditorClient::handleKeypress): Changed handleKeyPress to handleKeypress.
810         (WebCore::SVGEmptyEditorClient::handleInputMethodKeypress): Added.
811
812 2007-03-07  Rob Buis  <buis@kde.org>
813
814         Reviewed by Darin.
815
816         http://bugs.webkit.org/show_bug.cgi?id=12579
817         WebKit fails SVG xml:base test
818
819         Implement DOM3 properties baseURI and documentURI to fix
820         the testcase in bug 12579.
821
822         * bindings/js/kjs_dom.cpp:
823         (KJS::DOMNode::getValueProperty):
824         * bindings/js/kjs_domnode.h:
825         (KJS::DOMNode::):
826         * dom/Document.cpp:
827         (WebCore::Document::documentURI):
828         (WebCore::Document::setDocumentURI):
829         (WebCore::Document::baseURI):
830         * dom/Document.h:
831         * dom/Document.idl:
832         * dom/DocumentType.cpp:
833         (WebCore::DocumentType::baseURI):
834         * dom/DocumentType.h:
835         * dom/Element.cpp:
836         (WebCore::Element::baseURI):
837         * dom/Element.h:
838         * dom/Node.cpp:
839         (WebCore::Node::baseURI):
840         * dom/Node.h:
841         * ksvg2/misc/SVGImageLoader.cpp:
842         (WebCore::SVGImageLoader::updateFromElement):
843         * ksvg2/svg/SVGImageElement.cpp:
844         (WebCore::SVGImageElement::parseMappedAttribute):
845         (WebCore::SVGImageElement::attach):
846
847 2007-03-07  Anders Carlsson  <acarlsson@apple.com>
848
849         Reviewed by Brady.
850
851         Remove some methods in FrameLoader that just calls down to the active document loader. Since each
852         resource loader now has a pointer to its document loader, we can just call directly to the
853         document loader.
854
855         * WebCore.exp:
856         * loader/FrameLoader.cpp:
857         * loader/FrameLoader.h:
858         * loader/MainResourceLoader.cpp:
859         (WebCore::MainResourceLoader::willSendRequest):
860         (WebCore::MainResourceLoader::didReceiveResponse):
861         * loader/SubresourceLoader.cpp:
862         (WebCore::SubresourceLoader::SubresourceLoader):
863         (WebCore::SubresourceLoader::didFinishLoading):
864         (WebCore::SubresourceLoader::didFail):
865         (WebCore::SubresourceLoader::didCancel):
866         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
867         (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
868         (WebCore::NetscapePlugInStreamLoader::didFail):
869         (WebCore::NetscapePlugInStreamLoader::didCancel):
870
871 2007-03-06  Geoffrey Garen  <ggaren@apple.com>
872
873         Reviewed by Maciej Stachowiak.
874         
875         Fixed <rdar://problem/4576242> | http://bugs.webkit.org/show_bug.cgi?id=12586
876         PAC file: malloc deadlock sometimes causes a hang @ www.apple.com/pro/profiles/ (12586)
877         
878         No test because this is very difficult to repro, and the new ASSERTs in 
879         JavaScriptCore catch the underlying cause while running normal layout tests.
880         
881         This is a modified version of r14752 on the branch.
882         
883         The fix is to use a bit inside each node, instead of a hash table, to track 
884         which node subtrees are in the process of being marked. This avoids a call 
885         to malloc inside mark().
886         
887         * bindings/js/kjs_binding.cpp:
888         (KJS::domObjects):
889         (KJS::domNodesPerDocument):
890         * bindings/js/kjs_dom.cpp:
891         (KJS::DOMNode::mark):
892         * dom/Node.cpp:
893         (WebCore::Node::Node):
894         * dom/Node.h:
895
896 2007-03-06  David Hyatt  <hyatt@apple.com>
897
898         This patch reworks the WebCore memory cache to significantly reduce the amount of memory consumed by
899         images in the cache and to enhance the accuracy of the cache size as an absolute bound for the objects
900         contained within it.  WebCore's memory use over time should significantly improve as a result of these
901         changes.
902
903         Cached resources now have both an encoded size (the original data stream) and a decoded size (an estimate of
904         the amount of memory consumed by an expanded version of that resource, e.g., the decoded frames of an image).
905         Both sizes now count towards the total size of the object and towards the allowed memory cache total.
906
907         By including both totals the reported size of resources will now be larger, and the cache will therefore become
908         much more aggressive about flushing.
909
910         Objects are stored in size-adjusted and popularity-aware LRU lists as before, but encoded size is now always
911         used when determining the correct LRU list.
912
913         The flush algorithm for the memory cache has been rewritten to first destroy decoded data before evicting
914         resources.  By being able to compact its resources without evicting them, the memory cache can now hold many more
915         unique resources (encoded) in the same amount of space.  Depending on how much of a hit we want to take from
916         re-decoding images, the memory cache could in theory have its size significantly reduced now while still holding
917         more resources than it did at the larger size!
918
919         Reviewed by mjs
920
921         * WebCore.xcodeproj/project.pbxproj:
922         * loader/Cache.cpp:
923         (WebCore::Cache::requestResource):
924         (WebCore::Cache::prune):
925         (WebCore::Cache::remove):
926         (WebCore::Cache::lruListFor):
927         (WebCore::Cache::adjustSize):
928         * loader/Cache.h:
929         * loader/CachedCSSStyleSheet.cpp:
930         (WebCore::CachedCSSStyleSheet::data):
931         * loader/CachedImage.cpp:
932         (WebCore::CachedImage::CachedImage):
933         (WebCore::CachedImage::allReferencesRemoved):
934         (WebCore::CachedImage::clear):
935         (WebCore::CachedImage::data):
936         (WebCore::CachedImage::destroyDecodedData):
937         (WebCore::CachedImage::decodedSize):
938         (WebCore::CachedImage::decodedSizeChanged):
939         (WebCore::CachedImage::shouldPauseAnimation):
940         * loader/CachedImage.h:
941         * loader/CachedResource.cpp:
942         (WebCore::CachedResource::CachedResource):
943         (WebCore::CachedResource::deref):
944         (WebCore::CachedResource::setEncodedSize):
945         * loader/CachedResource.h:
946         (WebCore::CachedResource::allReferencesRemoved):
947         (WebCore::CachedResource::size):
948         (WebCore::CachedResource::encodedSize):
949         (WebCore::CachedResource::decodedSize):
950         (WebCore::CachedResource::destroyDecodedData):
951         * loader/CachedScript.cpp:
952         (WebCore::CachedScript::data):
953         * loader/CachedXSLStyleSheet.cpp:
954         (WebCore::CachedXSLStyleSheet::data):
955         * platform/graphics/BitmapImage.cpp:
956         (WebCore::BitmapImage::BitmapImage):
957         (WebCore::BitmapImage::~BitmapImage):
958         (WebCore::BitmapImage::destroyDecodedData):
959         (WebCore::BitmapImage::pruneDecodedDataIfNeeded):
960         (WebCore::BitmapImage::cacheFrame):
961         (WebCore::BitmapImage::setNativeData):
962         (WebCore::BitmapImage::shouldAnimate):
963         (WebCore::BitmapImage::advanceAnimation):
964         * platform/graphics/BitmapImage.h:
965         (WebCore::BitmapImage::decodedSize):
966         * platform/graphics/Image.cpp:
967         (WebCore::Image::Image):
968         * platform/graphics/Image.h:
969         (WebCore::Image::destroyDecodedData):
970         (WebCore::Image::decodedSize):
971         (WebCore::Image::imageObserver):
972         * platform/graphics/ImageAnimationObserver.h: Removed.
973         * platform/graphics/ImageObserver.h: Added.
974         (WebCore::ImageObserver::~ImageObserver):
975         * platform/graphics/svg/SVGImage.cpp:
976         (WebCore::SVGImage::SVGImage):
977         * platform/graphics/svg/SVGImage.h:
978
979 2007-03-06  Alexey Proskuryakov  <ap@webkit.org>
980
981         Reviewed by Sam Weinig.
982
983         http://bugs.webkit.org/show_bug.cgi?id=12987
984         Fix and import 4XPath test_numeric_expr.html
985
986         * xml/XPathPredicate.cpp:
987         (WebCore::XPath::Negative::doEvaluate): Convert the argument to number.
988         (WebCore::XPath::NumericOp::doEvaluate): Convert the arguments to numbers. Use a correct operation for mod.
989         * xml/XPathStep.cpp:
990         (WebCore::XPath::Step::nodesInAxis): Do not append parent node if there is none.
991         * xml/XPathValue.cpp:
992         (WebCore::XPath::Value::toNumber): Do not convert to DeprecatedString just to trim whitespace and to convert to double.
993         * platform/DeprecatedString.cpp:
994         (WebCore::DeprecatedStringData::makeAscii): Added a FIXME about unreliable makeAscii() behavior.
995
996 2007-03-06  Maciej Stachowiak  <mjs@apple.com>
997
998         Reviewed by Adele.
999
1000         <rdar://problem/4619663> REGRESSION (NativePopup): Popup menu doesn't draw at the correct vertical position (9816)
1001         
1002         * platform/mac/PopupMenuMac.mm:
1003         (WebCore::PopupMenu::show): Make a temporary dummy view with the
1004         passed in rect, since AppKit will use the view bounds to determine
1005         what area to exclude when popping up a menu moved to the top of
1006         the screen.
1007
1008 2007-03-06  Geoffrey Garen  <ggaren@apple.com>
1009
1010         Reviewed by Maciej Stachowiak.
1011
1012         Fixed all known crashers exposed by run-webkit-tests --threaded [*]. See 
1013         JavaScriptCore ChangeLog for more details.
1014
1015         * bindings/js/kjs_binding.cpp:
1016         (KJS::domNodesPerDocument): Added thread safety ASSERT.
1017         (KJS::ScriptInterpreter::mark): Removed obsolete logic for marking unsafe
1018         objects when collecting on a secondary thread. The Collector takes care
1019         of this now.
1020
1021         * bindings/js/kjs_binding.h:
1022         (KJS::DOMObject::DOMObject): Used new API for specifying that WebCore
1023         objects should be garbage collected on the main thread only.
1024
1025         * bindings/js/kjs_window.cpp:
1026         (KJS::ScheduledAction::execute): Moved JSLock to cover implementedsCall() call,
1027         which, for some subclasses, ends up allocating garbage collected objects.
1028         (This fix was speculative. I didn't actually see a crash from this.)
1029         (KJS::Window::timerFired): Added JSLock around ScheduleAction destruction,
1030         since it destroys a KJS::List.
1031
1032         * bindings/objc/WebScriptObject.mm:
1033         (-[WebScriptObject setException:]): Added JSLock. (This fix was speculative. 
1034         I didn't actually see a crash from this.)
1035
1036         * bridge/mac/WebCoreScriptDebugger.mm:
1037         (-[WebCoreScriptCallFrame evaluateWebScript:]): Added JSLock. (This fix 
1038         was speculative. I didn't actually see a crash from this.)
1039
1040         * dom/Document.cpp:
1041         (WebCore::Document::~Document): Added JSLock around modification to 
1042         domNodesPerDocument(), which can be accessed concurrently during garbage 
1043         collection.
1044         * dom/Node.cpp:
1045         (WebCore::Node::setDocument): ditto.
1046         
1047         [*] fast/js/toString-stack-overflow.html is an exception. --threaded mode
1048         crashes this test because it causes the garbage collector to run frequently,
1049         and this test crashes if you happen to garbage collect while it's running.
1050         This is a known issue with stack overflow during the mark phase. It's
1051         not related to threading.
1052
1053 2007-03-06  Mark Rowe  <mrowe@apple.com>
1054
1055         Reviewed by Sam Weinig.
1056
1057         Fix http://bugs.webkit.org/show_bug.cgi?id=12942
1058         Bug 12942: ASSERTION FAILURE: qantas.com.au changing selected item in <select> via JS
1059
1060         Test: fast/dom/select-selectedIndex-bug-12942.html.
1061
1062         * html/HTMLSelectElement.cpp:
1063         (WebCore::HTMLSelectElement::recalcListItems): Reset m_lastOnChangeIndex when recalculating list items.
1064         * html/HTMLSelectElement.h:
1065
1066 2007-03-06  Brady Eidson  <beidson@apple.com>
1067
1068         Rubberstamped by Kevin Decker
1069
1070         20,000!
1071
1072         * ChangeLog: Point out revision 20,000
1073
1074 2007-03-06  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1075
1076         Not reviewed.
1077
1078         Gdk build fix.
1079
1080         * loader/gdk/FrameLoaderClientGdk.cpp: update userAgent() signature.
1081         (WebCore::FrameLoaderClientGdk::userAgent):
1082         * loader/gdk/FrameLoaderClientGdk.h: ditto.
1083
1084 2007-03-06  Mitz Pettel  <mitz@webkit.org>
1085
1086         Reviewed by Adele.
1087
1088         - fix http://bugs.webkit.org/show_bug.cgi?id=12986
1089           REGRESSION(NativeListBox): Listboxes not updated when resized dynamically
1090
1091         Test: fast/forms/select-change-listbox-size.html
1092
1093         * html/HTMLSelectElement.cpp:
1094         (WebCore::HTMLSelectElement::parseMappedAttribute): Reattach on list box size change.
1095
1096 2007-03-06  Mitz Pettel  <mitz@webkit.org>
1097
1098         Reviewed by Dave Hyatt.
1099
1100         - fix http://bugs.webkit.org/show_bug.cgi?id=12885
1101           REGRESSION (r19696): Incomplete background repaint
1102
1103         Tests: fast/repaint/content-into-overflow.html
1104                fast/repaint/overflow-into-content.html
1105
1106         Changed repaintAfterLayoutIfNeeded() to take, in addition to the clipped overflow
1107         rect, the unclipped border box plus outline, and to repaint any areas that
1108         were added or removed from that box, in addition to any areas added or removed
1109         from the clipped overflow rect.
1110
1111         * platform/graphics/svg/SVGResourceMarker.cpp:
1112         (WebCore::SVGResourceMarker::draw):
1113         * rendering/RenderBlock.cpp:
1114         (WebCore::RenderBlock::layoutBlock):
1115         * rendering/RenderBox.cpp:
1116         (WebCore::RenderBox::absoluteClippedOverflowRect): Renamed getAbsoluteRepaintRect() to
1117         this.
1118         * rendering/RenderBox.h:
1119         * rendering/RenderFlexibleBox.cpp:
1120         (WebCore::RenderFlexibleBox::layoutBlock):
1121         * rendering/RenderFlow.cpp:
1122         (WebCore::RenderFlow::absoluteClippedOverflowRect):
1123         * rendering/RenderFlow.h:
1124         * rendering/RenderForeignObject.cpp:
1125         (WebCore::RenderForeignObject::layout):
1126         * rendering/RenderHTMLCanvas.cpp:
1127         (WebCore::RenderHTMLCanvas::layout):
1128         * rendering/RenderImage.cpp:
1129         (WebCore::RenderImage::layout):
1130         * rendering/RenderLayer.cpp:
1131         (WebCore::RenderLayer::RenderLayer):
1132         (WebCore::RenderLayer::checkForRepaintOnResize):
1133         (WebCore::RenderLayer::updateLayerPositions):
1134         * rendering/RenderLayer.h:
1135         * rendering/RenderObject.cpp:
1136         (WebCore::RenderObject::repaint):
1137         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
1138         (WebCore::RenderObject::getAbsoluteRepaintRectWithOutline):
1139         (WebCore::RenderObject::absoluteClippedOverflowRect):
1140         (WebCore::RenderObject::absoluteOutlineBox):
1141         * rendering/RenderObject.h:
1142         * rendering/RenderPath.cpp:
1143         (WebCore::RenderPath::layout):
1144         (WebCore::RenderPath::absoluteClippedOverflowRect):
1145         (WebCore::RenderPath::absoluteRects):
1146         (WebCore::RenderPath::drawMarkersIfNeeded):
1147         * rendering/RenderPath.h:
1148         * rendering/RenderSVGContainer.cpp:
1149         (WebCore::RenderSVGContainer::layout):
1150         (WebCore::RenderSVGContainer::absoluteClippedOverflowRect):
1151         (WebCore::RenderSVGContainer::absoluteRects):
1152         * rendering/RenderSVGContainer.h:
1153         * rendering/RenderSVGHiddenContainer.cpp:
1154         (WebCore::RenderSVGHiddenContainer::absoluteClippedOverflowRect):
1155         * rendering/RenderSVGHiddenContainer.h:
1156         * rendering/RenderSVGImage.cpp:
1157         (WebCore::RenderSVGImage::imageChanged):
1158         (WebCore::RenderSVGImage::absoluteClippedOverflowRect):
1159         (WebCore::RenderSVGImage::absoluteRects):
1160         * rendering/RenderSVGImage.h:
1161         * rendering/RenderSVGText.cpp:
1162         (WebCore::RenderSVGText::absoluteClippedOverflowRect):
1163         (WebCore::RenderSVGText::layout):
1164         (WebCore::RenderSVGText::absoluteRects):
1165         * rendering/RenderSVGText.h:
1166         * rendering/RenderTable.cpp:
1167         (WebCore::RenderTable::layout):
1168         * rendering/RenderTableCell.cpp:
1169         (WebCore::RenderTableCell::absoluteClippedOverflowRect):
1170         * rendering/RenderTableCell.h:
1171         * rendering/RenderTableCol.cpp:
1172         (WebCore::RenderTableCol::absoluteClippedOverflowRect):
1173         * rendering/RenderTableCol.h:
1174         * rendering/RenderTableRow.cpp:
1175         (WebCore::RenderTableRow::absoluteClippedOverflowRect):
1176         * rendering/RenderTableRow.h:
1177         * rendering/RenderText.cpp:
1178         (WebCore::RenderText::absoluteClippedOverflowRect):
1179         * rendering/RenderText.h:
1180
1181 2007-03-06  Ian Eng <ian.eng.webkit@gmail.com>
1182
1183         Reviewed by Maciej.
1184
1185         - fixed http://bugs.webkit.org/show_bug.cgi?id=12720
1186         Bug 12720: Re-defining window.location.toString function keeps re-loading forever
1187
1188         * bindings/js/kjs_window.cpp:
1189         Disallow replacing functions in LocationTable, and return early without updating URL.
1190
1191 2007-03-06  Kevin McCullough  <kmccullough@apple.com>
1192
1193         Reviewed by Darin.
1194
1195         <http://bugs.webkit.org/show_bug.cgi?id=12686>
1196         REGRESSION: Bloglines.com Feeds tab cannot expand folders in TOT
1197         - Now all class constructors implement implementsHasInstance.
1198
1199         * bindings/scripts/CodeGeneratorJS.pm:
1200
1201 2007-03-07  Nikolas Zimmermann  <zimmermann@kde.org>
1202
1203         Reviewed by Rob & Oliver.
1204
1205         Preparations for the new SVG text engine.
1206
1207         Handle baseline-shift / kerning css values correctly.
1208         Recognize missing svg presentation attribute "font-size-adjust".
1209         Add all missing svg<->css property mappings in mapToEntry().
1210
1211         Doesn't affect any layout test (as these properties are not used w/o my text patch).
1212         While I'm at it, unify the macro names (RS_ -> SVG_RS_) & cleanup style a bit.
1213
1214         * ksvg2/css/CSSPropertyNames.in:
1215         * ksvg2/css/SVGCSSParser.cpp:
1216         (WebCore::CSSParser::parseSVGValue):
1217         * ksvg2/css/SVGCSSStyleSelector.cpp:
1218         (WebCore::CSSStyleSelector::applySVGProperty):
1219         * ksvg2/css/SVGRenderStyle.cpp:
1220         (WebCore::SVGRenderStyle::SVGRenderStyle):
1221         (WebCore::SVGRenderStyle::operator==):
1222         (WebCore::SVGRenderStyle::inheritedNotEqual):
1223         (WebCore::SVGRenderStyle::inheritFrom):
1224         * ksvg2/css/SVGRenderStyle.h:
1225         (WebCore::SVGRenderStyle::NonInheritedFlags::):
1226         (WebCore::SVGRenderStyle::setBitDefaults):
1227         * ksvg2/css/SVGRenderStyleDefs.cpp:
1228         (StyleTextData::StyleTextData):
1229         (StyleTextData::operator==):
1230         (StyleMiscData::StyleMiscData):
1231         (StyleMiscData::operator==):
1232         * ksvg2/css/SVGRenderStyleDefs.h:
1233         (WebCore::):
1234         (WebCore::StyleTextData::operator!=):
1235         * ksvg2/svg/SVGStyledElement.cpp:
1236         (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName):
1237
1238 2007-03-06  Justin Garcia  <justin.garcia@apple.com>
1239
1240         Reviewed by kevin
1241         
1242         <http://bugs.webkit.org/show_bug.cgi?id=12245>
1243         FCKeditor: Remove Format sometimes doesn't work
1244         <rdar://problem/4786404>
1245         Underline style is not removed from selection after performing Remove Format
1246
1247         * editing/Editor.cpp:
1248         (WebCore::Editor::removeFormattingAndStyle): Re-wrote this.
1249
1250 2007-03-07  Nikolas Zimmermann  <zimmermann@kde.org>
1251
1252         Reviewed by Oliver.
1253
1254         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12979
1255         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12981
1256
1257         Guard against registering pending resources with empty id.
1258         Be careful with calling recalcStyle() in SVGUseElement, when change is "Detach" we
1259         have to use special code, as calling attach() on the shadow tree root element will crash,
1260         because it has no (direct) parent node, only a shadow parent node element.
1261
1262         * ksvg2/misc/SVGDocumentExtensions.cpp:
1263         (WebCore::SVGDocumentExtensions::addPendingResource):
1264         * ksvg2/svg/SVGUseElement.cpp:
1265         (WebCore::SVGUseElement::recalcStyle):
1266
1267 2007-03-06  Kevin Decker  <kdecker@apple.com>
1268
1269         Reviewed by Adele.
1270
1271         Fixed: <rdar://problem/5041660> REGRESSION: <keygen> element broken, prevents users from signing up for Thawte email certs
1272         
1273         * bindings/objc/DOM.mm:
1274         (WebCore::createElementClassMap): Added <keygen> to the DOM bindings so it can be accessed from Objective-C.
1275         * css/html4.css: Apply the look of the <select> element to <keygen>.
1276         * html/HTMLElementFactory.cpp:
1277         (WebCore::keygenConstructor): Added. 
1278         (WebCore::createFunctionMap): Added keygen.
1279         * html/HTMLSelectElement.cpp: Made const typeAheadTimeout variable static const. 
1280         (WebCore::HTMLSelectElement::HTMLSelectElement):  Fix both HTMLSelectElement constructors to initialize the
1281          same number of member variables. The fact that some fields were not initialized could (and would) crash the
1282          keygen element when selecting different items. Also removed m_typedString(String()) from the constructor
1283          initialization because this is not needed.
1284
1285 2007-03-06  Kevin McCullough  <kmccullough@apple.com>
1286
1287         Reviewed by Darin.
1288
1289         - Rename a function to clarify its purpose.
1290
1291         * WebCore.exp:
1292         * loader/FrameLoader.cpp:
1293         (WebCore::FrameLoader::registerURLSchemeAsLocal):
1294         * loader/FrameLoader.h:
1295
1296 2007-03-06  Adam Roben  <aroben@apple.com>
1297
1298         Build fix.
1299
1300         * WebCore.exp: Updated symbols.
1301
1302 2007-03-06  Adam Roben  <aroben@apple.com>
1303
1304         Reviewed by Anders.
1305
1306         Added a parameter to all StringTruncator methods to specify whether
1307         rounding hacks should be on or off.
1308
1309         No layout test possible.
1310
1311         * platform/StringTruncator.cpp:
1312         (WebCore::stringWidth): Added disableRoundingHacks parameter.
1313         (WebCore::truncateString): Ditto.
1314         (WebCore::StringTruncator::centerTruncate): Ditto.
1315         (WebCore::StringTruncator::rightTruncate): Ditto.
1316         (WebCore::StringTruncator::width): Ditto.
1317         * platform/StringTruncator.h: Ditto.
1318         * platform/mac/FileChooserMac.mm:
1319         (WebCore::FileChooser::basenameForWidth): Pass in false to
1320         centerTruncate so that the truncation matches the way the text will be
1321         rendered.
1322
1323 2007-03-06  Anders Carlsson  <acarlsson@apple.com>
1324
1325         Reviewed by Maciej.
1326
1327         <rdar://problem/5035045>
1328         REGRESSION: WebKit browser doesn't display image at http://www.metoffice.gov.uk/weather/satellite/index.html
1329         
1330         It turns out WinIE does allow you to access images by their id as special document properties. However, this is only
1331         allowed when the element also has a name attribute. The value of the name attribute is ignored and can even be empty!
1332         
1333         * bindings/js/kjs_html.cpp:
1334         (KJS::JSHTMLDocument::namedItemGetter):
1335         Return jsUndefined() if the collection is empty.
1336         
1337         * html/HTMLImageElement.cpp:
1338         (WebCore::HTMLImageElement::parseMappedAttribute):
1339         (WebCore::HTMLImageElement::insertedIntoDocument):
1340         (WebCore::HTMLImageElement::removedFromDocument):
1341         * html/HTMLImageElement.h:
1342         Add the id attribute value to the extra named item map.
1343         
1344         * html/HTMLNameCollection.cpp:
1345         (WebCore::HTMLNameCollection::traverseNextItem):
1346         Check for images with name attributes that match, as well as elements with id attributes that match where
1347         the element also has a name attribute.
1348
1349 2007-03-06  Anders Carlsson  <acarlsson@apple.com>
1350
1351         Reviewed by Adam.
1352
1353         WebCore part of patch to make it possible to have different user agents for different URLs.
1354
1355         * bindings/js/kjs_navigator.cpp:
1356         (KJS::Navigator::getValueProperty):
1357         * bindings/js/kjs_proxy.cpp:
1358         (WebCore::KJSProxy::initScriptIfNeeded):
1359         * loader/DocumentLoader.cpp:
1360         (WebCore::DocumentLoader::setLoading):
1361         * loader/FrameLoader.cpp:
1362         (WebCore::FrameLoader::userAgent):
1363         (WebCore::FrameLoader::loadResourceSynchronously):
1364         (WebCore::FrameLoader::applyUserAgent):
1365         * loader/FrameLoader.h:
1366         * loader/FrameLoaderClient.h:
1367         * platform/graphics/svg/SVGImageEmptyClients.h:
1368         (WebCore::SVGEmptyFrameLoaderClient::userAgent):
1369
1370 2007-03-05  Kevin McCullough  <kmccullough@apple.com>
1371
1372         Reviewed by Mark and Dave H.
1373
1374         - rdar://problem/5038491
1375         An oversight of the security fix that prevented remote from loading local is that it
1376         prevents user style sheets when the site is remote.  This fixes that.
1377
1378         * loader/Cache.cpp: Propogate and check user style sheet flag.
1379         (WebCore::createResource):
1380         (WebCore::Cache::requestResource):
1381         * loader/Cache.h: Propogate user style sheet flag.
1382         * loader/CachedCSSStyleSheet.cpp: Propogate user style sheet flag.
1383         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
1384         * loader/CachedCSSStyleSheet.h: Propogate user style sheet flag.
1385         * loader/DocLoader.cpp: Propogate user style sheet flag.
1386         (WebCore::DocLoader::requestResource):
1387         * loader/SubresourceLoader.cpp: Propogate and check user style sheet flag.
1388         (WebCore::SubresourceLoader::create):
1389         * loader/SubresourceLoader.h: Add check for user style sheet flag.
1390         * loader/loader.cpp: Propogate user style sheet flag.
1391         (WebCore::Loader::load):
1392         (WebCore::Loader::servePendingRequests):
1393         * loader/loader.h: Propogate user style sheet flag.
1394
1395 2007-03-06  Nikolas Zimmermann  <zimmermann@kde.org>
1396
1397         Reviewed by Darin.
1398
1399         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12936 (Master bug used to track all current use problems.)
1400
1401         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12926 (transform attribute not respected in nested <use> elements)
1402         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12267 (getElementById broken for <use>)
1403         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12916 (use instance in symbol definition does not work)
1404         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12917 (mouseout event does not occur after scaling use instance)
1405         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12838 (SVG <use> DOM broken for script)
1406
1407         Added test: svg/custom/use-nested-transform.svg
1408         Added test: svg/custom/struct-use-09-b.svg (not yet official W3C-SVG-1.1 testcase)
1409         Fixes test: svg/custom/use-elementInstance-event-target.svg (rectangle now turns green on first click)
1410
1411         Fix all (except one) known <use> bug. The remaining bug (12630) is not crucical at all.
1412         Enable <use> again as default SVG feature, as discussed on webkit-dev.
1413
1414         dom/Element.cpp needed following tweak: set hasParentStyle to true, if there is no parentNode
1415         available - which happens for <use> nodes, as it's a shadow node. This fixes recalcStyle behaviour.
1416         Override recalcStyle() in SVGUseElement, and properly forward the call to the shadow tree root element.
1417         The shadow tree now receives proper style updates (without having to recreate the whole tree!).
1418
1419         Override attributeChanged() in SVGUseElement and only call notifyAttributeChange if one of x/y/width/height/xlink:href
1420         attribute changed - otherwhise we'll end up recreating the tree for every transform/style/(non-existing-attribute) change.
1421
1422         Do not override transform in nested use situations, but correctly append (right-sided) the translation of the <use> element.
1423         Some cosmetic fixes: don't add transform="translate(0 0)" attributes if both x/y values are null in the shadow tree.
1424
1425         Factor out logic for replacing symbol/svg tags in the shadow tree, and also invoke it during expandUseElementsInShadowTree -
1426         otherwhise <symbol><use xlink:href="#someOtherSymbol"></symbol> the <use> gets expanded to a <symbol>. Though no one expands
1427         the <symbol> element - and we're end up in hitting an assertion. Avoid that.
1428
1429         * bindings/js/JSSVGElementWrapperFactory.cpp:
1430         * bindings/js/kjs_dom.cpp:
1431         (KJS::toJS):
1432         * bindings/objc/DOM.mm:
1433         (WebCore::createElementClassMap):
1434         * dom/Element.cpp:
1435         (WebCore::Element::recalcStyle):
1436         * ksvg2/svg/SVGElement.cpp:
1437         (WebCore::shadowTreeParentElementForShadowTreeElement):
1438         (WebCore::SVGElement::dispatchEvent):
1439         * ksvg2/svg/SVGElementInstance.cpp:
1440         * ksvg2/svg/SVGElementInstance.h:
1441         * ksvg2/svg/SVGElementInstance.idl:
1442         * ksvg2/svg/SVGElementInstanceList.cpp:
1443         * ksvg2/svg/SVGElementInstanceList.h:
1444         * ksvg2/svg/SVGElementInstanceList.idl:
1445         * ksvg2/svg/SVGStyledElement.cpp:
1446         (WebCore::SVGStyledElement::notifyAttributeChange):
1447         (WebCore::SVGStyledElement::updateElementInstance):
1448         * ksvg2/svg/SVGStyledElement.h:
1449         * ksvg2/svg/SVGUseElement.cpp:
1450         (WebCore::SVGUseElement::attributeChanged):
1451         (WebCore::SVGUseElement::notifyAttributeChange):
1452         (WebCore::SVGUseElement::recalcStyle):
1453         (WebCore::SVGUseElement::buildPendingResource):
1454         (WebCore::SVGUseElement::buildShadowTreeForSymbolTag):
1455         (WebCore::SVGUseElement::alterShadowTreeForSVGTag):
1456         (WebCore::SVGUseElement::buildShadowTree):
1457         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
1458         (WebCore::SVGUseElement::attachShadowTree):
1459         * ksvg2/svg/SVGUseElement.h:
1460         * ksvg2/svg/SVGUseElement.idl:
1461         * ksvg2/svg/svgtags.in:
1462
1463 2007-03-05  Brady Eidson  <beidson@apple.com>
1464
1465         Reviewed by John
1466
1467         Fixes <rdar://problem/4974258>
1468         Adds some key null checking
1469
1470         * bindings/js/kjs_html.cpp:
1471         (KJS::JSHTMLElement::implementsCall): Null check doc/frame
1472         * bindings/objc/DOMInternal.mm:
1473         (-[WebScriptObject _initializeScriptDOMNodeImp]): Null check doc/frame
1474
1475 2007-03-06  Nikolas Zimmermann  <zimmermann@kde.org>
1476
1477         Reviewed by Darin.
1478
1479         Path::normalAngleAtLength() / Path::pointAtLength() don't work correctly.
1480         pointAtLength() was not implemented, basically and normalAngleAtLength()
1481         had a bug in the tangent slope calculation.
1482
1483         The normalAngleAtLength() stuff can only be tested with my local textPath support.
1484         New LayoutTest: svg/custom/path-textPath-simulation.svg
1485
1486         * platform/graphics/Path.cpp:
1487         (WebCore::pathLengthApplierFunction):
1488         * platform/graphics/PathTraversalState.cpp:
1489         (WebCore::PathTraversalState::quadraticBezierTo):
1490         (WebCore::PathTraversalState::cubicBezierTo):
1491         * platform/graphics/PathTraversalState.h:
1492         (WebCore::PathTraversalState::):
1493
1494 2007-03-05  Alexey Proskuryakov  <ap@webkit.org>
1495
1496         Reviewed by Darin.
1497
1498         http://bugs.webkit.org/show_bug.cgi?id=12970
1499         Fix and import 4XPath test_core_functions.html test
1500
1501         * xml/XPathExpression.cpp:
1502         (WebCore::XPathExpression::evaluate): Fully initialize the evaluation context.
1503
1504         * xml/XPathFunctions.cpp:
1505         (WebCore::XPath::FunSubstring::doEvaluate): Fixed handling of edge cases.
1506         (WebCore::XPath::FunRound::round): Reimplemented to match the spec; exposed FunRound::round() to be used in
1507         other functions.
1508
1509 2007-03-05  Alexey Proskuryakov  <ap@webkit.org>
1510
1511         Reviewed by Darin.
1512
1513         http://bugs.webkit.org/show_bug.cgi?id=12954
1514         XPath relative operations are implemented incorrectly
1515
1516         * xml/XPathPredicate.cpp:
1517         (WebCore::XPath::NumericOp::doEvaluate):
1518         (WebCore::XPath::EqTestOp::compare):
1519         (WebCore::XPath::EqTestOp::doEvaluate):
1520         Reimplemented relative equality operations to match the spec.
1521
1522         * xml/XPathPredicate.h:
1523         (WebCore::XPath::NumericOp::):
1524         (WebCore::XPath::EqTestOp::):
1525         Moved relative operations to EqTestOp.
1526
1527         * xml/XPathGrammar.y:
1528         * xml/XPathParser.cpp:
1529         (WebCore::XPath::Parser::nextTokenInternal):
1530         (WebCore::XPath::Parser::lex):
1531         Adapted for the above changes.
1532
1533 2007-03-05  Mark Rowe  <mrowe@apple.com>
1534
1535         Reviewed by Lars.
1536
1537         Fix http://bugs.webkit.org/show_bug.cgi?id=12947
1538         Bug 12947: REGRESSION: ASSERTION FAILED: maxWidth >= 0 in StringTruncator.cpp:109 in WebCore::truncateString()
1539
1540         Handle nil window correctly in toUserSpace and toDeviceSpace.  On Intel Macs a message to nil that returns a
1541         float will return 0.0.  We use this as the divisor in calculating a scale factor, which results in NaN being
1542         introduced into our rect.
1543
1544         * platform/mac/ScreenMac.mm:
1545         (WebCore::toUserSpace):
1546         (WebCore::toDeviceSpace):
1547
1548 2007-03-05  Rob Buis  <buis@kde.org>
1549
1550         Reviewed by Darin.
1551
1552         http://bugs.webkit.org/show_bug.cgi?id=12868
1553         parts of the CSS classes in this simple SVG example are not applied
1554
1555         Make sure the xml stylesheets are parsed in strict mode.
1556
1557         * dom/ProcessingInstruction.cpp:
1558         (WebCore::ProcessingInstruction::parseStyleSheet):
1559
1560 2007-03-04  Adele Peterson  <adele@apple.com>
1561
1562         Reviewed by Darin.
1563
1564         Change to dispatch the keypress event during the defaultEventHandler for keydown events.  This matches IE behavior.
1565         This is preparation for fixing event dispatch with input methods (http://bugs.webkit.org/show_bug.cgi?id=10871)
1566
1567         Test: fast/events/keydown-keypress-preventDefault.html
1568
1569         * dom/EventTargetNode.cpp: (WebCore::EventTargetNode::defaultEventHandler): Call the defaultKeyboardEventHandler for keydown events.
1570         * page/EventHandler.cpp:
1571         (WebCore::eventTargetNodeForDocument): Return 0 instead of false since the return type in EventTargetNode.
1572         (WebCore::EventHandler::keyEvent): Removed dispatch of keypress event, since this is now done in the default event handler.
1573         (WebCore::EventHandler::defaultKeyboardEventHandler): For keydown events, create and dispatch a keypress event.
1574
1575 2007-03-04  Alexey Proskuryakov  <ap@webkit.org>
1576
1577         Reviewed by Nikolas Zimmermann (yay!).
1578
1579         http://bugs.webkit.org/show_bug.cgi?id=12962
1580         4XPath tests crash on lang() function
1581
1582         Covered by 4XPath tests, to be landed later.
1583
1584         * platform/StringImpl.cpp:
1585         (WebCore::StringImpl::reverseFind): Do not crash with empty strings.
1586         * xml/XPathFunctions.cpp:
1587         (WebCore::XPath::FunLang::doEvaluate): Do not crash when an element has no
1588         attributes. Use a proper namespace for xml:lang (not sure where "xms" came from).
1589         Rewrote the algorithm for suffix removing to match the spec.
1590
1591 2007-03-02  Anders Carlsson  <acarlsson@apple.com>
1592
1593         Reviewed by Darin.
1594
1595         <rdar://problem/5028165> 
1596         http://bugs.webkit.org/show_bug.cgi?id=12915
1597         REGRESSION: XMLHttpRequest.abort() does not stop loading (12915)
1598         
1599         * loader/DocumentLoader.cpp:
1600         (WebCore::DocumentLoader::stopLoading):
1601         Save the value of m_loading since calling FrameLoader::stopLoading could set it to false.
1602         
1603         * loader/SubresourceLoader.cpp:
1604         (WebCore::SubresourceLoader::didCancel):
1605         * loader/SubresourceLoader.h:
1606         Get rid of didCancel now, it's not needed anymore.
1607         
1608         * xml/xmlhttprequest.cpp:
1609         (WebCore::XMLHttpRequest::abort):
1610         Call cancel() instead of stopLoading(). Also, set m_aborted to true so the XMLHttpRequest object
1611         won't be dereferenced in didFail when aborting.
1612
1613 2007-03-04  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1614
1615         Reviewed by Nikolas Zimmermann.
1616
1617         Move ScrollView stubs to ScrollViewGdk.cpp
1618
1619         * platform/gdk/FrameGdk.h: remove comment that no longer makes sense
1620         * platform/gdk/ScrollViewGdk.cpp:
1621         (WebCore::ScrollView::addChild):
1622         (WebCore::ScrollView::removeChild):
1623         (WebCore::ScrollView::scrollPointRecursively):
1624         (WebCore::ScrollView::inWindow):
1625         (WebCore::ScrollView::wheelEvent):
1626         (WebCore::ScrollView::updateScrollbars):
1627         (WebCore::ScrollView::updateScrollInfo):
1628         (WebCore::ScrollView::windowToContents):
1629         (WebCore::ScrollView::contentsToWindow):
1630         (WebCore::ScrollView::scrollbarUnderMouse):
1631         * platform/gdk/TemporaryLinkStubs.cpp:
1632
1633 2007-03-02  Kevin McCullough  <kmccullough@apple.com>
1634
1635         Reviewed by Geoff.
1636
1637         - rdar://problem/4922454
1638         - This fixes a security issue by making remote referrers not able to access local
1639         resources, unless they register their schemes to be treated as local. The result is
1640         that those schemes can access local resources and cannot be accessed by remote
1641         referrers.
1642         Because this behavior is new a link-on-or-after check is made to determine if the
1643         app should use the older, less safe, behavior.
1644
1645         * WebCore.exp: added exported functions
1646         * bindings/objc/DOM.mm: consolodated function to base class
1647         (-[DOMElement image]):
1648         (-[DOMElement _imageTIFFRepresentation]):
1649         * dom/Document.cpp: Cache the document's ability to load local resources.
1650         (WebCore::Document::Document):
1651         (WebCore::Document::setURL):
1652         (WebCore::Document::shouldBeAllowedToLoadLocalResources):
1653         (WebCore::Document::stylesheetLoaded):
1654         * dom/Document.h: Cache the docuent's ability to load local resources.
1655         (WebCore::Document::getPendingSheet):
1656         (WebCore::Document::isAllowedToLoadLocalResources):
1657         * html/HTMLImageLoader.cpp: Moved functionality into base class.
1658         (WebCore::HTMLImageLoader::updateFromElement):
1659         (WebCore::HTMLImageLoader::dispatchLoadEvent):
1660         * html/HTMLLinkElement.cpp: Handles null returns correctly now.
1661         * html/HTMLTokenizer.cpp: Moved functionality into base class.
1662         (WebCore::HTMLTokenizer::notifyFinished):
1663         * ksvg2/misc/SVGImageLoader.cpp: Moved functionality into base class.
1664         (WebCore::SVGImageLoader::dispatchLoadEvent):
1665         * loader/Cache.cpp: Checks if the cached resource can be loaded.
1666         (WebCore::Cache::requestResource):
1667         * loader/CachedCSSStyleSheet.cpp: Moved functionality into base class.
1668         (WebCore::CachedCSSStyleSheet::ref):
1669         (WebCore::CachedCSSStyleSheet::error):
1670         * loader/CachedImage.cpp: Moved functionality into base class.
1671         (WebCore::CachedImage::CachedImage):
1672         * loader/CachedImage.h: Moved functionality into base class.
1673         (WebCore::CachedImage::canRender):
1674         * loader/CachedResource.cpp: Cache if the CachedResource should be treated as local
1675         (WebCore::CachedResource::CachedResource):
1676         * loader/CachedResource.h: Moved functionality into base class.
1677         (WebCore::CachedResource::errorOccurred):
1678         (WebCore::CachedResource::shouldTreatAsLocal):
1679         * loader/CachedScript.cpp: Moved functionality into base class.
1680         (WebCore::CachedScript::CachedScript):
1681         * loader/CachedScript.h: Moved functionality into base class.
1682         (WebCore::CachedScript::schedule):
1683         * loader/CachedXBLDocument.cpp: Moved functionality into base class.
1684         (WebCore::CachedXBLDocument::error):
1685         * loader/CachedXSLStyleSheet.cpp: Moved functionality into base class.
1686         (WebCore::CachedXSLStyleSheet::error):
1687         * loader/FrameLoader.cpp: See comments for each function below.
1688         (WebCore::FrameLoader::loadSubframe): Use new canLoad.
1689         (WebCore::FrameLoader::restrictAccessToLocal): return value of linked-on-or-after check.
1690         (WebCore::FrameLoader::setRestrictAccessToLocal): set value for linked-on-or-after check.
1691         (WebCore::localSchemes): Return set of schemes that are to be treated as local.
1692         (WebCore::FrameLoader::loadPlugin): Use new canLoad.
1693         (WebCore::FrameLoader::canLoad): Now multiple functions that each do the same work but some can take advantage of the cached values, if they were computed previously.
1694         (WebCore::FrameLoader::shouldHideReferrer): Extracted out the logic to determine if the referrer should be hidden so it is only calculated when needed.
1695         (WebCore::FrameLoader::loadResourceSynchronously): No longer calls canLoad to get hideReferrer info.
1696         (WebCore::FrameLoader::registerSchemeAsLocal): Functionality to register a scheme to be treated as local.
1697         (WebCore::FrameLoader::treatURLAsLocal): Given a URL this function determines if it should be treated as local.
1698         * loader/FrameLoader.h: Declared functions for this security fix.  See above.
1699         * loader/MainResourceLoader.cpp: Optized order of bools to regain performance.
1700         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1701         * loader/SubresourceLoader.cpp: Now restricts remote from loading local resources.
1702         (WebCore::SubresourceLoader::create):
1703         * page/EventHandler.cpp: Moved functionality into base class.
1704         (WebCore::selectCursor):
1705         * platform/KURL.cpp: KURLs need to check all the registered schemes now.
1706         (WebCore::KURL::isLocalFile):
1707         * rendering/HitTestResult.cpp: Moved functionality into base class.
1708         (WebCore::HitTestResult::image):
1709         * rendering/RenderImage.cpp: Moved functionality into base class.
1710         (WebCore::RenderImage::setCachedImage):
1711         (WebCore::RenderImage::imageChanged):
1712         (WebCore::RenderImage::paint):
1713         (WebCore::RenderImage::layout):
1714         (WebCore::RenderImage::calcAspectRatioWidth):
1715         (WebCore::RenderImage::calcAspectRatioHeight):
1716         * rendering/RenderImage.h: Moved functionality into base class.
1717         (WebCore::RenderImage::errorOccurred):
1718         * rendering/RenderListItem.cpp: Moved functionality into base class.
1719         (WebCore::RenderListItem::setStyle):
1720         * rendering/RenderListMarker.cpp: Moved functionality into base class.
1721         (WebCore::RenderListMarker::isImage):
1722         * xml/xmlhttprequest.cpp: Check doc's cached value instead of determining independently.
1723         (WebCore::XMLHttpRequest::urlMatchesDocumentDomain):
1724
1725 2007-03-02  Justin Garcia  <justin.garcia@apple.com>
1726
1727         Reviewed by kevin
1728         
1729         <rdar://problem/5028447>
1730         REGRESSION: Gmail Editor: Copied message text pastes at the wrong font size
1731
1732         * editing/markup.cpp:
1733         (WebCore::createMarkup): The style of the div that holds
1734         a fully selected body's styles didn't include styles inherited
1735         from the body's ancestors.
1736         
1737 2007-03-02  Justin Garcia  <justin.garcia@apple.com>
1738
1739         Reviewed by harrison
1740
1741         <rdar://problem/4545040>
1742         innerHTML does not HTML-escape text nodes inside PRE elements
1743         <rdar://problem/5027857>
1744         Pasting into Mail from Safari's view-source window renders the HTML
1745
1746         * editing/HTMLInterchange.cpp:
1747         (WebCore::convertHTMLTextToInterchangeFormat): Send this function
1748         the node that the text comes from as a parameter.  It shouldn't convert
1749         '\n's to spaces/nbsps if the text is coming from text where newlines are
1750         preserved.
1751         * editing/HTMLInterchange.h:
1752         * editing/markup.cpp:
1753         (WebCore::startMarkup): Escape text inside the children of PREs.
1754
1755 2007-03-02  Sam Weinig  <sam@webkit.org>
1756
1757         Reviewed by Anders.
1758
1759         Try to fix the Qt build.
1760
1761         * platform/qt/TemporaryLinkStubs.cpp: Add stubs.
1762         (WebCore::searchMenuNoRecentSearchesText):
1763         (WebCore::searchMenuRecentSearchesText):
1764         (WebCore::searchMenuClearRecentSearchesText):
1765         (WebCore::AXWebAreaText):
1766         (WebCore::AXLinkText):
1767         (WebCore::AXListMarkerText):
1768         (WebCore::AXImageMapText):
1769         (WebCore::AXHeadingText):
1770
1771 2007-03-02  David Harrison  <harrison@apple.com>
1772
1773         Suggested by Darin.
1774
1775         A more efficient solution to rdar://4961431.
1776
1777         * bridge/mac/WebCoreAXObject.mm:
1778         (-[WebCoreAXObject accessibilityIsIgnored]):
1779
1780 2007-03-01  Justin Garcia  <justin.garcia@apple.com>
1781
1782         Reviewed by john
1783         
1784         <rdar://problem/5032095>
1785         Gmail Editor: Copied text pastes on a new line instead of current line
1786         
1787         Start merge failed to occur because positionAtStartOfInsertedContent
1788         had a bug.
1789
1790         * editing/ReplaceSelectionCommand.cpp:
1791         (WebCore::ReplaceSelectionCommand::positionAtStartOfInsertedContent):
1792         Was failing when inserting <span><div>foo/div></span>. Return the 
1793         inserted content's first VisiblePosition.
1794
1795 2007-03-02  Dave Hyatt  <hyatt@apple.com>
1796
1797         Fix crasher in glyph map code (buffer overrun).
1798
1799         Reviewed by darin
1800
1801         * platform/win/GlyphPageTreeNodeWin.cpp:
1802         (WebCore::GlyphPage::fill):
1803
1804 2007-03-01  Antti Koivisto  <antti@apple.com>
1805
1806         Reviewed by Maciej.
1807
1808         Fix for http://bugs.webkit.org/show_bug.cgi?id=12895
1809         REGRESSION: imagemap: pointer cursor is shown everywhere
1810         <rdar://problem/5028163>
1811  
1812         Image with imagemap should never itself be URLElement in hit test results. 
1813                
1814         No layout test, cursor state can't be captured.
1815
1816         * rendering/RenderLayer.cpp:
1817         (WebCore::RenderLayer::hitTest):
1818
1819 2007-03-01  Antti Koivisto  <antti@apple.com>
1820
1821         Reviewed by Maciej.
1822         
1823         Fix http://bugs.webkit.org/show_bug.cgi?id=12690
1824         REGRESSION: can not log in to bank of america with TOT webkit
1825         <rdar://problem/4990044>
1826         
1827         and http://bugs.webkit.org/show_bug.cgi?id=12604
1828         REGRESSION: After closing the "Would you like to save password" sheet, the form fails 
1829         to submit automatically at http://www.mac.com/WebObjects/HomePage.woa
1830         <rdar://problem/4871752>
1831         
1832         and http://bugs.webkit.org/show_bug.cgi?id=12020
1833         REGRESSION: Flickr uploading broken
1834         <rdar://problem/4928662>
1835         
1836         Turn protection against multiple forms submission back on. This approach is buggy 
1837         but it is way better than not having it at all. Not protecting against this
1838         breaks number of major sites.
1839         
1840         * bridge/mac/WebCoreAXObject.mm:
1841         (-[WebCoreAXObject accessibilityPerformAction:]):
1842         * loader/FrameLoader.cpp:
1843         (WebCore::FrameLoader::resetMultipleFormSubmissionProtection):
1844         (WebCore::FrameLoader::submitForm):
1845         (WebCore::FrameLoader::receivedMainResourceError):
1846         * loader/FrameLoader.h:
1847         * page/EventHandler.cpp:
1848         (WebCore::EventHandler::keyEvent):
1849         * page/Frame.cpp:
1850         (WebCore::Frame::setView):
1851         * page/mac/EventHandlerMac.mm:
1852         (WebCore::EventHandler::mouseDown):
1853
1854 2007-03-01  Kevin McCullough  <kmccullough@apple.com>
1855
1856         Reviewed by Adam.
1857
1858         - Added the test case: external-script-URL-location.html
1859         - Fix an issue where the url of a document is null after an open if the document
1860         has no parent.
1861
1862         * dom/Document.cpp:
1863         (WebCore::Document::open):
1864
1865 2007-03-01  Anders Carlsson  <acarlsson@apple.com>
1866
1867         Reviewed by Darin.
1868
1869         <rdar://problem/4960250> 
1870         http://bugs.webkit.org/show_bug.cgi?id=11627
1871         REGRESSION: Reproducible crash at IMDb in WebCore::FrameLoader::stopLoadingSubframes
1872         
1873         In rare cases, we could end up calling checkLoadComplete twice for the same frame. This would cause the 
1874         didFailProvisionalLoad delegate method to be called twice for the same frame, and also cause the provisional document loader
1875         to be reset to null when other code wasn't expecting it.
1876         
1877         This regressed in revision 10904 with the fix for <rdar://problem/4184719>. The fix is to only call stopLoading on the frame
1878         if either the document loader is loading, or the document is still being parsed. I've verified that the bug is still fixed and
1879         that no leaks occur.
1880         
1881         * loader/DocumentLoader.cpp:
1882         (WebCore::DocumentLoader::stopLoading):
1883
1884 2007-03-01  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1885
1886         Reviewed by Darin.
1887
1888         Fix ARM crash due to accessing non-4-byte-aligned memory
1889         as 32-bit values.
1890
1891         * platform/AtomicString.cpp:
1892         (WebCore::UCharBufferTranslator::equal):
1893
1894 2007-03-01  David Harrison  <harrison@apple.com>
1895
1896         Reviewed by Darin.
1897
1898         <rdar://problem/5033905> Have the DOM secondary thread check raise an exception by default
1899
1900         * platform/mac/ThreadCheck.mm:
1901         (WebCore::_WebCoreThreadViolationCheck):
1902         Initialize threadViolationIsException to true.
1903
1904 2007-03-01  Brady Eidson  <beidson@apple.com>
1905
1906         Reviewed by Darin
1907
1908         <rdar://problem/5030628> - Crash opening a new window with the
1909         "New windows open to the same page" pref set
1910
1911         * history/HistoryItem.cpp:
1912         (WebCore::HistoryItem::HistoryItem): Set the m_subItems vector capacity correctly
1913
1914 2007-03-01  Alexey Proskuryakov  <ap@webkit.org>
1915
1916         Reviewed by Maciej.
1917
1918         http://bugs.webkit.org/show_bug.cgi?id=12801
1919         Assertion failure in createMarkup() (root) when doing Select All, Copy in an SVG document
1920
1921         Test: editing/pasteboard/createMarkup-assert.xml
1922
1923         * editing/markup.cpp:
1924         (WebCore::createMarkup): Removed the assertion, because it's wrong in a non-HTML world.
1925
1926 2007-02-28  Adam Roben  <aroben@apple.com>
1927
1928         Reviewed by Oliver and Hyatt.
1929
1930         Fix <rdar://problem/5024233> Crash while using Find on empty document
1931
1932         No layout test possible, as this involves a null document.
1933
1934         * dom/Range.cpp:
1935         (WebCore::rangeOfContents): Added an ASSERT.
1936         * page/Frame.cpp:
1937         (WebCore::Frame::findString): Added a null-check for document().
1938         (WebCore::Frame::markAllMatchesForText): Ditto.
1939
1940 2007-02-28  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1941
1942         Not reviewed - simple gdk build fix.
1943
1944         Add stubs for newly introduced localized strings.
1945
1946         * platform/gdk/TemporaryLinkStubs.cpp:
1947         (WebCore::searchMenuNoRecentSearchesText):
1948         (WebCore::searchMenuRecentSearchesText):
1949         (WebCore::searchMenuClearRecentSearchesText):
1950
1951 2007-02-28  Brady Eidson  <beidson@apple.com>
1952
1953         Reviewed by Beth
1954
1955         Move the Thread Safety Check functions into their own header for export to WebKit
1956
1957         * WebCore.exp: Export the function
1958         * WebCore.xcodeproj/project.pbxproj: 
1959         * bindings/scripts/CodeGeneratorObjC.pm: Include the new header
1960         * platform/Logging.h: Move stuff to ThreadCheck.h
1961         * platform/ThreadCheck.h: Added.
1962         * platform/mac/LoggingMac.mm: Move stuff to ThreadCheck.mm
1963         * platform/mac/ThreadCheck.mm: Added.
1964         (WebCore::_WebCoreThreadViolationCheck):
1965         (WebCoreReportThreadViolation):
1966
1967 2007-02-28  Beth Dakin  <bdakin@apple.com>
1968
1969         Reviewed by Brady.
1970
1971         Fix for http://bugs.webkit.org/show_bug.cgi?id=12923 REGRESSION: 
1972         Assertion failure copying standalone image
1973
1974         * platform/mac/PasteboardMac.mm:
1975         (WebCore::Pasteboard::writeImage): Use the CachedImage as the 
1976         resource. This makes more sense anyway. There is no need to null-
1977         check the renderer or the CachedImage since we return early if 
1978         there is no Image* and the HitTestResult::image() function checks 
1979         for these things.
1980
1981 2007-02-28  Adele Peterson  <adele@apple.com>
1982
1983         Reviewed by Beth.
1984
1985         Fix for <rdar://problem/4887423> REGRESSION: search results popup menu strings are not localized
1986         and <rdar://problem/3517227> accessibility-related strings in WebCore are not localized
1987
1988         Use localized strings from WebKit instead of hard coded strings.
1989
1990         * bridge/mac/WebCoreAXObject.mm: (-[WebCoreAXObject roleDescription]):
1991         * page/mac/WebCoreViewFactory.h:
1992         * platform/LocalizedStrings.h:
1993         * platform/mac/LocalizedStringsMac.mm:
1994         (WebCore::searchMenuNoRecentSearchesText):
1995         (WebCore::searchMenuRecentSearchesText):
1996         (WebCore::searchMenuClearRecentSearchesText):
1997         (WebCore::AXWebAreaText):
1998         (WebCore::AXLinkText):
1999         (WebCore::AXListMarkerText):
2000         (WebCore::AXImageMapText):
2001         (WebCore::AXHeadingText):
2002         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::itemText):
2003
2004 2007-02-27  Antti Koivisto  <antti@apple.com>
2005
2006         Reviewed by Maciej.
2007
2008         - fix http://bugs.webkit.org/show_bug.cgi?id=12911
2009         GoogleDocs: Ordered lists don't update immediately when start attribute changed
2010         
2011         Update list marker value when start attribute changes.
2012
2013         * html/HTMLOListElement.cpp:
2014         (WebCore::HTMLOListElement::parseMappedAttribute):
2015
2016 2007-02-28  Nikolas Zimmermann  <zimmermann@kde.org>
2017
2018         Reviewed by Maciej.
2019
2020         Corrected the use of the new ENABLE() macros in some ksvg2/svg files.
2021         Add new build-webkit flags "--(no-)xpath" / "--(no-)xslt", to be able
2022         to switch off build features easily. Also add "--(no-)svg-experimental-features"
2023         flag, to be able to test filters/animations/use/foreignObject easily.
2024
2025         * DerivedSources.make:
2026         * ksvg2/scripts/make_names.pl:
2027         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
2028         * ksvg2/svg/SVGStyledElement.cpp:
2029         * ksvg2/svg/SVGUseElement.cpp:
2030
2031 2007-02-28  Rob Buis  <buis@kde.org>
2032
2033         Reviewed by Maciej.
2034
2035         http://bugs.webkit.org/show_bug.cgi?id=12609
2036         Any SVG element will create renderers even when children of HTML elements
2037
2038         Allow creation of svg renderers only when parent is SVG, except for
2039         the <svg> element.
2040
2041         * ksvg2/svg/SVGAElement.h:
2042         * ksvg2/svg/SVGAnimationElement.h:
2043         * ksvg2/svg/SVGCircleElement.h:
2044         * ksvg2/svg/SVGClipPathElement.h:
2045         (WebCore::SVGClipPathElement::rendererIsNeeded):
2046         * ksvg2/svg/SVGDefsElement.cpp:
2047         * ksvg2/svg/SVGDefsElement.h:
2048         * ksvg2/svg/SVGDescElement.h:
2049         (WebCore::SVGDescElement::rendererIsNeeded):
2050         * ksvg2/svg/SVGElement.cpp:
2051         * ksvg2/svg/SVGEllipseElement.h:
2052         * ksvg2/svg/SVGFilterElement.h:
2053         (WebCore::SVGFilterElement::rendererIsNeeded):
2054         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
2055         (WebCore::SVGFilterPrimitiveStandardAttributes::rendererIsNeeded):
2056         * ksvg2/svg/SVGForeignObjectElement.h:
2057         * ksvg2/svg/SVGGElement.h:
2058         * ksvg2/svg/SVGGradientElement.h:
2059         * ksvg2/svg/SVGImageElement.h:
2060         * ksvg2/svg/SVGLineElement.h:
2061         * ksvg2/svg/SVGMarkerElement.h:
2062         * ksvg2/svg/SVGMaskElement.h:
2063         * ksvg2/svg/SVGPathElement.h:
2064         * ksvg2/svg/SVGPatternElement.h:
2065         * ksvg2/svg/SVGPolyElement.h:
2066         * ksvg2/svg/SVGRectElement.h:
2067         * ksvg2/svg/SVGStopElement.h:
2068         * ksvg2/svg/SVGStyledElement.cpp:
2069         (WebCore::SVGStyledElement::rendererIsNeeded):
2070         * ksvg2/svg/SVGStyledElement.h:
2071         * ksvg2/svg/SVGSwitchElement.h:
2072         * ksvg2/svg/SVGSymbolElement.h:
2073         (WebCore::SVGSymbolElement::rendererIsNeeded):
2074         * ksvg2/svg/SVGTRefElement.h:
2075         * ksvg2/svg/SVGTSpanElement.h:
2076         * ksvg2/svg/SVGTextElement.h:
2077         * ksvg2/svg/SVGTitleElement.h:
2078         (WebCore::SVGTitleElement::rendererIsNeeded):
2079         * ksvg2/svg/SVGUseElement.h:
2080         * ksvg2/svg/SVGViewElement.h:
2081         (WebCore::SVGViewElement::rendererIsNeeded):
2082
2083 2007-02-28  Rob Buis  <buis@kde.org>
2084
2085         Reviewed by Maciej.
2086
2087         http://bugs.webkit.org/show_bug.cgi?id=12913
2088         Markers do not render in webkit when it misses markerWidth or markerHeight attribute
2089
2090         Set defaults for markerWidth/markerHeight so markers that do not specify them render.
2091
2092         * ksvg2/svg/SVGMarkerElement.cpp:
2093         (WebCore::SVGMarkerElement::SVGMarkerElement):
2094
2095 2007-02-27  Anders Carlsson  <acarlsson@apple.com>
2096
2097         * loader/ResourceLoader.cpp:
2098         (WebCore::ResourceLoader::~ResourceLoader):
2099         Remove comment.
2100
2101 2007-02-27  Justin Garcia  <justin.garcia@apple.com>
2102
2103         Reviewed by oliver
2104
2105         <rdar://problem/5027300>
2106         REGRESSION: Images inserted with align left/right are lost
2107
2108         * editing/ReplaceSelectionCommand.cpp:
2109         (WebCore::ReplaceSelectionCommand::shouldMerge):
2110         Don't attempt to merge to or from a position before 
2111         or after a block because it will be a no-op and
2112         lead to infinite recursion.
2113         In this case it instead resulted in content loss because 
2114         of bugs in start/endOfParagraph (5027702).
2115         * editing/visible_units.cpp: Added two FIXMEs for
2116         the problems with start/endOfParagraph.
2117
2118 2007-02-27  Anders Carlsson  <acarlsson@apple.com>
2119
2120         Reviewed by Geoff.
2121
2122         Make resource load delegate methods pass the right document loader.
2123         
2124         * loader/FrameLoader.cpp:
2125         (WebCore::FrameLoader::willSendRequest):
2126         (WebCore::FrameLoader::didReceiveResponse):
2127         (WebCore::FrameLoader::didReceiveData):
2128         (WebCore::FrameLoader::didFailToLoad):
2129         (WebCore::FrameLoader::didFinishLoad):
2130         (WebCore::FrameLoader::didReceiveAuthenticationChallenge):
2131         (WebCore::FrameLoader::didCancelAuthenticationChallenge):
2132         Use the resource loader's document loader instead of the active one.
2133         
2134         * loader/MainResourceLoader.cpp:
2135         (WebCore::MainResourceLoader::receivedError):
2136         Make it so we send the frame load delegate method before the resource load delegate method.
2137         This was a regression from 2.0 and was caused by the fix to rdar://problem/4609195. Because the way the loader
2138         now works, both delegate methods will be called.
2139         
2140         * loader/ResourceLoader.cpp:
2141         (WebCore::ResourceLoader::ResourceLoader):
2142         * loader/ResourceLoader.h:
2143         (WebCore::ResourceLoader::documentLoader):
2144         Add document loader pointer to ResourceLoader.
2145
2146 2007-02-27  Mitz Pettel  <mitz@webkit.org>
2147
2148         Reviewed by Hyatt.
2149
2150         - fix http://bugs.webkit.org/show_bug.cgi?id=12910
2151           REGRESSION (r18756-r18765): list-bullet doesn't redraw properly when changing the list's content using JavaScript
2152
2153         Test: fast/repaint/list-marker.html
2154
2155         * rendering/RenderListItem.cpp:
2156         (WebCore::RenderListItem::positionListMarker): Add the marker to the visual
2157         overflow of all its ancestor blocks up to the list item. This needs to be
2158         done here since the marker is positioned only after those blocks have been
2159         laid out.
2160
2161 2007-02-27  Antti Koivisto  <antti@apple.com>
2162
2163         Reviewed by Hyatt.
2164         
2165         - fix http://bugs.webkit.org/show_bug.cgi?id=12918
2166         REGRESSION: Google Finance dropdown Flickers
2167         <rdar://4988039>
2168         
2169         If a node dies while mouse is over it, it is still supposed to receive
2170         mouseout event (wasn't case in Tiger webkit). However this event should 
2171         not propagate to any other nodes. This patch matches Firefox behavior in
2172         this respect.
2173
2174         * dom/EventTargetNode.cpp:
2175         (WebCore::EventTargetNode::dispatchGenericEvent):
2176
2177 2007-02-27  Geoffrey Garen  <ggaren@apple.com>
2178
2179         Reviewed by Maciej Stachowiak.
2180         
2181         Fixed http://bugs.webkit.org/show_bug.cgi?id=12659 | <rdar://problem/4954306>
2182         JS objects not collected after closing window @ ebay.com/maps.google.com
2183
2184         Garbage collect in the KJSProxy destructor, after clearing our reference
2185         to the interpreter, because that's when the interpreter has torn down fully.
2186
2187         (Technically speaking, we can't *prove* that we have the only reference to 
2188         our interpreter, but that's how it works in practice, and manual garbage 
2189         collection is just an opportunistic optimization, so it's OK for it to 
2190         work in practice even if it can't be proven in theory.)
2191         
2192         Layout tests pass. No leaks reported.
2193
2194         * bindings/js/kjs_proxy.cpp:
2195         (WebCore::KJSProxy::~KJSProxy):
2196         * bindings/js/kjs_proxy.h:
2197         * page/Page.cpp:
2198         (WebCore::Page::~Page): Merged pageDestroyed() calls. Moved debug-only
2199         code to the bottom.
2200         * page/Frame.cpp:
2201         (WebCore::Frame::~Frame): Don't call getObject() because globalObject()
2202         returns a JSObject* already, and the call can leave a pointer to the Window
2203         object on the stack. Don't check for NULL because it is an invariant of
2204         JavaScriptCore that no JSObject* can be NULL. Do use a volatile pointer
2205         for w because the 'w = 0' assignment just screams to the compiler, "Don't
2206         generate any code for me!"
2207
2208 2007-02-27  Rob Buis  <buis@kde.org>
2209
2210         Reviewed by David Hyatt.
2211
2212         http://bugs.webkit.org/show_bug.cgi?id=4128
2213         !important is ignored in inline styling.
2214
2215         Handle properties with !important flag better in inline
2216         style declarations.
2217
2218         * css/CSSMutableStyleDeclaration.cpp:
2219         (WebCore::CSSMutableStyleDeclaration::addParsedProperties):
2220
2221 2007-02-27  David Hyatt  <hyatt@apple.com>
2222
2223         Bug 11435.  Make sure RenderViews always paintBoxDecorations.  They used to before I removed RenderView's
2224         paint method.  This fix restores the original behavior.
2225
2226         Reviewed by mitz
2227
2228         * rendering/RenderBox.cpp:
2229         (WebCore::RenderBox::setStyle):
2230
2231 2007-02-27  David Hyatt  <hyatt@apple.com>
2232
2233         Fix for bug 12094, make sure setMinMaxKnown starts off false for the weird/rare case of empty
2234         plaintext documents (which really are buggy and should be fixed to generate root elements).
2235
2236         Reviewed by mitz
2237
2238         * rendering/RenderView.cpp:
2239         (WebCore::RenderView::RenderView):
2240
2241 2007-02-27  Dex Deacon  <occupant4@gmail.com>
2242
2243         Reviewed by Darin.
2244
2245         Fixed the case where a BackForwardList of capacity==1 would grow without bound.
2246
2247         * history/BackForwardList.cpp:
2248         (WebCore::BackForwardList::addItem):
2249
2250 2007-02-22  Lars Naesbye Christensen  <lars@naesbye.dk>
2251
2252         Reviewed by Maciej.
2253
2254         http://bugs.webkit.org/show_bug.cgi?id=12848
2255         Help cursor should have a white outline
2256
2257         * Resources/helpCursor.png:
2258
2259 2007-02-27  Alexey Proskuryakov  <ap@webkit.org>
2260
2261         Reviewed by Maciej.
2262
2263         http://bugs.webkit.org/show_bug.cgi?id=12594
2264         REGRESSION: Strange highlight in active input area
2265
2266         No automated test possible.
2267
2268         * rendering/InlineTextBox.cpp:
2269         (WebCore::InlineTextBox::paint): Restore a check lost in r12792.
2270
2271 2007-02-27  Darin Adler  <darin@apple.com>
2272
2273         Reviewed by Mitz.
2274
2275         - fix http://bugs.webkit.org/show_bug.cgi?id=12908
2276           crash in http/tests/incremental/frame-focus-before-load.html
2277
2278         * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::focusDocumentView):
2279         Add null checks.
2280
2281 2007-02-27  Darin Adler  <darin@apple.com>
2282
2283         Reviewed by Alexey.
2284
2285         - fix http://bugs.webkit.org/show_bug.cgi?id=12909
2286           should use ICU, not TEC, for MacRoman decoding
2287
2288         * platform/TextCodecICU.cpp: (WebCore::TextCodecICU::registerEncodingNames):
2289         Add "macroman" as an alias for "macintosh". We have seen that in use in mail,
2290         although I'm not sure it's used on the web.
2291
2292         * platform/mac/mac-encodings.txt: Remove MacRoman line, which was added back
2293         as part of the patch for bug 4971226. But by adding it to this file rather
2294         than the ICU codec, we get it only on Mac OS X. And long term we are trying to
2295         get rid of the use of TEC entirely, so we want this file to be as empty as
2296         possible.
2297
2298 2007-02-27  Rob Buis  <buis@kde.org>
2299
2300         Reviewed by Maciej.
2301
2302         http://bugs.webkit.org/show_bug.cgi?id=12905
2303         Not all svg shapes should support markers
2304
2305         Restrict marker usage to svg shapes polyline, polygon, line and path.
2306
2307         * ksvg2/svg/SVGLineElement.h:
2308         (WebCore::SVGLineElement::supportsMarkers):
2309         * ksvg2/svg/SVGPathElement.h:
2310         (WebCore::SVGPathElement::supportsMarkers):
2311         * ksvg2/svg/SVGPolyElement.h:
2312         (WebCore::SVGPolyElement::supportsMarkers):
2313         * ksvg2/svg/SVGStyledElement.h:
2314         (WebCore::SVGStyledElement::supportsMarkers):
2315         * rendering/RenderPath.cpp:
2316         (WebCore::RenderPath::paint):
2317
2318 2007-02-26  Adele Peterson  <adele@apple.com>
2319
2320         Reviewed by Lars.
2321
2322         Fix for http://bugs.webkit.org/show_bug.cgi?id=12902
2323         <rdar://problem/5012679> REGRESSION: Pressing return key doesn't 
2324         move caret to next line after applying a font color in GMail
2325
2326         Test: fast/frames/iframe-window-focus-2.html
2327
2328         * page/EventHandler.h: Make focusDocumentView public.
2329         * page/Frame.cpp: (WebCore::Frame::focusWindow): Instead of just setting the focused frame,
2330           we should set also focus the document view.  The bug here was that since the subframe view
2331           wasn't the first responder, the key down event was going to the wrong frame.
2332
2333 2007-02-26  Maciej Stachowiak  <mjs@apple.com>
2334
2335         Reviewed by Oliver.
2336
2337         - fixed <rdar://problem/4946881> Recursive loop with <marker> not caught, crashes in WebCore::SVGPaintServer::draw (11244)
2338         http://bugs.webkit.org/show_bug.cgi?id=11244
2339
2340         * platform/graphics/svg/SVGResourceMarker.cpp:
2341         (WebCore::SVGResourceMarker::draw): Use a HashSet to guard against
2342         reference cycles.
2343
2344 2007-02-26  Maciej Stachowiak  <mjs@apple.com>
2345
2346         Reviewed by Kevin McCullough.
2347
2348         - fix Qt build for earlier SVG changes.
2349
2350         * platform/graphics/svg/qt/SVGResourceFilterQt.cpp:
2351
2352 2007-02-26  Oliver Hunt  <oliver@apple.com>
2353
2354         Reviewed by Maciej.
2355
2356         Fix for <rdar://problem/4827378>: Canvas with large height 
2357         uses lots of memory, computer almost stops responding
2358          
2359         Put cap on maximum area of canvas, size is similar too the 
2360         maximum size allowed by firefox (firefox seems to to cut off 
2361         at area == 32767 * 9358). 
2362
2363         Also protect renderer against the possibility of a null context
2364         (this was triggering a CG warning)
2365
2366         * html/HTMLCanvasElement.cpp:
2367         (WebCore::HTMLCanvasElement::createDrawingContext):
2368            Apply maximum canvas area
2369         (WebCore::HTMLCanvasElement::createPlatformImage):
2370            Protect against null CG Context
2371
2372 2007-02-26  Mitz Pettel  <mitz@webkit.org>
2373
2374         Reviewed by Antti Koivisto.
2375
2376         - fix http://bugs.webkit.org/show_bug.cgi?id=12899
2377           Ordered lists not updating dynamically with new styles
2378
2379         Test: fast/lists/list-style-type-dynamic-change.html
2380
2381         * rendering/RenderListMarker.cpp:
2382         (WebCore::RenderListMarker::setStyle): Made changing the marker type trigger
2383         updating of the marker.
2384
2385 2007-02-26  Adele Peterson  <adele@apple.com>
2386
2387         Reviewed by Maciej.
2388
2389         Fix for <rdar://problem/5012761> REGRESSION: form submit invokes wrong event handler
2390
2391         Test: fast/events/submit-reset-nested-bubble.html
2392
2393         * dom/EventTargetNode.h: Made handleLocalEvents virtual.
2394         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::handleLocalEvents): If we're
2395           not in the capture phase, and the target is a different form, and we're handling
2396           the submitEvent or the resetEvent, then stop propagation of the event.  This matches
2397           Firefox behavior.  You can only get in this situation if misnested tags cause
2398           forms to be nested.
2399         * html/HTMLFormElement.h: Added handleLocalEvents.
2400
2401 2007-02-26  Darin Adler  <darin@apple.com>
2402
2403         Reviewed by Oliver Hunt.
2404
2405         - <rdar://problem/5021555> TextCodecICU does not use fallback mappings; it should
2406
2407         * platform/TextCodecICU.cpp: (WebCore::TextCodecICU::createICUConverter):
2408         Added a call to ucnv_setFallback(TRUE).
2409
2410 2007-02-26  Oliver Hunt  <oliver@apple.com>
2411
2412         Reviewed by Adam.
2413
2414         Fix for rdar://problem/5021127 
2415
2416         Need to add null check to node -- original Obj-C didn't need 
2417         the null check due to the Obj-C null messaging semantics
2418
2419         * editing/Editor.cpp:
2420         (WebCore::Editor::shouldInsertFragment):
2421
2422 2007-02-26  David Hyatt  <hyatt@apple.com>
2423
2424         Make text files render using white-space: pre-wrap instead of white-space: pre.
2425         
2426         Reviewed by aroben
2427
2428         * loader/TextDocument.cpp:
2429         (WebCore::TextTokenizer::write):
2430
2431 2007-02-26  David Hyatt  <hyatt@apple.com>
2432
2433         Back out the change to add fullyClippedContentRect.  The layout test
2434         was actually showing more correct results.
2435
2436         * page/Frame.cpp:
2437         (WebCore::Frame::visibleSelectionRect):
2438         (WebCore::Frame::setIsActive):
2439         (WebCore::Frame::markAllMatchesForText):
2440         * platform/ScrollView.h:
2441         * platform/mac/ScrollViewMac.mm:
2442         * rendering/RenderLayer.cpp:
2443         (WebCore::RenderLayer::scrollRectToVisible):
2444
2445 2007-02-26  David Hyatt  <hyatt@apple.com>
2446
2447         Add support for a new property called -webkit-border-fit.  This property
2448         has two values: border and lines.  The "border" value means the border and
2449         background paint normally at the border box level.  The "lines" value indicates
2450         that the border and background should shrink dynamically to snugly hug the
2451         line boxes of normal flow descendants.
2452
2453         Reviewed by darin
2454
2455         fast/borders/border-fit.html
2456
2457         * WebCore.xcodeproj/project.pbxproj:
2458         * css/CSSComputedStyleDeclaration.cpp:
2459         (WebCore::):
2460         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2461         * css/CSSPropertyNames.in:
2462         * css/CSSValueKeywords.in:
2463         * css/cssparser.cpp:
2464         (WebCore::CSSParser::parseValue):
2465         * css/cssstyleselector.cpp:
2466         (WebCore::CSSStyleSelector::applyProperty):
2467         * rendering/RenderBlock.cpp:
2468         (WebCore::RenderBlock::adjustForBorderFit):
2469         (WebCore::RenderBlock::borderFitAdjust):
2470         * rendering/RenderBlock.h:
2471         * rendering/RenderBox.cpp:
2472         (WebCore::RenderBox::paintBoxDecorations):
2473         * rendering/RenderBox.h:
2474         (WebCore::RenderBox::borderFitAdjust):
2475         * rendering/RenderStyle.cpp:
2476         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2477         (WebCore::StyleRareNonInheritedData::operator==):
2478         (WebCore::RenderStyle::diff):
2479         * rendering/RenderStyle.h:
2480         (WebCore::):
2481         (WebCore::RenderStyle::borderFit):
2482         (WebCore::RenderStyle::setBorderFit):
2483         (WebCore::RenderStyle::initialBorderFit):
2484
2485 2007-02-26  Adam Roben  <aroben@apple.com>
2486
2487         Reviewed by Darin.
2488
2489         Build fix.
2490
2491         * rendering/RenderTreeAsText.cpp: Can't use #ifndef with ENABLE() macro.
2492
2493 2007-02-26  Adele Peterson  <adele@apple.com>
2494
2495         Reviewed by Adam.
2496
2497         Fix for <rdar://problem/4990700> Safari always crashes when attempting to edit/view 
2498         Yahoo pipes in WebCore::HTMLSelectElement::optionToListIndex
2499
2500         Test: fast/forms/select-out-of-bounds-index.html
2501
2502         * html/HTMLSelectElement.cpp:
2503         (WebCore::HTMLSelectElement::setSelectedIndex): If we're about to deselect all options, then set m_lastOnChangeIndex to -1.
2504         (WebCore::HTMLSelectElement::optionToListIndex): Moved listSize to a local variable.  Rewrote using a simpler for-loop to prevent out-of-bounds errors.
2505
2506 2007-02-26  Anders Carlsson  <acarlsson@apple.com>
2507
2508         Reviewed by Geoff.
2509
2510         <rdar://problem/4816376>
2511         REGRESSION: NetNewsWire 3.0 - Crashes in WebDocumentLoaderMac::attachToFrame() (12674)
2512         
2513         * loader/FrameLoader.cpp:
2514         (WebCore::FrameLoader::reload):
2515         Remove call to setPolicyDocumentLoader here, it's set by the ::load function that we end up calling.
2516
2517 2007-02-26  Maciej Stachowiak  <mjs@apple.com>
2518
2519         Reviewed by Lars.
2520
2521         - fixed <rdar://problem/5021698> Disable experimental SVG features (12883)
2522         
2523         I added an ENABLE_SVG_EXPERIMENTAL_FEATURES define to guard all use of the experimental
2524         features, and used it to guard relevant tag names, elements, JS bindings and renderers.
2525         
2526         I also converted all the existing optional feature defines to
2527         ENABLE_FOO instead of FOO_SUPPORT since that is the more standard
2528         way to do it in open source projects and works with the handy new
2529         ENABLE() macro.
2530
2531         * CMakeLists.txt:
2532         * DerivedSources.make:
2533         * Projects/gdk/webcore-gdk.bkl:
2534         * WebCore.pro:
2535         * WebCore.vcproj/WebCore/WebCore.vcproj:
2536         * WebCore.vcproj/WebCore/build-generated-files.sh:
2537         * WebCore.xcodeproj/project.pbxproj:
2538         * bindings/js/JSCustomXPathNSResolver.cpp:
2539         * bindings/js/JSCustomXPathNSResolver.h:
2540         * bindings/js/JSSVGElementWrapperFactory.cpp:
2541         * bindings/js/JSSVGElementWrapperFactory.h:
2542         * bindings/js/JSSVGMatrixCustom.cpp:
2543         * bindings/js/JSSVGPODTypeWrapper.h:
2544         * bindings/js/JSSVGPathSegCustom.cpp:
2545         * bindings/js/JSSVGPathSegListCustom.cpp:
2546         * bindings/js/JSSVGPointListCustom.cpp:
2547         * bindings/js/JSXSLTProcessor.cpp:
2548         * bindings/js/JSXSLTProcessor.h:
2549         * bindings/js/kjs_binding.cpp:
2550         (KJS::setDOMException):
2551         * bindings/js/kjs_css.cpp:
2552         (KJS::toJS):
2553         * bindings/js/kjs_dom.cpp:
2554         (KJS::toJS):
2555         * bindings/js/kjs_html.cpp:
2556         (KJS::HTMLElementFunction::callAsFunction):
2557         * bindings/js/kjs_proxy.cpp:
2558         * bindings/js/kjs_proxy.h:
2559         * bindings/js/kjs_window.cpp:
2560         (KJS::Window::getValueProperty):
2561         * bindings/objc/DOM.mm:
2562         (WebCore::createElementClassMap):
2563         (+[DOMNode _nodeWith:WebCore::]):
2564         * bindings/objc/DOMCSS.mm:
2565         (+[DOMCSSValue _CSSValueWith:WebCore::]):
2566         * bindings/objc/DOMCustomXPathNSResolver.h:
2567         * bindings/objc/DOMCustomXPathNSResolver.mm:
2568         * bindings/objc/DOMEvents.mm:
2569         (+[DOMEvent _eventWith:WebCore::]):
2570         * bindings/objc/DOMInternal.h:
2571         * bindings/objc/DOMSVGPathSegInternal.mm:
2572         * bindings/objc/DOMXPath.mm:
2573         * bindings/objc/ExceptionHandlers.mm:
2574         (WebCore::raiseDOMException):
2575         * bindings/objc/PublicDOMInterfaces.h:
2576         * bindings/scripts/CodeGeneratorJS.pm:
2577         * bindings/scripts/CodeGeneratorObjC.pm:
2578         * config.h:
2579         * css/CSSGrammar.y:
2580         * css/CSSStyleDeclaration.cpp:
2581         (WebCore::propertyID):
2582         * css/StyleBase.h:
2583         * css/cssparser.cpp:
2584         (WebCore::CSSParser::parseValue):
2585         * css/cssparser.h:
2586         * css/cssstyleselector.cpp:
2587         (WebCore::CSSStyleSelector::loadDefaultStyle):
2588         (WebCore::CSSStyleSelector::initForStyleResolve):
2589         (WebCore::checkPseudoState):
2590         (WebCore::CSSStyleSelector::adjustRenderStyle):
2591         (WebCore::CSSStyleSelector::applyProperty):
2592         * css/cssstyleselector.h:
2593         * dom/DOMImplementation.cpp:
2594         (WebCore::DOMImplementation::hasFeature):
2595         (WebCore::DOMImplementation::createDocument):
2596         * dom/Document.cpp:
2597         (WebCore::Document::Document):
2598         (WebCore::Document::~Document):
2599         (WebCore::Document::createElement):
2600         (WebCore::Document::implicitClose):
2601         (WebCore::Document::recalcStyleSelector):
2602         (WebCore::Document::createEvent):
2603         * dom/Document.h:
2604         * dom/Document.idl:
2605         * dom/Event.cpp:
2606         * dom/Event.h:
2607         * dom/EventTarget.cpp:
2608         * dom/EventTarget.h:
2609         * dom/MappedAttributeEntry.h:
2610         (WebCore::):
2611         * dom/Node.cpp:
2612         (WebCore::Node::createRendererIfNeeded):
2613         (WebCore::Node::shadowAncestorNode):
2614         * dom/Node.h:
2615         * dom/ProcessingInstruction.cpp:
2616         (WebCore::ProcessingInstruction::ProcessingInstruction):
2617         (WebCore::ProcessingInstruction::checkStyleSheet):
2618         (WebCore::ProcessingInstruction::setCSSStyleSheet):
2619         * dom/ProcessingInstruction.h:
2620         * dom/Text.cpp:
2621         (WebCore::Text::createRenderer):
2622         * dom/XMLTokenizer.cpp:
2623         (WebCore::XMLTokenizer::startElementNs):
2624         (WebCore::XMLTokenizer::endElementNs):
2625         (WebCore::XMLTokenizer::processingInstruction):
2626         (WebCore::XMLTokenizer::end):
2627         (WebCore::XMLTokenizer::insertErrorMessageBlock):
2628         * dom/XMLTokenizer.h:
2629         * html/HTMLEmbedElement.cpp:
2630         * html/HTMLEmbedElement.h:
2631         * html/HTMLObjectElement.cpp:
2632         * html/HTMLObjectElement.h:
2633         * ksvg2/css/SVGCSSParser.cpp:
2634         * ksvg2/css/SVGCSSStyleSelector.cpp:
2635         * ksvg2/css/SVGRenderStyle.cpp:
2636         * ksvg2/css/SVGRenderStyle.h:
2637         * ksvg2/css/SVGRenderStyleDefs.cpp:
2638         * ksvg2/css/SVGRenderStyleDefs.h:
2639         * ksvg2/events/JSSVGLazyEventListener.cpp:
2640         * ksvg2/events/JSSVGLazyEventListener.h:
2641         * ksvg2/events/SVGZoomEvent.cpp:
2642         * ksvg2/events/SVGZoomEvent.h:
2643         * ksvg2/misc/KCanvasRenderingStyle.cpp:
2644         * ksvg2/misc/KCanvasRenderingStyle.h:
2645         * ksvg2/misc/PointerEventsHitRules.cpp:
2646         * ksvg2/misc/PointerEventsHitRules.h:
2647         * ksvg2/misc/SVGDocumentExtensions.cpp:
2648         * ksvg2/misc/SVGDocumentExtensions.h:
2649         * ksvg2/misc/SVGImageLoader.cpp:
2650         * ksvg2/misc/SVGImageLoader.h:
2651         * ksvg2/misc/SVGTimer.cpp:
2652         * ksvg2/misc/SVGTimer.h:
2653         * ksvg2/misc/TimeScheduler.cpp:
2654         * ksvg2/misc/TimeScheduler.h:
2655         * ksvg2/scripts/make_names.pl:
2656         * ksvg2/svg/ColorDistance.cpp:
2657         * ksvg2/svg/ColorDistance.h:
2658         * ksvg2/svg/GradientAttributes.h:
2659         * ksvg2/svg/LinearGradientAttributes.h:
2660         * ksvg2/svg/PatternAttributes.h:
2661         * ksvg2/svg/RadialGradientAttributes.h:
2662         * ksvg2/svg/SVGAElement.cpp:
2663         * ksvg2/svg/SVGAElement.h:
2664         * ksvg2/svg/SVGAngle.cpp:
2665         * ksvg2/svg/SVGAngle.h:
2666         * ksvg2/svg/SVGAnimateColorElement.cpp:
2667         * ksvg2/svg/SVGAnimateColorElement.h:
2668         * ksvg2/svg/SVGAnimateElement.cpp:
2669         * ksvg2/svg/SVGAnimateElement.h:
2670         * ksvg2/svg/SVGAnimateElement.idl:
2671         * ksvg2/svg/SVGAnimateMotionElement.cpp:
2672         * ksvg2/svg/SVGAnimateMotionElement.h:
2673         * ksvg2/svg/SVGAnimateTransformElement.cpp:
2674         * ksvg2/svg/SVGAnimateTransformElement.h:
2675         * ksvg2/svg/SVGAnimateTransformElement.idl:
2676         * ksvg2/svg/SVGAnimatedPathData.cpp:
2677         * ksvg2/svg/SVGAnimatedPathData.h:
2678         * ksvg2/svg/SVGAnimatedPoints.cpp:
2679         * ksvg2/svg/SVGAnimatedPoints.h:
2680         * ksvg2/svg/SVGAnimatedTemplate.h:
2681         * ksvg2/svg/SVGAnimationElement.cpp:
2682         * ksvg2/svg/SVGAnimationElement.h:
2683         * ksvg2/svg/SVGCircleElement.cpp:
2684         * ksvg2/svg/SVGCircleElement.h:
2685         * ksvg2/svg/SVGClipPathElement.cpp:
2686         * ksvg2/svg/SVGClipPathElement.h:
2687         * ksvg2/svg/SVGColor.cpp:
2688         * ksvg2/svg/SVGColor.h:
2689         * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
2690         * ksvg2/svg/SVGComponentTransferFunctionElement.h:
2691         * ksvg2/svg/SVGCursorElement.cpp:
2692         * ksvg2/svg/SVGCursorElement.h:
2693         * ksvg2/svg/SVGDefsElement.cpp:
2694         * ksvg2/svg/SVGDefsElement.h:
2695         * ksvg2/svg/SVGDescElement.cpp:
2696         * ksvg2/svg/SVGDescElement.h:
2697         * ksvg2/svg/SVGDocument.cpp:
2698         * ksvg2/svg/SVGDocument.h:
2699         * ksvg2/svg/SVGElement.cpp:
2700         (WebCore::SVGElement::dispatchEvent):
2701         * ksvg2/svg/SVGElement.h:
2702         * ksvg2/svg/SVGElementInstance.cpp:
2703         * ksvg2/svg/SVGElementInstance.h:
2704         * ksvg2/svg/SVGElementInstance.idl:
2705         * ksvg2/svg/SVGElementInstanceList.cpp:
2706         * ksvg2/svg/SVGElementInstanceList.h:
2707         * ksvg2/svg/SVGElementInstanceList.idl:
2708         * ksvg2/svg/SVGEllipseElement.cpp:
2709         * ksvg2/svg/SVGEllipseElement.h:
2710         * ksvg2/svg/SVGException.h:
2711         * ksvg2/svg/SVGExternalResourcesRequired.cpp:
2712         * ksvg2/svg/SVGExternalResourcesRequired.h:
2713         * ksvg2/svg/SVGFEBlendElement.cpp:
2714         * ksvg2/svg/SVGFEBlendElement.h:
2715         * ksvg2/svg/SVGFEBlendElement.idl:
2716         * ksvg2/svg/SVGFEColorMatrixElement.cpp:
2717         * ksvg2/svg/SVGFEColorMatrixElement.h:
2718         * ksvg2/svg/SVGFEColorMatrixElement.idl:
2719         * ksvg2/svg/SVGFEComponentTransferElement.cpp:
2720         * ksvg2/svg/SVGFEComponentTransferElement.h:
2721         * ksvg2/svg/SVGFEComponentTransferElement.idl:
2722         * ksvg2/svg/SVGFECompositeElement.cpp:
2723         * ksvg2/svg/SVGFECompositeElement.h:
2724         * ksvg2/svg/SVGFECompositeElement.idl:
2725         * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
2726         * ksvg2/svg/SVGFEDiffuseLightingElement.h:
2727         * ksvg2/svg/SVGFEDiffuseLightingElement.idl:
2728         * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
2729         * ksvg2/svg/SVGFEDisplacementMapElement.h:
2730         * ksvg2/svg/SVGFEDisplacementMapElement.idl:
2731         * ksvg2/svg/SVGFEDistantLightElement.cpp:
2732         * ksvg2/svg/SVGFEDistantLightElement.h:
2733         * ksvg2/svg/SVGFEDistantLightElement.idl:
2734         * ksvg2/svg/SVGFEFloodElement.cpp:
2735         * ksvg2/svg/SVGFEFloodElement.h:
2736         * ksvg2/svg/SVGFEFloodElement.idl:
2737         * ksvg2/svg/SVGFEFuncAElement.cpp:
2738         * ksvg2/svg/SVGFEFuncAElement.h:
2739         * ksvg2/svg/SVGFEFuncAElement.idl:
2740         * ksvg2/svg/SVGFEFuncBElement.cpp:
2741         * ksvg2/svg/SVGFEFuncBElement.h:
2742         * ksvg2/svg/SVGFEFuncBElement.idl:
2743         * ksvg2/svg/SVGFEFuncGElement.cpp:
2744         * ksvg2/svg/SVGFEFuncGElement.h:
2745         * ksvg2/svg/SVGFEFuncGElement.idl:
2746         * ksvg2/svg/SVGFEFuncRElement.cpp:
2747         * ksvg2/svg/SVGFEFuncRElement.h:
2748         * ksvg2/svg/SVGFEFuncRElement.idl:
2749         * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
2750         * ksvg2/svg/SVGFEGaussianBlurElement.h:
2751         * ksvg2/svg/SVGFEGaussianBlurElement.idl:
2752         * ksvg2/svg/SVGFEImageElement.cpp:
2753         * ksvg2/svg/SVGFEImageElement.h:
2754         * ksvg2/svg/SVGFEImageElement.idl:
2755         * ksvg2/svg/SVGFELightElement.cpp:
2756         * ksvg2/svg/SVGFELightElement.h:
2757         * ksvg2/svg/SVGFEMergeElement.cpp:
2758         * ksvg2/svg/SVGFEMergeElement.h:
2759         * ksvg2/svg/SVGFEMergeElement.idl:
2760         * ksvg2/svg/SVGFEMergeNodeElement.cpp:
2761         * ksvg2/svg/SVGFEMergeNodeElement.h:
2762         * ksvg2/svg/SVGFEMergeNodeElement.idl:
2763         * ksvg2/svg/SVGFEOffsetElement.cpp:
2764         * ksvg2/svg/SVGFEOffsetElement.h:
2765         * ksvg2/svg/SVGFEOffsetElement.idl:
2766         * ksvg2/svg/SVGFEPointLightElement.cpp:
2767         * ksvg2/svg/SVGFEPointLightElement.h:
2768         * ksvg2/svg/SVGFEPointLightElement.idl:
2769         * ksvg2/svg/SVGFESpecularLightingElement.cpp:
2770         * ksvg2/svg/SVGFESpecularLightingElement.h:
2771         * ksvg2/svg/SVGFESpecularLightingElement.idl:
2772         * ksvg2/svg/SVGFESpotLightElement.cpp:
2773         * ksvg2/svg/SVGFESpotLightElement.h:
2774         * ksvg2/svg/SVGFESpotLightElement.idl:
2775         * ksvg2/svg/SVGFETileElement.cpp:
2776         * ksvg2/svg/SVGFETileElement.h:
2777         * ksvg2/svg/SVGFETileElement.idl:
2778         * ksvg2/svg/SVGFETurbulenceElement.cpp:
2779         * ksvg2/svg/SVGFETurbulenceElement.h:
2780         * ksvg2/svg/SVGFETurbulenceElement.idl:
2781         * ksvg2/svg/SVGFilterElement.cpp:
2782         * ksvg2/svg/SVGFilterElement.h:
2783         * ksvg2/svg/SVGFilterElement.idl:
2784         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.cpp:
2785         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
2786         * ksvg2/svg/SVGFitToViewBox.cpp:
2787         * ksvg2/svg/SVGFitToViewBox.h:
2788         * ksvg2/svg/SVGForeignObjectElement.cpp:
2789         * ksvg2/svg/SVGForeignObjectElement.h:
2790         * ksvg2/svg/SVGForeignObjectElement.idl:
2791         * ksvg2/svg/SVGGElement.cpp:
2792         * ksvg2/svg/SVGGElement.h:
2793         * ksvg2/svg/SVGGradientElement.cpp:
2794         * ksvg2/svg/SVGGradientElement.h:
2795         * ksvg2/svg/SVGImageElement.cpp:
2796         * ksvg2/svg/SVGImageElement.h:
2797         * ksvg2/svg/SVGLangSpace.cpp:
2798         * ksvg2/svg/SVGLangSpace.h:
2799         * ksvg2/svg/SVGLength.cpp:
2800         * ksvg2/svg/SVGLength.h:
2801         * ksvg2/svg/SVGLengthList.cpp:
2802         * ksvg2/svg/SVGLengthList.h:
2803         * ksvg2/svg/SVGLineElement.cpp:
2804         * ksvg2/svg/SVGLineElement.h:
2805         * ksvg2/svg/SVGLinearGradientElement.cpp:
2806         * ksvg2/svg/SVGLinearGradientElement.h:
2807         * ksvg2/svg/SVGList.h:
2808         * ksvg2/svg/SVGListTraits.h:
2809         * ksvg2/svg/SVGLocatable.cpp:
2810         (WebCore::SVGLocatable::nearestViewportElement):
2811         (WebCore::SVGLocatable::farthestViewportElement):
2812         * ksvg2/svg/SVGLocatable.h:
2813         * ksvg2/svg/SVGMPathElement.cpp:
2814         * ksvg2/svg/SVGMPathElement.h:
2815         * ksvg2/svg/SVGMarkerElement.cpp:
2816         * ksvg2/svg/SVGMarkerElement.h:
2817         * ksvg2/svg/SVGMaskElement.cpp:
2818         * ksvg2/svg/SVGMaskElement.h:
2819         * ksvg2/svg/SVGMetadataElement.cpp:
2820         * ksvg2/svg/SVGMetadataElement.h:
2821         * ksvg2/svg/SVGNumberList.cpp:
2822         * ksvg2/svg/SVGNumberList.h:
2823         * ksvg2/svg/SVGPaint.cpp:
2824         * ksvg2/svg/SVGPaint.h:
2825         * ksvg2/svg/SVGParserUtilities.cpp:
2826         * ksvg2/svg/SVGParserUtilities.h:
2827         * ksvg2/svg/SVGPathElement.cpp:
2828         * ksvg2/svg/SVGPathElement.h:
2829         * ksvg2/svg/SVGPathSeg.h:
2830         * ksvg2/svg/SVGPathSegArc.cpp:
2831         * ksvg2/svg/SVGPathSegArc.h:
2832         * ksvg2/svg/SVGPathSegClosePath.cpp:
2833         * ksvg2/svg/SVGPathSegClosePath.h:
2834         * ksvg2/svg/SVGPathSegCurvetoCubic.cpp:
2835         * ksvg2/svg/SVGPathSegCurvetoCubic.h:
2836         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.cpp:
2837         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
2838         * ksvg2/svg/SVGPathSegCurvetoQuadratic.cpp:
2839         * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
2840         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.cpp:
2841         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
2842         * ksvg2/svg/SVGPathSegLineto.cpp:
2843         * ksvg2/svg/SVGPathSegLineto.h:
2844         * ksvg2/svg/SVGPathSegLinetoHorizontal.cpp:
2845         * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
2846         * ksvg2/svg/SVGPathSegLinetoVertical.cpp:
2847         * ksvg2/svg/SVGPathSegLinetoVertical.h:
2848         * ksvg2/svg/SVGPathSegList.cpp:
2849         * ksvg2/svg/SVGPathSegList.h:
2850         * ksvg2/svg/SVGPathSegMoveto.cpp:
2851         * ksvg2/svg/SVGPathSegMoveto.h:
2852         * ksvg2/svg/SVGPatternElement.cpp:
2853         * ksvg2/svg/SVGPatternElement.h:
2854         * ksvg2/svg/SVGPointList.cpp:
2855         * ksvg2/svg/SVGPointList.h:
2856         * ksvg2/svg/SVGPolyElement.cpp:
2857         * ksvg2/svg/SVGPolyElement.h:
2858         * ksvg2/svg/SVGPolygonElement.cpp:
2859         * ksvg2/svg/SVGPolygonElement.h:
2860         * ksvg2/svg/SVGPolylineElement.cpp:
2861         * ksvg2/svg/SVGPolylineElement.h:
2862         * ksvg2/svg/SVGPreserveAspectRatio.cpp:
2863         * ksvg2/svg/SVGPreserveAspectRatio.h:
2864         * ksvg2/svg/SVGRadialGradientElement.cpp:
2865         * ksvg2/svg/SVGRadialGradientElement.h:
2866         * ksvg2/svg/SVGRectElement.cpp:
2867         * ksvg2/svg/SVGRectElement.h:
2868         * ksvg2/svg/SVGRenderingIntent.h:
2869         * ksvg2/svg/SVGSVGElement.cpp:
2870         * ksvg2/svg/SVGSVGElement.h:
2871         * ksvg2/svg/SVGScriptElement.cpp:
2872         * ksvg2/svg/SVGScriptElement.h:
2873         * ksvg2/svg/SVGSetElement.cpp:
2874         * ksvg2/svg/SVGSetElement.h:
2875         * ksvg2/svg/SVGStopElement.cpp:
2876         * ksvg2/svg/SVGStopElement.h:
2877         * ksvg2/svg/SVGStringList.cpp:
2878         * ksvg2/svg/SVGStringList.h:
2879         * ksvg2/svg/SVGStylable.cpp:
2880         * ksvg2/svg/SVGStylable.h:
2881         * ksvg2/svg/SVGStyleElement.cpp:
2882         * ksvg2/svg/SVGStyleElement.h:
2883         * ksvg2/svg/SVGStyledElement.cpp:
2884         (WebCore::SVGStyledElement::notifyAttributeChange):
2885         * ksvg2/svg/SVGStyledElement.h:
2886         * ksvg2/svg/SVGStyledLocatableElement.cpp:
2887         * ksvg2/svg/SVGStyledLocatableElement.h:
2888         * ksvg2/svg/SVGStyledTransformableElement.cpp:
2889         * ksvg2/svg/SVGStyledTransformableElement.h:
2890         * ksvg2/svg/SVGSwitchElement.cpp:
2891         * ksvg2/svg/SVGSwitchElement.h:
2892         * ksvg2/svg/SVGSymbolElement.cpp:
2893         * ksvg2/svg/SVGSymbolElement.h:
2894         * ksvg2/svg/SVGTRefElement.cpp:
2895         * ksvg2/svg/SVGTRefElement.h:
2896         * ksvg2/svg/SVGTSpanElement.cpp:
2897         * ksvg2/svg/SVGTSpanElement.h:
2898         * ksvg2/svg/SVGTests.cpp:
2899         * ksvg2/svg/SVGTests.h:
2900         * ksvg2/svg/SVGTextContentElement.cpp:
2901         * ksvg2/svg/SVGTextContentElement.h:
2902         * ksvg2/svg/SVGTextElement.cpp:
2903         * ksvg2/svg/SVGTextElement.h:
2904         * ksvg2/svg/SVGTextPositioningElement.cpp:
2905         * ksvg2/svg/SVGTextPositioningElement.h:
2906         * ksvg2/svg/SVGTitleElement.cpp:
2907         * ksvg2/svg/SVGTitleElement.h:
2908         * ksvg2/svg/SVGTransform.cpp:
2909         * ksvg2/svg/SVGTransform.h:
2910         * ksvg2/svg/SVGTransformDistance.cpp:
2911         * ksvg2/svg/SVGTransformDistance.h:
2912         * ksvg2/svg/SVGTransformList.cpp:
2913         * ksvg2/svg/SVGTransformList.h:
2914         * ksvg2/svg/SVGTransformable.cpp:
2915         * ksvg2/svg/SVGTransformable.h:
2916         * ksvg2/svg/SVGURIReference.cpp:
2917         * ksvg2/svg/SVGURIReference.h:
2918         * ksvg2/svg/SVGUnitTypes.h:
2919         * ksvg2/svg/SVGUseElement.cpp:
2920         * ksvg2/svg/SVGUseElement.h:
2921         * ksvg2/svg/SVGUseElement.idl:
2922         * ksvg2/svg/SVGViewElement.cpp:
2923         * ksvg2/svg/SVGViewElement.h:
2924         * ksvg2/svg/SVGZoomAndPan.cpp:
2925         * ksvg2/svg/SVGZoomAndPan.h:
2926         * ksvg2/svg/svgtags.in:
2927         * loader/Cache.cpp:
2928         (WebCore::createResource):
2929         (WebCore::Cache::getStatistics):
2930         * loader/Cache.h:
2931         * loader/CachedImage.cpp:
2932         (WebCore::CachedImage::createImage):
2933         * loader/CachedResource.h:
2934         (WebCore::CachedResource::):
2935         * loader/CachedResourceClient.h:
2936         * loader/CachedXBLDocument.cpp:
2937         * loader/CachedXBLDocument.h:
2938         * loader/CachedXSLStyleSheet.cpp:
2939         * loader/CachedXSLStyleSheet.h:
2940         * loader/DocLoader.cpp:
2941         * loader/DocLoader.h:
2942         * page/DOMWindow.idl:
2943         * page/EventHandler.cpp:
2944         (WebCore::EventHandler::handleMouseMoveEvent):
2945         (WebCore::selectCursor):
2946         * page/Frame.cpp:
2947         (WebCore::Frame::Frame):
2948         * page/PageState.cpp:
2949         (WebCore::PageState::PageState):
2950         (WebCore::PageState::restore):
2951         * platform/MimeTypeRegistry.cpp:
2952         (WebCore::initialiseSupportedNonImageMimeTypes):
2953         * platform/graphics/FloatPoint3D.cpp:
2954         * platform/graphics/FloatPoint3D.h:
2955         * platform/graphics/ImageBuffer.cpp:
2956         (WebCore::ImageBuffer::renderSubtreeToImage):
2957         * platform/graphics/svg/SVGImage.cpp:
2958         * platform/graphics/svg/SVGImage.h:
2959         * platform/graphics/svg/SVGImageEmptyClients.h:
2960         * platform/graphics/svg/SVGPaintServer.cpp:
2961         * platform/graphics/svg/SVGPaintServer.h:
2962         * platform/graphics/svg/SVGPaintServerGradient.cpp:
2963         * platform/graphics/svg/SVGPaintServerGradient.h:
2964         * platform/graphics/svg/SVGPaintServerLinearGradient.cpp:
2965         * platform/graphics/svg/SVGPaintServerLinearGradient.h:
2966         * platform/graphics/svg/SVGPaintServerPattern.cpp:
2967         * platform/graphics/svg/SVGPaintServerPattern.h:
2968         * platform/graphics/svg/SVGPaintServerRadialGradient.cpp:
2969         * platform/graphics/svg/SVGPaintServerRadialGradient.h:
2970         * platform/graphics/svg/SVGPaintServerSolid.cpp:
2971         * platform/graphics/svg/SVGPaintServerSolid.h:
2972         * platform/graphics/svg/SVGResource.cpp:
2973         * platform/graphics/svg/SVGResource.h:
2974         * platform/graphics/svg/SVGResourceClipper.cpp:
2975         * platform/graphics/svg/SVGResourceClipper.h:
2976         * platform/graphics/svg/SVGResourceFilter.cpp:
2977         * platform/graphics/svg/SVGResourceFilter.h:
2978         * platform/graphics/svg/SVGResourceMarker.cpp:
2979         * platform/graphics/svg/SVGResourceMarker.h:
2980         * platform/graphics/svg/SVGResourceMasker.cpp:
2981         * platform/graphics/svg/SVGResourceMasker.h:
2982         * platform/graphics/svg/cg/CgSupport.cpp:
2983         * platform/graphics/svg/cg/CgSupport.h:
2984         * platform/graphics/svg/cg/RenderPathCg.cpp:
2985         * platform/graphics/svg/cg/SVGPaintServerCg.cpp:
2986         * platform/graphics/svg/cg/SVGPaintServerGradientCg.cpp:
2987         * platform/graphics/svg/cg/SVGPaintServerPatternCg.cpp:
2988         * platform/graphics/svg/cg/SVGPaintServerSolidCg.cpp:
2989         * platform/graphics/svg/cg/SVGResourceClipperCg.cpp:
2990         * platform/graphics/svg/cg/SVGResourceFilterCg.mm:
2991         * platform/graphics/svg/cg/SVGResourceMaskerCg.mm:
2992         * platform/graphics/svg/filters/SVGDistantLightSource.h:
2993         * platform/graphics/svg/filters/SVGFEBlend.cpp:
2994         * platform/graphics/svg/filters/SVGFEBlend.h:
2995         * platform/graphics/svg/filters/SVGFEColorMatrix.cpp:
2996         * platform/graphics/svg/filters/SVGFEColorMatrix.h:
2997         * platform/graphics/svg/filters/SVGFEComponentTransfer.cpp:
2998         * platform/graphics/svg/filters/SVGFEComponentTransfer.h:
2999         * platform/graphics/svg/filters/SVGFEComposite.cpp:
3000         * platform/graphics/svg/filters/SVGFEComposite.h:
3001         * platform/graphics/svg/filters/SVGFEConvolveMatrix.cpp:
3002         * platform/graphics/svg/filters/SVGFEConvolveMatrix.h:
3003         * platform/graphics/svg/filters/SVGFEDiffuseLighting.cpp:
3004         * platform/graphics/svg/filters/SVGFEDiffuseLighting.h:
3005         * platform/graphics/svg/filters/SVGFEDisplacementMap.cpp:
3006         * platform/graphics/svg/filters/SVGFEDisplacementMap.h:
3007         * platform/graphics/svg/filters/SVGFEFlood.cpp:
3008         * platform/graphics/svg/filters/SVGFEFlood.h:
3009         * platform/graphics/svg/filters/SVGFEGaussianBlur.cpp:
3010         * platform/graphics/svg/filters/SVGFEGaussianBlur.h:
3011         * platform/graphics/svg/filters/SVGFEImage.cpp:
3012         * platform/graphics/svg/filters/SVGFEImage.h:
3013         * platform/graphics/svg/filters/SVGFEMerge.cpp:
3014         * platform/graphics/svg/filters/SVGFEMerge.h:
3015         * platform/graphics/svg/filters/SVGFEMorphology.cpp:
3016         * platform/graphics/svg/filters/SVGFEMorphology.h:
3017         * platform/graphics/svg/filters/SVGFEOffset.cpp:
3018         * platform/graphics/svg/filters/SVGFEOffset.h:
3019         * platform/graphics/svg/filters/SVGFESpecularLighting.cpp:
3020         * platform/graphics/svg/filters/SVGFESpecularLighting.h:
3021         * platform/graphics/svg/filters/SVGFETile.h:
3022         * platform/graphics/svg/filters/SVGFETurbulence.cpp:
3023         * platform/graphics/svg/filters/SVGFETurbulence.h:
3024         * platform/graphics/svg/filters/SVGFilterEffect.cpp:
3025         * platform/graphics/svg/filters/SVGFilterEffect.h:
3026         * platform/graphics/svg/filters/SVGLightSource.cpp:
3027         * platform/graphics/svg/filters/SVGLightSource.h:
3028         * platform/graphics/svg/filters/SVGPointLightSource.h:
3029         * platform/graphics/svg/filters/SVGSpotLightSource.h:
3030         * platform/graphics/svg/filters/cg/SVGFEBlendCg.mm:
3031         * platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
3032         * platform/graphics/svg/filters/cg/SVGFEComponentTransferCg.mm:
3033         * platform/graphics/svg/filters/cg/SVGFECompositeCg.mm:
3034         * platform/graphics/svg/filters/cg/SVGFEDiffuseLightingCg.mm:
3035         * platform/graphics/svg/filters/cg/SVGFEDisplacementMapCg.mm:
3036         * platform/graphics/svg/filters/cg/SVGFEFloodCg.mm:
3037         * platform/graphics/svg/filters/cg/SVGFEGaussianBlurCg.mm:
3038         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
3039         * platform/graphics/svg/filters/cg/SVGFEHelpersCg.mm:
3040         * platform/graphics/svg/filters/cg/SVGFEImageCg.mm:
3041         * platform/graphics/svg/filters/cg/SVGFEMergeCg.mm:
3042         * platform/graphics/svg/filters/cg/SVGFEOffsetCg.mm:
3043         * platform/graphics/svg/filters/cg/SVGFESpecularLightingCg.mm:
3044         * platform/graphics/svg/filters/cg/SVGFETileCg.mm:
3045         * platform/graphics/svg/filters/cg/SVGFilterEffectCg.mm:
3046         * platform/graphics/svg/qt/SVGPaintServerGradientQt.cpp:
3047         * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
3048         * platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp:
3049         * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
3050         * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
3051         * platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp:
3052         * platform/graphics/svg/qt/SVGResourceClipperQt.cpp:
3053         * platform/graphics/svg/qt/SVGResourceFilterQt.cpp:
3054         * platform/graphics/svg/qt/SVGResourceMaskerQt.cpp:
3055         * rendering/HitTestResult.cpp:
3056         (WebCore::HitTestResult::absoluteImageURL):
3057         (WebCore::HitTestResult::absoluteLinkURL):
3058         (WebCore::HitTestResult::isLiveLink):
3059         * rendering/RenderForeignObject.cpp:
3060         * rendering/RenderForeignObject.h:
3061         * rendering/RenderLayer.cpp:
3062         (WebCore::RenderLayer::isTransparent):
3063         * rendering/RenderObject.cpp:
3064         (WebCore::RenderObject::containingBlock):
3065         * rendering/RenderObject.h:
3066         * rendering/RenderPath.cpp:
3067         * rendering/RenderPath.h:
3068         * rendering/RenderSVGBlock.cpp:
3069         * rendering/RenderSVGBlock.h:
3070         * rendering/RenderSVGContainer.cpp:
3071         * rendering/RenderSVGContainer.h:
3072         * rendering/RenderSVGGradientStop.cpp:
3073         * rendering/RenderSVGGradientStop.h:
3074         * rendering/RenderSVGHiddenContainer.cpp:
3075         * rendering/RenderSVGHiddenContainer.h:
3076         * rendering/RenderSVGImage.cpp:
3077         * rendering/RenderSVGImage.h:
3078         * rendering/RenderSVGInline.cpp:
3079         * rendering/RenderSVGInline.h:
3080         * rendering/RenderSVGInlineText.cpp:
3081         * rendering/RenderSVGInlineText.h:
3082         * rendering/RenderSVGTSpan.cpp:
3083         * rendering/RenderSVGTSpan.h:
3084         * rendering/RenderSVGText.cpp:
3085         * rendering/RenderSVGText.h:
3086         * rendering/RenderStyle.cpp:
3087         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3088         (WebCore::StyleRareNonInheritedData::~StyleRareNonInheritedData):
3089         (WebCore::StyleRareNonInheritedData::operator==):
3090         (WebCore::RenderStyle::RenderStyle):
3091         (WebCore::RenderStyle::inheritFrom):
3092         (WebCore::RenderStyle::operator==):
3093         (WebCore::RenderStyle::inheritedNotEqual):
3094         (WebCore::RenderStyle::diff):
3095         * rendering/RenderStyle.h:
3096         * rendering/RenderText.cpp:
3097         (WebCore::RenderText::setStyle):
3098         (WebCore::RenderText::setTextInternal):
3099         * rendering/RenderTreeAsText.cpp:
3100         (WebCore::write):
3101         (WebCore::externalRepresentation):
3102         * rendering/SVGInlineFlowBox.cpp:
3103         * rendering/SVGInlineFlowBox.h:
3104         * rendering/SVGRenderTreeAsText.cpp:
3105         * rendering/SVGRenderTreeAsText.h:
3106         * rendering/SVGRootInlineBox.cpp:
3107         * rendering/SVGRootInlineBox.h:
3108         * rendering/bidi.cpp:
3109         (WebCore::shouldPreserveNewline):
3110         (WebCore::RenderBlock::findNextLineBreak):
3111         * webcore-base.bkl:
3112         * xml/NativeXPathNSResolver.cpp:
3113         * xml/NativeXPathNSResolver.h:
3114         * xml/XPathEvaluator.cpp:
3115         * xml/XPathEvaluator.h:
3116         * xml/XPathExpression.cpp:
3117         * xml/XPathExpression.h:
3118         * xml/XPathExpressionNode.cpp:
3119         * xml/XPathExpressionNode.h:
3120         * xml/XPathFunctions.cpp:
3121         * xml/XPathFunctions.h:
3122         * xml/XPathGrammar.y:
3123         * xml/XPathNSResolver.cpp:
3124         * xml/XPathNSResolver.h:
3125         * xml/XPathNamespace.cpp:
3126         * xml/XPathNamespace.h:
3127         * xml/XPathParser.cpp:
3128         * xml/XPathParser.h:
3129         * xml/XPathPath.cpp:
3130         * xml/XPathPath.h:
3131         * xml/XPathPredicate.cpp:
3132         * xml/XPathPredicate.h:
3133         * xml/XPathResult.cpp:
3134         * xml/XPathResult.h:
3135         * xml/XPathStep.cpp:
3136         * xml/XPathStep.h:
3137         * xml/XPathUtil.cpp:
3138         * xml/XPathUtil.h:
3139         * xml/XPathValue.cpp:
3140         * xml/XPathValue.h:
3141         * xml/XPathVariableReference.cpp:
3142         * xml/XPathVariableReference.h:
3143         * xml/XSLImportRule.cpp:
3144         * xml/XSLImportRule.h:
3145         * xml/XSLStyleSheet.cpp:
3146         * xml/XSLStyleSheet.h:
3147         * xml/XSLTProcessor.cpp:
3148         * xml/XSLTProcessor.h:
3149
3150 2007-02-25  Mitz Pettel  <mitz@webkit.org>
3151
3152         Reviewed by David Hyatt.
3153
3154         - fix http://bugs.webkit.org/show_bug.cgi?id=12886
3155           Crash with Scriptalicious javascript library
3156
3157         Test: fast/dynamic/float-withdrawal.html
3158
3159         * rendering/RenderBlock.cpp:
3160         (WebCore::RenderBlock::layoutBlockChildren): Detect when a child block had
3161         intruding floats in a previous layout, and in that case force it to relayout.
3162
3163 2007-02-25  David Hyatt  <hyatt@apple.com>
3164
3165         Revert my change to the default fill color.  Just set the color to transparent explicitly when
3166         drawing textarea resizer frames.
3167
3168         * platform/graphics/GraphicsContext.cpp:
3169         (WebCore::GraphicsContextState::GraphicsContextState):
3170         * rendering/RenderLayer.cpp:
3171         (WebCore::RenderLayer::paintOverflowControls):
3172
3173 2007-02-25  Sam Weinig  <sam@webkit.org>
3174
3175         Update forgotten files.
3176
3177         * rendering/RenderLayer.cpp:
3178         (WebCore::RenderLayer::updateLayerPosition):
3179
3180 2007-02-25  David Hyatt  <hyatt@apple.com>
3181
3182         Fix for regression caused by changing the containing block of positioned elements with no positioned ancestor
3183         to be the initial containing block (represented in our tree by the RenderView).  Rework RenderView's layout
3184         to have very few special cases.   Now it will just relayout its children when the width/height of the
3185         view actually changes.  Positioned elements no longer get a special additional layout, since width/height
3186         adjustments are caught by the base class already anyway.
3187
3188         Reviewed by mjs, darin
3189
3190         * rendering/RenderBlock.cpp:
3191         (WebCore::RenderBlock::layoutBlock):
3192         * rendering/RenderFlexibleBox.cpp:
3193         (WebCore::RenderFlexibleBox::layoutBlock):
3194         (WebCore::RenderFlexibleBox::layoutVerticalBox):
3195         * rendering/RenderView.cpp:
3196         (WebCore::RenderView::RenderView):
3197         (WebCore::RenderView::layout):
3198         * rendering/RenderView.h:
3199
3200 2007-02-25  Maciej Stachowiak  <mjs@apple.com>
3201
3202         Not reviewed, build fix.
3203
3204         - fix build breakage
3205
3206         * platform/gdk/ScrollViewGdk.cpp:
3207         (WebCore::ScrollView::fullyClippedContentRect):
3208         * platform/qt/ScrollViewQt.cpp:
3209         (WebCore::ScrollView::fullyClippedContentRect):
3210
3211 2007-02-24  Maciej Stachowiak  <mjs@apple.com>
3212
3213         Reviewed by Adam.
3214
3215         - fixed layout test failure in fast/overflow/scrollRevealButton
3216         
3217         I added a new ScrollView method, fullyClippedContentRect, that vies the content rect
3218         as clipped by all ancestor scroll views, not just this one. Currently it only works
3219         correctly on mac however. visibleContentRect, only accounting for the clipping from
3220         this particular scroll view, is sufficient for most purposes.
3221
3222         * page/Frame.cpp:
3223         (WebCore::Frame::visibleSelectionRect):
3224         (WebCore::Frame::setIsActive):
3225         (WebCore::Frame::markAllMatchesForText):
3226         * platform/ScrollView.h:
3227         * platform/gdk/ScrollViewGdk.cpp:
3228         (WebCore::ScrolView::fullyClippedContentRect):
3229         * platform/mac/ScrollViewMac.mm:
3230         (WebCore::ScrollView::fullyClippedContentRect):
3231         * platform/qt/ScrollViewQt.cpp:
3232         (WebCore::ScrolView::fullyClippedContentRect):
3233         * rendering/RenderLayer.cpp:
3234         (WebCore::RenderLayer::scrollRectToVisible):
3235
3236 2007-02-24  Adam Roben  <aroben@apple.com>
3237
3238         Reviewed by Steve.
3239
3240         "Look Up in Dictionary" context menu item should be Mac-only for now,
3241         since it's only implemented on that platform (<rdar://problem/5021468>)
3242
3243         * platform/ContextMenu.cpp:
3244         (WebCore::ContextMenu::populate): Wrap all instances of the dictionary
3245         menu item in #if PLATFORM(MAC).
3246
3247 2007-02-24  Geoffrey Garen  <ggaren@apple.com>
3248
3249         Reviewed by Darin Adler.
3250         
3251         Fixed <rdar://problem/4987649> leaks in BidiRun::operator new seen while 
3252         running WebKit unit tests
3253         
3254         In bidi.cpp, some functions allocate BidiRuns and put them in a global data
3255         structure, while others uses the BidiRuns in the global data structure. 
3256         The caller is responsible for knowing which functions may allocate runs
3257         and which may use them, and calling deleteBidiRuns() at the appropriate time.
3258
3259         The fix is to add some calls to deleteBidiRuns() where they were missing.
3260         
3261         I also added a BidiRun counter because these two leaks were introduced by
3262         our two bidi.cpp experts, so the odds that leaks will creep in again
3263         in the future seem pretty high.
3264
3265         * rendering/bidi.cpp:
3266         (WebCore::RenderBlock::bidiReorderCharacters): Added  missing call to
3267         deleteBidiRuns().
3268         (WebCore::BidiRunCounter::~BidiRunCounter):
3269         (WebCore::BidiRun::operator delete):
3270         (WebCore::RenderBlock::layoutInlineChildren): Added missing call to
3271         deleteBidiRuns(). Moved call to deleteBidiRuns() to same scope as call to
3272         bidiReorderLine(), to emphasize that they go together like new/delete.
3273         In theory, the old code was just as good, but I didn't want to rely on
3274         theory.
3275
3276 2007-02-24  David Harrison  <harrison@apple.com>
3277
3278         Reviewed by Kevin.
3279
3280         <rdar://problem/4961431> Image with empty string alt tag should be ignored
3281
3282         * bridge/mac/WebCoreAXObject.mm:
3283         (-[WebCoreAXObject accessibilityIsIgnored]):
3284         Ignore img element that has an alt attribute, but that string is empty.
3285
3286 2007-02-24  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3287
3288         Reviewed by Adam Roben.
3289
3290         Gdk improvements.
3291
3292         * platform/gdk/FrameGdk.cpp: only scroll on keydown, not both keydown and keyup.
3293         (WebCore::FrameGdk::keyPress):
3294         (WebCore::FrameGdk::handleGdkEvent):
3295         (WebCore::Frame::print):
3296         (WebCore::Frame::issueTransposeCommand):
3297         (WebCore::Frame::respondToChangedSelection):
3298         (WebCore::Frame::cleanupPlatformScriptObjects):
3299         (WebCore::Frame::dragImageForSelection):
3300         * platform/network/gdk/ResourceHandleManager.cpp: don't free memory that
3301         doesn't belong to us.
3302         (WebCore::ResourceHandleManager::downloadTimerCallback):
3303
3304 2007-02-23  Kevin Decker <kdecker@apple.com>
3305
3306         Reviewed by Anders.
3307
3308         Fixed: <rdar://problem/4971226> REGRESSION: Replying to closed HTML mail message does not quote original body (12503)
3309         
3310         There were two problems here:
3311         
3312         * page/mac/WebCoreFrameBridge.mm:
3313         (+[WebCoreFrameBridge stringWithData:textEncodingName:]): The old code said  "if there is no text encoding name than
3314          assume WindowsLatin1 (iso-8859-1) and try to decode that". That's not sufficient because it doesn't handle the fallback
3315          case for unknown encodings. This method will now attempt to decode using WindowsLatin1 for unknown encoding types.
3316         * platform/mac/mac-encodings.txt: Added the missing "macroman" encoding type. 
3317
3318 2007-02-23  Mitz Pettel  <mitz@webkit.org>
3319
3320         Reviewed by Maciej.
3321
3322         - fix http://bugs.webkit.org/show_bug.cgi?id=12856
3323           REGRESSION (r13685): Canceling the suggestion popup does not revert the change
3324
3325         * editing/ReplaceSelectionCommand.cpp:
3326         (WebCore::ReplaceSelectionCommand::doApply): If the fragment to be inserted
3327         is empty, first delete the selection, and only then bail out. 
3328
3329 2007-02-23  Anders Carlsson  <acarlsson@apple.com>
3330
3331         Reviewed by Adam.
3332
3333         <rdar://problem/5001923> 
3334         REGRESSION: Crash when navigating forward from an error page in WebFrameLoaderClient::dispatchDidReceiveContentLength
3335
3336         Fix an error that was introduced in revision r18541. We should check if the provisional document loader 
3337         has an unreachable URL, not the actual document loader.
3338         
3339         * loader/FrameLoader.cpp:
3340         (WebCore::FrameLoader::updateHistoryForCommit):
3341
3342 2007-02-23  Mitz Pettel  <mitz@webkit.org>
3343
3344         Reviewed by Darin.
3345
3346         - fix http://bugs.webkit.org/show_bug.cgi?id=12823
3347           REGRESSION(r16968-16977): unable to prevent selection by cancelling "selectstart" event
3348
3349         Test: fast/events/selectstart-during-autoscroll.html
3350
3351         * rendering/RenderLayer.cpp:
3352         (WebCore::RenderLayer::autoscroll): Invoke the renderer's shouldSelect() --
3353         which dispatches the selection DOM event and gives it a chance to cancel
3354         the selection -- before updating the selection during autoscroll.
3355
3356 2007-02-23  Oliver Hunt  <oliver@apple.com>
3357
3358         Reviewed by Adam.
3359
3360         Fix for http://bugs.webkit.org/show_bug.cgi?id=12870
3361
3362         It turns out short circuiting DragData::containsURL() was bad
3363  
3364         * manual-tests/directory-drop-on-view.html: Added.
3365         * platform/mac/DragDataMac.mm:
3366         (WebCore::DragData::containsURL):
3367
3368 2007-02-23  Maciej Stachowiak  <mjs@apple.com>
3369
3370         Reviewed by Mitz.
3371
3372         - 12.5% speedup on BenchJS test 6
3373         Partial fix for http://bugs.webkit.org/show_bug.cgi?id=12866
3374         
3375         It turns out that calling documentVisibleRect on an NSScrollView is pretty expensive,
3376         and calling visibleRect even more so. Take measures to call them less often.
3377
3378         * platform/mac/ScrollViewMac.mm:
3379         (WebCore::ScrollView::visibleContentRect): Use documentVisibleRect when possible.
3380         (WebCore::ScrollView::updateContents): Use visibleContentRect to be able to use
3381         documentVisibleRect when possible.
3382         * rendering/RenderView.cpp:
3383         (WebCore::RenderView::repaintViewRectangle): Don't get or intersect with viewRect
3384         if we don't have a parent frame, since the ScrollView will do that anyway. Also,
3385         don't get contentX and contentY separately since they are in the viewRect already.
3386         (WebCore::RenderView::viewRect): Use visibleContentRect instead of getting each
3387         coordinate individually, to avoid calling documentVisibleRect repeatedly.
3388
3389 2007-02-23  Maciej Stachowiak  <mjs@apple.com>
3390
3391         Reviewed by Mitz.
3392
3393         - 2% speedup on BenchJS test 6
3394         Partial fix for http://bugs.webkit.org/show_bug.cgi?id=12866
3395
3396         * css/CSSPrimitiveValue.cpp:
3397         (WebCore::CSSPrimitiveValue::cssText): Use format() instead of
3398         number() followed by append of a constant string.
3399
3400 2007-02-22  George Staikos  <staikos@kde.org>
3401
3402         Fix the Qt build.
3403
3404         * platform/qt/ClipboardQt.cpp:
3405         (WebCore::ClipboardQt::ClipboardQt):
3406
3407 2007-02-22  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3408
3409         Reviewed by Adam Roben, who never sleeps.
3410
3411         To avoid code duplication, move notImplementedGdk() macro to a separate
3412         header file. Remove existing notImplementedGdk() macros and replace
3413         remaining notImplemented() to notImplementedGdk() in gdk code.
3414
3415         * loader/gdk/DocumentLoaderGdk.cpp:
3416         (WebCore::DocumentLoader::getResponseModifiedHeader):
3417         * loader/gdk/FrameLoaderClientGdk.cpp:
3418         (WebCore::FrameLoaderClientGdk::hasWebView):
3419         (WebCore::FrameLoaderClientGdk::hasFrameView):
3420         * page/gdk/ContextMenuClientGdk.cpp:
3421         (WebCore::ContextMenuClientGdk::contextMenuDestroyed):
3422         (WebCore::ContextMenuClientGdk::getCustomMenuFromDefaultItems):
3423         (WebCore::ContextMenuClientGdk::contextMenuItemSelected):
3424         (WebCore::ContextMenuClientGdk::downloadURL):
3425         (WebCore::ContextMenuClientGdk::copyImageToClipboard):
3426         (WebCore::ContextMenuClientGdk::searchWithGoogle):
3427         (WebCore::ContextMenuClientGdk::lookUpInDictionary):
3428         (WebCore::ContextMenuClientGdk::speak):
3429         (WebCore::ContextMenuClientGdk::stopSpeaking):
3430         * page/gdk/EventHandlerGdk.cpp:
3431         * platform/gdk/CursorGdk.cpp:
3432         (WebCore::Cursor::Cursor):
3433         * platform/gdk/EditorClientGdk.cpp:
3434         * platform/gdk/NotImplementedGdk.h: Added.
3435         * platform/gdk/PopupMenuGdk.cpp:
3436         (WebCore::PopupMenu::PopupMenu):
3437         (WebCore::PopupMenu::~PopupMenu):
3438         (WebCore::PopupMenu::show):
3439         (WebCore::PopupMenu::hide):
3440         (WebCore::PopupMenu::updateFromElement):
3441         * platform/gdk/RenderThemeGdk.cpp:
3442         * platform/gdk/ScreenGdk.cpp:
3443         (WebCore::screenDepth):
3444         (WebCore::screenDepthPerComponent):
3445         (WebCore::screenIsMonochrome):
3446         (WebCore::screenRect):
3447         (WebCore::screenAvailableRect):
3448         * platform/gdk/TemporaryLinkStubs.cpp:
3449         * platform/graphics/gdk/ImageGdk.cpp:
3450         (WebCore::Image::drawPattern):
3451         * platform/network/gdk/ResourceHandleCurl.cpp:
3452         (WebCore::ResourceHandle::setDefersLoading):
3453         * platform/network/gdk/ResourceHandleManager.cpp:
3454         (WebCore::ResourceHandleManager::setupPUT):
3455         (WebCore::ResourceHandleManager::setupPOST):
3456
3457 2007-02-22  Ian Eng  <ian.eng.webkit@gmail.com>
3458
3459         Reviewed by Maciej.
3460
3461         - Patch for http://bugs.webkit.org/show_bug.cgi?id=12850
3462           Leaks >10k objects
3463
3464         and
3465
3466         - http://bugs.webkit.org/show_bug.cgi?id=12853
3467           add a EventListener leak counter
3468
3469         Problem: RemoveEventListener leaks memory if the listener is not
3470         registered.
3471         Fix: Added Window::findJSEventListener function w/o creating a 
3472         JSEventListener; Renamed getJSEventListener to findOrCreateJSEventListener;
3473
3474         As an enhancement, added a leak counter for EventListeners.
3475
3476         Added a test case, LayoutTests/fast/events/remove-event-listener.html.
3477
3478         * WebCore/bindings/js/kjs_dom.cpp:
3479         * WebCore/bindings/js/kjs_window.h:
3480         * WebCore/bindings/js/kjs_window.cpp:
3481         * WebCore/bindings/js/kjs_event.cpp: Add a leak counter.
3482         * WebCore/bindings/js/JSXMLHttpRequest.cpp:
3483         * LayoutTests/fast/events/remove-event-listener.html:
3484
3485 2007-02-22  Anders Carlsson  <acarlsson@apple.com>
3486
3487         Reviewed by Geoff.
3488
3489         <rdar://problem/4998203> 
3490         REGRESSION: Back-forward list gets messed up when navigating to error pages with back-forward cache turned off
3491         
3492         * loader/FrameLoader.cpp:
3493         (WebCore::FrameLoader::load):
3494         Remove call to setPolicyDocumentLoader(), the policy document loader is set immediately after, and setting it before 
3495         calling shouldReloadToHandleUnreachableURL causes us to get the wrong URL.
3496         
3497         (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL):
3498         Check if the unreachable URL is equal to the document loader's request.
3499         
3500         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3501         Check the provisional document loader's unreachable URL.
3502
3503 2007-02-22  Justin Garcia  <justin.garcia@apple.com>
3504
3505         Reviewed by darin
3506         
3507         <rdar://problem/5007143>
3508         REGRESSION: WebKit doesn't remember horizontal position of caret when moving forward by line
3509
3510         * editing/SelectionController.cpp:
3511         (WebCore::SelectionController::SelectionController): Initialize 
3512         m_xPosForVerticalArrowNavigation.
3513         (WebCore::SelectionController::setSelection): Call the new setter.
3514         (WebCore::SelectionController::modifyMovingRightForward): For line
3515         and paragraph granularities, use the saved xPosForVerticalArrowNavigation 
3516         even if the old selection was a range. Use the x position of the 
3517         *start*, not the end of the selection if there is no saved 
3518         xPosForVerticalArrowNavigation.  This matches TextEdit's behavior.
3519         (WebCore::SelectionController::modifyMovingLeftBackward): For line
3520         and paragraph granularities, use the saved xPosForVerticalArrowNavigation 
3521         even if the old selection was a range.
3522         (WebCore::SelectionController::modify): Preserve the xPosForVerticalArrowNavigation
3523         for line and paragraph granularities.
3524         (WebCore::SelectionController::xPosForVerticalArrowNavigation): Removed
3525         the recalc bool because it is now always false.
3526         (WebCore::SelectionController::setXPosForVerticalArrowNavigation): Added.
3527         * editing/SelectionController.h: Moved m_xPosForVerticalArrowNavigation
3528         from Frame.
3529         * page/Frame.cpp: Moved m_xPosForVerticalArrowNavigation to SelectionController.
3530         * page/Frame.h: Ditto.
3531         * page/FramePrivate.h: Ditto.
3532
3533 2007-02-22  Beth Dakin  <bdakin@apple.com>
3534
3535         Reviewed by Adam. Manual test added.
3536
3537         Fix for http://bugs.webkit.org/show_bug.cgi?id=12399 REGRESSION: 
3538         Unable to prevent default context menu from appearing. <rdar://
3539         problem/5017416>
3540
3541         This problem appeared because of two facets of the current context 
3542         menu design. First, all context menu events are now considered to 
3543         be "swallowed" since we take care of building up the regular 
3544         context menu through the defaultEventHandler(). Second, the context 
3545         menu controller holds onto it's context menu until a new one is 
3546         created. There would be logistical problems changing this since 
3547         AppKit relies on the menu being around for as long as it is
3548         visible on the screen and we don't get any notification once the 
3549         menu is popped-down.
3550
3551         This patch fixes the problem by giving WebKit a way to clear the 
3552         controller's context menu. WebKit now clears the menu before it 
3553         propagates a new context menu event through the DOM.
3554
3555         * WebCore.exp:
3556         * manual-tests/DOMContextMenuEvent.html: Added.
3557         * page/ContextMenuController.cpp:
3558         (WebCore::ContextMenuController::clearContextMenu):
3559         * page/ContextMenuController.h:
3560
3561 2007-02-22  John Sullivan  <sullivan@apple.com>
3562
3563         Reviewed by Kevin and Adele
3564         
3565         - fixed <rdar://problem/4129417> Need final art for textarea's resize corner
3566         
3567         This probably broke some layout pixel tests since the image changed. I'm going to
3568         track those down in a moment (non-trivial since there are a bunch failing for other
3569         reasons).
3570
3571         * Resources/textAreaResizeCorner.tiff:
3572         new art
3573
3574         * Resources/deleteButton.tiff:
3575         * Resources/deleteButtonPressed.tiff:
3576         these got smaller when I ran compress-tiffs on this directory
3577         
3578 2007-02-22  Oliver Hunt  <oliver@apple.com>
3579
3580         Reviewed by Ada, Lou and Steve.
3581
3582         Moving basic components of ClipboardMac to Clipboard, 
3583         last of the basic common code merge will come later (namely setting the 
3584         drag element/image).
3585         
3586         Tidying up in DragController including a few bad PassRefPtr uses and
3587         removing unnecessary accessors.  Also initialise fields properly to
3588         fix <rdar:/problems/5014889>
3589
3590         * dom/Clipboard.cpp:
3591         (WebCore::Clipboard::Clipboard):
3592           New constructor
3593           
3594         * dom/Clipboard.h:
3595         (WebCore::Clipboard::isForDragging):
3596         (WebCore::Clipboard::dragLocation):
3597         (WebCore::Clipboard::dragImage):
3598         (WebCore::Clipboard::dragImageElement):
3599           Exposing common data
3600           
3601         * page/DragController.cpp:
3602         (WebCore::DragController::DragController):
3603           Initialise m_isHandlingDrag (oops)
3604         (WebCore::documentFragmentFromDragData):
3605         (WebCore::DragController::tryDocumentDrag):
3606           Fixing PassRefPtr misuse
3607         (WebCore::DragController::canProcessDrag):
3608         (WebCore::DragController::startDrag):
3609         (WebCore::DragController::doSystemDrag):
3610           Make sure we're using the correct coordinate space
3611           
3612         * page/EventHandler.cpp:
3613         (WebCore::EventHandler::handleDrag):
3614           Reset drag source correctly
3615           
3616         * platform/mac/ClipboardMac.h:
3617         * platform/mac/ClipboardMac.mm:
3618         (WebCore::ClipboardMac::ClipboardMac):
3619           update constructor to use new Clipboard constructor
3620
3621 2007-02-22  Adele Peterson  <adele@apple.com>
3622
3623         Reviewed by Darin.
3624
3625         Fix for <rdar://problem/5014970> 9A374: Tabs don't work in the message body
3626
3627         Test: fast/events/keypress-insert-tab.html
3628
3629         * page/EventHandler.cpp: (WebCore::EventHandler::defaultTextInputEventHandler):
3630           If the defaultTabEventHandler doesn't handle the event, then go on to the insertText case.
3631
3632 2007-02-22  Timothy Hatcher  <timothy@apple.com>
3633
3634         Reviewed by Darin.
3635
3636         <rdar://problem/4948887> REGRESSION: Correct differences in public DOM API that inadvertently changed in Leopard
3637
3638         * bindings/objc/PublicDOMInterfaces.h: Changes return types for two size properties, adds deprecated DOMEventTarget methods.
3639         * bindings/scripts/CodeGeneratorObjC.pm: Fixed public API checking for protocols, adds support for ConvertToString.
3640         * dom/EventTarget.idl: Marks addEventListener and removeEventListener with the OldStyleObjC attribute.
3641         * html/HTMLBaseFontElement.idl: Changes the size property to a DOMString for ObjC only.
3642         * html/HTMLInputElement.idl: Changes the size property to a DOMString for ObjC only.
3643         * html/HTMLOptionsCollection.idl: Changes the length property to be unsigned.
3644
3645 2007-02-22  Adele Peterson  <adele@apple.com>
3646
3647         Reviewed by John.
3648
3649         Fix <rdar://problem/5016969> REGRESSION: "Check Spelling As You Type" context menu item is never checked
3650
3651         * platform/ContextMenu.cpp: (WebCore::ContextMenu::checkOrEnableIfNeeded): Set shouldCheck for ContextMenuItemTagCheckSpellingWhileTyping.
3652
3653 2007-02-22  Antti Koivisto  <antti@apple.com>
3654
3655         Reviewed by Darin.
3656
3657         - fix http://bugs.webkit.org/show_bug.cgi?id=11447
3658         REGRESSION(NativeListBox): List not scrolled to preselected option
3659         <rdar://problem/4957463>
3660         
3661         Initiate scroll when selected <option> is added to <select>.
3662
3663         * html/HTMLOptionElement.cpp:
3664         (WebCore::HTMLOptionElement::insertedIntoDocument):
3665         * html/HTMLOptionElement.h:
3666         * html/HTMLSelectElement.cpp:
3667         (WebCore::HTMLSelectElement::notifyOptionSelected):
3668         (WebCore::HTMLSelectElement::updateListBoxSelection):
3669         (WebCore::HTMLSelectElement::scrollToSelection):
3670         * html/HTMLSelectElement.h:
3671
3672 2007-02-22  Zack Rusin  <zrusin@trolltech.com>
3673
3674         Reviewed by Lars
3675
3676         Fix sites with fixed positioned backgrounds.
3677
3678         * platform/qt/ScrollViewQt.cpp:
3679         (WebCore::ScrollView::setStaticBackground):
3680
3681 2007-02-22  Zack Rusin  <zrusin@trolltech.com>
3682
3683         Reviewed by Lars
3684
3685         Properly implement canvas/scrollview's. Get
3686         rid of ScrollViewCanvas and replace it with
3687         a tailor abstractscrollview (now in qwebframe).
3688         Scrolling of pages is finally completely smooth.
3689
3690         * WebCore.pro:
3691         * platform/ScrollView.h:
3692         * platform/qt/ScrollViewCanvasQt.cpp: Removed.
3693         * platform/qt/ScrollViewCanvasQt.h: Removed.
3694         * platform/qt/ScrollViewQt.cpp:
3695         (WebCore::ScrollView::ScrollView):
3696         (WebCore::ScrollView::setScrollArea):
3697         (WebCore::ScrollView::updateContents):
3698         (WebCore::ScrollView::resizeContents):
3699         (WebCore::ScrollView::contentsWidth):
3700         (WebCore::ScrollView::contentsHeight):
3701         (WebCore::ScrollView::contentsToWindow):
3702         (WebCore::ScrollView::windowToContents):
3703         (WebCore::ScrollView::addChild):
3704         * platform/qt/WidgetQt.cpp:
3705         (WebCore::WidgetPrivate::canvas):
3706         (WebCore::WidgetPrivate::parentScroll):
3707         (WebCore::WidgetPrivate::setGeometry):
3708         (WebCore::WidgetPrivate::geometry):
3709         (WebCore::Widget::frameGeometry):
3710         (WebCore::Widget::setQWidget):
3711         (WebCore::Widget::setFrameGeometry):
3712
3713 2007-02-21  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
3714
3715         Reviewed by Adam Roben.
3716
3717         Improve notImplemented() macro for gdk. Rename to notImplementedGdk() to
3718         give it a unique name (so that it doesn't clash with notImplemented()
3719         for other platforms).
3720         Make it print a given warning only once, so that frequently called
3721         functions don't clutter the output.
3722         Don't print the warning if DISABLE_NI_WARNING env variable is set.
3723
3724         * loader/gdk/FrameLoaderClientGdk.cpp:
3725         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveAuthenticationChallenge):
3726         (WebCore::FrameLoaderClientGdk::dispatchDidCancelAuthenticationChallenge):
3727         (WebCore::FrameLoaderClientGdk::dispatchWillSendRequest):
3728         (WebCore::FrameLoaderClientGdk::assignIdentifierToInitialRequest):
3729         (WebCore::FrameLoaderClientGdk::createPlugin):
3730         (WebCore::FrameLoaderClientGdk::createFrame):
3731         (WebCore::FrameLoaderClientGdk::redirectDataToPlugin):
3732         (WebCore::FrameLoaderClientGdk::createJavaAppletWidget):
3733         (WebCore::FrameLoaderClientGdk::objectContentType):
3734         (WebCore::FrameLoaderClientGdk::overrideMediaType):
3735         (WebCore::FrameLoaderClientGdk::windowObjectCleared):
3736         (WebCore::FrameLoaderClientGdk::hasWebView):
3737         (WebCore::FrameLoaderClientGdk::hasFrameView):
3738         (WebCore::FrameLoaderClientGdk::frameLoadCompleted):
3739         (WebCore::FrameLoaderClientGdk::saveViewStateToItem):
3740         (WebCore::FrameLoaderClientGdk::restoreViewState):
3741         (WebCore::FrameLoaderClientGdk::privateBrowsingEnabled):
3742         (WebCore::FrameLoaderClientGdk::makeDocumentView):
3743         (WebCore::FrameLoaderClientGdk::makeRepresentation):
3744         (WebCore::FrameLoaderClientGdk::forceLayout):
3745         (WebCore::FrameLoaderClientGdk::forceLayoutForNonHTML):
3746         (WebCore::FrameLoaderClientGdk::setCopiesOnScroll):
3747         (WebCore::FrameLoaderClientGdk::detachedFromParent1):
3748         (WebCore::FrameLoaderClientGdk::detachedFromParent2):
3749         (WebCore::FrameLoaderClientGdk::detachedFromParent3):
3750         (WebCore::FrameLoaderClientGdk::detachedFromParent4):
3751         (WebCore::FrameLoaderClientGdk::loadedFromPageCache):
3752         (WebCore::FrameLoaderClientGdk::dispatchDidHandleOnloadEvents):
3753         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveServerRedirectForProvisionalLoad):
3754         (WebCore::FrameLoaderClientGdk::dispatchDidCancelClientRedirect):
3755         (WebCore::FrameLoaderClientGdk::dispatchWillPerformClientRedirect):
3756         (WebCore::FrameLoaderClientGdk::dispatchDidChangeLocationWithinPage):
3757         (WebCore::FrameLoaderClientGdk::dispatchWillClose):
3758         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveIcon):
3759         (WebCore::FrameLoaderClientGdk::dispatchDidStartProvisionalLoad):
3760         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveTitle):
3761         (WebCore::FrameLoaderClientGdk::dispatchDidCommitLoad):
3762         (WebCore::FrameLoaderClientGdk::dispatchDidFinishDocumentLoad):
3763         (WebCore::FrameLoaderClientGdk::dispatchDidFirstLayout):
3764         (WebCore::FrameLoaderClientGdk::dispatchShow):
3765         (WebCore::FrameLoaderClientGdk::cancelPolicyCheck):
3766         (WebCore::FrameLoaderClientGdk::dispatchDidLoadMainResource):
3767         (WebCore::FrameLoaderClientGdk::revertToProvisionalState):
3768         (WebCore::FrameLoaderClientGdk::clearUnarchivingState):
3769         (WebCore::FrameLoaderClientGdk::willChangeTitle):
3770         (WebCore::FrameLoaderClientGdk::finishedLoading):
3771         (WebCore::FrameLoaderClientGdk::finalSetupForReplace):
3772         (WebCore::FrameLoaderClientGdk::setDefersLoading):
3773         (WebCore::FrameLoaderClientGdk::isArchiveLoadPending):
3774         (WebCore::FrameLoaderClientGdk::cancelPendingArchiveLoad):
3775         (WebCore::FrameLoaderClientGdk::clearArchivedResources):
3776         (WebCore::FrameLoaderClientGdk::canHandleRequest):
3777         (WebCore::FrameLoaderClientGdk::canShowMIMEType):
3778         (WebCore::FrameLoaderClientGdk::representationExistsForURLScheme):
3779         (WebCore::FrameLoaderClientGdk::generatedMIMETypeForURLScheme):
3780         (WebCore::FrameLoaderClientGdk::provisionalLoadStarted):
3781         (WebCore::FrameLoaderClientGdk::didFinishLoad):
3782         (WebCore::FrameLoaderClientGdk::prepareForDataSourceReplacement):
3783         (WebCore::FrameLoaderClientGdk::setTitle):
3784         (WebCore::FrameLoaderClientGdk::setDocumentViewFromPageCache):
3785         (WebCore::FrameLoaderClientGdk::dispatchDidReceiveContentLength):
3786         (WebCore::FrameLoaderClientGdk::dispatchDidFinishLoading):
3787         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoading):
3788         (WebCore::FrameLoaderClientGdk::dispatchDidLoadResourceFromMemoryCache):
3789         (WebCore::FrameLoaderClientGdk::dispatchDidFailProvisionalLoad):
3790         (WebCore::FrameLoaderClientGdk::dispatchDidFailLoad):
3791         (WebCore::FrameLoaderClientGdk::download):
3792         (WebCore::FrameLoaderClientGdk::cancelledError):
3793         (WebCore::FrameLoaderClientGdk::cannotShowURLError):
3794         (WebCore::FrameLoaderClientGdk::interruptForPolicyChangeError):
3795         (WebCore::FrameLoaderClientGdk::cannotShowMIMETypeError):
3796         (WebCore::FrameLoaderClientGdk::fileDoesNotExistError):
3797         (WebCore::FrameLoaderClientGdk::shouldFallBack):
3798         (WebCore::FrameLoaderClientGdk::willUseArchive):
3799         (WebCore::FrameLoaderClientGdk::saveDocumentViewToPageCache):
3800         (WebCore::FrameLoaderClientGdk::canCachePage):
3801         (WebCore::FrameLoaderClientGdk::dispatchCreatePage):
3802         (WebCore::FrameLoaderClientGdk::dispatchUnableToImplementPolicy):
3803         (WebCore::FrameLoaderClientGdk::setMainDocumentError):
3804         (WebCore::FrameLoaderClientGdk::startDownload):
3805         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForStandardLoad):
3806         (WebCore::FrameLoaderClientGdk::updateGlobalHistoryForReload):
3807         (WebCore::FrameLoaderClientGdk::shouldGoToHistoryItem):
3808         * page/gdk/EventHandlerGdk.cpp:
3809         (WebCore::EventHandler::passMouseDownEventToWidget):
3810         (WebCore::EventHandler::eventActivatedView):
3811         (WebCore::EventHandler::passSubframeEventToSubframe):
3812         (WebCore::EventHandler::passWheelEventToWidget):
3813         (WebCore::EventHandler::createDraggingClipboard):
3814         * platform/gdk/EditorClientGdk.cpp:
3815         (WebCore::EditorClientGdk::shouldDeleteRange):
3816         (WebCore::EditorClientGdk::isContinuousSpellCheckingEnabled):
3817         (WebCore::EditorClientGdk::isGrammarCheckingEnabled):
3818         (WebCore::EditorClientGdk::spellCheckerDocumentTag):
3819         (WebCore::EditorClientGdk::shouldBeginEditing):
3820         (WebCore::EditorClientGdk::shouldEndEditing):
3821         (WebCore::EditorClientGdk::shouldInsertText):
3822         (WebCore::EditorClientGdk::shouldChangeSelectedRange):
3823         (WebCore::EditorClientGdk::shouldApplyStyle):
3824         (WebCore::EditorClientGdk::didBeginEditing):
3825         (WebCore::EditorClientGdk::respondToChangedContents):
3826         (WebCore::EditorClientGdk::didEndEditing):
3827         (WebCore::EditorClientGdk::didWriteSelectionToPasteboard):
3828         (WebCore::EditorClientGdk::didSetSelectionTypesForPasteboard):
3829         (WebCore::EditorClientGdk::selectWordBeforeMenuEvent):
3830         (WebCore::EditorClientGdk::isEditable):
3831         (WebCore::EditorClientGdk::registerCommandForUndo):
3832         (WebCore::EditorClientGdk::registerCommandForRedo):
3833         (WebCore::EditorClientGdk::clearUndoRedoOperations):
3834         (WebCore::EditorClientGdk::canUndo):
3835         (WebCore::EditorClientGdk::canRedo):
3836         (WebCore::EditorClientGdk::undo):
3837         (WebCore::EditorClientGdk::redo):
3838         (WebCore::EditorClientGdk::shouldInsertNode):
3839         (WebCore::EditorClientGdk::pageDestroyed):
3840         (WebCore::EditorClientGdk::smartInsertDeleteEnabled):
3841         (WebCore::EditorClientGdk::toggleContinuousSpellChecking):
3842         (WebCore::EditorClientGdk::textFieldDidBeginEditing):
3843         (WebCore::EditorClientGdk::textFieldDidEndEditing):
3844         (WebCore::EditorClientGdk::textDidChangeInTextField):
3845         (WebCore::EditorClientGdk::doTextFieldCommandFromEvent):
3846         (WebCore::EditorClientGdk::textWillBeDeletedInTextField):
3847         (WebCore::EditorClientGdk::textDidChangeInTextArea):
3848         * platform/gdk/RenderThemeGdk.cpp:
3849         (WebCore::RenderThemeGdk::setCheckboxSize):
3850         (WebCore::RenderThemeGdk::setRadioSize):
3851         (WebCore::RenderThemeGdk::adjustTextFieldStyle):
3852         * platform/gdk/TemporaryLinkStubs.cpp:
3853         (FrameView::updateBorder):
3854         (Widget::setEnabled):
3855         (Widget::isEnabled):
3856         (Widget::focusPolicy):
3857         (Widget::enableFlushDrawing):
3858         (Widget::disableFlushDrawing):
3859         (Widget::lockDrawingFocus):
3860         (Widget::unlockDrawingFocus):
3861         (Widget::removeFromParent):
3862         (Widget::paint):
3863         (Widget::setIsSelected):
3864         (Widget::invalidate):
3865         (Widget::invalidateRect):
3866         (PlatformMouseEvent::PlatformMouseEvent):
3867         (WebCore::findNextSentenceFromIndex):
3868         (WebCore::findSentenceBoundary):
3869         (WebCore::findNextWordFromIndex):
3870         (ChromeClientGdk::chromeDestroyed):
3871         (ChromeClientGdk::windowRect):
3872         (ChromeClientGdk::setWindowRect):
3873         (ChromeClientGdk::pageRect):
3874         (ChromeClientGdk::scaleFactor):
3875         (ChromeClientGdk::focus):
3876         (ChromeClientGdk::unfocus):
3877         (ChromeClientGdk::createWindow):
3878         (ChromeClientGdk::createModalDialog):
3879         (ChromeClientGdk::show):
3880         (ChromeClientGdk::canRunModal):
3881         (ChromeClientGdk::runModal):
3882         (ChromeClientGdk::setToolbarsVisible):
3883         (ChromeClientGdk::toolbarsVisible):
3884         (ChromeClientGdk::setStatusbarVisible):
3885         (ChromeClientGdk::statusbarVisible):
3886         (ChromeClientGdk::setScrollbarsVisible):
3887         (ChromeClientGdk::scrollbarsVisible):
3888         (ChromeClientGdk::setMenubarVisible):
3889         (ChromeClientGdk::menubarVisible):
3890         (ChromeClientGdk::setResizable):
3891         (ChromeClientGdk::closeWindowSoon):
3892         (ChromeClientGdk::canTakeFocus):
3893         (ChromeClientGdk::takeFocus):
3894         (ChromeClientGdk::canRunBeforeUnloadConfirmPanel):
3895         (ChromeClientGdk::addMessageToConsole):
3896         (ChromeClientGdk::runBeforeUnloadConfirmPanel):
3897         (ChromeClientGdk::runJavaScriptAlert):
3898         (ChromeClientGdk::runJavaScriptConfirm):
3899         (ChromeClientGdk::runJavaScriptPrompt):
3900         (ChromeClientGdk::setStatusbarText):
3901         (ChromeClientGdk::shouldInterruptJavaScript):
3902         (ChromeClientGdk::tabsToLinks):
3903         (ChromeClientGdk::windowResizerRect):
3904         (ChromeClientGdk::addToDirtyRegion):
3905         (ChromeClientGdk::scrollBackingStore):
3906         (ChromeClientGdk::updateBackingStore):
3907         (PlugInInfoStore::createPluginInfoForPluginAtIndex):
3908         (PlugInInfoStore::pluginCount):
3909         (WebCore::PlugInInfoStore::supportsMIMEType):
3910         (WebCore::refreshPlugins):
3911         (SearchPopupMenu::saveRecentSearches):
3912         (SearchPopupMenu::loadRecentSearches):
3913         (SearchPopupMenu::SearchPopupMenu):
3914         (PlatformScrollbar::PlatformScrollbar):
3915         (PlatformScrollbar::~PlatformScrollbar):
3916         (PlatformScrollbar::setEnabled):
3917         (PlatformScrollbar::paint):
3918         (PlatformScrollbar::updateThumbPosition):
3919         (PlatformScrollbar::updateThumbProportion):
3920         (PlatformScrollbar::setRect):
3921         (FileChooser::FileChooser):
3922         (FileChooser::~FileChooser):
3923         (FileChooser::openFileChooser):
3924         (FileChooser::basenameForWidth):
3925         (ResourceHandle::willLoadFromCache):
3926         (ResourceHandle::loadsBlocked):
3927         (ResourceHandle::loadResourceSynchronously):
3928         (Icon::Icon):
3929         (Icon::~Icon):
3930         (Icon::newIconForFile):
3931         (Icon::paint):
3932         (Font::drawComplexText):
3933         (Font::floatWidthForComplexText):
3934         (Font::offsetForPositionForComplexText):
3935         (PageCache::close):
3936         (Editor::ignoreSpelling):
3937         (Editor::learnSpelling):
3938         (Editor::isSelectionUngrammatical):
3939         (Editor::isSelectionMisspelled):
3940         (Editor::guessesForMisspelledSelection):
3941         (Editor::guessesForUngrammaticalSelection):
3942         (Editor::markMisspellingsAfterTypingToPosition):
3943         (Editor::newGeneralClipboard):
3944         (Pasteboard::generalPasteboard):
3945         (Pasteboard::writeSelection):
3946         (Pasteboard::writeURL):
3947         (Pasteboard::writeImage):
3948         (Pasteboard::clear):
3949         (Pasteboard::canSmartReplace):
3950         (Pasteboard::documentFragment):
3951         (Pasteboard::plainText):
3952         (Pasteboard::Pasteboard):
3953         (Pasteboard::~Pasteboard):
3954         (ContextMenu::ContextMenu):
3955         (ContextMenu::~ContextMenu):
3956         (ContextMenu::appendItem):
3957         (ContextMenuItem::ContextMenuItem):
3958         (ContextMenuItem::~ContextMenuItem):
3959         (ContextMenuItem::releasePlatformDescription):
3960         (ContextMenuItem::type):
3961         (ContextMenuItem::setType):
3962         (ContextMenuItem::action):
3963         (ContextMenuItem::setAction):
3964         (ContextMenuItem::title):
3965         (ContextMenuItem::setTitle):
3966         (ContextMenuItem::platformSubMenu):
3967         (ContextMenuItem::setSubMenu):
3968         (ContextMenuItem::setChecked):
3969         (ContextMenuItem::setEnabled):
3970         (WebCore::supportedKeySizes):
3971         (WebCore::systemBeep):
3972         (WebCore::userIdleTime):
3973
3974 2007-02-21  Antti Koivisto  <antti@apple.com>
3975
3976         Reviewed by Hyatt.
3977
3978         - fix http://bugs.webkit.org/show_bug.cgi?id=12820
3979         REGRESSION (r19706): Caret not painted after popup, failing editing/pasteboard/4641033
3980
3981         Yet another attempt to figure out exactly who should paint the caret.
3982
3983         * editing/SelectionController.cpp:
3984         (WebCore::SelectionController::isInsideNode):
3985         * editing/SelectionController.h:
3986         * rendering/RenderBlock.cpp:
3987         (WebCore::RenderBlock::paintCaret):
3988
3989 2007-02-21  Mitz Pettel  <mitz@webkit.org>
3990
3991         Reviewed by Hyatt.
3992
3993         - fix http://bugs.webkit.org/show_bug.cgi?id=12818
3994           REGRESSION (r19148): shacknews.com does not render completely
3995
3996         Test: fast/dynamic/staticY-marking-parents-regression.html
3997
3998         Changed calls to setChildNeedsLayout(true) during layout to
3999         setChildNeedsLayout(true, false). Prior to r19148, the default behavior
4000         of marking containers did not matter because the caller was the container
4001         and was already marked, but r19148 added marking of the parent of
4002         objects with static Y, which can be different from the caller and not
4003         necessarily marked already.
4004
4005         * rendering/RenderBlock.cpp:
4006         (WebCore::RenderBlock::collapseMargins):
4007         (WebCore::RenderBlock::clearFloatsIfNeeded):
4008         (WebCore::RenderBlock::layoutBlockChildren):
4009         * rendering/RenderBox.cpp:
4010         (WebCore::RenderBox::setStaticY):
4011         * rendering/RenderFlexibleBox.cpp:
4012         (WebCore::RenderFlexibleBox::layoutVerticalBox):
4013
4014 2007-02-21  Brady Eidson  <beidson@apple.com>
4015
4016         Reviewed by Dave Harrison
4017
4018         <rdar://problem/5014313> - Crash in FrameLoader::restoreScrollPositionAndViewState() 
4019         after regaining network connection
4020
4021         * loader/FrameLoader.cpp:
4022         (WebCore::FrameLoader::restoreScrollPositionAndViewState):  Leave an assertion for debug
4023         build exploration, but gracefully handle the release build case
4024
4025 2007-02-21  Timothy Hatcher  <timothy@apple.com>
4026
4027         Rubber-stamped by Darin.
4028
4029         * bindings/objc/PublicDOMInterfaces.h: Add missing classes that are really public.
4030         Also adds the deprecated selector for getComputedStyle: on DOMDocument.
4031
4032 2007-02-21  Justin Garcia  <justin.garcia@apple.com>
4033
4034         Reviewed by john
4035         
4036         <rdar://problem/5012665>
4037         Removing indent from list moves the caret to the line below
4038
4039         Selection preservation during indent, outdent and list 
4040         operations uses rangeFromLocationAndLength.  Ranges returned 
4041         by rangeFromLocationAndLength were incorrect for locations 
4042         just before the line breaks that are emitted after blocks.  
4043         This is because TextIterator emitted bad ranges for these line 
4044         breaks (ranges that started and ended *after* the block).  
4045         The fix corrects the start but not the end.  This is acceptible 
4046         because there is code in rangeFromLocationAndLength that corrects 
4047         the ends of runs using the start of the run and VisiblePosition 
4048         creation.
4049         
4050         * editing/TextIterator.cpp:
4051         (WebCore::TextIterator::exitNode): Emit a position *inside* 
4052         the block, after its contents.
4053
4054 2007-02-21  Adele Peterson  <adele@apple.com>
4055
4056         Reviewed by Darin.
4057
4058         Fix for <rdar://problem/4999030> Indexing into select element to get to items in the options collection is broken
4059
4060         Test: fast/forms/select-index-setter.html
4061
4062         Added indexSetter for HTMLSelectElement.
4063
4064         * WebCore.xcodeproj/project.pbxproj: Added JSHTMLSelectElementCustom.h
4065
4066         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: (WebCore::JSHTMLOptionsCollection::indexSetter):
4067           Moved code to selectIndexSetter so it can be shared between these classes.
4068         * bindings/js/JSHTMLSelectElementCustom.cpp:
4069         (WebCore::selectIndexSetter): Added.  Moved from JSHTMLOptionsCollection::indexSetter.
4070         (WebCore::JSHTMLSelectElement::indexSetter): Calls selectIndexSetter.
4071         * bindings/js/JSHTMLSelectElementCustom.h: Added.
4072         * html/HTMLSelectElement.idl: Added HasCustomIndexSetter keyword.
4073
4074         * bindings/scripts/CodeGeneratorJS.pm: When generating "put" methods, if the propertyName is a number, call the indexSetter first,
4075           and then call the version of lookupPut that will also try to use the parent's lookup table.  This matches the order of our
4076           old code, before we autogenerated the JSHTMLSelectElement class.
4077
4078 2007-02-21  George Staikos  <staikos@kde.org>
4079
4080         Reviewed by Zack.
4081
4082         Add files to the build.
4083
4084         * WebCore.pro:
4085
4086 2007-02-21  Zack Rusin  <zrusin@trolltech.com>
4087
4088         Reviewed by Lars
4089
4090         Implementing popups for the Qt platform.
4091
4092         * WebCore.pro:
4093         * platform/PopupMenu.h:
4094         * platform/Widget.h:
4095         * platform/qt/PopupMenuQt.cpp:
4096         (WebCore::PopupMenu::PopupMenu):
4097         (WebCore::PopupMenu::clear):
4098         (WebCore::PopupMenu::populate):
4099         (WebCore::PopupMenu::show):
4100         (WebCore::PopupMenu::hide):
4101         * platform/qt/QWebPopup.cpp: Added.
4102         (WebCore::QWebPopup::QWebPopup):
4103         (WebCore::QWebPopup::exec):
4104         (WebCore::QWebPopup::hideEvent):
4105         (WebCore::QWebPopup::activeChanged):
4106         * platform/qt/QWebPopup.h: Added.
4107         * platform/qt/WidgetQt.cpp:
4108         (WebCore::Widget::canvas):
4109
4110 2007-02-21  George Staikos  <staikos@kde.org>
4111
4112         Reviewed by Zack.
4113
4114         Remove unneeded hack now.
4115
4116         * platform/qt/RenderThemeQt.cpp:
4117         (WebCore::RenderThemeQt::setCheckboxSize):
4118
4119 2007-02-21  Zack Rusin  <zrusin@trolltech.com>
4120
4121         Reviewed by Lars
4122
4123         Fix rendering of lineedits and remove the spurious
4124         padding on push-buttons.
4125
4126         * platform/qt/RenderThemeQt.cpp:
4127         (WebCore::RenderThemeQt::baselinePosition):
4128         (WebCore::RenderThemeQt::adjustTextFieldStyle):
4129         (WebCore::RenderThemeQt::sizeForFont):
4130         (WebCore::RenderThemeQt::setButtonPadding):
4131
4132 2007-02-21  Zack Rusin  <zrusin@trolltech.com>
4133
4134         Fix compilation.
4135
4136         * platform/qt/PasteboardQt.cpp:
4137         (WebCore::Pasteboard::writeURL):
4138         (WebCore::Pasteboard::writeImage):
4139
4140 2007-02-20  Adam Roben  <aroben@apple.com>
4141
4142         Preemptive build fix.
4143
4144         * platform/mac/FontCacheMac.mm: Remove unused (and non-existent) header.
4145
4146 2007-02-20  Adam Roben  <aroben@apple.com>
4147
4148         Fix the build the right way.
4149
4150         * platform/StringTruncator.cpp:
4151         (WebCore::truncateString): Keep all widths as floats.
4152
4153 2007-02-20  Beth Dakin  <bdakin@apple.com>
4154
4155         Reviewed by Maciej.
4156
4157         Implement writeImage() on Pasteboard so that the context menus can 
4158         call into the editor for the "Copy image" command instead of 
4159         calling across the clients.
4160
4161         * WebCore.exp:
4162         * WebCore.xcodeproj/project.pbxproj:
4163         * editing/Editor.cpp:
4164         (WebCore::Editor::copyImage): Call into the Pasteboard.
4165         * editing/Editor.h:
4166         * loader/mac/LoaderNSURLExtras.h: A new NSURL extra needed inside 
4167         WebCore.
4168         * loader/mac/LoaderNSURLExtras.m: Made this file Objective-C++ 
4169         (from Objective-C) since the call into the MIMETypeRegistry will 
4170         return a Vector.
4171         (urlByRemovingComponent): Cast to build as Obj-C++
4172         (urlWithDataRelativeToURL): Same.
4173         (vectorContainsString): Helper.
4174         (suggestedFilenameWithMIMEType): New function.
4175         * page/ContextMenuClient.h: Remove copyImageToClipboard()
4176         * page/ContextMenuController.cpp:
4177         (WebCore::ContextMenuController::contextMenuItemSelected): Call 
4178         into the editor instead of the client.
4179         * page/mac/WebCoreViewFactory.h: New localized String.
4180         * platform/LocalizedStrings.h: Same.
4181         * platfor