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