Gdk build fixes using the Qt build's qmake tool from Holger Freyther, reviewed by...
[WebKit-https.git] / WebCore / ChangeLog
1 2007-05-03  Holger Freyther <freyther@kde.org>
2
3         Reviewed by Zack, landed by Simon.
4         This is bugzilla bug 13499.
5
6         * WebCore.pro: Place the Qt port into the qt-port scope, add the Gdk port
7
8 2007-05-03  Adele Peterson  <adele@apple.com>
9
10         Use BUILDING_ON_TIGER.
11
12         * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry):
13
14 2007-05-03  Brady Eidson  <beidson@apple.com>
15
16         Reviewed by Darin
17
18         Some more minor cleanup that resolves a FIXME and ditches another pointless method
19
20         No change in functionality == no layout test
21
22         * loader/FrameLoader.cpp:
23         (WebCore::FrameLoader::commitProvisionalLoad):  Updated a comment
24         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Folded startLoading() into this method
25         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): continueAfterWillSubmitForm becomes continueLoadAfterWillSubmitForm
26         * loader/FrameLoader.h: Removed startLoading()
27
28 2007-05-03  Adele Peterson  <adele@apple.com>
29
30         Reviewed by Tim Hatcher.
31
32         Fix for <rdar://problem/4727607> REGRESSION: KeyScript is deprecated, need a new solution for forcing Roman input for password fields on Leopard
33
34         * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry):
35         Use TSMSetDocumentProperty and TSMRemoveDocumentProperty on Leopard disable and enable non-ascii input sources.
36
37 2007-05-03  Brady Eidson  <beidson@apple.com>
38
39         Reviewed by Anders
40
41         commitProvisionalLoad() was the name of two methods.
42         One of them was private and only called from one other private place.
43         This was driving me crazy.  I had to change that.
44
45         No change in functionality == no layout test
46
47         * loader/FrameLoader.cpp:
48         (WebCore::FrameLoader::transitionToCommitted): roll commitProvisionalLoad() into this method
49         * loader/FrameLoader.h: Removed commitProvisionalLoad()
50
51 2007-05-03  Darin Adler  <darin@apple.com>
52
53         Reviewed by Anders.
54
55         - make ICU initialization lazy to speed up application start-up time
56           (when it includes an initial webpage load)
57
58         * platform/TextCodecICU.h: Replaced registerEncodingNames and
59         registerCodecs with registerBaseEncodingNames, registerBaseCodecs,
60         registerExtendedEncodingNames, and registerExtendedCodecs.
61         * platform/TextCodecICU.cpp:
62         (WebCore::newTextCodecICU): Moved up to the top of the file.
63         (WebCore::TextCodecICU::registerBaseEncodingNames): Added. Registers
64         just UTF-8.
65         (WebCore::TextCodecICU::registerBaseCodecs): Ditto.
66         (WebCore::TextCodecICU::registerExtendedEncodingNames): Renamed.
67         (WebCore::TextCodecICU::registerExtendedCodecs): Ditto.
68         (WebCore::TextCodecICU::createICUConverter): Compare with the name
69         "GBK" in a way that does not require extending the maps.
70
71         * platform/TextEncoding.cpp:
72         (WebCore::TextEncoding::usesVisualOrdering): Added code so this will
73         just return false if we haven't used any extended encoding names yet.
74         The result will be correct, and we won't ask for an encoding name that
75         will require registering the extended encoding names.
76         (WebCore::TextEncoding::isJapanese): Ditto.
77         (WebCore::TextEncoding::backslashAsCurrencySymbol): Ditto, but return
78         a backslash instead of false.
79
80         * platform/TextEncodingRegistry.h: Added a new function named
81          noExtendedTextEncodingNameUsed.
82         * platform/TextEncodingRegistry.cpp:
83         (WebCore::buildBaseTextCodecMaps): Added. Registers the base encodings,
84         including Latin-1 because it's the default, and the UTF encodings.
85         (WebCore::extendTextCodecMaps): Added. Registers all the other encodings.
86         (WebCore::newTextCodec): Removed the all to buildTextCodecMap because
87         we always build the map when making the canonical encoding name.
88         (WebCore::atomicCanonicalTextEncodingName): Changed code to build only
89         the base maps at first, then extend the maps the first time we run into
90         a name we don't know.
91         (WebCore::noExtendedTextEncodingNameUsed): Added.
92
93 2007-05-03  Mark Rowe  <mrowe@apple.com>
94
95         Qt build fix.  In r21185 the Qt version of WebCore::scaleDragImage was
96         updated to have the incorrect signature.
97
98         * platform/qt/DragImageQt.cpp:
99         (WebCore::scaleDragImage):
100
101 2007-05-02  Beth Dakin  <bdakin@apple.com>
102
103         * dom/Node.h: Just fixing a variable name because it's driving me 
104         mad.
105
106 2007-05-02  Beth Dakin  <bdakin@apple.com>
107
108         Reviewed by Hyatt.
109
110         Fix for <rdar://problem/4513966> Never-ending identical repaint @ 
111         orbitz.com (Safari eating 85% CPU)
112
113         We need to be a little bit more savvy about when we do a FULL style 
114         recalc since it can be unnecessary and expensive.
115
116         * css/CSSMutableStyleDeclaration.cpp:
117         (WebCore::CSSMutableStyleDeclaration::setChanged): Now takes a 
118         StyleChangeType as a parameter.
119         (WebCore::CSSMutableStyleDeclaration::setProperty): Send 
120         InlineStyleChange as the paramter. This is the optimization!
121         * css/CSSMutableStyleDeclaration.h: setChanged takes a 
122         StyleChangeType as a parameter.
123         * dom/Document.cpp: setChanged now takes a StyleChangeType instead 
124         of a bool.
125         (WebCore::Document::recalcStyle): Same.
126         * dom/Element.cpp: 
127         (WebCore::Element::recalcStyle): This is the fix!! Only set change 
128         to Force is we use descendant rules AND it's a FullStyleChange.
129         * dom/Node.cpp: m_hasStyle was an unused bit on Node, so this patch 
130         gets rid of it and uses that extra bit for m_changed to be a 
131         StyleChangeType instead of a bool.
132         (WebCore::Node::Node):
133         (WebCore::Node::setChanged):
134         (WebCore::Node::dump):
135         * dom/Node.h: Same.
136         (WebCore::): Define the StyleChangeType enum.
137         (WebCore::Node::hasClass):
138         (WebCore::Node::changed):
139         (WebCore::Node::styleChangeType):
140         (WebCore::Node::setHasClass):
141         * dom/StyledElement.cpp:
142         (WebCore::StyledElement::parseMappedAttribute): Don't bother 
143         calling setHasStyle() since m_hasStyle is gone now. It was never 
144         used, and this was the only place it was set.
145         * dom/Text.cpp:
146         (WebCore::Text::recalcStyle): setChanged now takes a 
147         StyleChangeType instead of a bool.
148         * html/HTMLFrameSetElement.cpp:
149         (WebCore::HTMLFrameSetElement::recalcStyle): Same.
150         * html/HTMLSelectElement.cpp:
151         (WebCore::HTMLSelectElement::restoreState): Same.
152         (WebCore::HTMLSelectElement::reset): Same.
153         * html/HTMLTextAreaElement.cpp:
154         (WebCore::HTMLTextAreaElement::setValue): Same.
155         * ksvg2/misc/SVGTimer.cpp:
156         (WebCore::SVGTimer::applyAnimations): Same.
157         * ksvg2/svg/SVGUseElement.cpp:
158         (WebCore::SVGUseElement::recalcStyle): Same.
159         * platform/graphics/svg/SVGResource.cpp:
160         (WebCore::SVGResource::repaintClients): Same.
161
162 2007-05-02  David Harrison  <harrison@apple.com>
163
164         Reviewed by Antti.
165
166         <rdar://problem/4859132> Grammar must always be checked in entire-sentence chunks, and shouldn't show markers for current sentence
167
168         Restore the remainder of the original fix now that blocking bug rdar://5174862 is addressed.
169
170         John made the original patch on 2007-04-10, but this fell prey to rdar://5157329.
171         Justin backed out the whole patch on 2007-04-30 to avoid the crash.
172         Justin then restored most of the original patch, but used word granularity instead, to keep the build working.
173         I just addressed the root cause of rdar://5157329 in rdar://5174862.
174         This patch switches the temp uses of word granularity back to sentence granularity.
175         
176         * editing/mac/EditorMac.mm:
177         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
178         * page/Frame.cpp:
179         (WebCore::Frame::respondToChangedSelection):
180
181 2007-05-02  David Harrison  <harrison@apple.com>
182
183         Reviewed by Antti.
184
185         <rdar://problem/5174862> Crash resulting from DeprecatedString::insert()
186         
187         Test added: editing/selection/move-by-sentence-001.html
188
189         * editing/visible_units.cpp:
190         (WebCore::previousBoundary):
191         (WebCore::nextBoundary):
192         Use a UChar Vector instead of DeprecatedString.
193         Avoid creating an extra string for secure bullet replacement unless it is actually needed.
194         
195         * platform/DeprecatedString.cpp:
196         (WebCore::DeprecatedString::insert):
197         Call forceUnicode() before setLength(), so that only the unicode buffer is resized.
198
199        (WebCore::DeprecatedString::setLength):
200         Adjust the unicode buffer even if the ascii buffer is valid.
201         
202 2007-05-02  Mitz Pettel  <mitz@webkit.org>
203
204         Reviewed by Brady.
205
206         - http://bugs.webkit.org/show_bug.cgi?id=13564
207           Remove friend class FrameLoader from Frame
208
209         No test added since there is no change in functionality.
210
211         * loader/FrameLoader.cpp:
212         (WebCore::FrameLoader::didOpenURL):
213         (WebCore::FrameLoader::begin):
214         (WebCore::FrameLoader::open):
215         * loader/FrameLoader.h: Made clear() private.
216         * page/Frame.cpp:
217         (WebCore::Frame::setDocument): Changed the argument into a PassRefPtr.
218         * page/Frame.h:
219         * xml/XSLTProcessor.cpp:
220         (WebCore::XSLTProcessor::createDocumentFromSource):
221
222 2007-05-02  Mitz Pettel  <mitz@webkit.org>
223
224         Reviewed by Dave Hyatt.
225
226         - fix http://bugs.webkit.org/show_bug.cgi?id=9276
227           Quirksmode: Image swap resize bug
228
229         Test: fast/replaced/image-resize-width.html
230
231         * rendering/RenderImage.cpp:
232         (WebCore::RenderImage::imageChanged): Moved the call to dirtyPrefWidths()
233         before the call to calcWidth().
234
235 2007-05-02  David Hyatt  <hyatt@apple.com>
236
237         Fix for bug 13566, broken Dashboard widgets.  setPrefWidthsDirty did
238         the wrong thing for text children of a positioned element.
239
240         Reviewed by mitz
241
242         fast/block/positioning/pref-width-change.html
243
244         * rendering/RenderObject.cpp:
245         (WebCore::RenderObject::setPrefWidthsDirty):
246
247 2007-05-01  Darin Adler  <darin@apple.com>
248
249         * rendering/RenderReplaced.cpp: Fix typo in a comment.
250
251 2007-05-01  David Hyatt  <hyatt@apple.com>
252
253         Fix for 13558, crash when using absolutely positioned generated content
254         inside an inline.
255
256         Reviewed by darin
257
258         fast/css-generated-content/absolute-position-inside-inline.html
259
260         * rendering/RenderContainer.cpp:
261         (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
262
263 2007-05-01  Justin Garcia  <justin.garcia@apple.com>
264
265         Reviewed by darin
266
267         <rdar://problem/5002441> 
268         Pressing space key does nothing above quoted content or a signature
269         
270         Inserting a space under these circumstances inserts a single 
271         text node containing a regular space and then does a layout. 
272         That space isn't rendered (which is correct).  Whitespace 
273         rebalancing is supposed to correct it but failed.  It replaces 
274         the space with a non-breaking space, but that change doesn't 
275         dirty line boxes (9441) and so the space isn't rendered.
276         
277         This workaround turns all incoming spaces into non-breaking 
278         spaces before they're inserted (they're rebalanced after 
279         insertion and turned back into regular spaces if possible).
280
281         * editing/InsertTextCommand.cpp:
282         (WebCore::InsertTextCommand::prepareForTextInsertion): Removed
283         an old irrelevant FIXME.
284         (WebCore::InsertTextCommand::input): Turn incoming spaces into
285         non breaking spaces before inserting them.
286         
287 2007-05-01  Darin Adler  <darin@apple.com>
288
289         Reviewed by Hyatt.
290
291         - fix http://bugs.webkit.org/show_bug.cgi?id=13559
292           REGRESSION: Canvas aspect ratio is incorrect
293
294         - remove intrinsicWidth/Height functions from RenderObject
295
296         Test: fast/canvas/canvas-size-change-after-layout.html
297
298         * html/HTMLCanvasElement.cpp:
299         (WebCore::HTMLCanvasElement::createRenderer): Removed code to set
300         the intrinsic size, because the renderer now takes care of this
301         in its constructor.
302         (WebCore::HTMLCanvasElement::reset): Instead of calling the
303         setIntrinsicWidth/Height functions, call canvasSizeChanged, which
304         takes care of layout, but only if the size actually changed. Also
305         call repaint if the contents of the canvas changed.
306
307         * rendering/RenderApplet.h:
308         * rendering/RenderApplet.cpp: (WebCore::RenderApplet::intrinsicSize):
309         Override the new intrinsicSize function. This override still doesn't
310         make sense, so left a FIXME in here.
311
312         * rendering/RenderBox.h: Added an intrinsicSize function here to replace
313         the intrinsicWidth/Height functions removed from RenderObject.
314         * rendering/RenderBox.cpp:
315         (WebCore::RenderBox::calcReplacedWidthUsing): Use intrinsicSize instead
316         of intrinsicWidth.
317         (WebCore::RenderBox::calcReplacedHeightUsing): Ditto, but for height.
318
319         * rendering/RenderHTMLCanvas.h: Changed the constructor parameter to be
320         an HTMLCanvasElement* instead of Node*. Also added a canvasSizeChanged
321         function.
322         * rendering/RenderHTMLCanvas.cpp:
323         (WebCore::RenderHTMLCanvas::RenderHTMLCanvas): Pass an initial intrinsic
324         size based on the current size of the canvas element. This is now the
325         responsibility of the renderer and the DOM element calls the canvasSizeChanged
326         function when the size changes.
327         (WebCore::RenderHTMLCanvas::paint): Removed checks of the type of the element,
328         and used the node() function because we don't have to worry about the anonymous
329         case in this class.
330         (WebCore::RenderHTMLCanvas::canvasSizeChanged): Added. Changes the size and
331         then calls setNeedsLayout and setPrefWidthsDirty as needed. I based the logic
332         here on careful reading of RenderImage::imageChanged.
333
334         * rendering/RenderImage.cpp:
335         (WebCore::RenderImage::RenderImage): Pass a default intrinsic size of 0,0
336         instead of calling setIntrinsicWidth/Height.
337         (WebCore::RenderImage::setImageSizeForAltText): Call the new intrinsic size
338         functions instead of the width/height ones. Simplifies the logic since we
339         handle both dimensions at once.
340         (WebCore::RenderImage::imageChanged): Ditto.
341         (WebCore::RenderImage::layout): Ditto.
342         (WebCore::RenderImage::calcAspectRatioWidth): Ditto.
343         (WebCore::RenderImage::calcAspectRatioHeight): Ditto.
344
345         * rendering/RenderObject.h: Removed intrinsicWidth/Height virtual functions.
346
347         * rendering/RenderReplaced.h: Replaced intrinsicWidth, intrinsicHeight,
348         setIntrinsicWidth, setIntrinsicHeight, m_intrinsicWidth, and m_intrinsicHeight
349         with intrinsicSize, setIntrinsicSize, and m_intrinsicSize.
350         * rendering/RenderReplaced.cpp:
351         (WebCore::RenderReplaced::RenderReplaced): Added a second contructor that takes
352         an intrinsic size parameter. Also updated constructor since the intrinsic size
353         is now an IntSize instead of two integers.
354         (WebCore::RenderReplaced::intrinsicSize): Added. No point in making this inline
355         because it's a virtual function.
356         (WebCore::RenderReplaced::setIntrinsicSize): Added. Didn't make this inline,
357         partly because in the future we might want this to be more than just a simple
358         setter function, factoring in common code used in both RenderImage and
359         RenderHTMLCanvas.
360
361         * rendering/RenderWidget.h: Removed a stray using declaration that wasn't needed.
362
363 2007-05-01  David Hyatt  <hyatt@apple.com>
364
365         Fix for hang when incorrectly trying to add before/after content to
366         a <select>.  Disallow generated content in all selects and also turn it
367         off for <input> buttons.
368
369         Reviewed by aroben
370
371         * rendering/RenderBlock.cpp:
372         (WebCore::RenderBlock::setStyle):
373         * rendering/RenderButton.cpp:
374         (WebCore::RenderButton::canHaveChildren):
375         * rendering/RenderButton.h:
376
377 2007-05-01  Darin Adler  <darin@apple.com>
378
379         Reviewed by Hyatt.
380
381         - removed the m_implicit bit from Node, freeing up a bit
382
383         - fixed <rdar://problem/5172607> XML parser is creating implicit tbody elements
384         - fixed <rdar://problem/5172596> HTML-parser-created tbody elements are being
385           ignored when processing CSS child rules
386
387         Test: fast/css/child-selector-implicit-tbody.html
388
389         * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::checkSelector):
390         Removed code that used to look at implicitNode(), which no longer exists.
391
392         * css/html4.css: Added a style rule to handle cases where we have a tr
393         inside a table with no intervening table section.
394
395         * dom/Node.h: Removed the bit.
396         * dom/Node.cpp:
397         (WebCore::Node::Node): Don't initialize the bit.
398         (WebCore::Node::dump): Don't dump the bit.
399
400         * dom/XMLTokenizer.cpp:
401         (WebCore::XMLTokenizer::startElementNs): Remove the code that made a
402         table body element. This is handled in the render tree, the DOM tree
403         should not be mangled.
404         (WebCore::XMLTokenizer::endElementNs): Removed code that used to look at
405         implicitNode(), which no longer exists.
406
407         * html/HTMLElementFactory.cpp: (WebCore::tableSectionConstructor):
408         Removed boolean parameter that was passed to the HTMLTableSectionElement
409         constructor.
410         * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Ditto.
411         * html/HTMLTableElement.cpp:
412         (WebCore::HTMLTableElement::createTHead): Ditto.
413         (WebCore::HTMLTableElement::createTFoot): Ditto.
414         (WebCore::HTMLTableElement::insertRow): Changed to return a PassRefPtr,
415         because it's possible the row could be removed from the table by JavaScript
416         code responding to DOM mutation events before the function returns. Just
417         something I noticed by code inspection.
418
419         * html/HTMLTableSectionElement.cpp:
420         (WebCore::HTMLTableSectionElement::HTMLTableSectionElement): Removed
421         boolean "implicit" parameter to the constructor.
422         (WebCore::HTMLTableSectionElement::insertRow): Changed to return a
423         PassRefPtr for the same reason cited above.
424
425         * html/HTMLTableElement.h: Changed the return value of insertRow to be
426         a PassRefPtr.
427         * html/HTMLTableSectionElement.h: Ditto.
428
429 2007-04-30  David Hyatt  <hyatt@apple.com>
430
431         Fix for bug 12691, generated content and display: table-cell duplicates
432         content on a size change.  Make sure that the code to update before/after
433         content is smart enough to drill into anonymous containers to find the
434         old child.
435
436         Reviewed by olliej
437
438         Added fast/css-generated-content/table-cell-before-content.html
439
440         * rendering/RenderBlock.cpp:
441         (WebCore::RenderBlock::setStyle):
442         * rendering/RenderButton.cpp:
443         (WebCore::RenderButton::updateBeforeAfterContent):
444         * rendering/RenderButton.h:
445         * rendering/RenderContainer.cpp:
446         (WebCore::RenderContainer::beforeAfterContainer):
447         (WebCore::RenderContainer::updateBeforeAfterContent):
448         (WebCore::RenderContainer::updateBeforeAfterContentForObject):
449         * rendering/RenderContainer.h:
450         * rendering/RenderInline.cpp:
451         (WebCore::RenderInline::setStyle):
452         (WebCore::RenderInline::addChildToFlow):
453         (WebCore::RenderInline::splitInlines):
454
455 2007-04-30  Jungshik Shin <jungshik.shin@gmail.com>
456
457         Reviewed by justin
458         
459         <http://bugs.webkit.org/show_bug.cgi?id=13552>
460         comment to Range::comparePoint in dom/Range.cpp has 
461         '0xD0' in place of '-': leading to a compiler warning
462
463         * dom/Range.cpp:
464         (WebCore::Range::comparePoint):
465
466 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
467
468         Reviewed by darin
469
470         <rdar://problem/4875189> List gets deleted when replacing contents
471
472         * editing/ReplaceSelectionCommand.cpp:
473         (WebCore::ReplaceSelectionCommand::doApply): Don't expand
474         to include elements, like lists, when deleting a selection 
475         to replace it.
476
477 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
478
479         Reviewed by ggaren
480         
481         Buildfix.  Leave in grammar checking machinery to 
482         keep WebKit building on other platforms but don't
483         operate on sentence sized chunks so that we don't
484         re-introduce 5157329.
485
486         * editing/Editor.h:
487         * editing/mac/EditorMac.mm:
488         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
489         (WebCore::markMisspellingsOrBadGrammar):
490         (WebCore::Editor::markMisspellings):
491         (WebCore::Editor::markBadGrammar):
492         * page/Frame.cpp:
493         (WebCore::Frame::respondToChangedSelection):
494
495 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
496
497         Reviewed by darin
498
499         <rdar://problem/5168598> 
500         Crash when deleting a link inside an input field
501         
502         Deletion code tries to update one of its positions to keep 
503         it valid and nullifies it.  Later in mergeParagraphs we try 
504         to find out if it's valid by checking to see if it's still in 
505         the document and crash.
506         
507         The fix is just to not bother keeping the position, 
508         m_upstreamStart, valid, since after the point in the code 
509         under examination, it doesn't need to be valid anymore.  
510         Besides, code to update DeleteSelectionCommand's positions 
511         should go in the functions that handle the content removal 
512         that might invalid them (there are already FIXMEs about this).
513         
514         Also, users shouldn't be able to insert links (or any rich content)
515         into plaintext-only regions like text fields, even if those
516         text fields are inside richly editable regions.  This is a 
517         separate bug and is filed as 5171552.
518
519         * editing/DeleteSelectionCommand.cpp:
520         (WebCore::DeleteSelectionCommand::handleGeneralDelete): Don't
521         bother updating m_upstreamStart.
522
523 2007-04-30  Patti Hoa  <patti@apple.com>
524
525         Reviewed by Dave Hyatt.
526         
527         <rdar://problem/5108546> REGRESSION: Zoom follows keyboard focus does not work
528
529         * WebCore.xcodeproj/project.pbxproj:
530         Add new file SelectionControllerMac.mm
531         * dom/Document.cpp:
532         (WebCore::Document::updateSelection):
533         Move the code to fire off AXSelectedTextChanged notification to a new method notifyAccessibilityForSelectionChange in SelectionControllerMac.mm
534         * editing/SelectionController.cpp:
535         (WebCore::SelectionController::setSelection):
536         call notifyAccessibilityForSelectionChange to handle firing of accessibility notification and zoomFocusChange
537         * editing/SelectionController.h:
538         Add notifyAccessibilityForSelectionChange method for Mac platform
539         * platform/Widget.h:
540         * platform/mac/WidgetMac.mm:
541         (WebCore::Widget::convertToScreenCoordinate):
542         Add a helper routine that takes IntPoint in local coordinate and convert that to screen coordinate
543
544 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
545
546         Reviewed by harrison
547
548         <rdar://problem/5157329> 
549         REGRESSION: Crash at WTF::fastFree() when arrowing or deleting backward through editable text (13493)
550         
551         Backing out the changes for 4859132.
552
553         * editing/Editor.h:
554         * editing/mac/EditorMac.mm:
555         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
556         (WebCore::Editor::markMisspellings):
557         * page/Frame.cpp:
558         (WebCore::Frame::respondToChangedSelection):
559
560 2007-04-29  Antti Koivisto  <antti@apple.com>
561
562         Reviewed by Oliver.
563
564         Fix <rdar://problem/5169261>
565         REGRESSION: Google Maps zooming too sensitive when using two fingers on trackpad
566         
567         Use line based delta values when generating DOM wheel events, use pixel deltas
568         for scrolling only.
569         
570         No test case, requires user interaction and specific hardware.
571
572         * page/EventHandler.cpp:
573         (WebCore::EventHandler::handleWheelEvent):
574         * platform/PlatformWheelEvent.h:
575         (WebCore::PlatformWheelEvent::continuousDeltaX):
576         (WebCore::PlatformWheelEvent::continuousDeltaY):
577         * platform/mac/WheelEventMac.mm:
578         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
579
580 2007-04-29  Oliver Hunt  <oliver@apple.com>
581
582         Reviewed by Brady.
583
584         Build fix for experimental features build
585
586         * rendering/RenderForeignObject.cpp:
587
588 2007-04-29  Mitz Pettel  <mitz@webkit.org>
589
590         Reviewed by Dave Hyatt.
591
592         - fix http://bugs.webkit.org/show_bug.cgi?id=13544
593           REGRESSION (r21120): Member profile frame not erased at Yahoo! Answers
594
595         Test: fast/repaint/layer-hide-when-needs-layout.html
596
597         * rendering/RenderObject.cpp:
598         (WebCore::RenderObject::setStyle): If we get a layout hint, we count on
599         layout() or updateLayerPositions() to repaint. In the case of a layer
600         going invisible, however, we need to repaint here since neither of the
601         above will do it.
602
603 2007-04-29  Oliver Hunt  <oliver@apple.com>
604
605         Reviewed by Steve.
606
607         Fix for <rdar://problem/5126393> REGRESSION (r19672-19697): Safari drag image drags at original size (13261)
608
609         Added logic to ensure that when we create the drag image
610         we're looking at the rendered image size.
611
612         * page/DragController.cpp:
613         (WebCore::DragController::doImageDrag):
614           Pass the rendered image size to fitDragImageToMaxSize
615
616         * platform/DragImage.cpp:
617         (WebCore::fitDragImageToMaxSize):
618            Need to do scaling relative to rendered image size
619
620         * platform/DragImage.h:
621            scaleDragImage needs x and y scales to allow for them to be
622            scaled seperately on a page
623
624         * platform/gdk/DragImageGdk.cpp:
625         (WebCore::scaleDragImage):
626            Prevent build bustage
627
628         * platform/mac/DragImageMac.mm:
629         (WebCore::scaleDragImage):
630            scale width and height independently
631
632         * platform/qt/DragImageQt.cpp:
633         (WebCore::scaleDragImage):
634            Prevent build bustage
635
636 2007-04-29  Darin Adler  <darin@apple.com>
637
638         Reviewed by Adele.
639
640         - fix the Gmail part of http://bugs.webkit.org/show_bug.cgi?id=12798
641           and <rdar://problem/4118559>
642
643         This patch changes things so that resizing can make things larger than their
644         initial size, but not smaller. I believe this resolves the problem for Gmail,
645         but you can still get strange behavior if you have a small right-aligned <textarea>.
646
647         * rendering/RenderLayer.cpp:
648         (WebCore::RenderLayer::resize): Rewrote to use more IntPoint and IntSize and add
649         in a new minimum-size algorithm. This function now has the side effect of storing
650         a new minimumSizeForResizing in the element being resized, and respects any existing
651         minimum as well.
652         (WebCore::RenderLayer::offsetFromResizeCorner): Reversed this so it converts the
653         point into coordinates relative to the resize corner, hence negative numbers mean
654         the point is above and to the left. This is used only in the algorithm above.
655
656         * dom/Element.h: Removed unneeded include of Attr.h, and added forward declarations
657         as needed. Removed all friend declarations; there was no need for any of them.
658         Tweaked formatting of various declarations and removed unneeded parameter names.
659         Made as much as possible private, and a couple things public to avoid the need for
660         friend classes. Added minimumSizeForResizing, setMinimumSizeForResizing, rareData,
661         and createRareData functions.
662
663         * dom/Element.cpp:
664         (WebCore::rareDataMap): Added. Function to return the single global map.
665         (WebCore::rareDataFromMap): Added. For use by inlined functions to get the
666         data from the map in the case where it's present.
667         (WebCore::ElementRareData::ElementRareData): Added.
668         (WebCore::Element::~Element): Added code to delete the element from the rare
669         data map when appropriate.
670         (WebCore::Element::rareData): Added.
671         (WebCore::Element::createRareData): Added.
672         (WebCore::Element::setAttributeNodeNS): Got rid of the old inline version of this,
673         since it was the sole reason we had to include Attr.h in Element.h.
674         (WebCore::Element::minimumSizeForResizing): Added. Accesses rare data.
675         (WebCore::Element::setMinimumSizeForResizing): Ditto.
676
677         * dom/Node.h: Renamed the m_specified bit since it's now used for two purposes.
678         Its new long name is m_attrWasSpecifiedOrElementHasRareData.
679
680         * dom/Attr.cpp: (WebCore::Attr::Attr): Updated for bit name change.
681         * dom/Attr.h:
682         (WebCore::Attr::specified): Ditto.
683         (WebCore::Attr::setSpecified): Added, since setting the bit directly is pretty ugly now.
684         * dom/Document.cpp: (WebCore::Document::adoptNode): Updated for bit name change.
685         * dom/Node.cpp:
686         (WebCore::Node::Node): Ditto.
687         (WebCore::Node::dump): Ditto.
688
689         * dom/NamedAttrMap.cpp: (WebCore::NamedAttrMap::isReadOnlyNode): Moved out of line,
690         since this was the sole reason we had to include Element.h in NamedAttrMap.h.
691
692         * html/HTMLElement.cpp:
693         (WebCore::HTMLElement::nodeName): Changed to use tagQName() since that's a public
694         way to do something that's now private.
695         (WebCore::HTMLElement::cloneNode): Ditto.
696
697         * dom/Attribute.cpp:
698         * dom/NamedAttrMap.h:
699         * dom/NamedMappedAttrMap.cpp:
700         * dom/StyledElement.h:
701         * html/HTMLTokenizer.h:
702         * xml/XPathFunctions.cpp:
703         * xml/XPathStep.cpp:
704         Updated includes, and other administrivia.
705
706 2007-04-29  Mitz Pettel  <mitz@webkit.org>
707
708         Reviewed by Darin and Hyatt.
709
710         - http://bugs.webkit.org/show_bug.cgi?id=13487
711           Implement O(1) absoluteClippedOverflowRect and absoluteOutlineBox during layout for a possible speed gain
712
713         Test for a bug fixed by this patch: fast/repaint/intermediate-layout-position-clip.html
714
715         By keeping track of the total translation and clip during layout, absolutePosition and
716         computeAbsoluteRepaintRect become O(1).
717
718         * WebCore.pro: Added LayoutState.cpp
719         * WebCore.vcproj/WebCore/WebCore.vcproj: Added LayoutState.{cpp,h}
720         * WebCore.xcodeproj/project.pbxproj: Added LayoutState.{cpp,h}
721         * WebCoreSources.bkl: Added LayoutState.cpp
722         * page/FrameView.cpp:
723         (WebCore::FrameView::layout): When doing subtree layout, push an initial layout state for the
724         layout root.
725         * rendering/LayoutState.cpp: Added. A LayoutState corresponding to a box consists of the origin of
726         its coordinate system in view coordinates and possibly the clip rect, in view coordinates, which
727         applies to its children.
728         (WebCore::LayoutState::LayoutState):
729         (WebCore::LayoutState::destroy):
730         (WebCore::throw):
731         (WebCore::LayoutState::operator delete):
732         * rendering/LayoutState.h: Added.
733         (WebCore::LayoutState::LayoutState):
734         * rendering/RenderBlock.cpp:
735         (WebCore::RenderBlock::layoutBlock): Factored out the "only positioned objects" case into
736         layoutOnlyPositionedObjects(). Added code to push/pop LayoutState, unless we have columns, in
737         which case we disable/enable LayoutState. Removed the translation by the layout delta
738         of the old absolute rects, since that is now integral to absoluteClippedOverflowRect() and
739         absoluteOutlineBox().
740         (WebCore::RenderBlock::layoutOnlyPositionedObjects): Added this helper function that checks for
741         and handles the case where only positioned objects need layout. Returns true in that case.
742         (WebCore::RenderBlock::repaintOverhangingFloats): Disabled LayoutState when repainting floats, since
743         they may belong to other containers.
744         (WebCore::RenderBlock::updateFirstLetter): Disabled LayoutState when adding and removing from the
745         first letter container, since it may be different than ourselves.
746         * rendering/RenderBlock.h:
747         * rendering/RenderBox.cpp:
748         (WebCore::RenderBox::setStyle): Minor cleanup: changed element()->document() to the equivalent document().
749         (WebCore::RenderBox::offsetForPositionedInContainer): Added. Factored out common code from
750         absolutePosition, computeAbsoluteRepaintRect and RenderLayer::updateLayerPosition into this function.
751         (WebCore::RenderBox::absolutePosition): Added an O(1) code path when this function is called during
752         layout (and LayoutState has not been disabled). Factored out some code into
753         offsetForPositionedInContainer.
754         (WebCore::RenderBox::absoluteClippedOverflowRect): Added the layout delta here, so callers don't need
755         to.
756         (WebCore::RenderBox::computeAbsoluteRepaintRect): Added an O(1) code path when this function is called
757         during layout (and LayoutState has not been disabled). Factored out some code into
758         offsetForPositionedInContainer.
759         * rendering/RenderContainer.cpp:
760         (WebCore::RenderContainer::layout): Added LayoutState push/pop.
761         * rendering/RenderFlexibleBox.cpp:
762         (WebCore::RenderFlexibleBox::layoutBlock): Factored out the "only positioned objects" case into
763         layoutOnlyPositionedObjects(). Added LayoutState push/pop. Removed the translation by the layout delta
764         of the old absolute rects, since that is now integral to absoluteClippedOverflowRect() and
765         absoluteOutlineBox().
766         * rendering/RenderFlow.cpp:
767         (WebCore::RenderFlow::absoluteClippedOverflowRect): Added an ASSERT.
768         * rendering/RenderForeignObject.cpp:
769         (WebCore::RenderForeignObject::layout): Disabled LayoutState because it is incompatible with arbitrary
770         affine transforms.
771         * rendering/RenderHTMLCanvas.cpp:
772         (WebCore::RenderHTMLCanvas::layout): Removed the translation by the layout delta of the old absolute
773         rects, since that is now integral to absoluteClippedOverflowRect() and absoluteOutlineBox().
774         * rendering/RenderImage.cpp:
775         (WebCore::RenderImage::layout): Ditto.
776         * rendering/RenderLayer.cpp:
777         (WebCore::RenderLayer::updateLayerPositions): Added ASSERTs. Factored out some code into
778         RenderBox::offsetForPositionedInContainer.
779         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Disabled LayoutState around the call to
780         scrollToOffset.
781         * rendering/RenderListItem.cpp:
782         (WebCore::RenderListItem::updateMarkerLocation): Disabled LayoutState when moving the list marker, since
783         it can trigger repainting in other containers.
784         * rendering/RenderObject.cpp:
785         (WebCore::RenderObject::isRoot): Minor cleanup: changed element()->document() to the equivalent
786         document().
787         (WebCore::RenderObject::computeAbsoluteRepaintRect): Removed 'return' at the end of the function.
788         (WebCore::RenderObject::container): Reordered to avoid calling isText() twice.
789         (WebCore::RenderObject::absoluteOutlineBox): Added the layout delta here, so callers don't need to.
790         * rendering/RenderSVGContainer.cpp:
791         (WebCore::RenderSVGContainer::layout): Disabled LayoutState because it is incompatible with arbitrary
792         affine transforms.
793         * rendering/RenderTable.cpp:
794         (WebCore::RenderTable::layout):  Factored out the "only positioned objects" case into
795         layoutOnlyPositionedObjects(). Added LayoutState push/pop. Removed the translation by the layout delta
796         of the old absolute rects, since that is now integral to absoluteClippedOverflowRect() and
797         absoluteOutlineBox().
798         * rendering/RenderTableCell.cpp:
799         (WebCore::RenderTableCell::absoluteClippedOverflowRect): Added the layout delta here, so callers
800         don't need to.
801         (WebCore::RenderTableCell::computeAbsoluteRepaintRect): For the O(1) code path, skipped the correction
802         for the parent row, because RenderTableRow doesn't push a translation into LayoutState.
803         (WebCore::RenderTableCell::absolutePosition): Ditto.
804         * rendering/RenderTableRow.cpp:
805         (WebCore::RenderTableRow::layout): Added LayoutState push/pop.
806         * rendering/RenderTableSection.cpp:
807         (WebCore::RenderTableSection::setCellWidths): Added LayoutState push/pop if cells are repainted or
808         receive layout.
809         (WebCore::RenderTableSection::calcRowHeight): Ditto.
810         (WebCore::RenderTableSection::layoutRows): Added LayoutState push/pop.
811         * rendering/RenderView.cpp:
812         (WebCore::RenderView::RenderView):
813         (WebCore::RenderView::layout): Added initial LayoutState setup for the layout.
814         (WebCore::RenderView::paintBoxDecorations): Minor cleanup: changed element()->document() to the
815         equivalent document().
816         (WebCore::RenderView::repaintViewRectangle): Ditto.
817         (WebCore::RenderView::pushLayoutState): Added. Pushes initial layout state for subtree layout.
818         * rendering/RenderView.h:
819         (WebCore::RenderView::pushLayoutState):
820         (WebCore::RenderView::popLayoutState):
821         (WebCore::RenderView::layoutState):
822         (WebCore::RenderView::disableLayoutState):
823         (WebCore::RenderView::enableLayoutState):
824
825 2007-04-29  David Hyatt  <hyatt@apple.com>
826
827         Fix for bugzilla 13535, regression from positioning cleanup a while
828         back.  Some code got added to compute available width for a relpositioned
829         inline, only the code meant to be used for inline flows and not inline blocks.
830
831         Reviewed by mjs
832
833         fast/block/positioning/inline-block-relposition.html
834
835         * rendering/RenderBox.cpp:
836         (WebCore::RenderBox::containingBlockWidthForPositioned):
837
838 2007-04-29  Oliver Hunt  <oliver@apple.com>
839
840         Reviewed by Zack.
841
842         Implement basic drag and drop support for qt
843         this allows content and link dragging but does not
844         provide the DOM data access methods.
845
846         * platform/DragData.h:
847         * platform/qt/ClipboardQt.cpp:
848         (WebCore::ClipboardQt::ClipboardQt):
849         (WebCore::ClipboardQt::~ClipboardQt):
850         (WebCore::ClipboardQt::clearData):
851         (WebCore::ClipboardQt::clearAllData):
852         (WebCore::ClipboardQt::setData):
853         (WebCore::ClipboardQt::declareAndWriteDragImage):
854         (WebCore::ClipboardQt::writeURL):
855         (WebCore::ClipboardQt::writeRange):
856         (WebCore::ClipboardQt::hasData):
857         * platform/qt/ClipboardQt.h:
858         (WebCore::ClipboardQt::clipboardData):
859         (WebCore::ClipboardQt::invalidateWritableData):
860         * platform/qt/DragDataQt.cpp:
861         (WebCore::DragData::canSmartReplace):
862         (WebCore::DragData::containsPlainText):
863         (WebCore::DragData::asPlainText):
864         (WebCore::DragData::createClipboard):
865         (WebCore::DragData::containsCompatibleContent):
866         (WebCore::DragData::containsURL):
867         (WebCore::DragData::asURL):
868         (WebCore::DragData::asFragment):
869
870 2007-04-28  Maciej Stachowiak  <mjs@apple.com>
871
872         Reviewed by Darin and Oliver.
873
874         - change Document to hold onto Frame* instead of FrameView*
875         
876         This is an architectural cleanup and a prerequisite to fixing citibank login
877         in an architecturally sound way.
878
879         Some fixups for the page cache:
880         
881         * history/CachedPage.cpp:
882         (WebCore::CachedPage::restore): Add an assert that the document's view
883         matches the cached page's view - this needs to be true by the time this
884         function is called.
885         (WebCore::CachedPage::clear): Change assert to require frame matching, not
886         view matching.
887         * history/CachedPage.h:
888         (WebCore::CachedPage::view): Add a way to get the view out.
889         * loader/FrameLoader.cpp:
890         (WebCore::FrameLoader::begin): pass Frame, not FrameView, when creating document
891         (WebCore::FrameLoader::open): restore view based on CachedPage, not Document. 
892
893         Remaining changes are just straightforward updates based on which
894         pointer is held or passed:
895         
896         * dom/DOMImplementation.cpp:
897         (WebCore::DOMImplementation::createDocument):
898         (WebCore::DOMImplementation::createHTMLDocument):
899         * dom/DOMImplementation.h:
900         * dom/Document.cpp:
901         (WebCore::Document::Document):
902         (WebCore::Document::view):
903         (WebCore::Document::frame):
904         (WebCore::Document::recalcStyle):
905         (WebCore::Document::updateLayout):
906         (WebCore::Document::attach):
907         (WebCore::Document::detach):
908         (WebCore::Document::createTokenizer):
909         (WebCore::Document::recalcStyleSelector):
910         (WebCore::Document::setInPageCache):
911         (WebCore::Document::applyXSLTransform):
912         * dom/Document.h:
913         * html/HTMLDocument.cpp:
914         (WebCore::HTMLDocument::HTMLDocument):
915         * html/HTMLDocument.h:
916         * html/HTMLViewSourceDocument.cpp:
917         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
918         * html/HTMLViewSourceDocument.h:
919         * ksvg2/svg/SVGDocument.cpp:
920         (WebCore::SVGDocument::SVGDocument):
921         * ksvg2/svg/SVGDocument.h:
922         * loader/ImageDocument.cpp:
923         (WebCore::ImageDocument::ImageDocument):
924         * loader/ImageDocument.h:
925         * loader/PluginDocument.cpp:
926         (WebCore::PluginDocument::PluginDocument):
927         * loader/PluginDocument.h:
928         * loader/TextDocument.cpp:
929         (WebCore::TextDocument::TextDocument):
930         * loader/TextDocument.h:
931         * xml/XSLTProcessor.cpp:
932         (WebCore::XSLTProcessor::createDocumentFromSource):
933         (WebCore::XSLTProcessor::transformToDocument):
934         * xml/XSLTProcessor.h:
935
936 2007-04-28  Adele Peterson  <adele@apple.com>
937
938         RS by Darin.
939
940         Update to fix for <rdar://problem/5152299>
941
942         Test: fast/events/no-blur-on-enter-button.html
943
944         * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::defaultEventHandler):
945         Don't blur the button when handling the enter key.  This matches our new behavior for input elements.
946
947 2007-04-28  Adele Peterson  <adele@apple.com>
948
949         Fix by Darin, reviewed by me.
950
951         Fix for <rdar://problem/5152299> REGRESSION: <button> elements do not respond to space and return key as similar <input> elements do
952
953         Tests:
954         fast/forms/button-spacebar-click.html
955         fast/forms/button-enter-click.html
956
957         * html/HTMLButtonElement.h: (WebCore::HTMLButtonElement::): Made type enum private.
958         Removed unnecessary m_value and m_currValue, and unused m_dirty.
959         * html/HTMLButtonElement.cpp:
960         (WebCore::HTMLButtonElement::HTMLButtonElement): Removed initialization of m_dirty.
961         (WebCore::HTMLButtonElement::parseMappedAttribute): Removed case to parse value and accesskey attributes, which don't do anything.
962         (WebCore::HTMLButtonElement::defaultEventHandler): Removed unnecessary check for button type.
963          Added cases to handle spacebar and enter keys in the same way that they're handled for <input type=button/reset/submit> buttons.
964         (WebCore::HTMLButtonElement::isSuccessfulSubmitButton): Shortened comment.
965         (WebCore::HTMLButtonElement::appendFormData): Use value() instead of m_currValue.  Renamed encoding argument to formData.
966
967 2007-04-28  Mitz Pettel  <mitz@webkit.org>
968
969         Reviewed by Darin.
970
971         - fix http://bugs.webkit.org/show_bug.cgi?id=13501
972           REGRESSION (r21093): Pasting into text field fails and makes the caret disappear
973
974         Test: fast/dynamic/anonymous-block-layer-lost.html
975
976         * rendering/RenderBlock.cpp:
977         (WebCore::RenderBlock::removeChild): Avoid cutting off layers when removing
978         the anonymous block.
979
980 2007-04-28  Mitz Pettel  <mitz@webkit.org>
981
982         Reviewed by Darin.
983
984         - fix http://bugs.webkit.org/show_bug.cgi?id=13471
985           REGRESSION (r21045): Secure keyboard entry mode remains in effect after leaving a password field by submitting
986
987         * loader/FrameLoader.cpp:
988         (WebCore::FrameLoader::clear): Replaced direct access to Frame's d->m_doc
989         with a call to Frame::setDocument.
990         (WebCore::FrameLoader::begin): Ditto.
991         (WebCore::FrameLoader::open): Ditto.
992         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): Ditto.
993         (WebCore::FrameLoader::canCachePage): Added a comment.
994         * manual-tests/secure-keyboard-enabled-after-submit.html: Added.
995         * page/Frame.cpp:
996         (WebCore::Frame::setDocument): Reset secure keyboard entry, in case the
997         old document's focused node has set it.
998
999 2007-04-28  Mitz Pettel  <mitz@webkit.org>
1000
1001         Reviewed by Adele.
1002
1003         - fix http://bugs.webkit.org/show_bug.cgi?id=13379
1004           REGRESSION: Cannot add an option to a selected popup
1005
1006         * manual-tests/update-empty-popup.html: Added.
1007         * platform/mac/PopupMenuMac.mm:
1008         (WebCore::PopupMenu::show): Added a call to the client's hidePopup()
1009         callback before returning in the case that the menu is empty. Otherwise
1010         the client thinks that the menu stayed open.
1011
1012 2007-04-28  Adele Peterson  <adele@apple.com>
1013
1014         Reviewed by Darin.
1015
1016         Fix for <rdar://problem/4806988> REGRESSION: history.go(0) doesn't reload page (affects buttons at facebook.com)
1017
1018         Test: fast/history/history_reload.html
1019
1020         * loader/FrameLoader.cpp: (WebCore::FrameLoader::scheduleHistoryNavigation):
1021         We avoid doing a redirection when going to the same url in a history navigation, but we have to still
1022         schedule a redirection when the number of steps is zero so we can force a reload.
1023
1024 2007-04-28  Alexey Proskuryakov  <ap@webkit.org>
1025
1026         Reviewed by Darin.
1027
1028         http://bugs.webkit.org/show_bug.cgi?id=13514
1029         REGRESSION (r20997-21003): Crash in WebCore::Node::document
1030
1031         Test: fast/dom/NodeList/childNodes-reset-cache.html
1032
1033         * dom/Node.cpp:
1034         (WebCore::Node::notifyLocalNodeListsChildrenChanged): Reset the common caches for child node
1035         lists. We cannot rely on notifications, since there may be no list objects left around.
1036
1037         * dom/ChildNodeList.cpp:
1038         (WebCore::ChildNodeList::rootNodeChildrenChanged):
1039         * dom/ChildNodeList.h:
1040         Override rootNodeChildrenChanged() with an empty implementation, now that caches are reset
1041         in Node::notifyLocalNodeListsChildrenChanged().
1042
1043 2007-04-28  Mark Rowe  <mrowe@apple.com>
1044
1045         Build fix.  Change use of nil to 0 in C++ source file.
1046
1047         * editing/Editor.cpp:
1048         (WebCore::Editor::increaseSelectionListLevel):
1049         (WebCore::Editor::increaseSelectionListLevelOrdered):
1050         (WebCore::Editor::increaseSelectionListLevelUnordered):
1051
1052 2007-04-28  Darin Adler  <darin@apple.com>
1053
1054         Reviewed by Adele.
1055
1056         - fix http://bugs.webkit.org/show_bug.cgi?id=6216
1057           REGRESSION: getElementsByTagNameNS with empty namespace doesn't work
1058
1059         * dom/Node.cpp:
1060         (WebCore::TagNodeList::TagNodeList): Changed parameter to PassRefPtr, tweaked formatting.
1061         (WebCore::TagNodeList::item): Tweaked formatting.
1062         (WebCore::TagNodeList::nodeMatches): Tweaked formatting.
1063         (WebCore::Node::setPrefix): Tweaked formatting.
1064         (WebCore::Node::getElementsByTagNameNS): Added special case to turn empty namespaces into
1065         null namespaces.
1066
1067 2007-04-28  Darin Adler  <darin@apple.com>
1068
1069         Reviewed by Kevin Decker.
1070
1071         - fix <rdar://problem/5148271> Chinese numbers are incorrect in numbered lists
1072           (including pasting from TextEdit to Mail)
1073
1074         Covered by an existing regression test, which had wrong results checked in.
1075
1076         Hyatt told me not to use the algorithm in the CSS 3 specification, but I didn't listen!
1077         This corrects mistakes there and makes our results match current Firefox.
1078
1079         * rendering/RenderListMarker.cpp:
1080         (WebCore::toCJKIdeographic): Added code to strip off trailing zero digits.
1081         Added special case for zero, since that's the one case where we don't want
1082         to strip off trailing zero digits. Fixed mixed-up logic that would put the
1083         digits in each group backwards.
1084         (WebCore::listMarkerText): Corrected character values for the CJK_IDEOGRAPHIC case.
1085
1086 2007-04-28  Darin Adler  <darin@apple.com>
1087
1088         Reviewed by Oliver.
1089
1090         - fix <rdar://problem/5138250> REGRESSION (r18245): Changing any one aspect
1091           of a font applies all the aspects to selected text
1092
1093         Since this bug is only visible with the font panel, I don't
1094         think there's any way to make a DumpRenderTree-driven test.
1095
1096         * editing/Editor.cpp: (WebCore::Editor::fontForSelection):
1097         Set hasMultipleFonts properly. The old code had an early exit
1098         that was left over from when hasMultipleFonts was a pointer.
1099
1100 2007-04-27  Mitz Pettel  <mitz@webkit.org>
1101
1102         Reviewed by Dave Hyatt.
1103
1104         - fix http://bugs.webkit.org/show_bug.cgi?id=13525
1105           Repainting a listbox schedules a relayout
1106
1107         No test possible as there is no change to functionality.
1108
1109         - fix the root cause of http://bugs.webkit.org/show_bug.cgi?id=10862
1110           REGRESSION: Collapsing form input on www.myspace.com
1111
1112         No test possible since text fields are no longer implemented as flexboxes.
1113
1114         * rendering/RenderObject.cpp:
1115         (WebCore::RenderObject::scheduleRelayout): Added a check that the subtree
1116         root is in the tree and not free-floating.
1117         * rendering/bidi.cpp:
1118         (WebCore::RenderBlock::bidiReorderCharacters): Changed addChild and removeChild
1119         to appendChildNode and removeChildNode to save some unnecessary overhead.
1120         These calls still mark the tree for relayout, but the change in scheduleRelayout 
1121         ensures that a layout won't be scheduled.
1122
1123 2007-04-27  Patti Hoa  <patti@apple.com>
1124
1125         Reviewed by Darin.
1126         
1127         <rdar://problem/5153017> REPRODUCIBLE ASSERT: range != nil in WebViewFactory.mm:415 -[WebViewFactory startOfTextMarkerRange:] (13354)
1128         
1129         * bridge/mac/WebCoreAXObject.mm:
1130         (-[WebCoreAXObject textMarkerRangeForRange:]):
1131         Fix the range length check.  It was incorrectly assuming that the max range requested cannot be equal
1132         to the length of the string.  Since NSRange location is index based, it's perfectly valid to have the max
1133         range equal to the the text length.
1134
1135 2007-04-27  David Harrison  <harrison@apple.com>
1136
1137         Reviewed by Darin.
1138
1139         <rdar://problem/5160627> Export JS list creation support as ObjC SPI for Mail
1140
1141         * WebCore.exp:
1142         * editing/Editor.h:
1143         * editing/Editor.cpp:
1144         (WebCore::Editor::insertOrderedList):
1145         (WebCore::Editor::insertUnorderedList):
1146         (WebCore::Editor::canIncreaseSelectionListLevel):
1147         (WebCore::Editor::canDecreaseSelectionListLevel):
1148         (WebCore::Editor::increaseSelectionListLevel):
1149         (WebCore::Editor::increaseSelectionListLevelOrdered):
1150         (WebCore::Editor::increaseSelectionListLevelUnordered):
1151         (WebCore::Editor::decreaseSelectionListLevel):
1152         Add insertOrderedList() and insertUnorderedList().
1153         Move existing list management functions from WebCoreFrameBridge.
1154         The level increasing functions now return a PassRefPtr<Node> instead of Node.
1155         Add check for canEditRichly.
1156         
1157         - in many other functions, condense the check for nil client().
1158         
1159         * editing/InsertListCommand.h:
1160         * editing/InsertListCommand.cpp:
1161         (WebCore::InsertListCommand::insertList):
1162         (WebCore::InsertListCommand::fixOrphanedListChild):
1163         (WebCore::InsertListCommand::doApply):
1164         Add insertList(), which returns the new list element.
1165         Don't set the list element's ID if the specified ID was an empty string.
1166                 
1167         * editing/ModifySelectionListLevel.h:
1168         * editing/ModifySelectionListLevel.cpp:
1169         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelWithType):
1170         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel):
1171         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered):
1172         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered):
1173         Return PassRefPtr<Node> instead of Node.
1174
1175         * page/mac/WebCoreFrameBridge.h:
1176         * page/mac/WebCoreFrameBridge.mm:
1177         Move list management functions to Editor.h and Editor.cpp.
1178
1179
1180 2007-04-27  David Hyatt  <hyatt@apple.com>
1181
1182         Fix for <rdar://problem/5134254>, toolbar buttons don't work in gmail after double-click.  Make sure
1183         to clear out the capturing frame, since you don't get a second up when a double-click happens.
1184
1185         Reviewed by mjs
1186
1187         * page/EventHandler.cpp:
1188         (WebCore::EventHandler::handleMouseDoubleClickEvent):
1189
1190 2007-04-27  Justin Garcia  <justin.garcia@apple.com>
1191
1192         Reviewed by oliver
1193
1194         <rdar://problem/5164796> 
1195         Enable execCommand("CreateLink", ...) for caret selections
1196
1197         * editing/CreateLinkCommand.cpp:
1198         (WebCore::CreateLinkCommand::doApply): For a caret
1199         selection, insert a link at the caret position
1200         with the url as the link text.
1201         * editing/JSEditor.cpp: Enable CreateLink for caret 
1202         selections.
1203
1204 2007-04-27  Antti Koivisto  <antti@apple.com>
1205
1206         Reviewed by Darin, Hyatt.
1207         
1208         Fix http://bugs.webkit.org/show_bug.cgi?id=13081
1209         Empty table cells not handled correctly
1210         <rdar://problem/5067926>
1211         
1212         To match Firefox and IE, empty table cells with variable width need to be
1213         treated as special case. They generally get zero width.
1214
1215         * rendering/AutoTableLayout.cpp:
1216         (WebCore::AutoTableLayout::recalcColumn):
1217         (WebCore::AutoTableLayout::calcEffectiveWidth):
1218         (WebCore::AutoTableLayout::layout):
1219         * rendering/AutoTableLayout.h:
1220         (WebCore::AutoTableLayout::Layout::Layout):
1221         * rendering/RenderStyle.h:
1222         (WebCore::RenderStyle::hasPadding):
1223
1224 2007-04-27  Rob Buis  <buis@kde.org>
1225
1226         Reviewed by Oliver.
1227
1228         http://bugs.webkit.org/show_bug.cgi?id=13052
1229         Text not rendered in a second inline SVG element
1230
1231         Correct the rendering of svg text when embedded in non-svg container.
1232
1233         * rendering/RenderSVGText.cpp:
1234         (WebCore::RenderSVGText::paint):
1235
1236 2007-04-27  Mark Rowe  <mrowe@apple.com>
1237
1238         Reviewed by Maciej.
1239
1240         * WebCore.pro: Remove non-existent paths from qmake files.
1241
1242 2007-04-25  Lars Naesbye Christensen <lars@naesbye.dk>
1243
1244         Reviewed by Timothy Hatcher.
1245
1246         http://bugs.webkit.org/show_bug.cgi?id=13477
1247         Bug 13477: Help and context menu cursors need dropshadows.
1248
1249         * Resources/cellCursor.png:
1250         * Resources/contextMenuCursor.png:
1251         * Resources/helpCursor.png:
1252         * platform/mac/CursorMac.mm:
1253         (WebCore::contextMenuCursor):
1254         (WebCore::copyCursor):
1255         (WebCore::progressCursor):
1256         (WebCore::noDropCursor):
1257
1258 2007-04-27  Holger Freyther <freyther@kde.org>
1259
1260         Reviewed by Maciej.
1261
1262         Remove unmaintained CMake build system.
1263
1264         * CMakeLists.txt: Removed.
1265
1266 2007-04-26  Matt Perry  <mpComplete@gmail.com>
1267
1268         Reviewed by Maciej.
1269
1270         Added a version check to hackAroundLibXMLEntityBug, since that bug has
1271         been fixed in recent versions of libxml2.
1272
1273         * dom/XMLTokenizer.cpp:
1274         (WebCore::hackAroundLibXMLEntityBug):
1275
1276 2007-04-26  Christopher Brichford  <chrisb@adobe.com>
1277
1278         Reviewed by Timothy Hatcher.
1279
1280         - Fix for Bug 13204: Submit initial version of mac project files for apollo
1281           port of WebCore
1282           http://bugs.webkit.org/show_bug.cgi?id=13204
1283
1284         * WebCore.apolloproj/mac/WebCore.Debug.xcconfig: Added.
1285         * WebCore.apolloproj/mac/WebCore.Release.xcconfig: Added.
1286         * WebCore.apolloproj/mac/WebCore.xcconfig: Added.
1287         * WebCore.apolloproj/mac/WebCore.xcodeproj/project.pbxproj: Added.
1288
1289 2007-04-26  Alp Toker  <alp@atoker.com>
1290
1291         Reviewed by Maciej.
1292
1293         http://bugs.webkit.org/show_bug.cgi?id=13505
1294         Cast loses precision on x86_64
1295
1296         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1297         (WebCore::GraphicsContext::beginTransparencyLayer):
1298         (WebCore::GraphicsContext::endTransparencyLayer):
1299         Use a stack of opacity values instead of Cairo user data.
1300
1301 2007-04-26  Mitz Pettel  <mitz@webkit.org>
1302
1303         Reviewed by Darin.
1304
1305         - fix http://bugs.webkit.org/show_bug.cgi?id=13500
1306           REGRESSION: Listbox scrollbar does not reflect actual scrolled position when selected option is added after layout
1307
1308         Test: fast/forms/listbox-scrollbar-incremental-load.html
1309
1310         The scroller position was not updated correctly during insertion, since
1311         scrollbar proportions are updated only during layout
1312
1313         * rendering/RenderListBox.cpp:
1314         (WebCore::RenderListBox::selectionChanged): Delay scrolling to reveal the
1315         selection until after layout if m_optionsChanged is set. Layout is
1316         guaranteed to happen soon when the flag is set.
1317
1318 2007-04-26  David Hyatt  <hyatt@apple.com>
1319
1320         Fix for 13511, crash on a counters page.  Make sure that RenderTexts
1321         never get a null StringImpl.  I would have added an assert that the length
1322         had to be nonzero also, but unfortunately editing creates empty RenderTexts
1323         because of its EditingText DOM subclass that always forces renderers to be
1324         made.  I suppose there is a good reason for this...
1325
1326         Reviewed by aroben
1327
1328         * dom/CharacterData.cpp:
1329         (WebCore::CharacterData::setData):
1330         (WebCore::CharacterData::appendData):
1331         (WebCore::CharacterData::insertData):
1332         (WebCore::CharacterData::deleteData):
1333         (WebCore::CharacterData::replaceData):
1334         * rendering/RenderCounter.cpp:
1335         (WebCore::RenderCounter::RenderCounter):
1336         * rendering/RenderText.cpp:
1337         (WebCore::RenderText::RenderText):
1338         (WebCore::RenderText::trimmedPrefWidths):
1339         (WebCore::RenderText::setTextWithOffset):
1340         (WebCore::RenderText::setTextInternal):
1341         (WebCore::RenderText::setText):
1342
1343 2007-04-26  Alice Liu  <alice.liu@apple.com>
1344
1345         Reviewed by Oliver.
1346
1347         * editing/SelectionController.cpp:
1348         (WebCore::SelectionController::selectAll):
1349         adding null check
1350
1351 2007-04-26  Justin Garcia  <justin.garcia@apple.com>
1352
1353         Reviewed by oliver
1354
1355         <rdar://problem/5120591> 
1356         Crash when creating a link in Leopard wiki server
1357
1358         * editing/CreateLinkCommand.cpp:
1359         (WebCore::CreateLinkCommand::doApply): Use a RefPtr,
1360         setting the anchor's href can destroy it if there is
1361         an ancestor with a subtree modified event listener.
1362
1363 2007-04-26  Mitz Pettel  <mitz@webkit.org>
1364
1365         Reviewed by hyatt
1366
1367         - http://bugs.webkit.org/show_bug.cgi?id=13496
1368           Eliminate repaintObjectsBeforeLayout
1369
1370         No tests added since there is no change to functionality. Several
1371         tests in fast/repaint test repainting of objects that move during layout.
1372
1373         * page/FrameView.cpp:
1374         (WebCore::FrameView::layout):
1375         * rendering/RenderBlock.cpp:
1376         (WebCore::RenderBlock::layoutBlockChildren): Removed an early
1377         setNeedsLayout(false). Resetting the bit here prevents the full repaint
1378         that we rely on when we decide not to repaint children that move.
1379         * rendering/RenderBlock.h:
1380         * rendering/RenderObject.cpp:
1381         * rendering/RenderObject.h:
1382         * rendering/RenderTableSection.cpp:
1383         (WebCore::RenderTableSection::setCellWidths): Replaced the call to
1384         repaintObjectsBeforeLayout() if the cell didn't need layout with
1385         an unconditional repaint(). We don't bother with repainting only the
1386         delta between the old and new widths, since by marking the cell for
1387         layout results in a full repaint with the new width anyway.
1388
1389 2007-04-26  David Hyatt  <hyatt@apple.com>
1390
1391         Fix for 13509.  Don't recur to parent inline flows if they have been
1392         marked as needing layout themselves.
1393
1394         Reviewed by adele
1395
1396         * rendering/RenderFlow.cpp:
1397         (WebCore::RenderFlow::dirtyLinesFromChangedChild):
1398
1399 2007-04-26  Matt Perry  <mpComplete@gmail.com>
1400
1401         Reviewed and landed by Alexey.
1402
1403         http://bugs.webkit.org/show_bug.cgi?id=13495
1404         Crash when referencing an undefined entity in an XHTML document
1405
1406         Test: fast/parser/badentity.xhtml
1407
1408         * dom/XMLTokenizer.cpp:
1409         (WebCore::getEntityHandler): Check for a NULL returned from getXHTMLEntity
1410
1411 2007-04-26  Anders Carlsson  <andersca@apple.com>
1412
1413         Reviewed by Hyatt.
1414
1415         <rdar://problem/4851944>
1416         REGRESSION: With TOT, BMP images can no longer be opened in the browser window
1417         
1418         On Tiger, the MIME type for the com.microsoft.bmp UTI isn't in the registry, so add it manually.
1419         
1420         * platform/MimeTypeRegistry.cpp:
1421         (WebCore::initialiseSupportedImageMIMETypes):
1422
1423 2007-04-26  David Hyatt  <hyatt@apple.com>
1424
1425         Fix for bug 13503, invalidateContainingBlockPrefWidths is 15% of the
1426         nesting PLT.  Avoid O(n^2) behavior by including inlines in the minmax
1427         dirty chain.
1428
1429         Reviewed by kevin
1430
1431         * rendering/RenderBlock.cpp:
1432         (WebCore::RenderBlock::calcInlinePrefWidths):
1433         * rendering/RenderObject.cpp:
1434         (WebCore::RenderObject::setPrefWidthsDirty):
1435         (WebCore::RenderObject::invalidateContainerPrefWidths):
1436         * rendering/RenderObject.h:
1437
1438 2007-04-26  Anders Carlsson  <andersca@apple.com>
1439
1440         Reviewed by Darin.
1441
1442         <rdar://problem/5067925>
1443         Reproducible crash (infinite recursion) with a layout test that submits on unload (13078)
1444         
1445         Ask the document loader whether it's loading the main resource, since there are cases where the frame 
1446         loader's variable isn't updated correctly.
1447         
1448         In the distant future, the frame loader shouldn't have an instance variable but this is the least intrusive fix for now.
1449         
1450         I couldn't come up with a good test case for this since it requires running three tests in a row and scheduleLoad didn't work. Also,
1451         calling submit in the onunload prevents any new tests from loading!
1452         
1453         * loader/FrameLoader.cpp:
1454         (WebCore::FrameLoader::isLoading):
1455
1456 2007-04-26  Anders Carlsson  <andersca@apple.com>
1457
1458         ... and fix the build.
1459         
1460         * loader/FrameLoader.cpp:
1461         (WebCore::FrameLoader::continueAfterNavigationPolicy):
1462
1463 2007-04-26  Anders Carlsson  <andersca@apple.com>
1464
1465         Revert the previous change - activeDocumentLoader never returns the policy document loader.
1466         Instead, add a null check for the policy document loader.
1467         
1468         * loader/FrameLoader.cpp:
1469         (WebCore::FrameLoader::continueAfterNavigationPolicy):
1470
1471 2007-04-26  Anders Carlsson  <andersca@apple.com>
1472
1473         Use the active document loader instead of the policy document loader.
1474         
1475         * loader/FrameLoader.cpp:
1476         (WebCore::FrameLoader::continueAfterNavigationPolicy):
1477
1478 2007-04-26  Anders Carlsson  <andersca@apple.com>
1479
1480         Reviewed by Maciej.
1481
1482         <rdar://problem/5049099> documents no longer have a default base URL
1483
1484         Don't call canHandleRequest if we have valid substitute data and the protocol is "applewebdata".
1485         
1486         * loader/FrameLoader.cpp:
1487         (WebCore::FrameLoader::continueAfterNavigationPolicy):
1488
1489 2007-04-25  Stephanie Lewis <slewis@apple.com>
1490
1491         Reviewed by Darin.
1492
1493         Fix the build for platforms that overload the abs function.        
1494
1495         * dom/ChildNodeList.cpp:
1496         (WebCore::ChildNodeList::item):
1497
1498 2007-04-25  David Hyatt  <hyatt@apple.com>
1499
1500         Fix for bug 13373, make sure to invalidate the pref widths for objects
1501         with percentage padding.
1502
1503         Reviewed by beth
1504
1505         * rendering/RenderBlock.cpp:
1506         (WebCore::RenderBlock::layoutBlockChildren):
1507         (WebCore::RenderBlock::layoutPositionedObjects):
1508         * rendering/bidi.cpp:
1509         (WebCore::RenderBlock::layoutInlineChildren):
1510
1511 2007-04-25  David Harrison  <harrison@apple.com>
1512
1513         Comment change. Correct the header name in the endif comment.
1514         
1515         * editing/FormatBlockCommand.h:
1516         Change InsertListCommand_h to FormatBlockCommand_h.
1517
1518 2007-04-25  Darin Adler  <darin@apple.com>
1519
1520         Reviewed by Hyatt.
1521
1522         * platform/AtomicString.cpp: (WebCore::AtomicString::add):
1523         Removed unnecessary use of strlen to check if a string is empty.
1524
1525 2007-04-25  Mitz Pettel  <mitz@webkit.org>
1526
1527         Build fix.
1528
1529         * rendering/RenderListMarker.h: Undeleted the m_text member.
1530
1531 2007-04-25  David Hyatt  <hyatt@apple.com>
1532
1533         Rearchitect calcPrefWidths.  The calculation is now done lazily only when minPrefWidth
1534         or maxPrefWidth are asked for.  The result of the calculation is cached.
1535
1536         The new invalidation scheme for pref width invalidation follows the
1537         containing block hierarchy and knows to halt at positioned objects, since
1538         they cannot influence the size of their containers.
1539
1540         Reviewed by darin
1541
1542         * css/cssstyleselector.cpp:
1543         (WebCore::CSSStyleSelector::init):
1544         (WebCore::CSSStyleSelector::initForStyleResolve):
1545         * page/FrameView.cpp:
1546         (WebCore::FrameView::layout):
1547         * rendering/RenderApplet.cpp:
1548         (WebCore::RenderApplet::layout):
1549         * rendering/RenderBlock.cpp:
1550         (WebCore::RenderBlock::makeChildrenNonInline):
1551         (WebCore::RenderBlock::removeChild):
1552         (WebCore::RenderBlock::layout):
1553         (WebCore::RenderBlock::layoutBlock):
1554         (WebCore::RenderBlock::calcPrefWidths):
1555         (WebCore::InlineMinMaxIterator::endOfInline):
1556         (WebCore::shouldGrowTableCellForImage):
1557         (WebCore::RenderBlock::calcInlinePrefWidths):
1558         (WebCore::RenderBlock::calcBlockPrefWidths):
1559         * rendering/RenderBlock.h:
1560         * rendering/RenderBox.cpp:
1561         (WebCore::RenderBox::setStyle):
1562         (WebCore::RenderBox::minPrefWidth):
1563         (WebCore::RenderBox::maxPrefWidth):
1564         (WebCore::RenderBox::calcWidth):
1565         (WebCore::RenderBox::calcWidthUsing):
1566         (WebCore::RenderBox::calcAbsoluteHorizontal):
1567         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
1568         * rendering/RenderBox.h:
1569         * rendering/RenderContainer.cpp:
1570         (WebCore::RenderContainer::removeChildNode):
1571         (WebCore::RenderContainer::appendChildNode):
1572         (WebCore::RenderContainer::insertChildNode):
1573         (WebCore::RenderContainer::layout):
1574         * rendering/RenderContainer.h:
1575         (WebCore::RenderContainer::moveChildNode):
1576         * rendering/RenderCounter.cpp:
1577         (WebCore::RenderCounter::dirtyLineBoxes):
1578         (WebCore::RenderCounter::calcPrefWidths):
1579         * rendering/RenderCounter.h:
1580         * rendering/RenderFileUploadControl.cpp:
1581         (WebCore::RenderFileUploadControl::calcPrefWidths):
1582         * rendering/RenderFlexibleBox.cpp:
1583         (WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
1584         (WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
1585         (WebCore::RenderFlexibleBox::calcPrefWidths):
1586         (WebCore::RenderFlexibleBox::layoutBlock):
1587         * rendering/RenderForeignObject.cpp:
1588         (WebCore::RenderForeignObject::layout):
1589         * rendering/RenderFrameSet.cpp:
1590         (WebCore::RenderFrameSet::layout):
1591         * rendering/RenderHTMLCanvas.cpp:
1592         (WebCore::RenderHTMLCanvas::layout):
1593         * rendering/RenderImage.cpp:
1594         (WebCore::RenderImage::layout):
1595         * rendering/RenderInline.cpp:
1596         * rendering/RenderInline.h:
1597         * rendering/RenderListBox.cpp:
1598         (WebCore::RenderListBox::updateFromElement):
1599         (WebCore::RenderListBox::calcPrefWidths):
1600         * rendering/RenderListItem.cpp:
1601         (WebCore::firstNonMarkerChild):
1602         (WebCore::RenderListItem::updateMarkerLocation):
1603         (WebCore::RenderListItem::calcPrefWidths):
1604         (WebCore::RenderListItem::layout):
1605         * rendering/RenderListMarker.cpp:
1606         (WebCore::RenderListMarker::layout):
1607         (WebCore::RenderListMarker::calcPrefWidths):
1608         (WebCore::RenderListMarker::updateMargins):
1609         * rendering/RenderListMarker.h:
1610         * rendering/RenderObject.cpp:
1611         (WebCore::RenderObject::RenderObject):
1612         (WebCore::RenderObject::removeChildNode):
1613         (WebCore::RenderObject::moveChildNode):
1614         (WebCore::RenderObject::appendChildNode):
1615         (WebCore::RenderObject::insertChildNode):
1616         (WebCore::RenderObject::setPrefWidthsDirty):
1617         (WebCore::RenderObject::invalidateContainingBlockPrefWidths):
1618         (WebCore::RenderObject::information):
1619         (WebCore::RenderObject::setStyle):
1620         * rendering/RenderObject.h:
1621         (WebCore::RenderObject::layer):
1622         (WebCore::RenderObject::hasLayer):
1623         (WebCore::RenderObject::prefWidthsDirty):
1624         (WebCore::RenderObject::setNeedsLayoutAndPrefWidthsRecalc):
1625         (WebCore::RenderObject::setHasLayer):
1626         * rendering/RenderPartObject.cpp:
1627         (WebCore::RenderPartObject::layout):
1628         * rendering/RenderSVGContainer.cpp:
1629         (WebCore::RenderSVGContainer::layout):
1630         * rendering/RenderSVGContainer.h:
1631         * rendering/RenderSVGHiddenContainer.cpp:
1632         * rendering/RenderSVGHiddenContainer.h:
1633         * rendering/RenderSVGText.cpp:
1634         (WebCore::RenderSVGText::layout):
1635         * rendering/RenderTable.cpp:
1636         (WebCore::RenderTable::calcWidth):
1637         (WebCore::RenderTable::layout):
1638         (WebCore::RenderTable::removeChildNode):
1639         * rendering/RenderTable.h:
1640         * rendering/RenderTableRow.cpp:
1641         (WebCore::RenderTableRow::layout):
1642         * rendering/RenderTableSection.cpp:
1643         (WebCore::RenderTableSection::removeChildNode):
1644         * rendering/RenderTableSection.h:
1645         * rendering/RenderText.cpp:
1646         (WebCore::RenderText::trimmedPrefWidths):
1647         (WebCore::isSpaceAccordingToStyle):
1648         (WebCore::RenderText::minPrefWidth):
1649         (WebCore::RenderText::maxPrefWidth):
1650         (WebCore::RenderText::calcPrefWidths):
1651         (WebCore::RenderText::width):
1652         * rendering/RenderText.h:
1653         * rendering/RenderView.cpp:
1654         (WebCore::RenderView::RenderView):
1655         (WebCore::RenderView::calcPrefWidths):
1656         (WebCore::RenderView::layout):
1657         * rendering/RenderWidget.cpp:
1658         (WebCore::RenderWidget::layout):
1659
1660 2007-04-25  Steve Falkenburg  <sfalken@apple.com>
1661
1662         Reviewed by Adam.
1663
1664         Fix spelling error in spelling method name.
1665         Expose new spelling callback methods to all platforms.
1666
1667         * bridge/EditorClient.h:
1668         * platform/gdk/EditorClientGdk.cpp:
1669         (WebCore::EditorClientGdk::updateSpellingUIWithGrammarString):
1670         * platform/gdk/EditorClientGdk.h:
1671         * platform/graphics/svg/SVGImageEmptyClients.h:
1672         (WebCore::SVGEmptyEditorClient::updateSpellingUIWithGrammarString):
1673         (WebCore::SVGEmptyEditorClient::getGuessesForWord):
1674
1675 2007-04-24  Geoffrey Garen  <ggaren@apple.com>
1676
1677         Reviewed by Darin Adler, Tim Hatcher.
1678
1679         Fixed a few NSAutoreleasePool issues I noticed while reviewing Brady's patch.
1680
1681         * platform/graphics/mac/GraphicsContextMac.mm:
1682         (WebCore::GraphicsContext::setCompositeOperation): Call -drain instead of 
1683         -release, since -release is a no-op in a GC world.
1684
1685 2007-04-25  Alexey Proskuryakov  <ap@webkit.org>
1686
1687         Reviewed by Darin.
1688
1689         http://bugs.webkit.org/show_bug.cgi?id=13445
1690         NodeList access by index is slow
1691
1692         * dom/ChildNodeList.cpp:
1693         (WebCore::ChildNodeList::item): Support iterating backwards from the last accessed node
1694         or from the last child.
1695         * dom/NodeList.h: Make cachedLength unsigned.
1696
1697 2007-04-26  Mark Rowe  <mrowe@apple.com>
1698
1699         Gdk build fix.  Add missing stub.
1700
1701         * platform/gdk/TemporaryLinkStubs.cpp:
1702         (Editor::advanceToNextMisspelling):
1703
1704 2007-04-25  Rob Buis  <buis@kde.org>
1705
1706         Reviewed by Darin.
1707
1708         http://bugs.webkit.org/show_bug.cgi?id=12163
1709         SVG text does not appear in a scrolling <div>
1710
1711         Make sure SVG text is painted when scrolling by taking into account the relative offset of the non-SVG parent in the paintInfo rect.
1712
1713         * rendering/RenderSVGContainer.cpp:
1714         (WebCore::RenderSVGContainer::paint):
1715
1716 2007-04-26  Mark Rowe  <mrowe@apple.com>
1717
1718         Fix non-Mac builds after r21081.
1719
1720         Stub out new Editor methods for Qt and Gdk, and new SVGEmptyEditorClient methods
1721         for all non-Mac builds.
1722
1723         * editing/qt/EditorQt.cpp:
1724         (WebCore::Editor::showSpellingGuessPanel):
1725         (WebCore::Editor::spellingPanelIsShowing):
1726         * page/qt/EventHandlerQt.cpp:
1727         (WebCore::EventHandler::passWheelEventToWidget):
1728         (WebCore::EventHandler::passMousePressEventToScrollbar):
1729         * platform/gdk/TemporaryLinkStubs.cpp:
1730         (Editor::showSpellingGuessPanel):
1731         (Editor::spellingPanelIsShowing):
1732         * platform/graphics/svg/SVGImageEmptyClients.h:
1733         (WebCore::SVGEmptyEditorClient::ignoreWordInSpellDocument):
1734         (WebCore::SVGEmptyEditorClient::learnWord):
1735         (WebCore::SVGEmptyEditorClient::checkSpellingOfString):
1736         (WebCore::SVGEmptyEditorClient::checkGrammarOfString):
1737         (WebCore::SVGEmptyEditorClient::udpateSpellingUIWithGrammarString):
1738         (WebCore::SVGEmptyEditorClient::updateSpellingUIWithMisspelledWord):
1739         (WebCore::SVGEmptyEditorClient::showSpellingUI):
1740         (WebCore::SVGEmptyEditorClient::spellingUIIsShowing):
1741         (WebCore::SVGEmptyEditorClient::getGuessesForWord):
1742
1743 2007-04-25  Anders Carlsson  <andersca@apple.com>
1744
1745         Reviewed by Ada.
1746
1747         <rdar://problem/5122153>
1748         Crash occurs at WebCore::Frame::loader() when switching to Bookmarks view while loading standalone image
1749
1750         Don't call writeRawData if the data length is 0. (This is checked by the decoder for the non-raw case).
1751
1752         * loader/FrameLoader.cpp:
1753         (WebCore::FrameLoader::write):
1754
1755 2007-04-26  Mark Rowe  <mrowe@apple.com>
1756
1757         Gdk build fix courtesy of Alp Toker.
1758
1759         * make-generated-sources.sh:  Remove conditional logic to ensure the
1760         script exits with the correct exit code.
1761
1762 2007-04-24  Anders Carlsson  <andersca@apple.com>
1763
1764         Reviewed by Mitz.
1765
1766         <rdar://problem/4869095> 
1767         default content type for XMLHttpRequest POSTs changed (breaks Flickrator 0.1 widget)
1768         
1769         Use the right MIME type.
1770         
1771         * xml/xmlhttprequest.cpp:
1772         (WebCore::XMLHttpRequest::send):
1773
1774 2007-04-24  Darin Adler  <darin@apple.com>
1775
1776         Reviewed by Maciej.
1777
1778         - second round of preparation for Hyatt's "lazy minMaxWidth" change
1779           http://bugs.webkit.org/show_bug.cgi?id=13431
1780
1781         These are small changes that are either safe to do first, or unrelated to the main
1782         change in Hyatt's patch.
1783
1784         - Preallocate 4 entries each in m_layoutStruct and m_spanCells to save allocation
1785           in AutoTableLayout.
1786         - Add an early exit to RenderFlow::dirtyLinesFromChangedChild.
1787         - Change InlineBox::hasTextChildren() to use a bit directly and never a virtual function.
1788         - Save a virtual function call by using a local bool variable for isTableCell().
1789
1790         - Fix containingBlock() so it returns 0 for table cells with no parent.
1791
1792         - Change all callers who are getting at layer() as a boolean to use hasLayer().
1793         - Change if statements to max() function calls (only the ones Hyatt had in his patch).
1794         - Remove some old kdDebug calls.
1795         - Tweak formatting of some code.
1796         - Add const in one place.
1797
1798         * bindings/js/kjs_html.cpp:
1799         (KJS::HTMLElementFunction::callAsFunction):
1800         * page/EventHandler.cpp:
1801         (WebCore::EventHandler::eventMayStartDrag):
1802         * page/Frame.cpp:
1803         (WebCore::Frame::clearTimers):
1804         * rendering/AutoTableLayout.cpp:
1805         (WebCore::AutoTableLayout::recalcColumn):
1806         * rendering/AutoTableLayout.h:
1807         * rendering/InlineBox.h:
1808         (WebCore::InlineBox::InlineBox):
1809         (WebCore::InlineBox::hasTextChildren):
1810         * rendering/InlineFlowBox.cpp:
1811         (WebCore::InlineFlowBox::nodeAtPoint):
1812         * rendering/InlineFlowBox.h:
1813         (WebCore::InlineFlowBox::InlineFlowBox):
1814         * rendering/RenderBlock.cpp:
1815         (WebCore::RenderBlock::layoutBlock):
1816         (WebCore::RenderBlock::repaintOverhangingFloats):
1817         (WebCore::RenderBlock::paintChildren):
1818         (WebCore::RenderBlock::paintFloats):
1819         (WebCore::RenderBlock::fillBlockSelectionGaps):
1820         (WebCore::RenderBlock::insertFloatingObject):
1821         (WebCore::RenderBlock::floatRect):
1822         (WebCore::RenderBlock::lowestPosition):
1823         (WebCore::RenderBlock::rightmostPosition):
1824         (WebCore::RenderBlock::leftmostPosition):
1825         (WebCore::RenderBlock::addOverhangingFloats):
1826         (WebCore::RenderBlock::nodeAtPoint):
1827         (WebCore::RenderBlock::hitTestContents):
1828         (WebCore::RenderBlock::calcPrefWidths):
1829         (WebCore::InlineMinMaxIterator::next):
1830         (WebCore::getBorderPaddingMargin):
1831         (WebCore::RenderBlock::calcInlinePrefWidths):
1832         (WebCore::RenderBlock::calcBlockPrefWidths):
1833         * rendering/RenderContainer.cpp:
1834         (WebCore::RenderContainer::appendChildNode):
1835         (WebCore::RenderContainer::insertChildNode):
1836         * rendering/RenderFlexibleBox.cpp:
1837         (WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
1838         (WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
1839         * rendering/RenderFlow.cpp:
1840         (WebCore::RenderFlow::dirtyLinesFromChangedChild):
1841         * rendering/RenderLayer.cpp:
1842         (WebCore::RenderLayer::updateVisibilityStatus):
1843         (WebCore::RenderLayer::updateLayerPosition):
1844         * rendering/RenderObject.cpp:
1845         (WebCore::RenderObject::containingBlock):
1846         * rendering/RenderTable.cpp:
1847         (WebCore::RenderTable::paint):
1848         * rendering/RenderTableCell.cpp:
1849         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
1850         * rendering/RenderTableRow.cpp:
1851         (WebCore::RenderTableRow::nodeAtPoint):
1852         (WebCore::RenderTableRow::paint):
1853         * rendering/RenderTableSection.cpp:
1854         (WebCore::RenderTableSection::nodeAtPoint):
1855         * rendering/RenderTreeAsText.cpp:
1856         (WebCore::write):
1857
1858 2007-04-24  Steve Falkenburg  <sfalken@apple.com>
1859
1860         Reviewed by Darin, Oliver.
1861
1862         Refactor spelling codepaths
1863
1864         * bridge/EditorClient.h:
1865         * page/ContextMenuController.cpp:
1866         (WebCore::ContextMenuController::contextMenuItemSelected):
1867         * platform/ContextMenu.cpp:
1868         (WebCore::ContextMenu::populate):
1869         (WebCore::ContextMenu::checkOrEnableIfNeeded):
1870         * platform/gdk/EditorClientGdk.cpp:
1871         (WebCore::EditorClientGdk::ignoreWordInSpellDocument):
1872         (WebCore::EditorClientGdk::learnWord):
1873         (WebCore::EditorClientGdk::checkSpellingOfString):
1874         (WebCore::EditorClientGdk::checkGrammarOfString):
1875         (WebCore::EditorClientGdk::udpateSpellingUIWithGrammarString):
1876         (WebCore::EditorClientGdk::updateSpellingUIWithMisspelledWord):
1877         (WebCore::EditorClientGdk::showSpellingUI):
1878         (WebCore::EditorClientGdk::spellingUIIsShowing):
1879         (WebCore::EditorClientGdk::getGuessesForWord):
1880         * platform/gdk/EditorClientGdk.h:
1881
1882 2007-04-24  Darin Adler  <darin@apple.com>
1883
1884         Reviewed by Adele.
1885
1886         - first round of preparation for Hyatt's "lazy minMaxWidth" change
1887           http://bugs.webkit.org/show_bug.cgi?id=13431
1888
1889         This patch limits itself to renaming and making other super-simple
1890         changes so that the above change will be smaller and easier to review
1891         and understand.
1892
1893         Rename:
1894
1895             calcHorizontalMinMaxWidth -> calcHorizontalPrefWidths
1896             calcMinMaxWidth -> calcPrefWidths
1897             calcMinMaxWidthInternal -> calcPrefWidthsInternal
1898             calcVerticalMinMaxWidth -> calcVerticalPrefWidths
1899             setNeedsLayoutAndMinMaxRecalc -> setNeedsLayoutAndPrefWidthsRecalc
1900             trimmedMinMaxWidth -> trimmedPrefWidths
1901
1902             RenderObject::m_maxWidth -> RenderObject::m_maxPrefWidth
1903             RenderObject::m_minWidth -> RenderObject::m_minPrefWidth
1904             RenderObject::maxWidth() -> RenderObject::maxPrefWidth()
1905             RenderObject::minWidth() -> RenderObject::minPrefWidth()
1906
1907         Replace m_minMaxKnown, minMaxKnown(), and setMinMaxKnown() with
1908         m_prefWidthsDirty, prefWidthsDirty(), and setPrefWidthsDirty(),
1909         a boolean with the opposite sense.
1910
1911         Convert some uses of if statements into "max".
1912
1913         Change many uses of layer() to hasLayer(). For now it's just a boolean
1914         version of layer(), but Hyatt's patch makes it faster by using a bit.
1915
1916         Added a guard to use of axObjectCache() to make RenderObject destruction
1917         a little faster for the normal case.
1918
1919         Removed some assertions that will be removed in Hyatt's patch.
1920
1921         Made some functions const that will be const in Hyatt's patch.
1922
1923         Put in some revised comments from Hyatt's patch.
1924
1925         Removed an unneeded nil check from RenderListMarker::setStyle.
1926
1927         Moved RootInlineBox::setHorizontalOverflowPositions and
1928         RootInlineBox::setVerticalSelectionPositions to the RootInlineBox.h
1929         header and marked them inline.
1930
1931         * dom/Document.cpp:
1932         (WebCore::Document::updateStyleSelector):
1933         * html/HTMLTextAreaElement.cpp:
1934         (WebCore::HTMLTextAreaElement::parseMappedAttribute):
1935         * page/Frame.cpp:
1936         (WebCore::Frame::forceLayoutWithPageWidthRange):
1937         * rendering/AutoTableLayout.cpp:
1938         (WebCore::AutoTableLayout::recalcColumn):
1939         (WebCore::AutoTableLayout::calcPrefWidths):
1940         (WebCore::AutoTableLayout::calcEffectiveWidth):
1941         * rendering/AutoTableLayout.h:
1942         * rendering/CounterNode.cpp:
1943         (WebCore::CounterNode::recount):
1944         * rendering/FixedTableLayout.cpp:
1945         (WebCore::FixedTableLayout::calcPrefWidths):
1946         * rendering/FixedTableLayout.h:
1947         * rendering/InlineFlowBox.cpp:
1948         (WebCore::InlineFlowBox::paint):
1949         * rendering/RenderApplet.cpp:
1950         (WebCore::RenderApplet::layout):
1951         * rendering/RenderBlock.cpp:
1952         (WebCore::RenderBlock::removeChild):
1953         (WebCore::RenderBlock::layoutBlock):
1954         (WebCore::RenderBlock::handleCompactChild):
1955         (WebCore::RenderBlock::getClearDelta):
1956         (WebCore::RenderBlock::calcPrefWidths):
1957         (WebCore::RenderBlock::calcInlinePrefWidths):
1958         (WebCore::RenderBlock::calcBlockPrefWidths):
1959         * rendering/RenderBlock.h:
1960         * rendering/RenderBox.cpp:
1961         (WebCore::RenderBox::RenderBox):
1962         (WebCore::RenderBox::nodeAtPoint):
1963         (WebCore::RenderBox::calcWidth):
1964         (WebCore::RenderBox::calcWidthUsing):
1965         (WebCore::RenderBox::calcAbsoluteHorizontal):
1966         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
1967         * rendering/RenderBox.h:
1968         (WebCore::RenderBox::minPrefWidth):
1969         (WebCore::RenderBox::maxPrefWidth):
1970         * rendering/RenderContainer.cpp:
1971         (WebCore::RenderContainer::removeChildNode):
1972         (WebCore::RenderContainer::appendChildNode):
1973         (WebCore::RenderContainer::insertChildNode):
1974         (WebCore::RenderContainer::layout):
1975         * rendering/RenderContainer.h:
1976         (WebCore::RenderContainer::calcPrefWidths):
1977         * rendering/RenderCounter.cpp:
1978         (WebCore::RenderCounter::calcPrefWidths):
1979         * rendering/RenderCounter.h:
1980         * rendering/RenderFieldset.cpp:
1981         (WebCore::RenderFieldset::calcPrefWidths):
1982         * rendering/RenderFieldset.h:
1983         * rendering/RenderFileUploadControl.cpp:
1984         (WebCore::RenderFileUploadControl::calcPrefWidths):
1985         * rendering/RenderFileUploadControl.h:
1986         * rendering/RenderFlexibleBox.cpp:
1987         (WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
1988         (WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
1989         (WebCore::RenderFlexibleBox::calcPrefWidths):
1990         (WebCore::RenderFlexibleBox::layoutBlock):
1991         (WebCore::RenderFlexibleBox::allowedChildFlex):
1992         * rendering/RenderFlexibleBox.h:
1993         (WebCore::RenderFlexibleBox::hasMultipleLines):
1994         (WebCore::RenderFlexibleBox::isVertical):
1995         (WebCore::RenderFlexibleBox::isHorizontal):
1996         * rendering/RenderFlow.cpp:
1997         (WebCore::RenderFlow::absoluteClippedOverflowRect):
1998         * rendering/RenderForeignObject.cpp:
1999         (WebCore::RenderForeignObject::layout):
2000         * rendering/RenderFrameSet.cpp:
2001         (WebCore::RenderFrameSet::layout):
2002         * rendering/RenderHTMLCanvas.cpp:
2003         (WebCore::RenderHTMLCanvas::layout):
2004         * rendering/RenderImage.cpp:
2005         (WebCore::RenderImage::imageChanged):
2006         (WebCore::RenderImage::layout):
2007         (WebCore::RenderImage::calcPrefWidths):
2008         * rendering/RenderImage.h:
2009         * rendering/RenderInline.cpp:
2010         (WebCore::RenderInline::addChildToFlow):
2011         (WebCore::RenderInline::splitInlines):
2012         (WebCore::RenderInline::splitFlow):
2013         (WebCore::RenderInline::calcPrefWidths):
2014         * rendering/RenderInline.h:
2015         * rendering/RenderListBox.cpp:
2016         (WebCore::RenderListBox::updateFromElement):
2017         (WebCore::RenderListBox::calcPrefWidths):
2018         * rendering/RenderListBox.h:
2019         * rendering/RenderListItem.cpp:
2020         (WebCore::RenderListItem::updateValue):
2021         (WebCore::RenderListItem::updateMarkerLocation):
2022         (WebCore::RenderListItem::calcPrefWidths):
2023         (WebCore::RenderListItem::layout):
2024         (WebCore::RenderListItem::explicitValueChanged):
2025         * rendering/RenderListItem.h:
2026         * rendering/RenderListMarker.cpp:
2027         (WebCore::RenderListMarker::setStyle):
2028         (WebCore::RenderListMarker::layout):
2029         (WebCore::RenderListMarker::imageChanged):
2030         (WebCore::RenderListMarker::calcPrefWidths):
2031         (WebCore::RenderListMarker::calcWidth):
2032         * rendering/RenderListMarker.h:
2033         * rendering/RenderMenuList.cpp:
2034         (WebCore::RenderMenuList::updateOptionsWidth):
2035         (WebCore::RenderMenuList::calcPrefWidths):
2036         * rendering/RenderMenuList.h:
2037         * rendering/RenderObject.cpp:
2038         (WebCore::RenderObject::RenderObject):
2039         (WebCore::addLayers):
2040         (WebCore::RenderObject::removeLayers):
2041         (WebCore::RenderObject::moveLayers):
2042         (WebCore::RenderObject::addAbsoluteRectForLayer):
2043         (WebCore::RenderObject::checkForRepaintDuringLayout):
2044         (WebCore::RenderObject::dump):
2045         (WebCore::RenderObject::setStyle):
2046         (WebCore::RenderObject::destroy):
2047         (WebCore::RenderObject::recalcMinMaxWidths):
2048         * rendering/RenderObject.h:
2049         (WebCore::RenderObject::hasLayer):
2050         (WebCore::RenderObject::prefWidthsDirty):
2051         (WebCore::RenderObject::setPrefWidthsDirty):
2052         (WebCore::RenderObject::setNeedsLayoutAndPrefWidthsRecalc):
2053         (WebCore::RenderObject::calcPrefWidths):
2054         (WebCore::RenderObject::minPrefWidth):
2055         (WebCore::RenderObject::maxPrefWidth):
2056         * rendering/RenderPart.cpp:
2057         (WebCore::RenderPart::setWidget):
2058         * rendering/RenderPartObject.cpp:
2059         (WebCore::RenderPartObject::updateWidget):
2060         (WebCore::RenderPartObject::layout):
2061         * rendering/RenderReplaced.cpp:
2062         (WebCore::RenderReplaced::calcPrefWidths):
2063         * rendering/RenderReplaced.h:
2064         * rendering/RenderSVGContainer.cpp:
2065         (WebCore::RenderSVGContainer::calcPrefWidths):
2066         (WebCore::RenderSVGContainer::layout):
2067         * rendering/RenderSVGContainer.h:
2068         * rendering/RenderSVGHiddenContainer.cpp:
2069         (WebCore::RenderSVGHiddenContainer::calcPrefWidths):
2070         * rendering/RenderSVGHiddenContainer.h:
2071         * rendering/RenderSVGText.cpp:
2072         (WebCore::RenderSVGText::layout):
2073         * rendering/RenderSlider.cpp:
2074         (WebCore::RenderSlider::calcPrefWidths):
2075         * rendering/RenderSlider.h:
2076         * rendering/RenderTable.cpp:
2077         (WebCore::RenderTable::calcWidth):
2078         (WebCore::RenderTable::layout):
2079         (WebCore::RenderTable::calcPrefWidths):
2080         (WebCore::RenderTable::splitColumn):
2081         (WebCore::RenderTable::appendColumn):
2082         * rendering/RenderTable.h:
2083         * rendering/RenderTableCell.cpp:
2084         (WebCore::RenderTableCell::updateFromElement):
2085         (WebCore::RenderTableCell::styleOrColWidth):
2086         (WebCore::RenderTableCell::calcPrefWidths):
2087         * rendering/RenderTableCell.h:
2088         * rendering/RenderTableCol.cpp:
2089         (WebCore::RenderTableCol::updateFromElement):
2090         * rendering/RenderTableRow.cpp:
2091         (WebCore::RenderTableRow::layout):
2092         * rendering/RenderTableSection.cpp:
2093         (WebCore::RenderTableSection::paint):
2094         * rendering/RenderText.cpp:
2095         (WebCore::RenderText::trimmedPrefWidths):
2096         (WebCore::RenderText::calcPrefWidths):
2097         (WebCore::RenderText::calcPrefWidthsInternal):
2098         (WebCore::RenderText::setText):
2099         * rendering/RenderText.h:
2100         (WebCore::RenderText::minPrefWidth):
2101         (WebCore::RenderText::maxPrefWidth):
2102         * rendering/RenderTextControl.cpp:
2103         (WebCore::RenderTextControl::calcPrefWidths):
2104         * rendering/RenderTextControl.h:
2105         * rendering/RenderView.cpp:
2106         (WebCore::RenderView::RenderView):
2107         (WebCore::RenderView::calcPrefWidths):
2108         (WebCore::RenderView::layout):
2109         * rendering/RenderView.h:
2110         * rendering/RenderWidget.cpp:
2111         (WebCore::RenderWidget::layout):
2112         * rendering/RootInlineBox.cpp:
2113         * rendering/RootInlineBox.h:
2114         (WebCore::RootInlineBox::setHorizontalOverflowPositions):
2115         (WebCore::RootInlineBox::setVerticalSelectionPositions):
2116         * rendering/TableLayout.h:
2117
2118 2007-04-24  Justin Garcia  <justin.garcia@apple.com>
2119
2120         Reviewed by oliver
2121         
2122         <rdar://problem/5156401> 
2123         Crash when dragging text into a link inside a table cell
2124
2125         * editing/CompositeEditCommand.cpp:
2126         (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
2127         Don't avoid the anchor if doing so would skip over a line break, that
2128         would put content in the wrong paragraph, which can throw ReplaceSelectionCommand,
2129         which relies on moveParagraphs into infinite recursion.
2130         Renamed the input position.
2131         Don't need to re-fetch the enclosing anchor when preparing to push it down,
2132         since it hasn't changed since the top of the function.
2133
2134 2007-04-24  Timothy Hatcher  <timothy@apple.com>
2135
2136         Reviewed by Adam.
2137
2138         <rdar://problem/5133011> 64-bit: Attempting to paste copied text in a input field results in a crash at WebCore::Range::startPosition()
2139
2140         Change a couple incorrect uses of LONG_MAX to INT_MAX to match the variable type they are used in.
2141         The LONG_MAX on 64-bit was overflowing the int variables, causing this crash on paste.
2142
2143         * bridge/mac/WebCoreAXObject.mm:
2144         (-[WebCoreAXObject value]):
2145         * editing/TextIterator.cpp:
2146         (WebCore::TextIterator::handleTextNode):
2147         (WebCore::TextIterator::handleTextBox):
2148
2149 2007-04-24  Timothy Hatcher  <timothy@apple.com>
2150
2151         Reviewed by Adam.
2152
2153         <rdar://problem/4966982> 64-bit: In a unordered list, TYPE=DISC and TYPE=CIRCLE attribute values are ignored
2154
2155         We need to draw our full-circle arcs counter-clockwise, since a clockwise arc from 0 to 2Ï\80 is no arc at all!
2156         This only worked on 32-bit due to a rounding error in CoreGraphics, causing it to draw a full circle anyway.
2157
2158         * platform/graphics/cg/GraphicsContextCG.cpp:
2159         (WebCore::GraphicsContext::drawEllipse):
2160
2161 2007-04-24  Brady Eidson  <beidson@apple.com>
2162
2163         Reviewed by Beth, Hyatt, Ada, and Darin
2164
2165         <rdar://problem/5011477> and <rdar://problem/5011514>
2166         Provide support for the icon.db to be moved to a different directory from the old WebKit-style
2167         icons, and remove the old directory if that is the case
2168
2169         Support for this starts in WebCore, where we can use the metadata table in the icon.db to track
2170         whether or not we've ever done the import
2171
2172         * WebCore.exp:
2173         * loader/icon/IconDatabase.cpp:
2174         (WebCore::IconDatabase::defaultDatabaseFilename): Changed to "Icons.db"
2175         (WebCore::IconDatabase::IconDatabase):
2176         (WebCore::IconDatabase::deleteAllPreparedStatements): Delete the new statements added
2177         (WebCore::IconDatabase::imported): Grab this flag from the DB or return the cached flag
2178         (WebCore::IconDatabase::setImported): Store this flag into the DB
2179         (WebCore::IconDatabase::importedQuery): Actually do the DB query for this save
2180         (WebCore::IconDatabase::setImportedQuery): Actually do the DB query for this retrieval
2181         * loader/icon/IconDatabase.h:
2182
2183 2007-04-24  Darin Adler  <darin@apple.com>
2184
2185         Reviewed by Justin.
2186
2187         - fix <rdar://problem/4356361> Selection after multiple delete
2188           keypresses and undo selects only the last deleted character
2189
2190         Test: editing/undo/undo-combined-delete-boundary.html
2191         Test: editing/undo/undo-combined-delete.html
2192         Test: editing/undo/undo-delete-boundary.html
2193         Test: editing/undo/undo-delete.html
2194         Test: editing/undo/undo-forward-delete-boundary.html
2195         Test: editing/undo/undo-forward-delete.html
2196
2197         * editing/TypingCommand.cpp:
2198         (WebCore::TypingCommand::insertText): Fix obviously-wrong code where there were missing
2199         braces. I couldn't find any real symptom of this, but I think the fix should go in anyway.
2200         All layout tests still pass.
2201         (WebCore::TypingCommand::deleteKeyPressed): Added code to compute a selection that goes
2202         back to the beginning of the composite editing operation.
2203         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2204
2205         * editing/Selection.h:
2206         * editing/Selection.cpp: (WebCore::Selection::setWithoutValidation):
2207         Added. Back door to allow setting the ends of a selection without revalidating,
2208         because we need to use it on a selection where the endpoints may no longer be
2209         valid due to mutations done by earlier pieces of the editing operation.
2210
2211         * editing/EditCommand.h:
2212         (WebCore::EditCommand::startingSelection): Return a const& for speed.
2213         (WebCore::EditCommand::endingSelection): Ditto.
2214
2215 2007-04-24  Sam Weinig  <sam@webkit.org>
2216
2217         Reviewed by Mitz.
2218
2219         - fix for http://bugs.webkit.org/show_bug.cgi?id=13448
2220           REGRESSION: setting an input element's value to JavaScript null gives "null"
2221
2222         Test: fast/forms/input-null.html
2223
2224         * html/HTMLInputElement.idl: Convert JS null to the empty string on setting
2225         DOMString attributes.
2226
2227 2007-04-24  Mitz Pettel  <mitz@webkit.org>
2228
2229         Reviewed by Dave Hyatt.
2230
2231         - fix http://bugs.webkit.org/show_bug.cgi?id=13453
2232           Control clip isn't applied to children's backgrounds, outlines and floats
2233
2234         Test: fast/forms/control-clip.html
2235
2236         * rendering/RenderBlock.cpp:
2237         (WebCore::RenderBlock::paint): Apply the clip in all phases that paint
2238         children. Split PaintPhaseOutline and PaintPhaseChildBlockBackground into
2239         two phases each, applying the clip only to the children.
2240         * rendering/RenderListBox.cpp:
2241         (WebCore::RenderListBox::paintObject): Treat the scrollbar as part of the
2242         background rather than as a child's background, now that children are
2243         clipped out.
2244
2245 2007-04-24  Benjamin Otte  <otte@gnome.org>
2246
2247         Reviewed by Mark Rowe.
2248
2249         Gdk build system improvements.
2250
2251         * make-generated-sources.sh: Exit with failure status if make fails.
2252
2253 2007-04-24  Benjamin Otte  <otte@gnome.org>
2254
2255         Reviewed by Mark Rowe.
2256
2257         Gdk build system improvements.
2258
2259         * Projects/gdk/webcore-gdk.bkl:
2260         fail if running any of the commands failed. In particular
2261         make-generated-sources.sh
2262
2263 2007-04-23  Beth Dakin  <bdakin@apple.com>
2264
2265         Reviewed by Adam.
2266
2267         Fix for <rdar://problem/5155507> REGRESSION: Crash in 
2268         RenderLayer::setHasVisibleContent()
2269
2270         * rendering/RenderContainer.cpp:
2271         (WebCore::RenderContainer::appendChildNode): Must null-check 
2272         enclosingLayer()
2273         (WebCore::RenderContainer::insertChildNode): Same.
2274
2275 2007-04-23  David Hyatt  <hyatt@apple.com>
2276
2277         Fix for bug 13337, deep tag nesting is slow.  This patch fixes a number of O(n^2) issues as well as making
2278         a few performance optimizations based off profiling.  Details next to each change below.
2279
2280         Note that calcMinMaxWidth being slow is a critical separate piece of this puzzle.  Until bug 13430 is fixed,
2281         render tree construction will be O(n^2) (because of the minmaxrecalc bit setting being stupid enough to
2282         always crawl to the root of the tree) and calcMinMaxWidth will waste tons of unnecessary time.
2283
2284         When these fixes are combined with the calcMinMaxWidth fix in 13430, the penguin page specified in 13337
2285         loads in < 2 seconds (down from an infinite hang before).
2286
2287         Reviewed by aroben, ollie
2288
2289         * css/cssstyleselector.cpp:
2290         (WebCore::CSSStyleSelector::locateCousinList):
2291         (WebCore::CSSStyleSelector::locateSharedStyle):
2292         * css/csstyleselector.h
2293         Cap the depth of cousin searching on the shared style optimization.  We will be willing to (at most) crawl
2294         up the tree the same distance that we were willing to crawl backwards through sibling lists.  Leaving it
2295         uncapped resulted in pathological style resolution for the case of an infinitely nested chain of singletons.
2296
2297         * html/HTMLParser.cpp:
2298         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
2299         (WebCore::HTMLParser::popBlock):
2300         Cap the number of residual style tags that we are willing to reopen.  We will reopen at most 200
2301         residual style tags, since the assumption is that once that many tags are on the stack, you're probably already
2302         every kind of bold, italic, and color of the rainbow.
2303
2304         * rendering/RenderFlow.cpp:
2305         (WebCore::RenderFlow::absoluteClippedOverflowRect):
2306         absoluteClippedOverflowRect can just return the empty rect when the inline flow has no line boxes instead of
2307         doing a bunch of work (and calling containingBlock()) for no reason.
2308
2309         * rendering/RenderInline.cpp:
2310         (WebCore::RenderInline::addChildToFlow):
2311         Remove the useless containingBlock() check from addChildToFlow.  Obviously every inline's containing block
2312         is a block flow.
2313
2314         * rendering/bidi.cpp:
2315         (WebCore::inlineWidth):
2316         (WebCore::RenderBlock::createLineBoxes):
2317         Cap the depth of individual line trees to 200.  Again the assumption is that once that many open inlines exist
2318         all on one line that there's no way this would be intentional.
2319
2320 2007-04-23  David Hyatt  <hyatt@apple.com>
2321
2322         Fix for bug 13430, cap inline splitting for continuations to a maximum depth of 200.
2323
2324         Reviewed by olliej, antti
2325
2326         * rendering/RenderInline.cpp:
2327         (WebCore::RenderInline::splitInlines):
2328
2329 2007-04-23  Alp Toker  <alp@atoker.com>
2330
2331         Gdk build fix. Track EventHandler change made in r21042.
2332
2333         * page/gdk/EventHandlerGdk.cpp:
2334         (WebCore::EventHandler::passWheelEventToWidget):
2335         (WebCore::EventHandler::passMousePressEventToScrollbar):
2336
2337 2007-04-23  Timothy Hatcher  <timothy@apple.com>
2338
2339         Reviewed by Darin.
2340
2341         <rdar://problem/5024945> -[DOMRange lineBoxRects] doesn't include start and end nodes that have offsets
2342
2343         * rendering/RenderText.cpp:
2344         (WebCore::RenderText::addLineBoxRects): Use min(box->len(), end) instead of special-casing UINT_MAX.
2345
2346 2007-04-23  Adele Peterson  <adele@apple.com>
2347
2348         Fix by Darin, reviewed by me.
2349
2350         Fix for REGRESSION: Can't upload attachments to bugzilla since the file upload control is reset immediately 
2351         http://bugs.webkit.org/show_bug.cgi?id=13461
2352
2353         * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::updateFromElement):
2354         Only clear the FileChooser if the value is empty *and* (not or) the filename is empty.
2355
2356 2007-04-23  Adele Peterson  <adele@apple.com>
2357
2358         Reviewed by Adam.
2359
2360         Updated fix for <rdar://problem/4887426> Set a reasonable maximum number of recent searches for search menu
2361
2362         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): Use a const int maxSavedResults instead of magic number 256.
2363
2364 2007-04-23  Timothy Hatcher  <timothy@apple.com>
2365
2366         Reviewed by Hyatt.
2367
2368         <rdar://problem/5024945> -[DOMRange lineBoxRects] doesn't include start and end nodes that have offsets
2369
2370         Don't call selectionRect with a -1 end position, instead use the text length.
2371
2372         * rendering/RenderText.cpp:
2373         (WebCore::RenderText::addLineBoxRects):
2374
2375 2007-04-23  Adele Peterson  <adele@apple.com>
2376
2377         Fixed and reviewed by Darin, Adele, and Oliver.
2378
2379         WebCore part of fix for <rdar://problem/5107538> REGRESSION: Page scroll when selecting characters from inline input candidate window by arrow buttons
2380         http://bugs.webkit.org/show_bug.cgi?id=13263
2381
2382         * dom/KeyboardEvent.h: (WebCore::KeypressCommand::isEmpty): Added helper method.
2383
2384 2007-04-23  Patti Hoa  <patti@apple.com>
2385         
2386         <rdar://problem/4938364> Attachment button has different string length between attributeStringForRange and stringForRange
2387         <rdar://problem/4939536> AXLengthForTextMarkerRange returns zero length for the range of an attachment
2388         
2389         Reviewed by Darin.
2390
2391         * bridge/mac/WebCoreAXObject.mm:
2392         (nsStringForReplacedNode):
2393         Added helper routine to check if the replaced node should be exposed as an attachment character in string representation.
2394         Added an additional check to make sure that text node is not considered a replaced node.
2395         Removed helper routine AXAttributedStringAppendReplaced since half of the functions are now taken care by nsStringForReplacedNode.
2396         The other half is directly used in the doAXAttributedStringForTextMarkerRange method.
2397         (-[WebCoreAXObject doAXStringForTextMarkerRange:]):
2398         (-[WebCoreAXObject doAXAttributedStringForTextMarkerRange:]):
2399         Both string and AttrbributedString methods will now utilize the helper routine nsStringForReplacedNode to return replacement
2400         characters for range occupied by attachment.
2401         
2402 2007-04-23  Adele Peterson  <adele@apple.com>
2403
2404         Reviewed by Oliver.
2405
2406         Fix for <rdar://problem/4887426> Set a reasonable maximum number of recent searches for search menu
2407
2408         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute):
2409         Enforce a maximum of 256 saved results for the search field.
2410
2411 2007-04-23  Adele Peterson  <adele@apple.com>
2412
2413         Reviewed by Hyatt & Adam.
2414
2415         Fix for <rdar://problem/4807799> REGRESSION: calling select() in onSearch handler doesn't work if you hit enter to trigger the event
2416         Fix for <rdar://problem/5153970> onChange doesn't fire when focusing a popup, using type-ahead to select, and leaving
2417
2418         This previous behavior to blur controls when hitting enter was added to achieve the result of firing the change event.  Firefox does not
2419         fire blur- just the change event, so this fix will match Firefox behavior.
2420
2421         This also fixes a bug where we didn't fire the change event when using type-ahead selection with the popup menu.
2422
2423         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): Fire change event instead of blur event when hitting enter.
2424
2425         * html/HTMLSelectElement.cpp:
2426         (WebCore::HTMLSelectElement::dispatchFocusEvent): Now that we have type-ahead selection for popups that can be opened with the arrow keys,
2427          we should always save the last selection when a popup gets focus, so it can be compared to the current selection when it loses focus.
2428         (WebCore::HTMLSelectElement::dispatchBlurEvent): For the same reasons as above, we should fire onChange for all popups on blur.
2429
2430         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Fire change event instead of blur event when hitting enter.  Removed an unnecessary
2431          check for form() before calling menuListOnChange().  Removed an unnecessary check for renderer() and usesMenuList().
2432         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Remove call to blur.  Since list boxes fire the change event immediately after an
2433          action is taken, we don't need to fire anything after hitting enter.
2434         (WebCore::HTMLSelectElement::menuListOnChange): Reset m_lastOnChangeIndex after firing the change event.
2435
2436 2007-04-23  Anders Carlsson  <andersca@apple.com>
2437
2438         Reviewed by Ada.
2439
2440         <rdar://problem/5061022>
2441         REGRESSION: Acrobat 8 plug-in fails to scroll with trackpad two-finger scroll or mouse wheel (12995)
2442         
2443         Pass wheel events to all widgets.
2444         
2445         * page/EventHandler.cpp:
2446         (WebCore::EventHandler::handleWheelEvent):
2447         * page/EventHandler.h:
2448         * page/mac/EventHandlerMac.mm:
2449         (WebCore::EventHandler::passWheelEventToWidget):
2450
2451 2007-04-23  Alp Toker  <alp@atoker.com>
2452
2453         Reviewed by Mark.
2454
2455         Save and restore the context state when beginning and ending a transparency layer.
2456
2457         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2458         (WebCore::GraphicsContext::beginTransparencyLayer):
2459         (WebCore::GraphicsContext::endTransparencyLayer):
2460
2461 2007-04-23  Alp Toker  <alp@atoker.com>
2462
2463         Reviewed by Mark.
2464
2465         Further implementation and checks. The opacity layer code is not so beautiful
2466         but gets the job done with fewer complications than maintaining our own stack.
2467
2468         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2469         (WebCore::GraphicsContext::translate):
2470         (WebCore::GraphicsContext::setPlatformStrokeThickness):
2471         (WebCore::GraphicsContext::beginTransparencyLayer):
2472         (WebCore::GraphicsContext::endTransparencyLayer):
2473         (WebCore::GraphicsContext::setCompositeOperation):
2474         (WebCore::GraphicsContext::rotate):
2475         (WebCore::GraphicsContext::scale):
2476
2477 2007-04-23  Darin Adler  <darin@apple.com>
2478
2479         Reviewed by Hyatt.
2480
2481         - rename box-sizing to -webkit-box-sizing
2482           because of <rdar://problem/4667227> REGRESSION: Shifted table on page at
2483           https://us.etrade.com/e/t/home (due to box-sizing)
2484
2485         * css/CSSComputedStyleDeclaration.cpp:
2486         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Rename.
2487         * css/CSSPropertyNames.in: Ditto.
2488         * css/cssparser.cpp: (WebCore::CSSParser::parseValue): Rename and take out comment
2489         explaining why we aren't prefacing with -webkit.
2490         * css/cssstyleselector.cpp:
2491         (WebCore::CSSStyleSelector::applyProperty): Rename.
2492         * css/html4.css: Rename.
2493         * css/quirks.css: Rename.
2494
2495 2007-04-23  Alp Toker  <alp@atoker.com>
2496
2497         Reviewed by Hyatt.
2498
2499         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2500         (WebCore::GraphicsContext::drawEllipse):
2501         (WebCore::GraphicsContext::drawConvexPolygon):
2502         Fix stroking and filling of ellipses and polygons.
2503         * platform/graphics/cairo/ImageCairo.cpp:
2504         (WebCore::BitmapImage::draw): Make use of a new GraphicsContext
2505         function to simplify the code.
2506         (WebCore::Image::drawPattern): Now implemented. This makes content
2507         with tiled patterns (eg. CSS repeat) render correctly.
2508         * platform/graphics/gdk/ImageGdk.cpp:
2509         (WebCore::Image::drawPattern): Remove old stub.
2510
2511 2007-04-22  Lars Naesbye Christensen  <lars@naesbye.dk>
2512
2513         Reviewed by Tim Hatcher.
2514
2515         Prettier, more modern 'cell' cursor
2516         http://bugs.webkit.org/show_bug.cgi?id=13441
2517         Also updates past ChangeLog entries to new email address
2518
2519         * ChangeLog:
2520         * ChangeLog-2006-12-31:
2521         * Resources/cellCursor.png:
2522
2523 2007-04-23  Mark Rowe  <mrowe@apple.com>
2524
2525         Rubber-stamped by Hyatt.
2526
2527         Rename cMaxPenderingSourceLengthInLowBandwidthDisplay to cMaxPendingSourceLengthInLowBandwidthDisplay.
2528
2529         * loader/FrameLoader.cpp:
2530         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2531
2532 2007-04-22  Maciej Stachowiak  <mjs@apple.com>
2533
2534         Reviewed by Darin and Geoff.
2535
2536         - move most of Window's data members into a separate private object, to avoid needing
2537         to use the oversize allocator for it
2538         http://bugs.webkit.org/show_bug.cgi?id=13381
2539         
2540         It was the only remaining JSObject subclass to use the oversize
2541         allocator on 32-bit platforms, and having oversize objects around
2542         makes garbage collection slower so this would hurt performance
2543         with many tabs/windows open.
2544         
2545         No significant effect on JS iBench.
2546
2547         * bindings/js/kjs_events.cpp:
2548         (KJS::JSUnprotectedEventListener::JSUnprotectedEventListener):
2549         (KJS::JSUnprotectedEventListener::~JSUnprotectedEventListener):
2550         (KJS::JSEventListener::JSEventListener):
2551         (KJS::JSEventListener::~JSEventListener):
2552         (KJS::JSLazyEventListener::parseCode):
2553         * bindings/js/kjs_window.cpp:
2554         (KJS::WindowPrivate::WindowPrivate):
2555         (KJS::Window::Window):
2556         (KJS::Window::~Window):
2557         (KJS::Window::location):
2558         (KJS::Window::selection):
2559         (KJS::Window::locationbar):
2560         (KJS::Window::menubar):
2561         (KJS::Window::personalbar):
2562         (KJS::Window::statusbar):
2563         (KJS::Window::toolbar):
2564         (KJS::Window::scrollbars):
2565         (KJS::Window::mark):
2566         (KJS::Window::getValueProperty):
2567         (KJS::Window::findJSEventListener):
2568         (KJS::Window::findJSUnprotectedEventListener):
2569         (KJS::Window::clearHelperObjectProperties):
2570         (KJS::Window::clear):
2571         (KJS::Window::setCurrentEvent):
2572         (KJS::Window::setReturnValueSlot):
2573         (KJS::Window::clearAllTimeouts):
2574         (KJS::Window::installTimeout):
2575         (KJS::Window::pauseTimeouts):
2576         (KJS::Window::resumeTimeouts):
2577         (KJS::Window::clearTimeout):
2578         (KJS::Window::timerFired):
2579         (KJS::Window::disconnectFrame):
2580         (KJS::Window::jsEventListeners):
2581         (KJS::Window::jsHTMLEventListeners):
2582         (KJS::Window::jsUnprotectedEventListeners):
2583         (KJS::Window::jsUnprotectedHTMLEventListeners):
2584         * bindings/js/kjs_window.h:
2585
2586 2007-04-22  David Hyatt  <hyatt@apple.com>
2587
2588         Fix 1% regression on the PLT.  Make sure roundToDevicePixels does no
2589         work when no scale is in effect.
2590
2591         Reviewed by mjs
2592
2593 2007-04-22  Darin Adler  <darin@apple.com>
2594
2595         Reviewed by Oliver.
2596
2597         - fix small things noticed while looking into a font subsitution bug
2598
2599         * platform/Font.h: (WebCore::Font::operator==): Corrected a misleading comment.
2600
2601         * platform/Font.cpp:
2602         (WebCore::Font::Font): Initialize m_pageZero to 0 in the empty constructor instead
2603         of leaving it uninitialized. Initialize m_fontList for tighter code. Remove unneeded
2604         initialization of RefPtr members to 0. Changed the copy constructor to use initialization
2605         for tighter code.
2606         (WebCore::Font::operator=): Sorted to match the order from the header and the copy
2607         constructor, and removed the uneeded self-assignment check.
2608
2609 2007-04-22  Darin Adler  <darin@apple.com>
2610
2611         Reviewed by Maciej.
2612
2613         - fix http://bugs.webkit.org/show_bug.cgi?id=5196
2614           <rdar://problem/4537384> input type=file fields with style=display:none do not post
2615           their values (5196)
2616
2617         - fix http://bugs.webkit.org/show_bug.cgi?id=8248
2618           Can not clear file input field
2619
2620         * manual-tests/clear-input-file.html: Added.
2621
2622         * html/HTMLInputElement.cpp:
2623         (WebCore::HTMLInputElement::appendFormData): Remove check that prevents submission of
2624         form data when there is no renderer or the renderer is invisible. While well-intentioned,
2625         the rule does not match the behavior of other web browsers.
2626         (WebCore::HTMLInputElement::setValue): Instead of disallowing all value changes for file
2627         type, allow changes to the empty string.
2628         (WebCore::HTMLInputElement::storesValueSeparateFromAttribute): Made file type return true
2629         for this. 1) The file type does store its value separate from the value attribute.
2630         2) The code in setInputType() should do the right thing given this new value, according to
2631         my inspection of the code. 3) The code in both reset() and setValue() will work properly
2632         if this is true, which was the motivation for changing it.
2633
2634         * platform/FileChooser.h: Added a clear function.
2635         * platform/FileChooser.cpp: (WebCore::FileChooser::clear): Clear the filename and the icon.
2636
2637         * rendering/RenderFileUploadControl.cpp:
2638         (WebCore::RenderFileUploadControl::valueChanged): Used a local variable to make the code
2639         a little bit more readable (and match the change below).
2640         (WebCore::RenderFileUploadControl::updateFromElement): Used local variables a bit more in
2641         the old code. Added code that will call clear on the FileChooser and repaint if the DOM
2642         element has an empty value and the FileChooser does not.
2643
2644 2007-04-22  Grace Kloba  <klobag@gmail.com>
2645
2646         Reviewed by Hyatt.
2647
2648         Fixes: http://bugs.webkit.org/show_bug.cgi?id=12279
2649         Implemented two pass loading. Enabled by WTF_USE_LOW_BANDWIDTH_DISPLAY flag.
2650
2651         * dom/Document.cpp:
2652         (WebCore::Document::Document): initialize member variable m_inLowBandwidthDisplay
2653
2654         * dom/Document.h:
2655         (WebCore::Document::haveStylesheetsLoaded): while in low bandwidth display mode, ignore pending style sheets
2656         (WebCore::Document::setDocLoader):
2657         (WebCore::Document::inLowBandwidthDisplay):
2658         (WebCore::Document::setLowBandwidthDisplay):
2659         * html/HTMLTokenizer.cpp:
2660         (WebCore::HTMLTokenizer::scriptHandler): while in low bandwidth display mode, don't execute JavaScript
2661
2662         * loader/Cache.cpp:
2663         (WebCore::Cache::requestResource): while in low bandwidth display mode, don't let style sheet and JavaScript block
2664
2665         * loader/CachedCSSStyleSheet.cpp:
2666         (WebCore::CachedCSSStyleSheet::checkNotify): add notifyFinished() as client may need "this" pointer
2667
2668         * loader/DocLoader.h:
2669         (WebCore::DocLoader::replaceDocument):
2670         * loader/FrameLoader.cpp:
2671         (WebCore::FrameLoader::FrameLoader):
2672         (WebCore::FrameLoader::requestFrame): while in low bandwidth display mode, don't load sub-frame
2673         (WebCore::FrameLoader::stopLoading):
2674         (WebCore::FrameLoader::begin): set to low bandwidth display mode if the top frame is HTML document
2675         (WebCore::FrameLoader::write):
2676         (WebCore::FrameLoader::endIfNotLoading):
2677         (WebCore::FrameLoader::checkCompleted): while in low bandwidth display mode, don't set complete
2678         (WebCore::FrameLoader::requestObject): while in low bandwidth display mode, don't care Object
2679         (WebCore::FrameLoader::addLowBandwidthDisplayRequest):
2680         (WebCore::FrameLoader::removeAllLowbandwidthDisplayRequests):
2681         (WebCore::FrameLoader::notifyFinished):
2682         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady):
2683         * loader/FrameLoader.h:
2684         (WebCore::FrameLoader::FrameLoader::needToSwitchOutLowBandwidthDisplay):
2685         (WebCore::FrameLoader::FrameLoader::setUseLowBandwidthDisplay):
2686         (WebCore::FrameLoader::FrameLoader::useLowBandwidthDisplay):
2687
2688 2007-04-22  Darin Adler  <darin@apple.com>
2689
2690         Reviewed by Tim Hatcher.
2691
2692         - fix http://bugs.webkit.org/show_bug.cgi?id=13439
2693           4 problems found in dashboard-region parser and serializer
2694
2695         Test: fast/css/dashboard-region-parser.html
2696
2697         * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText):
2698         Fix code that overwrote each additional region with the previous one to
2699         instead build a space-separated list. Check for the case of an identifier
2700         that's invalid, since that's (accidentally) how we represent a region
2701         value that doesn't have explicit top/right/bottom/left values. The old code
2702         would end up writing out four spaces after the region type.
2703
2704         * css/cssparser.cpp: (WebCore::CSSParser::parseDashboardRegions):
2705         Fail to parse if there is something after the "none" identifier or after
2706         the arguments inside the dashboard-region "function". Also replaced code
2707         that produced a identifier with CSS_VAL_INVALID in a roundabout way with
2708         code that does it explicitly.
2709
2710 2007-04-22  Darin Adler  <darin@apple.com>
2711
2712         Reviewed by Adele.
2713
2714         - support for fix for <rdar://problem/5100240> REGRESSION: Control-O broken
2715
2716         * dom/KeyboardEvent.h: Include a vector of command names in the KeypressCommand object
2717         instead of a single command name.
2718
2719 2007-04-22  Alexey Proskuryakov  <ap@webkit.org>
2720
2721         Reviewed by Darin.
2722
2723         http://bugs.webkit.org/show_bug.cgi?id=13115
2724         REGRESSION: 1000% performance regression in DOM access by index, which was already slow
2725
2726         * dom/NodeList.h: Move cached data into a separate class, so it can be shared.
2727
2728         * dom/Node.h: Replace the set of registered NodeLists with a struct that also
2729         contains a shared NodeList::Caches (so the size of Node doesn't change).
2730
2731         * dom/NodeList.cpp:
2732         (WebCore::NodeList::NodeList):
2733         (WebCore::NodeList::~NodeList):
2734         (WebCore::NodeList::recursiveLength):
2735         (WebCore::NodeList::itemForwardsFromCurrent):
2736         (WebCore::NodeList::itemBackwardsFromCurrent):
2737         (WebCore::NodeList::recursiveItem):
2738         (WebCore::NodeList::itemWithName):
2739         (WebCore::NodeList::rootNodeChildrenChanged):
2740         (WebCore::NodeList::NodeListInfo::NodeListInfo):
2741         (WebCore::NodeList::NodeListInfo::reset):
2742         * dom/ChildNodeList.cpp:
2743         (WebCore::ChildNodeList::ChildNodeList):
2744         (WebCore::ChildNodeList::length):
2745         (WebCore::ChildNodeList::item):
2746         (WebCore::ChildNodeList::nodeMatches):
2747         * dom/ChildNodeList.h:
2748         * dom/Node.cpp:
2749         (WebCore::Node::childNodes):
2750         (WebCore::Node::registerNodeList):
2751         (WebCore::Node::unregisterNodeList):
2752         (WebCore::Node::notifyLocalNodeListsAttributeChanged):
2753         (WebCore::Node::notifyLocalNodeListsChildrenChanged):
2754         Adjust for the above changes.
2755
2756 2007-04-21  Mitz Pettel  <mitz@webkit.org>
2757
2758         Reviewed by Darin.
2759
2760         - fix http://bugs.webkit.org/show_bug.cgi?id=13391
2761           REGRESSION (r18819): Incomplete repaint of button text
2762
2763         Test: fast/repaint/control-clip.html
2764
2765         Ignore controls' lightweight clip in repaint rect computation for now.
2766
2767         * rendering/RenderBox.cpp:
2768         (WebCore::RenderBox::computeAbsoluteRepaintRect):
2769
2770 2007-04-21  Darin Adler  <darin@apple.com>
2771
2772         Reviewed by Adam.
2773
2774         - fix <rdar://problem/4816343> :-khtml-drag CSS pseudo-class changed to :-webkit-drag, need alias
2775
2776         * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType):
2777         Since Apple documentation claims "-khtml-drag" works, we need to keep it working,
2778         so add it back as an alias.
2779
2780 2007-04-21  Darin Adler  <darin@apple.com>
2781
2782         Reviewed by Oliver.
2783
2784         - fix <rdar://problem/4782422> REGRESSION: -[stringByEvaluatingJavaScriptFromString]
2785           returns an empty string instead of nil for non-string results
2786
2787         * page/mac/WebCoreFrameBridge.mm:
2788         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2789         Added a call to nsStringNilIfEmpty to restore the old behavior. It might be nice to
2790         distinguish the empty string from a non-string result, but there's no obvious way
2791         to do that, and for compatibility it's probably best to just restore the old
2792         behavior instead.
2793
2794 2007-04-21  David Hyatt  <hyatt@apple.com>
2795
2796         Fix for bug 13432, determineFlowSpacing is O(n^2).
2797
2798         Reviewed by aroben
2799
2800         * rendering/InlineBox.cpp:
2801         (WebCore::InlineBox::nextOnLineExists):
2802         (WebCore::InlineBox::prevOnLineExists):
2803         * rendering/InlineBox.h:
2804         (WebCore::InlineBox::InlineBox):
2805
2806 2007-04-21  Lamar Goddard <lamargoddard@gmail.com>
2807
2808         Reviewed by Darin.
2809
2810         Fix for http://bugs.webkit.org/show_bug.cgi?id=5262
2811         <rdar://problem/5018778>
2812         XMLSerializer drops Namespace information
2813
2814         Updated WebCore::markup to output namespace information for elements/attributes whose namespace information
2815         doesn't appear in its scope in the output.
2816
2817         Added test case: fast/dom/serialize-nodes.xhtml
2818
2819         * WebCore/editing/markup.cpp:
2820         (WebCore::createMarkup(const Node*, ...)): Changed call to WebCore::markup to match parameters
2821         (WebCore::markup): Changed recursive call to match tree structure, removed ASSERT and no longer needed includeSiblings parameter.
2822         (WebCore::startMarkup): Added optional parameter to track namespaces in the current scope.
2823         (WebCore::addNamespace): Function to add namespace information to markup.
2824         (WebCore::shouldAddNamespaceAttr):
2825         (WebCore::shouldAddNamespaceElem): Functions that test whether namespace information should be added for a given node.
2826         * WebCore/dom/Document.idl:
2827         (createElementNS):
2828         (createAttributeNS):
2829         (getElementsByTagNameNS): Added [ConvertNullToNullString] to namespaceURI parameter.
2830         * WebCore/dom/Node.cpp:
2831         (Node::getElementsByTagNameNS): removed test for namespaceURI being null as null can be a valid namespace.
2832
2833 2007-04-21  Alexey Proskuryakov  <ap@webkit.org>
2834
2835         Reviewed by Darin.
2836
2837         http://bugs.webkit.org/show_bug.cgi?id=13300
2838         Reproducible crash opening anekdot.ru
2839
2840         * html/HTMLParser.cpp:
2841         (WebCore::HTMLParser::HTMLParser):
2842         (WebCore::HTMLParser::getNode):
2843         (WebCore::HTMLParser::handleIsindex):
2844         * html/HTMLParser.h:
2845         Made HTMLParser::form a RefPtr, and renamed it to m_currentFormElement.
2846         Made m_currentMapElement a RefPtr.
2847
2848 2007-04-21  Mitz Pettel  <mitz@webkit.org>
2849
2850         Reviewed by Darin.
2851
2852         - fix http://bugs.webkit.org/show_bug.cgi?id=13353
2853           REGRESSION (r20754-20766): Textarea does not resize when scrollbar is present
2854
2855         Test: fast/overflow/hit-test-overflow-controls.html
2856
2857         * page/EventHandler.cpp:
2858         (WebCore::EventHandler::handleMouseMoveEvent): Avoid activating scrollbars
2859         during layer resize.
2860         * rendering/RenderBlock.cpp:
2861         (WebCore::RenderBlock::isPointInOverflowControl): Renamed isPointInScrollbar
2862         to this, to reflect that it returns true for points in the resize corner
2863         as well. Changed it to call the layer to do the actual work.
2864         (WebCore::RenderBlock::nodeAtPoint): Updated for the above rename.
2865         * rendering/RenderBlock.h:
2866         * rendering/RenderLayer.cpp:
2867         (WebCore::RenderLayer::horizontalScrollbarWidget): Fixed typo in this function's
2868         name (it was horizontaScrollbarWidget).
2869         (WebCore::RenderLayer::hitTestOverflowControls): Added. Returns whether the
2870         hit point is in one of the scrollbars or the resize corner, and updates the
2871         platform scrollbar in the hit test result if a scrollbar was hit.
2872         * rendering/RenderLayer.h:
2873         * rendering/RenderListBox.cpp:
2874         (WebCore::RenderListBox::isPointInOverflowControl): Rename.
2875         * rendering/RenderListBox.h:
2876
2877 2007-04-21  Mitz Pettel  <mitz@webkit.org>
2878
2879         Reviewed by Darin.
2880
2881         - fix http://bugs.webkit.org/show_bug.cgi?id=13417
2882           Repro crash when the first argument to getMatchedCSSRules is not an element
2883
2884         Test: fast/dom/Window/getMatchedCSSRules-null-crash.html
2885
2886         * css/cssstyleselector.cpp:
2887         (WebCore::CSSStyleSelector::styleRulesForElement): Added null check.
2888
2889 2007-04-21  Mitz Pettel  <mitz@webkit.org>
2890
2891         Reviewed by Darin.
2892
2893         - fix http://bugs.webkit.org/show_bug.cgi?id=13416
2894           Repro crash after referencing the user stylesheet from JavaScript
2895
2896         No test included because DumpRenderTree does not support setting the user stylesheet.
2897
2898         * css/cssstyleselector.cpp:
2899         (WebCore::CSSStyleSelector::CSSStyleSelector):
2900         (WebCore::CSSStyleSelector::~CSSStyleSelector):
2901         * css/cssstyleselector.h: Made m_userSheet a RefPtr.
2902
2903 2007-04-21  MorganL  <morganl.webkit@yahoo.com>
2904
2905         Reviewed by Adam.
2906
2907         NPObject should be forward declared using 'struct' instead of 'class'
2908
2909         * page/Frame.h:
2910
2911 2007-04-21  Alp Toker  <alp@atoker.com>
2912
2913         Gdk build fix.
2914
2915         * platform/gdk/FontPlatformDataGdk.cpp:
2916         (WebCore::FontPlatformData::FontPlatformData): Use the correct casts.
2917
2918 2007-04-20  Brady Eidson  <beidson@apple.com>
2919
2920         Reviewed by Oliver (Black Sheep)
2921
2922         <rdar://problem/3559794>
2923         [WebView setMaintainsBackForwardList:] doesn't actually flush out the current page caches
2924
2925         * WebCore.exp:
2926         * history/BackForwardList.cpp:
2927         (WebCore::BackForwardList::BackForwardList): Set the flag to true by default
2928         (WebCore::BackForwardList::addItem): Check the flag and bail if its false
2929         (WebCore::BackForwardList::setCapacity): More correct if it set the m_current to 
2930           NoCurrentItemIndex if we're setting capacity to 0
2931         (WebCore::BackForwardList::enabled): 
2932         (WebCore::BackForwardList::setEnabled): If we're disabling, cycle capacity to 0 and 
2933           back to flush things out
2934         * history/BackForwardList.h: Add enabled(), setEnabled(bool), and m_enabled
2935
2936 2007-04-20  David Hyatt  <hyatt@apple.com>
2937
2938         Bug 13424, firstLineStyle and verticalPositionHint together take
2939         33% of the time on the new tag nesting PLT.  Don't waste time even
2940         looking for first-line styles if no stylesheet used them.
2941
2942         Reviewed by beth
2943
2944         * css/CSSGrammar.y:
2945         * dom/Document.cpp:
2946         (WebCore::Document::Document):
2947         * dom/Document.h:
2948         (WebCore::Document::usesFirstLineRules):
2949         (WebCore::Document::setUsesFirstLineRules):
2950         * rendering/RenderObject.cpp:
2951         (WebCore::RenderObject::verticalPositionHint):
2952         (WebCore::RenderObject::firstLineStyle):
2953
2954 2007-04-20  Peter Kasting  <pkasting@google.com>
2955
2956         Reviewed by Oliver.
2957
2958         - fix http://bugs.webkit.org/show_bug.cgi?id=13420
2959
2960         * platform/TextEncodingRegistry.cpp:
2961         (WebCore::addToTextEncodingNameMap): Change a pointer comparison to a
2962         strcmp(), since the strings here are not necessarily
2963         pointer-equivalent.
2964
2965 2007-04-20  Darin Adler  <darin@apple.com>
2966
2967         Reviewed by Geoff Garen and John Sullivan.
2968
2969         - fix <rdar://problem/4671964> document property on <iframe> elements causes problems for SAP application
2970
2971         Test: fast/dom/iframe-document.html
2972
2973         * bindings/js/kjs_html.h: Removed IFrameDocument.
2974         * bindings/js/kjs_html.cpp: (KJS::JSHTMLElement::iFrameGetter): Ditto.
2975
2976 2007-04-19  Alp Toker  <alp@atoker.com>
2977
2978         Reviewed by Mark.
2979
2980         * platform/gdk/FontGdk.cpp:
2981         (WebCore::Font::drawGlyphs):
2982         * platform/gdk/FontPlatformDataGdk.cpp:
2983         (WebCore::FontPlatformData::FontPlatformData): Fix font support in Gdk port.
2984
2985 2007-04-19  David Hyatt  <hyatt@apple.com>
2986
2987         Fix for bug 13208, implement word-break.  This patch produces a partial
2988         implementation of word-break.  word-break: break-all is implemented.  In
2989         addition, a custom value, word-break: break-word is added that is a hybrid
2990         of word-wrap: break-word and word-break: break-all (and more useful than
2991         either).
2992
2993         Reviewed by beth
2994
2995         Added fast/text/word-break.html
2996
2997         * css/CSSComputedStyleDeclaration.cpp:
2998         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2999         * css/CSSPropertyNames.in:
3000         * css/CSSValueKeywords.in:
3001         * css/cssparser.cpp:
3002         (WebCore::CSSParser::parseValue):
3003         * css/cssstyleselector.cpp:
3004         (WebCore::CSSStyleSelector::applyProperty):
3005         * rendering/RenderStyle.cpp:
3006         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3007         (WebCore::StyleRareInheritedData::operator==):
3008         (WebCore::RenderStyle::diff):
3009         * rendering/RenderStyle.h:
3010         (WebCore::):
3011         (WebCore::RenderStyle::breakWords):
3012         (WebCore::RenderStyle::wordBreak):
3013         (WebCore::RenderStyle::setWordBreak):
3014         (WebCore::RenderStyle::initialWordBreak):
3015         (WebCore::RenderStyle::initialWordWrap):
3016         * rendering/RenderText.cpp:
3017         (WebCore::RenderText::calcMinMaxWidthInternal):
3018         * rendering/RenderTextControl.cpp:
3019         (WebCore::RenderTextControl::createInnerTextStyle):
3020         (WebCore::RenderTextControl::calcHeight):
3021         * rendering/bidi.cpp:
3022         (WebCore::RenderBlock::findNextLineBreak):
3023
3024 2007-04-20  Mark Rowe  <mrowe@apple.com>
3025
3026         Qt build fix for FreeBSD.
3027
3028         * WebCore.pro: FreeBSD needs HAVE_PTHREAD_NP_H defined.
3029
3030 2007-04-19  Mitz Pettel  <mitz@webkit.org>
3031
3032         Reviewed by Darin.
3033
3034         - fix http://bugs.webkit.org/show_bug.cgi?id=13403
3035           REGRESSION (r18875-r18899): Can no longer type into search form field after searching and then clicking "back"
3036
3037         The problem was that the page was loaded from the page cache with a subtree
3038         marked for layout and the layout timer stopped (having been stopped when the
3039         page entered the page cache). FrameView::needsLayout() was returning false
3040         which prevented the pending layout from completing.
3041
3042         * page/FrameView.cpp:
3043         (WebCore::FrameView::clear): Removed the call to stop the layout timer, since
3044         reset() does that already.
3045         (WebCore::FrameView::needsLayout): Changed to return true if there's a subtree
3046         pending relayout.
3047
3048 2007-04-19  Justin Garcia  <justin.garcia@apple.com>
3049
3050         Reviewed by harrison
3051         
3052         <rdar://problem/5144139> 
3053         On delete, <BR> inserted into non-editable ToDo <TABLE> element
3054         
3055         The fact that the br was being inserted at a bad position 
3056         (a non-editable position and one inside a table instead of 
3057         before it) was fixed in the previous checkin. This change 
3058         stops us from inserting a br at all, to fix the bug.
3059         
3060         After a delete, we need a placeholder if the selection
3061         started at the start of a paragraph and ended at the end 
3062         of a paragraph. But not if it starts just before a table 
3063         and ends inside that table.  We need placeholders to hold 
3064         open emptied out table cells, but that is handled separately.
3065         
3066         Also, moved lineBreakExistsAtPosition to htmlediting.cpp 
3067         so that it can be used in more places.
3068
3069         * editing/CompositeEditCommand.cpp:
3070         (WebCore::CompositeEditCommand::removePlaceholderAt):
3071         (WebCore::CompositeEditCommand::moveParagraphs):
3072         * editing/DeleteSelectionCommand.cpp:
3073         (WebCore::DeleteSelectionCommand::doApply):
3074         * editing/InsertLineBreakCommand.cpp:
3075         * editing/InsertParagraphSeparatorCommand.cpp:
3076         (WebCore::InsertParagraphSeparatorCommand::doApply):
3077         * editing/htmlediting.cpp:
3078         (WebCore::lineBreakExistsAtPosition):
3079         * editing/htmlediting.h:
3080
3081 2007-04-19  Justin Garcia  <justin.garcia@apple.com>
3082
3083         Reviewed by harrison
3084         
3085         Fixes some issues found while investigating:
3086         <rdar://problem/5144139> On delete, <BR> inserted into non-editable ToDo <TABLE> element
3087         
3088         Move the code to handle inserting content before/after
3089         tables for [table, 0/max] to insertNodeAt, so that
3090         all insertions get it, not just some.
3091         Changed insertNodeAt to take in a position instead of a
3092         node and an offset.
3093
3094         * editing/CompositeEditCommand.cpp:
3095         (WebCore::CompositeEditCommand::insertNodeAt):
3096         (WebCore::CompositeEditCommand::insertNodeAtTabSpanPosition):
3097         (WebCore::CompositeEditCommand::insertBlockPlaceholder):
3098         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
3099         If paragrahStart.node() is an atomic node, insertNodeAt can handle
3100         insertion, we don't need to special case it.
3101         (WebCore::CompositeEditCommand::moveParagraphs):
3102         (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
3103         * editing/CompositeEditCommand.h:
3104         * editing/DeleteSelectionCommand.cpp:
3105         (WebCore::DeleteSelectionCommand::mergeParagraphs):
3106         (WebCore::DeleteSelectionCommand::doApply):
3107         * editing/FormatBlockCommand.cpp:
3108         (WebCore::FormatBlockCommand::doApply):
3109         * editing/IndentOutdentCommand.cpp:
3110         (WebCore::IndentOutdentCommand::indentRegion):
3111         (WebCore::IndentOutdentCommand::outdentParagraph):
3112         * editing/InsertLineBreakCommand.cpp:
3113         (WebCore::InsertLineBreakCommand::doApply):
3114         * editing/InsertListCommand.cpp:
3115         (WebCore::InsertListCommand::doApply):
3116         * editing/InsertParagraphSeparatorCommand.cpp:
3117         (WebCore::InsertParagraphSeparatorCommand::doApply):
3118         * editing/InsertTextCommand.cpp:
3119         (WebCore::InsertTextCommand::prepareForTextInsertion): Removed some
3120         dead code that handled insertion at non-editable positions.
3121         (WebCore::InsertTextCommand::insertTab):
3122         * editing/ReplaceSelectionCommand.cpp:
3123         (WebCore::ReplaceSelectionCommand::doApply):
3124         (WebCore::ReplaceSelectionCommand::insertNodeAtAndUpdateNodesInserted):
3125         * editing/ReplaceSelectionCommand.h:
3126
3127 2007-04-19  Mitz Pettel  <mitz@webkit.org>
3128
3129         Reviewed by Darin.
3130
3131         - fix http://bugs.webkit.org/show_bug.cgi?id=13336
3132           REGRESSION (r20646): editing/execCommand/hilitecolor.html crashes under guardMalloc
3133
3134         Avoid calling selectionRect() and selectionGapRects() on a renderer that needs
3135         layout.
3136
3137         * rendering/RenderBlock.cpp:
3138         (WebCore::RenderBlock::selectionGapRects):
3139         * rendering/RenderBlock.h:
3140         (WebCore::RenderBlock::BlockSelectionInfo::BlockSelectionInfo):
3141         * rendering/RenderListMarker.cpp:
3142         (WebCore::RenderListMarker::selectionRect):
3143         * rendering/RenderObject.h:
3144         (WebCore::RenderObject::SelectionInfo::SelectionInfo):
3145         * rendering/RenderReplaced.cpp:
3146         (WebCore::RenderReplaced::selectionRect):
3147         * rendering/RenderText.cpp:
3148         (WebCore::RenderText::selectionRect):
3149
3150 2007-04-19  Justin Garcia  <justin.garcia@apple.com>
3151
3152         Reviewed by darin
3153
3154         <rdar://problem/5142012> 
3155         GoogleDocs: Crash at WebCore::Range::startPosition() when creating a list from a link
3156         
3157         List creation uses moveParagraphs to push content into list items.
3158         Its fragment creation (using createMarkup) incorrectly uses regular
3159         spaces instead of nbsps for spaces that were rendered (11475), which 
3160         causes spaces to be collapsed during the move operation.  This results 
3161         in a call to rangeFromLocationAndLength with a location past the end
3162         of the document.  We use the result from rangeFromLocationAndLength
3163         (null) and crash.
3164         
3165         Also when moveParagraphs tries to push content into a list item surrounded
3166         by an anchor, it fails because positionAvoidingSpecialElementBoundary avoids 
3167         the anchor, which also avoids the list item.  This was fixed by pushing
3168         down anchors before avoiding them.
3169         
3170         * editing/CompositeEditCommand.cpp:
3171         (WebCore::CompositeEditCommand::pushAnchorElementDown): Remove the
3172         old anchor after we push down clones of it, this is what callers
3173         expect.
3174         (WebCore::CompositeEditCommand::pushPartiallySelectedAnchorElementsDown):
3175         Call the new enclosingAnchorElement, that takes in a position instead
3176         of a node.
3177         (WebCore::CompositeEditCommand::moveParagraphs): If spaces collapsed
3178         as a result of the move, rangeFromLocationAndLength can return null,
3179         bail and don't try to preserve the selection in that case.
3180         (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
3181         Moved from htmlediting.cpp.
3182         Make sure anchors are pushed down before avoiding them so that we don't
3183         also avoid structural elements like lists and blocks.
3184         * editing/CompositeEditCommand.h:
3185         * editing/TypingCommand.cpp: Moved isFirst/LastPositionBefore/AfterTable
3186         to htmlediting.cpp.
3187         * editing/htmlediting.cpp:
3188         Moved positionAvoidingSpecialElementBoundary so that it could call
3189         pushAnchorElementDown.
3190         (WebCore::isFirstPositionAfterTable): Moved here.
3191         (WebCore::isLastPositionBeforeTable): Moved here.
3192         (WebCore::enclosingAnchorElement): Moved here.
3193         (WebCore::enclosingListChild): Removed an extraneous space.
3194         * editing/htmlediting.h:
3195
3196 2007-04-19  Beth Dakin  <bdakin@apple.com>
3197
3198         Reviewed by Hyatt.
3199
3200         Fix for <rdar://problem/5120889> Sized table cells w/borders not 
3201         drawn to correct size
3202
3203         When table cells have children with %-height, the cells were 
3204         incorrectly shrinking down to be the size of the child. This 
3205         exposed another problem with replaced children and sizing.
3206
3207         * rendering/RenderBox.cpp:
3208         (WebCore::RenderBox::calcReplacedHeightUsing): The exposed problem. 
3209         Subtract our borders and padding in the auto or percent table cell 
3210         containing block case.
3211         * rendering/RenderTableSection.cpp:
3212         (WebCore::RenderTableSection::layoutRows): When our children can 
3213         flex, do not always set the cellTopExtra and cellBottomExtra to 0! 
3214         That is bad! We should do the same as the non-flex case.
3215
3216 2007-04-19  Anders Carlsson  <andersca@apple.com>
3217
3218         Reviewed by Geoff.
3219
3220         http://bugs.webkit.org/show_bug.cgi?id=13333
3221         Support naturalWidth/naturalHeight on image elements
3222
3223         * html/HTMLImageElement.cpp:
3224         (WebCore::HTMLImageElement::naturalWidth):
3225         (WebCore::HTMLImageElement::naturalHeight):
3226         * html/HTMLImageElement.h:
3227         * html/HTMLImageElement.idl:
3228
3229 2007-04-19  Patti Hoa  <patti@apple.com>
3230
3231         Reviewed by Darin.
3232         - review suggestion for rdar://5145011 code change
3233         
3234         * bridge/mac/WebCoreAXObject.mm:
3235         (-[WebCoreAXObject value]):
3236         return early if value attribute is not supported by the attachment view.
3237
3238 2007-04-19  Patti Hoa  <patti@apple.com>
3239
3240         Reviewed by Darin.
3241
3242         <rdar://problem/5145011> Allow attachment view of web object to handle accessibility actions
3243         
3244         * bridge/mac/WebCoreAXObject.mm:
3245         (-[WebCoreAXObject value]):
3246         Only allow asking the attachmentView for value if attachmentView supports this value attribute 
3247         (-[WebCoreAXObject title]):
3248         (-[WebCoreAXObject accessibilityAttributeNames]):
3249         Should not return that long list of unrelated attributes for attachmentView.
3250         (-[WebCoreAXObject accessibilityActionNames]):
3251         (-[WebCoreAXObject accessibilityPerformAction:]):
3252         Allow attachmentView a chance to handle actions.
3253         (-[WebCoreAXObject accessibilityParameterizedAttributeNames]):
3254         Should not return that long list of unrelated attributes for attachmentView.
3255         
3256 2007-04-19  Mitz Pettel  <mitz@webkit.org>
3257
3258         Reviewed by Hyatt.
3259
3260         - fix http://bugs.webkit.org/show_bug.cgi?id=13291
3261           REGRESSION (r19595): WebViewDidBeginEditingNotification not posted when focusing with the mouse
3262
3263         Covered by editing tests.
3264
3265         * dom/Document.cpp:
3266         (WebCore::Document::setFocusedNode): Moved the call to Editor::didBeginEditing()
3267         back into here.
3268         * dom/Element.cpp:
3269         (WebCore::Element::updateFocusAppearance): Removed the call to didBeginEditing().
3270         * html/HTMLInputElement.cpp:
3271         (WebCore::HTMLInputElement::updateFocusAppearance): Ditto.
3272
3273 2007-04-19  Sam Weinig  <sam@webkit.org>
3274
3275         Reviewed by Darin.
3276
3277         - Patch for http://bugs.webkit.org/show_bug.cgi?id=12249
3278           FCKeditor: <hr>, <ul> and <ol> have id="undefined"
3279
3280         Convert undefined and null to a null string for third argument of
3281         execCommand(); 
3282
3283         Test: editing/execCommand/arguments-combinations.html
3284
3285         * WebCore.xcodeproj/project.pbxproj:
3286         * bindings/js/kjs_binding.cpp:
3287         (KJS::valueToStringWithUndefinedOrNullCheck):
3288         * bindings/js/kjs_binding.h:
3289         * bindings/scripts/CodeGeneratorJS.pm:
3290         * dom/Document.idl:
3291
3292 2007-04-19  Alp Toker  <alp@atoker.com>
3293
3294         Reviewed by hyatt.
3295
3296         * WebCoreSources.bkl: Remove obsolete source file from build.
3297
3298 2007-04-18  Alp Toker  <alp@atoker.com>
3299
3300         Gdk build fix.  Reviewed by Sam Weinig.
3301
3302         Track changes to make GdkLauncher work again.
3303
3304         * WebCoreSources.bkl:
3305         * platform/gdk/ChromeClientGdk.h:
3306         * platform/gdk/TemporaryLinkStubs.cpp:
3307         (ChromeClientGdk::createWindow):
3308         (ChromeClientGdk::createModalDialog):
3309         (Editor::markBadGrammar):
3310
3311 2007-04-17  Brady Eidson  <beidson@apple.com>
3312
3313         Reviewed by Tim
3314
3315         <rdar://problem/5008925>
3316         Expose the NSURLConnection delegate willCacheResponse API to WebResourceLoadDelegate
3317
3318         * WebCore.xcodeproj/project.pbxproj: Added ResourceLoaderMac.mm
3319
3320         * loader/FrameLoaderClient.h: Add the willCacheResponse SPI for WebKit to implement
3321
3322         * loader/ResourceLoader.h:
3323         * loader/mac/ResourceLoaderMac.mm: Added.
3324         (WebCore::ResourceLoader::willCacheResponse): Return the new cachedResponse from the client
3325
3326         * platform/graphics/svg/SVGImageEmptyClients.h:
3327         (WebCore::SVGEmptyFrameLoaderClient::willCacheResponse): Stub
3328
3329         * platform/network/ResourceHandleClient.h:
3330         (WebCore::ResourceHandleClient::willCacheResponse):  Return the new cachedResponse from the client
3331
3332         * platform/network/mac/ResourceHandleMac.mm:
3333         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]): Call to get the new 
3334           cachedURLResponse before calling for the cache policy
3335
3336 2007-04-18  Darin Adler  <darin@apple.com>
3337
3338         Reviewed by Hyatt.
3339
3340         - fix http://bugs.webkit.org/show_bug.cgi?id=13375
3341           REGRESSION (r20901): failing fast/overflow/scrollRevealButton.html
3342
3343         * dom/Document.cpp: (WebCore::Document::updateLayout):
3344         If we have a parent frame, update its layout too.
3345
3346 2007-04-18  Alp Toker  <alp@atoker.com>
3347
3348         Gdk build fix.  Reviewed by Mark.
3349
3350         * loader/gdk/FrameLoaderClientGdk.cpp:
3351         (WebCore::FrameLoaderClientGdk::loadedFromCachedPage):
3352         (WebCore::FrameLoaderClientGdk::setDocumentViewFromCachedPage):
3353         (WebCore::FrameLoaderClientGdk::saveDocumentViewToCachedPage):
3354         * loader/gdk/FrameLoaderClientGdk.h:
3355         * platform/gdk/TemporaryLinkStubs.cpp:
3356         (CachedPage::close): Track PageCache to CachedPage refactoring.
3357
3358 2007-04-17  Mitz Pettel  <mitz@webkit.org>
3359
3360         Reviewed by Darin.
3361
3362         - fix http://bugs.webkit.org/show_bug.cgi?id=13369
3363           REGRESSION (r13366): Invisible table cell background is painted
3364
3365         Test: fast/table/invisible-cell-background.html
3366
3367         * rendering/RenderTableCell.cpp:
3368         (WebCore::RenderTableCell::paintBackgroundsBehindCell): Don't paint any
3369         background if the cell is not visible. This behavior matches WinIE and Opera.
3370
3371 2007-04-17  Justin Garcia  <justin.garcia@apple.com>
3372
3373         Reviewed by harrison
3374
3375         <rdar://problem/5119244> 
3376         Crash when indenting a selected ToDo
3377         
3378         indentRegion() was using the old (incorrect) editable root 
3379         getter, which returned null for a valid, editable position, 
3380         causing the crash.
3381
3382         * editing/IndentOutdentCommand.cpp:
3383         (WebCore::IndentOutdentCommand::indentRegion):
3384         The editable root for a position is editableRootForPosition(p),
3385         not p.node()->rootEditableElement(), because of VisiblePositions 
3386         before/after tables, replaced elements and others.
3387
3388 2007-04-17  Justin Garcia  <justin.garcia@apple.com>
3389
3390         Reviewed by hyatt
3391
3392         <rdar://problem/5138441> 
3393         GoogleDocs: Indented text looks like text that's been Quoted
3394         
3395         GoogleDocs uses FormatBlock, blockquotes and a style rule
3396         for blockquotes to implement a "Quote Text" feature.  Styles
3397         intended only for those blockquotes were added to the 
3398         blockquotes that we use for indenting.
3399
3400         * css/html4.css: Removed the webkit-indent-blockquote class rule.
3401         * editing/IndentOutdentCommand.cpp:
3402         (WebCore::createIndentBlockquoteElement): Use custom margins
3403         and turn off border and padding to override author rules for
3404         blockquotes.
3405
3406 2007-04-17  Justin Garcia  <justin.garcia@apple.com>
3407
3408         Reviewed by darin
3409
3410         <rdar://problem/5136770> 
3411         Gmail Editor: Hang when turning a particular multi-line selection into a list
3412         
3413         When InsertListCommand pushes content into list items, 
3414         it creates an empty list item and then calls moveParagraphs.  
3415         But moveParagraphs' selection preservation code fails when 
3416         it encounters empty list items (list items w/o placeholders).
3417         This causes InsertListCommand to lose track of where it has 
3418         already been performed, which causes the hang.
3419
3420         * editing/InsertListCommand.cpp:
3421         (WebCore::InsertListCommand::doApply): Use brs to hold open 
3422         empty list items.
3423
3424 2007-04-17  Darin Adler  <darin@apple.com>
3425
3426         Oops, rolled that last change out. I'll redo it again later after making
3427         som additional refinments.
3428
3429 2007-04-17  Darin Adler  <darin@apple.com>
3430
3431         Reviewed by Brady.
3432
3433         - a few baby steps to try to make lockHistory and userGesture less confusing
3434
3435         * page/FrameLoadRequest.h:
3436         (WebCore::FrameLoadRequest::FrameLoadRequest): Add initialization of m_isUserGesture
3437         to true.
3438         (WebCore::FrameLoadRequest::shouldLockHistory): Renamed from lockHistory to avoid having
3439         a getter that sounds like a verb phrase.
3440         (WebCore::FrameLoadRequest::setShouldLockHistory): Ditto.
3441         (WebCore::FrameLoadRequest::isUserGesture): Added.
3442         (WebCore::FrameLoadRequest::setIsUserGesture): Ditto.
3443
3444         * loader/FrameLoader.h: Remove userGesture parameter from load that takes
3445         FrameLoadRequest. Remove default values for lockHistory and userGesture parameters,
3446         since that just makes it more likely we'll forget to pass them in. Remove one of
3447         the overloads of urlSelected, since it's only called one place.
3448
3449         * loader/FrameLoader.cpp:
3450         (WebCore::FrameLoader::createWindow): Remove userGesture parameter, relying on
3451         the true default in FrameLoadRequest.
3452         (WebCore::FrameLoader::urlSelected): Call setShouldLockHistory and setIsUserGesture
3453         on the FrameLoadRequest, and call load directly; also eliminate the other urlSelected
3454         overload since this was the only place it was called.
3455         (WebCore::FrameLoader::load): Remove userGesture parameter, relying on the true
3456         default in FrameLoadRequest. In the other overload, clean up logic to eliminate the
3457         argsReferrer variable and get rid of the userGesture parameter, using the value from
3458         FrameLoadRequest.
3459         (WebCore::FrameLoader::submitForm): Remove userGesture parameter, relying on the value
3460         in the FrameLoadRequest. This actually changes behavior.
3461
3462         * bindings/js/kjs_html.cpp: (KJS::JSHTMLDocument::putValueProperty): Pass
3463         false for userGesture explicitly instead of relying on default argument.
3464
3465         * page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected):
3466         Remove userGesture parameter, relying on the true default in FrameLoadRequest.
3467
3468 2007-04-16  David Kilzer  <ddkilzer@webkit.org>
3469
3470         Reviewed by NOBODY (fixed misspelling).
3471
3472         * manual-tests/containing-block-position-chage.html: Removed.
3473         * manual-tests/containing-block-position-change.html: Added.
3474
3475 2007-04-16  Justin Garcia  <justin.garcia@apple.com>
3476
3477         Reviewed by darin
3478
3479         <rdar://problem/5134759> 
3480         GMail Editor: Hang after pasting underlined text multiple times
3481         
3482         The moveParagraphs call that ReplaceSelectionCommand
3483         performs must receive only inline content from createMarkup, 
3484         or else it will result in another call to moveParagraphs 
3485         when it performs the move, resulting in infinite recursion.
3486
3487         * editing/markup.cpp:
3488         (WebCore::startMarkup): We were only converting a block to
3489         an inline if it had an inline style declaration or styles 
3490         coming from matched rules.  Cleaned up this code a bit by 
3491         handling an element's style separately from its other 
3492         attributes.
3493
3494 2007-04-16  Darin Adler  <darin@apple.com>
3495
3496         - get layout tests going again
3497
3498         * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry):
3499         Replace assertion with a runtime check. We can consider changing it back to
3500         an assertion some day, but it's not important.
3501
3502 2007-04-16  Darin Adler  <darin@apple.com>
3503
3504         Reviewed by John Sullivan.
3505
3506         - fix http://bugs.webkit.org/show_bug.cgi?id=13303
3507           <rdar://problem/5126341> REGRESSION: controls in a background Safari window
3508           maintain active appearance if the address bar has focus (13303)
3509
3510         - fix a related problem where elements could look focused in non-active windows
3511
3512         - simplify secure keyboard entry logic in Frame::setIsActive
3513
3514         * WebCore.exp: Add two new symbols for use by WebKit.
3515
3516         * html/HTMLInputElement.cpp:
3517         (WebCore::HTMLInputElement::dispatchFocusEvent): Call setUseSecureKeyboardEntryWhenActive
3518         rather than calling setSecureKeyboardEntry directly -- does nothing if the frame is not active.
3519         (WebCore::HTMLInputElement::dispatchBlurEvent): Ditto.
3520
3521         * page/Frame.cpp:
3522         (WebCore::Frame::setUseSecureKeyboardEntryWhenActive): Added. Calls
3523         setUseSecureKeyboardEntry only if the frame is active, but also stores away the state,
3524         so that the setIsActive function doesn't have to recompute it.
3525         (WebCore::Frame::setIsActive): Rewrote all the comments in the function. Removed the code
3526         to manage control tints, which are not based on the whether the frame is active but rather
3527         on AppKit's concept of whether the window should have "key appearance". Simplified the
3528         logic about when to call setUseSecureKeyboardEntry by using the value of
3529         m_useSecure