LayoutTests:
[WebKit-https.git] / WebCore / ChangeLog
1 2006-07-31  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2
3         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10158
4           REGRESSION: Selection highlight is dark and opaque when solid-color images are used
5
6         Reviewed by Darin.
7
8         Pixel test: fast/backgrounds/solid-color-context-restore.html
9
10         * platform/mac/ImageMac.mm:
11         (WebCore::Image::draw): Added calls to preserve the graphics context
12         around the painting of a solid color image.
13         (WebCore::Image::drawTiled): Ditto.
14
15 2006-07-31  Maciej Stachowiak  <mjs@apple.com>
16
17         Rubber-stamped by Tim Hatcher.
18
19         - renamed TransferJob to ResourceLoader
20
21         * Projects/gdk/webcore-gdk.bkl:
22         * WebCore.vcproj/WebCore/WebCore.vcproj:
23         * WebCore.xcodeproj/project.pbxproj:
24         * WebCoreSources.bkl:
25         * bridge/mac/FrameMac.mm:
26         * bridge/mac/WebCoreResourceLoaderImp.h:
27         * bridge/mac/WebCoreResourceLoaderImp.mm:
28         (-[WebCoreResourceLoaderImp redirectedToURL:]):
29         (-[WebCoreResourceLoaderImp addData:]):
30         (-[WebCoreResourceLoaderImp finishJobAndHandle:]):
31         * bridge/win/FrameWin.cpp:
32         * dom/XMLTokenizer.cpp:
33         (WebCore::openFunc):
34         * loader/Cache.cpp:
35         * loader/LoaderFunctions.h:
36         * loader/loader.cpp:
37         (WebCore::Loader::servePendingRequests):
38         (WebCore::Loader::receivedAllData):
39         (WebCore::Loader::receivedResponse):
40         (WebCore::Loader::receivedData):
41         (WebCore::Loader::cancelRequests):
42         (WebCore::Loader::jobForRequest):
43         * loader/loader.h:
44         * loader/mac/LoaderFunctionsMac.mm:
45         (WebCore::ServeSynchronousRequest):
46         * platform/ResourceLoader.cpp: Added.
47         (WebCore::ResourceLoader::ResourceLoader):
48         (WebCore::ResourceLoader::isErrorPage):
49         (WebCore::ResourceLoader::error):
50         (WebCore::ResourceLoader::setError):
51         (WebCore::ResourceLoader::queryMetaData):
52         (WebCore::ResourceLoader::addMetaData):
53         (WebCore::ResourceLoader::kill):
54         (WebCore::ResourceLoader::url):
55         (WebCore::ResourceLoader::postData):
56         (WebCore::ResourceLoader::method):
57         (WebCore::ResourceLoader::client):
58         * platform/ResourceLoader.h: Added.
59         (WebCore::ResourceLoader::getInternal):
60         * platform/ResourceLoaderClient.h: Added.
61         (WebCore::ResourceLoaderClient::~ResourceLoaderClient):
62         (WebCore::ResourceLoaderClient::receivedRedirect):
63         (WebCore::ResourceLoaderClient::receivedResponse):
64         (WebCore::ResourceLoaderClient::receivedData):
65         (WebCore::ResourceLoaderClient::receivedAllData):
66         * platform/ResourceLoaderInternal.h: Added.
67         (WebCore::ResourceLoaderInternal::ResourceLoaderInternal):
68         * platform/TransferJob.cpp: Removed.
69         * platform/TransferJob.h: Removed.
70         * platform/TransferJobClient.h: Removed.
71         * platform/TransferJobInternal.h: Removed.
72         * platform/gdk/FrameGdk.cpp:
73         (WebCore::FrameGdk::openURL):
74         (WebCore::FrameGdk::urlSelected):
75         (WebCore::FrameGdk::receivedData):
76         (WebCore::FrameGdk::receivedAllData):
77         * platform/gdk/FrameGdk.h:
78         * platform/gdk/ResourceLoaderCurl.cpp: Added.
79         (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
80         (WebCore::ResourceLoader::~ResourceLoader):
81         (WebCore::ResourceLoader::start):
82         (WebCore::ResourceLoader::cancel):
83         * platform/gdk/ResourceLoaderManager.cpp: Added.
84         (WebCore::ResourceLoaderManager::ResourceLoaderManager):
85         (WebCore::ResourceLoaderManager::get):
86         (WebCore::ResourceLoaderManager::useSimpleTransfer):
87         (WebCore::writeCallback):
88         (WebCore::ResourceLoaderManager::downloadTimerCallback):
89         (WebCore::ResourceLoaderManager::remove):
90         (WebCore::ResourceLoaderManager::add):
91         (WebCore::ResourceLoaderManager::cancel):
92         * platform/gdk/ResourceLoaderManager.h: Added.
93         * platform/gdk/TemporaryLinkStubs.cpp:
94         (WebCore::ServeSynchronousRequest):
95         (WebCore::ResourceLoader::assembleResponseHeaders):
96         (WebCore::ResourceLoader::retrieveCharset):
97         * platform/gdk/TransferJobCurl.cpp: Removed.
98         * platform/gdk/TransferJobManager.cpp: Removed.
99         * platform/gdk/TransferJobManager.h: Removed.
100         * platform/mac/ResourceLoaderMac.mm: Added.
101         (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
102         (WebCore::ResourceLoader::~ResourceLoader):
103         (WebCore::ResourceLoader::start):
104         (WebCore::ResourceLoader::assembleResponseHeaders):
105         (WebCore::ResourceLoader::retrieveCharset):
106         (WebCore::ResourceLoader::setLoader):
107         (WebCore::ResourceLoader::receivedResponse):
108         (WebCore::ResourceLoader::cancel):
109         * platform/mac/TransferJobMac.mm: Removed.
110         * platform/win/ResourceLoaderWin.cpp: Added.
111         (WebCore::addToOutstandingJobs):
112         (WebCore::lookupResourceLoader):
113         (WebCore::ResourceLoaderWndProc):
114         (WebCore::initializeOffScreenResourceLoaderWindow):
115         (WebCore::ResourceLoaderInternal::~ResourceLoaderInternal):
116         (WebCore::ResourceLoader::~ResourceLoader):
117         (WebCore::ResourceLoader::start):
118         (WebCore::ResourceLoader::fileLoadTimer):
119         (WebCore::ResourceLoader::cancel):
120         * platform/win/ResourceLoaderWin.h: Added.
121         * platform/win/TemporaryLinkStubs.cpp:
122         (WebCore::ServeSynchronousRequest):
123         (WebCore::ResourceLoader::assembleResponseHeaders):
124         (WebCore::ResourceLoader::retrieveCharset):
125         * platform/win/TransferJobWin.cpp: Removed.
126         * platform/win/TransferJobWin.h: Removed.
127         * xml/XSLTProcessor.cpp:
128         (WebCore::docLoaderFunc):
129         * xml/xmlhttprequest.cpp:
130         (WebCore::XMLHttpRequest::send):
131         (WebCore::XMLHttpRequest::receivedAllData):
132         (WebCore::XMLHttpRequest::receivedRedirect):
133         (WebCore::XMLHttpRequest::receivedData):
134         * xml/xmlhttprequest.h:
135
136 2006-07-31  Darin Adler  <darin@apple.com>
137
138         Reviewed by Hyatt.
139
140         - removed obsolete cell margin hack
141
142         * rendering/RenderBox.cpp: (WebCore::RenderBox::calcVerticalMargins):
143         Set top and bottom margins to 0 for table cells instead of -16384.
144         No effect on layout (including layout tests).
145
146         * css/CSSComputedStyleDeclaration.cpp:
147         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
148         Added a few comments about differences between this class and the
149         what the CSS specification says about computed style.
150
151 2006-07-31  Mark Rowe  <opendarwin.org@bdash.net.nz>
152
153         Reviewed by Maciej.
154
155         http://bugzilla.opendarwin.org/show_bug.cgi?id=9738
156         Bug 9738: Unqualified :hover selector ignored in strict parsing mode
157
158         * css/cssstyleselector.cpp:
159         (WebCore::CSSStyleSelector::checkSelector): Restrict the :hover and :active
160         exclusion based on onlyHoverActive to quirks mode.
161
162 2006-07-31  David Hyatt  <hyatt@apple.com>
163
164         Fix for bug 10179, digg.com scrolls slowly.  Improve fixed positioning
165         and fixed backgrounds so that a count of them is kept on the FrameView.
166         This allows us to switch slow scrolling on and off as these objects come
167         and go.
168
169         * css/cssstyleselector.cpp:
170         (WebCore::CSSStyleSelector::adjustRenderStyle):
171         (WebCore::CSSStyleSelector::applyProperty):
172         * page/FrameView.cpp:
173         (WebCore::FrameViewPrivate::reset):
174         (WebCore::FrameView::layout):
175         (WebCore::FrameView::useSlowRepaints):
176         (WebCore::FrameView::setUseSlowRepaints):
177         (WebCore::FrameView::addSlowRepaintObject):
178         (WebCore::FrameView::removeSlowRepaintObject):
179         * page/FrameView.h:
180         * rendering/RenderBox.cpp:
181         (WebCore::RenderBox::paintBackgroundExtended):
182         * rendering/RenderObject.cpp:
183         (WebCore::RenderObject::setStyle):
184         * rendering/RenderView.cpp:
185         (WebCore::RenderView::paintBoxDecorations):
186
187 2006-07-31  David Hyatt  <hyatt@apple.com>
188
189         Begin disentangling of scrollbar logic in preparation for engine-implemented
190         scrollbars.  Split ScrollBar into two classes, an abstract base (still named
191         ScrollBar) and a new PlatformScrollBar subclass.  This subclass is used only
192         by platforms that want to continue to use a platform scrollbar (rather than
193         the engine one).
194
195         Reviewed by darin
196
197         * WebCore.xcodeproj/project.pbxproj:
198         * html/HTMLCanvasElement.h:
199         * page/Frame.cpp:
200         * platform/PlatformScrollBar.h: Added.
201         (WebCore::PlatformScrollBar::isWidget):
202         * platform/ScrollBar.h:
203         (WebCore::ScrollBarClient::~ScrollBarClient):
204         (WebCore::ScrollBar::~ScrollBar):
205         (WebCore::ScrollBar::orientation):
206         (WebCore::ScrollBar::value):
207         (WebCore::ScrollBar::client):
208         * platform/mac/PlatformScrollBarMac.mm: Added.
209         (-[WebCoreScrollBar initWithPlatformScrollBar:]):
210         (-[WebCoreScrollBar detachPlatformScrollBar]):
211         (-[WebCoreScrollBar scroll:]):
212         (-[WebCoreScrollBar widget]):
213         (-[WebCoreScrollBar mouseDown:]):
214         (WebCore::PlatformScrollBar::PlatformScrollBar):
215         (WebCore::PlatformScrollBar::~PlatformScrollBar):
216         (WebCore::PlatformScrollBar::setScrollBarValue):
217         (WebCore::PlatformScrollBar::setKnobProportion):
218         (WebCore::PlatformScrollBar::scrollbarHit):
219         (WebCore::PlatformScrollBar::width):
220         (WebCore::PlatformScrollBar::height):
221         (WebCore::PlatformScrollBar::setRect):
222         (WebCore::PlatformScrollBar::setEnabled):
223         (WebCore::PlatformScrollBar::paint):
224         * platform/mac/ScrollBarMac.mm: Removed.
225         * platform/mac/WebCoreTextArea.mm:
226         * rendering/RenderBlock.cpp:
227         (WebCore::RenderBlock::isPointInScrollbar):
228         * rendering/RenderFormElement.cpp:
229         * rendering/RenderLayer.cpp:
230         (WebCore::RenderLayer::horizontalScrollbarWidget):
231         (WebCore::RenderLayer::verticalScrollbarWidget):
232         (WebCore::RenderLayer::valueChanged):
233         (WebCore::RenderLayer::setHasHorizontalScrollbar):
234         (WebCore::RenderLayer::setHasVerticalScrollbar):
235         (WebCore::RenderLayer::positionScrollbars):
236         * rendering/RenderLayer.h:
237         * rendering/RenderWidget.h:
238
239 2006-07-31  Adele Peterson  <adele@apple.com>
240
241         Reviewed by John and Anders.
242
243         - Fix for <rdar://problem/4380576> onChange does not get called when field changed by return key
244
245         Test: fast/forms/onchange-enter-submit.html
246
247         Blur (which will fire onChange appropriately) before submitting a form when pressing Enter.
248         This matches the sequence of events fired in WinIE.
249
250         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
251         * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::defaultEventHandler):
252
253 2006-07-31  Geoffrey Garen  <ggaren@apple.com>
254
255         Reviewed by Kevin.
256
257         Moved string debug function outside of the WebCore namespace so that it's
258         easier to call in the debugger. I will never doubt Darin again (x100).
259
260         * platform/String.cpp:
261         (string):
262
263 2006-07-31  David Hyatt  <hyatt@apple.com>
264
265         Partial fix for 5453.  Improve overflow so that when it changes
266         dynamically from scroll/auto to hidden that we properly hide the
267         scrollbars.  Also refine the dirty dashboard region updating so that
268         it only happens if the scrollbars genuinely come and go.
269
270         Also eliminate the extra repaint of the entire block.  This should not be
271         necessary, since the scrollbars repaint themselves already and children
272         will repaint already if they move.
273
274         Reviewed by darin
275
276         Adding test case from bug into fast/overflow/dynamic-hidden.html
277
278         * rendering/RenderLayer.cpp:
279         (WebCore::RenderLayer::setHasHorizontalScrollbar):
280         (WebCore::RenderLayer::setHasVerticalScrollbar):
281         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
282
283 2006-07-31  Graham Dennis  <graham.dennis@gmail.com>
284
285         Reviewed by justin
286         
287         <http://bugzilla.opendarwin.org/show_bug.cgi?id=9507>
288         Empty style spans created in applyInlineStyle
289         
290         Improves paste fidelity because some of these empty font/style spans had a non-zero
291         size and were messing up the layout of pasted content:
292         <rdar://problem/4515463>
293         REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page   
294
295         * editing/ApplyStyleCommand.cpp:
296         (WebCore::ApplyStyleCommand::applyInlineStyle): Use the adjusted start node instead 
297         of start.node().  Don't do any application if the endpoints are swapped.  Adjust
298         endNode if the start node is a descendant of it, so that the pre-order traversal will
299         terminate properly.
300
301 2006-07-31  Geoffrey Garen  <ggaren@apple.com>
302
303         Reviewed by Darin.
304
305         * platform/String.cpp:
306         (WebCore::string): Added a debugging function to create a String from a
307         const char*.
308
309 2006-07-31  Anders Carlsson  <acarlsson@apple.com>
310
311         * css/CSSPrimitiveValue.cpp:
312         Fix windows build.
313
314 2006-07-31  Geoffrey Garen  <ggaren@apple.com>
315
316         Reinstating my last change. Everything builds now.
317         
318 2006-07-31  Geoffrey Garen  <ggaren@apple.com>
319
320         Backing out my last change because it causes a build failure in some
321         configurations. This seems to be the cleanest way to get svn to cooperate.
322
323 2006-07-31  Geoffrey Garen  <ggaren@apple.com>
324
325         Reviewed by Maciej.
326
327         Moved files around to make WebCore's structure clearer
328         and easier to explain.
329
330         DerivedSources/JS* -> bindings/js/DerivedSources/ (so JS* files
331         show up when you search inside bindings/js/, but are marked, at
332         the same time, as files that you should not edit manually)
333
334         WebCore+SVG/DOMList.h -> ksvg2/svg/ (only files inside ksvg2/svg/
335         use DOMList.h)
336
337         icon -> loader/icon
338
339         I tested that everything still builds.
340
341 2006-07-30  Darin Adler  <darin@apple.com>
342
343         Reviewed by Tim Hatcher.
344
345         - some improvements for the benefit of the style pane of the inspector
346
347         * css/CSSComputedStyleDeclaration.cpp: Removed background-position
348         and border-spacing from the list of properties that show up in
349         computed style, because of background-position-x, background-position-y,
350         -webkit-border-horizontal-spacing and -webkit-border-vertical-spacing.
351         (WebCore::valueForLength): Added handling for undefinedLength, intrinsic,
352         and min-intrinsic.
353         (WebCore::primitiveValueFromLength): Removed code that would add a
354         space to the string for no good reason.
355         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added a
356         special case for a line clamp of -1, which should come back as "none"
357         rather than an actual "-1".
358         (WebCore::CSSComputedStyleDeclaration::length): Return 0 if the
359         declaration has no corresponding node or no renderer.
360         (WebCore::CSSComputedStyleDeclaration::item): Check against length()
361         so that the two stay consistent rather than using a constant.
362
363         * css/CSSPrimitiveValue.cpp:
364         (WebCore::isCSSTokenizerIdentifier): Added.
365         (WebCore::isCSSTokenizerURL): Added.
366         (WebCore::quoteString): Added.
367         (WebCore::quoteStringIfNeeded): Changed to quote strings in many more
368         cases -- any cases where they would not parse in the CSS parser otherwise.
369         The main case this affects is font names with spaces in them.
370         (WebCore::quoteURLIfNeeded): Added.
371         (WebCore::CSSPrimitiveValue::cssText): Use quoteURLIfNeeded in the case
372         where we're making the text form of a URI.
373
374         * css/tokenizer.flex: Whitespace tweaks to line things up better.
375
376 2006-07-30  Eric Seidel  <eric@eseidel.com>
377
378         Reviewed by gramps!
379
380         Remove some unused SVG code.
381
382         * ksvg2/ecma/Ecma.cpp: Removed.
383         * ksvg2/ecma/Ecma.h: Removed.
384         * ksvg2/ecma/GlobalObject.cpp: remove a couple dead functions.
385         * ksvg2/ecma/GlobalObject.h: add a comment about this dead code.
386         * ksvg2/ecma/SVGLookup.h: Removed.
387
388 2006-07-29  Darin Adler  <darin@apple.com>
389
390         - Removed tabs from these source files that still had them.
391           We don't use them; that way source files look fine in editors
392           that have tabs set to 8 spaces or to 4 spaces.
393         - Removed allow-tabs Subversion property from the files too.
394
395         * bindings/objc/WebScriptObject.h:
396         * bindings/objc/WebScriptObject.mm:
397         * platform/FontData.cpp:
398
399 2006-07-29  Sam Weinig  <sam.weinig@gmail.com>
400
401         Reviewed by Darin.
402
403         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10080
404           Adopt pedantic changes from the Unity project to improve 
405           cross-compiler compatibility
406
407           Changes include:
408           * Removing trailing semicolon from namespace braces.
409           * Removing trailing comma from last enum declaration.
410           * Updating to match style guidelines.
411           * Adding missing newline to the end of the file.
412           * Turning on gcc warning for missing newline at the end of a source file
413             (GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc).
414           * Alphabetical sorting of Xcode source list files.
415           * Use abs() function from <math.h> instead of ABS() macro.
416           * Use C-style comments instead of C++ comments in files that might
417             be included by either C or C++ files.
418           * Use -numeric_limits<double>::infinity() instead of -HUGE_VAL.
419
420         * WebCore+SVG/DOMList.h:
421         * WebCore.xcodeproj/project.pbxproj:
422         * WebCorePrefix.h:
423         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
424         * bindings/js/JSXSLTProcessor.h:
425         * bindings/js/kjs_domnode.h:
426         (KJS::DOMNode::):
427         * bindings/objc/DOMCSS.h:
428         (-[DOMCSSValue enum]):
429         * bindings/objc/DOMCore.h:
430         (-[DOMImplementation createDocument:::]):
431         * bindings/objc/DOMEvents.h:
432         (-[DOMOverflowEvent enum]):
433         * bindings/objc/DOMRange.h:
434         * bindings/objc/DOMTraversal.h:
435         * bindings/objc/DOMXPath.h:
436         (-[DOMXPathNSResolver lookupNamespaceURI:]):
437         * bridge/mac/WebCoreFrameBridge.h:
438         * bridge/mac/WebCoreKeyboardAccess.h:
439         * css/makeprop:
440         * css/makevalues:
441         * dom/ChildNodeList.h:
442         * dom/DocPtr.h:
443         * dom/Document.h:
444         (WebCore::Document::):
445         * dom/DocumentMarker.h:
446         (WebCore::DocumentMarker::):
447         (WebCore::DocumentMarker::operator==):
448         (WebCore::DocumentMarker::operator!=):
449         * dom/EventTargetNode.h:
450         * dom/KeyboardEvent.h:
451         (WebCore::KeyboardEvent::):
452         * dom/NameNodeList.h:
453         (WebCore::NameNodeList::rootNodeChildrenChanged):
454         * dom/QualifiedName.cpp:
455         * editing/TypingCommand.h:
456         (WebCore::TypingCommand::):
457         * editing/UnlinkCommand.h:
458         (WebCore::UnlinkCommand::editingAction):
459         * html/FormDataList.h:
460         (WebCore::FormDataListItem::FormDataListItem):
461         (WebCore::FormDataList::appendData):
462         * html/HTMLBlockquoteElement.h:
463         * html/HTMLDivElement.h:
464         * html/HTMLFormElement.h:
465         * html/HTMLHRElement.h:
466         * html/HTMLHeadingElement.h:
467         * html/HTMLMarqueeElement.h:
468         * html/HTMLParagraphElement.h:
469         * html/HTMLPlugInElement.h:
470         * html/HTMLPreElement.h:
471         * html/HTMLTokenizer.h:
472         (WebCore::HTMLTokenizer::State::):
473         * icon/IconDatabase.cpp:
474         * icon/SQLStatement.cpp:
475         * kcanvas/KCanvasFilters.h:
476         (WebCore::):
477         (WebCore::KCanvasPoint3F::KCanvasPoint3F):
478         (WebCore::KCanvasFilter::KCanvasFilter):
479         (WebCore::KCanvasFilter::~KCanvasFilter):
480         (WebCore::KCanvasFilterEffect::~KCanvasFilterEffect):
481         (WebCore::KCComponentTransferFunction::KCComponentTransferFunction):
482         (WebCore::KCanvasFEConvolveMatrix::KCanvasFEConvolveMatrix):
483         (WebCore::KCLightSource::KCLightSource):
484         (WebCore::KCDistantLightSource::KCDistantLightSource):
485         (WebCore::KCPointLightSource::KCPointLightSource):
486         (WebCore::KCSpotLightSource::KCSpotLightSource):
487         (WebCore::KCanvasFEDiffuseLighting::KCanvasFEDiffuseLighting):
488         (WebCore::KCanvasFEDisplacementMap::KCanvasFEDisplacementMap):
489         (WebCore::KCanvasFEImage::KCanvasFEImage):
490         (WebCore::KCanvasFESpecularLighting::KCanvasFESpecularLighting):
491         * kcanvas/RenderSVGImage.h:
492         * kcanvas/device/quartz/KRenderingDeviceQuartz.h:
493         * ksvg2/css/SVGRenderStyle.h:
494         (WebCore::SVGRenderStyle::InheritedFlags::):
495         (WebCore::SVGRenderStyle::NonInheritedFlags::):
496         * ksvg2/css/SVGRenderStyleDefs.h:
497         (WebCore::):
498         * ksvg2/events/SVGZoomEvent.h:
499         * ksvg2/ksvg.h:
500         (WebCore::):
501         * ksvg2/misc/KCanvasRenderingStyle.h:
502         * ksvg2/misc/SVGImageLoader.h:
503         * ksvg2/scripts/make_names.pl:
504         * ksvg2/svg/SVGAElement.h:
505         * ksvg2/svg/SVGAngle.h:
506         * ksvg2/svg/SVGAnimateColorElement.h:
507         * ksvg2/svg/SVGAnimateElement.h:
508         * ksvg2/svg/SVGAnimateTransformElement.h:
509         * ksvg2/svg/SVGAnimatedAngle.h:
510         * ksvg2/svg/SVGAnimatedBoolean.h:
511         * ksvg2/svg/SVGAnimatedColor.h:
512         * ksvg2/svg/SVGAnimatedEnumeration.h:
513         * ksvg2/svg/SVGAnimatedInteger.h:
514         * ksvg2/svg/SVGAnimatedLength.h:
515         * ksvg2/svg/SVGAnimatedLengthList.h:
516         * ksvg2/svg/SVGAnimatedNumber.h:
517         * ksvg2/svg/SVGAnimatedNumberList.h:
518         * ksvg2/svg/SVGAnimatedPathData.h:
519         * ksvg2/svg/SVGAnimatedPoints.h:
520         * ksvg2/svg/SVGAnimatedPreserveAspectRatio.h:
521         * ksvg2/svg/SVGAnimatedRect.h:
522         * ksvg2/svg/SVGAnimatedString.h:
523         * ksvg2/svg/SVGAnimatedTemplate.h:
524         * ksvg2/svg/SVGAnimatedTransformList.h:
525         * ksvg2/svg/SVGAnimationElement.cpp:
526         (SVGAnimationElement::calculateCurrentValueItem):
527         (SVGAnimationElement::calculateRelativeTimePercentage):
528         * ksvg2/svg/SVGAnimationElement.h:
529         (WebCore::):
530         * ksvg2/svg/SVGCircleElement.h:
531         * ksvg2/svg/SVGClipPathElement.h:
532         * ksvg2/svg/SVGColor.h:
533         * ksvg2/svg/SVGComponentTransferFunctionElement.h:
534         * ksvg2/svg/SVGCursorElement.h:
535         * ksvg2/svg/SVGDOMImplementation.h:
536         * ksvg2/svg/SVGDefsElement.h:
537         * ksvg2/svg/SVGDescElement.h:
538         * ksvg2/svg/SVGDocument.h:
539         * ksvg2/svg/SVGElement.h:
540         (WebCore::SVGElement::rendererIsNeeded):
541         (WebCore::svg_dynamic_cast):
542         * ksvg2/svg/SVGElementInstance.h:
543         * ksvg2/svg/SVGElementInstanceList.h:
544         * ksvg2/svg/SVGEllipseElement.h:
545         * ksvg2/svg/SVGExternalResourcesRequired.h:
546         * ksvg2/svg/SVGFEBlendElement.h:
547         * ksvg2/svg/SVGFEColorMatrixElement.h:
548         * ksvg2/svg/SVGFEComponentTransferElement.h:
549         * ksvg2/svg/SVGFECompositeElement.h:
550         * ksvg2/svg/SVGFEDiffuseLightingElement.h:
551         * ksvg2/svg/SVGFEDisplacementMapElement.h:
552         * ksvg2/svg/SVGFEDistantLightElement.h:
553         * ksvg2/svg/SVGFEFloodElement.h:
554         * ksvg2/svg/SVGFEFuncAElement.h:
555         * ksvg2/svg/SVGFEFuncBElement.h:
556         * ksvg2/svg/SVGFEFuncGElement.h:
557         * ksvg2/svg/SVGFEFuncRElement.h:
558         * ksvg2/svg/SVGFEGaussianBlurElement.h:
559         * ksvg2/svg/SVGFEImageElement.h:
560         * ksvg2/svg/SVGFELightElement.h:
561         * ksvg2/svg/SVGFEMergeElement.h:
562         * ksvg2/svg/SVGFEMergeNodeElement.h:
563         * ksvg2/svg/SVGFEOffsetElement.h:
564         * ksvg2/svg/SVGFEPointLightElement.h:
565         * ksvg2/svg/SVGFESpecularLightingElement.h:
566         * ksvg2/svg/SVGFESpotLightElement.h:
567         * ksvg2/svg/SVGFETileElement.h:
568         * ksvg2/svg/SVGFETurbulenceElement.h:
569         * ksvg2/svg/SVGFilterElement.h:
570         * ksvg2/svg/SVGFilterPrimitiveStandardAttributes.h:
571         * ksvg2/svg/SVGFitToViewBox.h:
572         * ksvg2/svg/SVGForeignObjectElement.cpp:
573         * ksvg2/svg/SVGForeignObjectElement.h:
574         * ksvg2/svg/SVGGElement.h:
575         * ksvg2/svg/SVGGradientElement.h:
576         * ksvg2/svg/SVGHelper.h:
577         (WebCore::):
578         * ksvg2/svg/SVGImageElement.h:
579         * ksvg2/svg/SVGLangSpace.h:
580         * ksvg2/svg/SVGLength.h:
581         * ksvg2/svg/SVGLengthList.h:
582         * ksvg2/svg/SVGLineElement.h:
583         * ksvg2/svg/SVGLinearGradientElement.h:
584         * ksvg2/svg/SVGList.h:
585         * ksvg2/svg/SVGLocatable.h:
586         * ksvg2/svg/SVGMarkerElement.h:
587         * ksvg2/svg/SVGMaskElement.h:
588         * ksvg2/svg/SVGMatrix.h:
589         * ksvg2/svg/SVGNumber.h:
590         * ksvg2/svg/SVGNumberList.h:
591         * ksvg2/svg/SVGPaint.h:
592         * ksvg2/svg/SVGPathElement.h:
593         * ksvg2/svg/SVGPathSeg.h:
594         * ksvg2/svg/SVGPathSegArc.h:
595         * ksvg2/svg/SVGPathSegClosePath.h:
596         * ksvg2/svg/SVGPathSegCurvetoCubic.h:
597         * ksvg2/svg/SVGPathSegCurvetoCubicSmooth.h:
598         * ksvg2/svg/SVGPathSegCurvetoQuadratic.h:
599         * ksvg2/svg/SVGPathSegCurvetoQuadraticSmooth.h:
600         * ksvg2/svg/SVGPathSegLineto.h:
601         * ksvg2/svg/SVGPathSegLinetoHorizontal.h:
602         * ksvg2/svg/SVGPathSegLinetoVertical.h:
603         * ksvg2/svg/SVGPathSegList.h:
604         * ksvg2/svg/SVGPathSegMoveto.h:
605         * ksvg2/svg/SVGPatternElement.h:
606         * ksvg2/svg/SVGPoint.h:
607         * ksvg2/svg/SVGPointList.h:
608         * ksvg2/svg/SVGPolyElement.h:
609         * ksvg2/svg/SVGPolygonElement.h:
610         * ksvg2/svg/SVGPolylineElement.h:
611         * ksvg2/svg/SVGPreserveAspectRatio.h:
612         * ksvg2/svg/SVGRadialGradientElement.h:
613         * ksvg2/svg/SVGRect.h:
614         * ksvg2/svg/SVGRectElement.h:
615         * ksvg2/svg/SVGSVGElement.h:
616         * ksvg2/svg/SVGScriptElement.h:
617         * ksvg2/svg/SVGSetElement.h:
618         * ksvg2/svg/SVGStopElement.h:
619         * ksvg2/svg/SVGStringList.h:
620         * ksvg2/svg/SVGStylable.h:
621         * ksvg2/svg/SVGStyleElement.h:
622         * ksvg2/svg/SVGStyledElement.h:
623         (WebCore::SVGStyledElement::rendererIsNeeded):
624         (WebCore::SVGStyledElement::canvasResource):
625         * ksvg2/svg/SVGStyledLocatableElement.h:
626         * ksvg2/svg/SVGStyledTransformableElement.h:
627         * ksvg2/svg/SVGSwitchElement.h:
628         * ksvg2/svg/SVGSymbolElement.h:
629         * ksvg2/svg/SVGTRefElement.h:
630         * ksvg2/svg/SVGTSpanElement.h:
631         * ksvg2/svg/SVGTests.h:
632         * ksvg2/svg/SVGTextContentElement.h:
633         * ksvg2/svg/SVGTextElement.h:
634         * ksvg2/svg/SVGTextPositioningElement.h:
635         * ksvg2/svg/SVGTitleElement.h:
636         * ksvg2/svg/SVGTransform.h:
637         * ksvg2/svg/SVGTransformList.h:
638         * ksvg2/svg/SVGTransformable.h:
639         * ksvg2/svg/SVGURIReference.h:
640         * ksvg2/svg/SVGUseElement.h:
641         * ksvg2/svg/SVGViewElement.h:
642         * ksvg2/svg/SVGZoomAndPan.h:
643         * ksvg2/svg/svgpathparser.h:
644         * page/Frame.h:
645         (WebCore::):
646         * platform/AffineTransform.h:
647         * platform/FontCache.cpp:
648         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
649         * platform/FontData.cpp:
650         (WebCore::FontData::FontData):
651         * platform/FontData.h:
652         * platform/TextBox.h:
653         (WebCore::TextBox::):
654         * platform/Timer.cpp:
655         (WebCore::TimerBase::heapPop):
656         * platform/mac/FontCacheMac.mm:
657         * platform/mac/GlyphMapMac.cpp:
658         * platform/mac/WebFontCache.mm:
659         (betterChoice):
660         * rendering/DeprecatedRenderSelect.cpp:
661         (WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
662         * rendering/EllipsisBox.h:
663         * rendering/RenderBR.h:
664         (WebCore::RenderBR::renderName):
665         (WebCore::RenderBR::width):
666         * rendering/RenderBlock.h:
667         (WebCore::):
668         * rendering/RenderFlexibleBox.h:
669         * rendering/RenderFlow.h:
670         (WebCore::RenderFlow::RenderFlow):
671         * rendering/RenderFrame.cpp:
672         * rendering/bidi.h:
673         * rendering/break_lines.cpp:
674
675 2006-07-29  Rob Buis  <buis@kde.org>
676
677         Reviewed by Geoff.
678
679         http://bugzilla.opendarwin.org/show_bug.cgi?id=10151
680         ghostmap XHTML + SVG fails due to javascript undefined exception
681
682         Make sure document.URL works when called from a non-HTML document.
683
684         * bindings/js/kjs_html.cpp:
685         (KJS::JSHTMLDocument::getValueProperty):
686         * bindings/js/kjs_html.h:
687         (KJS::JSHTMLDocument::):
688         * dom/Document.idl:
689
690 2006-07-29  Mike Emmel  <mike.emmel@gmail.com>
691
692         Reviewed and tweaked by Darin.
693
694         - fixes for Linux build
695           (still might not compile, since Darin tweaked but was unable to test).
696
697         * WebCoreSources.bkl: Added some new sources, removed some obsolete ones.
698         * Projects/gdk/webcore-gdk.bkl: Added RenderPopupMenuGdk.cpp
699
700         * html/HTMLPlugInElement.h: Removed incorrect syntax with class name
701         before ::.
702
703         * platform/gdk/FrameGdk.h:
704         * platform/gdk/FrameGdk.cpp: Updated parameters of constructor. Moved a couple stubs
705         out of this file.
706         * platform/gdk/RenderPopupMenuGdk.h: Added.
707         * platform/gdk/RenderPopupMenuGdk.cpp: Added. Just a file full of empty stubs.
708         * platform/gdk/RenderThemeGdk.h:
709         * platform/gdk/RenderThemeGdk.cpp: (WebCore::RenderThemeGdk::createPopupMenu): Added.
710
711         * platform/gdk/TemporaryLinkStubs.cpp: Add some new stubs.
712
713 2006-07-29  Mark Rowe  <opendarwin.org@bdash.net.nz>
714
715         Reviewed by Darin.
716
717         http://bugzilla.opendarwin.org/show_bug.cgi?id=10022
718         Bug 10022: REGRESSION: Crash in WebCore::XMLTokenizer::characters
719
720         * dom/XMLTokenizer.cpp:
721         (WebCore::XMLTokenizer::resumeParsing): If the write() call resulted in new callbacks being
722         added, don't call through to end() just yet.
723
724 2006-07-29  Mitz Pettel  <opendarwin.org@mitzpettel.com>
725
726         Reviewed by John Sullivan.
727
728         - manual test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9984
729           ASSERTION FAILURE: _private->mouseDownEvent != nil
730           (WebKit/WebView/WebHTMLView.m:4863 -[WebHTMLView(WebInternal) _delegateDragSourceActionMask])
731
732         * manual-tests/subview-click-assertion.html: Added.
733
734 2006-07-29  Andrew Wellington  <proton@wiretapped.net>
735
736         Reviewed by Darin.
737
738         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8587 / <rdar://problem/4631844>
739         REGRESSION: {display:list-item} items outside an ol or ul element don't number correctly
740
741         * rendering/RenderListItem.cpp:
742         (WebCore::enclosingList): If no real list element is found, use parent instead.
743         (WebCore::previousListItem): Check list elements to see if they are list items -- the
744         old code assumed that a list would never be a list item but this is entirely possible
745         with CSS and especially with the new rule that means any DOM element could act as a list.
746
747 2006-07-29  Alexey Proskuryakov  <ap@nypop.com>
748
749         Reviewed by Darin.
750
751         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10147
752         REGRESSION: custom attribute values set via javascript are not persistent
753
754         Test: fast/dom/Element/setAttribute-case-insensitivity.html
755
756         * dom/Element.cpp:
757         (WebCore::Element::setAttribute): Use the lowercased localName for retrieving the old value, too.
758
759 2006-07-28  Timothy Hatcher  <timothy@apple.com>
760
761         Suggested by Darin.
762
763         Moving the implementation of isContentEditable to the
764         the WebPrivate category.
765
766         * bindings/objc/DOM.mm:
767         (-[DOMNode isContentEditable]):
768
769 2006-07-28  Justin Garcia  <justin.garcia@apple.com>
770
771         Reviewed by levi
772         
773         First part of:
774         <rdar://problem/4515463>
775         REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page
776         
777         Migrate to isBlock and enclosingBlock.
778         Changed RendereringInfo::isBlock and ReplacementFragment::isBlock
779         to wasBlock so that they don't conflict with isBlock and because
780         it's more descriptive.
781
782         * editing/ReplaceSelectionCommand.cpp:
783         (WebCore::ReplacementFragment::mergeStartNode):
784         (WebCore::ReplacementFragment::wasBlock):
785         (WebCore::ReplacementFragment::saveRenderingInfo):
786         (WebCore::ReplacementFragment::renderedBlocks):
787         (WebCore::RenderingInfo::RenderingInfo):
788         (WebCore::ReplaceSelectionCommand::shouldMergeStart):
789         (WebCore::ReplaceSelectionCommand::doApply):
790         * editing/ReplaceSelectionCommand.h:
791         (WebCore::RenderingInfo::wasBlock):
792
793 2006-07-27  Justin Garcia  <justin.garcia@apple.com>
794
795         Reviewed by levi
796         
797         More changes for:
798         <rdar://problem/4242293>
799         Poor paste fidelity of http://www.google.com/
800
801         * editing/markup.cpp:
802         (WebCore::needInterchangeNewlineAfter): Added.
803         (WebCore::createMarkup): 
804         Only add an interchangeNewline if we're annotating for interchange.  Can't test 
805         this until we expose createMarkup in non-annotate mode (I'd expose Range::toHTML).
806         Remove the FIXME about prepending the interchangeNewline before creating the rest 
807         of the markup.  Its correct to surround the interchangeNewline in ancestors of the
808         adjusted startNode.
809         Fixed the check to see if an interchangeNewline is needed (!inSameBlock).  This would
810         add an interchangeNewline for a selection that started before a table.
811         Removed the workaround for the bug where markup for a table was not included when 
812         selecting the contents of a table, since this change fixes the general problem of 
813         markup for ancestors of the startNode being left out.
814         Don't leave out ancestors of the startNode as we leave their subtrees.  Execute the
815         code to include them even if we closed ancestors in the ancestorsToClose list.
816
817 2006-07-28  Timothy Hatcher  <timothy@apple.com>
818
819         Reviewed by John.
820
821         Adding isContentEditable to DOMNode's private category. 
822
823         * bindings/objc/DOMPrivate.h:
824
825 2006-07-28  Alexey Proskuryakov  <ap@nypop.com>
826
827         Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=6010 because of failing layout tests.
828         Add better SVGLoad event support.
829
830         * dom/EventTargetNode.cpp:
831         (WebCore::EventTargetNode::dispatchGenericEvent):
832         * html/HTMLImageLoader.cpp:
833         (WebCore::HTMLImageLoader::dispatchLoadEvent):
834         * html/HTMLImageLoader.h:
835         * ksvg2/misc/SVGImageLoader.cpp:
836         (WebCore::SVGImageLoader::SVGImageLoader):
837         * ksvg2/misc/SVGImageLoader.h:
838         * ksvg2/svg/SVGAElement.cpp:
839         (WebCore::SVGAElement::parseMappedAttribute):
840         * ksvg2/svg/SVGAnimatedBoolean.h:
841         * ksvg2/svg/SVGElement.cpp:
842         (WebCore::SVGElement::SVGElement):
843         (WebCore::SVGElement::parseMappedAttribute):
844         * ksvg2/svg/SVGElement.h:
845         (WebCore::SVGElement::adjustViewportClipping):
846         (WebCore::SVGElement::closeRenderer):
847         (WebCore::SVGElement::rendererIsNeeded):
848         (WebCore::SVGElement::isClosed):
849         (WebCore::svg_dynamic_cast):
850         * ksvg2/svg/SVGExternalResourcesRequired.h:
851         * ksvg2/svg/SVGImageElement.cpp:
852         (SVGImageElement::SVGImageElement):
853         * ksvg2/svg/SVGImageElement.h:
854         * ksvg2/svg/SVGSVGElement.cpp:
855         (WebCore::SVGSVGElement::parseMappedAttribute):
856         * ksvg2/svg/SVGScriptElement.cpp:
857         (SVGScriptElement::SVGScriptElement):
858         (SVGScriptElement::parseMappedAttribute):
859         (SVGScriptElement::executeScript):
860         * xml/xmlhttprequest.cpp:
861         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
862
863 2006-07-28  Adele Peterson  <adele@apple.com>
864
865         Rolling out http://bugzilla.opendarwin.org/show_bug.cgi?id=9753 because of failing layout tests.
866         SVG with width and height 100% leaves room for scrollbar on the right.
867
868         * kcanvas/RenderPath.cpp:
869         * kcanvas/RenderPath.h:
870         * kcanvas/RenderSVGContainer.cpp:
871         (WebCore::RenderSVGContainer::layout):
872         * ksvg2/svg/SVGCircleElement.cpp:
873         * ksvg2/svg/SVGCircleElement.h:
874         * ksvg2/svg/SVGEllipseElement.cpp:
875         * ksvg2/svg/SVGEllipseElement.h:
876         * ksvg2/svg/SVGLineElement.cpp:
877         * ksvg2/svg/SVGLineElement.h:
878         * ksvg2/svg/SVGRectElement.cpp:
879         * ksvg2/svg/SVGRectElement.h:
880         * ksvg2/svg/SVGStyledElement.h:
881
882 2006-07-27  Eric Seidel  <eric@eseidel.com>
883
884         Reviewed by darin.
885         
886         Add better SVGLoad event support.
887         http://bugzilla.opendarwin.org/show_bug.cgi?id=6010
888         There will still need to be additional support added for <link> and <script> elements.
889         Not all of the error -> loaded -> error transition cases work yet.
890
891         * dom/EventTargetNode.cpp:
892         (WebCore::EventTargetNode::dispatchGenericEvent):
893         * html/HTMLImageLoader.cpp:
894         (WebCore::HTMLImageLoader::dispatchLoadEvent):
895         * html/HTMLImageLoader.h:
896         (WebCore::HTMLImageLoader::haveFiredLoadEvent):
897         (WebCore::HTMLImageLoader::setHaveFiredLoadEvent):
898         * ksvg2/misc/SVGImageLoader.cpp:
899         (WebCore::SVGImageLoader::SVGImageLoader):
900         (WebCore::SVGImageLoader::dispatchLoadEvent):
901         * ksvg2/misc/SVGImageLoader.h:
902         * ksvg2/svg/SVGAElement.cpp:
903         (WebCore::SVGAElement::parseMappedAttribute):
904         * ksvg2/svg/SVGAnimatedBoolean.h:
905         * ksvg2/svg/SVGElement.cpp:
906         (WebCore::SVGElement::SVGElement):
907         (WebCore::SVGElement::parseMappedAttribute):
908         (WebCore::SVGElement::haveLoadedRequiredResources):
909         (WebCore::SVGElement::sendSVGLoadEventIfPossible):
910         (WebCore::SVGElement::closeRenderer):
911         * ksvg2/svg/SVGElement.h:
912         (WebCore::SVGElement::rendererIsNeeded):
913         (WebCore::svg_dynamic_cast):
914         * ksvg2/svg/SVGExternalResourcesRequired.h:
915         * ksvg2/svg/SVGImageElement.cpp:
916         (SVGImageElement::SVGImageElement):
917         (SVGImageElement::haveLoadedRequiredResources):
918         * ksvg2/svg/SVGImageElement.h:
919         * ksvg2/svg/SVGSVGElement.cpp:
920         (WebCore::SVGSVGElement::parseMappedAttribute):
921         * ksvg2/svg/SVGScriptElement.cpp:
922         (WebCore::SVGScriptElement::SVGScriptElement):
923         (WebCore::SVGScriptElement::parseMappedAttribute):
924         (WebCore::SVGScriptElement::executeScript):
925         * xml/xmlhttprequest.cpp:
926         (WebCore::XMLHttpRequest::callReadyStateChangeListener): use new Event() instead of createEvent
927
928 2006-07-27  Mitz Pettel  <opendarwin.org@mitzpettel.com>
929
930         Reviewed by Anders.
931
932         - http://bugzilla.opendarwin.org/show_bug.cgi?id=10135
933           Cleanup: remove useless parameters from RenderObject::position()
934
935         No test possible (no functionality change)
936
937         * rendering/RenderBox.cpp:
938         (WebCore::RenderBox::position):
939         * rendering/RenderBox.h:
940         * rendering/RenderObject.h:
941         (WebCore::RenderObject::position):
942         * rendering/RenderTableRow.h:
943         (WebCore::RenderTableRow::position):
944         * rendering/RenderTableSection.h:
945         (WebCore::RenderTableSection::position):
946         * rendering/RenderText.cpp:
947         (WebCore::RenderText::position):
948         * rendering/RenderText.h:
949         * rendering/bidi.cpp:
950         (WebCore::RenderBlock::constructLine):
951         (WebCore::RenderBlock::computeVerticalPositionsForLine):
952
953 2006-07-27  Rob Buis  <buis@kde.org>
954
955         Reviewed by Maciej.
956
957         http://bugzilla.opendarwin.org/show_bug.cgi?id=9753
958         SVG with width and height 100% leaves room for scrollbar on the right.
959
960         Relayout children of svg containers, except svg shapes that do not depend on percentages.
961
962         * kcanvas/RenderPath.cpp: (WebCore::RenderPath::hasPercentageValues):
963         * kcanvas/RenderPath.h:
964         * kcanvas/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout):
965         * ksvg2/svg/SVGCircleElement.cpp: (SVGCircleElement::hasPercentageValues):
966         * ksvg2/svg/SVGCircleElement.h:
967         * ksvg2/svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::hasPercentageValues):
968         * ksvg2/svg/SVGEllipseElement.h:
969         * ksvg2/svg/SVGLineElement.cpp: (SVGLineElement::hasPercentageValues):
970         * ksvg2/svg/SVGLineElement.h:
971         * ksvg2/svg/SVGRectElement.cpp: (WebCore::SVGRectElement::hasPercentageValues):
972         * ksvg2/svg/SVGRectElement.h:
973         * ksvg2/svg/SVGStyledElement.h: (WebCore::SVGStyledElement::hasPercentageValues):
974
975 2006-07-27  Justin Garcia  <justin.garcia@apple.com>
976
977         Reviewed by levi
978         
979         <rdar://problem/4242293>
980         Poor paste fidelity of http://www.google.com/
981
982         * editing/ApplyStyleCommand.cpp:
983         (WebCore::ApplyStyleCommand::applyInlineStyle):  Fixed crasher with nil-check.
984         * editing/markup.cpp:
985         (WebCore::startMarkup): Style information wasn't added to an element if it had
986         attributes but no style attribute.
987
988 2006-07-27  Alexander Kellett  <lypanov@kde.org>
989
990         Reviewed by Darin.
991
992         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9867
993           REGRESSION: code that modifies form element in Firefox modifies form attribute in WebKit
994
995         * bindings/scripts/CodeGeneratorJS.pm: add new attribute - HasOverridingNameGetter
996         * html/HTMLFormElement.idl:
997
998 2006-07-27  Rob Buis  <buis@kde.org>
999
1000         Reviewed by Anders.
1001
1002         http://bugzilla.opendarwin.org/show_bug.cgi?id=8992
1003         Some HTML DOM attributes have incorrect types
1004
1005         Adjust idl and dom source code for HTMLImageElement and
1006         HTMLBaseFontElement to choose correct type for
1007         HTMLImageElement::border and HTMLBaseFontElement::size
1008         attributes.
1009
1010         * html/HTMLBaseFontElement.cpp:
1011         (WebCore::HTMLBaseFontElement::size):
1012         (WebCore::HTMLBaseFontElement::setSize):
1013         * html/HTMLBaseFontElement.h:
1014         * html/HTMLBaseFontElement.idl:
1015         * html/HTMLImageElement.cpp:
1016         (WebCore::HTMLImageElement::border):
1017         (WebCore::HTMLImageElement::setBorder):
1018         * html/HTMLImageElement.h:
1019         * html/HTMLImageElement.idl:
1020
1021 2006-07-27  Justin Garcia  <justin.garcia@apple.com>
1022
1023         Reviewed by levi
1024         
1025         <rdar://problem/4628409>
1026         Safari crashes in CompositeEditCommand::removeBlockPlaceholder entering text in a web page form
1027
1028         * editing/CompositeEditCommand.cpp:
1029         (WebCore::CompositeEditCommand::removeBlockPlaceholder): 
1030         A script on the page shrinks the textarea down to zero rows just
1031         before insertion.  That gives the shadow div a zero height, removing
1032         [div, 0] as a candidate for a VisiblePosition.  Then 
1033         InsertTextCommand::input() tries to create a VisiblePosition from 
1034         [div, 0] and fails.  A nil check is a quick fix.  Another might
1035         be to make positions where there is a caret selection candidates.
1036         Another might be to make any [div, 0] where div is a shadow div inside
1037         a form element a candidate.
1038
1039 2006-07-27  Graham Dennis  <graham.dennis@gmail.com>
1040
1041         Reviewed by Darin.
1042
1043         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10094
1044           Japanese characters improperly rendering in TOT
1045           
1046         Test: fast/encoding/denormalised-voiced-japanese-chars.html
1047
1048         * platform/Font.cpp:
1049         (WebCore::WidthIterator::advance): pass currentCharacter to normalizeVoicingMarks
1050         (WebCore::WidthIterator::normalizeVoicingMarks): turn the currentCharacter variable
1051         into an argument as WidthIterator::advance doesn't update m_currentCharacter while
1052         looping
1053
1054 2006-07-27  Eric Seidel  <eric@eseidel.com>
1055
1056         Reviewed by ap.
1057
1058         Complex entities seem to fail on TOT
1059         http://bugzilla.opendarwin.org/show_bug.cgi?id=6390
1060         Use an alternative work-around to an XML Entity parsing bug.
1061
1062         * dom/XMLTokenizer.cpp:
1063         (WebCore::XMLTokenizer::write):
1064         (WebCore::hackAroundLibXMLEntityBug): added.
1065         (WebCore::startElementNsHandler):
1066         (WebCore::endElementNsHandler):
1067         (WebCore::charactersHandler):
1068         (WebCore::processingInstructionHandler):
1069         (WebCore::cdataBlockHandler):
1070         (WebCore::commentHandler):
1071         (WebCore::getEntityHandler):
1072
1073 2006-07-27  Rob Buis  <buis@kde.org>
1074
1075         Reviewed by Darin.
1076
1077         http://bugzilla.opendarwin.org/show_bug.cgi?id=9938
1078         Fix viewBox issues in Hixie's test
1079
1080         Do a more accurate and quicker job of parsing the viewBox
1081         attribute. Handle properly on negative width/height and
1082         invalid syntax in general.
1083
1084         * ksvg2/svg/SVGFitToViewBox.cpp:
1085         (SVGFitToViewBox::parseViewBox):
1086
1087 2006-07-27  Eric Seidel  <eric@eseidel.com>
1088
1089         Reviewed by ap.
1090
1091         Enables getSVGDocument() support for HTMLObjectElement and HTMLEmbedElement
1092         http://bugzilla.opendarwin.org/show_bug.cgi?id=9237
1093         This patch does not try to autogenerate anything, but enables the SVG functionality.
1094         Also fix HTMLObjectElement vspace and hspace to be numbers instead of strings to match IE & Firefox.
1095
1096         * bindings/js/kjs_dom.cpp:
1097         (KJS::toJS):
1098         * bindings/js/kjs_html.cpp:
1099         (KJS::JSHTMLElement::objectGetter):
1100         (KJS::HTMLElementFunction::callAsFunction):
1101         (KJS::JSHTMLElement::objectSetter):
1102         * bindings/js/kjs_html.h:
1103         (KJS::JSHTMLElement::):
1104         * dom/Document.h:
1105         (WebCore::Document::isSVGDocument):
1106         * html/HTMLEmbedElement.cpp:
1107         (WebCore::HTMLEmbedElement::contentDocument):
1108         (WebCore::HTMLEmbedElement::getSVGDocument):
1109         * html/HTMLEmbedElement.h:
1110         * html/HTMLObjectElement.cpp:
1111         (WebCore::HTMLObjectElement::HTMLObjectElement):
1112         (WebCore::HTMLObjectElement::getInstance):
1113         (WebCore::HTMLObjectElement::parseMappedAttribute):
1114         (WebCore::HTMLObjectElement::contentDocument):
1115         (WebCore::HTMLObjectElement::rendererIsNeeded):
1116         (WebCore::HTMLObjectElement::createRenderer):
1117         (WebCore::HTMLObjectElement::setCode):
1118         (WebCore::HTMLObjectElement::setArchive):
1119         (WebCore::HTMLObjectElement::setBorder):
1120         (WebCore::HTMLObjectElement::setCodeBase):
1121         (WebCore::HTMLObjectElement::setCodeType):
1122         (WebCore::HTMLObjectElement::setData):
1123         (WebCore::HTMLObjectElement::hspace):
1124         (WebCore::HTMLObjectElement::setHspace):
1125         (WebCore::HTMLObjectElement::setStandby):
1126         (WebCore::HTMLObjectElement::setType):
1127         (WebCore::HTMLObjectElement::setUseMap):
1128         (WebCore::HTMLObjectElement::vspace):
1129         (WebCore::HTMLObjectElement::setVspace):
1130         (WebCore::HTMLObjectElement::getSVGDocument):
1131         * html/HTMLObjectElement.h:
1132         * ksvg2/svg/SVGDocument.h:
1133         (WebCore::SVGDocument::isSVGDocument):
1134         * rendering/RenderWidget.h:
1135         (WebCore::RenderWidget::frameView):
1136
1137 2006-07-26  Alexey Proskuryakov  <ap@nypop.com>
1138
1139         Reviewed by Darin.
1140
1141         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9901
1142         XSLTProcessor cannot parse text nodes for INPUT ELEMENTS in an XSLT stylesheet
1143
1144         Test: fast/js/xhtml-serialize.html
1145
1146         * editing/markup.cpp:
1147         (WebCore::endMarkup): If the element has child nodes, write a closing tag even if it 
1148         is not permitted in HTML, to make it valid XML.
1149
1150 2006-07-26  Alice Liu  <alice.liu@apple.com>
1151
1152         Reviewed by John Sullivan (and Kevin and Timo).
1153
1154         landing this patch for John et al.  
1155         Fixed <rdar://problem/4651380> REGRESSION (9A232->9A234): existing web clips don't render if you restart Dashboard
1156
1157         * page/FrameView.cpp:
1158         (WebCore::FrameView::layout):
1159         moved the call to didFirstLayout to above the check for needsLayout
1160         because we need to call didFirstLayout for every webview, not just
1161         ones we think need layout.  
1162
1163 2006-07-26  Justin Garcia  <justin.garcia@apple.com>
1164
1165         Reviewed by darin
1166         
1167         <rdar://problem/4652788>
1168         REGRESSION: Can't change size or style of any text in message body
1169
1170         * dom/Node.cpp:
1171         (WebCore::Node::isContentRichlyEditable): Mimic Node::isContentEditable.
1172         * html/HTMLElement.cpp:
1173         (WebCore::HTMLElement::isContentRichlyEditable): First check
1174         the frame for editability, then userModify, like what
1175         HTMLElement::isContentEditable() does.
1176         * html/HTMLElement.h:
1177
1178 2006-07-26  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1179
1180         Reviewed by ap.
1181
1182         - fix debug-only information() string for table cells
1183
1184         * rendering/RenderObject.cpp:
1185         (WebCore::RenderObject::information):
1186
1187 2006-07-25  David Harrison  <harrison@apple.com>
1188
1189         Reviewed by timo and Darin.
1190
1191         <rdar://problem/4618584> "Paste and Match Style" is not working in Mail (add SPI)
1192         
1193         * WebCore.xcodeproj/project.pbxproj:
1194         * bridge/mac/WebCoreFrameBridge.h:
1195         * bridge/mac/WebCoreFrameBridge.mm:
1196         (-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
1197         Add matchStyle parameter for use by WebKit.
1198
1199 2006-07-25  Justin Garcia  <justin.garcia@apple.com>
1200
1201         Reviewed by adele
1202         
1203         <rdar://problem/4649560>
1204         REGRESSION: Can't Select All when the body is contentEditable="true"
1205
1206         * editing/VisiblePosition.cpp:
1207         (WebCore::VisiblePosition::canonicalPosition): Allow descent from a non-editable html
1208         element into an editable body as a convenience.
1209
1210 2006-07-25  Justin Garcia  <justin.garcia@apple.com>
1211
1212         Reviewed by darin
1213         
1214         <rdar://problem/4468458> Incoming HTML message is editable <body contenteditable="true">
1215
1216         * dom/Document.cpp:
1217         (WebCore::Document::inDesignMode): Removed some spaces.
1218         * page/Frame.cpp:
1219         (WebCore::Frame::applyEditingStyleToElement): Just add CSS properties needed for editing.
1220         (WebCore::Frame::removeEditingStyleFromElement): Made this a no-op, we'll remove
1221         it eventually.
1222
1223 2006-07-25  David Kilzer  <ddkilzer@kilzer.net>
1224
1225         Reviewed by Darin.
1226
1227         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9717
1228           Replace IDL ConvertUndefinedToTrue parameter attribute with Optional attribute
1229
1230         No test added because there is no change in functionality.
1231
1232         * bindings/js/kjs_binding.cpp: Removed valueToBooleanTreatUndefinedAsTrue() method.
1233         * bindings/js/kjs_binding.h: Ditto.
1234         * bindings/scripts/CodeGeneratorJS.pm: Removed support for ConvertUndefinedToTrue parameter attribute.
1235         * dom/Element.h: Set default value to true for scrollIntoView() and scrollIntoViewIfNeeded() arguments.
1236         * dom/Element.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
1237           Fixed name of scrollIntoViewIfNeeded() argument to match implementation.
1238         * page/DOMWindow.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
1239
1240 2006-07-24  Dan Waylonis  <waylonis@google.com>
1241
1242         Reviewed and tweaked a bunch by Darin.
1243
1244         Test: plugins/bindings-test.html
1245
1246         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9902
1247           jsNull and NSNull not properly converted between JS and ObjC
1248
1249         * bindings/objc/WebScriptObject.mm:
1250         (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]):
1251         Added case that converts jsNull to NSNull.
1252
1253 2006-07-24  Darin Adler  <darin@apple.com>
1254
1255         Reviewed by Adele and Justin.
1256
1257         - fix <rdar://problem/4613616> REGRESSION: some spaces typed in <textarea> are posted as non-breaking spaces (9630)
1258           http://bugzilla.opendarwin.org/show_bug.cgi?id=9630
1259         - also fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=9939
1260           REGRESSION: Pasting text into native text area with newline at end does not preserve newline
1261         - removed some uses of DeprecatedPtrList in the markup code
1262
1263         Test: fast/forms/textarea-type-spaces.html
1264         Test: fast/forms/textarea-paste-newline.html
1265
1266         * bindings/objc/DOMHTML.mm: (-[DOMHTMLDocument createDocumentFragmentWithText:]):
1267         Updated call to pass a range -- in this case it is the range of the entire document,
1268         so this will not handle the whitespace properly.
1269
1270         * bridge/mac/WebCoreFrameBridge.h: Added range context parameter to the
1271         documentFragmentWithText: method, so we can handle whitespace properly.
1272         * bridge/mac/WebCoreFrameBridge.mm:
1273         (-[WebCoreFrameBridge nodesFromList:]): Changed from DeprecatedPtrList to Vector.
1274         (-[WebCoreFrameBridge markupStringFromNode:nodes:]): Ditto.
1275         (-[WebCoreFrameBridge markupStringFromRange:nodes:]): Ditto.
1276         (-[WebCoreFrameBridge documentFragmentWithText:inContext:]): Added range context
1277         parameter -- pass it on to createFragmentFromText.
1278         (-[WebCoreFrameBridge documentFragmentWithNodesAsParagraphs:]): Changed from
1279         DeprecatedPtrList to Vector.
1280         (-[WebCoreFrameBridge replaceSelectionWithText:selectReplacement:smartReplace:]):
1281         Pass the range of the current selection as context when creating the fragment.
1282
1283         * dom/Position.cpp: (WebCore::Position::inRenderedText): Replace range check with
1284         a call to the new containsCaretOffset function -- helps make the caret work right when
1285         it is past the end of the last line in a textarea.
1286
1287         * editing/CompositeEditCommand.cpp:
1288         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Don't do anything if the
1289         style does not call for collapsing whitespace.
1290         (WebCore::CompositeEditCommand::rebalanceWhitespace): Call replaceWhitespaceAt
1291         to share code, including the new logic mentioned above.
1292
1293         * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply):
1294         Use a text node instead of a break element when inserting and the style is preserveNewline.
1295
1296         * editing/JSEditor.cpp: (WebCore::execRemoveFormat): Pass the selection range
1297         to createFragmentFromText.
1298
1299         * editing/RebalanceWhitespaceCommand.cpp: (WebCore::RebalanceWhitespaceCommand::doApply):
1300         Assert that we're in a style that collapses whitespace. It's the caller's responsibility
1301         not to call otherwise.
1302
1303         * editing/ReplaceSelectionCommand.h: Removed unused destructor, type, isSingleTextNode,
1304         isTreeFragment, m_type, and added a context parameter to inertFragmentForTestRendering.
1305         Also changed the constructor to take a selection rather than a pointer to the root
1306         editable element, replaced removeEndBRIfNeeded with shouldRemoveEndBR and removed an
1307         unused parameter from shouldMergeEnd.
1308         * editing/ReplaceSelectionCommand.cpp:
1309         (WebCore::ReplacementFragment::ReplacementFragment): Removed code to set up m_type.
1310         Compute root editable element from passed-in selection. Used the start of the selection
1311         as a base node for style purposes for the test rendering. Removed the special case
1312         "single text node" alternative to createFragmentFromText in the plain text case, since
1313         createFragmentFromText now handles that correctly.
1314         (WebCore::ReplacementFragment::insertFragmentForTestRendering): Copy the whitespace
1315         property from the source location when creating a temporary element for test rendering.
1316         (WebCore::ReplacementFragment::shouldMergeEnd): Removed unneeded boolean
1317         parameter fragmentHadInterchangeNewlineAtEnd, which is always false.
1318         (WebCore::ReplaceSelectionCommand::doApply): Update for ReplacementFragment changes,
1319         change code to not remove end BR when it can be re-used instead, don't call the
1320         paragraph separator insertion when the position is at the start of a paragraph already,
1321         removed redundant computation of identical "next" value, removed unneeded boolean
1322         parameter to shouldMergeEnd, add case for merging when all we need to do is to delete
1323         a newline character, removed unneeded code to set insertionPos after all code that uses
1324         it, and  use spaces instead of non-breaking spaces when doing smart paste if the
1325         context is one where we do not collapse white space.
1326         (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Renamed and changed to return
1327         a boolean instead of doing the removal.
1328
1329         * editing/markup.h: Use Vector instead of DeprecatedPtrList. Change the
1330         createFragmentFromText function to take a range for context instead of a document.
1331         * editing/markup.cpp:
1332         (WebCore::markup): Use Vector instead of DeprecatedPtrList.
1333         (WebCore::createMarkup): Ditto.
1334         (WebCore::createParagraphContentsFromString): Remove unneeded document parameter
1335         and changed a couple places to use isEmpty instead of comparing with "".
1336         (WebCore::createFragmentFromText): Given the new context parameter, if the context
1337         is one that preserves newlines, then use "\n" instead of <br> elements.
1338         (WebCore::createFragmentFromNodes): Use Vector instead of DeprecatedPtrList.
1339
1340         * html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerText): Do not use <br>
1341         elements if the context of this node is one where we preserve newlines.
1342
1343         * rendering/InlineTextBox.h:
1344         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::containsCaretOffset):
1345         Added. Implements the appropriate rule for determining if a caret position is
1346         in this line or not. Returns true for both one line and the next in cases where
1347         affinity must be considered to determine which line the caret is on.
1348
1349         * rendering/RenderText.h: Make atLineWrap no longer be a member function.
1350         * rendering/RenderText.cpp:
1351         (WebCore::atLineWrap): Remove special rule about preserveNewline and isLineBreak,
1352         which will no longer apply due to the new containsCaretOffset function logic.
1353         (WebCore::RenderText::caretRect): Use containsCaretOffset.
1354         (WebCore::RenderText::inlineBox): Ditto.
1355
1356         * rendering/RenderTextControl.cpp:
1357         (WebCore::RenderTextControl::updateFromElement): Make a placeholder <br> element
1358         after calling setInnerText so that the last newline in the string has the effect
1359         we expect outside the HTML world (an additional line).
1360         (WebCore::RenderTextControl::setSelectionRange): Set granularity of the selection
1361         too. The layout tests caught this problem, which needs a better solution long term.
1362         (WebCore::RenderTextControl::text): Call textContent with the parameter false
1363         so it will not include newlines for <br> elements. Now the only <br> element
1364         that will ever be in the shadow DOM tree is the one to prevent collapsing, and
1365         that one should not show up in the text value.
1366
1367         * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Took a rule
1368         that specifically called out the pre whitespace mode and made it work for all
1369         the modes that preserve newlines. This makes sure we get a last line box for
1370         text after the last "\n" even in cases where there is no <br> afterward.
1371
1372         * editing/DeleteSelectionCommand.cpp:
1373         (WebCore::DeleteSelectionCommand::fixupWhitespace):
1374         * editing/InsertParagraphSeparatorCommand.cpp:
1375         (WebCore::InsertParagraphSeparatorCommand::doApply):
1376         Added assertions to make sure we don't do anything when we're not collapsing
1377         whitespace.
1378
1379         * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setDefaultValue):
1380         Changed to use Vector instead of DeprecatedPtrList.
1381
1382         * editing/HTMLInterchange.cpp: Removed obsolete comment.
1383
1384         * loader/Cache.h: Removed a stray include.
1385
1386 2006-07-24  Adele Peterson  <adele@apple.com>
1387
1388         Reviewed by Justin.
1389
1390         - Fix for <rdar://problem/4632132> Changing style of content with mixed editability fails
1391
1392         Test: * editing/style/apple-style-editable-mix.html
1393
1394         * dom/Node.cpp: (WebCore::Node::isContentRichlyEditable): Doesn't need to check the editable root.  It now just
1395           checks the user modify property of its own renderer, since that is inherited.
1396         * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyle): If the end position is in a table,
1397         Adjust the end node to the last descendant of the table, so we don't skip over any runs.
1398
1399 2006-07-24  Darin Adler  <darin@apple.com>
1400
1401         Reviewed by Hyatt.
1402
1403         - implement String::createCFString
1404
1405         * WebCore.xcodeproj/project.pbxproj: Added StringImplMac.mm and StringMac.mm.
1406
1407         * bindings/objc/DOMInternal.mm: Moved NSString conversion functions out of here.
1408
1409         * platform/mac/StringImplMac.mm: Added. Moved NSString conversion members here
1410         and added the CFStringRef ones.
1411         * platform/mac/StringMac.mm: Added. Ditto.
1412
1413 2006-07-24  David Hyatt  <hyatt@apple.com>
1414
1415         Two bug fixes.
1416
1417         (1) Make sure to mark positioned objects that depend on line position to
1418         mark themselves as needing layout when their line box placeholder gets
1419         repositioned.
1420
1421         * rendering/RenderBox.cpp:
1422         (WebCore::RenderBox::position):
1423        
1424         (2) Improve highlighting to factor the inflation into overflow so that
1425         invalidation and repainting will work properly.
1426
1427         * rendering/RootInlineBox.cpp:
1428         (WebCore::RootInlineBox::addHighlightOverflow):
1429         * rendering/RootInlineBox.h:
1430         * rendering/bidi.cpp:
1431         (WebCore::RenderBlock::layoutInlineChildren):
1432
1433 2006-07-24  Anders Carlsson  <acarlsson@apple.com>
1434
1435         Reviewed by Adele.
1436
1437         <rdar://problem/4641824> REGRESSION: Wikipedia widget fails to complete a search after pressing return key
1438         
1439         * html/HTMLInputElement.cpp:
1440         (WebCore::HTMLInputElement::defaultEventHandler):
1441         Don't eat enter events for search fields that have no enclosing form; they need to be passed to AppKit so
1442         that onsearch can be invoked.
1443         
1444         * manual-tests/onsearch-enter.html: Added.
1445
1446 2006-07-24  Dave MacLachlan  <dmaclach@mac.com>
1447
1448         Reviewed by Darin and Alexey.
1449         
1450         Fix for: <http://bugzilla.opendarwin.org/show_bug.cgi?id=8425> 
1451         and <http://bugzilla.opendarwin.org/show_bug.cgi?id=6947>
1452
1453         Test: svg/custom/non-opaque-filters.svg
1454
1455         * kcanvas/device/quartz/KCanvasFilterQuartz.mm:
1456         (WebCore::KCanvasFilterQuartz::prepareFilter):
1457         We create an autorelease pool so we can control the deallocation of the
1458         CIContext that we're creating. The CIContext retains the CGContext that 
1459         you pass it internally so when the CIContext is released, the 
1460         CGContext is released as well.
1461         This is all fine and dandy unless you wrap the creation of the CIFilter
1462         with a pair of CGBegin/EndTransparencyLayer calls which swap the context
1463         out from underneath you. So if you start with context A, 
1464         CGBeginTransparencyLayer swaps it out and gives you B. You create a CIFilter
1465         with it and add a reference to B. CGEndTransparencyLayer swaps out B and
1466         gives you back A. Autorelease pool comes and cleans up the Filter, and calls
1467         release on A, but A never got the refcount in the first place. B did. BOOM!
1468         So we create a pool, then do a retain, then release the pool so that we 
1469         don't have to worry about the pool releasing it at a later time.
1470         See <rdar://problem/4647735> for reduction of CGEndTransparencyLayer case
1471
1472 2006-07-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1473
1474         Reviewed by Hyatt.
1475
1476         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9669
1477           Incomplete repaint when changing an inline's border
1478
1479         Test: fast/repaint/line-overflow.html
1480
1481         * rendering/RenderBlock.h:
1482         * rendering/bidi.cpp:
1483         (WebCore::RenderBlock::layoutInlineChildren): Added repaintTop and repaintBottom
1484         variables to track the vertical edges of the area that changed, accounting for
1485         lines that were deleted, inserted or moved. Removed unnecessary updating of
1486         m_overflowHeight.
1487         (WebCore::RenderBlock::determineStartPosition): Removed unnecessary updating of
1488         m_overflowHeight.
1489         (WebCore::RenderBlock::determineEndPosition):
1490         (WebCore::RenderBlock::matchedEndLine): Added repaintTop and repaintBottom
1491         arguments, which this method updates to account for deleted lines.
1492         (WebCore::RenderBlock::checkLinesForOverflow): Removed outdated FIXME.
1493
1494 2006-07-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1495
1496         Reviewed by Darin.
1497
1498         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10075
1499           REGRESSION: Reversed pop-up text in visually-ordered Hebrew pages
1500
1501         Test: fast/forms/select-visual-hebrew.html
1502
1503         * css/html4.css: Set "-webkit-rtl-ordering: logical" on select elements.
1504
1505 2006-07-24  Alexey Proskuryakov  <ap@nypop.com>
1506
1507         Reviewed by Darin.
1508
1509         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10009
1510         REGRESSION: Schubert-IT PDF Plug-in not working for full page (works in frames)
1511
1512         * page/Frame.cpp:
1513         (WebCore::Frame::begin): Give PDF plugins a chance to handle frame content, before ImageDocument
1514         claims it.
1515
1516 2006-07-24  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1517
1518         Reviewed by Darin.
1519
1520         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10083
1521           REGRESSION (r15584): editing/selection/select-from-textfield-outwards failing
1522
1523         * rendering/RenderBlock.cpp:
1524         (WebCore::RenderBlock::positionForCoordinates): Added back change from the fix
1525         for bug 9312: For coordinates outside a replaced object, return the position
1526         just before (after) the element if the coordinates are above or to the left (below
1527         or to the right).
1528
1529 2006-07-23  Mark Rowe  <opendarwin.org@bdash.net.nz>
1530
1531         Reviewed by maciej.
1532
1533         Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
1534         http://bugzilla.opendarwin.org/show_bug.cgi?id=9686
1535
1536         WebCore portion of the fix.
1537
1538         * bridge/mac/WebCoreScriptDebugger.h:
1539         (-[WebScriptDebugger exceptionRaised:sourceId:line::]): Add delegate method.
1540         * bridge/mac/WebCoreScriptDebugger.mm:
1541         (WebCoreScriptDebuggerImp::exception): Call delegate method when an exception is raised.
1542
1543 2006-07-23  Alice Liu  <alice.liu@apple.com>
1544
1545         Reviewed by Adele.
1546         Actually Adele figured out how to fix the layout test failures.  Landing this patch for her.  Layout test failures exposed but not caused by  r15584 (my patch earlier today).
1547
1548         * editing/visible_units.cpp:
1549         (WebCore::previousLinePosition):
1550         When setting selection endpoints, don't traverse down into nodes where editing would ignore its contents. Use the parent node instead.  
1551         (WebCore::nextLinePosition):
1552         same as above
1553
1554 2006-07-23  David Harrison  <harrison@apple.com>
1555
1556         Reviewed by timo.
1557
1558         <rdar://problem/4646759> Mail crash editing To Do - WebCore::InsertTextCommand::prepareForTextInsertion
1559         
1560         * Test: editing/deleting/delete-mixed-editable-content-001.html
1561
1562         * editing/visible_units.cpp:
1563         (WebCore::startOfParagraph):
1564         Respect editable boundary the same way endOfParagraph does.
1565
1566 2006-07-23  Beth Dakin  <bdakin@apple.com>
1567
1568         Reviewed by Maciej. (Patch by me, Maciej, and Harrison.)
1569
1570         Fix for <rdar://problem/4529398> WebCore crashes when pasting rich 
1571         text - WebCore::InlineBox::root()
1572
1573         The initial rendering crash was due to a render object having a 
1574         stale reference to an inline box that had already been deleted and 
1575         then recreated in the exact same location in memory. (Crazy, I 
1576         know.) The situation seemed pretty specific to list markers 
1577         according to Hyatt according to Maciej, so that is what I patched 
1578         specifically. Fixing this crash unearthed a separate editing crash 
1579         where we were trying to insert a block into itself. I worked on 
1580         that with Maciej and Harrison, and Harrison came up with a fix.
1581
1582         * editing/CompositeEditCommand.cpp:
1583         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): This is the fix for the editing crash. If paragraphStart is an atomic 
1584         node, insert the new block into the parent instead.
1585         * rendering/InlineBox.cpp:
1586         (WebCore::InlineBox::isChildOfParent): This function is for 
1587         posterity. It will help keep the linebox tree in check.
1588         * rendering/InlineBox.h:
1589         * rendering/InlineFlowBox.cpp:
1590         (WebCore::InlineFlowBox::addToLine): Added assert.
1591         (WebCore::InlineFlowBox::deleteLine): Added assert.
1592         * rendering/ListMarkerBox.cpp:
1593         (WebCore::ListMarkerBox::destroy): If this has a parent, call 
1594         removeChild on this.
1595         (WebCore::ListMarkerBox::operator delete):
1596         * rendering/ListMarkerBox.h:
1597
1598 2006-07-23  Alice Liu  <alice.liu@apple.com>
1599
1600         Reviewed by Darin.
1601
1602         fixed <rdar://problem/4617841> REGRESSION (NativeTextField): You can move keyboard focus to a field without getting insertion point
1603
1604         * rendering/RenderBlock.cpp:
1605         (WebCore::RenderBlock::positionForCoordinates):
1606         removed some unnecessary vertical position checks and added a fudge factor to be more forgiving for clicks near lines.
1607         * rendering/RenderTextControl.cpp:
1608         (WebCore::RenderTextControl::nodeAtPoint):
1609         added implementation
1610         * rendering/RenderTextControl.h:
1611         added function protocol
1612
1613 2006-07-23  Adele Peterson  <adele@apple.com>
1614
1615         Reviewed by Darin.
1616
1617         Updating fix from last checkin.
1618
1619         * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox):
1620         Only tell the view about this flexbox if there isn't another flexbox already cached.
1621
1622 2006-07-23  Adele Peterson  <adele@apple.com>
1623
1624         Reviewed by Maciej.
1625
1626         - Fix for <rdar://problem/4644614> REGRESSION: Typing, pasting or dragging in new text areas causes unnecessary scrolling
1627
1628         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Don't updateScrollInfoAfterLayout if an ancestor flexible box is just on
1629         its first layout.
1630         * rendering/RenderFlexibleBox.cpp:
1631         (WebCore::RenderFlexibleBox::layoutBlock): ditto.
1632         (WebCore::RenderFlexibleBox::layoutVerticalBox): Let the view know if this flex box is doing its first pass at layout.
1633
1634         * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): Caches a flexible box that's doing its first layout.
1635         * rendering/RenderView.h:
1636         (WebCore::RenderView::setFlexBoxInFirstLayout):
1637         (WebCore::RenderView::flexBoxInFirstLayout):
1638
1639 2006-07-22  Alexey Proskuryakov  <ap@nypop.com>
1640
1641         Reviewed by Darin.
1642
1643         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10038
1644         REGRESSION: Length of navigator.mimeTypes collection returns number of installed plugins, not number 
1645         of registered mime types
1646
1647         * bindings/js/kjs_navigator.cpp:
1648         (KJS::MimeTypes::getValueProperty): Return the length of the mime types vector, not the plugins one.
1649         (KJS::MimeTypes::getOwnPropertySlot): Fixed another typo, which prevented MimeTypes::getValueProperty()
1650         from even being called.
1651
1652 2006-07-21  Maciej Stachowiak  <mjs@apple.com>
1653
1654         Reviewed by Adele and Tim Omernick.
1655
1656         <rdar://problem/4641004> 9A224: Safari crashes in WebCore::RenderMenuList::showPopup when changing a input select field to input text field
1657
1658         Couldn't figure out how to make layout test, here's a manual test:
1659         * manual-tests/remove-select-onchange.html: Added.
1660         
1661         * rendering/RenderMenuList.cpp:
1662         (WebCore::RenderMenuList::showPopup): Don't add the RenderPopupMenu to the render
1663         tree so it doesn't get destroyed if we do.
1664         
1665         The remaining changes are to let the RenderPopupMenu know its menu list w/o having
1666         to be in the render tree:
1667         
1668         * rendering/RenderPopupMenu.cpp:
1669         (WebCore::RenderPopupMenu::RenderPopupMenu):
1670         * rendering/RenderPopupMenu.h:
1671         (WebCore::RenderPopupMenu::menuList):
1672         * rendering/RenderPopupMenuMac.h:
1673         * rendering/RenderPopupMenuMac.mm:
1674         (WebCore::RenderPopupMenuMac::RenderPopupMenuMac):
1675         * rendering/RenderPopupMenuWin.h:
1676         (WebCore::RenderPopupMenuWin::RenderPopupMenuWin):
1677         * rendering/RenderTheme.h:
1678         * rendering/RenderThemeMac.h:
1679         * rendering/RenderThemeMac.mm:
1680         (WebCore::RenderThemeMac::createPopupMenu):
1681         * rendering/RenderThemeWin.cpp:
1682         (WebCore::RenderThemeWin::createPopupMenu):
1683         * rendering/RenderThemeWin.h:
1684
1685 2006-07-21  Adele Peterson  <adele@apple.com>
1686
1687         Reviewed by Darin.
1688
1689         Fix for: <rdar://problem/4643238> REGRESSION: Can't set insertion point at the end of a line of text
1690
1691         Test: fast/forms/textarea-scrolled-endline-caret.html
1692
1693         * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForCoordinates):
1694         When looking for the closest line box, take the scroll offset into account.
1695
1696 2006-07-21  Tim Omernick  <timo@apple.com>
1697
1698         Reviewed by Geoff & Maciej.
1699
1700         <rdar://problem/4632505> REGRESSION: Crash at WebCore::Widget::getView() const + 6
1701
1702         Geoff is working on a layout test for this.
1703
1704         * bridge/mac/FrameMac.mm:
1705         (WebCore::FrameMac::focusWindow):
1706         (WebCore::FrameMac::unfocusWindow):
1707         Check for a NULL view.  The view can be NULL if the frame has not yet loaded any data.  This fixes the crash, but the behavior is still
1708         wrong -- we should focus the frame once it gets a view.  I've filed <rdar://problem/4645685> to track that.  It's not as urgent as this
1709         crasher.
1710         
1711 2006-07-21  Maciej Stachowiak  <mjs@apple.com>
1712
1713         Reviewed by Darin.
1714
1715         <rdar://problem/4523976> REGRESSION (NativeTextField): Crash occurs when choosing "Undo Typing" after typing and setting the value
1716
1717         * rendering/RenderTextControl.cpp:
1718         (WebCore::RenderTextControl::updateFromElement): Clear the undo
1719         chain when the text control contents have been set
1720         programmatically.
1721         * bridge/mac/FrameMac.mm:
1722         (WebCore::FrameMac::clearUndoRedoOperations): Before clearing undo
1723         stack, close all open undo groups and then open an equal number,
1724         since otherwise NSUndoManager ends up in an inconsistent state
1725         leading to uncaught ObjC exceptions.
1726
1727 2006-07-21  Beth Dakin  <bdakin@apple.com>
1728         
1729         Reviewed by Darin.
1730
1731         Just moving this assertion down a couple of lines. It was hitting 
1732         every time you try to print a page because we put it too early in 
1733         the function.
1734
1735         * bridge/mac/WebCoreFrameBridge.mm:
1736         (-[WebCoreFrameBridge drawRect:]):
1737
1738 2006-07-21  Justin Garcia  <justin.garcia@apple.com>
1739
1740         Reviewed by levi
1741         
1742         <rdar://problem/4548238>
1743         REGRESSION: Can't remove the first OL/UL list item in a Mail's compose window
1744
1745         * editing/CompositeEditCommand.cpp:
1746         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): 
1747         Moved from InsertParagraphSeparator.  Does its own typing style restoration.
1748         * editing/CompositeEditCommand.h:
1749         * editing/InsertParagraphSeparatorCommand.cpp:
1750         (WebCore::InsertParagraphSeparatorCommand::doApply): Call breakOutOfEmptyListItem.
1751         * editing/TypingCommand.cpp:
1752         (WebCore::TypingCommand::deleteKeyPressed): Call breakOutOfEmptyListItem if
1753         the endingSelection is at the start of an editable region.
1754         * editing/htmlediting.cpp:
1755         (WebCore::embeddedSublist): Moved from InsertParagraphSeparator.
1756         (WebCore::appendedSublist): Ditto.
1757         (WebCore::enclosingEmptyListItem): Ditto.
1758         * editing/htmlediting.h:
1759
1760 === Safari-521.20 ===
1761
1762 2006-07-21  Tim Omernick  <timo@apple.com>
1763
1764         Reviewed by Beth Dakin & John Sullivan.
1765
1766         <rdar://problem/4633717> 9A218: Reproducible crash in -[NSScroller mouseDown:]
1767
1768         Beth is in the middle of making a layout test for this; she will land it soon.
1769
1770         * platform/mac/ScrollBarMac.mm:
1771         (ScrollBar::~ScrollBar):
1772         Call Widget::removeFromSuperview() rather than -removeFromSuperview directly on the scroll bar view.
1773         Widget::removeFromSuperview() obeys the "mustStayInWindow" flag, which is set while tracking the mouse
1774         in view-based widgets to prevent their destruction while the tracking is in progress.
1775         I searched around WebCore and this is the only Widget subclass that directly removes its view rather
1776         than using removeFromSuperview().
1777
1778 2006-07-21  Mitz Pettel  <opendarwin.org@mitzpettel.com>
1779
1780         Reviewed by Darin.
1781
1782         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9312
1783           REGRESSION: Selection bug in new text fields when selecting past the first letter
1784
1785         Test: editing/selection/select-from-textfield-outwards.html
1786
1787         * editing/Selection.cpp:
1788         (WebCore::Selection::adjustForEditableContent): Added code to handle the case
1789         where the selection starts (resp. ends) in the last (resp. first) visual position
1790         inside an editable root.
1791         * editing/htmlediting.cpp:
1792         (WebCore::comparePositions): Fixed the case of comparing a position inside a shadow
1793         tree with a position in the shadow ancestor.
1794         * rendering/RenderBlock.cpp:
1795         (WebCore::RenderBlock::positionForCoordinates): For coordinates outside a replaced
1796         object, return the position just before (after) the element if the coordinates are above or
1797         to the left (below or to the right).
1798         * rendering/RenderObject.cpp:
1799         (WebCore::RenderObject::caretMaxOffset): Changed to return 1 for replaced objects.
1800         * rendering/RenderText.cpp:
1801         (WebCore::RenderText::positionForCoordinates): Changed to return the last position
1802         in the lowest text box if the y coordinate is below all text boxes.
1803
1804 2006-07-21  Geoffrey Garen  <ggaren@apple.com>
1805
1806         Reviewed by Darin.
1807         
1808         - Fixed <rdar://problem/4507265> REGRESSION: overlays don't work on 
1809         HousingMaps.com (Google Maps-based site)
1810         
1811         - Made style.filter undetectable, like document.all.
1812         
1813         Unfortunately, the SVG spec-makers invented a CSS attribute named 'filter',
1814         which conflicts with IE's custom CSS attribute by the same name. Web programs 
1815         like the Google maps API test for style.filter, and assume it's the IE 
1816         style.filter if they find it, so we need to make style.filter undetectable 
1817         to avoid breaking them.
1818         
1819         An alternative solution would be to hotwire a delorean, go back in time,
1820         and beg the web standards makers to make standards that work on the web.
1821
1822         * bindings/js/kjs_css.cpp:
1823         (KJS::DOMCSSStyleDeclaration::cssPropertyGetter):
1824
1825 2006-07-20  Justin Garcia  <justin.garcia@apple.com>
1826
1827         Reviewed by john
1828         
1829         <rdar://problem/4641033>
1830         REGRESSION: Pasting from web pages into Mail (or Blot) often loses most of the content
1831         
1832         * editing/markup.cpp:
1833         (WebCore::createMarkup): We surround the currently accumulated markup with markup 
1834         for ancestors of the startNode when the pre-order traversal leaves the trees rooted 
1835         at those ancestors.  We assumed that any ancestors of the current node not in the 
1836         ancestorsToClose list were those kind of ancestors.  But we don't add renderer-less 
1837         containers to the ancestorsToClose list.  So, we were incorrectly surrounding the 
1838         currently accumulated markup with markup for render-less containers.  Most of the
1839         content at apple.com was being put inside an <optgroup> inside a <select> element.  
1840         Then on Paste createContextualFragment would drop it.
1841
1842 2006-07-21  Anders Carlsson  <acarlsson@apple.com>
1843
1844         Reviewed by Geoff.
1845
1846         * dom/Document.h:
1847         (WebCore::Document::):
1848         * dom/EventTargetNode.cpp:
1849         (WebCore::EventTargetNode::addEventListener):
1850         * page/FrameView.cpp:
1851         (WebCore::FrameView::layout):
1852         * rendering/RenderLayer.cpp:
1853         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1854         Only dispatch overflowchanged events if overflowchanged event listeners have been registered on the document.
1855
1856 2006-07-20  Anders Carlsson  <acarlsson@apple.com>
1857
1858         Reviewed by Geoff.
1859
1860         <rdar://problem/4637807> REGRESSION: "Features & Options" page at volvocars.us fails
1861
1862         * xml/XSLTProcessor.cpp:
1863         (WebCore::xsltParamArrayFromParameterMap):
1864         Turns out parameters never worked. String parameters need to be escaped so we create a transform context,
1865         add the parameters to it quoted and then use xsltApplyStylesheetUser which lets us pass the transform context to it.
1866         This also works around a bug in libxslt where a hash table isn't allocated.
1867
1868 2006-07-20  Alice Liu  <alice.liu@apple.com>
1869
1870         Reviewed by Tim Omernick.
1871
1872         Fixed <rdar://problem/4621649> repro crash: Upload link causes crash on pages.google.com in Frame::nodeForWidget
1873         added manual test because there is no way to change the value of an <input type=file> via the DOM.  It's not supported because it's a security risk. 
1874
1875         * manual-tests/remove-input-file-onchange.html: Added.
1876         * platform/mac/FileButtonMac.mm:
1877         (-[WebFileChooserButton chooseFilename:]):
1878         swapped the calls to changeFilename and bridgeForWidget because changeFilename will destroy the widget that is accessed in bridgeForWidget 
1879
1880 2006-07-20  Alice Liu  <alice.liu@apple.com>
1881
1882         Reviewed by Adele.
1883
1884         Fixed <rdar://problem/4532113> REGRESSION (NativeTextField): Crash occurs after modifying field then reloading page -[FormDelegate frameLayoutHasChanged:]
1885         added a manual test because of the need to use AutoFill.
1886
1887         * dom/Node.h:
1888         (WebCore::Node::aboutToUnload):
1889         added virtual function prototype
1890         * html/HTMLInputElement.cpp:
1891         (WebCore::HTMLInputElement::aboutToUnload):
1892         added implementation that sends textFieldDidEndEditing notification
1893         * html/HTMLInputElement.h:
1894         added virtual function prototype
1895         * manual-tests/input-type-file-autocomplete-frame-1.html: Added.
1896         * manual-tests/input-type-file-autocomplete-frame-2.html: Added.
1897         * manual-tests/input-type-file-autocomplete-refresh.html: Added.
1898         * page/Frame.cpp:
1899         (WebCore::Frame::stopLoading):
1900         before unloading, call aboutToUnload on the current focused node
1901
1902 2006-07-20  Brady Eidson  <beidson@apple.com>
1903
1904         Reviewed by Maciej
1905
1906         fixed <rdar://problem/4611303> REGRESSION: repro crash in WebCore::EventTargetNode::dispatchWindowEvent at aeropostale.com
1907         There was an attempt to deref an EventListener that got cleaned up in GC.  Changing Document's EventListener list from 
1908         vanilla ptrs to refptrs to prevent GC, following EventTargetNode's proven example.
1909
1910         * dom/Document.cpp:
1911         (WebCore::Document::Document):
1912         (WebCore::Document::clear):
1913         (WebCore::Document::handleWindowEvent):
1914         (WebCore::Document::getHTMLWindowEventListener):
1915         (WebCore::Document::removeHTMLWindowEventListener):
1916         (WebCore::Document::removeWindowEventListener):
1917         (WebCore::Document::hasWindowEventListener):
1918         Changed all of the list iterators to work with RefPtrs instead of vanilla ptrs
1919
1920         * dom/Document.h:
1921         Changed the EventListener list to be a vanilla pointer list to a refptr list
1922
1923 2006-07-20  John Sullivan  <sullivan@apple.com>
1924
1925         Reviewed by Maciej
1926
1927         - WebCore part of fix for:
1928         <rdar://problem/4557386> REGRESSION (419.3-521.19): repro Safari world leak involving 
1929         closing tabs after clicking in a web page
1930         
1931         * bridge/mac/WebCoreFrameBridge.h:
1932         (-[WebCoreFrameBridge textViewWasFirstResponderAtMouseDownTime:])
1933         renamed to be more specific (formerly wasFirstResponderAtMouseDownTime:)
1934         * bridge/mac/FrameMac.mm:
1935         (WebCore::FrameMac::passMouseDownEventToWidget):
1936         updated for name change
1937
1938 2006-07-19  Alexey Proskuryakov  <ap@nypop.com>
1939
1940         Reviewed by Darin.
1941
1942         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8272
1943         Use of window.open & window.close can cause crash
1944
1945         * platform/PlatformMouseEvent.h:
1946         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1947         * platform/mac/PlatformMouseEventMac.mm:
1948         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1949         The default constructor now creates a "zero" event, and a new one was added to create the "current" one.
1950
1951         * bridge/mac/FrameMac.mm:
1952         (WebCore::FrameMac::handleMouseMoveEvent):
1953         * rendering/RenderFormElement.cpp:
1954         (WebCore::RenderFormElement::clicked): 
1955         Updated for the above changes.
1956
1957         * platform/gdk/MouseEventGdk.cpp:
1958         * platform/gdk/TemporaryLinkStubs.cpp:
1959         (PlatformMouseEvent::PlatformMouseEvent):
1960         * platform/win/MouseEventWin.cpp:
1961         * platform/win/TemporaryLinkStubs.cpp:
1962         (PlatformMouseEvent::PlatformMouseEvent):
1963         Trying not to break other platforms.
1964
1965         * manual-tests/invalid-mouse-event.html: Added.
1966
1967 2006-07-20  Maciej Stachowiak  <mjs@apple.com>
1968         
1969         Reviewed by Anders.
1970
1971         - delete line that I only commented in the last patch - meant to do this before landing
1972
1973         * html/HTMLFrameElement.cpp:
1974         (WebCore::HTMLFrameElement::close): 
1975
1976 2006-07-19  Maciej Stachowiak  <mjs@apple.com>
1977
1978         Reviewed by Geoff.
1979
1980         - fixed <rdar://problem/4634484> REGRESSION: Project Change Request form should have vertical scroll bar, but doesn't
1981         
1982         I couldn't figure out how to make an automated test case for this,
1983         or even a manual one. It seems to be timing-related in some way.
1984
1985         * html/HTMLFrameElement.cpp:
1986         (WebCore::HTMLFrameElement::close): detach the child frame from
1987         its element, not the frame containing this element.
1988
1989 2006-07-20  Anders Carlsson  <acarlsson@apple.com>
1990
1991         Reviewed by Darin.
1992
1993         * bridge/mac/FrameMac.mm:
1994         (WebCore::FrameMac::nextKeyViewInFrame):
1995         Hold a ref to the node in case it gets destroyed by an event handler.
1996
1997 2006-07-19  Mark Rowe  <opendarwin.org@bdash.net.nz>
1998
1999         Reviewed by Darin.
2000
2001         http://bugzilla.opendarwin.org/show_bug.cgi?id=10021
2002         Bug 10021: REGRESSION: Stack overflow due to infinite recursion in 
2003         Image::checkForSolidColor
2004
2005         * platform/Image.cpp:
2006         (WebCore::Image::cacheFrame): Don't call checkForSolidColor unless 
2007         the frame was decoded successfully.
2008
2009 2006-07-19  Adele Peterson  <adele@apple.com>
2010
2011         Reviewed by Maciej.
2012
2013         - Fix for: 
2014         <rdar://problem/4422657> REGRESSION: member name field or password field should have focus after loading webmail.mac.com (7405)
2015         http://bugzilla.opendarwin.org/show_bug.cgi?id=7405
2016
2017         <rdar://problem/4614181> REGRESSION: Crash in WebCore::RenderTextField::text() when quoting post at the Ars Technica forum (9707)
2018         http://bugzilla.opendarwin.org/show_bug.cgi?id=9707
2019
2020         Needs an http test. (http://bugzilla.opendarwin.org/show_bug.cgi?id=10020)
2021
2022         These bugs were both cases where focus() was called on an element which didn't have a renderer yet because stylesheets hadn't finished loading yet.
2023         Now, we detect this case and let setFocusNode be called.  And when the stylesheet finishes loading, and the element attaches, a timer will fire, 
2024         which will cause the correct selection & scrolling behavior to occur. 
2025
2026         This fix removes selection and scrolling behavior from the focus method.  This code is now in a new method, updateFocusAppearance.
2027         updateFocusAppearance can now be called directly from focus(), but it can also be called when a timer fires.  This timer gets set
2028         up when an element attaches, and its already been focused by the focus method.  We have to use a timer, because updateFocusAppearance can cause
2029         a layout to happen, and we don't want that to happen in the middle of attach().
2030
2031         * bindings/objc/DOM.mm: (-[DOMElement isFocused]): Added SPI for autofill.
2032         * bindings/objc/DOMPrivate.h:
2033
2034         * dom/Element.cpp:
2035         (WebCore::Element::Element): Initializes timer and needFocusAppearanceUpdate bool.
2036         (WebCore::Element::attach): Checks needsFocusAppearanceUpdate, and if the node is focused, then starts the timer.
2037         (WebCore::Element::focus): Updated to check supportsFocus before calling setFocusNode, 
2038         and only requiring the element to be focusable now before updating focus appearance.
2039         (WebCore::Element::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
2040         (WebCore::Element::updateFocusAppearanceTimerFired): Stops the timer, and if the element is focusable, calls updateFocusAppearance.
2041         (WebCore::Element::stopUpdateFocusAppearanceTimer):  Cancels timer, and setsNeedsFocusAppearanceUpdate(false).
2042         (WebCore::Element::detach): Calls stopUpdateFocusAppearanceTimer.
2043         (WebCore::Element::blur): ditto.
2044         * dom/Element.h:
2045         (WebCore::Element::needsFocusAppearanceUpdate): Added so the timer only fires when focus() methods have caused an element to be focused.
2046         (WebCore::Element::setNeedsFocusAppearanceUpdate): Added so focus methods can set this flag.
2047
2048         * dom/Node.h: (WebCore::Node::supportsFocus): Added.  Base class just calls isFocusable.
2049         * html/HTMLAnchorElement.h: Added supportsFocus.
2050         * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::supportsFocus): Added. Checks for the case where stylesheets haven't loaded yet,
2051         so we can still focus the node without a renderer, and when it gets a renderer, we'll update the focus appearance.
2052         * html/HTMLGenericFormElement.h: (WebCore::HTMLGenericFormElement::supportsFocus): ditto.
2053         * html/HTMLGenericFormElement.cpp: Removed include of Document.h since this is now in the header.
2054
2055         * html/HTMLInputElement.cpp:
2056         (WebCore::HTMLInputElement::focus): Updated to check supportsFocus before calling setFocusNode, 
2057         and only requiring the element to be focusable now before updating focus appearance.
2058         (WebCore::HTMLInputElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
2059         * html/HTMLInputElement.h:
2060
2061         * html/HTMLTextAreaElement.cpp:
2062         (WebCore::HTMLTextAreaElement::focus): Updated to check supportsFocus before calling setFocusNode, 
2063         and only requiring the element to be focusable now before updating focus appearance.
2064         (WebCore::HTMLTextAreaElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
2065         * html/HTMLTextAreaElement.h:
2066
2067 2006-07-19  Justin Garcia  <justin.garcia@apple.com>
2068
2069         Reviewed by levi
2070         
2071         <rdar://problem/4631972>
2072         REGRESSION: Mail crashes when pasting entire contents of http://www.apple.com/support/ into a new mail message
2073
2074         * dom/Position.cpp:
2075         (WebCore::Position::upstream): Deployed isBlock and enclosingBlock.
2076         (WebCore::Position::downstream): Ditto.
2077         * editing/CompositeEditCommand.cpp:
2078         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Ditto.
2079         * editing/htmlediting.cpp:
2080         (WebCore::canHaveChildrenForEditing): Added !iframe.
2081         (WebCore::isBlock): Added, returns !node->renderer()->isInline()
2082         (WebCore::enclosingBlock): Added.
2083         * editing/htmlediting.h:
2084
2085 2006-07-19  Anders Carlsson  <acarlsson@apple.com>
2086
2087         Reviewed by Adele.
2088
2089         <rdar://problem/4631272> REGRESSION: Crash tabbing out of hostname field at autorestore.apple.com
2090         
2091         * bridge/mac/FrameMac.mm:
2092         (WebCore::FrameMac::nextKeyViewInFrame):
2093         Take into account that focus handlers can cause a node's renderer to be destroyed.
2094         
2095 2006-07-19  David Hyatt  <hyatt@apple.com>
2096
2097         Fix for 4638376.  The 1x1 solid color image optimization was broken when
2098         I re-architected image.  This patch restores the optimization for CG.  Cairo
2099         will still need the optimization.
2100
2101         Reviewed by darin
2102
2103         WARNING: NO TEST CASES ADDED OR CHANGED (need test cases still)
2104
2105         * platform/Image.cpp:
2106         (WebCore::Image::Image):
2107         (WebCore::Image::invalidateData):
2108         (WebCore::Image::cacheFrame):
2109         * platform/Image.h:
2110         (WebCore::Image::setIsPDF):
2111         * platform/cairo/ImageCairo.cpp:
2112         (WebCore::Image::checkForSolidColor):
2113         * platform/mac/ImageMac.mm:
2114         (WebCore::Image::initNativeData):
2115         (WebCore::Image::invalidateNativeData):
2116         (WebCore::Image::checkForSolidColor):
2117         (WebCore::Image::draw):
2118         (WebCore::Image::drawTiled):
2119
2120 2006-07-19  Justin Garcia  <justin.garcia@apple.com>
2121
2122         Reviewed by levi
2123         
2124         <rdar://problem/4613519>
2125         REGRESSION: Pasting text in native text area inserts text one character before it should (9527)
2126
2127         * editing/InsertParagraphSeparatorCommand.cpp:
2128         (WebCore::InsertParagraphSeparatorCommand::doApply): Turn into an InsertLineBreakCommand instead of bailing
2129         if the enclosingBlockFlowElement doesn't have a parent.
2130
2131 2006-07-19  David Harrison  <harrison@apple.com>
2132
2133         Reviewed by Tim Hatcher.
2134
2135         <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
2136         <rdar://problem/4062218> pasting in contents of web.apple.com strips off the <table> element from the first table
2137         
2138         Better patch than previous checkin.
2139
2140         * test: editing/pasteboard/paste-table-003.html
2141         
2142         * editing/markup.cpp:
2143         (WebCore::createMarkup):
2144         Make sure to include the table when including a tbody.
2145
2146 === Safari-521.19 ===
2147
2148 2006-07-19  David Harrison  <harrison@apple.com>
2149
2150         Reviewed by Tim Hatcher.
2151
2152         <rdar://problem/4629307> -[DOMRange markupString] does not include the initial table element if it is at the beginning of the range
2153
2154         No test case as this can only be reproduced through ObjC APIs.
2155
2156         * editing/markup.cpp:
2157         (WebCore::createMarkup):
2158         Adjust the range for ancestor markup handling when main loop skips first node.
2159
2160 2006-07-18  David Hyatt  <hyatt@apple.com>
2161
2162         Fix for radar 4611287, make resizable text fields opt-in rather than
2163         opt-out.  Open source users will need to write the pref into their defaults
2164         to see the resizers on textareas now.
2165
2166         Reviewed by mjs and adele
2167
2168         * WebCore.xcodeproj/project.pbxproj:
2169         * bridge/mac/WebCoreSettings.mm:
2170         (-[WebCoreSettings setTextAreasAreResizable:]):
2171         * css/cssparser.cpp:
2172         (WebCore::CSSParser::parseValue):
2173         * css/cssstyleselector.cpp:
2174         (WebCore::CSSStyleSelector::applyProperty):
2175         * css/html4.css:
2176
2177 2006-07-18  Anders Carlsson  <acarlsson@apple.com>
2178
2179         Reviewed by Darin.
2180
2181         http://bugzilla.opendarwin.org/show_bug.cgi?id=9959
2182         REGRESSION: iframes stop rendering after 200th one on successive reloads
2183         
2184         * html/HTMLFrameElement.cpp:
2185         (WebCore::HTMLFrameElement::attach):
2186         (WebCore::HTMLFrameElement::close):
2187         * html/HTMLIFrameElement.cpp:
2188         (WebCore::HTMLIFrameElement::insertedIntoDocument):
2189         (WebCore::HTMLIFrameElement::willRemove):
2190         Remove calls to incrementFrameCount and decrementFrameCount.
2191         
2192         * page/Frame.cpp:
2193         (WebCore::Frame::Frame):
2194         Call incrementFrameCount here.
2195         
2196         (WebCore::Frame::~Frame):
2197         Call disconnectOwnerElement.
2198         
2199         (WebCore::Frame::disconnectOwnerElement):
2200         Call decrementFrameCount here.
2201         
2202 2006-07-18  Alexey Proskuryakov  <ap@nypop.com>
2203
2204         Reviewed by Darin.
2205
2206         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9013
2207         Let correct CSS custom cursor declarations parse
2208
2209         * css/cssparser.cpp:
2210         (WebCore::CSSParser::parseValue): Ignore any values following a custom CSS cursor URI, instead of
2211         requiring that it is the only one in the list (which is actually illegal, according to the spec). 
2212         This is only a temporary hack, with a real implementation to follow in bug 6001/6002.
2213
2214         * manual-tests/custom-cursors.html: Added a test for this issue.
2215         * manual-tests/resources/helpCursor.tiff: A cursor image used in the test.
2216
2217 2006-07-18  Timothy Hatcher  <timothy@apple.com>
2218
2219         Reviewed by Anders.
2220         
2221         <rdar://problem/4636216> NetNewsWire fails to launch on 9A224 - missing symbols
2222         
2223         WebCore needs to add -sub_library libobjc to maintain
2224         backwards compatibility with binaries linked with WebKit
2225         before JavaScriptCore moved out of WebKit.
2226
2227         * WebCore.xcodeproj/project.pbxproj:
2228
2229 2006-07-18  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2230
2231         Reviewed by Justin.
2232
2233         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9978
2234           REGRESSION (r12949-r12988): Clicking the first letter on a line places the caret at the end of the previous line
2235
2236         Test: editing/selection/click-start-of-line.html
2237
2238         * rendering/RenderText.cpp:
2239         (WebCore::RenderText::positionForCoordinates): Changed to return downstream
2240         affinity if the x coordinate is to the left of the middle of the first character
2241         in the text box.
2242
2243 2006-07-18  Anders Carlsson  <acarlsson@apple.com>
2244
2245         Reviewed by Darin.
2246
2247         http://bugzilla.opendarwin.org/show_bug.cgi?id=9695
2248         <rdar://problem/4614085> 
2249         TOT REGRESSION: NativeTextArea: Text area does not respond to Cmd-UpArrow/Cmd-DownArrow (9695)
2250         
2251         * editing/SelectionController.cpp:
2252         (WebCore::SelectionController::modifyExtendingRightForward):
2253         (WebCore::SelectionController::modifyMovingRightForward):
2254         (WebCore::SelectionController::modifyExtendingLeftBackward):
2255         (WebCore::SelectionController::modifyMovingLeftBackward):
2256         If the caret is inside an editable region, the beginning/end of the document should actually be the
2257         beginning/end of the editable region.
2258
2259 2006-07-17  Tim Omernick  <timo@apple.com>
2260
2261         Reviewed by Maciej.
2262
2263         <rdar://problem/4612079> need a way to prevent pages from scrolling to reveal elements that are focused
2264         by script
2265
2266         * bridge/mac/WebCoreFrameBridge.h:
2267         * bridge/mac/WebCoreFrameBridge.mm:
2268         (-[WebCoreFrameBridge setProhibitsScrolling:]):
2269         * page/Frame.cpp:
2270         (WebCore::Frame::prohibitsScrolling):
2271         (WebCore::Frame::setProhibitsScrolling):
2272         * page/Frame.h:
2273         * page/FramePrivate.h:
2274         (WebCore::FramePrivate::FramePrivate):
2275         * page/FrameView.cpp:
2276         (WebCore::FrameView::scrollPointRecursively):
2277         (WebCore::FrameView::setContentsPos):
2278         * page/FrameView.h:
2279         * platform/ScrollView.h:
2280
2281 2006-07-17  Maciej Stachowiak  <mjs@apple.com>
2282
2283         Reviewed by Dave Harrison.
2284         
2285         - fixed <rdar://problem/4618089> Blot crashes when I paste in all the contents of http://www.apple.com/startpage/
2286
2287         * editing/htmlediting.cpp:
2288         (WebCore::editingIgnoresContent):
2289
2290 2006-07-17  Justin Garcia  <justin.garcia@apple.com>
2291
2292         Reviewed by levi
2293         
2294         <rdar://problem/4621728>
2295         REGRESSION: Selecting by dragging down creates selection in wrong direction, with certain steps
2296         <rdar://problem/4604932>
2297         REGRESSION: Dragging too far left on a line will select all lines above it.
2298  
2299         No layout test because of 9980.
2300
2301         * rendering/RenderBlock.cpp:
2302         (WebCore::RenderBlock::positionForCoordinates): Don't return positions inside editable roots
2303         for coordinates outside those roots, except for coordinates outside a document that is entirely 
2304         editable.
2305
2306 2006-07-17  Timothy Hatcher  <timothy@apple.com>
2307
2308         Reviewed by Darin.
2309
2310         <rdar://problem/4635281> JSCanvasRenderingContext2D::drawImage needs to initialize the exception code to zero
2311
2312         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2313         (WebCore::JSCanvasRenderingContext2D::drawImage): initialize ec to zero
2314         * html/CanvasRenderingContext2D.cpp:
2315         (WebCore::CanvasRenderingContext2D::drawImage): initialize ec before earlier return
2316
2317 2006-07-17  Timothy Hatcher  <timothy@apple.com>
2318
2319         Reviewed by Maciej.
2320
2321         <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
2322
2323         Moves WebScriptObject and WebUndefined to WebCore.
2324
2325         * WebCore.exp:
2326         * WebCore.xcodeproj/project.pbxproj:
2327         * bindings/objc/DOM.mm:
2328         * bindings/objc/DOMCore.h:
2329         * bindings/objc/DOMInternal.mm:
2330         * bindings/objc/DOMUtility.mm:
2331         * bindings/objc/WebScriptObject.mm: Added.
2332         (+[WebUndefined allocWithZone:]):
2333         (-[WebUndefined initWithCoder:]):
2334         (-[WebUndefined encodeWithCoder:]):
2335         (-[WebUndefined copyWithZone:]):
2336         * bindings/objc/WebScriptObjectPrivate.h: Added.
2337         * bridge/mac/FrameMac.mm:
2338         * bridge/mac/WebCoreScriptDebugger.mm:
2339
2340 2006-07-17  David Hyatt  <hyatt@apple.com>
2341
2342         Back out the fix for 5564, since it turns out font:x-small; is a pretty
2343         prominent IE-specific CSS hack.  Because Web sites rely on IE's incorrect
2344         font parsing as a means of also correcting IE's incorrect font size rules.
2345
2346         This fixes Yahoo.com.
2347
2348         Reviewed by darin
2349
2350         * css/cssparser.cpp:
2351         (WebCore::CSSParser::parseFont):
2352
2353 2006-07-17  Justin Garcia  <justin.garcia@apple.com>
2354
2355         Reviewed by levi
2356         
2357         <rdar://problem/4618389> REGRESSION: After applying a link to the last word of a sentence, a new selection is created at the start of the sentence
2358         
2359         * dom/Document.cpp:
2360         (WebCore::Document::updateSelection):
2361
2362 2006-07-17  Maciej Stachowiak  <mjs@apple.com>
2363
2364         Reviewed by Beth.
2365         
2366         <rdar://problem/4604946> REGRESSION: 'checkboxRef.checked = true' fires onchange event in Leopard
2367
2368         * html/HTMLInputElement.cpp:
2369         (WebCore::HTMLInputElement::setChecked):
2370         (WebCore::HTMLInputElement::preDispatchEventHandler):
2371         * html/HTMLInputElement.h:
2372
2373 2006-07-16  David Kilzer  <ddkilzer@kilzer.net>
2374
2375         Reviewed by Darin.
2376
2377         - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9954
2378           REGRESSION: document.dir should return empty string in <head>
2379
2380         Test: fast/dom/document-dir-property.html
2381
2382         * bindings/js/kjs_html.cpp:
2383         (KJS::JSHTMLDocument::getValueProperty): Return an empty string instead of an
2384         undefined value for an unset document.dir property.
2385
2386 2006-07-16  David Kilzer  <ddkilzer@kilzer.net>
2387
2388         Reviewed by Darin.
2389
2390         * dom/NodeFilter.idl:
2391         Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
2392         * manual-tests/input-empty-on-focus.html:
2393         Removed "Property changes" that snuck in as part of the "apply patch" process.
2394
2395 2006-07-16  Darin Adler  <darin@apple.com>
2396
2397         Reviewed by John Sullivan.
2398
2399         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9943
2400           <rdar://problem/4590613>
2401           REGRESSION (Tiger-TOT): menus are offset to the right at http://movies.aol.com/movie-photo-bts/superman-returns
2402
2403         The problem turns out to be the fact that body.offsetLeft is returning a non-zero value.
2404         I have no idea why the menus worked in Tiger Safari, because body.offsetLeft behavior has not changed.
2405         Presumably some other bug that we fixed had been compensating.
2406
2407         Test: fast/html/body-offset-properties.html
2408
2409         * rendering/RenderObject.cpp:
2410         (WebCore::RenderObject::offsetLeft): Always return 0 for any object without an offsetParent.
2411         (WebCore::RenderObject::offsetTop): Ditto.
2412         (WebCore::RenderObject::offsetParent): Return 0 for the body (treat as a special case).
2413
2414 2006-07-16  Beth Dakin  <bdakin@apple.com>
2415
2416         Reviewed by Maciej.
2417
2418         Fix for <rdar://problem/4616595> REGRESSION: Problems with world 
2419         clock widget clock hand motion on 9A211 + 4604574
2420
2421         The second hand on the widget was jiggling because the rotation was 
2422         messing up the use of the affine transformation matrix while 
2423         rounding to pixel boundaries in device space. We are mainly 
2424         concerned with rounding to pixel boundaries with the scale in mind, 
2425         so this patch extracts the scale to device space from the matrix, 
2426         and rounds to pixel boundaries using only the scale. This doesn't 
2427         seem like it is a perfect solution, but it definitely solves the 
2428         immediate problem. We will probably need to re-address what should 
2429         happen to avoid pixel cracks with rotations at non-integral scale 
2430         factors. 
2431
2432         * platform/cg/GraphicsContextCG.cpp:
2433         (WebCore::GraphicsContext::roundToDevicePixels):
2434
2435 2006-07-15  Darin Adler  <darin@apple.com>
2436
2437         - fix mistake from fix for 8952 that was breaking layout tests
2438
2439         * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
2440         Justin was right! I changed the behavior of the function by accident. Changed it
2441         back so that it doesn't blow away the selection on the DOM side in the case where
2442         it didn't before.
2443
2444         I will write 100 times on the blackboard: "When Justin says something about editing,
2445         assume he is right."
2446
2447 2006-07-15  Darin Adler  <darin@apple.com>
2448
2449         - try to fix Windows build
2450
2451         * WebCore.vcproj/WebCore/WebCore.vcproj: Added StreamingTextDecoderICU.cpp/h.
2452
2453 2006-07-15  Darin Adler  <darin@apple.com>
2454
2455         Reviewed by John Sullivan.
2456
2457         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8952
2458           <rdar://problem/4575185>
2459           REGRESSION: crash on drag of highlighted Google custom home page modules
2460
2461         Test: fast/dynamic/move-node-with-selection.html
2462
2463         * editing/SelectionController.cpp: (WebCore::SelectionController::nodeWillBeRemoved):
2464         Call updateRendering before calling clearSelection(), since it's important to do any
2465         work beforehand, and there are calls inside clearSelection that will indirectly do an
2466         updateRendering. Also change code to make fewer assumptions about object lifetime.
2467
2468 2006-07-15  Darin Adler  <darin@apple.com>
2469
2470         Reviewed by John Sullivan.
2471
2472         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8587
2473           <rdar://problem/4631844>
2474           REGRESSION: {display:list-item} on items outside an ol or ul element no longer causes incremental numbering
2475
2476         Test: fast/lists/numeric-markers-outside-list.html
2477
2478         * rendering/RenderListItem.cpp: (WebCore::previousListItem):
2479         Look for list items, even when we're outside any list.
2480
2481 2006-07-15  Adele Peterson  <adele@apple.com>
2482
2483         Reviewed by John.
2484
2485         - Fix for <rdar://problem/4593970> REGRESSION (NativeTextField): autofill menu disappears after typing a 2nd character
2486
2487         This was caused by composite editing commands, (like typing or pasting) that include a DeleteCommand, being
2488         interpreted by the form delegate as an actual delete.  This fix doesn't notify the form delegate if the deletion is
2489         part of an editing command to replace the selected text.
2490
2491         * editing/DeleteSelectionCommand.h: Added m_replace to keep track of whether this deletion is 
2492           part of a composite command to replace the text being deleted.
2493         * editing/DeleteSelectionCommand.cpp:
2494         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): Initialize m_replace.
2495         (WebCore::DeleteSelectionCommand::doApply): Only notify the form delegate of the deletion if the text is not being replaced.
2496         * editing/CompositeEditCommand.h:
2497         * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::deleteSelection): 
2498           Added replace argument to construct DeleteSelectionCommand.
2499           
2500         * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): Call deleteSelection with replace argument.
2501         * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): ditto.
2502
2503 2006-07-15  Geoffrey Garen  <ggaren@apple.com>
2504
2505         Reviewed by Maciej, tweaked to match Darin's patch.
2506         
2507         - Fixed <rdar://problem/4631837> REGRESSION: Reproducible crash on 
2508         FCKeditor demo (9911)
2509         
2510         * WebCore.xcodeproj/project.pbxproj:
2511         * bindings/js/kjs_html.cpp:
2512         (KJS::JSHTMLDocument::putValueProperty): Check for a null body element before
2513         forwarding the put request to it. I confirmed that no other parts of the 
2514         file use 'body' or 'bodyElement' without checking for null. 
2515         
2516         Also, use 'body' rather than 'bodyElement' because dir can bet set on 
2517         any element, not just HTMLBodyElement.
2518
2519 2006-07-15  Darin Adler  <darin@apple.com>
2520
2521         Reviewed by Adele.
2522
2523         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8871
2524           <rdar://problem/4575417>
2525           REGRESSION: Pressing Enter/Return in a text input removes the selected text
2526
2527         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9743
2528           <rdar://problem/4614228>
2529           REGRESSION: crash dispatching JavaScript-created keyboard event to input element
2530
2531         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::doTextFieldCommandFromEvent):
2532         Add a null check to fix the crash, and a FIXME explaining why this is not necessarily
2533         enough for the future.
2534
2535         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler):
2536         Consume Enter key keypress events even if the element is not in a form.
2537
2538         * platform/mac/KeyEventMac.mm: (WebCore::keyIdentifierForKeyEvent): Added \n to the
2539         characters that turn into "Enter". Actual keyboard events always are \r or \003 on
2540         the Macintosh, but in layout tests we can use \n, and everything other than the
2541         code path here works, so worth fixing.
2542
2543 2006-07-15  Darin Adler  <darin@apple.com>
2544
2545         Reviewed by John Sullivan.
2546
2547         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9883
2548           <rdar://problem/4631821>
2549           REGRESSION: NativePopups don't work correctly in some forum software
2550
2551         Test: fast/forms/select-selected.html
2552
2553         * rendering/RenderMenuList.h:
2554         * rendering/RenderMenuList.cpp:
2555         (WebCore::RenderMenuList::updateFromElement): Added code to map the selected option
2556         index to a list index before using it to index into the list.
2557         (WebCore::RenderMenuList::showPopup): Added code to map the selection option index
2558         to a list index before passing it to the menu renderer.
2559         (WebCore::RenderMenuList::valueChanged): Added code to map the list index back to a
2560         option index before calling setSelectedIndex (that function takes an option index).
2561
2562 2006-07-15  Darin Adler  <darin@apple.com>
2563
2564         Reviewed by John Sullivan.
2565
2566         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9928
2567           REGRESSION: Text Encoding menu inoperative (after gcc protocol build fix)
2568
2569         * bindings/objc/DOM.mm:
2570         (-[DOMNode addEventListener:::]): Moved into DOMEventTarget category.
2571         (-[DOMNode removeEventListener:::]): Ditto.
2572         (-[DOMNode dispatchEvent:]): Ditto.
2573
2574         * WebCore.xcodeproj/project.pbxproj: Allow Xcode to do its thing.
2575
2576 2006-07-15  Maciej Stachowiak  <mjs@apple.com>
2577
2578         Reviewed by Anders.
2579
2580         <rdar://problem/4632144> REGRESSION: table column tests failing as a result of very recent fix
2581
2582         * rendering/RenderTable.cpp:
2583         (WebCore::RenderTable::addChild): columns and colgroups are valid children of a table too, not
2584         just table sections!
2585
2586 2006-07-15  Anders Carlsson  <acarlsson@apple.com>
2587
2588         Reviewed by Darin.
2589
2590         http://bugzilla.opendarwin.org/show_bug.cgi?id=9866
2591         <rdar://problem/4631561>
2592         REGRESSION: Repro crash from mangleme using iframe, only from server.
2593         
2594         * html/HTMLIFrameElement.cpp:
2595         (WebCore::HTMLIFrameElement::attach):
2596         Add null check for contentFrame() since content frames won't be created for invalid URLs.        
2597
2598 2006-07-14  Alexey Proskuryakov  <ap@nypop.com>
2599
2600         Reviewed by Darin.
2601
2602         Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4195
2603         REGRESSION: KOI8-U encoding no longer supported.
2604
2605         Tests:
2606         * http/tests/misc/BOM-override.pl
2607         * http/tests/misc/BOM-override-script.html
2608         * fast/encoding/charset-koi8-u.html
2609         * fast/encoding/charset-x-nextstep.html
2610
2611         Restored a TEC code path for encodings that are not supported by ICU (but which currently
2612         passes all layout tests even by itself with ICU disabled). A lot of refactoring is 
2613         still needed - most importantly, round-tripping encoding names via CFStringEncoding 
2614         makes little sense now.
2615
2616         * WebCore.exp:
2617         * bridge/mac/WebCoreTextDecoder.h: Removed.
2618         * bridge/mac/WebCoreTextDecoder.mm: Removed.
2619         WebCoreTextDecoder was not used anywhere since WebTextView was moved into WebCore.
2620
2621         * loader/Decoder.cpp:
2622         (Decoder::Decoder):
2623         (Decoder::setEncodingName):
2624         (Decoder::decode):
2625         Use StreamingTextDecoder::create().
2626
2627         * platform/StreamingTextDecoder.cpp:
2628         (WebCore::StreamingTextDecoder::create):
2629         (WebCore::StreamingTextDecoder::~StreamingTextDecoder):
2630         * platform/StreamingTextDecoder.h:
2631         StreamingTextDecoder is just an abstract interface to implementations now.
2632
2633         * platform/StreamingTextDecoderICU.cpp: Added.
2634         (WebCore::StreamingTextDecoderICU::StreamingTextDecoderICU):
2635         (WebCore::StreamingTextDecoderICU::~StreamingTextDecoderICU):
2636         (WebCore::StreamingTextDecoderICU::releaseICUConverter):
2637         (WebCore::StreamingTextDecoderICU::textEncodingSupported):
2638         (WebCore::StreamingTextDecoderICU::convertUTF16):
2639         (WebCore::StreamingTextDecoderICU::convertIfASCII):
2640         (WebCore::StreamingTextDecoderICU::createICUConverter):
2641         (WebCore::StreamingTextDecoderICU::appendOmittingBOM):
2642         (WebCore::StreamingTextDecoderICU::convertUsingICU):
2643         (WebCore::StreamingTextDecoderICU::convert):
2644         (WebCore::StreamingTextDecoderICU::toUnicode):
2645         (WebCore::StreamingTextDecoderICU::fromUnicode):
2646         * platform/StreamingTextDecoderICU.h: Added.
2647         Renamed from StreamingTextDecoder; added a way to tell whether the encoding is actually
2648         supported by the decoder; minor cleanup.
2649
2650         * platform/TextEncoding.cpp:
2651         (WebCore::TextEncoding::effectiveEncoding): Moved from StreamingTextDecoder.
2652         (WebCore::TextEncoding::toUnicode): Use StreamingTextDecoder::create().
2653         (WebCore::TextEncoding::fromUnicode): Moved to StreamingTextDecoderICU.
2654         
2655         * platform/TextEncoding.h: Changed __APPLE__ to PLATFORM(MAC); added effectiveEncoding().
2656
2657         * platform/mac/StreamingTextDecoderMac.cpp: Added.
2658         (WebCore::StreamingTextDecoderMac::StreamingTextDecoderMac):
2659         (WebCore::StreamingTextDecoderMac::~StreamingTextDecoderMac):
2660         (WebCore::StreamingTextDecoderMac::releaseTECConverter):
2661         (WebCore::StreamingTextDecoderMac::textEncodingSupported):
2662         (WebCore::StreamingTextDecoderMac::convertUTF16):
2663         (WebCore::StreamingTextDecoderMac::convertIfASCII):
2664         (WebCore::StreamingTextDecoderMac::createTECConverter):
2665         (WebCore::StreamingTextDecoderMac::appendOmittingBOM):
2666         (WebCore::StreamingTextDecoderMac::convertOneChunkUsingTEC):
2667         (WebCore::StreamingTextDecoderMac::convertUsingTEC):
2668         (WebCore::StreamingTextDecoderMac::convert):
2669         (WebCore::StreamingTextDecoderMac::toUnicode):
2670         (WebCore::StreamingTextDecoderMac::fromUnicode):
2671         * platform/mac/StreamingTextDecoderMac.h: Added.
2672         (WebCore::StreamingTextDecoderMac::convert):
2673         This is a TEC+CFString code path for decoding, basically restored from a year-old revision.
2674
2675         * platform/mac/TextEncodingMac.cpp: Removed. Code moved to StreamingTextDecoderMac.
2676
2677         * WebCore.xcodeproj/project.pbxproj:
2678
2679 === Safari-521.17 ===
2680
2681 2006-07-14  Timothy Hatcher  <timothy@apple.com>
2682
2683         <rdar://problem/4623957> SWB: gcc-5412 (new?) objc warning causes WebCore project failure
2684
2685         Made a DOMNode category in DOMEvents.h that lets DOMNode conform to the
2686         DOMEventTarget protocol that works with GCC 5412.
2687
2688         Removed forward declarations of WebCoreWidgetHolder and imported WebCoreWidgetHolder.h.
2689
2690         Removed all <Cocoa/Cocoa.h> and <Foundation/Foundation.h> imports in other headers,
2691         we import <Cocoa/Cocoa.h> in the prefix header for ObjC.
2692
2693         * WebCore.xcodeproj/project.pbxproj:
2694         * bindings/objc/DOMCore.h:
2695         * bindings/objc/DOMEvents.h:
2696         * bridge/mac/FormDataMac.h:
2697         * bridge/mac/WebCoreAXObject.h:
2698         * bridge/mac/WebCoreCache.h:
2699         * bridge/mac/WebCoreEncodings.h:
2700         * bridge/mac/WebCoreFrameBridge.h:
2701         * bridge/mac/WebCoreFrameNamespaces.h:
2702         * bridge/mac/WebCoreJavaScript.h:
2703         * bridge/mac/WebCorePageBridge.h:
2704         * bridge/mac/WebCorePageState.h:
2705         * bridge/mac/WebCoreResourceLoader.h:
2706         * bridge/mac/WebCoreScriptDebugger.h:
2707         * bridge/mac/WebCoreSettings.h:
2708         * bridge/mac/WebCoreStringTruncator.h:
2709         * bridge/mac/WebCoreStringTruncator.mm:
2710         * bridge/mac/WebCoreTextDecoder.h:
2711         * bridge/mac/WebDashboardRegion.h:
2712         * kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
2713         * platform/mac/CookieJar.mm:
2714         * platform/mac/DeprecatedStringMac.mm:
2715         * platform/mac/FontDataMac.mm:
2716         * platform/mac/FoundationExtras.h:
2717         * platform/mac/TextBoundaries.mm:
2718         * platform/mac/WebCoreHistory.h:
2719         * platform/mac/WebCoreHistory.m:
2720         * platform/mac/WebCoreKeyGenerator.h:
2721         * platform/mac/WebCoreTextArea.h:
2722         * platform/mac/WebCoreTextField.h:
2723         * platform/mac/WebCoreTextRenderer.h:
2724         * platform/mac/WebCoreView.h:
2725         * platform/mac/WebCoreWidgetHolder.h:
2726
2727 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
2728
2729         Reviewed by Maciej.
2730
2731         - Updated ScriptInterpreter to work with Interpreter ref-counting in 
2732         JavaScriptCore.
2733
2734         (KJS::ScriptInterpreter::~ScriptInterpreter): Now protected to catch
2735         manual delete.
2736
2737 2006-07-14  Anders Carlsson  <acarlsson@apple.com>
2738
2739         Reviewed by Adele and Justin.
2740
2741         http://bugzilla.opendarwin.org/show_bug.cgi?id=9658
2742         <rdar://problem/4613948>
2743         REGRESSION: Check Spelling does not work in textarea elements
2744         
2745         * bridge/mac/FrameMac.mm:
2746         (WebCore::FrameMac::advanceToNextMisspelling):
2747         Don't use setStartBefore or setEndAfter on the search range because for shadow trees, there
2748         is no notion of before and after. Instead, use setStart and setEnd and pass in the start and end
2749         indices respectively.
2750         
2751         * dom/Range.cpp:
2752         (WebCore::Range::checkNodeBA):
2753         Allow range operations on shadow trees.
2754
2755         * manual-tests/form-element-spelling.html: Added.
2756
2757 2006-07-14  Beth Dakin  <bdakin@apple.com>
2758
2759         Reviewed by Hyatt.
2760
2761         Fix for <rdar://problem/4621660> REGRESSION: Safari crashing in 
2762         WebCore::FrameView::updateOverflowStatus
2763
2764         m_viewportRenderer is never initialized for framesets, and it 
2765         shouldn't be. So we just need to nil-check for it in 
2766         updateOverflowStatus() and return early.
2767
2768         * page/FrameView.cpp:
2769         (WebCore::FrameView::updateOverflowStatus): Nil check.
2770
2771 2006-07-14  Adele Peterson  <adele@apple.com>
2772
2773         RS by Darin.
2774
2775         Backing out fix for <rdar://problem/4604703> 
2776         REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
2777
2778         Darin had a better fix in WebKit for this.
2779
2780         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
2781
2782 2006-07-14  Adele Peterson  <adele@apple.com>
2783
2784         Reviewed by Darin.
2785
2786         - Fix for <rdar://problem/4614054> REGRESSION: Safari submits forms when the Return key is hit to complete inline inputs
2787
2788         * page/Frame.h: (WebCore::Frame::inputManagerHasMarkedText): Added.
2789         * bridge/mac/FrameMac.h: ditto.
2790         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::inputManagerHasMarkedText): Added. Asks the input manager if there's marked text.
2791         * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::defaultEventHandler): For text fields, don't submit the form on Enter
2792         if the input manager says there's marked text.  I added this code for all text field paths.  For widgets, WebCoreTextField.mm
2793         has code to deal with this case.  But as we convert search, password, and isindex, they will need to do this check too.
2794
2795 2006-07-14  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2796
2797         Reviewed by Darin.
2798
2799         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9907
2800           REGRESSION (r15418): editing/pasteboard/paste-table-001 fails in pixel  mode
2801
2802         * rendering/RenderText.cpp:
2803         (WebCore::RenderText::caretRect): Fixed the calculation of the max/min allowed caret
2804         position.
2805
2806 2006-07-14  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2807
2808         Reviewed by Darin.
2809
2810         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9905
2811           REGRESSION (r15404-r15415): Repro crash when pressing delete in an empty editable div
2812
2813         Test: editing/deleting/delete-at-start-or-end.html
2814
2815         * editing/TypingCommand.cpp:
2816         (WebCore::TypingCommand::deleteKeyPressed): Added null check.
2817         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2818
2819 2006-07-14  David Kilzer  <ddkilzer@kilzer.net>
2820
2821         Reviewed by Geoffrey.
2822
2823         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9903
2824           Simplify logic in JSHTMLOptionsCollection::setLength() by using no-arg getNumber()
2825
2826         No test cases since there is no change in functionality.
2827
2828         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2829         (WebCore::JSHTMLOptionsCollection::setLength):  Simplified logic by using the
2830         no-argument getNumber() method.
2831
2832 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
2833
2834         Reviewed by Adele.
2835
2836         - Build fix: don't need BLOCK_OBJC_EXCEPTIONS because we already have
2837         one surrounding this function, and the nested one makes the compiler
2838         think our local variable is volatile (seems like a compiler bug to me).
2839         
2840         * bridge/mac/FrameMac.mm:
2841         (WebCore::FrameMac::sendContextMenuEvent):
2842
2843 2006-07-14  Timothy Hatcher  <timothy@apple.com>
2844
2845         Reviewed by Maciej.
2846
2847         Make JavaScriptCore a public framework. Adjusted the paths.
2848
2849         * WebCore.xcodeproj/project.pbxproj:
2850
2851 2006-07-14  Maciej Stachowiak  <mjs@apple.com>
2852
2853         Reviewed by Hyatt.
2854
2855         - fixed <rdar://problem/4567031> REGRESSION: Crash at WebCore::RenderBlock::createLineBoxes (seems to be a security hole?)
2856         
2857         I also fixed all the similar crash / assertion failure cases I could think of.
2858
2859         * dom/Node.cpp:
2860         (WebCore::Node::nextRendererWithSameParent): Helper function for some of the above.
2861         * dom/Node.h:
2862         * rendering/RenderTable.cpp:
2863         (WebCore::RenderTable::addChild): Don't allow inserting forms when not in
2864         an HTML document, since we don't need that quirk and because parsing won't
2865         do certain render tree fixups. Also watch out for case when inserting before
2866         the renderer of a misnested child.
2867         * rendering/RenderTableRow.cpp:
2868         (WebCore::RenderTableRow::addChild): ditto
2869         * rendering/RenderTableSection.cpp:
2870         (WebCore::RenderTableSection::addChild): ditto
2871
2872 2006-07-13  Adele Peterson  <adele@apple.com>
2873
2874         Reviewed by Maciej.
2875
2876         - Fix for <rdar://problem/4604703> 
2877         REGRESSION (NativeTextField): Focus is not removed from password field after I ctrl-click into a different field
2878
2879         Test:
2880         * manual-tests/password-ctrl-click-lose-focus.html: Added.
2881
2882         * bridge/mac/FrameMac.mm: (WebCore::FrameMac::sendContextMenuEvent):
2883         If we're about to set a selection in the current view, make sure its the first responder.
2884         In this case, this will cause the password field to resign first responder at the right time.
2885
2886 2006-07-13  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2887
2888         Reviewed by Hyatt.
2889
2890         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9670
2891           REGRESSION: RTL white-space:pre-wrap text is offset to the right
2892
2893         Test: fast/text/international/rtl-white-space-pre-wrap.html
2894
2895         * rendering/RenderText.cpp:
2896         (WebCore::RenderText::caretRect): Fixed LTR case and added the RTL case
2897         of clipping the caret position to the text box when the caret is after
2898         the trailing space of an autowrapped line.
2899         * rendering/bidi.cpp:
2900         (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed to truncate-
2901         to-fit the logically last text box if it contains the trailing spaces of an
2902         autowrapped line. 
2903         (WebCore::RenderBlock::bidiReorderLine): Remember the logically last text run.
2904         In the case of autowrapped text with white space that overflows beyond the line,
2905         the last text run is the one containing the overflowing white space.
2906         (WebCore::RenderBlock::findNextLineBreak): Split overflowing white space on a
2907         line that autowraps only after white space into a separate text run.
2908
2909 2006-07-13  David Harrison  <harrison@apple.com>
2910
2911         Reviewed by Dave Hyatt.
2912
2913         <rdar://problem/4624203> -webkit-highlight should be behind images
2914
2915         * rendering/RenderImage.cpp:
2916         (WebCore::RenderImage::paint):
2917         * rendering/RenderListMarker.cpp:
2918         (WebCore::RenderListMarker::paint):
2919         * rendering/RenderWidget.cpp:
2920         (WebCore::RenderWidget::paint):
2921         Call custom highlighter before painting the image, marker, or widget.
2922
2923 2006-07-13  David Harrison  <harrison@apple.com>
2924
2925         Reviewed by Justin and Levi.
2926
2927         <rdar://problem/4620743> REGRESSION: Option-Delete doesn't delete words during typing
2928
2929         * Tests:
2930         editing/deleting/delete-by-word-001.html
2931         editing/deleting/delete-by-word-002.html
2932
2933         * editing/TypingCommand.cpp:
2934         (WebCore::TypingCommand::deleteKeyPressed):
2935         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2936         (WebCore::TypingCommand::doApply):
2937         * editing/TypingCommand.h:
2938         Delete and forward delete to use specified granularity.
2939         Undo of delete and forward delete to select what had been deleted (non-char granularity only).
2940         
2941         * page/Frame.cpp:
2942         (WebCore::Frame::setSelection):
2943         Close typing and end style even if selection is not changing.
2944         * page/Frame.h:
2945         Remove unused setSelection parameter keepTypingStyle.
2946
2947 2006-07-12  Levi Weintraub  <lweintraub@apple.com>
2948
2949         Reviewed by justin
2950
2951         <rdar://problem/4622763> Deleting from beginning of paragraph following a table deletes rather than selects the table
2952
2953         * editing/DeleteSelectionCommand.cpp:
2954         (WebCore::DeleteSelectionCommand::initializeStartEnd): Added selection expansion for HRs.
2955         (WebCore::DeleteSelectionCommand::initializePositionData): Now uses enclosingBlockFlowOrTableElement
2956         instead of enclosingBlockFlowElement.
2957         (WebCore::DeleteSelectionCommand::removeNode): Use to identify that we need a placeholder
2958         when the start or end block is removed.
2959         (WebCore::DeleteSelectionCommand::handleGeneralDelete): Added check for canHaveChildrenForEditing
2960         to keep things like HRs from being given children.
2961         (WebCore::DeleteSelectionCommand::doApply): Switched to use member variable for needPlaceholder.
2962         * editing/DeleteSelectionCommand.h: Made needPlaceholder a member variable.
2963         * editing/TypingCommand.cpp:
2964         (WebCore::TypingCommand::deleteKeyPressed): Fixed selection bug for tables and open typing commands.
2965         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
2966         * editing/htmlediting.cpp:
2967         (WebCore::editingIgnoresContent): Added check for HRs, since it's not considered a widget.
2968         * editing/visible_units.cpp:
2969         (WebCore::startOfParagraph): Fix for HRs and tables.
2970         (WebCore::endOfParagraph): Ditto.
2971
2972 2006-07-13  Alexey Proskuryakov  <ap@nypop.com>
2973
2974         Reviewed by Darin.
2975
2976         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9880
2977           Memory leaks running DOM-Hanoi
2978
2979         No change in behavior, thus no test included.
2980
2981         * bridge/mac/FrameMac.mm:
2982         (WebCore::FrameMac::setStatusBarText): Use a local autorelease pool to release the temporaries - 
2983         the test runs non-stop, and the enclosing pool doesn't get a chance to be drained.
2984
2985 2006-07-12  Mitz Pettel  <opendarwin.org@mitzpettel.com>
2986
2987         Reviewed by Adele.
2988
2989         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9862
2990           REGRESSION: GMail: Crash in RenderView::repaintViewRectangle when spoofing as FF
2991         - see also <rdar://problem/4622407>
2992
2993         Test: fast/frames/repaint-display-none-crash.html
2994
2995         * rendering/RenderView.cpp:
2996         (WebCore::RenderView::repaintViewRectangle): Added null checking of the owner element's
2997         renderer, which can be null if the iframe is set to display:none.
2998
2999 2006-07-12  Justin Garcia  <justin.garcia@apple.com>
3000
3001         Reviewed by levi
3002         
3003         <rdar://problem/4509393>
3004         selected DOM range starts with <object>, 0 offset but selection should include the <object>
3005
3006         * editing/ReplaceSelectionCommand.cpp:
3007         (WebCore::ReplaceSelectionCommand::shouldMergeStart): 
3008         Don't pull content out of a table cell.
3009         * editing/htmlediting.cpp:
3010         (WebCore::editingIgnoresContent): Added <select> nodes.
3011         (WebCore::rangeCompliantEquivalent): Convert [node, 0] positions to positionBeforeNode(node)
3012         for more types of nodes.
3013         * rendering/RenderContainer.cpp:
3014         (WebCore::RenderContainer::positionForCoordinates): 
3015         Fix a crasher when right clicking on an anonymous table.
3016
3017 2006-07-12  John Sullivan  <sullivan@apple.com>
3018
3019         Reviewed by Brady Eidson
3020         
3021         - fixed <rdar://problem/4611164> REGRESSION: Crash occurs when undoing a series of 
3022         misspelled words (WebCore::RenderObject::repaint(bool)
3023
3024         * dom/Document.cpp:
3025         (WebCore::Document::removeMarkers):
3026         put (it - markers.begin()) in a local variable before altering markers, in every case where this was
3027         happening. One of the cases like this was fixed a while back, but other cases were
3028         either missed at that time or crept in since. 
3029
3030 2006-07-13  Anders Carlsson  <acarlsson@apple.com>
3031
3032         Reviewed by Justin.
3033
3034         http://bugzilla.opendarwin.org/show_bug.cgi?id=9663
3035         REGRESSION (r14948-r14956): Selection in text field remains highlighted when the text field loses focus
3036         
3037         * dom/Document.cpp:
3038         (WebCore::Document::updateSelection):
3039         Don't return early if the selection is empty.
3040
3041 2006-07-12  Anders Carlsson  <acarlsson@apple.com>
3042
3043         Reviewed by Adele.
3044
3045         <rdar://problem/4614656> REGRESSION: onpaste() handlers don't run for textarea elements
3046         
3047         * bridge/mac/FrameMac.mm:
3048         (WebCore::FrameMac::dispatchCPPEvent):
3049         If the element is a shadow node, dispatch the event to its real parent.
3050
3051         * manual-tests/textarea-onpaste.html: Added.
3052
3053 2006-07-12  Beth Dakin  <bdakin@apple.com>
3054
3055         Reviewed by Anders.
3056
3057         Fix for layout test regressions after my check-in last night. Just 
3058         a silly mistake where I should have asked if we were NOT printing 
3059         instead of if we were in the listbox code.
3060
3061         * WebCore.xcodeproj/project.pbxproj: Project file wars. Back to 
3062         XCode 2.3
3063         * platform/mac/ListBoxMac.mm:
3064         (itemTextRenderer): Inverted check.
3065         (groupLabelTextRenderer): Inverted check.
3066
3067 2006-07-12  Darin Adler  <darin@apple.com>
3068
3069         Reviewed by Maciej.
3070
3071         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9806
3072           <rdar://problem/4622622>
3073           REGRESSION: Large rowspan causes WebKit to call abort()
3074
3075         Test: fast/table/large-rowspan-crash.html
3076
3077         * rendering/RenderTableSection.cpp:
3078         (WebCore::RenderTableSection::ensureRows):
3079         Use sizeof(RowStruct) instead of sizeof(int).
3080         Clearly we'll need something better to solve this completely.
3081         I expect another smaller, but still huge, value will still cause a problem.
3082
3083 2006-07-12  Anders Carlsson  <acarlsson@apple.com>
3084
3085         Reviewed by Maciej.
3086
3087         <rdar://problem/4586665> REGRESSION: autorestore.apple.com: Crashes Safari in WebCore::Widget::client() const
3088
3089         * bridge/mac/FrameMac.h:
3090         Add focusCallResultedInViewBeingCreated argument. 
3091         
3092         * bridge/mac/FrameMac.mm:
3093         (WebCore::FrameMac::nextKeyViewInFrame):
3094         If the call to focus() caused the node to get a native widget, set focusCallResultedInViewBeingCreated to true.
3095         
3096         (WebCore::FrameMac::nextKeyViewInFrameHierarchy):
3097         Don't reset the focus node if focusCallResultedInViewBeingCreated is true. Also, add magic to prevent setting
3098         a text field as the first responder if its field editor already is the current first responder.
3099         
3100         * page/FrameView.cpp:
3101         (WebCore::FrameView::handleMousePressEvent):
3102         In some cases, get the event target node again after dispatching the mouse event.
3103
3104 2006-07-12  Beth Dakin  <bdakin@apple.com>
3105
3106         Reviewed by Adele.
3107
3108         Fix for <rdar://problem/4615765> Input[type='search' fields 
3109         initially render too large in Widgets
3110
3111         Fundamentally, the problem here is that we were miscalculating 
3112         things because [NSGraphicsContext currentContextDrawingToScreen] 
3113         was evaluating to false when widgets first load. We only ever used 
3114         this check, however, to determine if we were printing or not, so it 
3115         should not have evaluated to false for loading in Dashbaord. 
3116         Instead, if we query the RenderView about whether or not we are 
3117         printing, we will get the right answer.
3118
3119         No test case added since this appears only to affect Dashboard.
3120
3121         * bridge/mac/WebCoreFrameBridge.mm:
3122         (-[WebCoreFrameBridge drawRect:]): Ask the RenderView if we are 
3123         printing instead. This is not part of the actual bug fix, but it 
3124         seems wise to get rid of all calls to [NSGraphicsContext 
3125         currentContextDrawingToScreen] when we are just trying to determine 
3126         if we are printing or not.
3127         * platform/mac/ListBoxMac.mm:
3128         (itemTextRenderer):This function now takes a boolean, isPrinting.
3129         (groupLabelTextRenderer): Same as above.
3130         (ListBox::sizeForNumberOfLines): Ask the RenderView if we are 
3131         printing.
3132         (-[WebCoreTableView drawRow:clipRect:]): Same as above.
3133         * platform/mac/PopUpButtonMac.mm:
3134         (PopUpButton::sizeHint): Same as above.
3135         * platform/mac/TextFieldMac.mm:
3136         (-[NSSearchFieldCell _addStringToRecentSearches:]):
3137         * rendering/RenderLineEdit.cpp: Same as above.
3138
3139 2006-07-12  Adele Peterson  <adele@apple.com>
3140
3141         Reviewed by Maciej.
3142
3143         Fix for: http://bugzilla.opendarwin.org/show_bug.cgi?id=9813
3144         OPTION text can paint over select element's scrollbar
3145
3146         Test: fast/forms/option-text-clip.html
3147
3148         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::paintObject):
3149         When calculating the clip to apply to the button text, also consider padding.
3150         In the future, we may have separate renderers for the text part, and the arrow part
3151         of the control, and then the separation should be natural.  For now, we use padding.
3152
3153 2006-07-11  David Kilzer  <ddkilzer@kilzer.net>
3154
3155         Windows build fix.  Reviewed by NOBODY.
3156
3157         * WebCore.vcproj/WebCore/WebCore.vcproj:  Added JSHTMLOptionsCollection.cpp/h
3158         and JSHTMLOptionsCollectionCuston.cpp.  VC++ Express realphabetized the file list.
3159
3160 2006-07-11  Darin Adler  <darin@apple.com>
3161
3162         Reviewed by Adele.
3163
3164         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9809
3165           <rdar://problem/4619515>
3166           focus ring fails to appear on select element after choosing item from popup
3167
3168         - includes http://bugzilla.opendarwin.org/show_bug.cgi?id=9853
3169           improvements to select element, including some storage leak fixes
3170
3171         * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::index): Use a const
3172         reference for the list items, so we don't have to copy a vector.
3173         * html/HTMLSelectElement.cpp:
3174         (WebCore::HTMLSelectElement::selectedIndex): Ditto.
3175         (WebCore::HTMLSelectElement::setSelectedIndex): Ditto.
3176         (WebCore::HTMLSelectElement::length): Ditto.
3177         (WebCore::HTMLSelectElement::remove): Ditto.
3178         (WebCore::HTMLSelectElement::value): Ditto.
3179         (WebCore::HTMLSelectElement::setValue): Ditto.
3180         (WebCore::HTMLSelectElement::stateValue): Ditto.
3181         (WebCore::HTMLSelectElement::restoreState): Ditto.
3182         (WebCore::HTMLSelectElement::appendFormData): Ditto.
3183         (WebCore::HTMLSelectElement::optionToListIndex): Ditto.
3184         (WebCore::HTMLSelectElement::listToOptionIndex): Ditto.
3185         (WebCore::HTMLSelectElement::recalcListItems): Made const, with the appropriate
3186         fields mutable.
3187         (WebCore::HTMLSelectElement::reset): Use a const reference for
3188         the list items, so we don't have to copy the vector. Remove the call to
3189         setSelectionChanged for the RenderMenuList case.
3190         (WebCore::HTMLSelectElement::notifyOptionSelected): Ditto, on both counts.
3191         (WebCore::HTMLSelectElement::defaultEventHandler): Call focus() before showing
3192         the pop-up.
3193         * html/HTMLSelectElement.h: The RenderMenuList class is no longer a friend.
3194         Changed the listItems function to return a const reference to the vector so
3195         it no longer copies the vector. Removed the const_cast to the call to
3196         recalcListItems and changed it to a const member function. Made m_recalcListItems
3197         mutable.
3198         * rendering/DeprecatedRenderSelect.cpp:
3199         (WebCore::DeprecatedRenderSelect::updateFromElement): Removed an unnecessary call
3200         to recalcListItems, which is called automatically. Use a const reference for the
3201         list items so we don't have to copy a vector.
3202         (WebCore::DeprecatedRenderSelect::layout): Ditto.
3203         (WebCore::DeprecatedRenderSelect::selectionChanged): Ditto.
3204         (WebCore::DeprecatedRenderSelect::updateSelection): Ditto.
3205         * rendering/RenderMenuList.cpp:
3206         (WebCore::RenderMenuList::RenderMenuList): Updated for renamed data members.
3207         (WebCore::RenderMenuList::createInnerBlock): Ditto.
3208         (WebCore::RenderMenuList::addChild): Ditto.
3209         (WebCore::RenderMenuList::removeChild): Ditto.
3210         (WebCore::RenderMenuList::setStyle): Ditto. Also removed code to set the style
3211         on the pop-up menu, because it's created with the correct style and destroyed
3212         before it a style change could occur.
3213         (WebCore::RenderMenuList::updateFromElement): Rearranged code to compute the
3214         maximum width in a simpler fashion, and to not bother trying to maintain
3215         the "selected" flags on the elements, since the HTMLSelectElement class
3216         takes care of that. Store the width as an int. Call setText to set the text
3217         based on the selected element's option text.
3218         (WebCore::RenderMenuList::paintObject): Don't check m_inner when setting
3219         up the clip -- always set up the clip.
3220         (WebCore::RenderMenuList::calcMinMaxWidth): Use m_optionsWidth directly
3221         instead of calling ceilf on m_longestWidth.
3222         (WebCore::RenderMenuList::showPopup): Don't use m_popupMenu to store the
3223         menu -- instead keep the pointer in a local variable. Get the selected
3224         index from the HTMLSelectElement.
3225         (WebCore::RenderMenuList::valueChanged): Call HTMLSelectElement::setSelectedIndex
3226         to do most of the work.
3227         * rendering/RenderMenuList.h: Renamed m_inner to m_innerBlock. Removed
3228         m_popupMenu, m_size, m_selectionChanged, and m_selectedIndex. Renamed
3229         m_longestWidth to m_optionsWidth and changed it to be an int. Removed
3230         unneeded override of removeLeftoverAnonymousBoxes function. Removed
3231         unneeded selectionChanged, setSelectionChanged, updateSelection, and
3232         hasPopupMenu functions. Removed extra includes.
3233         * rendering/RenderPopupMenu.cpp: (WebCore::RenderPopupMenu::populate):
3234         Change to iterate the list items instead of iterating all children
3235         of the select node.
3236         * rendering/RenderPopupMenu.h: Renamed getRenderMenuList to menuList.
3237         * rendering/RenderPopupMenuMac.mm:
3238         (WebCore::RenderPopupMenuMac::populate): Moved code to clear and create
3239         the pop-up here from the caller. Removed an extra retain that would cause
3240         the NSPopUpButtonCell to leak.
3241         (WebCore::RenderPopupMenuMac::showPopup): Removed unnecessary code to
3242         create the pop-up, which is now in populate, and also the call to the
3243         clear function, for the same reason. Reorganized code to make it a bit
3244         more readable. Removed an unnecessary if to check if frame is nil.
3245         Used a RefPtr to make sure we don't make a call on a frame after it's
3246         deleted. As part of the reorganization fixed a problem where we'd retain
3247         the event and then return early without releasing it in one case.
3248         (WebCore::RenderPopupMenuMac::addSeparator): Tweaked a little.
3249         (WebCore::RenderPopupMenuMac::addGroupLabel): Grouped all the code to
3250         manage the NSMenu at the bottom of the function.
3251         (WebCore::RenderPopupMenuMac::addOption): Ditto.
3252
3253 2006-07-11  Justin Garcia  <justin.garcia@apple.com>
3254
3255         Reviewed by levi
3256         
3257         <rdar://problem/4620686>
3258         REGRESSION: Mispelling markers are still displayed when using the delete key to place caret into a misspelled word
3259
3260         * bridge/mac/FrameMac.mm:
3261         (WebCore::FrameMac::respondToChangedSelection): Remove markers from newAdjacentWords 
3262         even if oldAdjacentWords is equal to newAdjacentWords.  This happens during a deletion.
3263         
3264
3265 2006-07-11  Tim Omernick  <timo@apple.com>
3266
3267         Reviewed by NOBODY (build fix)
3268
3269         * bindings/objc/DOMPrivate.h:
3270         Don't @class NPObject; that breaks files that actually #import <JavaScriptCore/npruntime.h>, since the NPObject
3271         there is of a different type.
3272         Also clarified a highly misleading comment from my last commit.  I meant to clarify the comment
3273         before landing.
3274
3275 2006-07-12  Anders Carlsson  <acarlsson@apple.com>
3276
3277         Reviewed by Geoff.
3278
3279         http://bugzilla.opendarwin.org/show_bug.cgi?id=9635
3280         REGRESSION: Crash when adding to cart at <http://www.yemeksepeti.com/>
3281         
3282         * html/HTMLTokenizer.cpp:
3283         (WebCore::HTMLTokenizer::scriptHandler):
3284         Don't load external scripts if the parser is stopped.
3285         
3286         * manual-tests/open-close-tokenizer-crash.html: Added.
3287         * manual-tests/resources/empty-file.js: Added.
3288         * manual-tests/resources/open-close-tokenizer-crash.html: Added.
3289         Add manual test.
3290
3291 2006-07-11  John Sullivan  <sullivan@apple.com>
3292
3293         Reviewed by Kevin, Timo O, Brady, Darin, and Hyatt (whee!)
3294
3295         - added support for creating a selection image with white text
3296
3297         * rendering/RenderObject.h:
3298         (WebCore::):
3299         add PaintRestriction enum
3300         (WebCore::RenderObject::PaintInfo::PaintInfo):
3301         add forceWhiteText boolean to PaintInfo struct
3302
3303         * page/FramePrivate.h:
3304         (WebCore::FramePrivate::FramePrivate):
3305         replaced m_selectionOnly bool with m_paintRestriction, which also handles forcing the
3306         text to white
3307
3308         * page/Frame.cpp:
3309         (WebCore::Frame::paint):
3310         updated to use & pass m_paintRestriction where it used to use & pass just m_selectionOnly
3311
3312         * bridge/mac/FrameMac.h:
3313         * bridge/mac/FrameMac.mm:
3314         (WebCore::FrameMac::selectionImage):
3315         now takes forceWhiteText parameter, stored in FramePrivate as part of PaintRestriction
3316
3317         * bridge/mac/WebCoreFrameBridge.h:
3318         * bridge/mac/WebCoreFrameBridge.mm:
3319         (-[WebCoreFrameBridge selectionImageForcingWhiteText:]):
3320         renamed from selectionImage, now takes forceWhiteText parameter, which is passed
3321         down into Frame
3322
3323         * rendering/RenderLayer.h:
3324         * rendering/RenderLayer.cpp:
3325         (WebCore::RenderLayer::paint):
3326         use a PaintRestriction value where we used to use a selectionOnly bool
3327         (WebCore::RenderLayer::paintLayer):
3328         ditto; also stores forceWhiteText in PaintInfo struct
3329
3330         * kcanvas/KCanvasResources.cpp:
3331         (WebCore::KCanvasMarker::draw):
3332         updated for changed signature of PaintInfo constructor
3333
3334         * ksvg2/svg/SVGMaskElement.cpp:
3335         (WebCore::SVGMaskElement::drawMaskerContent):
3336         ditto
3337
3338         * ksvg2/svg/SVGPatternElement.cpp:
3339         (WebCore::SVGPatternElement::drawPatternContentIntoTile):
3340         ditto
3341
3342         * rendering/InlineTextBox.cpp:
3343         (WebCore::InlineTextBox::paint):
3344         paint with white text color if forceWhiteText is set in PaintInfo struct
3345
3346 2006-07-11  Tim Omernick  <timo@apple.com>
3347
3348         Reviewed by Anders.
3349
3350         <http://bugzilla.opendarwin.org/show_bug.cgi?id=9843>:
3351         Give Netscape plug-ins access to their own DOM element
3352
3353         * html/HTMLPlugInElement.h:
3354         Just import JSC headers on Mac.  The NPObject and Bindings::Instance stuff is only used on Mac anyway.
3355         Changed __APPLE__ to PLATFORM(MAC).
3356         Added m_NPObject ivar.
3357         * html/HTMLPlugInElement.cpp:
3358         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
3359         Initialize the NPObject.
3360         (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
3361         Release the NPObject when the element is destroyed.
3362         (WebCore::HTMLPlugInElement::createNPObject):
3363         Creates an NPObject for the element.
3364         (WebCore::HTMLPlugInElement::getNPObject):
3365         Returns the NPObject for the element, creating and caching it if necessary.
3366
3367         * html/HTMLAppletElement.h:
3368         Changed __APPLE__ to PLATFORM(MAC).
3369         * html/HTMLAppletElement.cpp:
3370         ditto
3371         * html/HTMLEmbedElement.h:
3372         ditto
3373         * html/HTMLEmbedElement.cpp:
3374         ditto
3375         * html/HTMLObjectElement.h:
3376         ditto
3377         * html/HTMLObjectElement.cpp:
3378         ditto
3379
3380         * bindings/objc/DOMPrivate.h:
3381         Added -[DOMElement _NPObject].
3382
3383         * bindings/objc/DOM.mm:
3384         (-[DOMElement _NPObject]):
3385         Returns the NPObject for the element.  Since this is only needed by the Netscape plug-in API, you can only get 
3386         the NPObject for applet, embed, and object elements.
3387         
3388 2006-07-11  Adele Peterson  <adele@apple.com>
3389
3390         Reviewed by Hyatt.
3391
3392         - Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9861
3393         REGRESSION: Can't dynamically change list box to popup
3394         
3395         and updated fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
3396         REGRESSION: Can't dynamically change popup to list box
3397
3398         The original fix for 9859 was in the renderer, and I think we can catch the change
3399         earlier in the element to detach and reattach.
3400
3401         I also did some cleanup to remove the PopupButton code path from DeprecatedRenderSelect
3402
3403         Test: fast/forms/select-change-listbox-to-popup.html
3404
3405         * html/HTMLSelectElement.cpp:
3406         (WebCore::HTMLSelectElement::parseMappedAttribute): If the new attribute value is going to require us to change from listbox to popup or vice versa,
3407         and we're already attached, then detach and reattach to create the correct renderer.  If we're not attached, then we'll create the correct renderer
3408         when we attach.
3409         (WebCore::HTMLSelectElement::recalcStyle): Updated shouldUseMenuList since it no longer takes a RenderStyle.
3410         (WebCore::HTMLSelectElement::isKeyboardFocusable): ditto.
3411         (WebCore::HTMLSelectElement::isMouseFocusable): ditto.
3412         (WebCore::HTMLSelectElement::createRenderer): ditto.
3413         (WebCore::HTMLSelectElement::setRecalcListItems): ditto.
3414         (WebCore::HTMLSelectElement::reset): ditto.
3415         (WebCore::HTMLSelectElement::notifyOptionSelected): ditto.
3416         (WebCore::HTMLSelectElement::defaultEventHandler): ditto.
3417
3418         * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList):
3419         This method no longer takes a RenderStyle.  That was leftover from when we used to use the appearance
3420         to determine whether or not to use the new menu list implementation.
3421
3422         * rendering/DeprecatedRenderSelect.h: Removed PopupButton code path.
3423         * rendering/DeprecatedRenderSelect.cpp:
3424         (WebCore::DeprecatedRenderSelect::DeprecatedRenderSelect):
3425         (WebCore::DeprecatedRenderSelect::setWidgetWritingDirection):
3426         (WebCore::DeprecatedRenderSelect::updateFromElement):
3427         (WebCore::DeprecatedRenderSelect::baselinePosition):
3428         (WebCore::DeprecatedRenderSelect::layout):
3429         (WebCore::DeprecatedRenderSelect::updateSelection):
3430
3431         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
3432         Backed out previous fix since this is now done in HTMLSelectElement.
3433
3434 2006-07-11  Adele Peterson  <adele@apple.com>
3435
3436         Reviewed by Hyatt.
3437
3438         Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9859
3439         REGRESSION: Can't dynamically change popup to list box
3440
3441         Test: fast/forms/select-change-popup-to-listbox.html
3442
3443         * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::updateFromElement):
3444         If the select element has the multiple property set, or has a size > 1, then it
3445         really should be a list box, so we detach and attach the element so it creates the
3446         correct type of renderer.
3447
3448 2006-07-11  John Sullivan  <sullivan@apple.com>
3449
3450         Reviewed by Beth Dakin and Tim Omernick
3451
3452         - fixed <rdar://problem/4622794> HiDPI: dragging the selection in Safari can show pixel cracks 
3453         at non-integral scale factors
3454
3455         * bridge/mac/FrameMac.mm:
3456         (WebCore::FrameMac::imageFromRect):
3457         round image rect in window coordinate space
3458
3459 2006-07-10  Darin Adler  <darin@apple.com>
3460
3461         Reviewed by Geoff.
3462
3463         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9811
3464           rdar://problem/4619572
3465           OPTION text contained in OPTGROUP appears at the wrong size
3466
3467         * dom/Node.h:
3468         * dom/Node.cpp: (WebCore::Node::renderStyle): Made a const member function.
3469         The derived classes were overriding with const member functions, and I could
3470         change either this or the derived -- decided to do this.
3471
3472 2006-07-10  Darin Adler  <darin@apple.com>
3473
3474         Reviewed by Geoff.
3475
3476         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9810
3477           rdar://problem/4619534
3478           OPTGROUP label text is using the default font instead of Lucida Grande
3479
3480         * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::setFontFromControlSize):
3481         Code wants the family name, but was calling fontName, which is not the same thing.
3482         Also removed the unneeded conversion to DeprecatedString.
3483
3484 === Safari-521.16 ===
3485
3486 2006-07-10  David Kilzer  <ddkilzer@kilzer.net>
3487
3488         Reviewed by Darin.
3489
3490         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
3491           Implement select.options.add() method
3492
3493         Tests:
3494         - fast/dom/select-selectedIndex-multiple.html
3495         - fast/dom/select-selectedIndex.html
3496         - fast/js/select-options-add.html
3497
3498         * DerivedSources.make: Added JSHTMLOptionsCollection.h.
3499         * ForwardingHeaders/kjs/operations.h: Added.
3500         * WebCore.xcodeproj/project.pbxproj: Added new source files.
3501         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Added.
3502         (WebCore::JSHTMLOptionsCollection::length):
3503         (WebCore::JSHTMLOptionsCollection::setLength):
3504         (WebCore::JSHTMLOptionsCollection::indexSetter):
3505         * bindings/js/kjs_html.cpp: Removed JSHTMLOptionsCollection implementation.
3506         Renamed classes and methods for consistency.
3507         (KJS::JSHTMLElement::selectGetter):