f245458158f0f23a40bb891b6edfca8330f82ec1
[WebKit-https.git] / WebCore / ChangeLog
1 2007-05-11  Brady Eidson  <beidson@apple.com>
2
3         Reviewed by Darin and Geoff
4
5         Fix for http://bugs.webkit.org/show_bug.cgi?id=13630
6         and
7         <rdar://problem/4873628>
8
9         Back/Forward cache should work with pages with login fields.
10
11         First change is to relocate the "useSecureKeyboardEntry" flag to the document.  This lets
12         it persist through page cache transitions and it is truly a per-document concept more than
13         per-frame anyways since its the document that has a password field, not the frame.
14
15         Second change is to introduce the concept of an Element getting a "didRestoreFromCache()" callback.
16         The idea is for elements to register with the document if they need work to be done when the
17         page comes out of the back/forward cache.  Currently the only client of this service is 
18         HTMLInputElements that are input type == PASSWORD.  Such an element's implementation for this
19         method is to call reset()
20
21         Finally, after a page is restored from the cache we have the document send the didRestoreFromCache()
22         callback to its registered Elements.  The whole design is to clear the password fields after 
23         restoring the page instead of when caching the page because we want to defer work for the common
24         case - there shouldn't be extra work here just to navigate away from a page when the common case
25         is that you'll never go back!
26
27         No layout tests possible until http://bugs.webkit.org/show_bug.cgi?id=13672 is resolved
28
29         * dom/Document.cpp:
30         (WebCore::Document::Document):
31         (WebCore::Document::registerForDidRestoreFromCacheCallback): Add an Element to the special page-restoration callback list
32         (WebCore::Document::unregisterForDidRestoreFromCacheCallback): Remove such an element
33         (WebCore::Document::didRestoreFromCache): Called by FrameLoader - dispatch to all the registered elements
34         (WebCore::Document::setUseSecureKeyboardEntryWhenActive): Set the local flag and call updateSecureKeyboardEntryIfActive
35           on the Frame
36         (WebCore::Document::useSecureKeyboardEntryWhenActive): Return the flag
37
38         * dom/Document.h:
39         (WebCore::Document::unregisterFormElementWithState): Renamed
40
41         * dom/Element.h:
42         (WebCore::Element::didRestoreFromCache): Added virtual base method
43
44         * html/HTMLInputElement.cpp:
45         (WebCore::HTMLInputElement::~HTMLInputElement): Deregister from the document if inputType == PASSWORD
46         (WebCore::HTMLInputElement::dispatchFocusEvent): Set the flag on the document, not the frame
47         (WebCore::HTMLInputElement::dispatchBlurEvent): Ditto
48         (WebCore::HTMLInputElement::setInputType): If changing to/from PASSWORD, register/deregister in the document accordingly
49         (WebCore::HTMLInputElement::attach): Call registerForDidRestoreFromCacheCallback(this) instead of passwordFieldAdded()
50         (WebCore::HTMLInputElement::didRestoreFromCache): Call reset();
51         * html/HTMLInputElement.h:
52
53         * html/HTMLSelectElement.cpp:
54         (WebCore::HTMLSelectElement::~HTMLSelectElement): Renamed deregisterFormElementWithState to unregisterFormElementWithState
55         * html/HTMLTextAreaElement.cpp:
56         (WebCore::HTMLTextAreaElement::~HTMLTextAreaElement): Ditto
57
58         * loader/FrameLoader.cpp:
59         (WebCore::FrameLoader::canCachePage): Remove the check for password fields - they're allowed now!
60         (WebCore::FrameLoader::opened): Tell the document to dispatch to the registered elements
61         (WebCore::FrameLoader::saveDocumentState): Remove the check for password fields.  Turns out that when we grab a copy a the
62           form state we're only copying the state of form elements that are registered with the Document - and that set 
63           explicitly excludes Password elements
64
65         * page/Frame.cpp:
66         (WebCore::Frame::setDocument): If the frame is active, set the setUseSecureKeyboardEntry based on the setting contained
67           in the new document
68         (WebCore::Frame::updateSecureKeyboardEntryIfActive): Notification for the secure entry flag changing - if the Frame is
69           active, then update to the new setting from the document
70         (WebCore::Frame::setIsActive): Grab the useSecureKeyboardEntry flag from the document instead of FramePrivate
71         (WebCore::FramePrivate::FramePrivate):
72         * page/Frame.h:
73         * page/FramePrivate.h:
74
75 2007-05-12  David Hyatt  <hyatt@apple.com>
76
77         Fix for bug 12740, bmw.com doesn't work.  We were missing a rule that is covered by the HTML5
78         parsing spec.  A <table> encountered while inside stray table content should close up the
79         table responsible for the stray content and start the new table as a sibling of the first.
80
81         Reviewed by mjs
82
83         fast/invalid/table-inside-stray-table-content.html
84
85 2007-05-12  Eric Seidel  <eric@webkit.org>
86
87         Reviewed by mjs.
88
89         Crash starting Safari with JavaScript disabled.
90         http://bugs.webkit.org/show_bug.cgi?id=13691
91         
92         Test: none possible.
93
94         * page/mac/FrameMac.mm:
95         (WebCore::Frame::cleanupPlatformScriptObjects): NULL check d->m_script
96
97 2007-05-11  David Hyatt  <hyatt@apple.com>
98
99         Fix for http://bugs.webkit.org/show_bug.cgi?id=13688, Colloquy is broken!
100
101         Make sure to adjust the baseline of a percentage height table cell's row if the
102         cell flexes (and lowers the baseline).
103
104         Reviewed by olliej
105
106         fast/tables/vertical-align-baseline-readjust.html
107
108         (WebCore::RenderTableSection::calcRowHeight):
109         (WebCore::RenderTableSection::layoutRows):
110         * rendering/RenderTableSection.h:
111         (WebCore::RenderTableSection::getBaseline):
112         
113 2007-05-11  David Hyatt  <hyatt@apple.com>
114
115         Make sure focus rings are always using the exterior style, regardless
116         of what the OS default is.
117
118         Reviewed by beth
119
120         * rendering/RenderThemeMac.mm:
121         (WebCore::RenderThemeMac::checkbox):
122         (WebCore::RenderThemeMac::radio):
123         (WebCore::RenderThemeMac::popupButton):
124         (WebCore::RenderThemeMac::search):
125         (WebCore::RenderThemeMac::sliderThumbHorizontal):
126         (WebCore::RenderThemeMac::sliderThumbVertical):
127
128 2007-05-11  Oliver Hunt  <oliver@apple.com>
129
130         Reviewed by Hyatt.
131         
132         <rdar://problem/5195473> REGRESSION: "Curly quote" fails to 
133         be displayed correctly even when META tag specifies charset=x-mac-roman
134
135
136         * platform/TextCodecICU.cpp:
137         (WebCore::TextCodecICU::registerExtendedEncodingNames):
138         Register the xmacroman encoding
139
140 2007-05-11  Maciej Stachowiak  <mjs@apple.com>
141
142         Reviewed by Hyatt.
143
144         REGRESSION (r21367): Crash due to null document deref when closing bookmarks
145         http://bugs.webkit.org/show_bug.cgi?id=13662
146
147         * loader/FrameLoader.cpp:
148         (WebCore::FrameLoader::provisionalLoadStarted): Remove some useless and now harmful
149         code - there's no need to clear in this case.
150
151 2007-05-11  Oliver Hunt  <oliver@apple.com>
152
153         GDK Build fix
154
155         * ChangeLog:
156         * dom/Document.cpp:
157         (WebCore::Document::importNode):
158
159 2007-05-11  Maciej Stachowiak  <mjs@apple.com>
160
161         Reviewed by Geoff.
162         
163         - fixed <rdar://problem/5197621> closing second window crashed webkit (13660)
164         http://bugs.webkit.org/show_bug.cgi?id=13660
165
166         No test case; not testable.
167
168         * page/mac/FrameMac.mm:
169         (WebCore::Frame::cleanupPlatformScriptObjects): Check if the interpreter is null;
170         if so, we don't want to do work that may lazily create it while the Frame is being
171         destroyed.
172
173 2007-05-11  Oliver Hunt  <oliver@apple.com>
174
175         Reviewed by Brady.
176         
177         <rdar://problem/5017375> WebKit should disable SVG in Dashboard
178         
179         Prevents an SVG document or element from being created when in
180         dashboard compatibility mode.
181         
182         Manually parsing, or using XHR to created a document removes our 
183         ability to detect Dashboard compatibility mode, so we also perform
184         the check when importing nodes from one document into another.
185
186         * dom/DOMImplementation.cpp:
187         (WebCore::DOMImplementation::createDocument):
188           Don't create an SVGDocument if we're in dashboard compatibility mode
189           
190         * dom/Document.cpp:
191         (WebCore::Document::importNode):
192           Don't import SVG nodes if we're in dashboard compatibility mode
193           
194         * ksvg2/scripts/make_names.pl:
195           Don't create SVG elements for documents that are in dashboard
196           compatibility mode
197
198 2007-05-11  Holger Hans Peter Freyther  <zecke@selfish.org>
199
200         Reviewed by Maciej.
201
202         Bug 13676: [cairo/gdk] Provide implementation for ImageBufferCairo
203         http://bugs.webkit.org/show_bug.cgi?id=13676
204
205         There are no test cases that explicitly cover platform/graphics at present.
206
207         * platform/graphics/ImageBuffer.h: Add cairo bits
208         * platform/graphics/cairo/ImageBufferCairo.cpp: Untested implementation of the ImagerBuffer using the image_surface
209         (WebCore::ImageBuffer::create): Create a reasonable sized surface
210         (WebCore::ImageBuffer::ImageBuffer): Use a cairo_surface and create a GraphicsContext. GraphicsContext takes the cairo_t ownership
211         (WebCore::ImageBuffer::~ImageBuffer): Unref the surface
212         (WebCore::ImageBuffer::context): simply return the GraphicsContext, it should be possible to directly draw on it.
213
214 2007-05-11  Mitz Pettel  <mitz@webkit.org>
215
216         Release build fix.
217
218         * platform/mac/ShapeArabic.c:
219         (shapeArabic):
220
221 2007-05-11  Geoffrey Garen  <ggaren@apple.com>
222
223         Reviewed by Darin Adler.
224
225         Removed +[WebScriptObject scriptObjectForJSObject:frame:] because the
226         WebScriptObject API has some serious limitations that make it not ready
227         to be used everywhere the C API is used. Hopefully we can add a good
228         ObjC API in the future that doesn't suffer from this problem.
229         
230         Preliminary notes about these limitations are in <rdar://problem/4876466>.
231
232         * bindings/objc/WebScriptObject.mm:
233         * bindings/objc/WebScriptObjectPendingPublic.h:
234
235 2007-05-11  Mitz Pettel  <mitz@webkit.org>
236
237         Reviewed by Darin.
238
239         - fix http://bugs.webkit.org/show_bug.cgi?id=13635
240           REGRESSION: Cannot log in to webmail.co.za account
241
242         Test: fast/dom/HTMLOptionElement/option-text.html
243
244         Despite the specification that the 'text' attribute of HTMLOptionElement
245         is "the text contained within the option element", other browsers return
246         the text as displayed in the list box or popup, which is without leading,
247         trailing and collapsible whitespace.
248
249         * html/HTMLOptionElement.cpp:
250         (WebCore::HTMLOptionElement::text): Moved the code to trim and collapse
251         whitespace and replace backslashes with the currency symbol into this
252         function.
253         (WebCore::HTMLOptionElement::optionText): Left only the code that adds
254         the leading spaces for grouped options. Removed code that, in quirks mode,
255         displayed the label if the option element contained no text. That behavior
256         did not match WinIE and the description of the expected behavior in
257         fast/forms/HTMLOptionElement_label06.html.
258
259 2007-05-11  Mitz Pettel  <mitz@webkit.org>
260
261         Reviewed by Darin.
262
263         - fix http://bugs.webkit.org/show_bug.cgi?id=13572
264           Arabic characters are not correctly joined when using Arial
265
266         No tests added because standard fonts do not use the character-based shaping
267         code path.
268
269         Added shapeArabic(), a private version of u_shapeArabic() from ICU,
270         patched to shape Arabic characters used in Persian, Urdu, Sindhi, etc.
271         (whose contextual forms belong to the Arabic Presentation Forms-A block).
272
273         * WebCore.xcodeproj/project.pbxproj: Added ShapeArabic.{c,h}.
274         * platform/mac/FontMac.mm:
275         (WebCore::shapeArabic): Changed to call shapeArabic() instead of u_shapeArabic().
276         * platform/mac/ShapeArabic.c: Added. Based on ushape.c from ICU, with
277         additional shaping data and logic for Arabic Presentation Forms-A. Removed
278         many options that are not used in WebKit and code that malloc()ed a temporary
279         buffer and reversed the string.
280         (changeLamAlef):
281         (specialChar):
282         (getLink):
283         (isTashkeelChar):
284         (shapeUnicode):
285         (shapeArabic):
286         * platform/mac/ShapeArabic.h: Added.
287
288 2007-05-11  Darin Adler  <darin@apple.com>
289
290         Reviewed by Mitz.
291
292         - fix http://bugs.webkit.org/show_bug.cgi?id=7452
293           <rdar://problem/3211749> line breaks ignored after <wbr> in <pre> block (affects livejournal.com)
294
295         - fix http://bugs.webkit.org/show_bug.cgi?id=10657
296           <rdar://problem/4274588> <wbr> tags are ignored
297
298         - fix http://bugs.webkit.org/show_bug.cgi?id=12689
299           <wbr> :before/:after content causes line break
300
301         - fix <rdar://problem/5127366> DOM tree isn't correct when parsing with <wbr>
302
303         Test: fast/text/wbr-pre.html
304         Test: fast/text/wbr.html
305         Test: fast/css-generated-content/wbr-with-before-content.html
306         Test: fast/parser/parse-wbr.html
307
308         * html/HTMLElement.h:
309         * html/HTMLElement.cpp:
310         (WebCore::HTMLElement::endTagRequirement): Use the same end tag requirement for a <wbr>
311         element as for a <br> element, TagStatusForbidden.
312         (WebCore::HTMLElement::tagPriority): Use the same priority for a <wbr> element as for a
313         <br> element, 0.
314         (WebCore::HTMLElement::createRenderer): Added. Create a RenderWordBreak to trigger the
315         new rendering code paths.
316
317         * rendering/RenderFlow.h: Add a virtual isWordBreak so we can detect RenderWordBreak.
318
319         * rendering/RenderWordBreak.h: Added.
320         * rendering/RenderWordBreak.cpp: Added.
321
322         * WebCore.pro: Added new files.
323         * WebCore.xcodeproj/project.pbxproj: Added new files.
324         * WebCoreSources.bkl: Added new files.
325
326         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::calcInlinePrefWidths): Reset the
327         line when we hit a <wbr>.
328         * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Add a line break when
329         we hit a <wbr>.
330
331         * dom/Node.cpp: (Node::createRendererIfNeeded): Fix a null check for the case where
332         createRenderer returns 0 even though rendererIsNeeded returned true. I can't reproduce
333         it on demand, but while running layout tests I hit this once. Since there was already
334         a null check here, I rearranged it so it guards all the code that uses the renderer.
335         Later we might want to figure out under exactly what circumstances rendererIsNeeded
336         will return true but createRenderer return 0 and consider eliminating them.
337
338 2007-05-11  David Hyatt  <hyatt@apple.com>
339
340         Fix for bug 13675, focus rings don't repaint properly on editable
341         continuations.
342
343         Reviewed by olliej
344
345         (WebCore::InlineFlowBox::paint):
346         * rendering/RenderBlock.cpp:
347         (WebCore::RenderBlock::paintObject):
348         (WebCore::continuationOutlineTable):
349         (WebCore::RenderBlock::addContinuationWithOutline):
350         (WebCore::RenderBlock::paintContinuationOutlines):
351         * rendering/RenderBlock.h:
352         * rendering/RenderBox.cpp:
353         (WebCore::RenderBox::absoluteClippedOverflowRect):
354         * rendering/RenderObject.cpp:
355         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
356         (WebCore::RenderObject::absoluteOutlineBox):
357
358 2007-05-11  Rob Buis  <buis@kde.org>
359
360         Reviewed by Oliver.
361
362         Cleanups mostly inspired by Coverage results.
363
364         * ksvg2/css/SVGCSSParser.cpp:
365         (WebCore::CSSParser::parseSVGValue):
366         (WebCore::CSSParser::parseSVGStrokeDasharray):
367         * ksvg2/css/SVGRenderStyleDefs.cpp:
368         (StyleFillData::operator==):
369         * ksvg2/svg/SVGColor.cpp:
370         (WebCore::SVGColor::colorFromRGBColorString):
371
372 2007-05-11  Holger Freyther <freyther@kde.org>
373
374         Reviewed by Mark Rowe.
375
376         Move libcurl configuration into WebKit.pri so it will be used by GdkLauncher.
377
378         * WebCore.pro:
379
380 2007-05-10  David Hyatt  <hyatt@apple.com>
381
382         <rdar://problem/5015522> Bounds rectangle of unloaded images is 
383         drawn briefly while loading
384         
385         When the image is null and has no size, don't draw the grey
386         rectangles or alt text any more.  Wait for an actual error to
387         occur with the image before we start showing alt text and borders.
388
389         (Images with no source set at all will continue to show alt text and
390         borders immediately.)
391
392         Reviewed by bradee-oh
393
394         * rendering/RenderImage.cpp:
395         (WebCore::RenderImage::paint):
396
397 2007-05-10  Mitz Pettel  <mitz@webkit.org>
398
399         Reviewed by Darin.
400
401         - fix http://bugs.webkit.org/show_bug.cgi?id=13655
402           Incomplete repaint when text-shadow is used in a render layer with explicit height
403
404         Test: fast/repaint/layer-full-repaint.html
405
406         Removed custom repaint logic from RenderLayer. repaintAfterLayoutIfNeeded()
407         knows how to do everything we need now. The only catch is that we cannot
408         rely on its "do a full repaint if the object needs layout" behavior, since
409         by the time we call it, the needs layout flag has been reset. The solution
410         is to cache the need for a full repaint in the layer.
411
412         * page/FrameView.cpp:
413         (WebCore::FrameView::layout): Removed call to checkForRepaintOnResize().
414         * rendering/RenderLayer.cpp:
415         (WebCore::RenderLayer::checkForRepaintOnResize): Removed.
416         (WebCore::RenderLayer::RenderLayer): Replaced the m_repaintOverflowOnResize
417         flag with a m_needsFullRepaint flag, which indicates that the layer needs
418         to do a full repaint in the next call to updateLayerPositions().
419         (WebCore::RenderLayer::updateLayerPositions): Simplified the repaint logic.
420         Either call repaintAfterLayoutIfNeeded() or do a full repaint, depending on
421         m_needsFullRepaint.
422         * rendering/RenderLayer.h:
423         (WebCore::RenderLayer::setNeedsFullRepaint):
424         * rendering/RenderObject.cpp:
425         (WebCore::RenderObject::setNeedsLayout): Mark the layer for full repaint.
426
427 2007-05-10  Justin Garcia  <justin.garcia@apple.com>
428
429         Reviewed by ggaren
430
431         <rdar://problem/5195166> Incorrect proposedRange DOMRange passed to WebViewEditing delegate
432         
433         In setModifyBias, we must cache the start and the end 
434         because the calls to setBase and setExtent can modify 
435         them (added a testcase).
436         The temporary SelectionController that we use in modify() to
437         produce the proposed range that will be passed to 
438         shouldChangeSelectedDOMRange must have the same m_modifyBias
439         as the original SelectionController, or else when the 
440         modification is performed, setModifyBias can swap the base 
441         and the extent incorrectly (added a testcase).
442         Renamed m_modifyBias to m_lastChangeWasHorizontalExtension.
443         Renamed setModifyBias to willBeModified.
444
445         * editing/SelectionController.cpp:
446         (WebCore::SelectionController::SelectionController):
447         (WebCore::SelectionController::setSelection):
448         (WebCore::SelectionController::willBeModified):
449         (WebCore::SelectionController::modify):
450         * editing/SelectionController.h:
451         (WebCore::SelectionController::setLastChangeWasHorizontalExtension):
452         * page/EventHandler.cpp:
453         (WebCore::EventHandler::handleMousePressEventSingleClick):
454         (WebCore::EventHandler::updateSelectionForMouseDragOverPosition):
455
456 2007-05-10  Geoffrey Garen  <ggaren@apple.com>
457
458         Reviewed by Darin Adler.
459
460         "IconDatabase::sharedIconDatabase()" => "iconDatabase()" for terseness,
461         in the style of WebCore::cache().
462
463         * WebCore.exp:
464         * history/HistoryItem.cpp: Removed retainIconInDatabase because calling
465         "retain" in order to release something is really confusing and, now that
466         iconDatabase() is more terse, we don't need this helper to shorten the
467         syntax. (The isEmpty() check is also done by the database, so we don't 
468         need it either.)
469
470         (WebCore::IconDatabase::~IconDatabase): ASSERT that our destructor isn't
471         called. We're a singleton, so it's confusing to have tear-down code.
472
473 2007-05-10  Adele Peterson  <adele@apple.com>
474
475         Reviewed by Hyatt.
476
477         WebCore part of fix for <rdar://problem/4100616> Doing a "find" in RSS doesn't scroll to result
478
479         Test: fast/overflow/scroll-nested-positioned-layer-in-overflow.html
480
481         Merged visibleSelectionRect into selectionRect.  selectionRect() now takes an argument to determine
482         whether or not to return a rect that clips to the visible content.  This change makes all of the implementations of selectionRect
483         consistent by having them all consider the repaint rect when clipping to visible content.
484
485         * page/Frame.cpp:
486         (WebCore::Frame::revealSelection): Call selectionRect with clipToVisibleContent = false, so we can get a rect that's not visible to reveal.
487         (WebCore::Frame::selectionRect): Added clipToVisibleContent argument, and merged visibleSelectionRect into this method.
488         (WebCore::Frame::setIsActive): Use selectionRect instead of visibleSelectionRect.
489         * page/Frame.h:
490         * page/mac/FrameMac.mm: (WebCore::Frame::selectionImage): Update layout before creating the image.  Use selectionRect instead of visibleSelectionRect.
491         * page/DragController.cpp: (WebCore::dragLocForSelectionDrag): Use selectionRect instead of visibleSelectionRect.
492
493         * rendering/RenderBR.h: (WebCore::RenderBR::selectionRect): Updated argument.
494         * rendering/RenderBlock.h: (WebCore::RenderBlock::selectionRect): ditto.
495         * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::selectionRect): ditto.
496         * rendering/RenderSVGInlineText.h: ditto.
497         * rendering/RenderObject.h: 
498         (WebCore::RenderObject::selectionRect): ditto.
499         (WebCore::RenderObject::SelectionInfo::SelectionInfo): ditto.
500         * rendering/RenderView.cpp:
501         (WebCore::RenderView::selectionRect): ditto.
502         (WebCore::RenderView::setSelection): ditto.
503         * rendering/RenderView.h:
504
505         * rendering/RenderText.h:
506         * rendering/RenderText.cpp: (WebCore::RenderText::selectionRect): Only call computeAbsoluteRepaintRect when clipping to visible content.
507         Otherwise, just adjust the rect to the correct position.
508         * rendering/RenderListMarker.h:
509         * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::selectionRect):
510           To match what we do in RenderText, if we're trying to clip to visible content, just call computeAbsoluteRepaintRect.
511         * rendering/RenderReplaced.h:
512         * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::selectionRect): ditto.
513
514         * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): Check for a parent layer at the beginning, so we can try to scroll all of our parent layers 
515           first, before trying to scroll the top level view.  Also, don't try to scroll overflow layers that have -webkit-line-clamp restricting the height.
516           This will prevent us from revealing text hidden by the slider in Safari RSS.
517
518         * WebCore.exp: Update symbols for WebKit.
519
520 2007-05-10  David Hyatt  <hyatt@apple.com>
521
522         Fix for:
523
524         <rdar://problem/5195272> REGRESSION: broke outline rings for continuations 
525         with empty inline containers
526         
527         http://bugs.webkit.org/show_bug.cgi?id=13667
528
529         Make sure to only include collapsed top/bottom margins of the block portion
530         of the continuation if we know for sure that we have inline line boxes before
531         and after that would prevent the collapse from going further.
532
533         In plain English: the focus rings were too tall. :)
534
535         Reviewed by beth
536
537         * rendering/RenderFlow.cpp:
538         (WebCore::RenderFlow::addFocusRingRects):
539
540 2007-05-10  David Hyatt  <hyatt@apple.com>
541
542         Fix for:
543
544         <rdar://problem/5067235> REGRESSION: Excessively wide table, impossible to resize
545
546         The table used white-space: pre-wrap, which is supported only by WebKit.  There
547         was a bug with the computation of min pref width for pre-wrap text.
548
549         Reviewed by mitzpettel
550
551         fast/text/white-space/pre-wrap-line-test.html
552
553         * rendering/RenderText.cpp:
554         (WebCore::RenderText::calcPrefWidths):
555
556 2007-05-10  Brady Eidson  <beidson@apple.com>
557
558         Reviewed by Oliver
559
560         Cleanup from my earlier Java Applet patch.  We should keep a central location to query if 
561         a mime type counts as a Java Applet
562
563         * html/HTMLObjectElement.cpp:
564         (WebCore::HTMLObjectElement::containsJavaApplet): Query MimeTypeRegistry on the type
565
566         * platform/MimeTypeRegistry.cpp:
567         (WebCore::MimeTypeRegistry::isSupportedImageMIMEType): Update style
568         (WebCore::MimeTypeRegistry::isSupportedImageResourceMIMEType): Ditto
569         (WebCore::MimeTypeRegistry::isSupportedNonImageMIMEType): Ditto
570         (WebCore::MimeTypeRegistry::isJavaAppletMIMEType): Perform the Java Applet check
571         * platform/MimeTypeRegistry.h:
572
573         * rendering/RenderPartObject.cpp:
574         (WebCore::RenderPartObject::updateWidget): Query MimeTypeRegistry on the type
575
576 2007-05-10  Patti Hoa  <patti@apple.com>
577
578         Reviewed by Darin.
579         
580         <rdar://problem/4720109> Sentence textMarker methods do not work well with empty lines
581         
582         * bridge/mac/WebCoreAXObject.mm:
583         (-[WebCoreAXObject doAXNextSentenceEndTextMarkerForTextMarker:]):
584         (-[WebCoreAXObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
585         When a marker position is given, the sentence ax methods automatically shift position by one to make sure
586         not to ask for the current sentence again.  This is generally fine except when the position
587         shift over an empty line break, which is should be considered a separate sentence. In this case, 
588         if we used the shifted position to ask for sentence boundary, ICU parser is not given the text data
589         containing the newline to correctly determine the sentence boundary.  Since the ax sentence method is 
590         explicitly shifting the position to ask for sentence boundary, it should make sure not to skip over important
591         character that can be a standalone sentence.
592         * editing/visible_units.cpp:
593         (WebCore::nextBoundary):
594         When determining boundary, don't stop on a collapsed range, such as newline.  
595         Just pick the next valid position to use as boundary.
596
597 2007-05-10  Maciej Stachowiak  <mjs@apple.com>
598
599         Reviewed by Oliver.
600
601         - WebCore part of fix for:
602         <rdar://problem/5063277> blank screen after login to Citibank Online (accessing document before frame starts loading cancels load)
603         <rdar://problem/5159541> REGRESSION (r20972): Wall Street Journal pages replaced by advertisements (13465)
604
605         The basic approach is to have Frames start out containing an empty document instead of absolutely nothing,
606         so there is no need to initialize them on demand. Various side effects of that cause both of these bugs.
607         
608         However, this caused many regressions so I had to fix the fallout.
609         
610         * WebCore.exp: fix symbol exports
611         * bindings/js/kjs_window.cpp:
612         (KJS::createNewWindow): useless "created" bool (we don't need it here)
613         (KJS::WindowFunc::callAsFunction): detect if we created a new frame, because if so,
614         we need to initialize the domain (can't count on it not having a document), also
615         don't try to make a new document for it.
616         Also, stop properly.
617         * css/cssstyleselector.cpp:
618         (WebCore::CSSStyleSelector::CSSStyleSelector): don't count on document having a view here
619         * html/HTMLObjectElement.cpp:
620         (WebCore::HTMLObjectElement::isImageType): Ask client, to match how other <object> renderer
621         decisions are made.
622         * loader/FrameLoader.cpp:
623         (WebCore::FrameLoader::FrameLoader): Initialize new data members
624         (WebCore::FrameLoader::init): Do the slightly tricky sequence of steps to properly make
625         an empty document with everything hooked up.
626         (WebCore::FrameLoader::createWindow): Added "created" bool.
627         (WebCore::FrameLoader::stopLoading): (whitespace change)
628         (WebCore::FrameLoader::begin): Don't try to create an empty document.
629         (WebCore::FrameLoader::finishedParsing): If creating an initial empty document, don't
630         do any of this work.
631         (WebCore::FrameLoader::checkCompleted): Do checkLoadComplete() as well.
632         (WebCore::FrameLoader::baseURL): don't check for null document
633         (WebCore::FrameLoader::baseTarget): ditto
634         (WebCore::FrameLoader::completeURL): ditto
635         (WebCore::FrameLoader::didTellBridgeAboutLoad): ditto
636         (WebCore::FrameLoader::scheduleLocationChange): determine duringLoad differently; doc won't
637         be null.
638         (WebCore::FrameLoader::gotoAnchor): don't check for null document
639         (WebCore::FrameLoader::canTarget): don't check for null document
640         (WebCore::FrameLoader::stopForUserCancel): new method for explicit stops like window.stop().
641         (WebCore::FrameLoader::transitionToCommitted): check for pre-loaded state properly
642         (WebCore::FrameLoader::createEmptyDocument): removed
643         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): don't send delegate callbacks when making initial
644         doc.
645         (WebCore::FrameLoader::tokenizerProcessedData): Assume document; just checkCompleted now that it
646         does checkLoadComplete.
647         (WebCore::FrameLoader::receivedMainResourceError): assume document
648         (WebCore::FrameLoader::saveDocumentState): Assume there's a document except during initial load
649         (WebCore::FrameLoader::mainReceivedCompleteError): do checkCompleted, not checkLoadComplete
650         (WebCore::FrameLoader::continueLoadWithData): assume document
651         * loader/FrameLoader.h:
652         * loader/MainResourceLoader.cpp:
653         (WebCore::MainResourceLoader::receivedError): Add more ref protection and do things in a slightly
654         different order.
655         * page/DOMWindow.cpp:
656         (WebCore::DOMWindow::document): don't force document creation, just assert there is one.
657         * page/Frame.cpp:
658         (WebCore::Frame::init): Added init method.
659         (WebCore::Frame::pageDestroyed): when a frame is removed, make sure to check if the parent is
660         done loading.
661         * page/Frame.h:
662         * page/mac/WebCoreFrameBridge.mm:
663         (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]): No need to force
664         document.
665         (-[WebCoreFrameBridge aeDescByEvaluatingJavaScriptFromString:]): ditto
666         * platform/graphics/svg/SVGImage.cpp:
667         (WebCore::SVGImage::dataChanged): init the frame
668         * rendering/RenderPart.cpp:
669         (WebCore::RenderPart::updateWidgetPosition): If a subframe needs layout, then lay it out even
670         if the bounds did not change; the content size might be wrong.
671         * rendering/RenderTreeAsText.cpp:
672         (WebCore::externalRepresentation): Don't crash if the frame lacks a view.
673
674 2007-05-10  David Hyatt  <hyatt@apple.com>
675
676         Fix for:
677
678         <rdar://problem/5146757> REGRESSION: div that wrapped to screen width in 
679         tiger no longer wraps
680         
681         http://bugs.webkit.org/show_bug.cgi?id=13654
682
683         Reviewed by mitz
684
685         fast/text/whitespace/normal-after-nowrap-breaking.html
686
687         * rendering/RenderBlock.cpp:
688         (WebCore::RenderBlock::calcInlinePrefWidths):
689
690 2007-05-10  David Hyatt  <hyatt@apple.com>
691
692         Fix for:
693
694         <rdar://problem/4778099> Links with nested continuations fail to 
695         paint their outlines (11255)
696         
697         http://bugs.webkit.org/show_bug.cgi?id=11255
698
699         Fix multiple bugs with outline painting of continuations to ensure that
700         all combos work (empty/full inline - block with/without margins - 
701         empty/full inline).
702
703         Reviewed by mitz
704
705         fast/inline/continuation-outlines.html
706
707         * rendering/RenderBlock.cpp:
708         (WebCore::RenderBlock::paintObject):
709         * rendering/RenderFlow.cpp:
710         (WebCore::RenderFlow::addFocusRingRects):
711
712 2007-05-10  David Hyatt  <hyatt@apple.com>
713
714         Fix for:
715
716         <rdar://problem/5193529> REGRESSION: RTL Overflows scrollbar not showing 
717         when they should be
718         
719         Fallout from fix for bug 11926.  Make sure to restrict the fix to the
720         RenderView for now, since the full-blown overflow case is pretty involved.
721
722         Reviewed by mitzpettel
723
724         fast/overflow/unreachable-content-bug-rtl.html
725
726         * rendering/RenderBlock.cpp:
727         (WebCore::RenderBlock::lowestPosition):
728         (WebCore::RenderBlock::rightmostPosition):
729         (WebCore::RenderBlock::leftmostPosition):
730
731 2007-05-10  Brady Eidson <beidson@apple.com>
732
733         Reviewed by Oliver
734
735         Fix for http://bugs.webkit.org/show_bug.cgi?id=13636 and <rdar://problem/5190816>
736
737         When creating the applets collection, be sure to only count Objects if they contain
738         a java applet
739
740         * html/HTMLCollection.cpp:
741         (WebCore::HTMLCollection::traverseNextItem): Add the qualifier for Objects that 
742           containsJavaApplet() must be true
743
744         * html/HTMLObjectElement.cpp:
745         (WebCore::HTMLObjectElement::containsJavaApplet): Check this Object element and inner
746           nodes for any Java applets
747         * html/HTMLObjectElement.h: 
748
749 2007-05-10  David Hyatt  <hyatt@apple.com>
750
751         Fix for:
752
753         <rdar://problem/4694859> SAP: HTML tags with overflow:hidden consume
754         space on page, do not consume space in Firefox (11926)
755
756         http://bugs.webkit.org/show_bug.cgi?id=11926
757
758         Make sure that unreachable objects along one axis (e.g., top/left) do not
759         contribute to the scrollable area in the opposite axis (e.g., right/bottom).
760
761         Reviewed by olliej
762
763         fast/overflow/unreachable-content-test.html
764
765         * rendering/RenderBlock.cpp:
766         (WebCore::RenderBlock::lowestPosition):
767         (WebCore::RenderBlock::rightmostPosition):
768         (WebCore::RenderBlock::leftmostPosition):
769
770 2007-05-10  David Hyatt  <hyatt@apple.com>
771
772         Fix for:
773
774         <rdar://problem/4656825> REGRESSION: Japanese TV time table widget:
775         part of the number in background has been cut off.
776
777         Now that opacity uses a tight bounding box to clip, we need to make sure
778         to factor spillout caused by negative letter spacing into our right
779         overflow.  Latch on to the code that does this already for text-stroke
780         and text-shadow.
781
782         Reviewed by olliej
783
784         fast/text/letter-spacing-negative-opacity.html
785
786        * rendering/InlineFlowBox.cpp:
787         (WebCore::InlineFlowBox::placeBoxesHorizontally):
788
789 2007-05-10  Geoffrey Garen  <ggaren@apple.com>
790
791         Reviewed by Maciej Stachowiak.
792         
793         More fix-ups to the WebScriptObject/WebScripting APIs, related to
794         <rdar://problem/5140447> API for fetching JSGlobalContextRef from WebView 
795         or WebFrame
796
797         * bindings/objc/WebScriptObject.h: Fully specified the surprising rules for
798         type conversion between JavaScript and ObjC.
799         * bindings/objc/WebScriptObject.mm: Added up-call accessor to WebFrame.
800         This is kind of stinky, but I'm OK with it because eventually all of this
801         code should move up into WebKit.
802         (+[WebScriptObject scriptObjectForJSObject:frame:]):
803         (-[WebScriptObject valueForKey:]):
804         (-[WebScriptObject JSObject]): 
805             - Added _rootObject check because if _rootObject returns NULL it means 
806             that _imp is no longer GC protected, so it's not safe to use. 
807             - Added _isSafeScript check because that's what WebScriptObject methods
808             typically do, even though the value of doing so isn't clear to me.
809         * bindings/objc/WebScriptObjectPendingPublic.h: Added WebFrame* parameter
810         to -scriptObjectForJSObject:. This is required to wrap JS objects that
811         are not already in the wrapper cache. It would be nice to remove this
812         limitation of WebScriptObject some day.
813         * page/mac/FrameMac.mm:
814         (WebCore::Frame::cleanupPlatformScriptObjects): Force removal of m_windowScriptObject
815         from the cache, to avoid retrieving the m_windowScriptObject from the previous
816         page on a new page load. (It would be non-functional in that case.)
817
818 2007-05-10  David Hyatt  <hyatt@apple.com>
819
820         Fix for <rdar://problem/5183697>.
821
822         http://bugs.webkit.org/show_bug.cgi?id=13576
823
824         Make sure verticalPositionHint is not called on an inline-block from
825         content inside the inline-block (like text).
826
827         Reviewed by olliej
828
829         fast/inline-block/inline-block-vertical-align.html
830
831         * rendering/RenderObject.cpp:
832         (WebCore::RenderObject::verticalPositionHint):
833         * rendering/RenderText.cpp:
834         (WebCore::RenderText::verticalPositionHint):
835         * rendering/RenderThemeMac.mm:
836         (WebCore::RenderThemeMac::setFontFromControlSize):
837
838 2007-05-09  Holger Freyther <zecke@selfish.org>
839
840         Reviewed by Mark Rowe.
841
842         Gdk build fix with SVG enabled.  Stub out ImageBufferCairo.
843
844         * WebCore.pro: Build ImageBufferCairo.cpp
845         * platform/graphics/cairo/ImageBufferCairo.cpp: Added.
846         (WebCore::ImageBuffer::create):
847         (WebCore::ImageBuffer::~ImageBuffer):
848         (WebCore::ImageBuffer::context):
849
850 2007-05-08  Justin Garcia  <justin.garcia@apple.com>
851
852         Reviewed by darin
853         
854         <rdar://problem/5017613> Style changes don't effect fully selected ToDo content
855
856         * editing/ApplyStyleCommand.cpp:
857         (WebCore::ApplyStyleCommand::applyInlineStyle):
858         Use a for loop instead of while(1).
859         Simplify loop termination using Range::pastEndNode.
860         Don't handle the start.node() == end.node() case 
861         specially, it's unnecessary.
862         Apply the style change to fully selected plaintext-only
863         regions, not with wrapper spans inside the region, but 
864         by changing the element's inline style declaration.
865         Don't descend into nodes whose children we should ignore.
866
867 2007-05-09  Adele Peterson  <adele@apple.com>
868
869         Reviewed by Hyatt.
870
871         Fix for <rdar://problem/5113578> REGRESSION: textfields that set the height but not the font 
872         look different from IE & FF because the font is small
873
874         For plain text fields, don't stretch the inner text box.  Center it vertically in the field.
875
876         * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::layout):
877
878 2007-05-09  Atul Mehrotra  <atul.mehrotra@celunite.com>
879
880         Gdk build fix.
881
882         * platform/gdk/TemporaryLinkStubs.cpp:
883         (Editor::newGeneralClipboard):
884
885 2007-05-09  Mitz Pettel  <mitz@webkit.org>
886
887         Reviewed by Dave Hyatt.
888
889         - fix http://bugs.webkit.org/show_bug.cgi?id=13037
890           REGRESSION: Copy-on-scroll not reset properly after back/forward navigation
891
892         * page/FrameView.cpp:
893         (WebCore::FrameViewPrivate::FrameViewPrivate): Moved initialization of
894         m_slowRepaintObjectCount here.
895         (WebCore::FrameViewPrivate::reset): Do not reset the slow repaint object
896         count here.
897         (WebCore::FrameView::useSlowRepaints):
898         (WebCore::FrameView::addSlowRepaintObject):
899         (WebCore::FrameView::removeSlowRepaintObject): Added an assertion that the
900         object count is positive.
901         * rendering/RenderObject.cpp:
902         (WebCore::RenderObject::setStyle): Corrected a mix up between old and new
903         style, which caused the object count to be decremented when it was supposed
904         to be incremented and vice versa.
905
906 2007-05-09  Peter Müller <pm@one.com>
907
908         Reviewed by Dave Hyatt.
909
910         Changed the hardcoded colors that are used for CSS 2.1 system colors.
911         Previous colors had numerous conflicts in semantic pairs, which
912         made text invisible in highlight, info and menu colored areas.
913         The new hardcoded colors are inspired by Aqua.
914
915         Ideally these colors should be fetched through AppKit instead,
916         though I am not sure if it is possible to make a 1:1 mapping
917         between CSS2.1 system colors and Mac OS X.
918
919         * css/cssstyleselector.cpp:
920         (WebCore::):
921
922 2007-05-09  Lars Knoll <lars@trolltech.com>
923
924         Fix the Qt build.
925
926         * editing/qt/EditorQt.cpp:
927
928 2007-05-08  Geoffrey Garen  <ggaren@apple.com>
929
930         Reviewed by Darin Adler.
931         
932         More fix-ups to the WebScriptObject/WebScripting APIs, related to
933         <rdar://problem/5140447> API for fetching JSGlobalContextRef from WebView 
934         or WebFrame
935         
936         1. Added -scriptObjectForJSObject: SPI so you can bridge back from JavaScriptCore
937         to WebScriptObject.
938         
939         2. Fixed WebScriptObject bridging so that you always get the same WebScriptObject
940         for a JSObject (like in the DOM). This makes -scriptObjectForJSObject: a
941         lot more coherent as an API.
942
943         * bindings/objc/DOMInternal.mm: Renamed wrapperCache to DOMWrapperCache
944         to distinguish from the JSWrapperCache. Added typedef for readability.
945         (WebCore::getDOMWrapper):
946         (WebCore::addDOMWrapper):
947         (WebCore::removeDOMWrapper):
948         * bindings/objc/WebScriptObject.mm: Added JSWrapperCache, which works just
949         like the DOMWrapperCache.
950         (WebCore::getJSWrapper):
951         (WebCore::addJSWrapper):
952         (WebCore::removeJSWrapper):
953         (WebCore::createJSWrapper):
954         (+[WebScriptObject scriptObjectForJSObject:]): This is the new API. It attempts
955         to return a specific DOM wrapper object, or, barring that, it returns a 
956         generic WebScriptObject.
957         (+[WebScriptObject scriptObjectForJSObject:originRootObject:rootObject:]):
958         Added this method to support our old WebScriptObject security and leak 
959         checking model, even though it doesn't work very well. 
960         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
961         (-[WebScriptObject dealloc]):
962         (-[WebScriptObject finalize]):
963         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
964         * bindings/objc/WebScriptObjectPendingPublic.h:
965         * bindings/objc/WebScriptObjectPrivate.h:
966         * page/mac/FrameMac.mm:
967         (WebCore::Frame::windowScriptObject): Changed to use the new API. This
968         fixes a bug where the object sent to -windowScriptObjectAvailable: and returned
969         from -windowScriptObject could not be round-tripped.
970
971 2007-05-09  Mark Rowe  <mrowe@apple.com>
972
973         Build fix.
974
975         * editing/Editor.cpp:
976         (WebCore::findFirstGrammarDetailInRange): Use unsigned rather than int.
977         (WebCore::findFirstBadGrammarInRange): Cast to unsigned in assertion.
978         (WebCore::isRangeUngrammatical): Remove unused variables.
979
980 2007-05-08  Oliver Hunt  <oliver@apple.com>
981
982         Reviewed by Darin.
983         
984         Fix <rdar://problem/5188938> arc method on Canvas causes hang or crash
985         
986         Workaround bad behaviour of CGPathAddArc when passed inf as start or
987         end angles.
988
989         * platform/graphics/cg/PathCG.cpp:
990         (WebCore::Path::addArc):
991
992 2007-05-08  Darin Adler  <darin@apple.com>
993
994         Reviewed by Hyatt and Hatcher.
995
996         - fix auto-activation code path so Tiger and Leopard aren't different
997
998         * platform/mac/WebFontCache.mm: (+[WebFontCache fontWithFamily:traits:size:]):
999         Do the auto-activation dance first before doing anything else, and ignore the
1000         font that it returns.
1001
1002 2007-05-08  Steve Falkenburg  <sfalken@apple.com>
1003
1004         Reviewed by Darin.
1005
1006         Moved most spelling/grammar logic to C++.  Now calls through to
1007         WebKit to actually invoke NSSpellChecker.
1008
1009         * editing/Editor.cpp:
1010         (WebCore::Editor::ignoreSpelling): Added (ported from EditorMac).
1011         (WebCore::Editor::learnSpelling): Added (ported from EditorMac).
1012         (WebCore::findFirstMisspellingInRange): Added (ported from EditorMac).
1013         (WebCore::paragraphAlignedRangeForRange): Added (ported from EditorMac).
1014         (WebCore::findFirstGrammarDetailInRange): Added (ported from EditorMac).
1015         (WebCore::findFirstBadGrammarInRange): Added (ported from EditorMac).
1016         (WebCore::Editor::advanceToNextMisspelling): Added (ported from EditorMac).
1017         (WebCore::Editor::isSelectionMisspelled): Added (ported from EditorMac).
1018         (WebCore::isRangeUngrammatical): Added (ported from EditorMac).
1019         (WebCore::Editor::isSelectionUngrammatical): Added (ported from EditorMac).
1020         (WebCore::Editor::guessesForUngrammaticalSelection): Added (ported from EditorMac).
1021         (WebCore::Editor::guessesForMisspelledSelection): Added (ported from EditorMac).
1022         (WebCore::Editor::showSpellingGuessPanel): Added (ported from EditorMac).
1023         (WebCore::Editor::spellingPanelIsShowing): Added (ported from EditorMac).
1024         (WebCore::Editor::markMisspellingsAfterTypingToPosition): Added (ported from EditorMac).
1025         (WebCore::markAllMisspellingsInRange): Added (ported from EditorMac).
1026         (WebCore::markAllBadGrammarInRange): Added (ported from EditorMac).
1027         (WebCore::markMisspellingsOrBadGrammar): Added (ported from EditorMac).
1028         (WebCore::Editor::markMisspellings): Added (ported from EditorMac).
1029         (WebCore::Editor::markBadGrammar): Added (ported from EditorMac).
1030         * editing/mac/EditorMac.mm: Removed Objective C version of spelling/grammar calls.
1031
1032 2007-05-08  Steve Falkenburg  <sfalken@apple.com>
1033
1034         Reviewed by Ada.
1035
1036         Slight modification to last editor method fix.
1037
1038         * bridge/EditorClient.h:
1039         * platform/gdk/EditorClientGdk.cpp:
1040         (WebCore::EditorClientGdk::updateSpellingUIWithGrammarString):
1041         * platform/gdk/EditorClientGdk.h:
1042         * platform/graphics/svg/SVGImageEmptyClients.h:
1043         (WebCore::SVGEmptyEditorClient::updateSpellingUIWithGrammarString):
1044
1045 2007-05-08  Alexey Proskuryakov  <ap@webkit.org>
1046
1047         Reviewed by Hyatt.
1048
1049         http://bugs.webkit.org/show_bug.cgi?id=13480
1050         window.Attr is undefined
1051
1052         Test: fast/dom/Window/attr-constructor.html
1053
1054         * dom/Attr.idl:
1055         * dom/CDATASection.idl:
1056         * dom/CharacterData.idl:
1057         * dom/Comment.idl:
1058         * dom/DOMImplementation.idl:
1059         * dom/DocumentType.idl:
1060         * dom/Entity.idl:
1061         * dom/EntityReference.idl:
1062         * dom/Notation.idl:
1063         * dom/ProcessingInstruction.idl:
1064         * dom/Text.idl:
1065         Added GenerateConstructor.
1066
1067         * page/DOMWindow.idl: Added constructor properties for DOM interfaces.
1068
1069 2007-05-07  Geoffrey Garen  <ggaren@apple.com>
1070
1071         Reviewed by Maciej Stachowiak.
1072
1073         Fixed <rdar://problem/5140447> API for fetching JSGlobalContextRef from 
1074         WebView or WebFrame
1075         
1076         Added support for new -[WebScriptObject JSObject] and -[WebFrame globalContext]
1077         APIs.
1078         
1079         Also fixed some more cases of <rdar://problem/4395622> API: 
1080         WebScriptObject.h incorrectly reports that -isSelectorExcludedFromWebScript 
1081         returns NO by default, and generally cleaned up that documentation.
1082
1083         * WebCore.exp: A lot of the diff here is from sorting.
1084         * WebCore.xcodeproj/project.pbxproj:
1085         * bindings/objc/WebScriptObject.h:
1086         * bindings/objc/WebScriptObject.mm:
1087         (-[WebScriptObject JSObject]):
1088         * bindings/objc/WebScriptObjectPendingPublic.h: Added.
1089
1090 2007-05-08  Lars Knoll <lars@trolltech.com>
1091
1092         Reviewed by Hyatt.
1093
1094         Fix valgrind reported uninitialized memory read.
1095
1096         * rendering/RenderText.cpp:
1097         (WebCore::RenderText::RenderText):
1098
1099 2007-05-07  Justin Garcia  <justin.garcia@apple.com>
1100
1101         Reviewed by oliver
1102
1103         <rdar://problem/4895428> Can't drag selected ToDo
1104         
1105         The user tries to drag a selection by mousing down
1106         on the editable part of a ToDo, which is focusable,
1107         since it is an editable node within non-editable 
1108         content.  But we focus focusable elements on mouse 
1109         down, and focusing the editable piece blows away 
1110         the selection and prevents the drag. This is how 
1111         IE behaves, but content seems generally difficult 
1112         to drag in IE, so this doesn't make it any worse.
1113         
1114         Since focus doesn't appear to be cancelable, either
1115         with a DOM event or an editing delegate, I fixed this
1116         by delaying the focus of focusable nodes that are 
1117         selected and inside an already focused node.  The 
1118         node will be focused if the user mouses up without 
1119         doing any dragging because the mouse up sets a
1120         selection, which calls setFocusNodeIfNeeded.
1121
1122         * page/EventHandler.cpp:
1123         (WebCore::EventHandler::dispatchMouseEvent):
1124
1125 2007-05-07  Atul Mehrotra <atul.mehrotra@celunite.com>
1126
1127         Reviewed by Maciej.
1128
1129         GDK Build fix
1130
1131         * platform/gdk/TemporaryLinkStubs.cpp:
1132
1133 2007-05-07  Oliver Hunt  <oliver@apple.com>
1134
1135         Reviewed by Maciej.
1136
1137         Correcting comparisons to handle NaN in the same manner
1138         as other Canvas methods.
1139
1140         * html/CanvasRenderingContext2D.cpp:
1141         (WebCore::CanvasRenderingContext2D::arcTo):
1142         (WebCore::CanvasRenderingContext2D::arc):
1143           Correcting arc/arcTo to match the WHAT WG draft.
1144         (WebCore::CanvasRenderingContext2D::rect):
1145         (WebCore::CanvasRenderingContext2D::clearRect):
1146         (WebCore::CanvasRenderingContext2D::fillRect):
1147         (WebCore::CanvasRenderingContext2D::strokeRect):
1148
1149 2007-05-07  David Hyatt  <hyatt@apple.com>
1150
1151         Add some comments to the glyph/font code (patch from MarvinD, tweaked by
1152         me to correct a few bits and to make it forward-compatible with the work
1153         going on in 3315.
1154
1155         Reviewed by me
1156
1157         * ChangeLog:
1158         * platform/Font.cpp:
1159         (WebCore::Font::glyphDataForCharacter):
1160         * platform/GlyphPageTreeNode.cpp:
1161         (WebCore::GlyphPageTreeNode::initializePage):
1162         * platform/GlyphPageTreeNode.h:
1163
1164 2007-05-07  Justin Garcia  <justin.garcia@apple.com>
1165
1166         Fix layout test failures.
1167
1168         * editing/SelectionController.cpp:
1169         (WebCore::SelectionController::contains): Use comparePositions
1170         instead of Range::comparePoint, because comparePositions can
1171         handle positions inside shadow trees.
1172
1173 2007-05-07  Justin Garcia  <justin.garcia@apple.com>
1174
1175         Reviewed by darin
1176         
1177         <rdar://problem/4895428> Can't drag selected To Do if it is not showing a due date
1178         
1179         The code in SelectionController::contains returned false 
1180         incorrectly if the selection end just after a table 
1181         and the position was inside that table.
1182
1183         * editing/SelectionController.cpp:
1184         (WebCore::SelectionController::contains): Compare the position with the
1185         ends of the selection and then use Range::comparePoint.
1186
1187 2007-05-07  Darin Adler  <darin@apple.com>
1188
1189         - rolling out setInnerHTML optimization until I can figure out why tests are failing
1190
1191 2007-05-07  Darin Adler  <darin@apple.com>
1192
1193         Reviewed by Hyatt.
1194
1195         - fix http://bugs.webkit.org/show_bug.cgi?id=13602
1196           Amazon product pages keep repainting over and over again
1197
1198         Optimize setInnerHTML, setOuterHTML, and setInnerText so they don't change the DOM at all
1199         if they don't need to.
1200
1201         Test: fast/dom/HTMLElement/set-inner-outer-optimization.html
1202
1203         * html/HTMLElement.cpp:
1204         (WebCore::equal): Added. Helper function that compares two Text nodes or two NamedAttrMap
1205         attribute maps.
1206         (WebCore::shallowEqual): Added. Helper function that compares two Element nodes or two
1207         arbitrary nodes.
1208         (WebCore::replaceChildrenWithFragment): Added. Helper function used by setInnerHTML and
1209         setInnerText. Optimizes the cases where all the nodes are the same, where both the current
1210         and the new content are single text nodes, and where the current content is a single node
1211         that can be replaced with replaceChild.
1212         (WebCore::replaceChildrenWithText): Added. Helper function used by setInnerText. Optimizes
1213         the case where the current content is a single text node or a single node that can be
1214         replaced with replaceChild.
1215         (WebCore::HTMLElement::setInnerHTML): Changed to call replaceChildrenWithFragment.
1216         (WebCore::HTMLElement::setOuterHTML): Added special case to optimize when the new content
1217         exactly matches the current node.
1218         (WebCore::HTMLElement::setInnerText): Changed to call replaceChildrenWithText in a few
1219         cases instead of doing removeChildren/appendChild. Changed code that was using
1220         DeprecatedString to instead use String. Changed general case to use a document fragment
1221         and replaceChildrenWithFragment.
1222
1223         * dom/CharacterData.cpp: (WebCore::CharacterData::dispatchModifiedEvent):
1224         Fixed bug where we would not dispatch the DOMSubtreeModified event unless someone
1225         was registered for the DOMCharacterDataModified event. Caused trouble in the test.
1226
1227 2007-05-06  Darin Adler  <darin@apple.com>
1228
1229         - blind try at fixing the Qt build
1230
1231         * platform/qt/TextBreakIteratorQt.cpp: (WebCore::sentenceBreakIterator):
1232         Added a placeholder.
1233
1234 2007-05-06  Darin Adler  <darin@apple.com>
1235
1236         Reviewed by Hyatt.
1237
1238         - fix http://bugs.webkit.org/show_bug.cgi?id=13537
1239           Canvex example starts rendering strangely after a while
1240
1241         * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage):
1242         Don't raise an exception if the source or destination rectangle is empty.
1243
1244 2007-05-06  Darin Adler  <darin@apple.com>
1245
1246         Reviewed by Hyatt.
1247
1248         - fix <rdar://problem/4585593> REGRESSION: Some 2-byte characters in printed page
1249           header are drawn with too-large font and clipped
1250
1251         Doesn't affect text within web pages, so no layout test.
1252
1253         * platform/mac/FontCacheMac.mm: (WebCore::FontCache::getFontDataForCharacters):
1254         Base the substitute font on the FontPlatformData rather than the FontDescription.
1255         Before, it was a mix of both. This works properly for fonts where we have no
1256         FontDescription and is also more internally consistent.
1257
1258 2007-05-06  Darin Adler  <darin@apple.com>
1259
1260         Reviewed by Hyatt.
1261
1262         - http://bugs.webkit.org/show_bug.cgi?id=13606
1263           some functions are virtual that don't need to be
1264
1265         * dom/Node.h: Made first/lastChild be inline functions that call virtual functions.
1266         This lets us hide the functions with another inline function in a derived class,
1267         yet still override the behavior here in the base class by overriding the virtual
1268         functions too.
1269         * dom/Node.cpp:
1270         (WebCore::Node::virtualFirstChild): Renamed virtual functions. There are now
1271         non-virtual inline functions that call these virtual functions.
1272         (WebCore::Node::virtualLastChild): Ditto.
1273
1274         * dom/ContainerNode.h: Added non-virtual first/lastChild functions that hide the ones
1275         inherited from the Node class; these also replace the fastFirst/LastChild functions,
1276         and transparently give callers the faster form if they have a pointer of the right
1277         type. But still override the virtual functions named virtualFirst/LastChild, because
1278         those can still be called through a Node*. Removed the "fast" from the names of
1279         fastSetFirst/LastChild.
1280         * dom/ContainerNode.cpp:
1281         (WebCore::ContainerNode::virtualFirstChild): Renamed virtual functions. There are now
1282         also non-virtual inline versions.
1283         (WebCore::ContainerNode::virtualLastChild): Ditto.
1284
1285         * dom/CharacterData.cpp: Removed implementations of data and length functons.
1286         * dom/CharacterData.h: Made data, setData, length, substringData, appendData,
1287         insertData, deleteData, and replaceData all non-virtual, and made data and length
1288         both be inline.
1289
1290         * dom/NamedAttrMap.h: (WebCore::NamedAttrMap::attributeItem): Removed a null check
1291         from this function. If the length of the map is known to be greater than 0, then
1292         the null check isn't needed. But if the length of the map hasn't been checked at all,
1293         then it's unsafe to call this function since it doesn't range check the array
1294         index. Thus the null check is never needed. I also looked at all callers.
1295
1296         * dom/Attr.cpp: (WebCore::Attr::createTextChild):
1297         * dom/Document.cpp: (WebCore::Document::recalcStyle):
1298         * dom/Element.cpp: (WebCore::Element::recalcStyle):
1299         * ksvg2/svg/SVGElement.cpp:
1300         (WebCore::SVGElement::haveLoadedRequiredResources):
1301         Removed "fast" prefix from calls to fastFirst/LastChild and fastSetFirst/LastChlld.
1302         It's not needed any more -- you still get fast behavior if the pointer has a type
1303         that's ContainerNode or derived from it.
1304
1305 2007-05-06  Mitz Pettel  <mitz@webkit.org>
1306
1307         Reviewed by Hyatt.
1308
1309         - fix http://bugs.webkit.org/show_bug.cgi?id=13557
1310           Crash when dragging selection over absolutely positioned generated content on block element
1311
1312         Test: fast/css-generated-content/positioned-background-hit-test-crash.html
1313
1314         * rendering/RenderLayer.cpp:
1315         (WebCore::RenderLayer::enclosingElement): Added. Factored out of hitTestLayer().
1316         (WebCore::RenderLayer::hitTestLayer): Implemented the fix for <rdar://problem/3552346>
1317         from r6106 to the self hit test as well, namely: return the enclosing element
1318         for generated positioned content.
1319         * rendering/RenderLayer.h:
1320
1321 2007-05-06  Alexey Proskuryakov  <ap@webkit.org>
1322
1323         Reviewed by Darin.
1324
1325         http://bugs.webkit.org/show_bug.cgi?id=13584
1326         <script> code wrongly assumes requests can't fail
1327
1328         Test: fast/loader/unloadable-script.html
1329
1330         * html/HTMLScriptElement.cpp:
1331         (WebCore::HTMLScriptElement::parseMappedAttribute):
1332         (WebCore::HTMLScriptElement::insertedIntoDocument):
1333         Check the return value of requestScript().
1334
1335 2007-05-06  Alexey Proskuryakov  <ap@webkit.org>
1336
1337         Reviewed by Darin.
1338
1339         http://bugs.webkit.org/show_bug.cgi?id=13304
1340         REGRESSION(14784): WebKit doesn't dynamically reflect changes to the highlight color in System Preferences
1341
1342         Implemented a notification observer that invalidates cached system colors.
1343
1344         No automated test possible.
1345
1346         * rendering/RenderTheme.cpp:
1347         (WebCore::RenderTheme::activeSelectionBackgroundColor):
1348         (WebCore::RenderTheme::inactiveSelectionBackgroundColor):
1349         (WebCore::RenderTheme::platformColorsDidChange):
1350         * rendering/RenderTheme.h:
1351         * rendering/RenderThemeMac.h:
1352         * rendering/RenderThemeMac.mm:
1353         (-[WebCoreRenderThemeNotificationObserver initWithTheme:WebCore::]):
1354         (-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]):
1355         (WebCore::theme):
1356         (WebCore::RenderThemeMac::RenderThemeMac):
1357         (WebCore::RenderThemeMac::~RenderThemeMac):
1358         (WebCore::RenderThemeMac::checkbox):
1359         (WebCore::RenderThemeMac::radio):
1360         (WebCore::RenderThemeMac::button):
1361         (WebCore::RenderThemeMac::popupButton):
1362         (WebCore::RenderThemeMac::search):
1363         (WebCore::RenderThemeMac::sliderThumbHorizontal):
1364         (WebCore::RenderThemeMac::sliderThumbVertical):
1365
1366 2007-05-05  Rob Buis  <buis@kde.org>
1367
1368         Reviewed by Oliver.
1369
1370         http://bugs.webkit.org/show_bug.cgi?id=13592
1371         parseMappedAttribute inconsistency
1372
1373         Do not use local vars in parseMappedAttribute for attr name and value.
1374
1375         * ksvg2/svg/SVGAnimateMotionElement.cpp:
1376         (WebCore::SVGAnimateMotionElement::parseMappedAttribute):
1377         * ksvg2/svg/SVGAnimateTransformElement.cpp:
1378         (WebCore::SVGAnimateTransformElement::parseMappedAttribute):
1379         * ksvg2/svg/SVGAnimationElement.cpp:
1380         (WebCore::SVGAnimationElement::parseMappedAttribute):
1381         * ksvg2/svg/SVGCircleElement.cpp:
1382         (WebCore::SVGCircleElement::parseMappedAttribute):
1383         * ksvg2/svg/SVGClipPathElement.cpp:
1384         (WebCore::SVGClipPathElement::parseMappedAttribute):
1385         * ksvg2/svg/SVGCursorElement.cpp:
1386         (WebCore::SVGCursorElement::parseMappedAttribute):
1387         * ksvg2/svg/SVGEllipseElement.cpp:
1388         (WebCore::SVGEllipseElement::parseMappedAttribute):
1389         * ksvg2/svg/SVGExternalResourcesRequired.cpp:
1390         (WebCore::SVGExternalResourcesRequired::parseMappedAttribute):
1391         * ksvg2/svg/SVGGradientElement.cpp:
1392         (WebCore::SVGGradientElement::parseMappedAttribute):
1393         * ksvg2/svg/SVGImageElement.cpp:
1394         (WebCore::SVGImageElement::parseMappedAttribute):
1395         * ksvg2/svg/SVGLineElement.cpp:
1396         (WebCore::SVGLineElement::parseMappedAttribute):
1397         * ksvg2/svg/SVGLinearGradientElement.cpp:
1398         (WebCore::SVGLinearGradientElement::parseMappedAttribute):
1399         * ksvg2/svg/SVGMarkerElement.cpp:
1400         (WebCore::SVGMarkerElement::parseMappedAttribute):
1401         * ksvg2/svg/SVGMaskElement.cpp:
1402         (WebCore::SVGMaskElement::parseMappedAttribute):
1403         * ksvg2/svg/SVGPathElement.cpp:
1404         (WebCore::SVGPathElement::parseMappedAttribute):
1405         * ksvg2/svg/SVGPatternElement.cpp:
1406         (WebCore::SVGPatternElement::parseMappedAttribute):
1407         * ksvg2/svg/SVGRadialGradientElement.cpp:
1408         (WebCore::SVGRadialGradientElement::parseMappedAttribute):
1409         * ksvg2/svg/SVGRectElement.cpp:
1410         (WebCore::SVGRectElement::parseMappedAttribute):
1411         * ksvg2/svg/SVGSVGElement.cpp:
1412         (WebCore::SVGSVGElement::parseMappedAttribute):
1413         * ksvg2/svg/SVGScriptElement.cpp:
1414         (WebCore::SVGScriptElement::parseMappedAttribute):
1415         * ksvg2/svg/SVGStopElement.cpp:
1416         (WebCore::SVGStopElement::parseMappedAttribute):
1417         * ksvg2/svg/SVGTests.cpp:
1418         (WebCore::SVGTests::parseMappedAttribute):
1419         * ksvg2/svg/SVGTextContentElement.cpp:
1420         (WebCore::SVGTextContentElement::parseMappedAttribute):
1421         * ksvg2/svg/SVGTextPositioningElement.cpp:
1422         (WebCore::SVGTextPositioningElement::parseMappedAttribute):
1423         * ksvg2/svg/SVGUseElement.cpp:
1424         (WebCore::SVGUseElement::parseMappedAttribute):
1425         * ksvg2/svg/SVGViewElement.cpp:
1426         (WebCore::SVGViewElement::parseMappedAttribute):
1427         * ksvg2/svg/SVGZoomAndPan.cpp:
1428         (WebCore::SVGZoomAndPan::parseMappedAttribute):
1429
1430 2007-05-05  Oliver Hunt  <oliver@apple.com>
1431
1432         Reviewed by Hyatt.
1433
1434         Initialise default fill with Color::black rather than parsing
1435         the string "black"
1436
1437         * ksvg2/svg/SVGPaint.cpp:
1438         (WebCore::SVGPaint::defaultFill):
1439
1440 2007-05-04  Steve Falkenburg  <sfalken@apple.com>
1441
1442         Reviewed by Oliver.
1443
1444         Use TextBreakIterator for sentence breaking instead of TextBoundaries.
1445
1446         * WebCore.xcodeproj/project.pbxproj: Added TextBreakIeratorInternalICUMac.mm
1447         * editing/visible_units.cpp:
1448         (WebCore::startSentenceBoundary): Call TextBreakIterator instead of TextBoundaries.
1449         (WebCore::endSentenceBoundary): Call TextBreakIterator instead of TextBoundaries.
1450         (WebCore::previousSentencePositionBoundary): Call TextBreakIterator instead of TextBoundaries.
1451         (WebCore::nextSentencePositionBoundary): Call TextBreakIterator instead of TextBoundaries.
1452         * platform/TextBoundaries.h: Removed findSentenceBoundary, findNextSentenceFromIndex.
1453         * platform/TextBreakIterator.h: Added sentenceBreakIterator.
1454         * platform/TextBreakIteratorICU.cpp:
1455         (WebCore::setUpIterator): Add locale parameter (needed to maintain functionality that TextBoundaries code had).
1456         (WebCore::characterBreakIterator): Pass en_us for locale (same as old code).
1457         (WebCore::wordBreakIterator): Pass en_us for locale (same as old code).
1458         (WebCore::lineBreakIterator): Pass en_us for locale (same as old code).
1459         (WebCore::sentenceBreakIterator): Added.
1460         * platform/TextBreakIteratorInternalICU.h: Added.
1461         * platform/gdk/TemporaryLinkStubs.cpp: Removed findNextSentenceFromIndex, findSentenceBoundary.
1462         (WebCore::currentTextBreakLocaleID): Added stub.
1463         * platform/mac/TextBoundaries.mm: Removed currentTextBreakLocaleID, findSentenceBoundary, findNextSentenceFromIndex.
1464         * platform/mac/TextBreakIteratorInternalICUMac.mm: Added.
1465         (WebCore::currentTextBreakLocaleID): Moved from TextBoundaries.mm
1466         * platform/qt/TextBoundaries.cpp: Removed findNextSentenceFromIndex, findSentenceBoundary.
1467
1468 2007-05-04  Adele Peterson  <adele@apple.com>
1469
1470         Reviewed by Hyatt.
1471
1472         Fix for <rdar://problem/5116871> REGRESSION: Can't select options in widget's listbox
1473
1474         Don't use user-select to determine whether or not options can be selected in listboxes.
1475         This will match Firefox behavior for -moz-user-select.
1476
1477         * html/HTMLSelectElement.cpp:
1478         (WebCore::HTMLSelectElement::canSelectAll):
1479         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1480
1481 2007-05-04  Geoffrey Garen  <ggaren@apple.com>
1482
1483         Reviewed by Tim Hatcher.
1484
1485         First step in fixing <rdar://problem/5055182> The back cache has no global cap
1486
1487         Stop giving SnapBack infinite cache-ability. Instead, make SnapBack rely
1488         on the underlying back cache.
1489
1490         * WebCore.exp:
1491         * history/HistoryItem.cpp:
1492         (WebCore::HistoryItem::HistoryItem):
1493         * history/HistoryItem.h:
1494         * loader/FrameLoader.cpp:
1495         (WebCore::FrameLoader::purgePageCache):
1496
1497 2007-05-04  Geoffrey Garen  <ggaren@apple.com>
1498
1499         Reviewed by Brady Eidson.
1500         
1501         Removed export of clearPageCache(), since it was unused externally. I plan
1502         to remove its use from WebCore eventually, too.
1503
1504         Removed usesPageCache(), since it was unused and it duplicated pageCacheSize().
1505
1506         * WebCore.exp:
1507         * history/BackForwardList.cpp:
1508         * history/BackForwardList.h: Moved statics to the top of the class definition.
1509         * loader/FrameLoader.cpp:
1510         (WebCore::FrameLoader::canCachePage):
1511
1512 2007-05-04  Anders Carlsson  <andersca@apple.com>
1513
1514         Reviewed by Antti.
1515
1516         <rdar://problem/5179977> Use the correct URLs when dispatching delegate methods for data loads.
1517
1518         Restore behavior to matching release WebKit by adding a response URL to SubstituteData. If a nil base URL is
1519         passed, set the _request_ URL to "about:blank", but the response URL to a generated "applewebdata" URL.
1520
1521         * loader/FrameLoader.cpp:
1522         (WebCore::FrameLoader::commitProvisionalLoad):
1523         First, check for the SubstituteData's response URL.
1524
1525         (WebCore::FrameLoader::continueAfterNavigationPolicy):
1526         No need to special case applewebdata URLs here, they're only used in the response.
1527
1528         * loader/MainResourceLoader.cpp:
1529         (WebCore::MainResourceLoader::handleDataLoadNow):
1530         If the substitute data has a response URL, use it.
1531
1532         (WebCore::MainResourceLoader::loadNow):
1533         Only load "about:blank" as an empty document if there's no substitute data.
1534
1535         * loader/SubstituteData.h:
1536         (WebCore::SubstituteData::SubstituteData):
1537         (WebCore::SubstituteData::responseURL):
1538         Add responseURL member to SubstituteData.
1539
1540 2007-05-03  Steve Falkenburg  <sfalken@apple.com>
1541
1542         Reviewed by Oliver.
1543
1544         Add missing user description parameter to spelling-related editor client method.
1545
1546         * bridge/EditorClient.h:
1547         * platform/gdk/EditorClientGdk.cpp:
1548         (WebCore::EditorClientGdk::updateSpellingUIWithGrammarString):
1549         * platform/gdk/EditorClientGdk.h:
1550         * platform/graphics/svg/SVGImageEmptyClients.h:
1551         (WebCore::SVGEmptyEditorClient::updateSpellingUIWithGrammarString):
1552
1553 2007-05-03  Brady Eidson  <beidson@apple.com>
1554
1555         Reviewed by Oliver
1556
1557         Resolve an outstanding FIXME in Loader::numRequests()
1558
1559         Before, numRequests() would iterate through the list of requests pending load and the list of currently
1560         loading requests and tally up a count matching the current DocLoader.
1561
1562         I noticed while studying and cleaning up the loader code that numRequests() is potentially very hot!
1563         Indeed load a complex site with many resources and multiple frames, and this method gets called very often,
1564         tallying up this number every time.
1565
1566         The FIXME was to keep a collection of Requests mapped to each DocLoader.  In reality, since this map would
1567         simply be used for retrieving a count, that was overkill.  Keeping a request count in the DocLoader itself
1568         along with maintaining that count in Loader as requests come and go is a much better way to do this.
1569
1570         * loader/DocLoader.cpp:
1571         (WebCore::DocLoader::DocLoader):
1572         (WebCore::DocLoader::incrementRequestCount):
1573         (WebCore::DocLoader::decrementRequestCount):
1574         (WebCore::DocLoader::requestCount): Emulate the defunct Loader::numRequests()
1575         * loader/DocLoader.h:
1576
1577         * loader/FrameLoader.cpp:
1578         (WebCore::numRequests): Call DocLoader::requestCount() directly
1579         (WebCore::FrameLoader::checkCompleted): Use numRequests()
1580
1581         * loader/loader.cpp:
1582         (WebCore::Loader::load): Increment the DocLoader's request count
1583         (WebCore::Loader::servePendingRequests): If the SubresourceLoader failed to create, decrement the count
1584         (WebCore::Loader::didFinishLoading): If the Request is not Multipart, decrement the count
1585         (WebCore::Loader::didFail): If the Request is not Multipart, decrement the count
1586         (WebCore::Loader::didReceiveResponse): If the Request becomes Multipart, decrement the count
1587         (WebCore::Loader::cancelRequests): Decrement the count for the pending requests being tossed, and ASSERT the
1588           count is zero after all requests have been cancelled
1589         * loader/loader.h:
1590
1591 2007-05-03  Geoffrey Garen  <ggaren@apple.com>
1592
1593         Reviewed by Brady Eidson.
1594         
1595         Some cleanup in preparation for fixing <rdar://problem/5055182> The 
1596         back/forward cache has no global cap
1597
1598         * loader/FrameLoader.cpp:
1599         (WebCore::FrameLoader::provisionalLoadStarted): Moved "Can I cache this
1600         page?" logic to canCachePage(). Moved "I am caching this page" logic to
1601         cachePageToHistoryItem().
1602         (WebCore::FrameLoader::canCachePage): Moved above logic here.
1603         (WebCore::FrameLoader::cachePageToHistoryItem): Removed bogus NULL check
1604         and failure return value. Moved above logic here. Don't call setCachedPage()
1605         until the CachedPage is fully constructed.
1606         (WebCore::FrameLoader::purgePageCache): Removed comment that duplicated
1607         the function name.
1608         * loader/FrameLoader.h:
1609
1610 2007-05-03  Justin Garcia  <justin.garcia@apple.com>
1611
1612         Reviewed by harrison.
1613
1614         <rdar://problem/5120281> CrashTracer: [USER] 1 crash in Mail at WebCore::CSSComputedStyleDeclaration::copyInheritableProperties() const
1615
1616         Problem is that checkAncestor and lastClosed can be nil when createMarkup is called unrendered nodes, and that was not checked for.
1617         
1618         * editing/markup.cpp:
1619         (WebCore::createMarkup):
1620         Nil-check checkAncestor and lastClosed.
1621
1622 2007-05-03  Timothy Hatcher  <timothy@apple.com>
1623
1624         Reviewed by Kevin.
1625
1626         <rdar://problem/5016318> Contextual menu item for opening links is missing in compose windows but present in viewer
1627
1628         Add the Open Link, Open Link in New Window, Download Linked File and Copy Link menu
1629         items to the content editable context menu.
1630
1631         * platform/ContextMenu.cpp:
1632         (WebCore::ContextMenu::populate):
1633
1634 2007-05-03  Holger Freyther <freyther@kde.org>
1635
1636         Reviewed by Zack, landed by Simon.
1637         This is bugzilla bug 13499.
1638
1639         * WebCore.pro: Place the Qt port into the qt-port scope, add the Gdk port
1640
1641 2007-05-03  Adele Peterson  <adele@apple.com>
1642
1643         Use BUILDING_ON_TIGER.
1644
1645         * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry):
1646
1647 2007-05-03  Brady Eidson  <beidson@apple.com>
1648
1649         Reviewed by Darin
1650
1651         Some more minor cleanup that resolves a FIXME and ditches another pointless method
1652
1653         No change in functionality == no layout test
1654
1655         * loader/FrameLoader.cpp:
1656         (WebCore::FrameLoader::commitProvisionalLoad):  Updated a comment
1657         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Folded startLoading() into this method
1658         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy): continueAfterWillSubmitForm becomes continueLoadAfterWillSubmitForm
1659         * loader/FrameLoader.h: Removed startLoading()
1660
1661 2007-05-03  Adele Peterson  <adele@apple.com>
1662
1663         Reviewed by Tim Hatcher.
1664
1665         Fix for <rdar://problem/4727607> REGRESSION: KeyScript is deprecated, need a new solution for forcing Roman input for password fields on Leopard
1666
1667         * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry):
1668         Use TSMSetDocumentProperty and TSMRemoveDocumentProperty on Leopard disable and enable non-ascii input sources.
1669
1670 2007-05-03  Brady Eidson  <beidson@apple.com>
1671
1672         Reviewed by Anders
1673
1674         commitProvisionalLoad() was the name of two methods.
1675         One of them was private and only called from one other private place.
1676         This was driving me crazy.  I had to change that.
1677
1678         No change in functionality == no layout test
1679
1680         * loader/FrameLoader.cpp:
1681         (WebCore::FrameLoader::transitionToCommitted): roll commitProvisionalLoad() into this method
1682         * loader/FrameLoader.h: Removed commitProvisionalLoad()
1683
1684 2007-05-03  Darin Adler  <darin@apple.com>
1685
1686         Reviewed by Anders.
1687
1688         - make ICU initialization lazy to speed up application start-up time
1689           (when it includes an initial webpage load)
1690
1691         * platform/TextCodecICU.h: Replaced registerEncodingNames and
1692         registerCodecs with registerBaseEncodingNames, registerBaseCodecs,
1693         registerExtendedEncodingNames, and registerExtendedCodecs.
1694         * platform/TextCodecICU.cpp:
1695         (WebCore::newTextCodecICU): Moved up to the top of the file.
1696         (WebCore::TextCodecICU::registerBaseEncodingNames): Added. Registers
1697         just UTF-8.
1698         (WebCore::TextCodecICU::registerBaseCodecs): Ditto.
1699         (WebCore::TextCodecICU::registerExtendedEncodingNames): Renamed.
1700         (WebCore::TextCodecICU::registerExtendedCodecs): Ditto.
1701         (WebCore::TextCodecICU::createICUConverter): Compare with the name
1702         "GBK" in a way that does not require extending the maps.
1703
1704         * platform/TextEncoding.cpp:
1705         (WebCore::TextEncoding::usesVisualOrdering): Added code so this will
1706         just return false if we haven't used any extended encoding names yet.
1707         The result will be correct, and we won't ask for an encoding name that
1708         will require registering the extended encoding names.
1709         (WebCore::TextEncoding::isJapanese): Ditto.
1710         (WebCore::TextEncoding::backslashAsCurrencySymbol): Ditto, but return
1711         a backslash instead of false.
1712
1713         * platform/TextEncodingRegistry.h: Added a new function named
1714          noExtendedTextEncodingNameUsed.
1715         * platform/TextEncodingRegistry.cpp:
1716         (WebCore::buildBaseTextCodecMaps): Added. Registers the base encodings,
1717         including Latin-1 because it's the default, and the UTF encodings.
1718         (WebCore::extendTextCodecMaps): Added. Registers all the other encodings.
1719         (WebCore::newTextCodec): Removed the all to buildTextCodecMap because
1720         we always build the map when making the canonical encoding name.
1721         (WebCore::atomicCanonicalTextEncodingName): Changed code to build only
1722         the base maps at first, then extend the maps the first time we run into
1723         a name we don't know.
1724         (WebCore::noExtendedTextEncodingNameUsed): Added.
1725
1726 2007-05-03  Mark Rowe  <mrowe@apple.com>
1727
1728         Qt build fix.  In r21185 the Qt version of WebCore::scaleDragImage was
1729         updated to have the incorrect signature.
1730
1731         * platform/qt/DragImageQt.cpp:
1732         (WebCore::scaleDragImage):
1733
1734 2007-05-02  Beth Dakin  <bdakin@apple.com>
1735
1736         * dom/Node.h: Just fixing a variable name because it's driving me 
1737         mad.
1738
1739 2007-05-02  Beth Dakin  <bdakin@apple.com>
1740
1741         Reviewed by Hyatt.
1742
1743         Fix for <rdar://problem/4513966> Never-ending identical repaint @ 
1744         orbitz.com (Safari eating 85% CPU)
1745
1746         We need to be a little bit more savvy about when we do a FULL style 
1747         recalc since it can be unnecessary and expensive.
1748
1749         * css/CSSMutableStyleDeclaration.cpp:
1750         (WebCore::CSSMutableStyleDeclaration::setChanged): Now takes a 
1751         StyleChangeType as a parameter.
1752         (WebCore::CSSMutableStyleDeclaration::setProperty): Send 
1753         InlineStyleChange as the paramter. This is the optimization!
1754         * css/CSSMutableStyleDeclaration.h: setChanged takes a 
1755         StyleChangeType as a parameter.
1756         * dom/Document.cpp: setChanged now takes a StyleChangeType instead 
1757         of a bool.
1758         (WebCore::Document::recalcStyle): Same.
1759         * dom/Element.cpp: 
1760         (WebCore::Element::recalcStyle): This is the fix!! Only set change 
1761         to Force is we use descendant rules AND it's a FullStyleChange.
1762         * dom/Node.cpp: m_hasStyle was an unused bit on Node, so this patch 
1763         gets rid of it and uses that extra bit for m_changed to be a 
1764         StyleChangeType instead of a bool.
1765         (WebCore::Node::Node):
1766         (WebCore::Node::setChanged):
1767         (WebCore::Node::dump):
1768         * dom/Node.h: Same.
1769         (WebCore::): Define the StyleChangeType enum.
1770         (WebCore::Node::hasClass):
1771         (WebCore::Node::changed):
1772         (WebCore::Node::styleChangeType):
1773         (WebCore::Node::setHasClass):
1774         * dom/StyledElement.cpp:
1775         (WebCore::StyledElement::parseMappedAttribute): Don't bother 
1776         calling setHasStyle() since m_hasStyle is gone now. It was never 
1777         used, and this was the only place it was set.
1778         * dom/Text.cpp:
1779         (WebCore::Text::recalcStyle): setChanged now takes a 
1780         StyleChangeType instead of a bool.
1781         * html/HTMLFrameSetElement.cpp:
1782         (WebCore::HTMLFrameSetElement::recalcStyle): Same.
1783         * html/HTMLSelectElement.cpp:
1784         (WebCore::HTMLSelectElement::restoreState): Same.
1785         (WebCore::HTMLSelectElement::reset): Same.
1786         * html/HTMLTextAreaElement.cpp:
1787         (WebCore::HTMLTextAreaElement::setValue): Same.
1788         * ksvg2/misc/SVGTimer.cpp:
1789         (WebCore::SVGTimer::applyAnimations): Same.
1790         * ksvg2/svg/SVGUseElement.cpp:
1791         (WebCore::SVGUseElement::recalcStyle): Same.
1792         * platform/graphics/svg/SVGResource.cpp:
1793         (WebCore::SVGResource::repaintClients): Same.
1794
1795 2007-05-02  David Harrison  <harrison@apple.com>
1796
1797         Reviewed by Antti.
1798
1799         <rdar://problem/4859132> Grammar must always be checked in entire-sentence chunks, and shouldn't show markers for current sentence
1800
1801         Restore the remainder of the original fix now that blocking bug rdar://5174862 is addressed.
1802
1803         John made the original patch on 2007-04-10, but this fell prey to rdar://5157329.
1804         Justin backed out the whole patch on 2007-04-30 to avoid the crash.
1805         Justin then restored most of the original patch, but used word granularity instead, to keep the build working.
1806         I just addressed the root cause of rdar://5157329 in rdar://5174862.
1807         This patch switches the temp uses of word granularity back to sentence granularity.
1808         
1809         * editing/mac/EditorMac.mm:
1810         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
1811         * page/Frame.cpp:
1812         (WebCore::Frame::respondToChangedSelection):
1813
1814 2007-05-02  David Harrison  <harrison@apple.com>
1815
1816         Reviewed by Antti.
1817
1818         <rdar://problem/5174862> Crash resulting from DeprecatedString::insert()
1819         
1820         Test added: editing/selection/move-by-sentence-001.html
1821
1822         * editing/visible_units.cpp:
1823         (WebCore::previousBoundary):
1824         (WebCore::nextBoundary):
1825         Use a UChar Vector instead of DeprecatedString.
1826         Avoid creating an extra string for secure bullet replacement unless it is actually needed.
1827         
1828         * platform/DeprecatedString.cpp:
1829         (WebCore::DeprecatedString::insert):
1830         Call forceUnicode() before setLength(), so that only the unicode buffer is resized.
1831
1832        (WebCore::DeprecatedString::setLength):
1833         Adjust the unicode buffer even if the ascii buffer is valid.
1834         
1835 2007-05-02  Mitz Pettel  <mitz@webkit.org>
1836
1837         Reviewed by Brady.
1838
1839         - http://bugs.webkit.org/show_bug.cgi?id=13564
1840           Remove friend class FrameLoader from Frame
1841
1842         No test added since there is no change in functionality.
1843
1844         * loader/FrameLoader.cpp:
1845         (WebCore::FrameLoader::didOpenURL):
1846         (WebCore::FrameLoader::begin):
1847         (WebCore::FrameLoader::open):
1848         * loader/FrameLoader.h: Made clear() private.
1849         * page/Frame.cpp:
1850         (WebCore::Frame::setDocument): Changed the argument into a PassRefPtr.
1851         * page/Frame.h:
1852         * xml/XSLTProcessor.cpp:
1853         (WebCore::XSLTProcessor::createDocumentFromSource):
1854
1855 2007-05-02  Mitz Pettel  <mitz@webkit.org>
1856
1857         Reviewed by Dave Hyatt.
1858
1859         - fix http://bugs.webkit.org/show_bug.cgi?id=9276
1860           Quirksmode: Image swap resize bug
1861
1862         Test: fast/replaced/image-resize-width.html
1863
1864         * rendering/RenderImage.cpp:
1865         (WebCore::RenderImage::imageChanged): Moved the call to dirtyPrefWidths()
1866         before the call to calcWidth().
1867
1868 2007-05-02  David Hyatt  <hyatt@apple.com>
1869
1870         Fix for bug 13566, broken Dashboard widgets.  setPrefWidthsDirty did
1871         the wrong thing for text children of a positioned element.
1872
1873         Reviewed by mitz
1874
1875         fast/block/positioning/pref-width-change.html
1876
1877         * rendering/RenderObject.cpp:
1878         (WebCore::RenderObject::setPrefWidthsDirty):
1879
1880 2007-05-01  Darin Adler  <darin@apple.com>
1881
1882         * rendering/RenderReplaced.cpp: Fix typo in a comment.
1883
1884 2007-05-01  David Hyatt  <hyatt@apple.com>
1885
1886         Fix for 13558, crash when using absolutely positioned generated content
1887         inside an inline.
1888
1889         Reviewed by darin
1890
1891         fast/css-generated-content/absolute-position-inside-inline.html
1892
1893         * rendering/RenderContainer.cpp:
1894         (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
1895
1896 2007-05-01  Justin Garcia  <justin.garcia@apple.com>
1897
1898         Reviewed by darin
1899
1900         <rdar://problem/5002441> 
1901         Pressing space key does nothing above quoted content or a signature
1902         
1903         Inserting a space under these circumstances inserts a single 
1904         text node containing a regular space and then does a layout. 
1905         That space isn't rendered (which is correct).  Whitespace 
1906         rebalancing is supposed to correct it but failed.  It replaces 
1907         the space with a non-breaking space, but that change doesn't 
1908         dirty line boxes (9441) and so the space isn't rendered.
1909         
1910         This workaround turns all incoming spaces into non-breaking 
1911         spaces before they're inserted (they're rebalanced after 
1912         insertion and turned back into regular spaces if possible).
1913
1914         * editing/InsertTextCommand.cpp:
1915         (WebCore::InsertTextCommand::prepareForTextInsertion): Removed
1916         an old irrelevant FIXME.
1917         (WebCore::InsertTextCommand::input): Turn incoming spaces into
1918         non breaking spaces before inserting them.
1919         
1920 2007-05-01  Darin Adler  <darin@apple.com>
1921
1922         Reviewed by Hyatt.
1923
1924         - fix http://bugs.webkit.org/show_bug.cgi?id=13559
1925           REGRESSION: Canvas aspect ratio is incorrect
1926
1927         - remove intrinsicWidth/Height functions from RenderObject
1928
1929         Test: fast/canvas/canvas-size-change-after-layout.html
1930
1931         * html/HTMLCanvasElement.cpp:
1932         (WebCore::HTMLCanvasElement::createRenderer): Removed code to set
1933         the intrinsic size, because the renderer now takes care of this
1934         in its constructor.
1935         (WebCore::HTMLCanvasElement::reset): Instead of calling the
1936         setIntrinsicWidth/Height functions, call canvasSizeChanged, which
1937         takes care of layout, but only if the size actually changed. Also
1938         call repaint if the contents of the canvas changed.
1939
1940         * rendering/RenderApplet.h:
1941         * rendering/RenderApplet.cpp: (WebCore::RenderApplet::intrinsicSize):
1942         Override the new intrinsicSize function. This override still doesn't
1943         make sense, so left a FIXME in here.
1944
1945         * rendering/RenderBox.h: Added an intrinsicSize function here to replace
1946         the intrinsicWidth/Height functions removed from RenderObject.
1947         * rendering/RenderBox.cpp:
1948         (WebCore::RenderBox::calcReplacedWidthUsing): Use intrinsicSize instead
1949         of intrinsicWidth.
1950         (WebCore::RenderBox::calcReplacedHeightUsing): Ditto, but for height.
1951
1952         * rendering/RenderHTMLCanvas.h: Changed the constructor parameter to be
1953         an HTMLCanvasElement* instead of Node*. Also added a canvasSizeChanged
1954         function.
1955         * rendering/RenderHTMLCanvas.cpp:
1956         (WebCore::RenderHTMLCanvas::RenderHTMLCanvas): Pass an initial intrinsic
1957         size based on the current size of the canvas element. This is now the
1958         responsibility of the renderer and the DOM element calls the canvasSizeChanged
1959         function when the size changes.
1960         (WebCore::RenderHTMLCanvas::paint): Removed checks of the type of the element,
1961         and used the node() function because we don't have to worry about the anonymous
1962         case in this class.
1963         (WebCore::RenderHTMLCanvas::canvasSizeChanged): Added. Changes the size and
1964         then calls setNeedsLayout and setPrefWidthsDirty as needed. I based the logic
1965         here on careful reading of RenderImage::imageChanged.
1966
1967         * rendering/RenderImage.cpp:
1968         (WebCore::RenderImage::RenderImage): Pass a default intrinsic size of 0,0
1969         instead of calling setIntrinsicWidth/Height.
1970         (WebCore::RenderImage::setImageSizeForAltText): Call the new intrinsic size
1971         functions instead of the width/height ones. Simplifies the logic since we
1972         handle both dimensions at once.
1973         (WebCore::RenderImage::imageChanged): Ditto.
1974         (WebCore::RenderImage::layout): Ditto.
1975         (WebCore::RenderImage::calcAspectRatioWidth): Ditto.
1976         (WebCore::RenderImage::calcAspectRatioHeight): Ditto.
1977
1978         * rendering/RenderObject.h: Removed intrinsicWidth/Height virtual functions.
1979
1980         * rendering/RenderReplaced.h: Replaced intrinsicWidth, intrinsicHeight,
1981         setIntrinsicWidth, setIntrinsicHeight, m_intrinsicWidth, and m_intrinsicHeight
1982         with intrinsicSize, setIntrinsicSize, and m_intrinsicSize.
1983         * rendering/RenderReplaced.cpp:
1984         (WebCore::RenderReplaced::RenderReplaced): Added a second contructor that takes
1985         an intrinsic size parameter. Also updated constructor since the intrinsic size
1986         is now an IntSize instead of two integers.
1987         (WebCore::RenderReplaced::intrinsicSize): Added. No point in making this inline
1988         because it's a virtual function.
1989         (WebCore::RenderReplaced::setIntrinsicSize): Added. Didn't make this inline,
1990         partly because in the future we might want this to be more than just a simple
1991         setter function, factoring in common code used in both RenderImage and
1992         RenderHTMLCanvas.
1993
1994         * rendering/RenderWidget.h: Removed a stray using declaration that wasn't needed.
1995
1996 2007-05-01  David Hyatt  <hyatt@apple.com>
1997
1998         Fix for hang when incorrectly trying to add before/after content to
1999         a <select>.  Disallow generated content in all selects and also turn it
2000         off for <input> buttons.
2001
2002         Reviewed by aroben
2003
2004         * rendering/RenderBlock.cpp:
2005         (WebCore::RenderBlock::setStyle):
2006         * rendering/RenderButton.cpp:
2007         (WebCore::RenderButton::canHaveChildren):
2008         * rendering/RenderButton.h:
2009
2010 2007-05-01  Darin Adler  <darin@apple.com>
2011
2012         Reviewed by Hyatt.
2013
2014         - removed the m_implicit bit from Node, freeing up a bit
2015
2016         - fixed <rdar://problem/5172607> XML parser is creating implicit tbody elements
2017         - fixed <rdar://problem/5172596> HTML-parser-created tbody elements are being
2018           ignored when processing CSS child rules
2019
2020         Test: fast/css/child-selector-implicit-tbody.html
2021
2022         * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::checkSelector):
2023         Removed code that used to look at implicitNode(), which no longer exists.
2024
2025         * css/html4.css: Added a style rule to handle cases where we have a tr
2026         inside a table with no intervening table section.
2027
2028         * dom/Node.h: Removed the bit.
2029         * dom/Node.cpp:
2030         (WebCore::Node::Node): Don't initialize the bit.
2031         (WebCore::Node::dump): Don't dump the bit.
2032
2033         * dom/XMLTokenizer.cpp:
2034         (WebCore::XMLTokenizer::startElementNs): Remove the code that made a
2035         table body element. This is handled in the render tree, the DOM tree
2036         should not be mangled.
2037         (WebCore::XMLTokenizer::endElementNs): Removed code that used to look at
2038         implicitNode(), which no longer exists.
2039
2040         * html/HTMLElementFactory.cpp: (WebCore::tableSectionConstructor):
2041         Removed boolean parameter that was passed to the HTMLTableSectionElement
2042         constructor.
2043         * html/HTMLParser.cpp: (WebCore::HTMLParser::handleError): Ditto.
2044         * html/HTMLTableElement.cpp:
2045         (WebCore::HTMLTableElement::createTHead): Ditto.
2046         (WebCore::HTMLTableElement::createTFoot): Ditto.
2047         (WebCore::HTMLTableElement::insertRow): Changed to return a PassRefPtr,
2048         because it's possible the row could be removed from the table by JavaScript
2049         code responding to DOM mutation events before the function returns. Just
2050         something I noticed by code inspection.
2051
2052         * html/HTMLTableSectionElement.cpp:
2053         (WebCore::HTMLTableSectionElement::HTMLTableSectionElement): Removed
2054         boolean "implicit" parameter to the constructor.
2055         (WebCore::HTMLTableSectionElement::insertRow): Changed to return a
2056         PassRefPtr for the same reason cited above.
2057
2058         * html/HTMLTableElement.h: Changed the return value of insertRow to be
2059         a PassRefPtr.
2060         * html/HTMLTableSectionElement.h: Ditto.
2061
2062 2007-04-30  David Hyatt  <hyatt@apple.com>
2063
2064         Fix for bug 12691, generated content and display: table-cell duplicates
2065         content on a size change.  Make sure that the code to update before/after
2066         content is smart enough to drill into anonymous containers to find the
2067         old child.
2068
2069         Reviewed by olliej
2070
2071         Added fast/css-generated-content/table-cell-before-content.html
2072
2073         * rendering/RenderBlock.cpp:
2074         (WebCore::RenderBlock::setStyle):
2075         * rendering/RenderButton.cpp:
2076         (WebCore::RenderButton::updateBeforeAfterContent):
2077         * rendering/RenderButton.h:
2078         * rendering/RenderContainer.cpp:
2079         (WebCore::RenderContainer::beforeAfterContainer):
2080         (WebCore::RenderContainer::updateBeforeAfterContent):
2081         (WebCore::RenderContainer::updateBeforeAfterContentForObject):
2082         * rendering/RenderContainer.h:
2083         * rendering/RenderInline.cpp:
2084         (WebCore::RenderInline::setStyle):
2085         (WebCore::RenderInline::addChildToFlow):
2086         (WebCore::RenderInline::splitInlines):
2087
2088 2007-04-30  Jungshik Shin <jungshik.shin@gmail.com>
2089
2090         Reviewed by justin
2091         
2092         <http://bugs.webkit.org/show_bug.cgi?id=13552>
2093         comment to Range::comparePoint in dom/Range.cpp has 
2094         '0xD0' in place of '-': leading to a compiler warning
2095
2096         * dom/Range.cpp:
2097         (WebCore::Range::comparePoint):
2098
2099 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
2100
2101         Reviewed by darin
2102
2103         <rdar://problem/4875189> List gets deleted when replacing contents
2104
2105         * editing/ReplaceSelectionCommand.cpp:
2106         (WebCore::ReplaceSelectionCommand::doApply): Don't expand
2107         to include elements, like lists, when deleting a selection 
2108         to replace it.
2109
2110 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
2111
2112         Reviewed by ggaren
2113         
2114         Buildfix.  Leave in grammar checking machinery to 
2115         keep WebKit building on other platforms but don't
2116         operate on sentence sized chunks so that we don't
2117         re-introduce 5157329.
2118
2119         * editing/Editor.h:
2120         * editing/mac/EditorMac.mm:
2121         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
2122         (WebCore::markMisspellingsOrBadGrammar):
2123         (WebCore::Editor::markMisspellings):
2124         (WebCore::Editor::markBadGrammar):
2125         * page/Frame.cpp:
2126         (WebCore::Frame::respondToChangedSelection):
2127
2128 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
2129
2130         Reviewed by darin
2131
2132         <rdar://problem/5168598> 
2133         Crash when deleting a link inside an input field
2134         
2135         Deletion code tries to update one of its positions to keep 
2136         it valid and nullifies it.  Later in mergeParagraphs we try 
2137         to find out if it's valid by checking to see if it's still in 
2138         the document and crash.
2139         
2140         The fix is just to not bother keeping the position, 
2141         m_upstreamStart, valid, since after the point in the code 
2142         under examination, it doesn't need to be valid anymore.  
2143         Besides, code to update DeleteSelectionCommand's positions 
2144         should go in the functions that handle the content removal 
2145         that might invalid them (there are already FIXMEs about this).
2146         
2147         Also, users shouldn't be able to insert links (or any rich content)
2148         into plaintext-only regions like text fields, even if those
2149         text fields are inside richly editable regions.  This is a 
2150         separate bug and is filed as 5171552.
2151
2152         * editing/DeleteSelectionCommand.cpp:
2153         (WebCore::DeleteSelectionCommand::handleGeneralDelete): Don't
2154         bother updating m_upstreamStart.
2155
2156 2007-04-30  Patti Hoa  <patti@apple.com>
2157
2158         Reviewed by Dave Hyatt.
2159         
2160         <rdar://problem/5108546> REGRESSION: Zoom follows keyboard focus does not work
2161
2162         * WebCore.xcodeproj/project.pbxproj:
2163         Add new file SelectionControllerMac.mm
2164         * dom/Document.cpp:
2165         (WebCore::Document::updateSelection):
2166         Move the code to fire off AXSelectedTextChanged notification to a new method notifyAccessibilityForSelectionChange in SelectionControllerMac.mm
2167         * editing/SelectionController.cpp:
2168         (WebCore::SelectionController::setSelection):
2169         call notifyAccessibilityForSelectionChange to handle firing of accessibility notification and zoomFocusChange
2170         * editing/SelectionController.h:
2171         Add notifyAccessibilityForSelectionChange method for Mac platform
2172         * platform/Widget.h:
2173         * platform/mac/WidgetMac.mm:
2174         (WebCore::Widget::convertToScreenCoordinate):
2175         Add a helper routine that takes IntPoint in local coordinate and convert that to screen coordinate
2176
2177 2007-04-30  Justin Garcia  <justin.garcia@apple.com>
2178
2179         Reviewed by harrison
2180
2181         <rdar://problem/5157329> 
2182         REGRESSION: Crash at WTF::fastFree() when arrowing or deleting backward through editable text (13493)
2183         
2184         Backing out the changes for 4859132.
2185
2186         * editing/Editor.h:
2187         * editing/mac/EditorMac.mm:
2188         (WebCore::Editor::markMisspellingsAfterTypingToPosition):
2189         (WebCore::Editor::markMisspellings):
2190         * page/Frame.cpp:
2191         (WebCore::Frame::respondToChangedSelection):
2192
2193 2007-04-29  Antti Koivisto  <antti@apple.com>
2194
2195         Reviewed by Oliver.
2196
2197         Fix <rdar://problem/5169261>
2198         REGRESSION: Google Maps zooming too sensitive when using two fingers on trackpad
2199         
2200         Use line based delta values when generating DOM wheel events, use pixel deltas
2201         for scrolling only.
2202         
2203         No test case, requires user interaction and specific hardware.
2204
2205         * page/EventHandler.cpp:
2206         (WebCore::EventHandler::handleWheelEvent):
2207         * platform/PlatformWheelEvent.h:
2208         (WebCore::PlatformWheelEvent::continuousDeltaX):
2209         (WebCore::PlatformWheelEvent::continuousDeltaY):
2210         * platform/mac/WheelEventMac.mm:
2211         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2212
2213 2007-04-29  Oliver Hunt  <oliver@apple.com>
2214
2215         Reviewed by Brady.
2216
2217         Build fix for experimental features build
2218
2219         * rendering/RenderForeignObject.cpp:
2220
2221 2007-04-29  Mitz Pettel  <mitz@webkit.org>
2222
2223         Reviewed by Dave Hyatt.
2224
2225         - fix http://bugs.webkit.org/show_bug.cgi?id=13544
2226           REGRESSION (r21120): Member profile frame not erased at Yahoo! Answers
2227
2228         Test: fast/repaint/layer-hide-when-needs-layout.html
2229
2230         * rendering/RenderObject.cpp:
2231         (WebCore::RenderObject::setStyle): If we get a layout hint, we count on
2232         layout() or updateLayerPositions() to repaint. In the case of a layer
2233         going invisible, however, we need to repaint here since neither of the
2234         above will do it.
2235
2236 2007-04-29  Oliver Hunt  <oliver@apple.com>
2237
2238         Reviewed by Steve.
2239
2240         Fix for <rdar://problem/5126393> REGRESSION (r19672-19697): Safari drag image drags at original size (13261)
2241
2242         Added logic to ensure that when we create the drag image
2243         we're looking at the rendered image size.
2244
2245         * page/DragController.cpp:
2246         (WebCore::DragController::doImageDrag):
2247           Pass the rendered image size to fitDragImageToMaxSize
2248
2249         * platform/DragImage.cpp:
2250         (WebCore::fitDragImageToMaxSize):
2251            Need to do scaling relative to rendered image size
2252
2253         * platform/DragImage.h:
2254            scaleDragImage needs x and y scales to allow for them to be
2255            scaled seperately on a page
2256
2257         * platform/gdk/DragImageGdk.cpp:
2258         (WebCore::scaleDragImage):
2259            Prevent build bustage
2260
2261         * platform/mac/DragImageMac.mm:
2262         (WebCore::scaleDragImage):
2263            scale width and height independently
2264
2265         * platform/qt/DragImageQt.cpp:
2266         (WebCore::scaleDragImage):
2267            Prevent build bustage
2268
2269 2007-04-29  Darin Adler  <darin@apple.com>
2270
2271         Reviewed by Adele.
2272
2273         - fix the Gmail part of http://bugs.webkit.org/show_bug.cgi?id=12798
2274           and <rdar://problem/4118559>
2275
2276         This patch changes things so that resizing can make things larger than their
2277         initial size, but not smaller. I believe this resolves the problem for Gmail,
2278         but you can still get strange behavior if you have a small right-aligned <textarea>.
2279
2280         * rendering/RenderLayer.cpp:
2281         (WebCore::RenderLayer::resize): Rewrote to use more IntPoint and IntSize and add
2282         in a new minimum-size algorithm. This function now has the side effect of storing
2283         a new minimumSizeForResizing in the element being resized, and respects any existing
2284         minimum as well.
2285         (WebCore::RenderLayer::offsetFromResizeCorner): Reversed this so it converts the
2286         point into coordinates relative to the resize corner, hence negative numbers mean
2287         the point is above and to the left. This is used only in the algorithm above.
2288
2289         * dom/Element.h: Removed unneeded include of Attr.h, and added forward declarations
2290         as needed. Removed all friend declarations; there was no need for any of them.
2291         Tweaked formatting of various declarations and removed unneeded parameter names.
2292         Made as much as possible private, and a couple things public to avoid the need for
2293         friend classes. Added minimumSizeForResizing, setMinimumSizeForResizing, rareData,
2294         and createRareData functions.
2295
2296         * dom/Element.cpp:
2297         (WebCore::rareDataMap): Added. Function to return the single global map.
2298         (WebCore::rareDataFromMap): Added. For use by inlined functions to get the
2299         data from the map in the case where it's present.
2300         (WebCore::ElementRareData::ElementRareData): Added.
2301         (WebCore::Element::~Element): Added code to delete the element from the rare
2302         data map when appropriate.
2303         (WebCore::Element::rareData): Added.
2304         (WebCore::Element::createRareData): Added.
2305         (WebCore::Element::setAttributeNodeNS): Got rid of the old inline version of this,
2306         since it was the sole reason we had to include Attr.h in Element.h.
2307         (WebCore::Element::minimumSizeForResizing): Added. Accesses rare data.
2308         (WebCore::Element::setMinimumSizeForResizing): Ditto.
2309
2310         * dom/Node.h: Renamed the m_specified bit since it's now used for two purposes.
2311         Its new long name is m_attrWasSpecifiedOrElementHasRareData.
2312
2313         * dom/Attr.cpp: (WebCore::Attr::Attr): Updated for bit name change.
2314         * dom/Attr.h:
2315         (WebCore::Attr::specified): Ditto.
2316         (WebCore::Attr::setSpecified): Added, since setting the bit directly is pretty ugly now.
2317         * dom/Document.cpp: (WebCore::Document::adoptNode): Updated for bit name change.
2318         * dom/Node.cpp:
2319         (WebCore::Node::Node): Ditto.
2320         (WebCore::Node::dump): Ditto.
2321
2322         * dom/NamedAttrMap.cpp: (WebCore::NamedAttrMap::isReadOnlyNode): Moved out of line,
2323         since this was the sole reason we had to include Element.h in NamedAttrMap.h.
2324
2325         * html/HTMLElement.cpp:
2326         (WebCore::HTMLElement::nodeName): Changed to use tagQName() since that's a public
2327         way to do something that's now private.
2328         (WebCore::HTMLElement::cloneNode): Ditto.
2329
2330         * dom/Attribute.cpp:
2331         * dom/NamedAttrMap.h:
2332         * dom/NamedMappedAttrMap.cpp:
2333         * dom/StyledElement.h:
2334         * html/HTMLTokenizer.h:
2335         * xml/XPathFunctions.cpp:
2336         * xml/XPathStep.cpp:
2337         Updated includes, and other administrivia.
2338
2339 2007-04-29  Mitz Pettel  <mitz@webkit.org>
2340
2341         Reviewed by Darin and Hyatt.
2342
2343         - http://bugs.webkit.org/show_bug.cgi?id=13487
2344           Implement O(1) absoluteClippedOverflowRect and absoluteOutlineBox during layout for a possible speed gain
2345
2346         Test for a bug fixed by this patch: fast/repaint/intermediate-layout-position-clip.html
2347
2348         By keeping track of the total translation and clip during layout, absolutePosition and
2349         computeAbsoluteRepaintRect become O(1).
2350
2351         * WebCore.pro: Added LayoutState.cpp
2352         * WebCore.vcproj/WebCore/WebCore.vcproj: Added LayoutState.{cpp,h}
2353         * WebCore.xcodeproj/project.pbxproj: Added LayoutState.{cpp,h}
2354         * WebCoreSources.bkl: Added LayoutState.cpp
2355         * page/FrameView.cpp:
2356         (WebCore::FrameView::layout): When doing subtree layout, push an initial layout state for the
2357         layout root.
2358         * rendering/LayoutState.cpp: Added. A LayoutState corresponding to a box consists of the origin of
2359         its coordinate system in view coordinates and possibly the clip rect, in view coordinates, which
2360         applies to its children.
2361         (WebCore::LayoutState::LayoutState):
2362         (WebCore::LayoutState::destroy):
2363         (WebCore::throw):
2364         (WebCore::LayoutState::operator delete):
2365         * rendering/LayoutState.h: Added.
2366         (WebCore::LayoutState::LayoutState):
2367         * rendering/RenderBlock.cpp:
2368         (WebCore::RenderBlock::layoutBlock): Factored out the "only positioned objects" case into
2369         layoutOnlyPositionedObjects(). Added code to push/pop LayoutState, unless we have columns, in
2370         which case we disable/enable LayoutState. Removed the translation by the layout delta
2371         of the old absolute rects, since that is now integral to absoluteClippedOverflowRect() and
2372         absoluteOutlineBox().
2373         (WebCore::RenderBlock::layoutOnlyPositionedObjects): Added this helper function that checks for
2374         and handles the case where only positioned objects need layout. Returns true in that case.
2375         (WebCore::RenderBlock::repaintOverhangingFloats): Disabled LayoutState when repainting floats, since
2376         they may belong to other containers.
2377         (WebCore::RenderBlock::updateFirstLetter): Disabled LayoutState when adding and removing from the
2378         first letter container, since it may be different than ourselves.
2379         * rendering/RenderBlock.h:
2380         * rendering/RenderBox.cpp:
2381         (WebCore::RenderBox::setStyle): Minor cleanup: changed element()->document() to the equivalent document().
2382         (WebCore::RenderBox::offsetForPositionedInContainer): Added. Factored out common code from
2383         absolutePosition, computeAbsoluteRepaintRect and RenderLayer::updateLayerPosition into this function.
2384         (WebCore::RenderBox::absolutePosition): Added an O(1) code path when this function is called during
2385         layout (and LayoutState has not been disabled). Factored out some code into
2386         offsetForPositionedInContainer.
2387         (WebCore::RenderBox::absoluteClippedOverflowRect): Added the layout delta here, so callers don't need
2388         to.
2389         (WebCore::RenderBox::computeAbsoluteRepaintRect): Added an O(1) code path when this function is called
2390         during layout (and LayoutState has not been disabled). Factored out some code into
2391         offsetForPositionedInContainer.
2392         * rendering/RenderContainer.cpp:
2393         (WebCore::RenderContainer::layout): Added LayoutState push/pop.
2394         * rendering/RenderFlexibleBox.cpp:
2395         (WebCore::RenderFlexibleBox::layoutBlock): Factored out the "only positioned objects" case into
2396         layoutOnlyPositionedObjects(). Added LayoutState push/pop. Removed the translation by the layout delta
2397         of the old absolute rects, since that is now integral to absoluteClippedOverflowRect() and
2398         absoluteOutlineBox().
2399         * rendering/RenderFlow.cpp:
2400         (WebCore::RenderFlow::absoluteClippedOverflowRect): Added an ASSERT.
2401         * rendering/RenderForeignObject.cpp:
2402         (WebCore::RenderForeignObject::layout): Disabled LayoutState because it is incompatible with arbitrary
2403         affine transforms.
2404         * rendering/RenderHTMLCanvas.cpp:
2405         (WebCore::RenderHTMLCanvas::layout): Removed the translation by the layout delta of the old absolute
2406         rects, since that is now integral to absoluteClippedOverflowRect() and absoluteOutlineBox().
2407         * rendering/RenderImage.cpp:
2408         (WebCore::RenderImage::layout): Ditto.
2409         * rendering/RenderLayer.cpp:
2410         (WebCore::RenderLayer::updateLayerPositions): Added ASSERTs. Factored out some code into
2411         RenderBox::offsetForPositionedInContainer.
2412         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Disabled LayoutState around the call to
2413         scrollToOffset.
2414         * rendering/RenderListItem.cpp:
2415         (WebCore::RenderListItem::updateMarkerLocation): Disabled LayoutState when moving the list marker, since
2416         it can trigger repainting in other containers.
2417         * rendering/RenderObject.cpp:
2418         (WebCore::RenderObject::isRoot): Minor cleanup: changed element()->document() to the equivalent
2419         document().
2420         (WebCore::RenderObject::computeAbsoluteRepaintRect): Removed 'return' at the end of the function.
2421         (WebCore::RenderObject::container): Reordered to avoid calling isText() twice.
2422         (WebCore::RenderObject::absoluteOutlineBox): Added the layout delta here, so callers don't need to.
2423         * rendering/RenderSVGContainer.cpp:
2424         (WebCore::RenderSVGContainer::layout): Disabled LayoutState because it is incompatible with arbitrary
2425         affine transforms.
2426         * rendering/RenderTable.cpp:
2427         (WebCore::RenderTable::layout):  Factored out the "only positioned objects" case into
2428         layoutOnlyPositionedObjects(). Added LayoutState push/pop. Removed the translation by the layout delta
2429         of the old absolute rects, since that is now integral to absoluteClippedOverflowRect() and
2430         absoluteOutlineBox().
2431         * rendering/RenderTableCell.cpp:
2432         (WebCore::RenderTableCell::absoluteClippedOverflowRect): Added the layout delta here, so callers
2433         don't need to.
2434         (WebCore::RenderTableCell::computeAbsoluteRepaintRect): For the O(1) code path, skipped the correction
2435         for the parent row, because RenderTableRow doesn't push a translation into LayoutState.
2436         (WebCore::RenderTableCell::absolutePosition): Ditto.
2437         * rendering/RenderTableRow.cpp:
2438         (WebCore::RenderTableRow::layout): Added LayoutState push/pop.
2439         * rendering/RenderTableSection.cpp:
2440         (WebCore::RenderTableSection::setCellWidths): Added LayoutState push/pop if cells are repainted or
2441         receive layout.
2442         (WebCore::RenderTableSection::calcRowHeight): Ditto.
2443         (WebCore::RenderTableSection::layoutRows): Added LayoutState push/pop.
2444         * rendering/RenderView.cpp:
2445         (WebCore::RenderView::RenderView):
2446         (WebCore::RenderView::layout): Added initial LayoutState setup for the layout.
2447         (WebCore::RenderView::paintBoxDecorations): Minor cleanup: changed element()->document() to the
2448         equivalent document().
2449         (WebCore::RenderView::repaintViewRectangle): Ditto.
2450         (WebCore::RenderView::pushLayoutState): Added. Pushes initial layout state for subtree layout.
2451         * rendering/RenderView.h:
2452         (WebCore::RenderView::pushLayoutState):
2453         (WebCore::RenderView::popLayoutState):
2454         (WebCore::RenderView::layoutState):
2455         (WebCore::RenderView::disableLayoutState):
2456         (WebCore::RenderView::enableLayoutState):
2457
2458 2007-04-29  David Hyatt  <hyatt@apple.com>
2459
2460         Fix for bugzilla 13535, regression from positioning cleanup a while
2461         back.  Some code got added to compute available width for a relpositioned
2462         inline, only the code meant to be used for inline flows and not inline blocks.
2463
2464         Reviewed by mjs
2465
2466         fast/block/positioning/inline-block-relposition.html
2467
2468         * rendering/RenderBox.cpp:
2469         (WebCore::RenderBox::containingBlockWidthForPositioned):
2470
2471 2007-04-29  Oliver Hunt  <oliver@apple.com>
2472
2473         Reviewed by Zack.
2474
2475         Implement basic drag and drop support for qt
2476         this allows content and link dragging but does not
2477         provide the DOM data access methods.
2478
2479         * platform/DragData.h:
2480         * platform/qt/ClipboardQt.cpp:
2481         (WebCore::ClipboardQt::ClipboardQt):
2482         (WebCore::ClipboardQt::~ClipboardQt):
2483         (WebCore::ClipboardQt::clearData):
2484         (WebCore::ClipboardQt::clearAllData):
2485         (WebCore::ClipboardQt::setData):
2486         (WebCore::ClipboardQt::declareAndWriteDragImage):
2487         (WebCore::ClipboardQt::writeURL):
2488         (WebCore::ClipboardQt::writeRange):
2489         (WebCore::ClipboardQt::hasData):
2490         * platform/qt/ClipboardQt.h:
2491         (WebCore::ClipboardQt::clipboardData):
2492         (WebCore::ClipboardQt::invalidateWritableData):
2493         * platform/qt/DragDataQt.cpp:
2494         (WebCore::DragData::canSmartReplace):
2495         (WebCore::DragData::containsPlainText):
2496         (WebCore::DragData::asPlainText):
2497         (WebCore::DragData::createClipboard):
2498         (WebCore::DragData::containsCompatibleContent):
2499         (WebCore::DragData::containsURL):
2500         (WebCore::DragData::asURL):
2501         (WebCore::DragData::asFragment):
2502
2503 2007-04-28  Maciej Stachowiak  <mjs@apple.com>
2504
2505         Reviewed by Darin and Oliver.
2506
2507         - change Document to hold onto Frame* instead of FrameView*
2508         
2509         This is an architectural cleanup and a prerequisite to fixing citibank login
2510         in an architecturally sound way.
2511
2512         Some fixups for the page cache:
2513         
2514         * history/CachedPage.cpp:
2515         (WebCore::CachedPage::restore): Add an assert that the document's view
2516         matches the cached page's view - this needs to be true by the time this
2517         function is called.
2518         (WebCore::CachedPage::clear): Change assert to require frame matching, not
2519         view matching.
2520         * history/CachedPage.h:
2521         (WebCore::CachedPage::view): Add a way to get the view out.
2522         * loader/FrameLoader.cpp:
2523         (WebCore::FrameLoader::begin): pass Frame, not FrameView, when creating document
2524         (WebCore::FrameLoader::open): restore view based on CachedPage, not Document. 
2525
2526         Remaining changes are just straightforward updates based on which
2527         pointer is held or passed:
2528         
2529         * dom/DOMImplementation.cpp:
2530         (WebCore::DOMImplementation::createDocument):
2531         (WebCore::DOMImplementation::createHTMLDocument):
2532         * dom/DOMImplementation.h:
2533         * dom/Document.cpp:
2534         (WebCore::Document::Document):
2535         (WebCore::Document::view):
2536         (WebCore::Document::frame):
2537         (WebCore::Document::recalcStyle):
2538         (WebCore::Document::updateLayout):
2539         (WebCore::Document::attach):
2540         (WebCore::Document::detach):
2541         (WebCore::Document::createTokenizer):
2542         (WebCore::Document::recalcStyleSelector):
2543         (WebCore::Document::setInPageCache):
2544         (WebCore::Document::applyXSLTransform):
2545         * dom/Document.h:
2546         * html/HTMLDocument.cpp:
2547         (WebCore::HTMLDocument::HTMLDocument):
2548         * html/HTMLDocument.h:
2549         * html/HTMLViewSourceDocument.cpp:
2550         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
2551         * html/HTMLViewSourceDocument.h:
2552         * ksvg2/svg/SVGDocument.cpp:
2553         (WebCore::SVGDocument::SVGDocument):
2554         * ksvg2/svg/SVGDocument.h:
2555         * loader/ImageDocument.cpp:
2556         (WebCore::ImageDocument::ImageDocument):
2557         * loader/ImageDocument.h:
2558         * loader/PluginDocument.cpp:
2559         (WebCore::PluginDocument::PluginDocument):
2560         * loader/PluginDocument.h:
2561         * loader/TextDocument.cpp:
2562         (WebCore::TextDocument::TextDocument):
2563         * loader/TextDocument.h:
2564         * xml/XSLTProcessor.cpp:
2565         (WebCore::XSLTProcessor::createDocumentFromSource):
2566         (WebCore::XSLTProcessor::transformToDocument):
2567         * xml/XSLTProcessor.h:
2568
2569 2007-04-28  Adele Peterson  <adele@apple.com>
2570
2571         RS by Darin.
2572
2573         Update to fix for <rdar://problem/5152299>
2574
2575         Test: fast/events/no-blur-on-enter-button.html
2576
2577         * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::defaultEventHandler):
2578         Don't blur the button when handling the enter key.  This matches our new behavior for input elements.
2579
2580 2007-04-28  Adele Peterson  <adele@apple.com>
2581
2582         Fix by Darin, reviewed by me.
2583
2584         Fix for <rdar://problem/5152299> REGRESSION: <button> elements do not respond to space and return key as similar <input> elements do
2585
2586         Tests:
2587         fast/forms/button-spacebar-click.html
2588         fast/forms/button-enter-click.html
2589
2590         * html/HTMLButtonElement.h: (WebCore::HTMLButtonElement::): Made type enum private.
2591         Removed unnecessary m_value and m_currValue, and unused m_dirty.
2592         * html/HTMLButtonElement.cpp:
2593         (WebCore::HTMLButtonElement::HTMLButtonElement): Removed initialization of m_dirty.
2594         (WebCore::HTMLButtonElement::parseMappedAttribute): Removed case to parse value and accesskey attributes, which don't do anything.
2595         (WebCore::HTMLButtonElement::defaultEventHandler): Removed unnecessary check for button type.
2596          Added cases to handle spacebar and enter keys in the same way that they're handled for <input type=button/reset/submit> buttons.
2597         (WebCore::HTMLButtonElement::isSuccessfulSubmitButton): Shortened comment.
2598         (WebCore::HTMLButtonElement::appendFormData): Use value() instead of m_currValue.  Renamed encoding argument to formData.
2599
2600 2007-04-28  Mitz Pettel  <mitz@webkit.org>
2601
2602         Reviewed by Darin.
2603
2604         - fix http://bugs.webkit.org/show_bug.cgi?id=13501
2605           REGRESSION (r21093): Pasting into text field fails and makes the caret disappear
2606
2607         Test: fast/dynamic/anonymous-block-layer-lost.html
2608
2609         * rendering/RenderBlock.cpp:
2610         (WebCore::RenderBlock::removeChild): Avoid cutting off layers when removing
2611         the anonymous block.
2612
2613 2007-04-28  Mitz Pettel  <mitz@webkit.org>
2614
2615         Reviewed by Darin.
2616
2617         - fix http://bugs.webkit.org/show_bug.cgi?id=13471
2618           REGRESSION (r21045): Secure keyboard entry mode remains in effect after leaving a password field by submitting
2619
2620         * loader/FrameLoader.cpp:
2621         (WebCore::FrameLoader::clear): Replaced direct access to Frame's d->m_doc
2622         with a call to Frame::setDocument.
2623         (WebCore::FrameLoader::begin): Ditto.
2624         (WebCore::FrameLoader::open): Ditto.
2625         (WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady): Ditto.
2626         (WebCore::FrameLoader::canCachePage): Added a comment.
2627         * manual-tests/secure-keyboard-enabled-after-submit.html: Added.
2628         * page/Frame.cpp:
2629         (WebCore::Frame::setDocument): Reset secure keyboard entry, in case the
2630         old document's focused node has set it.
2631
2632 2007-04-28  Mitz Pettel  <mitz@webkit.org>
2633
2634         Reviewed by Adele.
2635
2636         - fix http://bugs.webkit.org/show_bug.cgi?id=13379
2637           REGRESSION: Cannot add an option to a selected popup
2638
2639         * manual-tests/update-empty-popup.html: Added.
2640         * platform/mac/PopupMenuMac.mm:
2641         (WebCore::PopupMenu::show): Added a call to the client's hidePopup()
2642         callback before returning in the case that the menu is empty. Otherwise
2643         the client thinks that the menu stayed open.
2644
2645 2007-04-28  Adele Peterson  <adele@apple.com>
2646
2647         Reviewed by Darin.
2648
2649         Fix for <rdar://problem/4806988> REGRESSION: history.go(0) doesn't reload page (affects buttons at facebook.com)
2650
2651         Test: fast/history/history_reload.html
2652
2653         * loader/FrameLoader.cpp: (WebCore::FrameLoader::scheduleHistoryNavigation):
2654         We avoid doing a redirection when going to the same url in a history navigation, but we have to still
2655         schedule a redirection when the number of steps is zero so we can force a reload.
2656
2657 2007-04-28  Alexey Proskuryakov  <ap@webkit.org>
2658
2659         Reviewed by Darin.
2660
2661         http://bugs.webkit.org/show_bug.cgi?id=13514
2662         REGRESSION (r20997-21003): Crash in WebCore::Node::document
2663
2664         Test: fast/dom/NodeList/childNodes-reset-cache.html
2665
2666         * dom/Node.cpp:
2667         (WebCore::Node::notifyLocalNodeListsChildrenChanged): Reset the common caches for child node
2668         lists. We cannot rely on notifications, since there may be no list objects left around.
2669
2670         * dom/ChildNodeList.cpp:
2671         (WebCore::ChildNodeList::rootNodeChildrenChanged):
2672         * dom/ChildNodeList.h:
2673         Override rootNodeChildrenChanged() with an empty implementation, now that caches are reset
2674         in Node::notifyLocalNodeListsChildrenChanged().
2675
2676 2007-04-28  Mark Rowe  <mrowe@apple.com>
2677
2678         Build fix.  Change use of nil to 0 in C++ source file.
2679
2680         * editing/Editor.cpp:
2681         (WebCore::Editor::increaseSelectionListLevel):
2682         (WebCore::Editor::increaseSelectionListLevelOrdered):
2683         (WebCore::Editor::increaseSelectionListLevelUnordered):
2684
2685 2007-04-28  Darin Adler  <darin@apple.com>
2686
2687         Reviewed by Adele.
2688
2689         - fix http://bugs.webkit.org/show_bug.cgi?id=6216
2690           REGRESSION: getElementsByTagNameNS with empty namespace doesn't work
2691
2692         * dom/Node.cpp:
2693         (WebCore::TagNodeList::TagNodeList): Changed parameter to PassRefPtr, tweaked formatting.
2694         (WebCore::TagNodeList::item): Tweaked formatting.
2695         (WebCore::TagNodeList::nodeMatches): Tweaked formatting.
2696         (WebCore::Node::setPrefix): Tweaked formatting.
2697         (WebCore::Node::getElementsByTagNameNS): Added special case to turn empty namespaces into
2698         null namespaces.
2699
2700 2007-04-28  Darin Adler  <darin@apple.com>
2701
2702         Reviewed by Kevin Decker.
2703
2704         - fix <rdar://problem/5148271> Chinese numbers are incorrect in numbered lists
2705           (including pasting from TextEdit to Mail)
2706
2707         Covered by an existing regression test, which had wrong results checked in.
2708
2709         Hyatt told me not to use the algorithm in the CSS 3 specification, but I didn't listen!
2710         This corrects mistakes there and makes our results match current Firefox.
2711
2712         * rendering/RenderListMarker.cpp:
2713         (WebCore::toCJKIdeographic): Added code to strip off trailing zero digits.
2714         Added special case for zero, since that's the one case where we don't want
2715         to strip off trailing zero digits. Fixed mixed-up logic that would put the
2716         digits in each group backwards.
2717         (WebCore::listMarkerText): Corrected character values for the CJK_IDEOGRAPHIC case.
2718
2719 2007-04-28  Darin Adler  <darin@apple.com>
2720
2721         Reviewed by Oliver.
2722
2723         - fix <rdar://problem/5138250> REGRESSION (r18245): Changing any one aspect
2724           of a font applies all the aspects to selected text
2725
2726         Since this bug is only visible with the font panel, I don't
2727         think there's any way to make a DumpRenderTree-driven test.
2728
2729         * editing/Editor.cpp: (WebCore::Editor::fontForSelection):
2730         Set hasMultipleFonts properly. The old code had an early exit
2731         that was left over from when hasMultipleFonts was a pointer.
2732
2733 2007-04-27  Mitz Pettel  <mitz@webkit.org>
2734
2735         Reviewed by Dave Hyatt.
2736
2737         - fix http://bugs.webkit.org/show_bug.cgi?id=13525
2738           Repainting a listbox schedules a relayout
2739
2740         No test possible as there is no change to functionality.
2741
2742         - fix the root cause of http://bugs.webkit.org/show_bug.cgi?id=10862
2743           REGRESSION: Collapsing form input on www.myspace.com
2744
2745         No test possible since text fields are no longer implemented as flexboxes.
2746
2747         * rendering/RenderObject.cpp:
2748         (WebCore::RenderObject::scheduleRelayout): Added a check that the subtree
2749         root is in the tree and not free-floating.
2750         * rendering/bidi.cpp:
2751         (WebCore::RenderBlock::bidiReorderCharacters): Changed addChild and removeChild
2752         to appendChildNode and removeChildNode to save some unnecessary overhead.
2753         These calls still mark the tree for relayout, but the change in scheduleRelayout 
2754         ensures that a layout won't be scheduled.
2755
2756 2007-04-27  Patti Hoa  <patti@apple.com>
2757
2758         Reviewed by Darin.
2759         
2760         <rdar://problem/5153017> REPRODUCIBLE ASSERT: range != nil in WebViewFactory.mm:415 -[WebViewFactory startOfTextMarkerRange:] (13354)
2761         
2762         * bridge/mac/WebCoreAXObject.mm:
2763         (-[WebCoreAXObject textMarkerRangeForRange:]):
2764         Fix the range length check.  It was incorrectly assuming that the max range requested cannot be equal
2765         to the length of the string.  Since NSRange location is index based, it's perfectly valid to have the max
2766         range equal to the the text length.
2767
2768 2007-04-27  David Harrison  <harrison@apple.com>
2769
2770         Reviewed by Darin.
2771
2772         <rdar://problem/5160627> Export JS list creation support as ObjC SPI for Mail
2773
2774         * WebCore.exp:
2775         * editing/Editor.h:
2776         * editing/Editor.cpp:
2777         (WebCore::Editor::insertOrderedList):
2778         (WebCore::Editor::insertUnorderedList):
2779         (WebCore::Editor::canIncreaseSelectionListLevel):
2780         (WebCore::Editor::canDecreaseSelectionListLevel):
2781         (WebCore::Editor::increaseSelectionListLevel):
2782         (WebCore::Editor::increaseSelectionListLevelOrdered):
2783         (WebCore::Editor::increaseSelectionListLevelUnordered):
2784         (WebCore::Editor::decreaseSelectionListLevel):
2785         Add insertOrderedList() and insertUnorderedList().
2786         Move existing list management functions from WebCoreFrameBridge.
2787         The level increasing functions now return a PassRefPtr<Node> instead of Node.
2788         Add check for canEditRichly.
2789         
2790         - in many other functions, condense the check for nil client().
2791         
2792         * editing/InsertListCommand.h:
2793         * editing/InsertListCommand.cpp:
2794         (WebCore::InsertListCommand::insertList):
2795         (WebCore::InsertListCommand::fixOrphanedListChild):
2796         (WebCore::InsertListCommand::doApply):
2797         Add insertList(), which returns the new list element.
2798         Don't set the list element's ID if the specified ID was an empty string.
2799                 
2800         * editing/ModifySelectionListLevel.h:
2801         * editing/ModifySelectionListLevel.cpp:
2802         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelWithType):
2803         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel):
2804         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered):
2805         (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered):
2806         Return PassRefPtr<Node> instead of Node.
2807
2808         * page/mac/WebCoreFrameBridge.h:
2809         * page/mac/WebCoreFrameBridge.mm:
2810         Move list management functions to Editor.h and Editor.cpp.
2811
2812
2813 2007-04-27  David Hyatt  <hyatt@apple.com>
2814
2815         Fix for <rdar://problem/5134254>, toolbar buttons don't work in gmail after double-click.  Make sure
2816         to clear out the capturing frame, since you don't get a second up when a double-click happens.
2817
2818         Reviewed by mjs
2819
2820         * page/EventHandler.cpp:
2821         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2822
2823 2007-04-27  Justin Garcia  <justin.garcia@apple.com>
2824
2825         Reviewed by oliver
2826
2827         <rdar://problem/5164796> 
2828         Enable execCommand("CreateLink", ...) for caret selections
2829
2830         * editing/CreateLinkCommand.cpp:
2831         (WebCore::CreateLinkCommand::doApply): For a caret
2832         selection, insert a link at the caret position
2833         with the url as the link text.
2834         * editing/JSEditor.cpp: Enable CreateLink for caret 
2835         selections.
2836
2837 2007-04-27  Antti Koivisto  <antti@apple.com>
2838
2839         Reviewed by Darin, Hyatt.
2840         
2841         Fix http://bugs.webkit.org/show_bug.cgi?id=13081
2842         Empty table cells not handled correctly
2843         <rdar://problem/5067926>
2844         
2845         To match Firefox and IE, empty table cells with variable width need to be
2846         treated as special case. They generally get zero width.
2847
2848         * rendering/AutoTableLayout.cpp:
2849         (WebCore::AutoTableLayout::recalcColumn):
2850         (WebCore::AutoTableLayout::calcEffectiveWidth):
2851         (WebCore::AutoTableLayout::layout):
2852         * rendering/AutoTableLayout.h:
2853         (WebCore::AutoTableLayout::Layout::Layout):
2854         * rendering/RenderStyle.h:
2855         (WebCore::RenderStyle::hasPadding):
2856
2857 2007-04-27  Rob Buis  <buis@kde.org>
2858
2859         Reviewed by Oliver.
2860
2861         http://bugs.webkit.org/show_bug.cgi?id=13052
2862         Text not rendered in a second inline SVG element
2863
2864         Correct the rendering of svg text when embedded in non-svg container.
2865
2866         * rendering/RenderSVGText.cpp:
2867         (WebCore::RenderSVGText::paint):
2868
2869 2007-04-27  Mark Rowe  <mrowe@apple.com>
2870
2871         Reviewed by Maciej.
2872
2873         * WebCore.pro: Remove non-existent paths from qmake files.
2874
2875 2007-04-25  Lars Naesbye Christensen <lars@naesbye.dk>
2876
2877         Reviewed by Timothy Hatcher.
2878
2879         http://bugs.webkit.org/show_bug.cgi?id=13477
2880         Bug 13477: Help and context menu cursors need dropshadows.
2881
2882         * Resources/cellCursor.png:
2883         * Resources/contextMenuCursor.png:
2884         * Resources/helpCursor.png:
2885         * platform/mac/CursorMac.mm:
2886         (WebCore::contextMenuCursor):
2887         (WebCore::copyCursor):
2888         (WebCore::progressCursor):
2889         (WebCore::noDropCursor):
2890
2891 2007-04-27  Holger Freyther <freyther@kde.org>
2892
2893         Reviewed by Maciej.
2894
2895         Remove unmaintained CMake build system.
2896
2897         * CMakeLists.txt: Removed.
2898
2899 2007-04-26  Matt Perry  <mpComplete@gmail.com>
2900
2901         Reviewed by Maciej.
2902
2903         Added a version check to hackAroundLibXMLEntityBug, since that bug has
2904         been fixed in recent versions of libxml2.
2905
2906         * dom/XMLTokenizer.cpp:
2907         (WebCore::hackAroundLibXMLEntityBug):
2908
2909 2007-04-26  Christopher Brichford  <chrisb@adobe.com>
2910
2911         Reviewed by Timothy Hatcher.
2912
2913         - Fix for Bug 13204: Submit initial version of mac project files for apollo
2914           port of WebCore
2915           http://bugs.webkit.org/show_bug.cgi?id=13204
2916
2917         * WebCore.apolloproj/mac/WebCore.Debug.xcconfig: Added.
2918         * WebCore.apolloproj/mac/WebCore.Release.xcconfig: Added.
2919         * WebCore.apolloproj/mac/WebCore.xcconfig: Added.
2920         * WebCore.apolloproj/mac/WebCore.xcodeproj/project.pbxproj: Added.
2921
2922 2007-04-26  Alp Toker  <alp@atoker.com>
2923
2924         Reviewed by Maciej.
2925
2926         http://bugs.webkit.org/show_bug.cgi?id=13505
2927         Cast loses precision on x86_64
2928
2929         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2930         (WebCore::GraphicsContext::beginTransparencyLayer):
2931         (WebCore::GraphicsContext::endTransparencyLayer):
2932         Use a stack of opacity values instead of Cairo user data.
2933
2934 2007-04-26  Mitz Pettel  <mitz@webkit.org>
2935
2936         Reviewed by Darin.
2937
2938         - fix http://bugs.webkit.org/show_bug.cgi?id=13500
2939           REGRESSION: Listbox scrollbar does not reflect actual scrolled position when selected option is added after layout
2940
2941         Test: fast/forms/listbox-scrollbar-incremental-load.html
2942
2943         The scroller position was not updated correctly during insertion, since
2944         scrollbar proportions are updated only during layout
2945
2946         * rendering/RenderListBox.cpp:
2947         (WebCore::RenderListBox::selectionChanged): Delay scrolling to reveal the
2948         selection until after layout if m_optionsChanged is set. Layout is
2949         guaranteed to happen soon when the flag is set.
2950
2951 2007-04-26  David Hyatt  <hyatt@apple.com>
2952
2953         Fix for 13511, crash on a counters page.  Make sure that RenderTexts
2954         never get a null StringImpl.  I would have added an assert that the length
2955         had to be nonzero also, but unfortunately editing creates empty RenderTexts
2956         because of its EditingText DOM subclass that always forces renderers to be
2957         made.  I suppose there is a good reason for this...
2958
2959         Reviewed by aroben
2960
2961         * dom/CharacterData.cpp:
2962         (WebCore::CharacterData::setData):
2963         (WebCore::CharacterData::appendData):
2964         (WebCore::CharacterData::insertData):
2965         (WebCore::CharacterData::deleteData):
2966         (WebCore::CharacterData::replaceData):
2967         * rendering/RenderCounter.cpp:
2968         (WebCore::RenderCounter::RenderCounter):
2969         * rendering/RenderText.cpp:
2970         (WebCore::RenderText::RenderText):
2971         (WebCore::RenderText::trimmedPrefWidths):
2972         (WebCore::RenderText::setTextWithOffset):
2973         (WebCore::RenderText::setTextInternal):
2974         (WebCore::RenderText::setText):
2975
2976 2007-04-26  Alice Liu  <alice.liu@apple.com>
2977
2978         Reviewed by Oliver.
2979
2980         * editing/SelectionController.cpp:
2981         (WebCore::SelectionController::selectAll):
2982         adding null check
2983
2984 2007-04-26  Justin Garcia  <justin.garcia@apple.com>
2985
2986         Reviewed by oliver
2987
2988         <rdar://problem/5120591> 
2989         Crash when creating a link in Leopard wiki server
2990
2991         * editing/CreateLinkCommand.cpp:
2992         (WebCore::CreateLinkCommand::doApply): Use a RefPtr,
2993         setting the anchor's href can destroy it if there is
2994         an ancestor with a subtree modified event listener.
2995
2996 2007-04-26  Mitz Pettel  <mitz@webkit.org>
2997
2998         Reviewed by hyatt
2999
3000         - http://bugs.webkit.org/show_bug.cgi?id=13496
3001           Eliminate repaintObjectsBeforeLayout
3002
3003         No tests added since there is no change to functionality. Several
3004         tests in fast/repaint test repainting of objects that move during layout.
3005
3006         * page/FrameView.cpp:
3007         (WebCore::FrameView::layout):
3008         * rendering/RenderBlock.cpp:
3009         (WebCore::RenderBlock::layoutBlockChildren): Removed an early
3010         setNeedsLayout(false). Resetting the bit here prevents the full repaint
3011         that we rely on when we decide not to repaint children that move.
3012         * rendering/RenderBlock.h:
3013         * rendering/RenderObject.cpp:
3014         * rendering/RenderObject.h:
3015         * rendering/RenderTableSection.cpp:
3016         (WebCore::RenderTableSection::setCellWidths): Replaced the call to
3017         repaintObjectsBeforeLayout() if the cell didn't need layout with
3018         an unconditional repaint(). We don't bother with repainting only the
3019         delta between the old and new widths, since by marking the cell for
3020         layout results in a full repaint with the new width anyway.
3021
3022 2007-04-26  David Hyatt  <hyatt@apple.com>
3023
3024         Fix for 13509.  Don't recur to parent inline flows if they have been
3025         marked as needing layout themselves.
3026
3027         Reviewed by adele
3028
3029         * rendering/RenderFlow.cpp:
3030         (WebCore::RenderFlow::dirtyLinesFromChangedChild):
3031
3032 2007-04-26  Matt Perry  <mpComplete@gmail.com>
3033
3034         Reviewed and landed by Alexey.
3035
3036         http://bugs.webkit.org/show_bug.cgi?id=13495
3037         Crash when referencing an undefined entity in an XHTML document
3038
3039         Test: fast/parser/badentity.xhtml
3040
3041         * dom/XMLTokenizer.cpp:
3042         (WebCore::getEntityHandler): Check for a NULL returned from getXHTMLEntity
3043
3044 2007-04-26  Anders Carlsson  <andersca@apple.com>
3045
3046         Reviewed by Hyatt.
3047
3048         <rdar://problem/4851944>
3049         REGRESSION: With TOT, BMP images can no longer be opened in the browser window
3050         
3051         On Tiger, the MIME type for the com.microsoft.bmp UTI isn't in the registry, so add it manually.
3052         
3053         * platform/MimeTypeRegistry.cpp:
3054         (WebCore::initialiseSupportedImageMIMETypes):
3055
3056 2007-04-26  David Hyatt  <hyatt@apple.com>
3057
3058         Fix for bug 13503, invalidateContainingBlockPrefWidths is 15% of the
3059         nesting PLT.  Avoid O(n^2) behavior by including inlines in the minmax
3060         dirty chain.
3061
3062         Reviewed by kevin
3063
3064         * rendering/RenderBlock.cpp:
3065         (WebCore::RenderBlock::calcInlinePrefWidths):
3066         * rendering/RenderObject.cpp:
3067         (WebCore::RenderObject::setPrefWidthsDirty):
3068         (WebCore::RenderObject::invalidateContainerPrefWidths):
3069         * rendering/RenderObject.h:
3070
3071 2007-04-26  Anders Carlsson  <andersca@apple.com>
3072
3073         Reviewed by Darin.
3074
3075         <rdar://problem/5067925>
3076         Reproducible crash (infinite recursion) with a layout test that submits on unload (13078)
3077         
3078         Ask the document loader whether it's loading the main resource, since there are cases where the frame 
3079         loader's variable isn't updated correctly.
3080         
3081         In the distant future, the frame loader shouldn't have an instance variable but this is the least intrusive fix for now.
3082         
3083         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,
3084         calling submit in the onunload prevents any new tests from loading!
3085         
3086         * loader/FrameLoader.cpp:
3087         (WebCore::FrameLoader::isLoading):
3088
3089 2007-04-26  Anders Carlsson  <andersca@apple.com>
3090
3091         ... and fix the build.
3092         
3093         * loader/FrameLoader.cpp:
3094         (WebCore::FrameLoader::continueAfterNavigationPolicy):
3095
3096 2007-04-26  Anders Carlsson  <andersca@apple.com>
3097
3098         Revert the previous change - activeDocumentLoader never returns the policy document loader.
3099         Instead, add a null check for the policy document loader.
3100         
3101         * loader/FrameLoader.cpp:
3102         (WebCore::FrameLoader::continueAfterNavigationPolicy):
3103
3104 2007-04-26  Anders Carlsson  <andersca@apple.com>
3105
3106         Use the active document loader instead of the policy document loader.
3107         
3108         * loader/FrameLoader.cpp:
3109         (WebCore::FrameLoader::continueAfterNavigationPolicy):
3110
3111 2007-04-26  Anders Carlsson  <andersca@apple.com>
3112
3113         Reviewed by Maciej.
3114
3115         <rdar://problem/5049099> documents no longer have a default base URL
3116
3117         Don't call canHandleRequest if we have valid substitute data and the protocol is "applewebdata".
3118         
3119         * loader/FrameLoader.cpp:
3120         (WebCore::FrameLoader::continueAfterNavigationPolicy):
3121
3122 2007-04-25  Stephanie Lewis <slewis@apple.com>
3123
3124         Reviewed by Darin.
3125
3126         Fix the build for platforms that overload the abs function.        
3127
3128         * dom/ChildNodeList.cpp:
3129         (WebCore::ChildNodeList::item):
3130
3131 2007-04-25  David Hyatt  <hyatt@apple.com>
3132
3133         Fix for bug 13373, make sure to invalidate the pref widths for objects
3134         with percentage padding.
3135
3136         Reviewed by beth
3137
3138         * rendering/RenderBlock.cpp:
3139         (WebCore::RenderBlock::layoutBlockChildren):
3140         (WebCore::RenderBlock::layoutPositionedObjects):
3141         * rendering/bidi.cpp:
3142         (WebCore::RenderBlock::layoutInlineChildren):
3143
3144 2007-04-25  David Harrison  <harrison@apple.com>
3145
3146         Comment change. Correct the header name in the endif comment.
3147         
3148         * editing/FormatBlockCommand.h:
3149         Change InsertListCommand_h to FormatBlockCommand_h.
3150
3151 2007-04-25  Darin Adler  <darin@apple.com>
3152
3153         Reviewed by Hyatt.
3154
3155         * platform/AtomicString.cpp: (WebCore::AtomicString::add):
3156         Removed unnecessary use of strlen to check if a string is empty.
3157
3158 2007-04-25  Mitz Pettel  <mitz@webkit.org>
3159
3160         Build fix.
3161
3162         * rendering/RenderListMarker.h: Undeleted the m_text member.
3163
3164 2007-04-25  David Hyatt  <hyatt@apple.com>
3165
3166         Rearchitect calcPrefWidths.  The calculation is now done lazily only when minPrefWidth
3167         or maxPrefWidth are asked for.  The result of the calculation is cached.
3168
3169         The new invalidation scheme for pref width invalidation follows the
3170         containing block hierarchy and knows to halt at positioned objects, since
3171         they cannot influence the size of their containers.
3172
3173         Reviewed by darin
3174
3175         * css/cssstyleselector.cpp:
3176         (WebCore::CSSStyleSelector::init):
3177         (WebCore::CSSStyleSelector::initForStyleResolve):
3178         * page/FrameView.cpp:
3179         (WebCore::FrameView::layout):
3180         * rendering/RenderApplet.cpp:
3181         (WebCore::RenderApplet::layout):
3182         * rendering/RenderBlock.cpp:
3183         (WebCore::RenderBlock::makeChildrenNonInline):
3184         (WebCore::RenderBlock::removeChild):
3185         (WebCore::RenderBlock::layout):
3186         (WebCore::RenderBlock::layoutBlock):
3187         (WebCore::RenderBlock::calcPrefWidths):
3188         (WebCore::InlineMinMaxIterator::endOfInline):
3189         (WebCore::shouldGrowTableCellForImage):
3190         (WebCore::RenderBlock::calcInlinePrefWidths):
3191         (WebCore::RenderBlock::calcBlockPrefWidths):
3192         * rendering/RenderBlock.h:
3193         * rendering/RenderBox.cpp:
3194         (WebCore::RenderBox::setStyle):
3195         (WebCore::RenderBox::minPrefWidth):
3196         (WebCore::RenderBox::maxPrefWidth):
3197         (WebCore::RenderBox::calcWidth):
3198         (WebCore::RenderBox::calcWidthUsing):
3199         (WebCore::RenderBox::calcAbsoluteHorizontal):
3200         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
3201         * rendering/RenderBox.h:
3202         * rendering/RenderContainer.cpp:
3203         (WebCore::RenderContainer::removeChildNode):
3204         (WebCore::RenderContainer::appendChildNode):
3205         (WebCore::RenderContainer::insertChildNode):
3206         (WebCore::RenderContainer::layout):
3207         * rendering/RenderContainer.h:
3208         (WebCore::RenderContainer::moveChildNode):
3209         * rendering/RenderCounter.cpp:
3210         (WebCore::RenderCounter::dirtyLineBoxes):
3211         (WebCore::RenderCounter::calcPrefWidths):
3212         * rendering/RenderCounter.h:
3213         * rendering/RenderFileUploadControl.cpp:
3214         (WebCore::RenderFileUploadControl::calcPrefWidths):
3215         * rendering/RenderFlexibleBox.cpp:
3216         (WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
3217         (WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
3218         (WebCore::RenderFlexibleBox::calcPrefWidths):
3219         (WebCore::RenderFlexibleBox::layoutBlock):
3220         * rendering/RenderForeignObject.cpp:
3221         (WebCore::RenderForeignObject::layout):
3222         * rendering/RenderFrameSet.cpp:
3223         (WebCore::RenderFrameSet::layout):
3224         * rendering/RenderHTMLCanvas.cpp:
3225         (WebCore::RenderHTMLCanvas::layout):
3226         * rendering/RenderImage.cpp:
3227         (WebCore::RenderImage::layout):
3228         * rendering/RenderInline.cpp:
3229         * rendering/RenderInline.h:
3230         * rendering/RenderListBox.cpp:
3231         (WebCore::RenderListBox::updateFromElement):
3232         (WebCore::RenderListBox::calcPrefWidths):
3233         * rendering/RenderListItem.cpp:
3234         (WebCore::firstNonMarkerChild):
3235         (WebCore::RenderListItem::updateMarkerLocation):
3236         (WebCore::RenderListItem::calcPrefWidths):
3237         (WebCore::RenderListItem::layout):
3238         * rendering/RenderListMarker.cpp:
3239         (WebCore::RenderListMarker::layout):
3240         (WebCore::RenderListMarker::calcPrefWidths):
3241         (WebCore::RenderListMarker::updateMargins):
3242         * rendering/RenderListMarker.h:
3243         * rendering/RenderObject.cpp:
3244         (WebCore::RenderObject::RenderObject):
3245         (WebCore::RenderObject::removeChildNode):
3246         (WebCore::RenderObject::moveChildNode):
3247         (WebCore::RenderObject::appendChildNode):
3248         (WebCore::RenderObject::insertChildNode):
3249         (WebCore::RenderObject::setPrefWidthsDirty):
3250         (WebCore::RenderObject::invalidateContainingBlockPrefWidths):
3251         (WebCore::RenderObject::information):
3252         (WebCore::RenderObject::setStyle):
3253         * rendering/RenderObject.h:
3254         (WebCore::RenderObject::layer):
3255         (WebCore::RenderObject::hasLayer):
3256         (WebCore::RenderObject::prefWidthsDirty):
3257         (WebCore::RenderObject::setNeedsLayoutAndPrefWidthsRecalc):
3258         (WebCore::RenderObject::setHasLayer):
3259         * rendering/RenderPartObject.cpp:
3260         (WebCore::RenderPartObject::layout):
3261         * rendering/RenderSVGContainer.cpp:
3262         (WebCore::RenderSVGContainer::layout):
3263         * rendering/RenderSVGContainer.h:
3264         * rendering/RenderSVGHiddenContainer.cpp:
3265         * rendering/RenderSVGHiddenContainer.h:
3266         * rendering/RenderSVGText.cpp:
3267         (WebCore::RenderSVGText::layout):
3268         * rendering/RenderTable.cpp:
3269         (WebCore::RenderTable::calcWidth):
3270         (WebCore::RenderTable::layout):
3271         (WebCore::RenderTable::removeChildNode):
3272         * rendering/RenderTable.h:
3273         * rendering/RenderTableRow.cpp:
3274         (WebCore::RenderTableRow::layout):
3275         * rendering/RenderTableSection.cpp:
3276         (WebCore::RenderTableSection::removeChildNode):
3277         * rendering/RenderTableSection.h:
3278         * rendering/RenderText.cpp:
3279         (WebCore::RenderText::trimmedPrefWidths):
3280         (WebCore::isSpaceAccordingToStyle):
3281         (WebCore::RenderText::minPrefWidth):
3282         (WebCore::RenderText::maxPrefWidth):
3283         (WebCore::RenderText::calcPrefWidths):
3284         (WebCore::RenderText::width):
3285         * rendering/RenderText.h:
3286         * rendering/RenderView.cpp:
3287         (WebCore::RenderView::RenderView):
3288         (WebCore::RenderView::calcPrefWidths):
3289         (WebCore::RenderView::layout):
3290         * rendering/RenderWidget.cpp:
3291         (WebCore::RenderWidget::layout):
3292
3293 2007-04-25  Steve Falkenburg  <sfalken@apple.com>
3294
3295         Reviewed by Adam.
3296
3297         Fix spelling error in spelling method name.
3298         Expose new spelling callback methods to all platforms.
3299
3300         * bridge/EditorClient.h:
3301         * platform/gdk/EditorClientGdk.cpp:
3302         (WebCore::EditorClientGdk::updateSpellingUIWithGrammarString):
3303         * platform/gdk/EditorClientGdk.h:
3304         * platform/graphics/svg/SVGImageEmptyClients.h:
3305         (WebCore::SVGEmptyEditorClient::updateSpellingUIWithGrammarString):
3306         (WebCore::SVGEmptyEditorClient::getGuessesForWord):
3307
3308 2007-04-24  Geoffrey Garen  <ggaren@apple.com>
3309
3310         Reviewed by Darin Adler, Tim Hatcher.
3311
3312         Fixed a few NSAutoreleasePool issues I noticed while reviewing Brady's patch.
3313
3314         * platform/graphics/mac/GraphicsContextMac.mm:
3315         (WebCore::GraphicsContext::setCompositeOperation): Call -drain instead of 
3316         -release, since -release is a no-op in a GC world.
3317
3318 2007-04-25  Alexey Proskuryakov  <ap@webkit.org>
3319
3320         Reviewed by Darin.
3321
3322         http://bugs.webkit.org/show_bug.cgi?id=13445
3323         NodeList access by index is slow
3324
3325         * dom/ChildNodeList.cpp:
3326         (WebCore::ChildNodeList::item): Support iterating backwards from the last accessed node
3327         or from the last child.
3328         * dom/NodeList.h: Make cachedLength unsigned.
3329
3330 2007-04-26  Mark Rowe  <mrowe@apple.com>
3331
3332         Gdk build fix.  Add missing stub.
3333
3334         * platform/gdk/TemporaryLinkStubs.cpp:
3335         (Editor::advanceToNextMisspelling):
3336
3337 2007-04-25  Rob Buis  <buis@kde.org>
3338
3339         Reviewed by Darin.
3340
3341         http://bugs.webkit.org/show_bug.cgi?id=12163
3342         SVG text does not appear in a scrolling <div>
3343
3344         Make sure SVG text is painted when scrolling by taking into account the relative offset of the non-SVG parent in the paintInfo rect.
3345
3346         * rendering/RenderSVGContainer.cpp:
3347         (WebCore::RenderSVGContainer::paint):
3348
3349 2007-04-26  Mark Rowe  <mrowe@apple.com>
3350
3351         Fix non-Mac builds after r21081.
3352
3353         Stub out new Editor methods for Qt and Gdk, and new SVGEmptyEditorClient methods
3354         for all non-Mac builds.
3355
3356         * editing/qt/EditorQt.cpp:
3357         (WebCore::Editor::showSpellingGuessPanel):
3358         (WebCore::Editor::spellingPanelIsShowing):
3359         * page/qt/EventHandlerQt.cpp:
3360         (WebCore::EventHandler::passWheelEventToWidget):
3361         (WebCore::EventHandler::passMousePressEventToScrollbar):
3362         * platform/gdk/TemporaryLinkStubs.cpp:
3363         (Editor::showSpellingGuessPanel):
3364         (Editor::spellingPanelIsShowing):
3365         * platform/graphics/svg/SVGImageEmptyClients.h:
3366         (WebCore::SVGEmptyEditorClient::ignoreWordInSpellDocument):
3367         (WebCore::SVGEmptyEditorClient::learnWord):
3368         (WebCore::SVGEmptyEditorClient::checkSpellingOfString):
3369         (WebCore::SVGEmptyEditorClient::checkGrammarOfString):
3370         (WebCore::SVGEmptyEditorClient::udpateSpellingUIWithGrammarString):
3371         (WebCore::SVGEmptyEditorClient::updateSpellingUIWithMisspelledWord):
3372         (WebCore::SVGEmptyEditorClient::showSpellingUI):
3373         (WebCore::SVGEmptyEditorClient::spellingUIIsShowing):
3374         (WebCore::SVGEmptyEditorClient::getGuessesForWord):
3375
3376 2007-04-25  Anders Carlsson  <andersca@apple.com>
3377
3378         Reviewed by Ada.
3379
3380         <rdar://problem/5122153>
3381         Crash occurs at WebCore::Frame::loader() when switching to Bookmarks view while loading standalone image
3382
3383         Don't call writeRawData if the data length is 0. (This is checked by the decoder for the non-raw case).
3384
3385         * loader/FrameLoader.cpp:
3386         (WebCore::FrameLoader::write):
3387
3388 2007-04-26  Mark Rowe  <mrowe@apple.com>
3389
3390         Gdk build fix courtesy of Alp Toker.
3391
3392         * make-generated-sources.sh:  Remove conditional logic to ensure the
3393         script exits with the correct exit code.
3394
3395 2007-04-24  Anders Carlsson  <andersca@apple.com>
3396
3397         Reviewed by Mitz.
3398
3399         <rdar://problem/4869095> 
3400         default content type for XMLHttpRequest POSTs changed (breaks Flickrator 0.1 widget)
3401         
3402         Use the right MIME type.
3403         
3404         * xml/xmlhttprequest.cpp:
3405         (WebCore::XMLHttpRequest::send):
3406
3407 2007-04-24  Darin Adler  <darin@apple.com>
3408
3409         Reviewed by Maciej.
3410
3411         - second round of preparation for Hyatt's "lazy minMaxWidth" change
3412           http://bugs.webkit.org/show_bug.cgi?id=13431
3413
3414         These are small changes that are either safe to do first, or unrelated to the main
3415         change in Hyatt's patch.
3416
3417         - Preallocate 4 entries each in m_layoutStruct and m_spanCells to save allocation
3418           in AutoTableLayout.
3419         - Add an early exit to RenderFlow::dirtyLinesFromChangedChild.
3420         - Change InlineBox::hasTextChildren() to use a bit directly and never a virtual function.
3421         - Save a virtual function call by using a local bool variable for isTableCell().
3422
3423         - Fix containingBlock() so it returns 0 for table cells with no parent.
3424
3425         - Change all callers who are getting at layer() as a boolean to use hasLayer().
3426         - Change if statements to max() function calls (only the ones Hyatt had in his patch).
3427         - Remove some old kdDebug calls.
3428         - Tweak formatting of some code.
3429         - Add const in one place.
3430
3431         * bindings/js/kjs_html.cpp:
3432         (KJS::HTMLElementFunction::callAsFunction):
3433         * page/EventHandler.cpp:
3434         (WebCore::EventHandler::eventMayStartDrag):
3435         * page/Frame.cpp:
3436         (WebCore::Frame::clearTimers):
3437         * rendering/AutoTableLayout.cpp:
3438         (WebCore::AutoTableLayout::recalcColumn):
3439         * rendering/AutoTableLayout.h:
3440         * rendering/InlineBox.h:
3441         (WebCore::InlineBox::InlineBox):
3442         (WebCore::InlineBox::hasTextChildren):
3443         * rendering/InlineFlowBox.cpp:
3444         (WebCore::InlineFlowBox::nodeAtPoint):
3445         * rendering/InlineFlowBox.h:
3446         (WebCore::InlineFlowBox::InlineFlowBox):
3447         * rendering/RenderBlock.cpp:
3448         (WebCore::RenderBlock::layoutBlock):
3449         (WebCore::RenderBlock::repaintOverhangingFloats):
3450         (WebCore::RenderBlock::paintChildren):
3451         (WebCore::RenderBlock::paintFloats):
3452         (WebCore::RenderBlock::fillBlockSelectionGaps):
3453         (WebCore::RenderBlock::insertFloatingObject):
3454         (WebCore::RenderBlock::floatRect):
3455         (WebCore::RenderBlock::lowestPosition):
3456         (WebCore::RenderBlock::rightmostPosition):
3457         (WebCore::RenderBlock::leftmostPosition):
3458         (WebCore::RenderBlock::addOverhangingFloats):
3459         (WebCore::RenderBlock::nodeAtPoint):
3460         (WebCore::RenderBlock::hitTestContents):
3461         (WebCore::RenderBlock::calcPrefWidths):
3462         (WebCore::InlineMinMaxIterator::next):
3463         (WebCore::getBorderPaddingMargin):
3464         (WebCore::RenderBlock::calcInlinePrefWidths):
3465         (WebCore::RenderBlock::calcBlockPrefWidths):
3466         * rendering/RenderContainer.cpp:
3467         (WebCore::RenderContainer::appendChildNode):
3468         (WebCore::RenderContainer::insertChildNode):
3469         * rendering/RenderFlexibleBox.cpp:
3470         (WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
3471         (WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
3472         * rendering/RenderFlow.cpp:
3473         (WebCore::RenderFlow::dirtyLinesFromChangedChild):
3474         * rendering/RenderLayer.cpp:
3475         (WebCore::RenderLayer::updateVisibilityStatus):
3476         (WebCore::RenderLayer::updateLayerPosition):
3477         * rendering/RenderObject.cpp:
3478         (WebCore::RenderObject::containingBlock):
3479         * rendering/RenderTable.cpp:
3480         (WebCore::RenderTable::paint):
3481         * rendering/RenderTableCell.cpp:
3482         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3483         * rendering/RenderTableRow.cpp:
3484         (WebCore::RenderTableRow::nodeAtPoint):
3485         (WebCore::RenderTableRow::paint):
3486         * rendering/RenderTableSection.cpp:
3487         (WebCore::RenderTableSection::nodeAtPoint):
3488         * rendering/RenderTreeAsText.cpp:
3489         (WebCore::write):
3490
3491 2007-04-24  Steve Falkenburg  <sfalken@apple.com>
3492
3493         Reviewed by Darin, Oliver.
3494
3495         Refactor spelling codepaths
3496
3497         * bridge/EditorClient.h:
3498         * page/ContextMenuController.cpp:
3499         (WebCore::ContextMenuController::contextMenuItemSelected):
3500         * platform/ContextMenu.cpp:
3501         (WebCore::ContextMenu::populate):
3502         (WebCore::ContextMenu::checkOrEnableIfNeeded):
3503         * platform/gdk/EditorClientGdk.cpp:
3504         (WebCore::EditorClientGdk::ignoreWordInSpellDocument):
3505         (WebCore::EditorClientGdk::learnWord):
3506         (WebCore::EditorClientGdk::checkSpellingOfString):
3507         (WebCore::EditorClientGdk::checkGrammarOfString):
3508         (WebCore::EditorClientGdk::udpateSpellingUIWithGrammarString):
3509         (WebCore::EditorClientGdk::updateSpellingUIWithMisspelledWord):
3510         (WebCore::EditorClientGdk::showSpellingUI):
3511         (WebCore::EditorClientGdk::spellingUIIsShowing):
3512         (WebCore::EditorClientGdk::getGuessesForWord):
3513         * platform/gdk/EditorClientGdk.h:
3514
3515 2007-04-24  Darin Adler  <darin@apple.com>
3516
3517         Reviewed by Adele.
3518
3519         - first round of preparation for Hyatt's "lazy minMaxWidth" change
3520           http://bugs.webkit.org/show_bug.cgi?id=13431
3521
3522         This patch limits itself to renaming and making other super-simple
3523         changes so that the above change will be smaller and easier to review
3524         and understand.
3525
3526         Rename:
3527
3528             calcHorizontalMinMaxWidth -> calcHorizontalPrefWidths
3529             calcMinMaxWidth -> calcPrefWidths
3530             calcMinMaxWidthInternal -> calcPrefWidthsInternal
3531             calcVerticalMinMaxWidth -> calcVerticalPrefWidths
3532             setNeedsLayoutAndMinMaxRecalc -> setNeedsLayoutAndPrefWidthsRecalc
3533             trimmedMinMaxWidth -> trimmedPrefWidths
3534
3535             RenderObject::m_maxWidth -> RenderObject::m_maxPrefWidth
3536             RenderObject::m_minWidth -> RenderObject::m_minPrefWidth
3537             RenderObject::maxWidth() -> RenderObject::maxPrefWidth()
3538             RenderObject::minWidth() -> RenderObject::minPrefWidth()
3539
3540         Replace m_minMaxKnown, minMaxKnown(), and setMinMaxKnown() with
3541         m_prefWidthsDirty, prefWidthsDirty(), and setPrefWidthsDirty(),
3542         a boolean with the opposite sense.
3543
3544         Convert some uses of if statements into "max".
3545
3546         Change many uses of layer() to hasLayer(). For now it's just a boolean
3547         version of layer(), but Hyatt's patch makes it faster by using a bit.
3548
3549         Added a guard to use of axObjectCache() to make RenderObject destruction
3550         a little faster for the normal case.
3551
3552         Removed some assertions that will be removed in Hyatt's patch.
3553
3554         Made some functions const that will be const in Hyatt's patch.
3555
3556         Put in some revised comments from Hyatt's patch.
3557
3558         Removed an unneeded nil check from RenderListMarker::setStyle.
3559
3560         Moved RootInlineBox::setHorizontalOverflowPositions and
3561         RootInlineBox::setVerticalSelectionPositions to the RootInlineBox.h
3562         header and marked them inline.
3563
3564         * dom/Document.cpp:
3565         (WebCore::Document::updateStyleSelector):
3566         * html/HTMLTextAreaElement.cpp:
3567         (WebCore::HTMLTextAreaElement::parseMappedAttribute):
3568         * page/Frame.cpp:
3569         (WebCore::Frame::forceLayoutWithPageWidthRange):
3570         * rendering/AutoTableLayout.cpp:
3571         (WebCore::AutoTableLayout::recalcColumn):
3572         (WebCore::AutoTableLayout::calcPrefWidths):
3573         (WebCore::AutoTableLayout::calcEffectiveWidth):
3574         * rendering/AutoTableLayout.h:
3575         * rendering/CounterNode.cpp:
3576         (WebCore::CounterNode::recount):
3577         * rendering/FixedTableLayout.cpp:
3578         (WebCore::FixedTableLayout::calcPrefWidths):
3579         * rendering/FixedTableLayout.h:
3580         * rendering/InlineFlowBox.cpp:
3581         (WebCore::InlineFlowBox::paint):
3582         * rendering/RenderApplet.cpp:
3583         (WebCore::RenderApplet::layout):
3584         * rendering/RenderBlock.cpp:
3585         (WebCore::RenderBlock::removeChild):
3586         (WebCore::RenderBlock::layoutBlock):
3587         (WebCore::RenderBlock::handleCompactChild):
3588         (WebCore::RenderBlock::getClearDelta):
3589         (WebCore::RenderBlock::calcPrefWidths):
3590         (WebCore::RenderBlock::calcInlinePrefWidths):
3591         (WebCore::RenderBlock::calcBlockPrefWidths):
3592         * rendering/RenderBlock.h:
3593         * rendering/RenderBox.cpp:
3594         (WebCore::RenderBox::RenderBox):
3595         (WebCore::RenderBox::nodeAtPoint):
3596         (WebCore::RenderBox::calcWidth):
3597         (WebCore::RenderBox::calcWidthUsing):
3598         (WebCore::RenderBox::calcAbsoluteHorizontal):
3599         (WebCore::RenderBox::calcAbsoluteHorizontalValues):
3600         * rendering/RenderBox.h:
3601         (WebCore::RenderBox::minPrefWidth):
3602         (WebCore::RenderBox::maxPrefWidth):
3603         * rendering/RenderContainer.cpp:
3604         (WebCore::RenderContainer::removeChildNode):
3605         (WebCore::RenderContainer::appendChildNode):
3606         (WebCore::RenderContainer::insertChildNode):
3607         (WebCore::RenderContainer::layout):
3608         * rendering/RenderContainer.h:
3609         (WebCore::RenderContainer::calcPrefWidths):
3610         * rendering/RenderCounter.cpp:
3611         (WebCore::RenderCounter::calcPrefWidths):
3612         * rendering/RenderCounter.h:
3613         * rendering/RenderFieldset.cpp:
3614         (WebCore::RenderFieldset::calcPrefWidths):
3615         * rendering/RenderFieldset.h:
3616         * rendering/RenderFileUploadControl.cpp:
3617         (WebCore::RenderFileUploadControl::calcPrefWidths):
3618         * rendering/RenderFileUploadControl.h:
3619         * rendering/RenderFlexibleBox.cpp:
3620         (WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
3621         (WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
3622         (WebCore::RenderFlexibleBox::calcPrefWidths):
3623         (WebCore::RenderFlexibleBox::layoutBlock):
3624         (WebCore::RenderFlexibleBox::allowedChildFlex):
3625         * rendering/RenderFlexibleBox.h:
3626         (WebCore::RenderFlexibleBox::hasMultipleLines):
3627         (WebCore::RenderFlexibleBox::isVertical):
3628         (WebCore::RenderFlexibleBox::isHorizontal):
3629         * rendering/RenderFlow.cpp:
3630         (WebCore::RenderFlow::absoluteClippedOverflowRect):
3631         * rendering/RenderForeignObject.cpp:
3632         (WebCore::RenderForeignObject::layout):
3633         * rendering/RenderFrameSet.cpp:
3634         (WebCore::RenderFrameSet::layout):
3635         * rendering/RenderHTMLCanvas.cpp:
3636         (WebCore::RenderHTMLCanvas::layout):
3637         * rendering/RenderImage.cpp:
3638         (WebCore::RenderImage::imageChanged):
3639         (WebCore::RenderImage::layout):
3640         (WebCore::RenderImage::calcPrefWidths):
3641         * rendering/RenderImage.h:
3642         * rendering/RenderInline.cpp:
3643         (WebCore::RenderInline::addChildToFlow):
3644         (WebCore::RenderInline::splitInlines):
3645         (WebCore::RenderInline::splitFlow):
3646         (WebCore::RenderInline::calcPrefWidths):
3647         * rendering/RenderInline.h:
3648         * rendering/RenderListBox.cpp:
3649         (WebCore::RenderListBox::updateFromElement):
3650         (WebCore::RenderListBox::calcPrefWidths):
3651         * rendering/RenderListBox.h:
3652         * rendering/RenderListItem.cpp:
3653         (WebCore::RenderListItem::updateValue):
3654         (WebCore::RenderListItem::updateMarkerLocation):
3655         (WebCore::RenderListItem::calcPrefWidths):
3656         (WebCore::RenderListItem::layout):
3657         (WebCore::RenderListItem::explicitValueChanged):
3658         * rendering/RenderListItem.h:
3659         * rendering/RenderListMarker.cpp:
3660         (WebCore::RenderListMarker::setStyle):
3661         (WebCore::RenderListMarker::layout):
3662         (WebCore::RenderListMarker::imageChanged):
3663         (WebCore::RenderListMarker::calcPrefWidths):
3664         (WebCore::RenderListMarker::calcWidth):
3665         * rendering/RenderListMarker.h:
3666         * rendering/RenderMenuList.cpp:
3667         (WebCore::RenderMenuList::updateOptionsWidth):
3668         (WebCore::RenderMenuList::calcPrefWidths):
3669         * rendering/RenderMenuList.h:
3670         * rendering/RenderObject.cpp:
3671         (WebCore::RenderObject::RenderObject):
3672         (WebCore::addLayers):
3673         (WebCore::RenderObject::removeLayers):
3674         (WebCore::RenderObject::moveLayers):
3675         (WebCore::RenderObject::addAbsoluteRectForLayer):
3676         (WebCore::RenderObject::checkForRepaintDuringLayout):
3677         (WebCore::RenderObject::dump):
3678         (WebCore::RenderObject::setStyle):
3679         (WebCore::RenderObject::destroy):
3680         (WebCore::RenderObject::recalcMinMaxWidths):
3681         * rendering/RenderObject.h:
3682         (WebCore::RenderObject::hasLayer):
3683         (WebCore::RenderObject::prefWidthsDirty):
3684         (WebCore::RenderObject::setPrefWidthsDirty):
3685         (WebCore::RenderObject::setNeedsLayoutAndPrefWidthsRecalc):
3686         (WebCore::RenderObject::calcPrefWidths):
3687         (WebCore::RenderObject::minPrefWidth):
3688         (WebCore::RenderObject::maxPrefWidth):
3689         * rendering/RenderPart.cpp:
3690         (WebCore::RenderPart::setWidget):
3691         * rendering/RenderPartObject.cpp:
3692         (WebCore::RenderPartObject::updateWidget):
3693         (WebCore::RenderPartObject::layout):
3694         * rendering/RenderReplaced.cpp:
3695         (WebCore::RenderReplaced::calcPrefWidths):
3696         * rendering/RenderReplaced.h:
3697         * rendering/RenderSVGContainer.cpp:
3698         (WebCore::RenderSVGContainer::calcPrefWidths):
3699         (WebCore::RenderSVGContainer::layout):
3700         * rendering/RenderSVGContainer.h:
3701         * rendering/RenderSVGHiddenContainer.cpp:
3702         (WebCore::RenderSVGHiddenContainer::calcPrefWidths):
3703         * rendering/RenderSVGHiddenContainer.h:
3704         * rendering/RenderSVGText.cpp:
3705         (WebCore::RenderSVGText::layout):
3706         * rendering/RenderSlider.cpp:
3707         (WebCore::RenderSlider::calcPrefWidths):
3708         * rendering/RenderSlider.h:
3709         * rendering/RenderTable.cpp:
3710         (WebCore::RenderTable::calcWidth):
3711         (WebCore::RenderTable::layout):
3712         (WebCore::RenderTable::calcPrefWidths):
3713         (WebCore::RenderTable::splitColumn):
3714         (WebCore::RenderTable::appendColumn):
3715         * rendering/RenderTable.h:
3716         * rendering/RenderTableCell.cpp:
3717         (WebCore::RenderTableCell::updateFromElement):
3718         (WebCore::RenderTableCell::styleOrColWidth):
3719         (WebCore::RenderTableCell::calcPrefWidths):
3720         * rendering/RenderTableCell.h:
3721         * rendering/RenderTableCol.cpp:
3722         (WebCore::RenderTableCol::updateFromElement):
3723         * rendering/RenderTableRow.cpp:
3724         (WebCore::RenderTableRow::layout):
3725         * rendering/RenderTableSection.cpp:
3726         (WebCore::RenderTableSection::paint):
3727         * rendering/RenderText.cpp:
3728         (WebCore::RenderText::trimmedPrefWidths):
3729         (WebCore::RenderText::calcPrefWidths):
3730         (WebCore::RenderText::calcPrefWidthsInternal):
3731         (WebCore::RenderText::setText):
3732         * rendering/RenderText.h:
3733         (WebCore::RenderText::minPrefWidth):
3734         (WebCore::RenderText::maxPrefWidth):
3735         * rendering/RenderTextControl.cpp:
3736         (WebCore::RenderTextControl::calcPrefWidths):
3737         * rendering/RenderTextControl.h:
3738         * rendering/RenderView.cpp:
3739         (WebCore::RenderView::RenderView):
3740         (WebCore::RenderView::calcPrefWidths):
3741         (WebCore::RenderView::layout):
3742         * rendering/RenderView.h:
3743         * rendering/RenderWidget.cpp:
3744         (WebCore::RenderWidget::layout):
3745         * rendering/RootInlineBox.cpp:
3746         * rendering/RootInlineBox.h:
3747         (WebCore::RootInlineBox::setHorizontalOverflowPositions):
3748         (WebCore::RootInlineBox::setVerticalSelectionPositions):
3749         * rendering/TableLayout.h:
3750
3751 2007-04-24  Justin Garcia  <justin.garcia@apple.com>
3752
3753         Reviewed by oliver
3754         
3755         <rdar://problem/5156401> 
3756         Crash when dragging text into a link inside a table cell
3757
3758         * editing/CompositeEditCommand.cpp:
3759         (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
3760         Don't avoid the anchor if doing so would skip over a line break, that
3761         would put content in the wrong paragraph, which can throw ReplaceSelectionCommand,
3762         which relies on moveParagraphs into infinite recursion.
3763         Renamed the input position.
3764         Don't need to re-fetch the enclosing anchor when preparing to push it down,
3765         since it hasn't changed since the top of the function.
3766
3767 2007-04-24  Timothy Hatcher  <timothy@apple.com>
3768
3769         Reviewed by Adam.
3770
3771         <rdar://problem/5133011> 64-bit: Attempting to paste copied text in a input field results in a crash at WebCore::Range::startPosition()
3772
3773         Change a couple incorrect uses of LONG_MAX to INT_MAX to match the variable type they are used in.
3774         The LONG_MAX on 64-bit was overflowing the int variables, causing this crash on paste.
3775
3776         * bridge/mac/WebCoreAXObject.mm:
3777         (-[WebCoreAXObject value]):
3778         * editing/TextIterator.cpp:
3779         (WebCore::TextIterator::handleTextNode):
3780         (WebCore::TextIterator::handleTextBox):
3781
3782 2007-04-24  Timothy Hatcher  <timothy@apple.com>
3783
3784         Reviewed by Adam.
3785
3786         <rdar://problem/4966982> 64-bit: In a unordered list, TYPE=DISC and TYPE=CIRCLE attribute values are ignored
3787
3788         We need to draw our full-circle arcs counter-clockwise, since a clockwise arc from 0 to 2Ï\80 is no arc at all!
3789         This only worked on 32-bit due to a rounding error in CoreGraphics, causing it to draw a full circle anyway.
3790
3791         * platform/graphics/cg/GraphicsContextCG.cpp:
3792         (WebCore::GraphicsContext::drawEllipse):
3793
3794 2007-04-24  Brady Eidson  <beidson@apple.com>
3795
3796         Reviewed by Beth, Hyatt, Ada, and Darin
3797
3798         <rdar://problem/5011477> and <rdar://problem/5011514>
3799         Provide support for the icon.db to be moved to a different directory from the old WebKit-style
3800         icons, and remove the old directory if that is the case
3801
3802         Support for this starts in WebCore, where we can use the metadata table in the icon.db to track
3803         whether or not we've ever done the import
3804
3805         * WebCore.exp:
3806         * loader/icon/IconDatabase.cpp:
3807         (WebCore::IconDatabase::defaultDatabaseFilename): Changed to "Icons.db"
3808         (WebCore::IconDatabase::IconDatabase):
3809         (WebCore::IconDatabase::deleteAllPreparedStatements): Delete the new statements added
3810         (WebCore::IconDatabase::imported): Grab this flag from the DB or return the cached flag
3811         (WebCore::IconDatabase::setImported): Store this flag into the DB
3812         (WebCore::IconDatabase::importedQuery): Actually do the DB query for this save
3813         (WebCore::IconDatabase::setImportedQuery): Actually do the DB query for this retrieval
3814         * loader/icon/IconDatabase.h:
3815
3816 2007-04-24  Darin Adler  <darin@apple.com>
3817
3818         Reviewed by Justin.
3819
3820         - fix <rdar://problem/4356361> Selection after multiple delete
3821           keypresses and undo selects only the last deleted character
3822
3823         Test: editing/undo/undo-combined-delete-boundary.html
3824         Test: editing/undo/undo-combined-delete.html
3825         Test: editing/undo/undo-delete-boundary.html
3826         Test: editing/undo/undo-delete.html
3827         Test: editing/undo/undo-forward-delete-boundary.html
3828         Test: editing/undo/undo-forward-delete.html
3829
3830         * editing/TypingCommand.cpp:
3831         (WebCore::TypingCommand::insertText): Fix obviously-wrong code where there were missing
3832         braces. I couldn't find any real symptom of this, but I think the fix should go in anyway.
3833         All layout tests still pass.
3834         (WebCore::TypingCommand::deleteKeyPressed): Added code to compute a selection that goes
3835         back to the beginning of the composite editing operation.
3836         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
3837
3838         * editing/Selection.h:
3839         * editing/Selection.cpp: (WebCore::Selection::setWithoutValidation):
3840         Added. Back door to allow setting the ends of a selection without revalidating,
3841         because we need to use it on a selection where the endpoints may no longer be
3842         valid due to mutations done by earlier pieces of the editing operation.
3843
3844         * editing/EditCommand.h:
3845         (WebCore::EditCommand::startingSelection): Return a const& for speed.
3846         (WebCore::EditCommand::endingSelection): Ditto.
3847
3848 2007-04-24  Sam Weinig  <sam@webkit.org>
3849
3850         Reviewed by Mitz.
3851
3852         - fix for http://bugs.webkit.org/show_bug.cgi?id=13448
3853           REGRESSION: setting an input element's value to JavaScript null gives "null"
3854
3855         Test: fast/forms/input-null.html
3856
3857         * html/HTMLInputElement.idl: Convert JS null to the empty string on setting
3858         DOMString attributes.
3859
3860 2007-04-24  Mitz Pettel  <mitz@webkit.org>
3861
3862         Reviewed by Dave Hyatt.
3863
3864         - fix http://bugs.webkit.org/show_bug.cgi?id=13453
3865           Control clip isn't applied to children's backgrounds, outlines and floats
3866
3867         Test: fast/forms/control-clip.html
3868
3869         * rendering/RenderBlock.cpp:
3870         (WebCore::RenderBlock::paint): Apply the clip in all phases that paint
3871         children. Split PaintPhaseOutline and PaintPhaseChildBlockBackground into
3872         two phases each, applying the clip only to the children.
3873         * rendering/RenderListBox.cpp:
3874         (WebCore::RenderListBox::paintObject): Treat the scrollbar as part of the
3875         background rather than as a child's background, now that children are
3876         clipped out.
3877
3878 2007-04-24  Benjamin Otte  <otte@gnome.org>
3879
3880         Reviewed by Mark Rowe.
3881
3882         Gdk build system improvements.
3883
3884         * make-generated-sources.sh: Exit with failure status if make fails.
3885
3886 2007-04-24  Benjamin Otte  <otte@gnome.org>
3887
3888         Reviewed by Mark Rowe.
3889
3890         Gdk build system improvements.
3891
3892         * Projects/gdk/webcore-gdk.bkl:
3893         fail if running any of the commands failed. In particular
3894         make-generated-sources.sh
3895
3896 2007-04-23  Beth Dakin  <bdakin@apple.com>
3897
3898         Reviewed by Adam.
3899
3900         Fix for <rdar://problem/5155507> REGRESSION: Crash in 
3901         RenderLayer::setHasVisibleContent()
3902
3903         * rendering/RenderContainer.cpp:
3904         (WebCore::RenderContainer::appendChildNode): Must null-check 
3905         enclosingLayer()
3906         (WebCore::RenderContainer::insertChildNode): Same.
3907
3908 2007-04-23  David Hyatt  <hyatt@apple.com>
3909
3910         Fix for bug 13337, deep tag nesting is slow.  This patch fixes a number of O(n^2) issues as well as making
3911         a few performance optimizations based off profiling.  Details next to each change below.
3912
3913         Note that calcMinMaxWidth being slow is a critical separate piece of this puzzle.  Until bug 13430 is fixed,
3914         render tree construction will be O(n^2) (because of the minmaxrecalc bit setting being stupid enough to
3915         always crawl to the root of the tree) and calcMinMaxWidth will waste tons of unnecessary time.
3916
3917         When these fixes are combined with the calcMinMaxWidth fix in 13430, the penguin page specified in 13337
3918         loads in < 2 seconds (down from an infinite hang before).
3919
3920         Reviewed by aroben, ollie
3921
3922         * css/cssstyleselector.cpp:
3923         (WebCore::CSSStyleSelector::locateCousinList):
3924         (WebCore::CSSStyleSelector::locateSharedStyle):
3925         * css/csstyleselector.h
3926         Cap the depth of cousin searching on the shared style optimization.  We will be willing to (at most) crawl
3927         up the tree the same distance that we were willing to crawl backwards through sibling lists.  Leaving it
3928         uncapped resulted in pathological style resolution for the case of an infinitely nested chain of singletons.
3929
3930         * html/HTMLParser.cpp:
3931         (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
3932         (WebCore::HTMLParser::popBlock):
3933         Cap the number of residual style tags that we are willing to reopen.  We will reopen at most 200
3934         residual style tags, since the assumption is that once that many tags are on the stack, you're probably already
3935         every kind of bold, italic, and color of the rainbow.
3936
3937         * rendering/RenderFlow.cpp:
3938         (WebCore::RenderFlow::absoluteClippedOverflowRect):
3939         absoluteClippedOverflowRect can just return the empty rect when the inline flow has no line boxes instead of
3940         doing a bunch of work (and calling containingBlock()) for no reason.
3941
3942         * rendering/RenderInline.cpp:
3943         (WebCore::RenderInline::addChildToFlow):
3944         Remove the useless containingBlock() check from addChildToFlow.  Obviously every inline's containing block
3945         is a block flow.
3946
3947         * rendering/bidi.cpp:
3948         (WebCore::inlineWidth):
3949         (WebCore::RenderBlock::createLineBoxes):
3950         Cap the depth of individual line trees to 200.  Again the assumption is that once that many open inlines exist
3951         all on one line that there's no way this would be intentional.
3952
3953 2007-04-23  David Hyatt  <hyatt@apple.com>
3954
3955         Fix for bug 13430, cap inline splitting for continuations to a maximum depth of 200.
3956
3957         Reviewed by olliej, antti
3958
3959         * rendering/RenderInline.cpp:
3960         (WebCore::RenderInline::splitInlines):
3961
3962 2007-04-23  Alp Toker  <alp@atoker.com>
3963
3964         Gdk build fix. Track EventHandler change made in r21042.
3965
3966         * page/gdk/EventHandlerGdk.cpp:
3967         (WebCore::EventHandler::passWheelEventToWidget):
3968         (WebCore::EventHandler::passMousePressEventToScrollbar):
3969
3970 2007-04-23  Timothy Hatcher  <timothy@apple.com>
3971
3972         Reviewed by Darin.
3973
3974         <rdar://problem/5024945> -[DOMRange lineBoxRects] doesn't include start and end nodes that have offsets
3975
3976         * rendering/RenderText.cpp:
3977         (WebCore::RenderText::addLineBoxRects): Use min(box->len(), end) instead of special-casing UINT_MAX.
3978
3979 2007-04-23  Adele Peterson  <adele@apple.com>
3980
3981         Fix by Darin, reviewed by me.
3982
3983         Fix for REGRESSION: Can't upload attachments to bugzilla since the file upload control is reset immediately 
3984         http://bugs.webkit.org/show_bug.cgi?id=13461
3985
3986         * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::updateFromElement):
3987         Only clear the FileChooser if the value is empty *and* (not or) the filename is empty.
3988
3989 2007-04-23  Adele Peterson  <adele@apple.com>
3990
3991         Reviewed by Adam.
3992
3993         Updated fix for <rdar://problem/4887426> Set a reasonable maximum number of recent searches for search menu
3994
3995         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): Use a const int maxSavedResults instead of magic number 256.
3996
3997 2007-04-23  Timothy Hatcher  <timothy@apple.com>
3998
3999         Reviewed by Hyatt.
4000
4001         <rdar://problem/5024945> -[DOMRange lineBoxRects] doesn't include start and end nodes that have offsets
4002
4003         Don't call selectionRect with a -1 end position, instead use the text length.
4004
4005         * rendering/RenderText.cpp:
4006         (WebCore::RenderText::addLineBoxRects):
4007
4008 2007-04-23  Adele Peterson  <adele@apple.com>
4009
4010         Fixed and reviewed by Darin, Adele, and Oliver.
4011
4012         WebCore part of fix for <rdar://problem/5107538> REGRESSION: Page scroll when selecting characters from inline input candidate window by arrow buttons
4013         http://bugs.webkit.org/show_bug.cgi?id=13263
4014
4015         * dom/KeyboardEvent.h: (WebCore::KeypressCommand::isEmpty): Added helper method.
4016
4017 2007-04-23  Patti Hoa  <patti@apple.com>
4018         
4019         <rdar://problem/4938364> Attachment button has different string length between attributeStringForRange and stringForRange
4020         <rdar://problem/4939536> AXLengthForTextMarkerRange returns zero length for the range of an attachment
4021         
4022         Reviewed by Darin.
4023
4024         * bridge/mac/WebCoreAXObject.mm:
4025         (nsStringForReplacedNode):
4026         Added helper routine to check if the replaced node should be exposed as an attachment character in string representation.
4027         Added an additional check to make sure that text node is not considered a replaced node.
4028         Removed helper routine AXAttributedStringAppendReplaced since half of the functions are now taken care by nsStringForReplacedNode.
4029         The other half is directly used in the doAXAttributedStringForTextMarkerRange method.
4030         (-[WebCoreAXObject doAXStringForTextMarkerRange:]):
4031         (-[WebCoreAXObject doAXAttributedStringForTextMarkerRange:]):
4032         Both string and AttrbributedString methods will now utilize the helper routine nsStringForReplacedNode to return replacement
4033         characters for range occupied by attachment.
4034         
4035 2007-04-23  Adele Peterson  <adele@apple.com>
4036
4037         Reviewed by Oliver.
4038
4039         Fix for <rdar://problem/4887426> Set a reasonable maximum number of recent searches for search menu
4040
4041         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute):
4042         Enforce a maximum of 256 saved results for the search field.
4043
4044 2007-04-23  Adele Peterson  <adele@apple.com>
4045
4046         Reviewed by Hyatt & Adam.
4047
4048         Fix for <rdar://problem/4807799> REGRESSION: calling select() in onSearch handler doesn't work if you hit enter to trigger the event
4049         Fix for <rdar://problem/5153970> onChange doesn't fire when focusing a popup, using type-ahead to select, and leaving
4050
4051         This previous behavior to blur controls when hitting enter was added to achieve the result of firing the change event.  Firefox does not
4052         fire blur- just the change event, so this fix will match Firefox behavior.
4053
4054         This also fixes a bug where we didn't fire the change event when using type-ahead selection with the popup menu.
4055
4056         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): Fire change event instead of blur event when hitting enter.
4057
4058         * html/HTMLSelectElement.cpp:
4059         (WebCore::HTMLSelectElement::dispatchFocusEvent): Now that we have type-ahead selection for popups that can be opened with the arrow keys,
4060          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.
4061         (WebCore::HTMLSelectElement::dispatchBlurEvent): For the same reasons as above, we should fire onChange for all popups on blur.
4062
4063         (WebCore::HTMLSelectElement::menuListDefaultEventHandler): Fire change event instead of blur event when hitting enter.  Removed an unnecessary
4064          check for form() before calling menuListOnChange().  Removed an unnecessary check for renderer() and usesMenuList().
4065         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Remove call to blur.  Since list boxes fire the change event immediately after an
4066          action is taken, we don't need to fire anything after hitting enter.
4067         (WebCore::HTMLSelectElement::menuListOnChange): Reset m_lastOnChangeIndex after firing the change event.
4068
4069 2007-04-23  Anders Carlsson  <andersca@apple.com>
4070
4071         Reviewed by Ada.
4072
4073         <rdar://problem/5061022>
4074         REGRESSION: Acrobat 8 plug-in fails to scroll with trackpad two-finger scroll or mouse wheel (12995)
4075         
4076         Pass wheel events to all widgets.
4077         
4078         * page/EventHandler.cpp:
4079         (WebCore::EventHandler::handleWheelEvent):
4080         * page/EventHandler.h:
4081         * page/mac/EventHandlerMac.mm:
4082         (WebCore::EventHandler::passWheelEventToWidget):
4083
4084 2007-04-23  Alp Toker  <alp@atoker.com>
4085
4086         Reviewed by Mark.
4087
4088         Save and restore the context state when beginning and ending a transparency layer.
4089
4090         * platform/graphics/cairo/GraphicsContextCairo.cpp:
4091         (WebCore::GraphicsContext::beginTransparencyLayer):
4092         (WebCore::GraphicsContext::endTransparencyLayer):
4093
4094 2007-04-23  Alp Toker  <alp@atoker.com>
4095
4096         Reviewed by Mark.
4097
4098         Further implementation and checks. The opacity layer code is not so beautiful
4099         but gets the job done with fewer complications than maintaining our own stack.
4100
4101         * platform/graphics/cairo/GraphicsContextCairo.cpp:
4102         (WebCore::GraphicsContext::translate):
4103         (WebCore::GraphicsContext::setPlatformStrokeThickness):
4104         (WebCore::GraphicsContext::beginTransparencyLayer):
4105         (WebCore::GraphicsContext::endTransparencyLayer):
4106         (WebCore::GraphicsContext::setCompositeOperation):
4107         (WebCore::GraphicsContext::rotate):
4108         (WebCore::GraphicsContext::scale):
4109
4110 2007-04-23  Darin Adler  <darin@apple.com>
4111
4112         Reviewed by Hyatt.
4113
4114         - rename box-sizing to -webkit-box-sizing
4115           because of <rdar://problem/4667227> REGRESSION: Shifted table on page at
4116           https://us.etrade.com/e/t/home (due to box-sizing)
4117
4118         * css/CSSComputedStyleDeclaration.cpp:
4119         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Rename.
4120         * css/CSSPropertyNames.in: Ditto.
4121         * css/cssparser.cpp: (WebCore::CSSParser::parseValue): Rename and take out comment
4122         explaining why we aren't prefacing with -webkit.
4123         * css/cssstyleselector.cpp:
4124         (WebCore::CSSStyleSelector::applyProperty): Rename.
4125         * css/html4.css: Rename.
4126         * css/quirks.css: Rename.