Fix build. This one was not supposed to be checked in.
[WebKit-https.git] / WebCore / ChangeLog
1 2007-04-02  Antti Koivisto  <antti@apple.com>
2
3         Fix build. This one was not supposed to be checked in.
4
5         * rendering/RenderFlexibleBox.cpp:
6         (WebCore::RenderFlexibleBox::layoutBlock):
7
8 2007-03-30  Antti Koivisto  <antti@apple.com>
9
10         Reviewed by Hyatt.
11
12         Render tree memory savings, part 2
13         
14         - Move staticX and staticY variables to RenderLayer since they are only
15           applicable to positioned objects
16         - Move very rarely used overrideSize variable to hash
17         
18         These changes shrink all box types by 12 bytes
19
20         * rendering/RenderBox.cpp:
21         (WebCore::RenderBox::RenderBox):
22         (WebCore::RenderBox::destroy):
23         (WebCore::RenderBox::overrideSize):
24         (WebCore::RenderBox::setOverrideSize):
25         (WebCore::RenderBox::overrideWidth):
26         (WebCore::RenderBox::overrideHeight):
27         (WebCore::RenderBox::position):
28         (WebCore::RenderBox::calcWidth):
29         (WebCore::RenderBox::calcHeight):
30         (WebCore::RenderBox::staticX):
31         (WebCore::RenderBox::staticY):
32         (WebCore::RenderBox::setStaticX):
33         (WebCore::RenderBox::setStaticY):
34         (WebCore::RenderBox::calcAbsoluteHorizontal):
35         (WebCore::RenderBox::calcAbsoluteVertical):
36         (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
37         (WebCore::RenderBox::calcAbsoluteVerticalReplaced):
38         * rendering/RenderBox.h:
39         * rendering/RenderLayer.cpp:
40         (WebCore::RenderLayer::RenderLayer):
41         * rendering/RenderLayer.h:
42         (WebCore::RenderLayer::staticX):
43         (WebCore::RenderLayer::staticY):
44         (WebCore::RenderLayer::setStaticX):
45         (WebCore::RenderLayer::setStaticY):
46         * rendering/RenderObject.cpp:
47         (WebCore::RenderObject::RenderObject):
48         * rendering/RenderObject.h:
49         (WebCore::):
50         (WebCore::RenderObject::hasOverrideSize):
51         (WebCore::RenderObject::setHasOverrideSize):
52         * rendering/RenderWidget.cpp:
53         (WebCore::RenderWidget::destroy):
54
55 2007-03-31  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
56
57         Not reviewed - gdk build fix.
58
59         * platform/gdk/TemporaryLinkStubs.cpp:
60         (Font::selectionRectForComplexText):
61         (Font::drawComplexText):
62
63 2007-03-31  Alexey Proskuryakov  <ap@webkit.org>
64
65         Reviewed by Darin.
66
67         http://bugs.webkit.org/show_bug.cgi?id=12778
68         REGRESSION: Nightly won't load Curl plugin for full page use
69
70         * dom/DOMImplementation.cpp:
71         (WebCore::DOMImplementation::createDocument): Re-order cases to give more priority to plugins.
72         This also fixes Adobe SVG Viewer and any plugins that register XML MIME types.
73         Added a case for XHTML to avoid enumerating plugins.
74
75 2007-03-31  David Hyatt  <hyatt@apple.com>
76
77         Fix for bug 13234, layout of selected justified text is broken.  Rework TextRuns to avoid having
78         from/to members.  Let those be passed in only by the functions that need them (drawing and selection rect).
79
80         Reviewed by mitz
81
82         fast/text/justified-selection-at-edge.html
83
84         * platform/Font.cpp:
85         (WebCore::WidthIterator::WidthIterator):
86         (WebCore::WidthIterator::advance):
87         (WebCore::Font::canUseGlyphCache):
88         (WebCore::Font::drawSimpleText):
89         (WebCore::Font::drawText):
90         (WebCore::Font::floatWidth):
91         (WebCore::Font::floatWidthForSimpleText):
92         (WebCore::Font::selectionRectForText):
93         (WebCore::Font::selectionRectForSimpleText):
94         (WebCore::Font::offsetForPositionForSimpleText):
95         * platform/Font.h:
96         (WebCore::TextRun::m_len):
97         * platform/graphics/GraphicsContext.cpp:
98         (WebCore::GraphicsContext::drawText):
99         (WebCore::GraphicsContext::drawHighlightForText):
100         * platform/graphics/GraphicsContext.h:
101         * platform/mac/FontMac.mm:
102         (WebCore::addDirectionalOverride):
103         (WebCore::overrideLayoutOperation):
104         (WebCore::ATSULayoutParameters::initialize):
105         (WebCore::Font::selectionRectForComplexText):
106         (WebCore::Font::drawComplexText):
107         (WebCore::Font::floatWidthForComplexText):
108         (WebCore::Font::offsetForPositionForComplexText):
109         * platform/qt/FontQt.cpp:
110         (WebCore::Font::drawComplexText):
111         (WebCore::Font::floatWidthForComplexText):
112         * platform/qt/TemporaryLinkStubs.cpp:
113         (Font::selectionRectForComplexText):
114         * rendering/EllipsisBox.cpp:
115         (WebCore::EllipsisBox::paint):
116         * rendering/InlineTextBox.cpp:
117         (WebCore::InlineTextBox::selectionRect):
118         (WebCore::InlineTextBox::paint):
119         (WebCore::InlineTextBox::paintSelection):
120         (WebCore::InlineTextBox::paintMarkedTextBackground):
121         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
122         (WebCore::InlineTextBox::paintTextMatchMarker):
123         (WebCore::InlineTextBox::offsetForPosition):
124         (WebCore::InlineTextBox::positionForOffset):
125         * rendering/RenderListMarker.cpp:
126         (WebCore::RenderListMarker::paint):
127         (WebCore::RenderListMarker::calcMinMaxWidth):
128         (WebCore::RenderListMarker::getRelativeMarkerRect):
129         * rendering/RenderMenuList.cpp:
130         (WebCore::RenderMenuList::updateOptionsWidth):
131         * rendering/RenderText.cpp:
132         (WebCore::RenderText::widthFromCache):
133         (WebCore::RenderText::width):
134
135 2007-03-31  Mitz Pettel  <mitz@webkit.org>
136
137         Reviewed by Darin.
138
139         - fix http://bugs.webkit.org/show_bug.cgi?id=13243
140               <rdar://problem/5103226>
141           REGRESSION (r20506): Repro crash/assert when using scroll wheel on a list box taller than its contents
142
143         * platform/ScrollBar.cpp:
144         (WebCore::Scrollbar::setValue): Cleaned up a little.
145         (WebCore::Scrollbar::scroll): Changed to apply the minimum and maximum constraints
146         in the right order, and cleaned up a little.
147
148 2007-03-31  Mitz Pettel  <mitz@webkit.org>
149
150         Reviewed by Darin.
151
152         - fix http://bugs.webkit.org/show_bug.cgi?id=13242
153           REGRESSION: Repro crash when specifying the content property for an image
154
155         Test: fast/images/text-content-crash.html
156
157         * html/HTMLImageElement.cpp:
158         (WebCore::HTMLImageElement::parseMappedAttribute): Added a check that the
159         renderer is an image.
160         (WebCore::HTMLImageElement::attach): Ditto.
161
162 2007-03-31  Mark Rowe  <mrowe@apple.com>
163
164         Reviewed by Darin.
165
166         A more correct fix for http://bugs.webkit.org/show_bug.cgi?id=13129
167         Bug 13129: Democracy Player dies in NSException from WebScriptObject on startup
168
169         The previous attempt at a fix in r20343 attempted to conditionally expose the 'count'
170         method.  It did not work which resulted in 'count' always being hidden.  This change
171         disables -[WebScriptObject count] completely until it can be determined whether it is
172         needed and how to support it without breaking third-party applications.
173
174         * bindings/objc/WebScriptObject.mm:
175         (-[WebScriptObject count]):
176         * bindings/objc/WebScriptObjectPrivate.h:
177
178 2007-03-31  Nicholas Shanks  <webkit@nickshanks.com>
179
180         Reviewed by Adele.
181
182         http://bugs.webkit.org/show_bug.cgi?id=13184
183         HTMLImageElement longdesc should be complete resolved URL
184
185         Test: fast/dom/HTMLImageElement/image-longdesc-absolute-url.html
186
187         * html/HTMLImageElement.cpp:
188         (WebCore::HTMLImageElement::longDesc): Return absolute URL.
189         Behaviour now matches Firefox and Opera.
190
191 2007-03-31  Mitz Pettel  <mitz@webkit.org>
192
193         Reviewed by Hyatt.
194
195         - fix http://bugs.webkit.org/show_bug.cgi?id=13209
196           REGRESSION (r18756-18765): Incomplete list marker repaint when resizing list item
197
198         Test: fast/repaint/list-marker-2.html
199
200         A list marker can increase the horizontal overflow after layoutInlineChildren(),
201         so made that function return only the vertical bounds of the repaint rect. As the
202         horizontal bounds, made layoutBlock() just use the overflow bounds after layout.
203
204         * rendering/RenderBlock.cpp:
205         (WebCore::RenderBlock::layoutBlock):
206         * rendering/RenderBlock.h:
207         * rendering/bidi.cpp:
208         (WebCore::RenderBlock::layoutInlineChildren):
209
210 2007-03-31  Mitz Pettel  <mitz@webkit.org>
211
212         Reviewed by Hyatt.
213
214         - http://bugs.webkit.org/show_bug.cgi?id=13178
215           Helvetica zero-width space has non-zero width
216
217         Test: fast/text/wide-zero-width-space.html
218
219         * platform/FontData.cpp:
220         (WebCore::FontData::FontData): Force the ZERO WIDTH SPACE glyph to have width
221         0, unless the SPACE character maps to the same glyph.
222
223 2007-03-31  Mitz Pettel  <mitz@webkit.org>
224
225         Reviewed by Darin.
226
227         - fix http://bugs.webkit.org/show_bug.cgi?id=8016
228           REPRO: Safari hangs loading 18 MB page (deeply nested DOM tree)
229
230         Test: fast/tokenizer/lessthan-terminates-tags-and-attrs.html
231
232         * html/HTMLTokenizer.cpp:
233         (WebCore::HTMLTokenizer::parseTag): Made "<" terminate tag and attribute
234         names. This matches Firefox.
235
236 2007-03-31  Alexey Proskuryakov  <ap@webkit.org>
237
238         Debug build fix.
239
240         * xml/XPathValue.cpp:
241         (WebCore::XPath::): Define Value::adopt.
242
243 2007-03-30  Alexey Proskuryakov  <ap@webkit.org>
244
245         Reviewed by Darin.
246
247         http://bugs.webkit.org/show_bug.cgi?id=13021
248         XPath can be very slow
249
250         This patch finally makes us faster than Firefox 2.0 on this test case.
251
252         * xml/XPathFunctions.cpp:
253         (WebCore::XPath::FunConcat::evaluate): Use a Vector buffer for faster appending.
254         (WebCore::XPath::FunId::evaluate): Move the result NodeSet into Value instead of copying it.
255         (WebCore::XPath::FunLocalName::evaluate): Cosmetic changes.
256         (WebCore::XPath::FunNamespaceURI::evaluate): Ditto.
257         (WebCore::XPath::FunName::evaluate): Ditto.
258         (WebCore::XPath::FunNormalizeSpace::evaluate): Ditto.
259
260         * xml/XPathValue.cpp:
261         (WebCore::XPath::Value::toNodeSet):
262         (WebCore::XPath::Value::modifiableNodeSet):
263         (WebCore::XPath::Value::toBoolean):
264         (WebCore::XPath::Value::toNumber):
265         (WebCore::XPath::Value::toString):
266         * xml/XPathValue.h:
267         (WebCore::XPath::ValueData::ValueData):
268         (WebCore::XPath::Value::Value):
269         Made Value copying faster by putting large data members into a separate refcounted ValueData class.
270         Added provisions for moving a NodeSet in and out of Value without copying.
271         Made construction safer by moving bool version to a template constructor.
272         Removed an (almost) unused default constructor.
273
274         * xml/XPathPredicate.h: Store a Value for literal string and number expressions to avoid 
275         constructing one each time.
276
277         * xml/XPathPath.cpp:
278         (WebCore::XPath::Filter::evaluate):
279         (WebCore::XPath::LocationPath::evaluate):
280         (WebCore::XPath::Path::evaluate):
281         * xml/XPathPath.h:
282         * xml/XPathPredicate.cpp:
283         (WebCore::XPath::NumericOp::evaluate):
284         (WebCore::XPath::Union::evaluate):
285         * xml/XPathResult.cpp:
286         (WebCore::XPathResult::snapshotItem):
287         * xml/XPathStep.cpp:
288         (WebCore::XPath::Step::evaluate):
289         (WebCore::XPath::Step::nodesInAxis):
290         * xml/XPathStep.h:
291         Got rid of unnecessary NodeSet copying in many cases.
292
293 2007-03-30  Justin Garcia  <justin.garcia@apple.com>
294
295         Reviewed by john
296
297         <rdar://problem/5076323> Only one To Do can be created by a selection in a message
298
299         When Mail's ToDoify operation called moveToEndOfDocument: 
300         with a selection that started just before a ToDo, we'd 
301         move them to the end of the document, not to the end
302         of the editable root, because we incorrectly checked
303         for the editability of positions before ToDos.  Then Mail
304         would refuse to create a ToDo because the selection was 
305         outside of the region where they allowed editing.
306
307         * editing/SelectionController.cpp:
308         (WebCore::SelectionController::modifyExtendingRightForward):
309         Check the position for editability, not the position's node,
310         since there are editable positions of the form [node, offset]
311         where node is contenteditable=false.
312         Re-use pos.  Nothing that happens after it's created can invalidate
313         it or the position and affinity used to create it.
314         (WebCore::SelectionController::modifyMovingRightForward): Ditto.
315         (WebCore::SelectionController::modifyExtendingLeftBackward): Ditto.
316         (WebCore::SelectionController::modifyMovingLeftBackward): Ditto.
317         * rendering/RenderBlock.cpp:
318         (WebCore::RenderBlock::paintCaret): Ditto.
319
320 2007-03-30  Adele Peterson  <adele@apple.com>
321
322         Reviewed by Darin.
323
324         Added DeleteWordBackward and DeleteWordForward to execCommand.
325
326         * editing/Editor.cpp:
327         (WebCore::execDeleteWordBackward):
328         (WebCore::execDeleteWordForward):
329         (WebCore::CommandEntry::):
330
331 2007-03-30  Simon Hausmann  <hausmann@kde.org>
332
333         Reviewed by Zack
334
335         * WebCore.pro: Fix release Qt builds.
336
337 2007-03-30  Antti Koivisto  <antti@apple.com>
338
339         Reviewed by bdash.
340
341         Spotted an int that should be float in previous patch.
342
343         * platform/Font.cpp:
344         (WebCore::WidthIterator::advance):
345
346 2007-03-30  Antti Koivisto  <antti@apple.com>
347
348         Reviewed by Hyatt.
349
350         Render tree memory savings, part 1
351         
352         - Eliminate caching of monospace char width from RenderText. This optimization is not needed
353           anymore since Font already caches space width (RenderText -4 bytes)
354         - Eliminate caching of tab width from RenderBlock. Similary this optimization has become
355           obsolete (RenderBlock -4 bytes)
356
357         * platform/Font.cpp:
358         (WebCore::WidthIterator::advance):
359         (WebCore::Font::spaceWidth):
360         * platform/Font.h:
361         (WebCore::Font::tabWidth):
362         * platform/TextStyle.h:
363         (WebCore::TextStyle::TextStyle):
364         (WebCore::TextStyle::allowTabs):
365         * rendering/InlineTextBox.cpp:
366         (WebCore::InlineTextBox::selectionRect):
367         (WebCore::InlineTextBox::paint):
368         (WebCore::InlineTextBox::paintSelection):
369         (WebCore::InlineTextBox::paintMarkedTextBackground):
370         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
371         (WebCore::InlineTextBox::paintTextMatchMarker):
372         (WebCore::InlineTextBox::offsetForPosition):
373         (WebCore::InlineTextBox::positionForOffset):
374         * rendering/RenderBlock.cpp:
375         (WebCore:::RenderFlow):
376         (WebCore::RenderBlock::setStyle):
377         * rendering/RenderBlock.h:
378         * rendering/RenderObject.cpp:
379         * rendering/RenderObject.h:
380         * rendering/RenderText.cpp:
381         (WebCore::RenderText::RenderText):
382         (WebCore::RenderText::setStyle):
383         (WebCore::RenderText::widthFromCache):
384         (WebCore::RenderText::trimmedMinMaxWidth):
385         (WebCore::RenderText::calcMinMaxWidthInternal):
386         (WebCore::RenderText::setTextInternal):
387         (WebCore::RenderText::width):
388         * rendering/RenderText.h:
389         (WebCore::RenderText::allowTabs):
390         * rendering/bidi.cpp:
391
392 2007-03-30  David Hyatt  <hyatt@apple.com>
393
394         Fix (take 2) for bug 4334, flickering when floating elements gain/lose transparency.
395
396         Reviewed by mitz
397
398         * rendering/RenderBlock.cpp:
399         * rendering/RenderBlock.h:
400         * rendering/RenderBox.cpp:
401         (WebCore::RenderBox::setStyle):
402
403 2007-03-29  Mitz Pettel  <mitz@webkit.org>
404
405         Reviewed by Darin.
406
407         - fix http://bugs.webkit.org/show_bug.cgi?id=13166
408           REGRESSION (2005-10-16 - 2005-10-19): Ampersands showing up in the last column of the Gmail contacts table
409
410         Test: fast/tokenizer/write-partial-entity.html
411
412         * html/HTMLTokenizer.cpp:
413         (WebCore::HTMLTokenizer::parseTag): Reordered to avoid resetting the buffer position
414         after script execution which can write to the buffer.
415
416 2007-03-29  Justin Garcia  <justin.garcia@apple.com>
417
418         Reviewed by john
419
420         <rdar://problem/5099303> Deleting after a ToDo puts the caret in the wrong position
421         
422         We were failing to create the correct selection 
423         for DeleteSelectionCommand because the selection extension 
424         operations don't skip over non-editable content for editable 
425         selections.
426
427         * editing/SelectionController.cpp:
428         (WebCore::SelectionController::modifyExtendingRightForward):
429         When extending an editable selection, don't extend into
430         non-editable content.
431         (WebCore::SelectionController::modifyExtendingLeftBackward):
432         Ditto.
433
434 2007-03-29  Patti Hoa  <patti@apple.com>
435
436         Reviewed by harrison.
437
438         <rdar://problem/4918397> Exception raise inspecting note contents in the background
439         * WebCore.xcodeproj/project.pbxproj:
440         * bridge/mac/WebCoreAXObject.mm:
441         (-[WebCoreAXObject subrole]):
442         (-[WebCoreAXObject title]):
443         Check that attachment supports the attribute before requesting it.
444
445 2007-03-29  Justin Garcia  <justin.garcia@apple.com>
446
447         Reviewed by john
448
449         <rdar://problem/5032066> Delete should work between ToDos
450         
451         Stop selecting the table when the user attempts to delete
452         the line break just after it, instead, extend the selection
453         into the last table cell.
454         Let deletion merge content into table cells (as long as 
455         its not from another table cell).  
456         Start calling shouldInsertNode:replacingDOMRange:givenAction: 
457         when moving content with moveParagraphs, so that Mail can 
458         modify content before it is moved into a ToDo during a delete.
459
460         * editing/CompositeEditCommand.cpp:
461         (WebCore::CompositeEditCommand::moveParagraphs): Ask the
462         delegate before performing the move.  This will let Mail
463         prevent styles from entering a ToDo.
464         Added a FIXME about adding a new WebViewInsertAction
465         * editing/DeleteSelectionCommand.cpp:
466         (WebCore::DeleteSelectionCommand::initializePositionData):
467         Allow merging into table cells from content not in a table.
468         * editing/SelectionController.cpp:
469         (WebCore::SelectionController::modifyExtendingRightForward):
470         Don't select the table when extending by character/word from
471         just before it.  This code was here to make it easier to select
472         tables in order to delete them, but the deletion UI makes it 
473         largely unnecessary.
474         (WebCore::SelectionController::modifyExtendingLeftBackward):
475         Ditto.
476         * editing/TypingCommand.cpp:
477         (WebCore::isFirstPositionAfterTable): Added.
478         (WebCore::isLastPositionBeforeTable): Ditto.
479         (WebCore::TypingCommand::deleteKeyPressed): When pressing
480         the delete key with a caret at the beginning of a paragraph
481         just after a table, move the paragraph into the last table
482         cell.
483         Do not do this if it would mean moving a block table.
484         Removed some old irrelevant comments.
485         * editing/htmlediting.cpp: Removed unused functions.
486         * editing/htmlediting.h:
487
488 2007-03-29  Adam Treat  <adam@staikos.net>
489
490         Reviewed and committed by George Staikos.
491
492         Remove redundant line.
493
494         * platform/qt/FontDataQt.cpp:
495         (WebCore::FontData::platformInit):
496
497 2007-03-29  Adam Treat  <adam@staikos.net>
498
499         Reviewed by David Hyatt, committed by George Staikos.
500
501         Test: fast/text/justified-selection.html
502
503         Take into account the entire run length to get a proper selection.
504
505         * platform/Font.cpp:
506         (WebCore::WidthIterator::WidthIterator):
507
508 2007-03-29  David Hyatt  <hyatt@apple.com>
509
510         Fix for <rdar://problem/4545060>, technorati and arstechnica fail because of getComputedStyle not
511         reporting display:none properly when it is set.  This is bugzilla bug 13103.
512
513         Reviewed by mitz
514
515         * css/CSSComputedStyleDeclaration.cpp:
516         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
517
518 2007-03-28  Oliver Hunt  <oliver@apple.com>
519
520         Reviewed by Hyatt.
521
522         Rename DocLoader::setPasteInProgress, etc to more generic 
523         setAllowStaleResources, etc
524
525         * editing/Editor.cpp:
526         (WebCore::Editor::paste):
527         * loader/DocLoader.cpp:
528         (WebCore::DocLoader::DocLoader):
529         (WebCore::DocLoader::checkForReload):
530         * loader/DocLoader.h:
531         (WebCore::DocLoader::setAllowStaleResources):
532         * page/DragController.cpp:
533         (WebCore::DragController::concludeDrag):
534
535 2007-03-28  Oliver Hunt  <oliver@apple.com>
536
537         Reviewed by Anders and Steve.
538
539         Add a flag to DocLoader to prevent it from reloading 
540         when performing a paste or drop operation.
541         
542         Remove m_cachePolicy from CachedResource as it is never used
543         
544         Fixes rdar://problem/5044366 : REGRESSION: Repro ASSERT failures 
545         dragging image into GMail message in _web_writeImage and 
546         documentFragmentFromDragData
547
548         * editing/Editor.cpp:
549         (WebCore::Editor::paste):
550           prevent the docloader from reloading resources on paste
551         * html/HTMLImageLoader.cpp:
552         (WebCore::HTMLImageLoader::updateFromElement):
553         * loader/Cache.cpp:
554         (WebCore::createResource):
555         * loader/CachedCSSStyleSheet.cpp:
556         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
557         * loader/CachedCSSStyleSheet.h:
558         * loader/CachedImage.cpp:
559         (WebCore::CachedImage::CachedImage):
560         * loader/CachedImage.h:
561         * loader/CachedResource.cpp:
562         (WebCore::CachedResource::CachedResource):
563         * loader/CachedResource.h:
564         * loader/CachedScript.cpp:
565         (WebCore::CachedScript::CachedScript):
566         * loader/CachedScript.h:
567         * loader/CachedXBLDocument.cpp:
568         (WebCore::CachedXBLDocument::CachedXBLDocument):
569         * loader/CachedXBLDocument.h:
570         * loader/CachedXSLStyleSheet.cpp:
571         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
572         * loader/CachedXSLStyleSheet.h:
573         * loader/DocLoader.cpp:
574         (WebCore::DocLoader::DocLoader):
575            Tidy up constructor initialise new field
576         (WebCore::DocLoader::checkForReload):
577            Prevent reload when pasting
578         * loader/DocLoader.h:
579         (WebCore::DocLoader::setPasteInProgress):
580           new field and setter
581         * page/DragController.cpp:
582         (WebCore::DragController::concludeDrag):
583           prevent the docloader from reloading resources on drop
584
585 2007-03-27  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
586
587         Not reviewed - fix typo in gdk build.
588
589         * platform/gdk/ScrollViewGdk.cpp:
590         (WebCore::ScrollView::contentsToWindow):
591
592 2007-03-28  Maciej Stachowiak  <mjs@apple.com>
593         
594         Reviewed by Darin.
595         
596         - fixed <rdar://problem/4820817> Autoscroll is broken in Mail.app (message jumps around when trying to select text)
597                 
598         Handle scrolling external scrollviews around the webview during
599         autoscroll or when scrolling into view.
600         
601         This should also restore performance on BenchJS test 6 lost due to Tim's partial fix.
602
603         * page/FrameView.cpp:
604         (WebCore::FrameView::scrollRectIntoViewRecursively):
605         * page/FrameView.h:
606         * platform/ScrollView.h:
607         * platform/gdk/ScrollViewGdk.cpp:
608         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
609         (WebCore::ScrollView::scrollRectIntoViewRecursively):
610         * platform/mac/ScrollViewMac.mm:
611         (WebCore::ScrollView::visibleContentRect):
612         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
613         (WebCore::ScrollView::scrollRectIntoViewRecursively):
614         (WebCore::ScrollView::updateContents):
615         * platform/qt/ScrollViewQt.cpp:
616         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
617         (WebCore::ScrollView::scrollRectIntoViewRecursively):
618         * platform/win/ScrollViewWin.cpp:
619         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers):
620         * platform/win/TemporaryLinkStubs.cpp:
621         (WebCore::ScrollView::scrollRectIntoViewRecursively):
622         * rendering/RenderLayer.cpp:
623         (WebCore::RenderLayer::scrollRectToVisible):
624        
625 2007-03-28  Jungshik Shin  <jungshik.shin@gmail.com>
626
627         Reviewed  and landed by Darin
628
629         Get rid of some misuses of |islower| and |tolower| for non-ASCII characters.
630         http://bugs.webkit.org/show_bug.cgi?id=13138
631
632         * platform/StringImpl.cpp:
633         (WebCore::StringImpl::isLower):
634         (WebCore::StringImpl::lower):
635         (WebCore::StringImpl::equalIgnoringCase):
636
637 2007-03-28  Antti Koivisto  <antti@apple.com>
638
639         Reviewed by Hyatt.
640
641         Fix <rdar://problem/5092653>
642         REGRESSION: Image decoding making scrolling slow
643         
644         If decoder gave back a null frame (which I think happens regularly if you don't have full frame 
645         data yet for image that does not decode incrementally) m_decodedSize was incremented anyway. This
646         led to massive growth in calculated image size and eventually made cache prune constantly. 
647         
648         No test, I don't know how to make one for this.
649
650         * platform/graphics/BitmapImage.cpp:
651         (WebCore::BitmapImage::cacheFrame):
652
653 2007-03-28  Adele Peterson  <adele@apple.com>
654
655         Reviewed by Kevin M.
656
657         WebCore part of fix for <rdar://problem/5095515> VitalSource Bookshelf should not pass return statements into stringByEvaluatingJavaScriptFromString
658
659         * page/mac/WebCoreFrameBridge.mm: (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
660         Convert return value to a string.  This matches the behavior in Safari 2.0.
661
662 2007-03-28  Alexey Proskuryakov  <ap@webkit.org>
663
664         Reviewed by Darin.
665
666         http://bugs.webkit.org/show_bug.cgi?id=13190
667         XPath incorrectly handles namespaces on attributes
668
669         * xml/XPathStep.cpp:
670         (WebCore::XPath::Step::nodesInAxis): Added a special case for faster attribute lookup; gives a slight but 
671         measurable performance improvement for bug 13021.
672         (WebCore::XPath::Step::nodeMatches): Fixed NameTest for attribute nodes.
673
674         * xml/XPathStep.h:
675         (WebCore::XPath::Step::NodeTest::NodeTest):
676         (WebCore::XPath::Step::NodeTest::namespaceURI):
677         (WebCore::XPath::Step::nodeTest):
678         (WebCore::XPath::Step::setNodeTest):
679         Move m_namespaceURI to NodeTest, where it belongs. Removed unused m_nodeTestData (oops!).
680
681         * xml/XPathGrammar.y:
682         * xml/XPathPath.cpp:
683         (WebCore::XPath::LocationPath::optimizeStepPair):
684         Accounted for the above change.
685
686 2007-03-28  Oliver Hunt  <oliver@apple.com>
687
688         rs=Hyatt.
689
690         Rollout local changes :-/
691
692         * loader/Cache.cpp:
693         (WebCore::Cache::pruneAllResources):
694         (WebCore::Cache::remove):
695
696 2007-03-28  Oliver Hunt  <oliver@apple.com>
697
698         Reviewed by Hyatt.
699
700         Roll out r20511 due to incredible badness
701
702         * loader/Cache.cpp:
703         (WebCore::Cache::pruneAllResources):
704         (WebCore::Cache::remove):
705
706 2007-03-27  Oliver Hunt  <oliver@apple.com>
707
708         Reviewed by Adam.
709
710         Don't enforce text-selection drag delay when we are
711         going to drag an image anyway.
712
713         Fixes rdar://problem/4668935
714
715         * page/EventHandler.cpp:
716         (WebCore::EventHandler::handleDrag):
717
718 2007-03-27  Justin Garcia  <justin.garcia@apple.com>
719
720         Build fix
721         
722         * editing/markup.cpp:
723         (WebCore::startMarkup):
724
725 2007-03-27  Justin Garcia  <justin.garcia@apple.com>
726
727         Reviewed by darin
728         
729         <rdar://problem/5091898> REGRESSION: GMail Editor: A line of underlined text copied with Select All pastes with wrong font family
730         
731         createMarkup skipped elements if they were blocks
732         when called from moveParagraphs (because that function 
733         must receive only inline content).  This patch adds 
734         code to inline these blocks instead of skipping them 
735         so that we don't lose any of the style that they 
736         contribute to the copied markup.
737
738         * editing/markup.cpp:
739         (WebCore::startMarkup): Add an inlineBlocks option.
740         Make sure to overwrite display:block coming from
741         a style sheet or the inline style declaration.
742         (WebCore::createMarkup): Don't refuse to include a 
743         specialCommonAncestor that's a block if we were asked 
744         to include only inline content, since we can now inline 
745         block elements in startMarkup.
746
747 2007-03-27  Adele Peterson  <adele@apple.com>
748
749         Reviewed by Hyatt.
750
751         Fix for <rdar://problem/5026141> REGRESSION: Aperture Viewer Flashes when switching from Index Page to Detail page in Web Gallery
752
753         This disables the paint that occurs after WebCore finishes loading the document.  We should reenable this when we
754         move the dispatchDidFinishLoad delegate callback to happen around the same time as the JS onload call.  See <rdar://problem/5092361>.
755
756         * dom/Document.cpp: (WebCore::Document::implicitClose):
757
758 2007-03-26  Justin Garcia  <justin.garcia@apple.com>
759
760         Reviewed by darin
761         
762         <rdar://problem/5065910> REGRESSION: In Mail and GMail, Can't apply color to pasted line of text
763         <rdar://problem/5084241> After deleting a paragraph of colored text, can't change text color
764         <rdar://problem/5065605> REGRESSION: Text copied with Select All + Copy loses color on Paste
765         <rdar://problem/4916887> GMAIL: Can't apply color to text once it becomes indented
766
767         * css/CSSComputedStyleDeclaration.cpp:
768         (WebCore::CSSComputedStyleDeclaration::copyInheritableProperties):
769         If a node's text fill color is invalid, then its children use 
770         their font-color as their text fill color (they don't inherit 
771         it).  Likewise for stroke color.
772
773 2007-03-27  Anders Carlsson  <acarlsson@apple.com>
774
775         * platform/ScrollBar.h:
776         Use wtf/MathExtras.h instead of math.h
777
778 2007-03-27  Zack Rusin  <zrusin@trolltech.com>
779
780         Fix the compile - when using math.h functions
781         actually include the header with them.
782
783         * platform/ScrollBar.h:
784
785 2007-03-27  Oliver Hunt  <oliver@apple.com>
786
787         Reviewed by Maciej.
788
789         The WebArchiver needs all the subresources of a document to be accessible
790         through the DocLoader, so we can't remove a CachedResource simultaneously
791         from the global Cache and all DocLoaders, just because it needs to be 
792         reloaded in one.
793
794         Fixes rdar://problem/5044366
795
796         * loader/Cache.cpp:
797         (WebCore::Cache::remove):
798            Don't evict the resource from all DocLoaders
799         * manual-tests/test-iframes-loading-the-same-resource.html: Added.
800            Alas it wasn't possible to make a nice layout test, even this manual test
801            is not entirely deterministic
802
803 2007-03-27  Mark Rowe  <mrowe@apple.com>
804
805         Build fix.
806
807         * platform/GlyphBuffer.h:
808         (WebCore::GlyphBuffer::clear):
809
810 2007-03-27  Dave Hyatt  <hyatt@apple.com>
811
812         Add support for glyph offsets to the GlyphBuffer.
813        
814         Reviewed by olliej
815
816         * platform/Font.cpp:
817         (WebCore::Font::drawGlyphBuffer):
818         * platform/GlyphBuffer.h:
819         (WebCore::GlyphBuffer::clear):
820         (WebCore::GlyphBuffer::swap):
821         (WebCore::GlyphBuffer::offsetAt):
822         (WebCore::GlyphBuffer::add):
823
824 2007-03-27  Antti Koivisto  <antti@apple.com>
825
826         Keep buildbot happy.
827
828         * platform/mac/PlatformScrollBarMac.mm:
829         (WebCore::PlatformScrollbar::scrollbarHit):
830
831 2007-03-26  Antti Koivisto  <antti@apple.com>
832
833         Reviewed by Darin.
834         
835         On Mac, support fine grained wheel events generated by trackpad and Mighty Mouse.
836         http://bugs.webkit.org/show_bug.cgi?id=13134
837         <rdar://problem/5076249?
838
839         * WebCore.exp:
840             Export _wkGetWheelEventDeltas
841         * page/EventHandler.cpp:
842         (WebCore::EventHandler::handleWheelEvent):
843             Remove (0, 0) scroll event hack, it is not needed anymore.
844             Do per-pixel scrolling for fine grained events.
845         * platform/PlatformWheelEvent.h:
846         (WebCore::PlatformWheelEvent::isContinuous):
847             Add new m_isContinuous boolean to indicate fine grained wheel events.
848         * platform/ScrollBar.cpp:
849         (WebCore::Scrollbar::Scrollbar):
850         (WebCore::Scrollbar::setValue):
851         (WebCore::Scrollbar::setSteps):
852         (WebCore::Scrollbar::scroll):
853         * platform/ScrollBar.h:
854         (WebCore::Scrollbar::value):
855             Use float to represent current position to support finer grained scrolling.
856             Add ScrollByPixel, remove ScrollByWheel (which was same as ScrollByLine anyway)
857         * platform/ScrollTypes.h:
858         (WebCore::):
859         * platform/gdk/WheelEventGdk.cpp:
860         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
861             Initalize m_isContinuous
862         * platform/mac/WebCoreSystemInterface.h:
863         * platform/mac/WebCoreSystemInterface.mm:
864             Add wkGetWheelEventDeltas for getting fine grained wheel events
865         * platform/mac/WheelEventMac.mm:
866         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
867             Get the wheel deltas using new wkGetWheelEventDeltas interface
868         * platform/qt/WheelEventQt.cpp:
869         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
870             Initalize m_isContinuous
871         * rendering/RenderListBox.cpp:
872         (WebCore::RenderListBox::calcHeight):
873             Pass item height to scrollbar
874
875 2007-03-26  Geoffrey Garen  <ggaren@apple.com>
876
877         Reviewed by Darin Adler.
878
879         Fixed <rdar://problem/5088234> REGRESSION: Crash occurs at WebCore::Node::
880         createRendererIfNeeded() when changing map views with MS Virtual Earth 
881         (http://www.ziprealty.com/)
882         
883         The cause of the crash was the insertion of a <script> element whose
884         script removed it from the document. The <script> element would then be 
885         garbage when the insertion routine went on to attach() it.
886         
887         The solution here is to check that an element is still your child before
888         trying to attach() it. This matches the style of checks we do elsewhere
889         in the node insertion and removal code.
890
891         * dom/ContainerNode.cpp:
892         (WebCore::ContainerNode::insertBefore):
893         (WebCore::ContainerNode::replaceChild):
894         (WebCore::ContainerNode::appendChild):
895
896 2007-03-26  David Carson  <dacarson@gmail.com>
897
898         Reviewed by Darin, landed by Anders.
899
900         Manual test case for: REGRESSION (r19559): Java applet crash
901         http://bugs.webkit.org/show_bug.cgi?id=13142
902         <rdar://problem/5080340>
903
904         * manual-tests/liveconnect-applet-get-boolean.html: Added.
905         * manual-tests/resources/CheckerApplet.class: Added.
906         * manual-tests/resources/CheckerApplet.java: Added.
907
908 2007-03-26  Mitz Pettel  <mitz@webkit.org>
909
910         Reviewed and landed by Darin.
911
912         - fix http://bugs.webkit.org/show_bug.cgi?id=13194
913           <rdar://problem/5087738>
914           REGRESSION: Selection rects are wrong for images in search results from images.google.com
915
916         Test: fast/replaced/selection-rect-in-table-cell.html
917
918         * rendering/RenderReplaced.cpp:
919         (WebCore::RenderReplaced::selectionRect):
920
921 2007-03-26  Geoffrey Garen  <ggaren@apple.com>
922
923         Removed now-stale #includes of <assert.h>.
924         
925         * WebCorePrefix.h:
926         * config.h:
927         * css/CSSGrammar.y:
928         * platform/Arena.cpp:
929         * platform/KURL.cpp:
930         * platform/SegmentedString.h:
931         * rendering/DataRef.h:
932         * rendering/RenderArena.cpp:
933
934 2007-03-26  Geoffrey Garen  <ggaren@apple.com>
935
936         Reviewed by Kevin McCulough.
937
938         Global replace of "assert(" with "ASSERT(" to assist debugging. Removed
939         one instance of commented-out code containing "assert(" instead of replacing it.
940
941 2007-03-25  Antti Koivisto  <antti@apple.com>
942
943         Reviewed by Adam.
944
945         Fix <rdar://problem/5049842>
946         Gmail Editor: Dragging message text in the message body results in a crash at WebCore::Frame::eventHandler()
947
948         Null check frame in m_dragTarget, it might be gone already.
949
950         * page/EventHandler.cpp:
951         (WebCore::EventHandler::updateDragAndDrop):
952         (WebCore::EventHandler::cancelDragAndDrop):
953         (WebCore::EventHandler::performDragAndDrop):
954
955 2007-03-25  Alexey Proskuryakov  <ap@webkit.org>
956
957         Reviewed by Darin.
958
959         A partial fix for http://bugs.webkit.org/show_bug.cgi?id=13021
960         XPath can be very slow
961
962         * xml/XPathExpression.cpp:
963         (WebCore::XPathExpression::evaluate): Reset a reference to the context node, as this may prevent the whole document
964         from being destroyed in time.
965
966         * dom/Attr.cpp:
967         (WebCore::Attr::createTextChild): Instead of calling appendChild(), just do the few operations it really needs to perform.
968         * dom/ContainerNode.h:
969         (WebCore::ContainerNode::fastSetFirstChild):
970         (WebCore::ContainerNode::fastSetLastChild):
971         Added operations that let Attr hack internal ContainerNode data (evil, but fast!).
972
973         * xml/XPathStep.cpp:
974         (WebCore::XPath::Step::evaluate):
975         (WebCore::XPath::Step::nodesInAxis):
976         (WebCore::XPath::Step::nodeMatches):
977         * xml/XPathStep.h:
978         Merged node testing into axis enumeration. This saves a lot of Vector resizing and passing, and is necessary for future 
979         optimizations (sometimes, we can just pick the single result node instead of enumerating and filtering the whole axis).
980
981 2007-03-24  Mitz Pettel  <mitz@webkit.org>
982
983         Reviewed by Darin.
984
985         - fix http://bugs.webkit.org/show_bug.cgi?id=13156
986           REGRESSION (r19621): Pasting breakable content where wrapped line is too long to fit in a textarea fails to draw a horizontal scrollbar
987
988         Test: fast/text/midword-break-after-breakable-char.html
989
990         Breaking in the middle of the word
991         is allowed only if no breaking opportunity between words has occurred yet. The
992         first position on the line should not be considered "between words" even if
993         it is a breaking opportunity.
994         
995         * rendering/bidi.cpp:
996         (WebCore::RenderBlock::findNextLineBreak): Changed according to the above. Also
997         cleaned up a couple of lines.
998
999 2007-03-24  David Hyatt  <hyatt@apple.com>
1000
1001         Fix for bugzilla bug 13187, place a hard limit on the amount of decoded data that WebCore will keep
1002         around even on live pages (pages being displayed in tabs/windows or in the back/forward cache).
1003         Images will decode to paint and once the decoded data exceeds the cache size, the decoded data will be
1004         tossed.
1005
1006         Refine the flushing algorithm to apply the two-pass decode/evict model to each LRU-SP queue individually, rather
1007         than to all the lists at once.  This allows the cache to evict large encoded resources before flushing small
1008         or frequently accessed decoded onces.
1009
1010         Added information on live/decoded data to the cache statistics.
1011
1012         Reviewed by darin
1013
1014         * loader/Cache.cpp:
1015         (WebCore::Cache::Cache):
1016         (WebCore::Cache::pruneLiveResources):
1017         (WebCore::Cache::pruneAllResources):
1018         (WebCore::Cache::setMaximumSize):
1019         (WebCore::Cache::remove):
1020         (WebCore::Cache::lruListFor):
1021         (WebCore::Cache::removeFromLRUList):
1022         (WebCore::Cache::insertInLRUList):
1023         (WebCore::Cache::liveLRUListFor):
1024         (WebCore::Cache::removeFromLiveResourcesList):
1025         (WebCore::Cache::insertInLiveResourcesList):
1026         (WebCore::Cache::addToLiveResourcesSize):
1027         (WebCore::Cache::removeFromLiveResourcesSize):
1028         (WebCore::Cache::adjustSize):
1029         (WebCore::Cache::getStatistics):
1030         * loader/Cache.h:
1031         (WebCore::Cache::TypeStatistic::TypeStatistic):
1032         * loader/CachedImage.cpp:
1033         (WebCore::CachedImage::decodedSizeWillChange):
1034         (WebCore::CachedImage::decodedSizeChanged):
1035         * loader/CachedImage.h:
1036         * loader/CachedResource.cpp:
1037         (WebCore::CachedResource::CachedResource):
1038         (WebCore::CachedResource::ref):
1039         (WebCore::CachedResource::deref):
1040         (WebCore::CachedResource::setEncodedSize):
1041         (WebCore::CachedResource::liveResourceAccessed):
1042         * loader/CachedResource.h:
1043         (WebCore::CachedResource::liveAccessCount):
1044         (WebCore::CachedResource::resetLiveAccessCount):
1045         (WebCore::CachedResource::increaseLiveAccessCount):
1046         * platform/graphics/BitmapImage.cpp:
1047         (WebCore::BitmapImage::destroyDecodedData):
1048         (WebCore::BitmapImage::cacheFrame):
1049         * platform/graphics/ImageObserver.h:
1050         * rendering/RenderBox.cpp:
1051         (WebCore::RenderBox::paintBackgroundExtended):
1052         * rendering/RenderImage.cpp:
1053         (WebCore::RenderImage::paint):
1054         * rendering/RenderListMarker.cpp:
1055         (WebCore::RenderListMarker::paint):
1056         * rendering/RenderObject.cpp:
1057         (WebCore::RenderObject::paintBorderImage):
1058
1059 2007-03-24  Darin Adler  <darin@apple.com>
1060
1061         Reviewed by Mitz.
1062
1063         - fix http://bugs.webkit.org/show_bug.cgi?id=13123
1064           CSS selectors that use :lang, :not, and namespaces do not serialize correctly
1065
1066         Test: fast/css/css-selector-text.html
1067
1068         * css/CSSSelector.cpp: (WebCore::CSSSelector::selectorText): Add the namespace
1069         prefix for tag or attribute names, the sub-selector for :not, and the argument
1070         for :lang.
1071
1072 2007-03-24  Brady Eidson  <beidson@apple.com>
1073
1074         Reviewed by Adam
1075
1076         <rdar://problem/5086210> - Move RetainPtr to WTF
1077
1078         * ForwardingHeaders/wtf/RetainPtr.h: Added.
1079         * WebCore.xcodeproj/project.pbxproj: Removed WebCore/RetainPtr.h
1080         
1081         * history/HistoryItem.h: Changed #include to <wtf/RetainPtr.h>
1082         * history/PageCache.h: Ditto
1083         * page/mac/WebCoreFrameBridge.mm: Ditto
1084         * platform/ContextMenu.h: Ditto
1085         * platform/ContextMenuItem.h: Ditto
1086         * platform/DragImage.h: Ditto
1087         * platform/FileChooser.h: Ditto
1088         * platform/PlatformKeyboardEvent.h: Ditto
1089         * platform/PopupMenu.h: Ditto
1090         * platform/SharedBuffer.h: Ditto
1091         * platform/cf/RetainPtr.h: Removed.
1092         * platform/graphics/Icon.h: Changed #include
1093         * platform/mac/ClipboardMac.h: Ditto
1094         * platform/mac/PasteboardMac.mm: Ditto
1095         * platform/mac/WidgetMac.mm: Ditto
1096         * platform/network/AuthenticationChallenge.h: Ditto
1097         * platform/network/ResourceError.h: Ditto
1098         * platform/network/ResourceHandle.h: Ditto
1099         * platform/network/ResourceRequest.h: Ditto
1100         * platform/network/ResourceResponse.h: Ditto
1101         * rendering/RenderThemeMac.mm: Ditto
1102
1103 2007-03-24  Mitz Pettel  <mitz@webkit.org>
1104
1105         Fix for <rdar://problem/5086797>, layoutPending is now reporting incorrect results, which will lead
1106         to all sorts of layout issues.  This is in bugzilla as 13179.
1107
1108         Reviewed by hyatt
1109
1110         - fix http://bugs.webkit.org/show_bug.cgi?id=13179
1111           REGRESSION (r20410): In debug builds, loading a certain page is suspended until redisplay is forced
1112
1113         Moved the root->needsLayout() check from layoutPending() to needsLayout()
1114         to restore the behavior before r20324.
1115
1116         * page/FrameView.cpp:
1117         (WebCore::FrameView::layoutPending):
1118         (WebCore::FrameView::needsLayout):
1119
1120 2007-03-24  Mitz Pettel  <mitz@webkit.org>
1121
1122         Reviewed by Adele.
1123
1124         - fix http://bugs.webkit.org/show_bug.cgi?id=13180
1125               <rdar://problem/5084478>
1126           Another debug build crash from ASSERTION FAILED: !needsLayout()
1127
1128         No test possible because updateRendering() is always called after script
1129         execution.
1130
1131         * page/FrameView.cpp:
1132         (WebCore::FrameView::layout): Get the layout root after calling recalcStyle()
1133         since a style recalc may result in needing to do start layout at the root.
1134
1135 2007-03-24  Nikolas Zimmermann  <zimmermann@kde.org>
1136
1137         Not reviewed. Build fix.
1138
1139         Fix FloatRect vs. IntRect confusion.
1140
1141         * rendering/RenderSVGImage.cpp:
1142         (WebCore::RenderSVGImage::nodeAtPoint):
1143
1144 2007-03-25  Mark Rowe  <mrowe@apple.com>
1145
1146         Fix incorrect radar number.
1147
1148         * platform/network/mac/ResourceHandleMac.mm:
1149         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
1150
1151 2007-03-23  Nikolas Zimmermann  <zimmermann@kde.org>
1152
1153         Reviewed by Oliver.
1154
1155         Fix all known RenderSVGImage problems.
1156
1157         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12126 (RenderSVGImage seems to suffer from integer overflow)
1158         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12442 (raster images disappearing during script execution (SVG))
1159         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12572 (WebKit does not properly invalidate image region after image load)
1160
1161         Added test: svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html
1162
1163         In RenderSVGImage::paint, do not call shouldPaint() as this will never work properly for SVG renderers, as shouldPaint
1164         doesn't take into account any special SVG transformation (localTransform/absoluteTransform). Just remove the call.
1165
1166         Fix hit detection on RenderSVGImage - it didn't work properly at all. No idea why I didn't notice before.
1167         Thanks Andreas Neumann once again for writing excellent bug reports and pointing me to them :-)
1168
1169         The carto.net navigation tools work as expected now, and also the "dock like" image effect example.
1170
1171         * rendering/RenderSVGImage.cpp:
1172         (WebCore::RenderSVGImage::paint):
1173         (WebCore::RenderSVGImage::nodeAtPoint):
1174
1175 2007-03-24  Mitz Pettel  <mitz@webkit.org>
1176
1177         Reviewed by Dave Hyatt.
1178
1179         - http://bugs.webkit.org/show_bug.cgi?id=13177
1180           Suppress control characters in the ATSUI code path
1181
1182         * platform/mac/FontMac.mm:
1183         (WebCore::overrideLayoutOperation):
1184         (WebCore::ATSULayoutParameters::initialize):
1185
1186 2007-03-24  David Hyatt  <hyatt@apple.com>
1187
1188         Fix for <rdar://problem/5086400>, images scrolled offscreen continue to animate.  Safari 2 would
1189         halt animations when images were no longer visible.
1190
1191         Reviewed by mjs, olliej
1192
1193         * platform/graphics/BitmapImage.cpp:
1194         (WebCore::BitmapImage::advanceAnimation):
1195
1196 2007-03-24  David Hyatt  <hyatt@apple.com>
1197
1198         Fix for <rdar://problem/508328>, sluggish text entry in search field.  Make sure
1199         our size actually changed before we decide to do a full repaint because of background/border
1200         complexities.
1201
1202         Reviewed by aroben
1203
1204         * rendering/RenderObject.cpp:
1205         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
1206
1207 2007-03-23  Dave Hyatt  <hyatt@apple.com>
1208
1209         Fix for <rdar://problem/5048219>, spurious glyphs in gmail.   This is bugzilla bug 13136, which
1210         will remain open to cover patching the complex text path.
1211         
1212         Reviewed by aroben
1213
1214         * platform/Font.cpp:
1215         (WebCore::Font::glyphDataForCharacter):
1216         * platform/Font.h:
1217         (WebCore::Font::treatAsZeroWidthSpace):
1218         * platform/GlyphPageTreeNode.cpp:
1219         (WebCore::GlyphPageTreeNode::initializePage):
1220
1221 2007-03-23  Mitz Pettel  <mitz@webkit.org>
1222
1223         Reviewed by Adele.
1224
1225         - fix http://bugs.webkit.org/show_bug.cgi?id=13153
1226           REGRESSION: Visual highlighting of pre-populated blank line in textarea is broken
1227
1228         - fix a bug where selecting across a soft line break did not highlight to
1229           the end of the first line if it contained skipped whitespace
1230
1231         Test: fast/text/selection-hard-linebreak.html
1232
1233         * rendering/InlineTextBox.cpp:
1234         (WebCore::InlineTextBox::selectionState): Changed to treat a selection that ends on the
1235         end of a hard line break as if it ends after the line break. Fixed the case of a selection
1236         that starts and ends in the same text object as the box but does not intersect it
1237         to return SelectionNone instead of selectionBoth.
1238
1239 2007-03-23  Mitz Pettel  <mitz@webkit.org>
1240
1241         Reviewed by Adele.
1242
1243         - fix http://bugs.webkit.org/show_bug.cgi?id=13124
1244           REGRESSION: Reproducible crash in Widget::getView
1245
1246         Test: fast/frames/hover-timer-crash.html
1247
1248         * page/Frame.cpp:
1249         (WebCore::Frame::setView): Added a call to EventHandler::clear().
1250
1251 2007-03-23  Justin Garcia  <justin.garcia@apple.com>
1252
1253         Reviewed by adele
1254
1255         <rdar://problem/5078739> 
1256         Crash in in ReplaceSelectionCommand if the fragment contains only a style span
1257
1258         * editing/ReplaceSelectionCommand.cpp:
1259         (WebCore::ReplaceSelectionCommand::doApply): Check 
1260         for an empty fragment after removing a redundant
1261         style span instead of before.
1262
1263 2007-03-23  David Hyatt  <hyatt@apple.com>
1264
1265         <rdar://problem/5085063>
1266
1267         Fix non-looping animation on cuteoverload.com. Just always flush
1268         decoded data for large animated images to avoid our cache getting
1269         out of sync with the image source.
1270
1271         Reviewed by ggaren
1272
1273         * platform/graphics/BitmapImage.cpp:
1274         (WebCore::BitmapImage::advanceAnimation):
1275
1276 2007-03-23  Adele Peterson  <adele@apple.com>
1277
1278         Reviewed by Darin.
1279
1280         Fix for <rdar://problem/5061024> REGRESSION: Returning false from onkeypress event on Input is ignored when key is Tab
1281         http://bugs.webkit.org/show_bug.cgi?id= 13020
1282
1283         No known way to add a layout test for this.  We would need a way to know exactly how the event was consumed.
1284
1285         * page/EventHandler.cpp: (WebCore::EventHandler::defaultKeyboardEventHandler):
1286           If the keypress event has its default behavior prevented, then we should consider the keydown event handled.
1287
1288 2007-03-23  Justin Garcia  <justin.garcia@apple.com>
1289
1290         Reviewed by darin
1291
1292         <rdar://problem/5080333> 
1293         REGRESSION: Selection changes when changing the alignment of an image
1294         
1295         Regression occurred when we started using moveParagraphs
1296         to move content in applyBlockStyle.  moveParagraphs 
1297         moves by copying, deleting and reinserting content, and
1298         so must be accompanied by selection preservation code.
1299         That code uses rangeFromLocationAndLength and rangeLength,
1300         which use TextIterators, which don't emit anything for images 
1301         and other replaced elements, causing this bug.
1302
1303         * editing/ApplyStyleCommand.cpp:
1304         (WebCore::ApplyStyleCommand::applyBlockStyle): Ask rangeLength 
1305         and rangeFromLocationAndLength to request that their
1306         TextIterators emit spaces for replaced elements.
1307         Use rangeCompliantEquivalent()s when creating a Range from
1308         VisiblePositions, since some VisiblePositions have illegal
1309         deepEquivalent()s.
1310         * editing/CompositeEditCommand.cpp:
1311         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
1312         * editing/TextIterator.cpp:
1313         (WebCore::TextIterator::TextIterator):
1314         (WebCore::TextIterator::handleReplacedElement): Emit
1315         a space if requested.
1316         (WebCore::TextIterator::representNodeOffsetZero): Emit
1317         ranges before m_node, not around m_lastTextNode.  These
1318         ranges should represent the part of the document associated
1319         with the emitted character. 
1320         (WebCore::TextIterator::rangeLength): Take in the new bool.
1321         (WebCore::TextIterator::rangeFromLocationAndLength): Ditto.
1322         Also, don't loop an extra time after finding the end of the
1323         range when we're looking for zero length ranges.  This appeared
1324         to be a workaround for the bugs fixed in representNodeOffsetZero
1325         in this patch.
1326         * editing/TextIterator.h:
1327
1328 2007-03-24  Mark Rowe  <mrowe@apple.com>
1329
1330         Rubber-stamped by Darin.
1331
1332         * Configurations/WebCore.xcconfig: Remove unnecessary INFOPLIST_PREPROCESS.
1333
1334 2007-03-23  Darin Adler  <darin@apple.com>
1335
1336         * html/HTMLBodyElement.cpp: Fix comment typo.
1337
1338 2007-03-23  Adam Treat  <adam@staikos.net>
1339
1340         Reviewed and committed by George.
1341
1342         Patch from Adam Treat to make the Qt build work without SVG and XSLT.
1343         XMLNames is required in any case.
1344
1345         * WebCore.pro:
1346
1347 2007-03-23  Darin Adler  <darin@apple.com>
1348
1349         Reviewed by Hyatt.
1350
1351         - <rdar://problem/5074439> handle margins on frame and iframe elements
1352           without involving FrameView, FrameLoader, etc.
1353
1354         * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::insertedIntoDocument):
1355         Grab the margin from the frame directly here. There was no real benefit
1356         to doing this via FrameView. Later we can delete quite a bit of unneeded code
1357         here and in WebKit that exists only to set up the margin values in FrameView,
1358         which are now unused.
1359
1360 2007-03-23  Adele Peterson  <adele@apple.com>
1361
1362         Reviewed by Darin.
1363
1364         Fix for <rdar://problem/5080428> REGRESSION: getting value for hidden input element fails after the fix for Bug 11866
1365         http://bugs.webkit.org/show_bug.cgi?id=13121
1366
1367         Rolled out the change for 11866 that made hidden input elements store the value separately from the value attribute.
1368         Added an m_originalValue field that gets set when the element is done being parsed (in closeRenderer).  In reset,
1369         use the m_originalValue for hidden input elements.
1370
1371         * html/HTMLInputElement.cpp:
1372         (WebCore::HTMLInputElement::closeRenderer):
1373         (WebCore::HTMLInputElement::reset):
1374         (WebCore::HTMLInputElement::setValue):
1375         (WebCore::HTMLInputElement::storesValueSeparateFromAttribute):
1376         * html/HTMLInputElement.h:
1377
1378 2007-03-23  Mitz Pettel  <mitz@webkit.org>
1379
1380         Reviewed by Dave Hyatt.
1381
1382         - fix http://bugs.webkit.org/show_bug.cgi?id=13157
1383               <rdar://problem/5083995>
1384           List markers positioned incorrectly and don't repaint properly on Oxford homepage
1385
1386         Test: fast/lists/marker-image-error.html
1387
1388         * rendering/RenderListMarker.cpp:
1389         (WebCore::RenderListMarker::imageChanged): Mark ourselves for relayout if
1390         the image failed to load, since that means we will use a bullet instead.
1391
1392 2007-03-23  Zack Rusin  <zrusin@trolltech.com>
1393
1394         Fix the compile.
1395
1396         * platform/graphics/qt/ImageSourceQt.cpp:
1397
1398 2007-03-22  Dave Hyatt  <hyatt@apple.com>
1399
1400         Fix for <rdar://problem/5083072>.
1401
1402         * page/Frame.cpp:
1403         (WebCore::Frame::setPrinting):
1404         (WebCore::Frame::forceLayoutWithPageWidthRange):
1405         * page/Frame.h:
1406         * page/mac/WebCoreFrameBridge.mm:
1407         (-[WebCoreFrameBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
1408
1409 2007-03-22  Anders Carlsson  <acarlsson@apple.com>
1410
1411         Reviewed by Ada.
1412
1413         <rdar://problem/5074974>
1414         CrashTracer: [USER] repro crash in Safari at com.apple.WebCore: WebCore::FrameLoader::activeDocumentLoader const + 6
1415         
1416         * loader/mac/NetscapePlugInStreamLoaderMac.mm:
1417         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
1418         Don't use ResourceResponse:isHTTP here since that only looks at the protocol instead of if the response came from a 
1419         HTTP server (and not a web archive).
1420
1421 2007-03-22  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
1422
1423         Not reviewed - gdk build fix.
1424
1425         * platform/graphics/cairo/ImageSourceCairo.cpp:
1426
1427 2007-03-22  Dave Hyatt  <hyatt@apple.com>
1428
1429         Fix for <rdar://problem/5083473>.  Make sure wheeling still forwards to the frame view even
1430         when no node is hit.  Technically not ever hitting a node is a regression from the RenderView
1431         size changes (making it be the size of the initial containing block according to CSS2.1), but
1432         we should still handle this case gracefully in case it comes up again.
1433        
1434         Reviewed by olliej
1435
1436         * page/EventHandler.cpp:
1437         (WebCore::EventHandler::handleWheelEvent):
1438
1439 2007-03-22  Justin Garcia  <justin.garcia@apple.com>
1440
1441         Reviewed by kevin
1442
1443         <rdar://problem/5081257> 
1444         REGRESSION: New Mail signatures start out empty
1445
1446         * editing/VisiblePosition.cpp:
1447         (WebCore::VisiblePosition::canonicalPosition): Allow
1448         descent from positions inside the document into an 
1449         editable body.
1450
1451 2007-03-22  Brady Eidson  <beidson@apple.com>
1452
1453         Reviewed by Adele and John
1454
1455         <rdar://5043528> - Prepare for new API
1456         
1457         * platform/network/ResourceHandle.cpp:
1458         (WebCore::ResourceHandle::clearAuthentication): Clear CF type
1459
1460 2007-03-22  Beth Dakin  <bdakin@apple.com>
1461
1462         Patch by Hyatt, reviewed and committed by me.
1463
1464         Does not reproduce consistently, so a layout test does not seem 
1465         possible.
1466
1467         Fix for <rdar://problem/5082421> Constantly hitting ASSERT(!
1468         needsLayout()) in RenderView::paint()
1469
1470         * page/FrameView.cpp:
1471         (WebCore::FrameView::layoutPending): It is not enough to ask if the 
1472         layout timer is active. There may be times that we don't have a 
1473         body yet so we cannot schedule layout yet, but the root still needs 
1474         layout.  
1475
1476 2007-03-22  John Sullivan  <sullivan@apple.com>
1477
1478         Reviewed by Darin
1479         
1480         Followup for recent fix to 5079700, found by assertion added to Safari.
1481
1482         * page/mac/FrameMac.mm:
1483         (WebCore::Frame::searchForLabelsBeforeElement):
1484         Fixed another place in this method where an empty NSString was being returned instead of nil.
1485         Cleaned up the style a little too.
1486
1487 2007-03-22  David Hyatt  <hyatt@apple.com>
1488
1489         Remove unnecessary destroyFrameAtIndex call.  Now that we throw away
1490         the image source, it is no longer needed.
1491
1492         Reviewed by beth
1493
1494         * platform/graphics/BitmapImage.cpp:
1495         (WebCore::BitmapImage::destroyDecodedData):
1496
1497 2007-03-22  David Harrison  <harrison@apple.com>
1498
1499         Reviewed by Geoff, Darin.
1500
1501         <rdar://problem/5077892> In RapidWeaver 3.5.1, a crash occurs when attempting to load Safari Bookmarks in iMedia Browser
1502         
1503         * platform/mac/ThreadCheck.mm:
1504         (WebCore::_WebCoreThreadViolationCheck):
1505         Change default on Tiger to NSLog rather than raise an exception.
1506
1507 2007-03-22  Darin Adler  <darin@apple.com>
1508
1509         Reviewed by Brady.
1510
1511         - use binary_search instead of hash table; slightly better performance and
1512           less memory use
1513
1514         * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::portAllowed):
1515         Use binary_search.
1516
1517 2007-03-22  Darin Adler  <darin@apple.com>
1518
1519         Reviewed by Adele.
1520
1521         - fix <rdar://problem/5074630> detachChildren call should move from WebKit to WebCore
1522
1523         * loader/FrameLoader.cpp: (WebCore::FrameLoader::setDocumentLoader):
1524         Add a call to detachChildren() after the call to prepareForDataSourceReplacement().
1525         There was no reason for this crucial loading step to be left to the client.
1526
1527 2007-03-22  David Hyatt  <hyatt@apple.com>
1528
1529         Minor refactoring and cleanup of the bridge calls that want to control layout settings on the RenderView.
1530         Have the bridge talk through the FrameView instead of just asking for the RenderView directly.
1531
1532         Add an assert to help catch situations where the RenderView needs layout at paint time, since this is a known
1533         catastrophic scenario that will (much of the time) result in a crash in RenderTableSection::paint.
1534
1535         Reviewed by aroben
1536
1537         * page/FrameView.cpp:
1538         (WebCore::FrameView::adjustViewSize):
1539         (WebCore::FrameView::needsLayout):
1540         (WebCore::FrameView::setNeedsLayout):
1541         * page/FrameView.h:
1542         * page/mac/WebCoreFrameBridge.mm:
1543         (-[WebCoreFrameBridge needsLayout]):
1544         (-[WebCoreFrameBridge setNeedsLayout]):
1545         * rendering/RenderView.cpp:
1546         (WebCore::RenderView::paint):
1547
1548 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
1549
1550         Reviewed by Beth Dakin.
1551         
1552         Re-worked the fix in r20375. 'M' and 'm' are not the only commands that
1553         accept "extra" coordinates -- virtually all commands accept them.
1554
1555         * ksvg2/svg/SVGParserUtilities.cpp:
1556         (WebCore::SVGPathParser::parseSVG):
1557
1558 2007-03-21  David Harrison  <harrison@apple.com>
1559
1560         Reviewed by hyatt.
1561
1562         <rdar://problem/5072460> CrashTracer: [USER] 1 crashes in Xcode at com.apple.ImageIO.framework: getBandProcPNG + 168
1563
1564         An NSData object was being alloc/init'd, then returned callers who cast the pointer as a
1565         CFDataRef, including calling CFRelease on it. The problem is that under garbage collection, the NS
1566         retain count is ignored (it's always 0), but the CFRetain and CFRelease are not ignored. This
1567         caused the object to be over-released. The solution that works in both GC and non-GC is to "transfer"
1568         the initial NS retain count to the CF retain count, using HardRetainWithNSRelease.
1569         
1570         The creator of the NSData was SharedBuffer::createNSData. The callers were PDFDocumentImage::dataChanged()
1571         and ImageSource::setData(). This particular crash involved the ImageSource::setData() case.
1572
1573         * platform/SharedBuffer.h:
1574         Declare createCFData().
1575         
1576         * platform/graphics/cg/ImageSourceCG.cpp:
1577         (WebCore::ImageSource::setData):
1578         Call createCFData instead of createNSData.
1579         
1580         * platform/graphics/cg/PDFDocumentImage.cpp:
1581         (WebCore::PDFDocumentImage::dataChanged):
1582         Call createCFData instead of createNSData.
1583         
1584        * platform/mac/SharedBufferMac.mm:
1585         (WebCore::SharedBuffer::createCFData):
1586         Implement createCFData(). Use HardRetainWithNSRelease for gc safety.
1587         
1588 2007-03-21  Mitz Pettel  <mitz@webkit.org>
1589
1590         Reviewed by Darin.
1591
1592         - fix http://bugs.webkit.org/show_bug.cgi?id=13145
1593           Regression: Scrollbar not resizing after display none
1594
1595         Test: fast/dynamic/view-overflow.html
1596
1597         * rendering/RenderView.cpp:
1598         (WebCore::RenderView::layout): Reset overflowHeight() and overflowWidth()
1599         before calling docHeight() and docWidth(), since the former act as a lower
1600         bound for the latter.
1601
1602 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
1603
1604         Reviewed by Beth Dakin.
1605         
1606         A little cleanup based work I've been doing on the SVG parsers.
1607
1608         * ksvg2/svg/SVGParserUtilities.h:
1609         (WebCore::skipString):
1610         * ksvg2/svg/SVGPreserveAspectRatio.cpp: Moved checkString into
1611         SVGParserUtilities.h, so it could be with all its friends. Renamed 
1612         "checkString" to "skipString" to match the rest of the code and to be 
1613         clear about which functions move the buffer pointer.
1614         (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio):
1615         * ksvg2/svg/SVGTransformable.cpp:
1616         (WebCore::SVGTransformable::parseTransformAttribute): Changed gotos into 
1617         returns. Removed unnecessary magic number.
1618
1619 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
1620
1621         Reviewed by Beth Dakin.
1622         
1623         Fixed <rdar://problem/5078471> SVG rgb color parser runs past end of 
1624         buffer when running fuzzing test
1625
1626         * ksvg2/svg/SVGColor.cpp:
1627         (WebCore::parseNumberOrPercent): Check for past the end condition.
1628         (WebCore::SVGColor::colorFromRGBColorString): Reversed "read past end
1629         of buffer, then check if you're past the end" logic.
1630
1631 2007-03-21  Geoffrey Garen  <ggaren@apple.com>
1632
1633         Reviewed by Beth Dakin.
1634         
1635         Fixed <rdar://problem/5079410> SVG path parser hangs, exhausts memory when 
1636         running fuzzer test
1637
1638         * ksvg2/svg/SVGParserUtilities.cpp:
1639         (WebCore::SVGPathParser::parseSVG): Don't assume that extra digits are
1640         always preceded by an 'M' or an 'm'.
1641
1642 2007-03-21  John Sullivan  <sullivan@apple.com>
1643
1644         Reviewed by Adam
1645         
1646         - fixed <rdar://problem/5079700> REGRESSION (r19702): Name/password aren't autofilled 
1647           or saved for .Mac homepage login
1648
1649         * page/mac/FrameMac.mm:
1650         (WebCore::Frame::searchForLabelsBeforeElement):
1651         don't count empty strings as valid results
1652
1653 2007-03-21  Justin Garcia  <justin.garcia@apple.com>
1654
1655         Reviewed by darin
1656
1657         * editing/markup.cpp:
1658         (WebCore::styleFromMatchedRulesAndInlineDecl): 
1659         Release the RefPtr to avoid increasing/decreasing
1660         the refcount unnecessarily.
1661         (WebCore::propertyMissingOrEqualToNone): Added and used
1662         instead of converting values to strings.
1663         (WebCore::elementHasTextDecorationProperty): 
1664         (WebCore::createMarkup):
1665
1666 2007-03-21  Justin Garcia  <justin.garcia@apple.com>
1667
1668         Reviewed by oliver
1669
1670         <rdar://problem/5075944> 
1671         REGRESSION: Partially selected underlined content pastes as plain text
1672         
1673         We stopped adding markup for all the ancestors
1674         of lastClosed up to the commonAncestorBlock
1675         because it was adding a lot of unnecessary markup.
1676         This caused us to lose underlining when copying a 
1677         partially selected underlined element (even though 
1678         we put all styles that the copied markup inherits 
1679         into a style span, because the text-decoration 
1680         isn't inheritable).
1681
1682         * editing/markup.cpp:
1683         (WebCore::styleFromMatchedRulesAndInlineDecl): Moved
1684         code here.
1685         (WebCore::elementHasTextDecorationProperty): Added.
1686         (WebCore::createMarkup): If the copied markup has a
1687         text-decoration because some common ancestor has
1688         a text-decoration property set, include that ancestor
1689         and all its descendants in the copied markup.
1690
1691 2007-03-21  Oliver Hunt  <oliver@apple.com>
1692
1693         Reviewed by Antti.
1694
1695         Update a few SVG attribute parsers to be more defensive against
1696         reading beyond the end of input. 
1697
1698         Fixes rdar://problem/5077218 -- SVG transform parser runs past
1699         end of buffer when running fuzzing test
1700
1701         * ksvg2/svg/SVGParserUtilities.cpp:
1702         (WebCore::SVGPathParser::parseSVG):
1703         * ksvg2/svg/SVGParserUtilities.h:
1704         (WebCore::skipOptionalSpacesOrDelimiter):
1705         * ksvg2/svg/SVGTransformable.cpp:
1706         (WebCore::parseTransformParamList):
1707         (WebCore::SVGTransformable::parseTransformAttribute):
1708
1709 2007-03-21  Alexey Proskuryakov  <ap@webkit.org>
1710
1711         Reviewed by Mitz.
1712
1713         http://bugs.webkit.org/show_bug.cgi?id=13140
1714         Crash after loading SVG fragment with XMLHttpRequest (Yosemite Map Geology Layer)
1715
1716         Test: svg/carto.net/frameless-svg-parse-error.html
1717
1718         * ksvg2/misc/SVGDocumentExtensions.cpp:
1719         (WebCore::SVGDocumentExtensions::reportError): Added a null check.
1720         (WebCore::SVGDocumentExtensions::reportWarning): Ditto.
1721
1722 2007-03-21  Beth Dakin  <bdakin@apple.com>
1723
1724         Reviewed by Geoff.
1725
1726         Fix for <rdar://problem/5072678> Crash in
1727         RenderLayer::scrollRectToVisible with MallocScribble enabled
1728
1729         I tried to fix this earlier today but my fix caused a regression
1730         scrolling through RSS pages. It turns out that sometimes scroll
1731         events need to propagate immediately, and sometimes they must be
1732         delayed or they risk deleting objects that are expected to be
1733         around after the event has propagated. Mitz's original fix made
1734         sheduleEvent() only delay events that happen during layout. This
1735         fix marks two other places in addition to layout where events also
1736         need to be delayed. These two places are places that were marked
1737         with FIXMEs that Mitz removed in his original patch. (There was a
1738         third FIXME in RenderLayer::updateScrollInfoAfterLayout() but that
1739         case is only called through layout and is covered by Mitz's
1740         original patch.)
1741
1742         * page/FrameView.cpp:
1743         (WebCore::FrameView::~FrameView): Added assertion.
1744         (WebCore::FrameView::layout): Call new functions to increment and 
1745         decrement the queued events count.
1746         (WebCore::FrameView::pauseScheduledEvents):
1747         (WebCore::FrameView::resumeScheduledEvents): Decrement queued 
1748         events count and dispatch events if the count has zeroed.
1749         * page/FrameView.h:
1750         * rendering/RenderLayer.cpp:
1751         (WebCore::RenderLayer::scrollRectToVisible):
1752         (WebCore::Marquee::start):
1753
1754 2007-03-21  Mitz Pettel  <mitz@webkit.org>
1755
1756         Reviewed by John Sullivan.
1757
1758         - fix http://bugs.webkit.org/show_bug.cgi?id=13130
1759           REGRESSION: Sometimes a frame resizer keeps following the mouse after mouseup
1760
1761         * rendering/RenderFrameSet.cpp:
1762         (WebCore::RenderFrameSet::userResize): Reordered the code to allow resizing
1763         to be terminated by a mouseup event regardless of whether the frameset needs
1764         layout.
1765
1766 2007-03-20  Anders Carlsson  <acarlsson@apple.com>
1767
1768         Reviewed by Oliver.
1769
1770         <rdar://problem/5077252> 
1771         In NetNewsWire 2.1.1 and 3.0d62, a crash occurs after triple-clicking a link on the page
1772         
1773         * loader/FrameLoader.cpp:
1774         (WebCore::FrameLoader::load):
1775         Move the m_inStopAllLoaders check to the load function that's common for loading a request or substitute data.
1776
1777 2007-03-20  Brady Eidson  <beidson@apple.com>
1778
1779         Reviewed by Anders.
1780
1781         <rdar://problem/5073391> and http://bugs.webkit.org/show_bug.cgi?id=13137
1782
1783         Crash in IconDatabase when private browsing is enabled.
1784
1785         The problem was caused by http://trac.webkit.org/projects/webkit/changeset/20182 
1786         which changed many uses of char[] and Vector<char> to SharedBuffer.  The patch
1787         tended to literally replace a Vector<char> with RefPtr<SharedBuffers> but forgot
1788         to enforce the concept that Vector<char>'s always exist, whereas RefPtr<SharedBuffers>
1789         can be null.  This led to derefs.
1790
1791         I took the opportunity to rework the iconDB functions to live in a SharedBuffer 
1792         world, as that didn't exist when they were originally written - now they just return
1793         SharedBuffers instead of taking a Vector<char>& as a parameter
1794
1795         * loader/icon/IconDatabase.cpp:
1796         (WebCore::IconDatabase::imageDataForIconURL): Return a SharedBuffer
1797         (WebCore::IconDatabase::iconForPageURL): Null check the SharedBuffer before asking
1798           it if it's empty
1799         (WebCore::IconDatabase::imageDataForIconURLQuery): Return a new SharedBuffer
1800
1801         * loader/icon/IconDatabase.h: Return SharedBuffer's instead of taking Vector<char>&'s
1802
1803 2007-03-20  Adam Roben  <aroben@apple.com>
1804
1805         Rubberstamped by Adele.
1806
1807         Roll out r20348 because it was causing crashes.
1808
1809         * page/FrameView.cpp:
1810         (WebCore::FrameViewPrivate::FrameViewPrivate):
1811         (WebCore::FrameView::layout):
1812         (WebCore::FrameView::scheduleEvent):
1813
1814 2007-03-20  Timothy Hatcher  <timothy@apple.com>
1815
1816         Reviewed by Kevin Decker.
1817
1818         Rolling out part of r19828 that caused a scrolling regression in Mail.
1819
1820         <rdar://problem/4820817> Message jumps around when trying to select text
1821
1822         * platform/mac/ScrollViewMac.mm:
1823         (WebCore::ScrollView::visibleContentRect):
1824         (WebCore::ScrollView::updateContents):
1825
1826 2007-03-20  Brady Eidson  <beidson@apple.com>
1827
1828         Reviewed by John
1829
1830         <rdar://5071341> - Crash in IconLoader::finishLoading()
1831         
1832         Though the reproducibility of the crash is still elusive, there's been a crasher likely uncovered 
1833         Hyatt's recent caching changings to the IconLoader.  This crash tends to hit on sites without favicons,
1834         that serve up complex 404 pages, often when the load is cancelled or redirected.  Occasionally, it *seems*
1835         the IconLoader is getting failed/cancelled twice.
1836         
1837         This patch adds some assertions and a "fail gracefully in a release build" check that will have to
1838         serve us until we know more about the cause.
1839
1840         * loader/icon/IconLoader.cpp:
1841         (WebCore::IconLoader::didFail): Add an assertion to catch this case
1842         (WebCore::IconLoader::finishLoading): Add an assertion to catch the case, and fail
1843           gracefully in debug builds.  Also add an efficiency check to not commit to the DB if there is no
1844           IconURL
1845
1846 2007-03-20  Antti Koivisto  <antti@apple.com>
1847
1848         Reviewed by Darin.
1849
1850         - fix http://bugs.webkit.org/show_bug.cgi?id=10747
1851         REGRESSION: Using two fingers on a trackpad to scroll inside a text area makes the whole page move
1852         <rdar://problem/5045710>
1853         
1854         Eat smooth scroll events in WebCore if pointer is over scrollable area. Not
1855         really a good fix, smooth scrolling should be supported properly. It should do for now.
1856
1857         * page/EventHandler.cpp:
1858         (WebCore::EventHandler::handleWheelEvent):
1859         * rendering/RenderListBox.cpp:
1860         (WebCore::RenderListBox::isScrollable):
1861         * rendering/RenderListBox.h:
1862         * rendering/RenderObject.cpp:
1863         (WebCore::RenderObject::isScrollable):
1864         * rendering/RenderObject.h:
1865         * rendering/RenderTextControl.cpp:
1866         (WebCore::RenderTextControl::isScrollable):
1867         * rendering/RenderTextControl.h:
1868
1869 2007-03-20  Beth Dakin  <bdakin@apple.com>
1870
1871         Reviewed by Geoff.
1872
1873         Covered by existing test case.
1874
1875         Fix for <rdar://problem/5072678> Crash in 
1876         RenderLayer::scrollRectToVisible with MallocScribble enabled
1877
1878         This removes some code that was added with http://bugs.webkit.org/
1879         show_bug.cgi?id=8360. This code was not needed to fix that bug, but 
1880         the idea behind it was that there are times when it is safe for 
1881         scheduleEvent() to propagate the event immediately. The 
1882         MallocScribble crash revealed that this assumption was a bit too 
1883         broad; the cause of the crash was that we were propagating events 
1884         immediately when it was not safe. Mitz and I discussed this online 
1885         and we agree that the safest solution is to revert to the old 
1886         behavior here, and always delay the propagation of the event. 
1887
1888         * page/FrameView.cpp:
1889         (WebCore::FrameViewPrivate::FrameViewPrivate):
1890         (WebCore::FrameView::layout):
1891         (WebCore::FrameView::scheduleEvent):
1892
1893 2007-03-20  Brady Eidson  <beidson@apple.com>
1894
1895         Reviewed by John Sullivan
1896
1897         Add some very helpful logging to the IconLoader's SubresourceLoaderClient impl.
1898
1899         * loader/icon/IconLoader.cpp:
1900         (WebCore::IconLoader::didReceiveResponse):
1901         (WebCore::IconLoader::didReceiveData):
1902         (WebCore::IconLoader::didFail):
1903         (WebCore::IconLoader::didFinishLoading):
1904
1905 2007-03-20  Justin Garcia  <justin.garcia@apple.com>
1906
1907         Reviewed by darin
1908
1909         <rdar://problem/5071074> 
1910         REGRESSION: Links are pasted as plain text at certain positions
1911         
1912         moveParagraphs calls createMarkup without annotation, which leaves
1913         out anchor elements that aren't fully selected.
1914
1915         * editing/CompositeEditCommand.cpp:
1916         (WebCore::CompositeEditCommand::moveParagraphs): We don't want 
1917         createMarkup to do full annotation here.  Doing so could include 
1918         special ancestor blocks, which would prevent the copied content 
1919         from appearing in the destination paragraph when it's re-inserted.  
1920         Annotation would also inline styles from style sheets,  which is 
1921         unnecessary because the content is being moved to the same 
1922         document it's being moved from.
1923         Added a new bool to createMarkup that when true allows markup for 
1924         special ancestors as long as they are inline when annotation is off.
1925         * editing/markup.cpp:
1926         (WebCore::createMarkup): Don't set specialCommonAncestor if annotation
1927         is off, unless it's inline and we've been told it's ok to include such
1928         elements.
1929         * editing/markup.h:
1930
1931 2007-03-20  Alexey Proskuryakov  <ap@webkit.org>
1932
1933         Reviewed by Darin.
1934
1935         http://bugs.webkit.org/show_bug.cgi?id=12497
1936         Implement XPath result ordering.
1937
1938         XPath::NodeVector typedef is replaced with a real XPath::NodeSet class that knows how 
1939         to sort itself, and can remember whether it has been already sorted.
1940
1941         * CMakeLists.txt:
1942         * WebCore.pro:
1943         * WebCore.xcodeproj/project.pbxproj:
1944         * WebCoreSources.bkl:
1945         Added XPathNodeSet files.
1946
1947         * xml/XPathExpression.cpp: Fixed includes.
1948
1949         * xml/XPathFunctions.cpp:
1950         (WebCore::XPath::FunId::evaluate): Mark the resulting node-set as unsorted.
1951         (WebCore::XPath::FunLocalName::evaluate): Replacing NodeVector with NodeSet.
1952         (WebCore::XPath::FunNamespaceURI::evaluate): Ditto.
1953         (WebCore::XPath::FunName::evaluate): Ditto.
1954         (WebCore::XPath::FunCount::evaluate): Ditto.
1955         (WebCore::XPath::FunSum::evaluate): Ditto.
1956
1957         * xml/XPathNodeSet.cpp: Added.
1958         (WebCore::XPath::parentWithDepth):
1959         (WebCore::XPath::sortBlock):
1960         (WebCore::XPath::NodeSet::sort): Sort the node-set in document order.
1961         (WebCore::XPath::NodeSet::reverse): Reverse the order (useful for making axes such as 
1962         parent or ancestor sorted).
1963         (WebCore::XPath::NodeSet::firstNode): Returns the first node in document order; currently
1964         implemented via fully sorting the node-set, but this can obviously be optimized.
1965         (WebCore::XPath::NodeSet::anyNode): Added for symmetry with firstNode().
1966         
1967         * xml/XPathNodeSet.h: Added.
1968         (WebCore::XPath::NodeSet::NodeSet):
1969         (WebCore::XPath::NodeSet::operator=):
1970         (WebCore::XPath::NodeSet::size):
1971         (WebCore::XPath::NodeSet::isEmpty):
1972         (WebCore::XPath::NodeSet::operator[]):
1973         (WebCore::XPath::NodeSet::reserveCapacity):
1974         (WebCore::XPath::NodeSet::clear):
1975         (WebCore::XPath::NodeSet::swap):
1976         (WebCore::XPath::NodeSet::append):
1977         (WebCore::XPath::NodeSet::markSorted):
1978         (WebCore::XPath::NodeSet::isSorted):
1979         Most of these methods just call Vector counterparts. 
1980
1981         * xml/XPathParser.cpp: Updated the copyright notice.
1982
1983         * xml/XPathPath.cpp:
1984         (WebCore::XPath::Filter::evaluate): Replacing NodeVector with NodeSet.
1985         (WebCore::XPath::Path::evaluate): Ditto.
1986         (WebCore::XPath::LocationPath::evaluate): Replacing NodeVector with NodeSet. This function
1987         always marks the result as unsorted, because it is hard to tell whether a step breaks node order.
1988         Identifying and implementing special cases when it is not necessary to do so is an important
1989         future optimization.
1990
1991         * xml/XPathPath.h: Replacing NodeVector with NodeSet.
1992         * xml/XPathPredicate.cpp:
1993         (WebCore::XPath::EqTestOp::compare): Replacing NodeVector with NodeSet.
1994         (WebCore::XPath::Union::evaluate): Replacing NodeVector with NodeSet. Currently, Union just
1995         marks the result as unordered; we can consider using merge sort to avoid this.
1996
1997         * xml/XPathResult.cpp:
1998         (WebCore::XPathResult::XPathResult): Replacing NodeVector with NodeSet.
1999         (WebCore::XPathResult::singleNodeValue): Ditto.
2000         (WebCore::XPathResult::snapshotLength): Ditto.
2001         (WebCore::XPathResult::iterateNext): Ditto.
2002         (WebCore::XPathResult::snapshotItem): Ditto.
2003         (WebCore::XPathResult::convertTo): Ditto. Sort the result when requested to.
2004
2005         * xml/XPathResult.h: Replacing NodeVector with NodeSet.
2006
2007         * xml/XPathStep.cpp:
2008         (WebCore::XPath::Step::evaluate): If the input is not sorted, mark the output as such, too.
2009         (WebCore::XPath::Step::nodesInAxis): Fixed a number of bugs when enumerating with an
2010         attribute context node.
2011         (WebCore::XPath::Step::nodeTestMatches): Replacing NodeVector with NodeSet.
2012         * xml/XPathStep.h: Ditto.
2013
2014         * xml/XPathUtil.cpp:
2015         (WebCore::XPath::isValidContextNode): XPath data model doesn't put attribute data into child
2016         nodes, so passing such node as a context could cause problems.
2017
2018         * xml/XPathUtil.h: Removed NodeVector typedef.
2019
2020         * xml/XPathValue.cpp:
2021         (WebCore::XPath::Value::Value):
2022         (WebCore::XPath::Value::toNodeSet):
2023         (WebCore::XPath::Value::toBoolean):
2024         (WebCore::XPath::Value::toNumber):
2025         (WebCore::XPath::Value::toString):
2026         * xml/XPathValue.h:
2027         (WebCore::XPath::Value::):
2028         (WebCore::XPath::Value::isNodeSet):
2029         Replacing NodeVector with NodeSet.
2030
2031 2007-03-21  Mark Rowe  <mrowe@apple.com>
2032
2033         Build fix.
2034
2035         * bindings/objc/WebScriptObject.mm:
2036         (-[WebScriptObject methodForSelector:]):
2037         (-[WebScriptObject respondsToSelector:]):
2038
2039 2007-03-21  Mark Rowe  <mrowe@apple.com>
2040
2041         Reviewed by Tim Hatcher.
2042
2043         Fix for http://bugs.webkit.org/show_bug.cgi?id=13129.
2044         Bug 13129: Democracy Player dies in NSException from WebScriptObject on startup.
2045
2046         Some cross-language scripting bridges use the presence of -(int)count to determine
2047         whether to treat objects as sequence-like.  All WebScriptObject's exposed this method
2048         which lead to non-collection WebScriptObject's being mishandled by PyObjC.  We now
2049         expose -count only when the object we wrap looks like a collection from a JavaScript
2050         point of view (eg, it has a length property).
2051
2052         * bindings/objc/WebScriptObject.mm:
2053         (-[WebScriptObject _shouldRespondToCount]):
2054         (-[WebScriptObject methodForSelector:]):
2055         (-[WebScriptObject respondsToSelector:]):
2056         (-[WebScriptObject _count]):
2057         * bindings/objc/WebScriptObjectPrivate.h:
2058
2059 2007-03-20  Darin Adler  <darin@apple.com>
2060
2061         * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseMoveEvent):
2062         Fix obvious typo in the change from last night -- forgot to assign to the variable.
2063
2064 2007-03-20  Dave Hyatt  <hyatt@apple.com>
2065
2066         Refactor fonts a bit for portability.
2067        
2068         Reviewed by aroben
2069
2070         * platform/Font.cpp:
2071         (WebCore::Font::drawSimpleText):
2072         (WebCore::Font::drawGlyphBuffer):
2073         (WebCore::Font::floatWidthForSimpleText):
2074         * platform/Font.h:
2075         * platform/FontData.h:
2076         (WebCore::FontData::isSystemFont):
2077         (WebCore::FontData::scriptCache):
2078         * platform/GlyphBuffer.h:
2079         (WebCore::GlyphBuffer::add):
2080
2081 2007-03-20  Anders Carlsson  <acarlsson@apple.com>
2082
2083         Reviewed by Adam.
2084
2085         Stub out a couple of CFNetwork backend functions.
2086         
2087         * platform/network/ResourceHandle.h:
2088
2089 2007-03-19  Oliver Hunt  <oliver@apple.com>
2090
2091         Reviewed by Ada.
2092
2093         Protect against possibility of JS detaching a frame (and losing its view)
2094         midway through a mouse move.
2095
2096         * page/EventHandler.cpp:
2097         (WebCore::EventHandler::handleMouseMoveEvent):
2098
2099 2007-03-19  Alexey Proskuryakov  <ap@webkit.org>
2100
2101         Reviewed by Darin.
2102
2103         http://bugs.webkit.org/show_bug.cgi?id=13107
2104         XPath should raise an exception when trying to parse an unknown function
2105
2106         Test: fast/xpath/invalid-functions.html
2107
2108         * xml/XPathFunctions.cpp:
2109         (WebCore::XPath::createFunction): Return 0 if the function couldn't be created.
2110         * xml/XPathGrammar.y: Handle nulls returned from createFunction().
2111
2112 2007-03-19  Adele Peterson  <adele@apple.com>
2113
2114         Reviewed by Beth.
2115
2116         Fix for http://bugs.webkit.org/show_bug.cgi?id=13087
2117         <rdar://problem/5064316> REGRESSION: Allow setting the checked attribute in js and in markup for unnamed radio buttons (dominos.com)
2118
2119         Test: fast/forms/radio_checked_name.html
2120
2121         We were matching a WinIE quirk that does not allow a user to check and uncheck an unnamed radio button.  But they still
2122         allow the checked attribute to be set in html, and changed in javascript.  So this change matches that behavior.
2123
2124         * html/HTMLInputElement.cpp:
2125         (WebCore::HTMLInputElement::parseMappedAttribute): We no longer need a special call to setChecked when parsing the name
2126          attribute, since we setChecked will now work with unnamed radio buttons.
2127         (WebCore::HTMLInputElement::preDispatchEventHandler): Added comment.
2128         (WebCore::HTMLInputElement::setChecked): Don't check for the unnamed radio button case here.
2129         (WebCore::HTMLInputElement::postDispatchEventHandler): Don't call setChecked for unnamed radio buttons.
2130         (WebCore::HTMLInputElement::defaultEventHandler): ditto.
2131
2132 2007-03-19  Adam Roben  <aroben@apple.com>
2133
2134         Rubberstamped by Oliver.
2135
2136         * bridge/JavaScriptStatistics.cpp: Added missing header for
2137         correctness.
2138
2139 2007-03-19  Andrew Wellington  <proton@wiretapped.net>
2140
2141         Reviewed by Maciej.
2142
2143         Really set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html)
2144
2145         * WebCore.xcodeproj/project.pbxproj:
2146
2147 2007-03-19  Justin Garcia  <justin.garcia@apple.com>
2148
2149         Reviewed by darin
2150         
2151         <rdar://problem/5071074> 
2152         REGRESSION: Links that aren't fully selected copy and paste as only text
2153         
2154         We stopped adding markup for all commonAncestorBlocks
2155         and the ancestors of lastClosed up to them because it 
2156         was adding a lot of unnecessary markup.
2157
2158         * editing/markup.cpp:
2159         (WebCore::createMarkup): Also include markup for nodes
2160         up to an enclosing anchor.  Cleaned up the code for
2161         including special common ancestors a bit.
2162
2163 2007-03-19  Nikolas Zimmermann  <zimmermann@kde.org>
2164
2165         Reviewed by Lars Knoll.
2166
2167         Fix crash when opening a SVG document which contains SVG elements, but no <svg> root element.
2168         Moving the mouse was crashing WebKit. Fixes svg/hixie/dynamic/006.xml.
2169
2170         * rendering/RenderObject.cpp:
2171         (WebCore::RenderObject::updateHitTestResult):
2172
2173 2007-03-19  Mitz Pettel  <mitz@webkit.org>
2174
2175         Reviewed by Hyatt.
2176
2177         - fix http://bugs.webkit.org/show_bug.cgi?id=13117
2178         REGRESSION (r14658): Flickering text fields when updating via javascript
2179
2180         * page/Frame.cpp:
2181         (WebCore::Frame::forceLayout): Added a flag to allow partial relayout.
2182         * page/Frame.h:
2183         * page/mac/WebCoreFrameBridge.mm:
2184         (-[WebCoreFrameBridge forceLayoutAdjustingViewSize:]): Allow partial relayout
2185         if not adjusting view size.
2186         (-[WebCoreFrameBridge needsLayout]): Changed to check for pending subtree
2187         layout instead of just whether the root needs layout.
2188
2189 2007-03-18  Nikolas Zimmermann  <zimmermann@kde.org>
2190
2191         Reviewed by Maciej.
2192
2193         Make JS function calls on POD-types (ie. SVGLength) take effect.
2194         Calling ie. newValueInSpecifiedUnits on SVGLength works as expected.
2195
2196         This worked fine before we switched to SVGLength POD type, so this
2197         can be considered as P1 regression fix.
2198
2199         Partly fix svg/hixie/dynamic/005-broken.svg. We match Opera now though
2200         it's not yet completly fixed. Setting baseVal attribute on SVGAnimatedString
2201         doesn't work as expected - needs a seperated fix.
2202
2203         * bindings/scripts/CodeGeneratorJS.pm:
2204
2205 2007-03-19  Adele Peterson  <adele@apple.com>
2206
2207         Reviewed by Adam.
2208
2209         Adding comments and a little cleanup from my last checkin.
2210
2211         * html/HTMLSelectElement.cpp:
2212         (WebCore::HTMLSelectElement::setSelectedIndex): Removed commented out assert.  Added comment about how we use onChange.
2213         (WebCore::HTMLSelectElement::selectAll): Added comment about how we use saveLastSelection and onChange.
2214         (WebCore::HTMLSelectElement::dispatchFocusEvent): ditto.
2215         (WebCore::HTMLSelectElement::dispatchBlurEvent): ditto.
2216         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): ditto.
2217         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): ditto.
2218         (WebCore::HTMLSelectElement::menuListOnChange): Added assert that usesMenuList() is true.
2219         (WebCore::HTMLSelectElement::listBoxOnChange): Added assert that usesMenuList() is false.
2220         (WebCore::HTMLSelectElement::saveLastSelection): Added early return for menu lists.
2221
2222 2007-03-19  Mitz Pettel  <mitz@webkit.org>
2223
2224         Reviewed by Tim Hatcher.
2225
2226         - fix http://bugs.webkit.org/show_bug.cgi?id=13091
2227           REGRESSION (r20075): Wrong text style and pixel break in Apple Store Locator HUD
2228
2229         Test: fast/innerHTML/additional-inline-style.html
2230
2231         * editing/markup.cpp:
2232         (WebCore::startMarkup): Changed to add inline style based on CSS rules only
2233         in AnnotateForInterchange mode.
2234
2235 2007-03-19  Zack Rusin  <zrusin@trolltech.com>
2236
2237         Compile fix.
2238
2239         * platform/qt/ScrollViewQt.cpp:
2240         (WebCore::ScrollView::update):
2241
2242 2007-03-19  Adam Roben  <aroben@apple.com>
2243
2244         Reviewed by Hyatt and Maciej.
2245
2246         Renamed WebCoreJavaScript to JavaScriptStatistics and made it C++ as
2247         part of <rdar://problem/5071653>.
2248
2249         All layout tests pass.
2250
2251         * WebCore.exp: Updated.
2252         * WebCore.xcodeproj/project.pbxproj: Updated.
2253         * bridge/JavaScriptStatistics.cpp: Moved from
2254         bridge/mac/WebCoreJavaScript.mm, and converted to C++.
2255         (WebCore::collect):
2256         (WebCore::JavaScriptStatistics::objectCount):
2257         (WebCore::JavaScriptStatistics::interpreterCount):
2258         (WebCore::JavaScriptStatistics::protectedObjectCount):
2259         (WebCore::JavaScriptStatistics::rootObjectTypeCounts):
2260         (WebCore::JavaScriptStatistics::garbageCollect):
2261         (WebCore::JavaScriptStatistics::garbageCollectOnAlternateThread):
2262         (WebCore::JavaScriptStatistics::shouldPrintExceptions):
2263         (WebCore::JavaScriptStatistics::setShouldPrintExceptions):
2264         * bridge/JavaScriptStatistics.h: Added.
2265         * bridge/mac/WebCoreJavaScript.h: Removed.
2266         * bridge/mac/WebCoreJavaScript.mm: Removed.
2267
2268 2007-03-18  Maciej Stachowiak  <mjs@apple.com>
2269
2270         Reviewed by Mark.
2271
2272         - avoid static construction (and global variable access) in a smarter, more portable way,
2273         to later enable MUTLI_THREAD mode to work on other platforms and compilers.
2274         
2275         * bindings/js/JSCustomXPathNSResolver.cpp:
2276         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2277         * bindings/js/JSHTMLInputElementBase.cpp:
2278         (WebCore::JSHTMLInputElementBaseFunction::JSHTMLInputElementBaseFunction):
2279         * bindings/js/JSHTMLOptionElementConstructor.cpp:
2280         (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor):
2281         * bindings/js/JSXMLHttpRequest.cpp:
2282         (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp):
2283         * bindings/js/JSXSLTProcessor.cpp:
2284         (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
2285         * bindings/js/kjs_dom.cpp:
2286         (KJS::DOMNamedNodeMap::getOwnPropertySlot):
2287         (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
2288         * bindings/js/kjs_events.cpp:
2289         (KJS::JSAbstractEventListener::handleEvent):
2290         * bindings/js/kjs_html.cpp:
2291         (KJS::HTMLElementFunction::HTMLElementFunction):
2292         (KJS::JSHTMLCollection::getOwnPropertySlot):
2293         * bindings/js/kjs_window.cpp:
2294         (KJS::ScheduledAction::execute):
2295         * bindings/objc/WebScriptObject.mm:
2296         * bindings/scripts/CodeGeneratorJS.pm:
2297
2298 2007-03-18  Andrew Wellington  <proton@wiretapped.net>
2299
2300         Reviewed by Mark Rowe
2301
2302         Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html)
2303
2304         * WebCore.xcodeproj/project.pbxproj:
2305
2306 2007-03-18  David Hyatt  <hyatt@apple.com>
2307
2308         Fix for REGRESSION bug 13108, frame borders being painted when they shouldn't be.  Rework both frame borders
2309         and resizing to be more like other browsers.
2310
2311         Reviewed by ggaren
2312
2313         fast/frames/no-frame-borders.html
2314
2315         * html/HTMLFrameElement.cpp:
2316         (WebCore::HTMLFrameElement::HTMLFrameElement):
2317         (WebCore::HTMLFrameElement::attach):
2318         (WebCore::HTMLFrameElement::parseMappedAttribute):
2319         * html/HTMLFrameElement.h:
2320         (WebCore::HTMLFrameElement::hasFrameBorder):
2321         * html/HTMLFrameElementBase.cpp:
2322         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
2323         (WebCore::HTMLFrameElementBase::parseMappedAttribute):
2324         * html/HTMLFrameElementBase.h:
2325         * html/HTMLFrameSetElement.cpp:
2326         (WebCore::HTMLFrameSetElement::attach):
2327         * html/HTMLFrameSetElement.h:
2328         (WebCore::HTMLFrameSetElement::hasFrameBorder):
2329         * html/HTMLIFrameElement.cpp:
2330         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
2331         * rendering/RenderFrame.cpp:
2332         (WebCore::RenderFrame::edgeInfo):
2333         * rendering/RenderFrame.h:
2334         * rendering/RenderFrameSet.cpp:
2335         (WebCore::RenderFrameSet::paint):
2336         (WebCore::RenderFrameSet::GridAxis::resize):
2337         (WebCore::RenderFrameSet::fillFromEdgeInfo):
2338         (WebCore::RenderFrameSet::computeEdgeInfo):
2339         (WebCore::RenderFrameSet::edgeInfo):
2340         (WebCore::RenderFrameSet::layout):
2341         (WebCore::RenderFrameSet::startResizing):
2342         (WebCore::RenderFrameSet::continueResizing):
2343         (WebCore::RenderFrameSet::canResizeRow):
2344         (WebCore::RenderFrameSet::canResizeColumn):
2345         (WebCore::RenderFrameSet::splitPosition):
2346         (WebCore::RenderFrameSet::hitTestSplit):
2347         (WebCore::RenderFrameSet::dump):
2348         * rendering/RenderFrameSet.h:
2349         (WebCore::):
2350         (WebCore::FrameEdgeInfo::FrameEdgeInfo):
2351         (WebCore::FrameEdgeInfo::preventResize):
2352         (WebCore::FrameEdgeInfo::allowBorder):
2353         (WebCore::FrameEdgeInfo::setPreventResize):
2354         (WebCore::FrameEdgeInfo::setAllowBorder):
2355
2356 2007-03-19  Mark Rowe  <mrowe@apple.com>
2357
2358         Rubber-stamped by Brady.
2359
2360         Update references to bugzilla.opendarwin.org with bugs.webkit.org.
2361
2362         * ChangeLog:
2363         * WebCore.vcproj/WebCore/build-generated-files.sh:
2364         * manual-tests/ATSU-bad-layout.html:
2365         * manual-tests/accidental-strict-mode.html:
2366         * manual-tests/applet-param-no-name.html:
2367         * manual-tests/bidi-parens.html:
2368         * manual-tests/bugzilla-3855.html:
2369         * manual-tests/bugzilla-4840.html:
2370         * manual-tests/bugzilla-6821.html:
2371         * manual-tests/containing-block-position-chage.html:
2372         * manual-tests/contenteditable-link.html:
2373         * manual-tests/css3-cursor-fallback-quirks.html:
2374         * manual-tests/css3-cursor-fallback-strict.html:
2375         * manual-tests/custom-cursors.html:
2376         * manual-tests/dictionary-scrolled-iframe.html:
2377         * manual-tests/dom-manipulation-on-resize.html:
2378         * manual-tests/drag-image-to-address-bar.html:
2379         * manual-tests/empty-link-target.html:
2380         * manual-tests/empty-title-popup.html:
2381         * manual-tests/first-line-style-crash.html:
2382         * manual-tests/invalid-mouse-event.html:
2383         * manual-tests/left-overflow-repaint.html:
2384         * manual-tests/linkjump-3.html:
2385         * manual-tests/log-keypress-events.html:
2386         * manual-tests/named-window-blank-target.html:
2387         * manual-tests/plain-text-paste.html:
2388         * manual-tests/plugin-controller-datasource.html:
2389         * manual-tests/pre-tab-selection-rect.html:
2390         * manual-tests/redirection-target.html:
2391         * manual-tests/redraw-page-cache-visited-links.html:
2392         * manual-tests/reset-initiatedDrag.html:
2393         * manual-tests/resources/named-window-blank-target-step2.html:
2394         * manual-tests/resources/named-window-blank-target-step3.html:
2395         * manual-tests/resources/named-window-blank-target-step4.html:
2396         * manual-tests/resources/redraw-page-cache-visited-links-2.html:
2397         * manual-tests/scrollbar-hittest.html:
2398         * manual-tests/scrollbar-hittest2.html:
2399         * manual-tests/subview-click-assertion.html:
2400         * manual-tests/tabbing-input-google.html:
2401         * manual-tests/text-field-autoscroll.html:
2402         * manual-tests/textarea-after-stylesheet-link.html:
2403         * manual-tests/textarea-focus.html:
2404         * manual-tests/whitespace-pre-affinity.html:
2405
2406 2007-03-18  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2407
2408         Not reviewed - gdk build fix.
2409
2410         * platform/gdk/ScrollViewGdk.cpp:
2411         (WebCore::ScrollView::update): add a stub
2412
2413 2007-03-18  Brady Eidson  <beidson@apple.com>
2414
2415         Reviewed by Hyatt
2416
2417         http://bugs.webkit.org/show_bug.cgi?id=13111
2418         When stopped a load before it completes, partial images become the 
2419         broken image icon
2420
2421         * loader/loader.cpp:
2422         (WebCore::Loader::didFail): Split off into a method that knows the 
2423           difference between failed and cancelled.  If a load is cancelled,
2424           don't call error() on the object - only remove it from the cache
2425         (WebCore::Loader::cancelRequests): Call didFail(loader, true)
2426         * loader/loader.h: Added didFail(SubresourceLoader*, bool cancelled)
2427
2428 2007-03-18  Mitz Pettel  <mitz@webkit.org>
2429
2430         Reviewed by Adele.
2431
2432         - fix http://bugs.webkit.org/show_bug.cgi?id=13101
2433           REGRESSION (NativeTextField): Specifying word-wrap:break-word makes text field wrap
2434
2435         Test: fast/forms/input-text-word-wrap.html
2436
2437         * rendering/RenderTextControl.cpp:
2438         (WebCore::RenderTextControl::createInnerTextStyle): Force the inner block to
2439         'word-wrap:normal'.
2440
2441 2007-03-18  Dan Waylonis  <waylonis@mac.com>
2442
2443         Reviewed by Tim Hatcher.
2444
2445         Fix http://bugs.webkit.org/show_bug.cgi?id=13005
2446         Bug 13005: WebScriptObject +throwException needs NULL check.
2447
2448         Add checking for NULL interpreter before throwing exception.
2449
2450         * bindings/objc/WebScriptObject.mm:
2451         (+[WebScriptObject throwException:]):
2452
2453 2007-03-18  Geoffrey Garen  <ggaren@apple.com>
2454
2455         Reviewed by Oliver Hunt.
2456         
2457         Fixed http://bugs.webkit.org/show_bug.cgi?id=13106
2458         REGRESSION: Incomplete document.all implementation breaks abtelectronics.com 
2459         (Style Change Through JavaScript Blanks Content)
2460         
2461         When indexing into collections, treat the empty string as an invalid argument,
2462         instead of the number 0.
2463
2464         * bindings/js/kjs_html.cpp:
2465         (KJS::JSHTMLCollection::getOwnPropertySlot):
2466         (KJS::JSHTMLCollection::callAsFunction):
2467         (KJS::JSHTMLCollectionPrototypeFunction::callAsFunction):
2468
2469 2007-03-18  David Hyatt  <hyatt@apple.com>
2470
2471         Use fillRect instead of drawLine, since drawLine has some odd behavior (it's only used for borders).
2472
2473         Reviewed by aroben
2474
2475         * platform/graphics/IntRect.h:
2476         * rendering/RenderFrameSet.cpp:
2477         (WebCore::RenderFrameSet::paintColumnBorder):
2478         (WebCore::RenderFrameSet::paintRowBorder):
2479
2480 2007-03-18  David Hyatt  <hyatt@apple.com>
2481
2482         Change the frameborder color to be light gray for framesets.
2483
2484         Reviewed by aroben
2485
2486         * rendering/RenderFrameSet.cpp:
2487         (WebCore::borderFillColor):
2488         (WebCore::RenderFrameSet::paintColumnBorder):
2489         (WebCore::RenderFrameSet::paintRowBorder):
2490
2491 2007-03-18  David Hyatt  <hyatt@apple.com>
2492
2493         Make iframes work properly with frameborder="0".
2494
2495         Reviewed by aroben
2496
2497         * html/HTMLIFrameElement.cpp:
2498         (WebCore::HTMLIFrameElement::mapToEntry):
2499         (WebCore::HTMLIFrameElement::parseMappedAttribute):
2500
2501 2007-03-18  David Hyatt  <hyatt@apple.com>
2502
2503         Add a 2px border by default to <iframe>s for compatibility with other browsers.
2504
2505         Reviewed by aroben
2506
2507         * css/html4.css:
2508
2509 2007-03-18  David Hyatt  <hyatt@apple.com>
2510
2511         Move frame borders out of WebKit and into WebCore.
2512
2513         Reviewed by aroben, olliej
2514
2515         * bridge/mac/FrameViewMac.mm:
2516         * css/html4.css:
2517         * html/HTMLFrameSetElement.cpp:
2518         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
2519         (WebCore::HTMLFrameSetElement::mapToEntry):
2520         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
2521         (WebCore::HTMLFrameSetElement::attach):
2522         * html/HTMLFrameSetElement.h:
2523         (WebCore::HTMLFrameSetElement::hasBorderColor):
2524         * page/FrameView.cpp:
2525         (WebCore::FrameViewPrivate::FrameViewPrivate):
2526         * page/FrameView.h:
2527         * page/mac/WebCoreFrameBridge.h:
2528         * platform/graphics/IntRect.h:
2529         (WebCore::IntRect::topLeft):
2530         (WebCore::IntRect::topRight):
2531         (WebCore::IntRect::bottomLeft):
2532         (WebCore::IntRect::bottomRight):
2533         * rendering/RenderFrame.cpp:
2534         (WebCore::RenderFrame::viewCleared):
2535         * rendering/RenderFrameSet.cpp:
2536         (WebCore::borderStartEdgeColor):
2537         (WebCore::borderEndEdgeColor):
2538         (WebCore::RenderFrameSet::paintColumnBorder):
2539         (WebCore::RenderFrameSet::paintRowBorder):
2540         (WebCore::RenderFrameSet::paint):
2541         * rendering/RenderFrameSet.h:
2542         * rendering/RenderPartObject.cpp:
2543         (WebCore::RenderPartObject::viewCleared):
2544         * rendering/RenderView.cpp:
2545         (WebCore::RenderView::repaintViewRectangle):
2546
2547 2007-03-17  David Hyatt  <hyatt@apple.com>
2548
2549         Make onload do an explicit paint when a top-level document is ready (to ensure that a first paint always
2550         happens before any timers set by the onload can fire).
2551
2552         Reviewed by aroben
2553
2554         * dom/Document.cpp:
2555         (WebCore::Document::implicitClose):
2556         * platform/ScrollView.h:
2557         * platform/mac/ScrollViewMac.mm:
2558         (WebCore::ScrollView::update):
2559
2560 2007-03-17  Dave Hyatt  <hyatt@apple.com>
2561
2562         Prevent starvation of user input and painting when processing timers.
2563         If we are already in the processing of a custom timer message, don't allow that
2564         processing to do another PostMessage.  Force SetTimer to be used instead.
2565       
2566         Reviewed by ggaren
2567
2568        * platform/win/SharedTimerWin.cpp:
2569         (WebCore::TimerWindowWndProc):
2570         (WebCore::setSharedTimerFireTime):
2571
2572 2007-03-17  Geoffrey Garen  <ggaren@apple.com>
2573
2574         Reviewed by Beth Dakin.
2575
2576         Fixed <rdar://problem/5070967> REGRESSION (r20211): Repro crash when 
2577         closing View Source window
2578         
2579         I award myself 0 points, and may God have mercy on my soul.
2580
2581         * bindings/js/kjs_proxy.cpp:
2582         (WebCore::KJSProxy::~KJSProxy):
2583
2584 2007-03-17  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2585
2586         Not reviewed - gdk build fix.
2587
2588         * platform/gdk/TemporaryLinkStubs.cpp:
2589         (Pasteboard::writeURL):
2590
2591 2007-03-17  David Hyatt  <hyatt@apple.com>
2592
2593         Fix tiny PLT regression.  Don't examine the border/background data for RenderImage when images change
2594         unless we actually have a border/background.
2595
2596         Reviewed by Brady
2597
2598         * rendering/RenderImage.cpp:
2599         (WebCore::RenderImage::imageChanged):
2600
2601 2007-03-17  Nikolas Zimmermann  <zimmermann@kde.org>
2602
2603         Reviewed by Sam Weinig.
2604
2605         Fixes: http://bugs.webkit.org/show_bug.cgi?id=13046 (CSS styles on hover and focus are broken for <use>)
2606         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12838 (SVG <use> CSS styles broken)
2607         Added test: svg/custom/use-css-events.svg
2608
2609         In general this fixes the peepo.co.uk website.
2610
2611         Forgot to pass the actual StyleChange to the recalcStyle() function,
2612         when calling it on the shadow tree root element.
2613
2614         * ksvg2/svg/SVGUseElement.cpp:
2615         (WebCore::SVGUseElement::recalcStyle):
2616
2617 2007-03-17  Timothy Hatcher  <timothy@apple.com>
2618
2619         Reviewed by Mark Rowe.
2620
2621         Made Version.xcconfig smarter when building for different configurations.
2622         Now uses the 522+ OpenSource version for Debug and Release, while using the
2623         full 522.4 version for Production builds. The system prefix is also computed
2624         based on the current system, so 4522.4 on Tiger and 5522.4 on Leopard.
2625
2626         * Configurations/Version.xcconfig:
2627         * Configurations/WebCore.xcconfig:
2628
2629 2007-03-17  Antti Koivisto  <antti@apple.com>
2630
2631         Reviewed by Adele.
2632
2633         Fix http://bugs.webkit.org/show_bug.cgi?id=12595
2634         REGRESSION: Can't add item to cart at lnt.com (JS type error)
2635         <rdar://problem/4722863>
2636         
2637         Emulate Firefox behavior where form elements accessed by a name
2638         can be accessed with that name later even if the name changes or
2639         even if element is removed from the document.
2640         
2641         This is loosely based on Darin's earlier patch for the same problem but
2642         is much less expansive. It takes somewhat different approach to more closely
2643         mimic Firefox behavior. Includes expanded test case.
2644
2645         * bindings/js/JSHTMLFormElementCustom.cpp:
2646         (WebCore::JSHTMLFormElement::canGetItemsForName):
2647             Use new the HTMLFormElement::getNamedElements() method
2648         (WebCore::JSHTMLFormElement::nameGetter):
2649             Use new the HTMLFormElement::getNamedElements() method
2650         * html/HTMLFormElement.cpp:
2651         (WebCore::HTMLFormElement::HTMLFormElement):
2652         (WebCore::HTMLFormElement::~HTMLFormElement):
2653         (WebCore::HTMLFormElement::elementForAlias):
2654         (WebCore::HTMLFormElement::addElementAlias):
2655             Maintain a map of known element aliases
2656         (WebCore::HTMLFormElement::getNamedElements):
2657             Get a list of elements matching the name, based both their
2658             current names and known aliases (earlier names).
2659             Keep the alias list in sync.
2660         * html/HTMLFormElement.h:
2661
2662 2007-03-17  Adele Peterson  <adele@apple.com>
2663
2664         Reviewed by Hyatt.
2665
2666         Fix for <rdar://problem/4990050> REGRESSION: onchange gets fired when clicking on a programmatically selected element in a listbox
2667         http://bugs.webkit.org/show_bug.cgi?id=12725
2668
2669         Test: updated fast/forms/listbox-onchange.html
2670
2671         Added HTMLSelectElement::saveLastSelection that is called before changing a selection that could result
2672         in onChange being called.  m_lastOnChangeIndex and m_lastOnChangeSelection no longer have to be up-to date all the time, 
2673         they just have to be up-to-date before we execute an action that may trigger onChange.
2674
2675         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::setSelectedState): Added.
2676           The HTMLSelectElement will only set an option's selected state with this method.  This ensures
2677           that notifyOptionSelected won't get called when the call originates from the select element.
2678         * html/HTMLOptionElement.h:
2679
2680         * html/HTMLSelectElement.cpp:
2681         (WebCore::HTMLSelectElement::deselectItems): Calls setSelectedState.
2682         (WebCore::HTMLSelectElement::setSelectedIndex): ditto. Don't update the last selection variables here.  Scroll to the new selection.
2683          The scrolling call used to only be in notifyOptionSelected.  There's no reason we shouldn't scroll when the selection is set through
2684          the HTMLSelectElement.
2685         (WebCore::HTMLSelectElement::setValue): Call setSelectedIndex to update all options selected state.
2686         (WebCore::HTMLSelectElement::restoreState): Call setSelectedState.
2687         (WebCore::HTMLSelectElement::selectAll): Call saveLastSelection before making the selection, and calling onChange.
2688         (WebCore::HTMLSelectElement::recalcListItems): Call setSelectedState.  Don't need to save selection here anymore, 
2689          since it will get saved before we call onChange.
2690         (WebCore::HTMLSelectElement::reset): ditto.
2691         (WebCore::HTMLSelectElement::dispatchFocusEvent): Added. Call saveLastSelection for menu lists, since onChange can be fired
2692          on blur.
2693         (WebCore::HTMLSelectElement::dispatchBlurEvent): Call menuListOnChange.
2694         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Call saveLastSelection before showing the popup window.
2695         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):  Call saveLastSelection during mousedown (to prepare for an 
2696          onchange during mouseup, or after autoscroll).
2697         (WebCore::HTMLSelectElement::updateListBoxSelection): Call setSelectedState.
2698
2699         (WebCore::HTMLSelectElement::menuListOnChange): Added. Compares the m_lastOnChangeIndex to the selectedIndex().
2700         (WebCore::HTMLSelectElement::listBoxOnChange): Move the m_lastOnChangeSelection creation to saveLastSelection.
2701         (WebCore::HTMLSelectElement::saveLastSelection): Added. Sets m_lastOnChangeIndex or m_lastOnChangeSelection.
2702         * html/HTMLSelectElement.h:
2703         * platform/PopupMenu.h:
2704
2705 2007-03-16  Oliver Hunt  <oliver@apple.com>
2706
2707         Reviewed by Hyatt.
2708
2709         The old canSaveAsWebArchive call was necessary as stand alone
2710         images used to be rendered by ImageDocument.
2711
2712         Fixes rdar://problem/5061252
2713
2714         * dom/Clipboard.cpp:
2715         * dom/Clipboard.h:
2716         (WebCore::Clipboard::setDragHasStarted):
2717         * page/DragClient.h:
2718         (WebCore::DragClient::declareAndWriteDragImage):
2719         * platform/mac/ClipboardMac.mm:
2720         (WebCore::ClipboardMac::declareAndWriteDragImage):
2721
2722 2007-03-16  Anders Carlsson  <acarlsson@apple.com>
2723
2724         Reviewed by Maciej.
2725
2726         <rdar://problem/4869095>
2727         default content type changed for XMLHttpRequest POSTs changed (breaks Flickrator 0.1 widget)
2728         
2729         * xml/xmlhttprequest.cpp:
2730         (WebCore::XMLHttpRequest::send):
2731
2732 2007-03-16  Brady Eidson  <beidson@apple.com>
2733
2734         Rubberstamped by Tim Hatcher
2735
2736         Update the hash table header for Window object properties
2737
2738         * bindings/js/kjs_window.cpp:
2739
2740 2007-03-16  Brady Eidson  <beidson@apple.com>
2741
2742         Reviewed by Anders
2743
2744         <rdar://problem/5061826> and
2745         http://bugs.webkit.org/show_bug.cgi?id=12863
2746         Implement window.stop()
2747
2748         * bindings/js/kjs_window.cpp:
2749         (KJS::WindowFunc::callAsFunction): Add case Window::Stop
2750         * bindings/js/kjs_window.h:
2751         (KJS::Window::): Add "Stop"
2752
2753 2007-03-16  Geoffrey Garen  <ggaren@apple.com>
2754
2755         Reviewed by Brady Eidson.
2756
2757         Fixed dir creation to account for already existing dirs and missing leading
2758         dirs in path.
2759         
2760         * loader/icon/IconDatabase.cpp:
2761         (WebCore::makeAllDirectories):
2762
2763 2007-03-16  David Hyatt  <hyatt@apple.com>
2764
2765         Fix for 13084, assertion failure in the Cache.  Convert the client list
2766         to a HashCountedSet so that multiple refs and derefs are allowed.
2767
2768         Fix RenderImage so that if it has the same image used as a background/border
2769         and as the foreground that it will repaint properly (can be tested using
2770         border-image and a foreground image).
2771
2772         Optimize list marker so that it doesn't waste time in the base class method,
2773         since list markers don't support background or border images.
2774
2775         Reviewed by andersca
2776
2777         * ChangeLog:
2778         * loader/CachedResource.cpp:
2779         (WebCore::CachedResource::ref):
2780         * loader/CachedResource.h:
2781         * loader/CachedResourceClientWalker.cpp:
2782         (WebCore::CachedResourceClientWalker::CachedResourceClientWalker):
2783         * loader/CachedResourceClientWalker.h:
2784         * rendering/RenderImage.cpp:
2785         (WebCore::RenderImage::imageChanged):
2786         * rendering/RenderListMarker.cpp:
2787         (WebCore::RenderListMarker::imageChanged):
2788
2789 2007-03-16  Geoffrey Garen  <ggaren@apple.com>
2790
2791         Reviewed by Anders Carlsson.
2792         
2793         Fixed <rdar://problem/5065399> REGRESSION: leaks in Frame::bindingRootObject 
2794         seen on buildbot
2795
2796         The problem was that we were initializing the same WebScriptObject twice.
2797         This caused it to leak its original set of ivars.
2798         
2799         I think some refactoring could prevent this situation from arising in the
2800         first place, but I'm just adding a check at the call site for now, to do 
2801         the simplest thing.
2802
2803         * bindings/objc/WebScriptObject.mm:
2804         (-[WebScriptObject _setImp:originRootObject:rootObject:]): Added ASSERTs
2805         against multiple calls.
2806
2807         * bindings/objc/WebScriptObjectPrivate.h: Renamed _initializeWithObjectImp
2808         to setImp because "init" vs "initialize" was a too subtle indication that
2809         one was a Cocoa initializer and one was not.
2810
2811 2007-03-16  Lars Knoll <lars@trolltech.com>
2812
2813         don't use #import in .cpp files.
2814
2815         * editing/qt/EditorQt.cpp:
2816
2817 2007-03-16  Lars Knoll <lars@trolltech.com>
2818
2819         Fix the Qt build once again.
2820
2821         * platform/qt/PasteboardQt.cpp:
2822         (WebCore::Pasteboard::Pasteboard):
2823         (WebCore::Pasteboard::writeSelection):
2824         (WebCore::Pasteboard::plainText):
2825         (WebCore::Pasteboard::documentFragment):
2826         (WebCore::Pasteboard::writeURL):
2827         (WebCore::Pasteboard::writeImage):
2828         (WebCore::Pasteboard::clear):
2829
2830 2007-03-15  Shrikant Gangoda  <shrikant.gangoda@celunite.com>
2831
2832         Gdk build fix.
2833
2834         * loader/gdk/FrameLoaderClientGdk.cpp:
2835         (WebCore::FrameLoaderClientGdk::blockedError):
2836         * loader/gdk/FrameLoaderClientGdk.h:
2837
2838 2007-03-15  Beth Dakin  <bdakin@apple.com>
2839
2840         Reviewed by Geoff.
2841
2842         Fix for http://bugs.webkit.org/show_bug.cgi?id=13088 REGRESSION
2843         (r19761-19779): Copy image no longer includes image address 
2844         (rdar://5067927)
2845
2846         writeURL() does not need an isImage parameter. Now that it accepts 
2847         the types as a parameter, we can just declare the appropriate image 
2848         types within writeImage and send them to writeURL(). Also, 
2849         declaring the types twice is what broke this.
2850
2851         * platform/Pasteboard.h:
2852         * platform/mac/PasteboardMac.mm:
2853         (WebCore::Pasteboard::writeURL):
2854         (WebCore::Pasteboard::writeImage):
2855
2856 2007-03-15  Adele Peterson  <adele@apple.com>
2857
2858         Reviewed by Kevin Decker.
2859
2860         Fix for <rdar://problem/4926179> Text in menulist control should never update if menu is open
2861
2862         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
2863           Only setTextFromOption if the menu isn't visible.
2864
2865 2007-03-15  Brady Eidson  <beidson@apple.com>
2866
2867         Reviewed by Oliver
2868
2869         A few platform specific tweaks
2870
2871         * platform/cf/RetainPtr.h:
2872         (WebCore::RetainPtr::releaseRef): Fixed releaseRef to work with CF
2873         
2874         * platform/network/ResourceHandle.h: Added a "releaseRef" style call
2875
2876 2007-03-15  Maciej Stachowiak  <mjs@apple.com>
2877
2878         Reviewed by Geoff and Steve.
2879
2880         * config.h: Remove unneeded hack.
2881
2882 2007-03-15  Justin Garcia  <justin.garcia@apple.com>
2883
2884         Reviewed by john
2885         
2886         <rdar://problem/5062376> 
2887         REGRESSION: In Mail and Gmail, can't change alignment to text after it has been applied
2888         
2889         Bring back the remove step in applyBlockStyle.  It's 
2890         necessary because addBlockStyleIfNeeded assumes that 
2891         the properties it adds aren't already on the block that 
2892         it adds them to.
2893
2894         * editing/ApplyStyleCommand.cpp:
2895         (WebCore::ApplyStyleCommand::applyBlockStyle): 
2896         Bring back the remove step (added a testcase).
2897         Don't do the add step if m_removeOnly is true (no testcase
2898         because there aren't any clients using removeOnly functionality
2899         to remove styles yet, only styled elemets).
2900         Moved the code for creating new blocks up one level
2901         to this function so that we can pass blocks to removeCSSStyle.
2902         When converting VisiblePositions to indices and vice versa,
2903         use the highest node in the shadow tree if we're in one as
2904         the scope (working on a testcase).
2905         (WebCore::ApplyStyleCommand::addBlockStyle): Moved code to
2906         applyBlockStyle.
2907         * editing/ApplyStyleCommand.h: 
2908
2909 2007-03-15  Brady Eidson  <beidson@apple.com>
2910
2911         Reviewed by Maciej
2912
2913         <rdar://problem/4429701>
2914         Implements a port blocking black list that matches Firefox's
2915
2916         * loader/FrameLoader.cpp:
2917         (WebCore::FrameLoader::blockedError): Call through to the client for blockedError 
2918         * loader/FrameLoader.h:
2919
2920         * loader/FrameLoaderClient.h: Get the "port blocked" error for the current platform
2921
2922         * loader/ResourceLoader.cpp:
2923         (WebCore::ResourceLoader::wasBlocked): ResourceHandleClient method to pass on the didFail(error)
2924         (WebCore::ResourceLoader::blockedError): Following the pattern of "CancelledError()", get the 
2925           error to fail with for the didFail() call
2926         * loader/ResourceLoader.h:
2927
2928         * platform/graphics/svg/SVGImageEmptyClients.h:
2929         (WebCore::SVGEmptyFrameLoaderClient::blockedError): Added stub
2930
2931         * platform/network/ResourceHandle.cpp:
2932         (WebCore::ResourceHandle::create): If the port is blocked, create the handle but schedule it for
2933           deferred failure on a timer
2934         (WebCore::ResourceHandle::scheduleBlockedFailure): Do the timer scheduling
2935         (WebCore::ResourceHandle::fireBlockedFailure): Fire the timer here
2936         (WebCore::ResourceHandle::portAllowed): Implements checking of Mozilla's
2937         * platform/network/ResourceHandle.h:
2938         * platform/network/ResourceHandleClient.h:
2939         (WebCore::ResourceHandleClient::wasBlocked): Virtual for clients to get the "blocked" message
2940
2941 2007-03-15  Beth Dakin  <bdakin@apple.com>
2942
2943         Reviewed by Hyatt.
2944
2945         Fix for <rdar://problem/5065396> REGRESSION: leaks in 
2946         RenderBlock::layoutInlineChildren seen on buildbot
2947
2948         This leak appeared after http://trac.webkit.org/projects/webkit/
2949         changeset/20188. This change shifted line boxes around in 
2950         removeChild(). But since removeChild() calls 
2951         setNeedsLayoutAndMinMaxRecalc(), all of the line boxes will be 
2952         removed once we actually lay out anyway. So this patch fixes the 
2953         leak by deleting the line boxes instead of shifting them around. 
2954
2955         * editing/IndentOutdentCommand.cpp:
2956         (WebCore::IndentOutdentCommand::outdentParagraph): Call into 
2957         updateLayout(). This fixes an assertion I got in editing/
2958         execCommand/4976800.html This is very similar to the line box fix I 
2959         made recently (http://trac.webkit.org/projects/webkit/changeset/
2960         20177). We need to update layout before relying on VisiblePositions 
2961         after removing a node.
2962         * rendering/RenderBlock.cpp:
2963         (WebCore::RenderBlock::deleteLinesForBlock): New helper function 
2964         since this functionality is needed in three places now.
2965         (WebCore::RenderBlock::makeChildrenNonInline): Call into new 
2966         deleteLinesForBlock().
2967         (WebCore::RenderBlock::removeChild): Same.
2968         * rendering/RenderBlock.h:
2969
2970 2007-03-15  Timothy Hatcher  <timothy@apple.com>
2971
2972         Reviewed by John.
2973
2974         * Factored out most of our common build settings into .xcconfig files. Anything that was common in
2975           each build configuration was factored out into the shared .xcconfig file.
2976         * Adds a Version.xcconfig file to define the current framework version, to be used in other places.
2977         * Use the new $(BUNDLE_VERSION) (defined in Version.xcconfig) in the preprocessed Info.plist.
2978         * Use the versions defined in Version.xcconfig to set $(DYLIB_CURRENT_VERSION).
2979
2980         * Configurations/Base.xcconfig: Added.
2981         * Configurations/DebugRelease.xcconfig: Added.
2982         * Configurations/Version.xcconfig: Added.
2983         * Configurations/WebCore.xcconfig: Added.
2984         * Info.plist:
2985         * WebCore.xcodeproj/project.pbxproj:
2986
2987 2007-03-15  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
2988
2989         Not reviewed - gdk build fixes.
2990
2991         * platform/gdk/EditorClientGdk.cpp:
2992         (WebCore::EditorClientGdk::handleKeypress):
2993         * platform/graphics/cairo/ImageSourceCairo.cpp:
2994         (WebCore::ImageSource::setData):
2995         * platform/graphics/gdk/ImageGdk.cpp:
2996         (WebCore::Image::loadPlatformResource):
2997
2998 2007-03-14  Justin Garcia  <justin.garcia@apple.com>
2999
3000         Reviewed by john
3001         
3002         ~2x speed up of 5k rich text paste:
3003         http://shakespeare.mit.edu/hamlet/full.html        
3004
3005         * editing/ReplaceSelectionCommand.cpp:
3006         (WebCore::ReplaceSelectionCommand::doApply): Remove the top 
3007         level style span if it's unnecessary before inserting
3008         into the document, it's faster than doing it after.
3009         * editing/ReplaceSelectionCommand.h: Exposed 
3010         ReplacementFragment::removeNodePreservingChildren so that
3011         the style span can be removed using non-undoable removes,
3012         like the rest of the removes done on the ReplacementFragment.
3013         * editing/markup.cpp:
3014         (WebCore::createMarkup): Make the style span the top level
3015         element, otherwise it's useless.  This also facilitates the
3016         optimization mentioned above.
3017         When including markup for a fully selected root, include markup
3018         for all the nodes beneath that fully selected root, to preserve 
3019         the structure and appearance of the copied markup.  Did this
3020         by merging with the code for adding markup for descendants of
3021         special commonAncestorBlocks.
3022
3023 2007-03-15  Beth Dakin  <bdakin@apple.com>
3024
3025         Rubber-stamped by Adele.
3026
3027         Rolling out http://trac.webkit.org/projects/webkit/changeset/20148 
3028         (which is a fix for http://bugs.webkit.org/show_bug.cgi?id=12595 
3029         and rdar://4722863) because it causes a horrible memory-trasher. 
3030
3031         * bindings/js/JSHTMLFormElementCustom.cpp:
3032         (WebCore::JSHTMLFormElement::canGetItemsForName):
3033         (WebCore::JSHTMLFormElement::nameGetter):
3034         * bindings/js/kjs_dom.cpp:
3035         (KJS::):
3036         (KJS::DOMNamedNodesCollection::DOMNamedNodesCollection):
3037         (KJS::DOMNamedNodesCollection::lengthGetter):
3038         (KJS::DOMNamedNodesCollection::indexGetter):
3039         (KJS::DOMNamedNodesCollection::getOwnPropertySlot):
3040         * bindings/js/kjs_dom.h:
3041         (KJS::DOMNamedNodesCollection::classInfo):
3042         * bindings/js/kjs_html.cpp:
3043         (KJS::JSHTMLCollection::getNamedItems):
3044         * dom/ChildNodeList.cpp:
3045         (WebCore::ChildNodeList::ChildNodeList):
3046         (WebCore::ChildNodeList::length):
3047         (WebCore::ChildNodeList::item):
3048         (WebCore::ChildNodeList::nodeMatches):
3049         * dom/ChildNodeList.h:
3050         * dom/NameNodeList.cpp:
3051         (WebCore::NameNodeList::NameNodeList):
3052         (WebCore::NameNodeList::item):
3053         (WebCore::NameNodeList::nodeMatches):
3054         * dom/NameNodeList.h:
3055         (WebCore::NameNodeList::rootNodeAttributeChanged):
3056         * dom/Node.cpp:
3057         (WebCore::TagNodeList::TagNodeList):
3058         (WebCore::TagNodeList::nodeMatches):
3059         (WebCore::Node::registerNodeList):
3060         (WebCore::Node::unregisterNodeList):
3061         * dom/Node.h:
3062         * dom/NodeList.cpp:
3063         (WebCore::NodeList::NodeList):
3064         (WebCore::NodeList::~NodeList):
3065         (WebCore::NodeList::recursiveLength):
3066         (WebCore::NodeList::itemForwardsFromCurrent):
3067         (WebCore::NodeList::itemBackwardsFromCurrent):
3068         (WebCore::NodeList::recursiveItem):
3069         (WebCore::NodeList::itemWithName):
3070         (WebCore::NodeList::rootNodeChildrenChanged):
3071         * dom/NodeList.h:
3072         (WebCore::NodeList::rootNodeAttributeChanged):
3073         * html/HTMLFormElement.cpp:
3074         (WebCore::HTMLFormElement::HTMLFormElement):
3075         (WebCore::HTMLFormElement::~HTMLFormElement):
3076         (WebCore::HTMLFormElement::formData):
3077         (WebCore::HTMLFormElement::parseMappedAttribute):
3078         (WebCore::HTMLFormElement::removeFormElement):
3079         * html/HTMLFormElement.h:
3080         * html/HTMLGenericFormElement.cpp:
3081         (WebCore::HTMLGenericFormElement::parseMappedAttribute):
3082         (WebCore::HTMLGenericFormElement::insertedIntoTree):
3083         * html/HTMLGenericFormElement.h:
3084         * html/HTMLInputElement.cpp:
3085         (WebCore::HTMLInputElement::parseMappedAttribute):
3086
3087 2007-03-15  Geoffrey Garen  <ggaren@apple.com>
3088
3089         Added an assert to help catch a bug. Hopefully someone will hit it!
3090         
3091         * bindings/js/kjs_proxy.cpp:
3092         (WebCore::KJSProxy::~KJSProxy):
3093
3094 2007-03-14  Oliver Hunt  <oliver@apple.com>
3095
3096         Reviewed by Adele.
3097
3098         Fix for rdar://problem/5061737.
3099         
3100         This was a regression from the original Objective-C -> C++ conversion
3101         for the drag logic.  We don't need to call Range::startNode as we just
3102         need the document that contains the range.   
3103
3104         * page/DragController.cpp:
3105         (WebCore::documentFragmentFromDragData):
3106
3107 2007-03-14  Mitz Pettel  <mitz@webkit.org>
3108
3109         Reviewed by Hyatt.
3110
3111         - http://bugs.webkit.org/show_bug.cgi?id=13071
3112           REGRESSION: Plain text files no longer wrap lines longer than the width of the browser window
3113
3114         Test: fast/loader/text-document-wrapping.html
3115
3116         * loader/TextDocument.cpp:
3117         (WebCore::TextTokenizer::write): Specified word-wrap:break-word for the <pre> element.
3118
3119 2007-03-14  Mitz Pettel  <mitz@webkit.org>
3120
3121         Reviewed by Hyatt.
3122
3123         - fix http://bugs.webkit.org/show_bug.cgi?id=13072
3124           REGRESSION (r15617): white-space: pre-wrap breaks off the last character of a wide word
3125
3126         Test: fast/text/whitespace/pre-wrap-last-char.html
3127
3128         * rendering/bidi.cpp:
3129         (WebCore::RenderBlock::findNextLineBreak): Undid the change from r15617.
3130
3131 2007-03-14  David Hyatt  <hyatt@apple.com>
3132
3133         Add asserts to help catch double refs and double derefs of CachedResources.
3134
3135         Reviewed by mjs
3136
3137         * loader/CachedResource.cpp:
3138         (WebCore::CachedResource::ref):
3139         (WebCore::CachedResource::deref):
3140
3141 2007-03-14  Alice Liu  <alice.liu@apple.com>
3142
3143         Rubber-stamped by Hyatt.
3144
3145         Adding null check to prevent the crash that happens on 2nd run of iBench HTML load test
3146
3147         * loader/icon/IconDataCache.cpp:
3148         (WebCore::IconDataCache::writeToDatabase):
3149
3150 === Safari-5522.4 ===
3151
3152 2007-03-14  Adele Peterson  <adele@apple.com>
3153
3154         Reviewed by Adam.
3155
3156         Fix for <rdar://problem/5062898> REGRESSION: autocomplete window in text fields doesn't come up
3157
3158         When we moved the initialization of a bunch of variables in the HTMLFormElement constructor, m_autocomplete accidently got initialized to false.
3159
3160         * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::HTMLFormElement):
3161
3162 2007-03-14  Steve Falkenburg  <sfalken@apple.com>
3163
3164         Reviewed by Adam.
3165
3166         Added missing null check in case this is called on a subframe
3167         that hasn't started loading.
3168
3169         * page/Frame.cpp:
3170         (WebCore::Frame::setMarkedTextMatchesAreHighlighted): Check for a null document.
3171
3172 2007-03-14  Antti Koivisto  <antti@apple.com>
3173
3174         Reviewed by Geoff.
3175
3176         Fix http://bugs.webkit.org/show_bug.cgi?id=13060
3177         REGRESSION: Repro ASSERT failure in Cache::adjustSize running layout tests
3178         <rdar://5060208>
3179         
3180         Script evaluation may have dereffed the CachedScript object already, causing double deref and
3181         eventually m_liveResourcesSize underflow.
3182
3183         * html/HTMLScriptElement.cpp:
3184         (WebCore::HTMLScriptElement::notifyFinished):
3185
3186 2007-03-14  Adele Peterson  <adele@apple.com>
3187
3188         Reviewed by Darin.
3189
3190         Added InsertTab, InsertBacktab, InsertLineBreak, and InsertNewline to the editing command table.
3191         Added Event parameter to execCommand, and to all of the enabled and exec functions.  Right now,
3192         the event is only used by the newly added commands.  But in the future, many (and possibly all) of
3193         these editing commands will need to consider the event so they are applied to the correct selection.
3194
3195         * WebCore.exp:
3196         * editing/Editor.cpp:
3197         (WebCore::execCopy):
3198         (WebCore::execCut):
3199         (WebCore::execDelete):
3200         (WebCore::execBackwardDelete):
3201         (WebCore::execForwardDelete):
3202         (WebCore::execMoveBackward):
3203         (WebCore::execMoveBackwardAndModifySelection):
3204         (WebCore::execMoveUpByPageAndModifyCaret):
3205         (WebCore::execMoveDown):
3206         (WebCore::execMoveDownAndModifySelection):
3207         (WebCore::execMoveForward):
3208         (WebCore::execMoveForwardAndModifySelection):
3209         (WebCore::execMoveDownByPageAndModifyCaret):
3210         (WebCore::execMoveLeft):
3211         (WebCore::execMoveLeftAndModifySelection):
3212         (WebCore::execMoveRight):
3213         (WebCore::execMoveRightAndModifySelection):
3214         (WebCore::execMoveToBeginningOfDocument):
3215         (WebCore::execMoveToBeginningOfDocumentAndModifySelection):
3216         (WebCore::execMoveToBeginningOfSentence):
3217         (WebCore::execMoveToBeginningOfSentenceAndModifySelection):
3218         (WebCore::execMoveToBeginningOfLine):
3219         (WebCore::execMoveToBeginningOfLineAndModifySelection):
3220         (WebCore::execMoveToBeginningOfParagraph):
3221         (WebCore::execMoveToBeginningOfParagraphAndModifySelection):
3222         (WebCore::execMoveToEndOfDocument):
3223         (WebCore::execMoveToEndOfDocumentAndModifySelection):
3224         (WebCore::execMoveToEndOfSentence):
3225         (WebCore::execMoveToEndOfSentenceAndModifySelection):
3226         (WebCore::execMoveToEndOfLine):
3227         (WebCore::execMoveToEndOfLineAndModifySelection):
3228         (WebCore::execMoveToEndOfParagraph):
3229         (WebCore::execMoveToEndOfParagraphAndModifySelection):
3230         (WebCore::execMoveParagraphBackwardAndModifySelection):
3231         (WebCore::execMoveParagraphForwardAndModifySelection):
3232         (WebCore::execMoveUp):
3233         (WebCore::execMoveUpAndModifySelection):
3234         (WebCore::execMoveWordBackward):
3235         (WebCore::execMoveWordBackwardAndModifySelection):
3236         (WebCore::execMoveWordForward):
3237         (WebCore::execMoveWordForwardAndModifySelection):
3238         (WebCore::execMoveWordLeft):
3239         (WebCore::execMoveWordLeftAndModifySelection):
3240         (WebCore::execMoveWordRight):
3241         (WebCore::execMoveWordRightAndModifySelection):
3242         (WebCore::execPaste):
3243         (WebCore::execSelectAll):
3244         (WebCore::execToggleBold):
3245         (WebCore::execToggleItalic):
3246         (WebCore::execRedo):
3247         (WebCore::execUndo):
3248         (WebCore::execInsertTab):
3249         (WebCore::execInsertBacktab):
3250         (WebCore::execInsertNewline):
3251         (WebCore::execInsertLineBreak):
3252         (WebCore::enabled):
3253         (WebCore::canPaste):
3254         (WebCore::hasEditableSelection):
3255         (WebCore::hasEditableRangeSelection):
3256         (WebCore::hasRangeSelection):
3257         (WebCore::hasRichlyEditableSelection):
3258         (WebCore::canRedo):
3259         (WebCore::canUndo):
3260         (WebCore::CommandEntry::):
3261         (WebCore::Editor::toggleBold):
3262
3263         (WebCore::Editor::execCommand): Added optional event parameter.
3264         (WebCore::Editor::insertText): Added.  Calls handleTextInputEvent.
3265         (WebCore::Editor::insertTextWithoutSendingTextEvent): Renamed from insertText.
3266          Performs the actual insertion without dispatching any event.
3267         * editing/Editor.h:
3268         * page/EventHandler.cpp: (WebCore::EventHandler::defaultTextInputEventHandler):
3269           Call insertTextWithoutSendingTextEvent.
3270
3271 2007-03-14  Justin Garcia  <justin.garcia@apple.com>
3272
3273         Reviewed by darin
3274         
3275         ~3x speedup pasting 5k lines of rich text:
3276         http://shakespeare.mit.edu/hamlet/full.html
3277         ~2x speedup pasting 10k lines of plain text
3278         
3279         * css/CSSComputedStyleDeclaration.cpp:
3280         (WebCore::computedStyle): Added for convenience.
3281         * css/CSSComputedStyleDeclaration.h:
3282         * editing/ReplaceSelectionCommand.cpp:
3283         (WebCore::ReplaceSelectionCommand::removeRedundantStyles):
3284         The code that pushed down the top level style span had
3285         a bug in it that made it do unnecessary work.  Instead of
3286         fixing the bug I removed the code because it was used to 
3287         help see more redundancies in second level style spans, but 
3288         createMarkup now *only* creates a top level style span.
3289         Only remove redundant styles from style spans and only remove
3290         unstyled elements if they are style spans.  FF doesn't
3291         remove redundant styles from elements, or remove redundant 
3292         font tags on copy/paste.  We could offer this functionality 
3293         through a separate "cleanup" command.
3294         * editing/markup.cpp:
3295         (WebCore::createMarkup): Only add markup for ancestors of 
3296         lastClosed if we're including markup for acommonAncestorBlock 
3297         (we do this for commonAncestorBlocks like tables and lists),
3298         otherwise it's unnecessary/redundant.
3299
3300 2007-03-14  Anders Carlsson  <acarlsson@apple.com>
3301
3302         Reviewed by Ada.
3303
3304         Make sure to call ResourceLoader::didReceiveData to ensure that there's a shared buffer with the resource
3305         data, since SubresourceLoaderClients now make use of that buffer.
3306         
3307         * loader/SubresourceLoader.cpp:
3308         (WebCore::SubresourceLoader::didReceiveData):
3309
3310 2007-03-14  Administrator  <acarlsson@apple.com>
3311
3312         Get the size from the shared buffer.
3313         
3314         * platform/graphics/cg/ImageSourceCG.cpp:
3315         (WebCore::ImageSource::setData):
3316         * platform/graphics/cg/PDFDocumentImage.cpp:
3317         (WebCore::PDFDocumentImage::dataChanged):
3318
3319 2007-03-14  Mitz Pettel  <mitz@webkit.org>
3320
3321         Reviewed by Hyatt, thumbs up by Darin.
3322
3323         - fix http://bugs.webkit.org/show_bug.cgi?id=12782
3324           Reproducible crash in BidiContext::deref
3325
3326         Test: fast/dynamic/anonymous-block-orphaned-lines.html
3327
3328         * rendering/InlineBox.cpp:
3329         (WebCore::InlineBox::root): Added an assertion that we return a root inline box.
3330         * rendering/RenderBlock.cpp:
3331         (WebCore::RenderBlock::removeChild): Added code to adopt the line boxes of
3332         anonymous blocks being destroyed instead of leaving them orphaned, which
3333         is what caused this crash. The boxes will be deleted on the next layout, but
3334         this ensures consistency in the mean time.
3335
3336 2007-03-14  Lars Knoll <lars@trolltech.com>
3337
3338         Reviewed by Antti.
3339
3340         Fix the Qt build.
3341         Add a getter to SharedBuffer that returns a reference to the internal
3342         Vector to avoid an extra copy of the data.
3343
3344         * platform/SharedBuffer.h:
3345         (WebCore::SharedBuffer::buffer):
3346         * platform/graphics/qt/ImageQt.cpp:
3347         (WebCore::Image::loadPlatformResource):
3348         * platform/graphics/qt/ImageSourceQt.cpp:
3349         (WebCore::detectImageFormat):
3350         (WebCore::createDecoder):
3351         (WebCore::ImageSource::setData):
3352
3353 2007-03-14  Antti Koivisto  <antti@apple.com>
3354
3355         Reviewed by Mitz.
3356         
3357         Fix <rdar://problem/5058774>
3358         REGRESSION: In Mail, caret appears oversized when typing in a To Do note
3359         
3360         Horizontal and vertical were switched. Was regression from
3361         http://trac.webkit.org/projects/webkit/changeset/20103
3362
3363         * rendering/RootInlineBox.cpp:
3364         (WebCore::RootInlineBox::addHighlightOverflow):
3365
3366 2007-03-14  David Hyatt  <hyatt@apple.com>
3367
3368         Tweak the data() functions of stylesheets and scripts to be internally consistent.
3369
3370         * loader/CachedCSSStyleSheet.cpp:
3371         (WebCore::CachedCSSStyleSheet::data):
3372         * loader/CachedScript.cpp:
3373         (WebCore::CachedScript::data):
3374         * loader/CachedXSLStyleSheet.cpp:
3375         (WebCore::CachedXSLStyleSheet::data):
3376
3377 2007-03-14  David Hyatt  <hyatt@apple.com>
3378
3379         Fix Radar 5050688.  
3380
3381         For large animated GIFs, destroy and recreate the source for every animation frame.  This keeps
3382         the memory consumption down while giant images are animating.
3383
3384         Reviewed by andersca
3385
3386         * platform/graphics/BitmapImage.cpp:
3387         (WebCore::BitmapImage::BitmapImage):
3388         (WebCore::BitmapImage::destroyDecodedData):
3389         (WebCore::BitmapImage::dataChanged):
3390         (WebCore::BitmapImage::advanceAnimation):
3391         * platform/graphics/BitmapImage.h:
3392
3393 2007-03-14  David Hyatt  <hyatt@apple.com>
3394
3395         Make sure to use CFDataCreateWithBytesNoCopy where we can.
3396
3397         Reviewed by andersca
3398
3399         * platform/graphics/cg/ImageSourceCG.cpp:
3400         (WebCore::ImageSource::setData):
3401         * platform/graphics/cg/PDFDocumentImage.cpp:
3402         (WebCore::PDFDocumentImage::dataChanged):
3403
3404 2007-03-13  David Hyatt  <hyatt@apple.com>
3405
3406         Fix for bugzilla bug 13050 and also radar p1 5050645.
3407
3408         This patch reworks resource loading to avoid having redundant buffers in the icon database and in cached
3409         images in the WebCore cache.  It also avoids overcopying in top-level image documents and in the icon
3410         database.
3411
3412         There is now only one SharedBuffer for a resource and everybody observes that buffer now instead of ever
3413         making their own.  Even ImageIO uses the SharedBuffer while decoding.
3414
3415         The page in 13050 dropped from 145mb down to 45mb of memory use with this change for a stunning savings
3416         of 100mb.
3417
3418         Reviewed by olliej, mjs
3419
3420         * WebCore.exp:
3421         * loader/CachedCSSStyleSheet.cpp:
3422         (WebCore::CachedCSSStyleSheet::data):
3423         * loader/CachedCSSStyleSheet.h:
3424         * loader/CachedImage.cpp:
3425         (WebCore::CachedImage::data):
3426         * loader/CachedImage.h:
3427         * loader/CachedResource.cpp:
3428         (WebCore::CachedResource::CachedResource):
3429         (WebCore::CachedResource::~CachedResource):
3430         * loader/CachedResource.h:
3431         (WebCore::CachedResource::data):
3432         * loader/CachedScript.cpp:
3433         (WebCore::CachedScript::data):
3434         * loader/CachedScript.h:
3435         * loader/CachedXSLStyleSheet.cpp:
3436         (WebCore::CachedXSLStyleSheet::data):
3437         * loader/CachedXSLStyleSheet.h:
3438         * loader/DocLoader.cpp:
3439         (WebCore::DocLoader::checkCacheObjectStatus):
3440         * loader/ImageDocument.cpp:
3441         (WebCore::ImageTokenizer::writeRawData):
3442         (WebCore::ImageTokenizer::finish):
3443         * loader/icon/IconDataCache.cpp:
3444         (WebCore::IconDataCache::setImageData):
3445         (WebCore::IconDataCache::writeToDatabase):
3446         * loader/icon/IconDataCache.h:
3447         * loader/icon/IconDatabase.cpp:
3448         (WebCore::IconDatabase::imageDataForIconURL):
3449         (WebCore::IconDatabase::iconForPageURL):
3450         (WebCore::IconDatabase::setIconDataForIconURL):
3451         (WebCore::IconDatabase::setHaveNoIconForIconURL):
3452         (WebCore::IconDatabase::imageDataForIconURLQuery):
3453         * loader/icon/IconDatabase.h:
3454         * loader/icon/IconLoader.cpp:
3455         (WebCore::IconLoader::startLoading):
3456         (WebCore::IconLoader::didReceiveResponse):
3457         (WebCore::IconLoader::didReceiveData):
3458         (WebCore::IconLoader::didFail):
3459         (WebCore::IconLoader::finishLoading):
3460         (WebCore::IconLoader::clearLoadingState):
3461         * loader/icon/IconLoader.h:
3462         * loader/icon/SQLStatement.cpp:
3463         (WebCore::SQLStatement::getColumnBlobAsVector):
3464         (WebCore::SQLStatement::isExpired):
3465         * loader/icon/SQLStatement.h:
3466         * loader/loader.cpp:
3467         (WebCore::Loader::didFinishLoading):
3468         (WebCore::Loader::didReceiveData):
3469         * page/mac/WebCoreFrameBridge.mm:
3470         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
3471         (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
3472         * platform/SharedBuffer.h:
3473         (WebCore::SharedBuffer::isEmpty):
3474         * platform/graphics/BitmapImage.cpp:
3475         (WebCore::BitmapImage::destroyDecodedData):
3476         (WebCore::BitmapImage::dataChanged):
3477         * platform/graphics/BitmapImage.h:
3478         * platform/graphics/Image.cpp:
3479         (WebCore::Image::setData):
3480         * platform/graphics/Image.h:
3481         (WebCore::Image::dataChanged):
3482         (WebCore::Image::data):
3483         * platform/graphics/ImageSource.h:
3484         * platform/graphics/cg/ImageSourceCG.cpp:
3485         (WebCore::ImageSource::setData):
3486         * platform/graphics/cg/PDFDocumentImage.cpp:
3487         (WebCore::PDFDocumentImage::dataChanged):
3488         * platform/graphics/cg/PDFDocumentImage.h:
3489         * platform/graphics/mac/ImageMac.mm:
3490         (WebCore::Image::loadPlatformResource):
3491         * platform/graphics/svg/SVGImage.cpp:
3492         (WebCore::SVGImage::setData):
3493         * platform/mac/PasteboardMac.mm:
3494         (WebCore::fileWrapperForImage):
3495
3496 2007-03-13  Justin Garcia  <justin.garcia@apple.com>
3497
3498         Reviewed by darin
3499         
3500         <rdar://problem/5046875> 
3501         Gmail Editor: Applying alignment to selected text in message also applies alignment to signature
3502
3503         * editing/ApplyStyleCommand.cpp:
3504         (WebCore::ApplyStyleCommand::doApply): Don't call applyBlockStyle unless
3505         there is a block style to apply.
3506         (WebCore::ApplyStyleCommand::applyBlockStyle): Don't do the remove step.
3507         It was unnecessary and removed properties from blocks that could contain 
3508         content outside the range being operated on (added a testcase).
3509         (WebCore::ApplyStyleCommand::addBlockStyleIfNeeded): Used an early return
3510         instead of if-nesting.
3511         * editing/ApplyStyleCommand.h:
3512         * editing/CompositeEditCommand.cpp:
3513         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
3514         Return the new block, if one was created.  Use moveParagraphs to move
3515         paragraphs into the new block, instead of moving nodes.  The old code moved
3516         too much (added a testcase).
3517         * editing/CompositeEditCommand.h:
3518
3519 2007-03-13  Oliver Hunt  <oliver@apple.com>
3520
3521         Reviewed by Brady.
3522
3523         To fix <rdar://problem/5044366> we now pass a NSString
3524         representation of the URL extracted with _web_originalDataAsString
3525         instead of relying on [NSURL absoluteString] in the bridge
3526
3527         * page/mac/WebCoreFrameBridge.h:
3528         * page/mac/WebCoreFrameBridge.mm:
3529         (-[WebCoreFrameBridge getData:andResponse:forURL:]):
3530
3531 2007-03-13  Brady Eidson  <beidson@apple.com>
3532
3533         Reviewed by Anders
3534
3535         <rdar://problem/5048818> - REGRESSION: Incompletely loaded resources being saved to the object cache
3536
3537         Due to a subtle change in loader behavior back in 10904, we would stop all loaders before calling 
3538         didFail() on them in the Cache loader.  As a result, we basically cleared all of the Subresource Loaders 
3539         out of the Cache loader before more properly failing them as errored out.  The result?  Partially loaded
3540         resources being cached.
3541         
3542         Since Loader::didFail() both calls error() on the object *and* removes the loader, the solution is to call 
3543         didFail() for all cancelled loaders instead of *only* removing them from the set of active loaders.
3544         
3545         In addition, pages that didn't completely load were being saved to the back/forward cache.  To fix that,
3546         I added a null check on the DocumentLoader's error to see if the page ended in an error, or did indeed 
3547         completely load.
3548
3549         Note that the layout test for this - if possible - will require other enhancements including possibly adding
3550         support for window.stop().  That task is documented in <rdar://problem/5061826>
3551
3552         * loader/FrameLoader.cpp:
3553         (WebCore::FrameLoader::provisionalLoadStarted): Fixed a few bugs relating to my original BFCache rewrite to
3554           more perfectly restore the original behavior - including only caching HTML documents via the 
3555           m_client->canCachePage() call
3556         (WebCore::FrameLoader::canCachePage): Don't make the call to m_client->canCachePage() as that serves a different
3557           purpose
3558           - Check the mainDocumentError to see if the load ended in error as a further criteria in determining the 
3559           cachability of a page
3560
3561         * loader/loader.cpp:
3562         (WebCore::Loader::cancelRequests): Call didFail(cancelledError()) instead of just removing the loaders from the 
3563           loaders-in-progress set.  This adds the effect of properly cleaning up the cached object.
3564
3565 2007-03-13  Beth Dakin  <bdakin@apple.com>
3566
3567         Rendering part reviewed by Hyatt. Editing part consulted with and 
3568         rubber stamped by Justin and Harrison.
3569
3570         Fix for <rdar://problem/5025925> A hang occurs in Safari when 
3571         attempting to print page at http://www.pcadvisor.co.uk
3572
3573         * rendering/RenderBlock.cpp:
3574         (WebCore::RenderBlock::makeChildrenNonInline): 
3575         RenderBlock::makeChildrenNonInline() takes a block's inline 
3576         children and turns them into block children. If the children had 
3577         line boxes, those boxes were being leaked. In the layout test I 
3578         added with the change (and at pcadvisor.co.uk during printing) 
3579         children were being made non-inline, and then they were being made 
3580         inline again. This meant that some of the children ended up 
3581        &nbs