b7e037ea1902a45f843152972df7bb3e2f4fd27e
[WebKit.git] / WebCore / ChangeLog
1 2008-03-24  Maciej Stachowiak  <mjs@apple.com>
2
3         Reviewed by Maciej.
4
5         - fixed "SVGTextElement.getStartPositionOfChar does not correctly account for multichar glyphs"
6         http://bugs.webkit.org/show_bug.cgi?id=18046
7
8         * platform/graphics/Font.cpp:
9         (WebCore::Font::floatWidth): Allow expressing a run that has extra "context" characters beyond the end,
10         and reporting of how many characters were actually consumed, to support multichar glyphs in SVG fonts.
11         * platform/graphics/Font.h:
12         * rendering/SVGInlineTextBox.cpp:
13         (WebCore::SVGInlineTextBox::calculateGlyphWidth): Pass along extra chars in argument and chars consumed out
14         argument.
15         (WebCore::SVGInlineTextBox::calculateGlyphHeight): Pass along extra chars in argument.
16         (WebCore::SVGInlineTextBox::calculateGlyphBoundaries): Add boilerplate; may not handle multichar glyphs
17         right but I don't know what effects this would have.
18         * rendering/SVGInlineTextBox.h:
19         * rendering/SVGRootInlineBox.cpp:
20         (WebCore::cummulatedWidthOrHeightOfTextChunk): Add boilerplate; may not handle multichar glyphs right
21         but again I am not sure what effect this would have.
22         (WebCore::SVGRootInlineBox::buildLayoutInformationForTextBox): Account for multichar glyphs - let glyph
23         selection consider extra chars, and account for the fact that a glyph may have consumed multiple chars.
24         * rendering/SVGRootInlineBox.h:
25         * svg/SVGFont.cpp:
26         (WebCore::SVGTextRunWalker::walk): This is the place where glyph selection happens, so this is where
27         we accout for multichar glyphs (both looking at extra chars past the end of the run, and reporting how
28         many chars were consumed).
29         (WebCore::floatWidthOfSubStringUsingSVGFont): Pass aforementioned info through the layers.
30         (WebCore::Font::floatWidthUsingSVGFont): ditto
31         (WebCore::Font::drawTextUsingSVGFont): ditto
32         (WebCore::Font::selectionRectForTextUsingSVGFont): ditto
33         * svg/SVGTextContentElement.cpp:
34         (WebCore::cummulatedCharacterRangeLength): ditto
35         (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback): ditto
36
37 2008-03-25  Beth Dakin  <bdakin@apple.com>
38
39         Reviewed by Oliver.
40
41         Fix for <rdar://problem/5811826> CSSValueList::item() does not 
42         range-check index
43
44         Check bounds before accessing the item to avoid a crash. 
45         itemWithoutBoundsCheck() is still inlined and not bounds-checked to 
46         avoid slowing down our internal callers of item().
47         * css/CSSValueList.cpp:
48         (WebCore::CSSValueList::item):
49         * css/CSSValueList.h:
50         (WebCore::CSSValueList::itemWithoutBoundsCheck):
51
52         Call itemWithoutBoundsCheck() to avoid slowing down these internal 
53         callers.
54         * css/CSSFontSelector.cpp:
55         (WebCore::CSSFontSelector::addFontFaceRule):
56         * css/CSSMutableStyleDeclaration.cpp:
57         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
58         * css/CSSStyleSelector.cpp:
59         (WebCore::applyCounterList):
60         (WebCore::CSSStyleSelector::applyProperty):
61         * css/MediaQueryEvaluator.cpp:
62         (WebCore::parseAspectRatio):
63         * svg/SVGFontFaceElement.cpp:
64         (WebCore::SVGFontFaceElement::rebuildFontFace):
65         * svg/graphics/SVGPaintServer.cpp:
66         (WebCore::dashArrayFromRenderingStyle):
67
68 2008-03-25  Antti Koivisto  <antti@apple.com>
69
70         Reviewed by Oliver.
71
72         Fix http://bugs.webkit.org/show_bug.cgi?id=18082
73         REGRESSION (r31287): GMail does not work if user stylesheet is set
74         
75         Oops, my cache refactoring patch was missing these rather essential lines for
76         user stylesheets. They would get reloaded repeatedly.
77
78         * loader/Cache.cpp:
79         (WebCore::Cache::requestUserCSSStyleSheet):
80
81 2008-03-25  Matt Lilek  <webkit@mattlilek.com>
82
83         Rubber stamped by Adam
84
85         Roll out r31300 since it causes assertion failures on page load.
86         See http://bugs.webkit.org/show_bug.cgi?id=18093
87
88         * page/InspectorController.cpp:
89         (WebCore::InspectorController::didFinishLoading):
90         (WebCore::InspectorController::didFailLoading):
91
92 2008-03-25  Darin Adler  <darin@apple.com>
93
94         Reviewed by Anders.
95
96         - fix http://bugs.webkit.org/show_bug.cgi?id=17252
97           Acid3 test removing Nodes during NodeIterator walk fails (affects Acid3 test 2)
98
99         Test: traversal/acid3-test-2.html
100
101         * bindings/js/JSNodeIteratorCustom.cpp:
102         (WebCore::JSNodeIterator::nextNode): Update since result is PassRefPtr.
103         (WebCore::JSNodeIterator::previousNode): Ditto.
104         * dom/NodeIterator.cpp:
105         (WebCore::NodeIterator::nextNode): Changed result to PassRefPtr. Added code to
106         track both the current candidate (which needs to move along to the next node
107         if current node is deleted) and the current provisional result (passed to acceptNode,
108         and needs to be returned even if it's deleted).
109         (WebCore::NodeIterator::previousNode): Ditto.
110         (WebCore::NodeIterator::nodeWillBeRemoved): Call updateForNodeRemoval for
111         m_candidateNode as well as m_referenceNode.
112         * dom/NodeIterator.h: Use PassRefPtr for return values.
113
114 2008-03-25  Brady Eidson  <beidson@apple.com>
115
116         Reviewed by Anders
117
118         Add the ability to transform a CString into a SharedBuffer to avoid copying data
119         This is valuable to avoid copying a block of data for an upcoming patch
120
121         * platform/SharedBuffer.cpp:
122         (WebCore::SharedBuffer::adoptVector):
123         * platform/SharedBuffer.h:
124
125         * platform/text/CString.cpp:
126         (WebCore::CString::releaseBuffer):
127         * platform/text/CString.h:
128         (WebCore::CStringBuffer::releaseBuffer):
129
130 2008-03-25  Brady Eidson  <beidson@apple.com>
131
132         Attempt to fix .bkl build systems after recent archive additions
133
134         * webcore-base.bkl:
135
136 2008-03-25  Kevin McCullough  <kmccullough@apple.com>
137
138         Reviewed by Adam.
139
140         - Cleaned up the needless use of RefPtrs, which we may someday no longer use for
141         InspectorResources.
142
143         * page/InspectorController.cpp:
144         (WebCore::InspectorController::didFinishLoading):
145         (WebCore::InspectorController::didFailLoading):
146
147 2008-03-25  Kevin McCullough  <kmccullough@apple.com>
148
149         Reviewed by Adam.
150
151         - Added a null check
152
153         * xml/XMLHttpRequest.cpp: Null check
154         (WebCore::XMLHttpRequest::send):
155
156 2008-03-25  Kevin McCullough  <kmccullough@apple.com>
157
158         Reviewed by Tim.
159
160         -<rdar://problem/5712804> XMLHttpRequests do not show response contents, preview images (14313)
161         -<rdar://problem/5712931> XMLHttpRequests should be shown separately and grouped (14315)
162         -<rdar://problem/5732836> XMLHttpRequest: Inspector should show network activity/XHR in Console (17233)
163         - XMLHttpRequestResources now identify themselves to the inspector which caches the data related to
164         the request since no one else caches it.  However this is just the plumbing and the Inspector's UI
165         has not been changed to show XHR resources yet. 
166
167         * page/InspectorController.cpp: Add ability to set XHR data on an InspectorResource.
168         (WebCore::XMLHttpRequestResource::XMLHttpRequestResource):
169         (WebCore::XMLHttpRequestResource::data):
170         (WebCore::XMLHttpRequestResource::encoding):
171         (WebCore::InspectorResource::): Add new type.
172         (WebCore::InspectorResource::~InspectorResource): No longer virtual since we are not using inheritance.
173         (WebCore::InspectorResource::type): Ditto.
174         (WebCore::InspectorResource::setXMLHttpRequestResource):
175         (WebCore::InspectorResource::isXHR):
176         (WebCore::InspectorResource::xmlHttpRequestData):
177         (WebCore::InspectorResource::xmlHttpRequestEncoding):
178         (WebCore::InspectorResource::InspectorResource):
179         (WebCore::addSourceToFrame):
180         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
181         * page/InspectorController.h: Add accessor for setting the XHR data.
182         * page/inspector/Resource.js: Keep the XHR resource types in sync with the Inspector Controller.
183         * xml/XMLHttpRequest.cpp: Give the InspectorController the XHR information to cache.
184         (WebCore::XMLHttpRequest::send):
185
186 2008-03-25  Adam Roben  <aroben@apple.com>
187
188         Add an UnusedParam.h forwarding header for use by testapi
189
190         Reviewed by Steve Falkenburg.
191
192         * ForwardingHeaders/wtf/UnusedParam.h: Added.
193
194 2008-03-25  Brady Eidson  <beidson@apple.com>
195
196         Reviewed by Adam Roben
197
198         <rdar://problem/5819308> - View Source is empty when view webarchives
199
200         * WebCore.base.exp:
201         * loader/DocumentLoader.cpp:
202         (WebCore::DocumentLoader::setParsedArchiveData):
203         (WebCore::DocumentLoader::parsedArchiveData):
204         * loader/DocumentLoader.h:
205
206         * loader/FrameLoader.cpp:
207         (WebCore::FrameLoader::finishedLoadingDocument): Set the archive's MainResource data as the parsedArchiveData
208           in the DocumentLoader
209
210 2008-03-25  Eric Seidel  <eric@webkit.org>
211
212         Reviewed by Oliver.
213
214         Speculative crash fix for Acid3 crasher.
215         I couldn't figure out how to make a test case for this?
216         Suggestions welcome.
217
218         * css/CSSFontSelector.cpp: null check document->renderer()
219
220 2008-03-25  Antti Koivisto  <antti@apple.com>
221
222         Reviewed by Geoff Garen.
223
224         Some memory cache cleanups:
225         - Separate CachedResource loading from construction, initiate load using a separate load() method.
226         - Add special case function to Cache for loading user stylesheets. This allows removal
227           of a bunch of parameters from several methods and CachedResource constructors.
228         - Construct CachedResources with m_inCache set to false which is quite a bit more logical as they
229           are not yet in the cache at that point.
230         - Pass encoding around as const String& instead of const String*.
231
232         * css/CSSImageValue.cpp:
233         (WebCore::CSSImageValue::image):
234         * html/HTMLImageLoader.cpp:
235         (WebCore::HTMLImageLoader::updateFromElement):
236         * loader/Cache.cpp:
237         (WebCore::createResource):
238         (WebCore::Cache::requestResource):
239         (WebCore::Cache::requestUserCSSStyleSheet):
240         (WebCore::Cache::remove):
241         * loader/Cache.h:
242         * loader/CachedCSSStyleSheet.cpp:
243         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
244         * loader/CachedCSSStyleSheet.h:
245         * loader/CachedFont.cpp:
246         (WebCore::CachedFont::CachedFont):
247         (WebCore::CachedFont::load):
248         (WebCore::CachedFont::ref):
249         * loader/CachedFont.h:
250         * loader/CachedImage.cpp:
251         (WebCore::CachedImage::CachedImage):
252         (WebCore::CachedImage::load):
253         * loader/CachedImage.h:
254         * loader/CachedResource.cpp:
255         (WebCore::CachedResource::CachedResource):
256         (WebCore::CachedResource::~CachedResource):
257         (WebCore::CachedResource::load):
258         * loader/CachedResource.h:
259         (WebCore::CachedResource::load):
260         * loader/CachedScript.cpp:
261         (WebCore::CachedScript::CachedScript):
262         * loader/CachedScript.h:
263         * loader/CachedXBLDocument.cpp:
264         (WebCore::CachedXBLDocument::CachedXBLDocument):
265         * loader/CachedXBLDocument.h:
266         * loader/CachedXSLStyleSheet.cpp:
267         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
268         * loader/CachedXSLStyleSheet.h:
269         * loader/DocLoader.cpp:
270         (WebCore::DocLoader::requestImage):
271         (WebCore::DocLoader::requestFont):
272         (WebCore::DocLoader::requestCSSStyleSheet):
273         (WebCore::DocLoader::requestUserCSSStyleSheet):
274         (WebCore::DocLoader::requestScript):
275         (WebCore::DocLoader::requestXSLStyleSheet):
276         (WebCore::DocLoader::requestXBLDocument):
277         (WebCore::DocLoader::requestResource):
278         (WebCore::DocLoader::preload):
279         * loader/DocLoader.h:
280
281 2008-03-25  Darin Adler  <darin@apple.com>
282
283         Reviewed by Anders.
284
285         - avoid converting UString to String and then later to AtomicString
286
287         1% speedup on Acid3 test 26
288
289         This is inefficient for the case where there's already an AtomicString.
290         By first creating and destroying a String we waste time.
291
292         * bindings/scripts/CodeGeneratorJS.pm: Use const UString& for string
293         arguments rather than using String; this uses the object as it's produced
294         from toString rather than creating a new temporary object that might not
295         be of the right type. The type conversion happens at the callsite instead.
296         Also eliminate the ability to use the type AtomicString from IDL.
297
298         * dom/KeyboardEvent.idl: AtomicString -> DOMString.
299         * dom/MouseEvent.idl: Ditto.
300         * dom/MutationEvent.idl: Ditto.
301         * dom/UIEvent.idl: Ditto.
302         * svg/SVGStyleElement.idl: Ditto.
303
304 2008-03-25  Brady Eidson  <beidson@apple.com>
305
306         Build fix for non-CoreFoundation platforms
307
308         * loader/archive/ArchiveFactory.cpp:
309
310 2008-03-25  Brady Eidson  <beidson@apple.com>
311
312         Reviewed by Darin
313
314         Remove newly obsolete FrameLoaderClient methods
315
316         * loader/FrameLoaderClient.h:
317         * svg/graphics/SVGImageEmptyClients.h:
318         (WebCore::SVGEmptyFrameLoaderClient::setMainDocumentError):
319         (WebCore::SVGEmptyFrameLoaderClient::finishedLoading):
320
321 2008-03-25  Brady Eidson  <beidson@apple.com>
322
323         Reviewed by Darin
324
325         <rdar://problem/4516169> - Support WebArchives on Windows
326         And pave the way for many future WebArchive bug fixes and enhancements
327
328         This patch accomplishes two main goals:
329         1 - Consolidates much of the spread out WebKitMac archive code into one place in WebCore.  This allows for cleaner refactoring 
330             in the future as well as adding more archive formats with ease.
331         2 - Hooks up WebArchive support on Windows.  Safari-style .webarchive files are nothing more than property lists readable by
332             CoreFoundation.  While there are still some outstanding issues, including an NSKeyedArchiver chunk of data for the 
333             ResourceResponse for each resource, this patch manually parses through the property list on CoreFoundation platforms and
334             gets many archives loading on Windows
335
336         My goal for this first cut was zero behavior change.  As such, I went for a direct port of the WebKitMac code.  There will be
337         opportunities for redesign and refactoring as followups.
338
339         * WebCore.base.exp:
340
341         * loader/DocumentLoader.cpp:
342         (WebCore::DocumentLoader::setupForReplaceByMIMEType): Ported from WebKitMac, WebDataSource
343         (WebCore::DocumentLoader::addAllArchiveResources):
344         (WebCore::DocumentLoader::addArchiveResource):
345         (WebCore::DocumentLoader::archiveResourceForURL):
346         (WebCore::DocumentLoader::popArchiveForSubframe):
347         (WebCore::DocumentLoader::clearArchiveResources):
348         * loader/DocumentLoader.h:
349
350         * loader/FrameLoader.cpp: Moved WebFrameLoaderClient and WebFrame code down into their more appropriate FrameLoader home
351         (WebCore::FrameLoader::FrameLoader):
352         (WebCore::FrameLoader::setDefersLoading):
353         (WebCore::FrameLoader::deliverArchivedResourcesAfterDelay):
354         (WebCore::FrameLoader::archiveResourceDeliveryTimerFired):
355         (WebCore::FrameLoader::loadURLIntoChildFrame):
356         (WebCore::FrameLoader::loadArchive):
357         (WebCore::FrameLoader::scheduleArchiveLoad):
358         (WebCore::FrameLoader::stopAllLoaders):
359         (WebCore::FrameLoader::cancelPendingArchiveLoad):
360         (WebCore::FrameLoader::isArchiveLoadPending):
361         (WebCore::FrameLoader::finishedLoadingDocument):
362         * loader/FrameLoader.h:
363
364         * loader/ResourceLoader.cpp:
365         (WebCore::ResourceLoader::load):
366
367         * loader/archive/Archive.h: Generic "Archive of web resources" class that is only useful when subclassed.  
368             Contains a MainResource, subresources, and Archives for subframes
369         (WebCore::Archive::mainResource):
370         (WebCore::Archive::subresources):
371         (WebCore::Archive::subframeArchives):
372         (WebCore::Archive::setMainResource):
373         (WebCore::Archive::addSubresource):
374         (WebCore::Archive::addSubframeArchive):
375
376         * loader/archive/ArchiveFactory.cpp: A class that will take raw archive data and the MIMEtype, and create the
377             appropriate Archive class for it.  Additionally it handles registering the known MIMEtypes for all known archive formats
378         (WebCore::archiveFactoryCreate):
379         (WebCore::archiveMIMETypes):
380         (WebCore::ArchiveFactory::isArchiveMimeType):
381         (WebCore::ArchiveFactory::create):
382         (WebCore::ArchiveFactory::registerKnownArchiveMIMETypes):
383         * loader/archive/ArchiveFactory.h:
384
385         * loader/archive/ArchiveResource.cpp: Analog to "WebResource" in WebKitMac.  Contains the data and other important
386             attributes of an archived resource
387         (WebCore::ArchiveResource::create):
388         (WebCore::ArchiveResource::ArchiveResource):
389         (WebCore::ArchiveResource::response):
390         * loader/archive/ArchiveResource.h:
391         (WebCore::ArchiveResource::data):
392         (WebCore::ArchiveResource::url):
393         (WebCore::ArchiveResource::mimeType):
394         (WebCore::ArchiveResource::textEncoding):
395         (WebCore::ArchiveResource::frameName):
396         (WebCore::ArchiveResource::ignoreWhenUnarchiving):
397         (WebCore::ArchiveResource::shouldIgnoreWhenUnarchiving):
398
399         * loader/archive/ArchiveResourceCollection.cpp: Analog of "WebUnarchivingState" in WebKitMac.  Contains a hash of
400             all the resources for every frame in an archive, and contains the archives for each subframe needed to load a multi-frame archive
401         (WebCore::ArchiveResourceCollection::ArchiveResourceCollection):
402         (WebCore::ArchiveResourceCollection::addAllResources):
403         (WebCore::ArchiveResourceCollection::addResource):
404         (WebCore::ArchiveResourceCollection::archiveResourceForURL):
405         (WebCore::ArchiveResourceCollection::popSubframeArchive):
406         * loader/archive/ArchiveResourceCollection.h:
407
408         * loader/archive/cf/LegacyWebArchive.cpp: Subclass of Archive specifically for Webkit's Objective-C based ".webarchive" format.
409             Mostly a collection of static methods involved in parsing and serializing a WebKit-style .webarchive.  Is mostly supported
410             for any CF platform.
411         (WebCore::createPropertyListRepresentationFromResource):
412         (WebCore::createPropertyListRep):
413         (WebCore::createResourceResponseFromPropertyListData):
414         (WebCore::createResource):
415         (WebCore::LegacyWebArchive::create):
416         (WebCore::LegacyWebArchive::LegacyWebArchive):
417         (WebCore::LegacyWebArchive::init):
418         (WebCore::LegacyWebArchive::extract):
419         (WebCore::LegacyWebArchive::rawDataRepresentation):
420         (WebCore::createResourceResponseFromMacArchivedData):
421         (WebCore::propertyListDataFromResourceResponse):
422         * loader/archive/cf/LegacyWebArchive.h:
423         * loader/archive/cf/LegacyWebArchiveMac.mm:
424         (WebCore::createResourceResponseFromMacArchivedData):
425         (WebCore::propertyListDataFromResourceResponse):
426
427         * platform/network/mac/ResourceRequest.h:
428         * platform/network/mac/ResourceRequestMac.mm:
429         (WebCore::ResourceRequest::applyWebArchiveHackForMail): Tweak the resource request for Mac clients when loading WebArchives
430
431 2008-03-25  David Hyatt  <hyatt@apple.com>
432
433         Cut and paste error in the zoom code.  A width() should have been a height().  Regression tests caught this.
434
435         * page/DOMWindow.cpp:
436         (WebCore::DOMWindow::innerHeight):
437
438 2008-03-24  Darin Adler  <darin@apple.com>
439
440         - try to fix broken Wx build
441
442         * platform/wx/TemporaryLinkStubs.cpp:
443         (GraphicsContext::setPlatformShadow):
444         (GraphicsContext::clearPlatformShadow):
445
446 2008-03-24  Darin Adler  <darin@apple.com>
447
448         Reviewed by Sam.
449
450         - use AtomicString more consistently for attribute values
451
452         1% speedup on Acid3 test 26
453
454         * dom/Element.cpp:
455         (WebCore::Element::setAttribute): Changed value argument to AtomicString.
456         Also fixed call to lower() to only be done if the name isn't already lowercase.
457         Also took out one unneeded condition in a cascade of if statements.
458         (WebCore::Element::createAttribute): Ditto.
459         (WebCore::Element::setAttributeNS): Ditto.
460         * dom/Element.h: Ditto.
461         * dom/StyledElement.cpp:
462         (WebCore::StyledElement::createAttribute): Ditto.
463         * dom/StyledElement.h: Ditto.
464
465 2008-03-24  Darin Adler  <darin@apple.com>
466
467         Reviewed by Sam.
468
469         - get rid of extra level of function call in toJS functions for Node
470
471         0.6% speedup on Acid3 test 26
472
473         * bindings/js/JSNodeCustom.cpp:
474         (WebCore::toJS): Take a raw pointer, not a PassRefPtr, like other toJS functions.
475
476         * bindings/scripts/CodeGeneratorJS.pm: Add an inlined toJS for EventTargetNode*
477         to avoid ambiguity that otherwise exists between the toJS for EventTarget* and
478         for Node*.
479
480 2008-03-24  Darin Adler  <darin@apple.com>
481
482         Reviewed by Hyatt.
483
484         - add fast path to isValidName that does not use advanced Unicode functions
485
486         2% speedup on Acid3 test 26
487
488         * dom/Document.cpp:
489         (WebCore::isValidNameNonASCII): Added. Contains the old isValidName function.
490         (WebCore::isValidNameASCII): Added. Contains a simpler function that returns
491         true for most valid names that are also all ASCII.
492         (WebCore::Document::isValidName): Changed to call both of the above functions.
493         The common case is that isValidNameASCII returns true so isValidNameNonASCII
494         is never called.
495
496 2008-03-24  David Hyatt  <hyatt@apple.com>
497
498         Fix for bug 18052, window properties need to respect zoom factor.
499
500         Reviewed by Beth
501
502         * page/DOMWindow.cpp:
503         (WebCore::DOMWindow::innerHeight):
504         (WebCore::DOMWindow::innerWidth):
505         (WebCore::DOMWindow::scrollX):
506         (WebCore::DOMWindow::scrollY):
507         (WebCore::DOMWindow::scrollTo):
508         * page/FrameView.cpp:
509         (WebCore::FrameViewPrivate::reset):
510         (WebCore::FrameView::layout):
511         (WebCore::FrameView::performPostLayoutTasks):
512
513 2008-03-24  Sam Weinig  <sam@webkit.org>
514
515         Reviewed by Darin Adler.
516
517         Fix http://bugs.webkit.org/show_bug.cgi?id=18048
518         The "thisObject" parameter to JSEvaluateScript is not used properly
519
520         * bindings/js/kjs_proxy.cpp:
521         (WebCore::KJSProxy::evaluate): No need to pass a thisObject since we want the global object to be used.
522         * bridge/jni/jni_jsobject.mm:
523         (JavaJSObject::eval): To avoid any change to this function, don't pass a thisObject to keep the same
524         behavior.
525
526 2008-03-24  Brady Eidson  <beidson@apple.com>
527
528         Reviewed by Darin's rubberstamp
529
530         Land a load of empty files for upcoming work to make sure I'm not breaking any platform's build
531
532         * GNUmakefile.am:
533         * WebCore.pro:
534         * WebCore.vcproj/WebCore.vcproj:
535         * WebCore.xcodeproj/project.pbxproj:
536         * WebCoreSources.bkl:
537         * loader/archive: Added.
538         * loader/archive/Archive.h: Added.
539         * loader/archive/ArchiveFactory.cpp: Added.
540         * loader/archive/ArchiveFactory.h: Added.
541         * loader/archive/ArchiveResource.cpp: Added.
542         * loader/archive/ArchiveResource.h: Added.
543         * loader/archive/ArchiveResourceCollection.cpp: Added.
544         * loader/archive/ArchiveResourceCollection.h: Added.
545         * loader/archive/cf: Added.
546         * loader/archive/cf/LegacyWebArchive.cpp: Added.
547         * loader/archive/cf/LegacyWebArchive.h: Added.
548         * loader/archive/cf/LegacyWebArchiveMac.mm: Added.
549
550 2008-03-24  David Hyatt  <hyatt@apple.com>
551
552         Fix for bug 18009. Make sure the IE offset/client/scroll*** extensions respect full page zoom.
553
554         Reviewed by Beth
555
556         * dom/Element.cpp:
557         (WebCore::localZoomForRenderer):
558         (WebCore::adjustForLocalZoom):
559         (WebCore::adjustForAbsoluteZoom):
560         (WebCore::Element::offsetLeft):
561         (WebCore::Element::offsetTop):
562         (WebCore::Element::offsetWidth):
563         (WebCore::Element::offsetHeight):
564         (WebCore::Element::clientLeft):
565         (WebCore::Element::clientTop):
566         (WebCore::Element::clientWidth):
567         (WebCore::Element::clientHeight):
568         (WebCore::Element::scrollLeft):
569         (WebCore::Element::scrollTop):
570         (WebCore::Element::setScrollLeft):
571         (WebCore::Element::setScrollTop):
572         (WebCore::Element::scrollWidth):
573         (WebCore::Element::scrollHeight):
574         * rendering/RenderBox.cpp:
575         (WebCore::RenderBox::setStyle):
576         * rendering/RenderObject.cpp:
577         (WebCore::RenderObject::offsetParent):
578         * rendering/RenderObject.h:
579
580 2008-03-24  Brady Eidson  <beidson@apple.com>
581
582         Reviewed by Darin
583
584         Some style cleanup and add a logging channel for upcoming work
585
586         * platform/Logging.cpp:
587         * platform/Logging.h:
588
589         * platform/MIMETypeRegistry.cpp:
590         (WebCore::initializeSupportedImageMIMETypes):
591         (WebCore::initializeSupportedNonImageMimeTypes):
592
593 2008-03-24  Dan Bernstein  <mitz@apple.com>
594
595         Reviewed by Sam Weinig.
596
597         - fix <rdar://problem/5812292> CrashTracer: [REGRESSION] 60 crashes in Safari at com.apple.WebCore: WebCore::RenderObject::repaintRectangle + 47
598
599         Test: fast/repaint/renderer-destruction-by-invalidateSelection-crash.html
600
601         * page/FrameView.cpp:
602         (WebCore::FrameViewPrivate::reset): Removed repaintRects code.
603         (WebCore::FrameView::layout): Ditto.
604         (WebCore::FrameView::addRepaintInfo): Removed.
605
606         * page/FrameView.h: Removed addRepaintInfo().
607
608         * rendering/RenderBlock.cpp:
609         (WebCore::RenderBlock::layoutBlock): Changed to call repaintRectangle
610         instead of FrameView::addRepaintInfo().
611         * rendering/RenderTable.cpp:
612         (WebCore::RenderTable::layout): Ditto.
613
614 2008-03-24  Alp Toker  <alp@atoker.com>
615
616         GTK+/soup http backend build fix for breakage introduced in r31141.
617         Fix suggested by Xan.
618
619         * platform/network/ResourceHandle.h:
620
621 2008-03-24  Dan Bernstein  <mitz@apple.com>
622
623         Reviewed by Sam Weinig.
624
625         - fix <rdar://problem/5792582> CSS opacity does not work with GDI text
626         - fix <rdar://problem/5792619> non-opaque CSS colors do not work with GDI text (RGBA, HSLA)
627         - fix <rdar://problem/5792624> GDI text can't be stroked/filled independently
628         - make text-shadow work with GDI text
629         - make -webkit-background-clip: text work with GDI text
630
631         * platform/graphics/GraphicsContext.cpp:
632         (WebCore::GraphicsContext::setShadow): Made this a shared method that
633         updates the state and calls the platform-specific method.
634         (WebCore::GraphicsContext::clearShadow): Ditto.
635         (WebCore::GraphicsContext::getShadow): Added.
636
637         * platform/graphics/GraphicsContext.h:
638         (WebCore::GraphicsContext::WindowsBitmap): Added this class that
639         represents a bitmap with a Windows device context that GDI can draw into.
640
641         * platform/graphics/GraphicsContextPrivate.h:
642         (WebCore::GraphicsContextState::GraphicsContextState): Added the shadow
643         parameters to the graphics state.
644
645         * platform/graphics/cairo/GraphicsContextCairo.cpp:
646         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
647         specific implementation to this.
648         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
649         specific implementation to this.
650
651         * platform/graphics/cg/GraphicsContextCG.cpp:
652         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
653         specific implementation to this.
654         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
655         specific implementation to this.
656
657         * platform/graphics/qt/GraphicsContextQt.cpp:
658         (WebCore::GraphicsContext::setPlatformShadow): Renamed the platform-
659         specific implementation to this.
660         (WebCore::GraphicsContext::clearPlatformShadow): Renamed the platform-
661         specific implementation to this.
662
663         * platform/graphics/win/FontCGWin.cpp:
664         (WebCore::toCGFloat): Added. Converts a Windows FIXED.
665         (WebCore::createPathForGlyph): Added. Retrieves a glyph's hinted
666         outline from GDI and creates a CGPath containing it.
667         (WebCore::Font::drawGlyphs): Added two code paths in the GDI case.
668         The existing code path, which uses GDI to draw text directly to the
669         graphics context, is used for opaque-colored, non-transformed,
670         non-stroked, non-shadowed text in a GDI-backed graphics context that is
671         not in a transparency layer.
672         An additional code path is used for non-stroked text in all other cases.
673         It uses GDI to draw black text into an all-white Windows bitmap, then
674         uses the green channel as a mask to create a bitmap with the desired
675         fill color and alpha. The bitmap is then drawn into the graphics
676         context, at which time transparency layers, transforms and shadows are
677         handled properly.
678         A third code path is used for stroked text. It constructs a path from
679         hinted glyph outlines retrieved from GDI and strokes (and optionally
680         fills) it.
681
682         * platform/graphics/win/GraphicsContextCGWin.cpp:
683         (WebCore::GraphicsContext::getWindowsContext): Added a mayCreateBitmap
684         parameter. When false, prevents this method from creating a Windows
685         device context if the graphics context does not already have one.
686         (WebCore::GraphicsContext::releaseWindowsContext): Added a
687         mayCreateBitmap parameter to match getWindowsContext().
688         (WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap):
689         (WebCore::GraphicsContext::WindowsBitmap::~WindowsBitmap):
690         (WebCore::GraphicsContext::createWindowsBitmap): Added.
691         (WebCore::GraphicsContext::drawWindowsBitmap): Added. Draws the bitmap
692         as a non-alpha-premultiplied image.
693
694 2008-03-24  Kevin McCullough <kmccullough@apple.com>
695
696           - Fixed Changelog
697
698 2008-03-24  Marco Barisione  <marco.barisione@collabora.co.uk>
699
700         Reviewed by Alp Toker.
701
702         http://bugs.webkit.org/show_bug.cgi?id=17845
703         [GTK] combo box menu displayed in the wrong position
704
705         * platform/gtk/PopupMenuGtk.cpp:
706         (WebCore::PopupMenu::show): Change the popup menu vertical position so
707         that the active item is over the combo box.
708         (WebCore::PopupMenu::menuPositionFunction): use the "push in" style
709         like native GTK+ combo boxes to handle menus that don't fit in the
710         screen.
711
712 2008-03-24  Adam Roben  <aroben@apple.com>
713
714         * WebCore.vcproj/WebCore.vcproj: Add files from WebCore/page/inspector
715         to the project.
716
717 2008-03-24  Alexey Proskuryakov  <ap@webkit.org>
718
719         Build fix.
720
721         * WebCore.xcodeproj/project.pbxproj: Added DOMSVGAltGlyphElement.h and
722         DOMSVGAltGlyphElementInternal.h to Copy Generated Headers phase.
723
724 2008-03-24  Eric Seidel  <eric@webkit.org>
725
726         Build fix, no review.
727
728         Fix project paths to be group relative instead of project relative
729
730         * WebCore.xcodeproj/project.pbxproj:
731
732 2008-03-23  Maciej Stachowiak  <mjs@apple.com>
733
734         Reviewed by Eric.
735
736         - fixed "SVGTextElement.getNumberOfChars is broken for altGlyph (affects Acid3 test 79)"
737         http://bugs.webkit.org/show_bug.cgi?id=17062
738
739         * svg/SVGAltGlyphElement.cpp: Added. Implementation for new element.
740         (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
741         (WebCore::SVGAltGlyphElement::~SVGAltGlyphElement):
742         (WebCore::SVGAltGlyphElement::setGlyphRef):
743         (WebCore::SVGAltGlyphElement::glyphRef):
744         (WebCore::SVGAltGlyphElement::setFormat):
745         (WebCore::SVGAltGlyphElement::format):
746         (WebCore::SVGAltGlyphElement::childShouldCreateRenderer):
747         (WebCore::SVGAltGlyphElement::createRenderer): For now, this just renders as a tspan,
748         which is right for everything besides the alternate glyph substitution itself.
749         * svg/SVGAltGlyphElement.h: Added. Header for new element.
750         (WebCore::SVGAltGlyphElement::contextElement):
751         * svg/SVGAltGlyphElement.idl: Added. Interface for new element.
752         * svg/SVGTSpanElement.cpp:
753         (WebCore::SVGTSpanElement::childShouldCreateRenderer): Allow altGlyph to render here.
754         * svg/SVGTextElement.cpp:
755         (WebCore::SVGTextElement::childShouldCreateRenderer): ditto
756         * svg/SVGTextPathElement.cpp:
757         (WebCore::SVGTextPathElement::childShouldCreateRenderer): ditto
758         * svg/svgtags.in: Add altGlyph
759         * DerivedSources.make: Add new files
760         * GNUmakefile.am: ditto
761         * WebCore.SVG.exp: Add new ObjC DOM class
762         * WebCore.pro: Add new files
763         * WebCore.vcproj/WebCore.vcproj: ditto
764         * WebCore.xcodeproj/project.pbxproj: ditto
765         * bindings/js/JSSVGElementWrapperFactory.cpp: Handle altGlyph
766         * bindings/objc/DOM.mm:
767         (WebCore::createElementClassMap): ditto
768         * bindings/objc/DOMInternal.h: Include altGlyph header
769         * bindings/objc/DOMSVG.h: Include altGlyph header
770
771 2008-03-23  Robert Blaut  <webkit@blaut.biz>
772
773         Reviewed by eseidel.  Landed by eseidel.
774
775         Bug 17685: [~=] attribute selector failing to match empty string
776         <http://bugs.webkit.org/show_bug.cgi?id=17685>
777
778         Test: fast/css/attribute-selector-empty-value.html
779
780         * css/CSSStyleSelector.cpp:
781         (WebCore::CSSStyleSelector::checkOneSelector):
782
783 2008-03-22  Marco Barisione  <marco.barisione@collabora.co.uk>
784
785         Reviewed by Darin Adler.
786
787         http://bugs.webkit.org/show_bug.cgi?id=16339
788         Frame scrollbar positions are not updated on page scroll
789
790         Widget::geometryChanged() was called instead of
791         ScrollViewScrollbar::geometryChanged() because of a missing const.
792
793         * platform/gtk/ScrollViewGtk.cpp:
794         (WebCore::ScrollViewScrollbar::geometryChanged): add the missing
795         const.
796
797 2008-03-22  Rodney Dawes  <dobey@wayofthemonkey.com>
798
799         Reviewed by Mark Rowe.
800
801         Bug 17974: REGRESSION: npfunctions.h should not import npruntime_internal.h
802         <http://bugs.webkit.org/show_bug.cgi?id=17974>
803         <rdar://problem/5782310>
804
805         Include npapi.h and npruntime.h directly in npfunctions.h.
806         Add npfunctions.h and npapi.h to npruntime_internal.h.
807         Replace includes of npfunctions.h with npruntime_internal.h.
808
809         * bridge/npruntime_internal.h:
810         * plugins/PluginPackage.h:
811         * plugins/PluginStream.h:
812         * plugins/npapi.cpp:
813         * plugins/npfunctions.h:
814
815 2008-03-22  Mark Rowe  <mrowe@apple.com>
816
817         Qt build fix.
818
819         * bridge/qt/qt_runtime.cpp:
820         (KJS::Bindings::valueRealType):
821
822 2008-03-22  Eric Seidel  <eric@webkit.org>
823
824         Reviewed by mjs.
825
826         Unify handling of NAMESPACE_ERR and fix Acid3 test 25
827         http://bugs.webkit.org/show_bug.cgi?id=16693
828
829         Test: fast/dom/DOMImplementation/createDocumentType-err.html
830
831         * dom/DOMImplementation.cpp:
832         (WebCore::DOMImplementation::createDocumentType):
833         (WebCore::DOMImplementation::createDocument):
834         * dom/DOMImplementation.idl:
835         * dom/Document.cpp:
836         (WebCore::Document::hasPrefixNamespaceMismatch):
837         (WebCore::Document::createElementNS):
838         (WebCore::Document::parseQualifiedName):
839         (WebCore::Document::createAttributeNS):
840         * dom/Document.h:
841         * dom/Element.cpp:
842         (WebCore::Element::setAttributeNS):
843         * editing/FormatBlockCommand.cpp:
844         (WebCore::FormatBlockCommand::doApply):
845
846 2008-03-22  Eric Seidel  <eric@webkit.org>
847
848         Reviewed by mjs.
849
850         Fix createElementNS to throw exceptions for invalid qualified names
851         Fixes Acid3 sub-test 23
852         http://bugs.webkit.org/show_bug.cgi?id=16833
853
854         Tests: fast/dom/Document/createAttributeNS-namespace-err.html
855                fast/dom/Document/createElementNS-namespace-err.html
856
857         * dom/Document.cpp:
858         (WebCore::Document::createElement):
859         (WebCore::hasNamespaceError):
860         (WebCore::Document::createElementNS):
861         (WebCore::Document::createAttributeNS):
862         * dom/Document.idl:
863
864 2008-03-21  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
865
866         Reviewed by Oliver Hunt.
867
868         Bug 13693: REGRESSION (r13615): Acid2 Test Eyes render improperly after a page refresh
869         <http://bugs.webkit.org/show_bug.cgi?id=13693>
870
871         Do not create bogus history items for unloaded <object> elements, because they
872         cause fallback content to be ignored on reload.
873
874         * loader/FrameLoader.cpp:
875         (WebCore::FrameLoader::createHistoryItemTree):
876
877 2008-03-21  Dan Bernstein  <mitz@apple.com>
878
879         Reviewed by Oliver Hunt.
880
881         - fix http://bugs.webkit.org/show_bug.cgi?id=17988
882           REGRESSION (r31114-31132): Crash in InlineBox::isDirty() opening chowhound.com
883
884         Test: fast/css-generated-content/empty-content-with-float-crash.html
885
886         * rendering/bidi.cpp:
887         (WebCore::RenderBlock::layoutInlineChildren): Added a null check for
888         the case where the block contains no in-flow elements but still lays
889         out as a line flow, which can happen as a result of empty generated
890         content.
891
892 2008-03-21  Sam Weinig  <sam@webkit.org>
893
894         Reviewed by Oliver Hunt.
895
896         Fix <rdar://problem/5788451>
897         toDataURL not implemented for Windows (need mapping of MIME type to UTI)
898
899         Hard code support for just PNG's on windows, the minimum the spec requires.
900
901         * platform/MIMETypeRegistry.cpp:
902         (WebCore::initializeSupportedImageMIMETypesForEncoding):
903         * platform/graphics/cg/ImageBufferCG.cpp:
904         (WebCore::utiFromMIMEType):
905         (WebCore::ImageBuffer::toDataURL):
906
907 2008-03-21  Matt Lilek  <webkit@mattlilek.com>
908
909         Not reviewed, Mac build fix.
910
911         * bindings/objc/WebScriptObject.mm:
912         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
913         * bridge/jni/jni_utility.cpp:
914         (KJS::Bindings::convertValueToJValue):
915         * bridge/objc/objc_runtime.mm:
916         (ObjcFallbackObjectImp::callAsFunction):
917
918 2008-03-21  Adam Roben  <aroben@apple.com>
919
920         Attempt to fix the Mac build
921
922         * bindings/objc/DOMUtility.mm:
923         (KJS::createDOMWrapper):
924
925 2008-03-21  Adam Roben  <aroben@apple.com>
926
927         Rename static info members to s_info
928
929         This avoids conflicts with custom "info" methods, such as the one that
930         will soon be added to Console.
931
932         Reviewed by Ada Chan and Sam Weinig.
933
934 2008-03-21  David Hyatt  <hyatt@apple.com>
935
936         <rdar://problem/5808863> Zooming should not let non-zero border width become zero
937
938         Make sure zoomed values that begin >= 1 are not allowed to fall below 1.
939
940         Reviewed by adele
941
942         * css/CSSPrimitiveValue.cpp:
943         (WebCore::CSSPrimitiveValue::computeLengthDouble):
944         * loader/CachedImage.cpp:
945         (WebCore::CachedImage::imageSize):
946         (WebCore::CachedImage::imageRect):
947
948 2008-03-21  Kevin McCullough  <kmccullough@apple.com>
949
950         Reviewed by Sam.
951
952         -<rdar://problem/5712804> XMLHttpRequests do not show response contents, preview images (14313)
953         -<rdar://problem/5712931> XMLHttpRequests should be shown separately and grouped (14315)
954         -<rdar://problem/5732836> XMLHttpRequest: Inspector should show network activity/XHR in Console (17233)
955         - Instrument the InspectorController to cache XHR resrouces since they are not cached by WebCore.
956         The resources will be kept in the same map as all other resources so they will have the exact
957         same lifecycle. 
958
959         * ChangeLog:
960         * page/InspectorController.cpp:
961         (WebCore::InspectorCachedXMLHttpRequestResource::type):
962         (WebCore::InspectorCachedXMLHttpRequestResource::setType):
963         (WebCore::InspectorCachedXMLHttpRequestResource::data):
964         (WebCore::InspectorCachedXMLHttpRequestResource::setData):
965         (WebCore::InspectorCachedXMLHttpRequestResource::encoding):
966         (WebCore::InspectorCachedXMLHttpRequestResource::setEncoding):
967         (WebCore::InspectorCachedXMLHttpRequestResource::create):
968         (WebCore::InspectorCachedXMLHttpRequestResource::InspectorCachedXMLHttpRequestResource):
969
970 2008-03-21  Rodney Dawes  <dobey@wayofthemonkey.com>
971
972         Reviewed by Holger.
973
974         http://bugs.webkit.org/show_bug.cgi?id=17981
975
976         Remove WebCore/ForwardingHeaders from cppflags as it is not needed,
977         and causes build problems with GTK+.
978
979         * GNUmakefile.am:
980
981 2008-03-21  Dan Bernstein  <mitz@apple.com>
982
983         Reviewed by Adele Peterson.
984
985         - fix http://bugs.webkit.org/show_bug.cgi?id=17966
986           REGRESSION (r31114-r31132): Clearing via br behaves unpredictably
987
988         Test: fast/block/float/br-with-clear.html
989
990         * rendering/bidi.cpp:
991         (WebCore::RenderBlock::layoutInlineChildren): Fixed the logic for the
992         very special case of an all-lines-clean block that ends with a float-
993         clearing <br> by looking for the <br> at the end of the line rather
994         than at its beginning.
995
996 2008-03-21  Adam Roben  <aroben@apple.com>
997
998         Don't allow any newly-scheduled plugin requests to be serviced when JS is paused
999
1000         This is a followup to r31199.
1001
1002         Reviewed by Tim Hatcher.
1003
1004         * plugins/PluginView.cpp:
1005         (WebCore::PluginView::requestTimerFired): Added an assertion that JS
1006         is not paused.
1007         (WebCore::PluginView::scheduleRequest): Don't start the request timer
1008         if JS is paused. This is the bug fix.
1009         (WebCore::PluginView::setJavaScriptPaused): Replaced the use of
1010         m_requestTimerWasActive with a check to see if we have any pending
1011         requests. m_requestTimerWasActive would not be accurate if a new
1012         request had been scheduled while JS was paused.
1013         (WebCore::PluginView::PluginView): Removed initialization of
1014         m_requestTimerWasActive.
1015         * plugins/PluginView.h: Removed m_requestTimerWasActive.
1016
1017 2008-03-20  Dan Bernstein  <mitz@apple.com>
1018
1019         Reviewed by Anders Carlsson.
1020
1021         - fix an assertion failure due to a line being marked dirty during
1022           computeVerticalPositionsForLine() due to temporary box destruction
1023
1024         Test: fast/inline/clean-after-removing-temp-boxes.html
1025
1026         * rendering/RenderText.cpp:
1027         (WebCore::RenderText::setTextWithOffset): Added code to dirty lines
1028         when this method is called on an empty text node, which has no line
1029         boxes.
1030         * rendering/bidi.cpp:
1031         (WebCore::RenderBlock::computeVerticalPositionsForLine): Mark the line
1032         clean in the end.
1033
1034 2008-03-20  Anders Carlsson  <andersca@apple.com>
1035
1036         Reviewed by Maciej.
1037
1038         Make some member variables private.
1039         
1040         * loader/ResourceLoader.cpp:
1041         (WebCore::ResourceLoader::ResourceLoader):
1042         * loader/ResourceLoader.h:
1043
1044 2008-03-20  Anders Carlsson  <andersca@apple.com>
1045
1046         Reviewed by Maciej.
1047
1048         Get rid of m_originalURL in ResourceLoader.
1049
1050         * loader/ResourceLoader.cpp:
1051         (WebCore::ResourceLoader::load):
1052         Don't store m_originalURL.
1053         
1054         * loader/ResourceLoader.h:
1055         * loader/SubresourceLoader.cpp:
1056         (WebCore::SubresourceLoader::willSendRequest):
1057         Use the url of the current request instead of the original URL.
1058
1059 2008-03-20  Anders Carlsson  <andersca@apple.com>
1060
1061         Reviewed by Maciej.
1062
1063         Small loader cleanups.
1064         
1065         * loader/MainResourceLoader.cpp:
1066         (WebCore::MainResourceLoader::willSendRequest):
1067         No need to call setRequest here, ResourceLoader::willSendRequest takes care of that. 
1068         Also, there is no need to check that newRequest is null here, because we assert earlier that it is not.
1069         
1070         * loader/ResourceLoader.h:
1071         Get rid of setRequest, it is no longer needed.
1072
1073 2008-03-20  Anders Carlsson  <andersca@apple.com>
1074
1075         Get rid of a couple of unnecessary class declarations.
1076         
1077         * loader/SubresourceLoader.h:
1078
1079 2008-03-20  David Hyatt  <hyatt@apple.com>
1080
1081         Add a new value to background-clip, "text", that allows backgrounds to be clipped to foreground text (and
1082         associated text decorations like shadows and underlines).
1083
1084         Reviewed by Beth
1085
1086         * css/CSSParser.cpp:
1087         (WebCore::CSSParser::parseBackgroundProperty):
1088         * css/CSSPrimitiveValueMappings.h:
1089         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1090         (WebCore::CSSPrimitiveValue::operator EBackgroundBox):
1091         * platform/graphics/GraphicsContext.cpp:
1092         (WebCore::GraphicsContext::clipToImageBuffer):
1093         * platform/graphics/GraphicsContext.h:
1094         * platform/graphics/cg/GraphicsContextCG.cpp:
1095         (WebCore::GraphicsContext::clipToImageBuffer):
1096         * rendering/InlineBox.cpp:
1097         (WebCore::InlineBox::paint):
1098         * rendering/InlineFlowBox.cpp:
1099         (WebCore::InlineFlowBox::paintBackgrounds):
1100         (WebCore::InlineFlowBox::paintBackground):
1101         (WebCore::InlineFlowBox::paintBoxDecorations):
1102         * rendering/InlineFlowBox.h:
1103         * rendering/InlineTextBox.cpp:
1104         (WebCore::InlineTextBox::paint):
1105         * rendering/RenderBlock.cpp:
1106         (WebCore::RenderBlock::paintColumns):
1107         (WebCore::RenderBlock::paintObject):
1108         (WebCore::RenderBlock::paintFloats):
1109         * rendering/RenderBlock.h:
1110         * rendering/RenderBox.cpp:
1111         (WebCore::RenderBox::paintRootBoxDecorations):
1112         (WebCore::RenderBox::paintBoxDecorations):
1113         (WebCore::RenderBox::paintBackgrounds):
1114         (WebCore::RenderBox::paintBackground):
1115         (WebCore::RenderBox::paintBackgroundExtended):
1116         * rendering/RenderBox.h:
1117         * rendering/RenderFieldset.cpp:
1118         (WebCore::RenderFieldset::paintBoxDecorations):
1119         * rendering/RenderFlow.cpp:
1120         (WebCore::RenderFlow::paintLines):
1121         * rendering/RenderObject.h:
1122         (WebCore::):
1123         (WebCore::RenderObject::paintBackgroundExtended):
1124         * rendering/RenderStyle.h:
1125         (WebCore::):
1126         * rendering/RenderTable.cpp:
1127         (WebCore::RenderTable::paintBoxDecorations):
1128         * rendering/RenderTableCell.cpp:
1129         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
1130
1131 2008-03-20  Adam Roben  <aroben@apple.com>
1132
1133         Allow pausing/blocking of JS execution by plugins
1134
1135         Part of Bug 17133: Should support pausing JavaScript execution without
1136         hanging the process
1137
1138         <http://bugs.webkit.org/show_bug.cgi?id=17133>
1139         <rdar://problem/5719551>
1140
1141         This patch doesn't affect Mac, which doesn't use the shared PluginView
1142         code.
1143
1144         Note that this patch doesn't prevent plugins from executing JS via an
1145         NPObject they've already gotten hold of. It just blocks obtaining new
1146         NPObjects and pauses any requests to evaluate javascript: URIs. This
1147         is probably good enough for now because most plugins seem to always
1148         obtain the Window object each time they want to execute JS.
1149
1150         Reviewed by Tim Hatcher.
1151
1152         * plugins/PluginView.cpp:
1153         (WebCore::PluginView::getValue): Return an error if JS is paused.
1154         (WebCore::PluginView::setJavaScriptPaused): Stop the request timer if
1155         we're pausing, and resume it if we're unpausing.
1156         (WebCore::PluginView::PluginView): Initialize new members.
1157         * plugins/PluginView.h:
1158
1159 2008-03-20  Adam Roben  <aroben@apple.com>
1160
1161         Allow pausing of callOnMainThread callbacks
1162
1163         Part of Bug 17133: Should support pausing JavaScript execution without
1164         hanging the process
1165
1166         <http://bugs.webkit.org/show_bug.cgi?id=17133>
1167         <rdar://problem/5719551>
1168
1169         Reviewed by Tim Hatcher.
1170
1171         * platform/MainThread.cpp:
1172         (WebCore::dispatchFunctionsFromMainThread): If callbacks are paused,
1173         don't dispatch the functions.
1174         (WebCore::setMainThreadCallbacksPaused): Added. If we're being
1175         unpaused, call scheduleDispatchFunctionsOnMainThread so that any
1176         queued callbacks will get dispatched in the near future.
1177         * platform/MainThread.h:
1178
1179 2008-03-20  Adam Roben  <aroben@apple.com>
1180
1181         Allow blocking of JS event handlers/javascript: URIs per-Frame
1182
1183         Part of Bug 17133: Should support pausing JavaScript execution without
1184         hanging the process
1185
1186         <http://bugs.webkit.org/show_bug.cgi?id=17133>
1187         <rdar://problem/5719551>
1188
1189         Two new methods are added to KJSProxy: setPaused and isPaused. When
1190         setPaused(true) is called, JS event handlers are blocked and
1191         javascript: URIs will not be evaluated.
1192
1193         Reviewed by Tim Hatcher.
1194
1195         * bindings/js/kjs_events.cpp:
1196         (WebCore::JSAbstractEventListener::handleEvent):
1197           - Removed some old KJS_DEBUGGER code
1198           - Don't run the handler if the KJSProxy is paused.
1199         * bindings/js/kjs_proxy.cpp:
1200         (WebCore::KJSProxy::KJSProxy): Initialize new member.
1201         * bindings/js/kjs_proxy.h: Added new methods.
1202         * loader/FrameLoader.cpp:
1203         (WebCore::FrameLoader::executeScript): Don't execute the script if the
1204         KJSProxy is paused.
1205
1206 2008-03-20  Jon Honeycutt  <jhoneycutt@apple.com>
1207
1208         Reviewed by Anders.
1209
1210         Fix Windows warning / leak: warning C4150: deletion of pointer to
1211         incomplete type 'WebCore::PluginRequest'; no destructor called
1212
1213         * plugins/PluginView.cpp: Move PluginRequest class to PluginView.h so
1214         Windows PluginView destructor can use WTF::deleteAllValues to clean up
1215         m_requests.
1216         * plugins/PluginView.h:
1217         (WebCore::PluginRequest::PluginRequest):
1218         (WebCore::PluginRequest::frameLoadRequest):
1219         (WebCore::PluginRequest::notifyData):
1220         (WebCore::PluginRequest::sendNotification):
1221         (WebCore::PluginRequest::shouldAllowPopups):
1222
1223 2008-03-20  Mark Rowe  <mrowe@apple.com>
1224
1225         Reviewed by Sam Weinig.
1226
1227         Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit.
1228         This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the
1229         command-line.
1230
1231         * Configurations/WebCore.xcconfig:
1232
1233 2008-03-20  Jon Honeycutt  <jhoneycutt@apple.com>
1234
1235         Reviewed by Anders.
1236
1237         <rdar://problem/5809600> REGRESSION:
1238         http/tests/plugins/cross-frame-object-access.html hangs Windows Layout
1239         Tests
1240
1241         r30897 changed the way we conditionalize this feature.
1242
1243         * plugins/PluginView.cpp:
1244         (WebCore::PluginView::getValue): Test ENABLE(NETSCAPE_PLUGIN_API)
1245         instead of USE(NPOBJECT).
1246         (WebCore::PluginView::bindingInstance): Same.
1247
1248 2008-03-20  Adam Roben  <aroben@apple.com>
1249
1250         Highlight nodes when you hover over them in the Console
1251
1252         Part of Bug 16532: Inspector should highlight nodes in page when
1253         hovering over nodes in Inspector's interface
1254
1255         <http://bugs.webkit.org/show_bug.cgi?id=16532>
1256         <rdar://problem/5712896>
1257
1258         Reviewed by Tim Hatcher.
1259
1260         * page/inspector/ConsolePanel.js:
1261         (WebInspector.ConsolePanel._formatnode): Add mouseover/mouseout event
1262         listeners to highlight the node and clear the highlight.
1263
1264 2008-03-20  Adam Roben  <aroben@apple.com>
1265
1266         Highlight nodes in the page when you hover over their DOM breadcrumbs
1267
1268         Part of Bug 16532: Inspector should highlight nodes in page when
1269         hovering over nodes in Inspector's interface
1270
1271         <http://bugs.webkit.org/show_bug.cgi?id=16532>
1272         <rdar://problem/5712896>
1273
1274         Reviewed by Tim Hatcher.
1275
1276         * page/inspector/DocumentPanel.js:
1277         (WebInspector.DocumentPanel): Add an mouseout event listener to the
1278         breadcrumbs element to clear the highlighted node.
1279         (WebInspector.DocumentPanel.updateBreadcrumbs): Change the mouseover
1280         event listener to highlight the node represented by the hovered
1281         breadcrumb.
1282
1283 2008-03-20  Adam Roben  <aroben@apple.com>
1284
1285         Highlight nodes in the page when you hover over them in the DOM tree
1286
1287         Part of Bug 16532: Inspector should highlight nodes in page when
1288         hovering over nodes in Inspector's interface
1289
1290         <http://bugs.webkit.org/show_bug.cgi?id=16532>
1291         <rdar://problem/5712896>
1292
1293         The inspected node is no longer highlighted (unless, of course, you
1294         hover over it).
1295
1296         Reviewed by Tim Hatcher.
1297
1298         * page/inspector/DocumentPanel.js:
1299         (WebInspector.DocumentPanel):
1300           - Don't highlight the focused node when the DOM tree is shown
1301           - Added mousemove/mouseout event listeners to set/clear the
1302             highlighted node. These are added to the root of the DOM tree
1303             instead of to each individual list item to avoid flashing as the
1304             mouse moves between nodes.
1305         (WebInspector.DocumentPanel.set focusedDOMNode): Don't highlight the
1306         focused node.
1307         (WebInspector.DocumentPanel._onmousemove): Highlight the node under
1308         the mouse.
1309
1310 2008-03-20  Adam Roben  <aroben@apple.com>
1311
1312         Show nodes' content/padding/border/margin boxes in the node highlight
1313
1314         Part of Bug 17221: Node highlight should show node metrics
1315
1316         <http://bugs.webkit.org/show_bug.cgi?id=17221>
1317         <rdar://problem/5732822>
1318
1319         Outstanding issues:
1320           1) We don't show padding/border/margins for inlines
1321           2) We don't show any numeric metrics, we just draw the boxes
1322           3) We'll probably want to tweak the look of the highlight some, at
1323              least to make the boxes better distinguishable
1324
1325         Reviewed by Tim Hatcher.
1326
1327         * page/InspectorController.cpp:
1328         (WebCore::drawOutlinedRect): Added. Just draws a single rect.
1329         (WebCore::drawHighlightForBoxes): Added. Takes the rects we calculated
1330         for the node and draws the highlight.
1331         (WebCore::InspectorController::drawNodeHighlight): Calculates the
1332         content/padding/border/margin boxes for blocks and passes them off to
1333         drawHighlightForBoxes. The behavior for inlines is for now unchanged.
1334
1335 2008-03-20  Adam Roben  <aroben@apple.com>
1336
1337         Fix RenderContainer's override of addLineBoxRects to match RenderObject's
1338
1339         RenderContainer::addLineBoxRects was never getting called because its
1340         parameters didn't match those of RenderObject::addLineBoxRects.
1341
1342         Reviewed by Mitz Pettel.
1343
1344         No test possible.
1345
1346         * rendering/RenderContainer.cpp: Added an optional bool
1347         useSelectionHeight parameter to match RenderObject's method.
1348         * rendering/RenderContainer.h: Ditto.
1349
1350 2008-03-20  Marco Barisione  <marco.barisione@collabora.co.uk>
1351
1352         Reviewed by Alp Toker.
1353
1354         http://bugs.webkit.org/show_bug.cgi?id=17946
1355         [GTK] Widgets are not clipped
1356
1357         * platform/gtk/RenderThemeGtk.cpp:
1358         (WebCore::paintMozWidget): pass the clipping rectangle to
1359         moz_gtk_widget_paint() instead of just the widget rectangle.
1360
1361 2008-03-20  David Hyatt  <hyatt@apple.com>
1362
1363         Fix for http://bugs.webkit.org/show_bug.cgi?id=9279
1364
1365         Make :hover work with the adjacent sibling selector.  This fix makes all forms of dynamic changes
1366         (class name changes, :hover, :focus, etc.) work properly when used with the + selector.
1367
1368         Reviewed by weinig
1369
1370         Added fast/css/dynamic-sibling-selector.html
1371
1372         * dom/Element.cpp:
1373         (WebCore::Element::recalcStyle):
1374
1375 2008-03-20  Aaron Golden  <aegolden@gmail.com>
1376
1377         Reviewed by Darin and David Kilzer.
1378
1379         Addresses <http://bugs.webkit.org/show_bug.cgi?id=15263>, which caused certain marquees to not display.
1380
1381         Test: fast/html/marquee-scroll.html
1382
1383         * html/HTMLMarqueeElement.cpp:
1384         (WebCore::HTMLMarqueeElement::parseMappedAttribute):
1385
1386 2008-03-20  Adam Roben  <aroben@apple.com>
1387
1388         Export InspectorController::drawNodeHighlight
1389
1390         Reviewed by Tim Hatcher.
1391
1392         * WebCore.base.exp: Also sorted this file.
1393
1394 2008-03-19  Stephanie Lewis  <slewis@apple.com>
1395
1396         Rubber-stamped by Anders.
1397
1398         Fix Windows Build
1399
1400         * platform/cf/SharedBufferCF.cpp:
1401         (WebCore::SharedBuffer::createCFData):
1402
1403 2008-03-19  Stephanie Lewis <slewis@apple.com>
1404
1405         Rubber-stamped by Anders.
1406
1407         Fix Windows Build
1408
1409         * platform/SharedBuffer.h:
1410
1411 2008-03-19  Justin Garcia  <justin.garcia@apple.com>
1412
1413         Reviewed by Oliver.
1414         
1415         <rdar://problem/5780697> Copying content with CSS property values that are percentages can cause fidelity issues
1416          
1417         Elements with height: x%; overflow: visible; overlap what's below them when they are copied from
1418         a document in quirksmode and pasted into to one in standards mode.  This fix uses the computed 
1419         the value for a property if its value is a percentage.
1420         
1421         * css/CSSMutableStyleDeclaration.cpp:
1422         (WebCore::CSSMutableStyleDeclaration::addParsedProperty): Added so that we don't have to use
1423         setProperty from appendStartMarkup.  We already have a parsed property value, so we shouldn't
1424         use setProperty, since it takes in a String.  If we did, we would have to call CSSValue::cssText()
1425         for a String only to re-parse it in setProperty.  This wasn't extremely important now, but it will 
1426         be as we compute more properties to fix the rest of the copy/paste fidelity bugs.
1427         * css/CSSMutableStyleDeclaration.h:
1428         * editing/markup.cpp:
1429         (WebCore::appendStartMarkup): Compute values for properties that have percentage values.  We could
1430         perhaps narrow this special case to only include properties that are effected by quirksmode.
1431
1432 2008-03-19  Sam Weinig  <sam@webkit.org>
1433
1434         Reviewed by Anders Carlsson.
1435
1436         Fix for <rdar://problem/5785694>
1437         Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file
1438
1439         Make the activeExecStates stack per JSGlobalObject instead of static to ensure
1440         thread safety.
1441
1442         * bindings/objc/WebScriptObject.mm:
1443         (+[WebScriptObject throwException:]): Change to throw an exception on the current
1444         GlobalObject instead of the top of the static activeExecStates stack.
1445         (-[WebScriptObject setException:]): Change to use the top of the rootObjects GlobalObject
1446         instead of the top of the static activeExecStates stack.
1447
1448         * bridge/c/c_instance.cpp:
1449         * bridge/c/c_instance.h:
1450         * bridge/jni/jni_instance.cpp:
1451         (JavaInstance::virtualBegin):
1452         (JavaInstance::virtualEnd):
1453         * bridge/jni/jni_instance.h:
1454         * bridge/objc/objc_instance.h:
1455         * bridge/objc/objc_instance.mm:
1456         (ObjcInstance::~ObjcInstance):
1457         (ObjcInstance::virtualBegin):
1458         (ObjcInstance::virtualEnd):
1459         * bridge/runtime.cpp:
1460         (KJS::Bindings::Instance::setDidExecuteFunction):
1461         (KJS::Bindings::Instance::didExecuteFunction):
1462         (KJS::Bindings::Instance::setCurrentGlobalObject): Added.
1463         (KJS::Bindings::Instance::currentGlobalObject): Added.
1464         (KJS::Bindings::Instance::begin):
1465         (KJS::Bindings::Instance::end):
1466         * bridge/runtime.h:
1467         (KJS::Bindings::Instance::virtualBegin): Renamed from begin().
1468         (KJS::Bindings::Instance::virtualEnd): Renamed from end().
1469         We now store the currently active globalObject everytime we cross the runtime
1470         object boundary.  To do this, we take advantage of the existing begin/end
1471         methods that are called when crossing this boundary, making begin set the current
1472         globalObject and then call the old begin, now called virtualBegin.
1473
1474 2008-03-19  Brady Eidson  <beidson@apple.com>
1475
1476         Reviewed by Anders
1477
1478         Change SharedBuffer so the wrapping platform data aspect can be shared with all CoreFoundation platforms
1479         (Mac and Windows instead of just Mac)
1480
1481         * WebCore.vcproj/WebCore.vcproj: Add SharedBufferCF.cpp
1482         * WebCore.xcodeproj/project.pbxproj: Ditto
1483
1484         * platform/SharedBuffer.cpp:
1485         * platform/SharedBuffer.h: Change the private c'tor from NSData to CFDataRef, other PLATFORM tweaks
1486
1487         * platform/cf/SharedBufferCF.cpp: Added.
1488         (WebCore::SharedBuffer::SharedBuffer):
1489         (WebCore::SharedBuffer::createCFData): Non-Mac version of createCFData
1490         (WebCore::SharedBuffer::hasPlatformData):
1491         (WebCore::SharedBuffer::platformData):
1492         (WebCore::SharedBuffer::platformDataSize):
1493         (WebCore::SharedBuffer::maybeTransferPlatformData):
1494         (WebCore::SharedBuffer::clearPlatformData):
1495
1496         * platform/mac/SharedBufferMac.mm:
1497         (WebCore::SharedBuffer::wrapNSData): Use the CFDataRef constructor via toll-free bridging
1498         (WebCore::SharedBuffer::createCFData): Mac-specific version of createCFData
1499
1500 2008-03-19  Oliver Hunt  <oliver@apple.com>
1501
1502         Reviewed by Antti.
1503
1504         Bug 17954: Canvas arc() with radius of 0 throws exception
1505         http://bugs.webkit.org/show_bug.cgi?id=17954
1506
1507         Simple fix -- use >= instead of > when validating the radius.
1508
1509         * html/CanvasRenderingContext2D.cpp:
1510         (WebCore::CanvasRenderingContext2D::arc):
1511
1512 2008-03-19  Justin Garcia  <justin.garcia@apple.com>
1513
1514         Reviewed by Oliver.
1515
1516         <rdar://problem/5794920> Acid3: Assertion failure in VisiblePosition::previous when clicking on results (17004)
1517         
1518         The position inside an empty inline-block was a candidate, but upstream and downstream
1519         would move across it without stopping.  This confused canonicalPosition, since no more
1520         than two candidates should have the same upstream/downstream (be visually equivalent).
1521         
1522         Code was added intentionally in isCandidate to make VisiblePositions inside empty 
1523         inline-blocks, so we need to make upstream/downstream understand that.
1524
1525         * dom/Position.cpp:
1526         (WebCore::endsOfNodeAreVisuallyDistinctPositions): upstream and downstream used to only
1527         stop when entering or leaving a non-inline element (referred to as a "block").  We must also 
1528         avoid entering or leaving an empty inline-block.  This will allow a VisiblePosition there, to 
1529         match up with what the code in isCandidate intended.
1530         (WebCore::enclosingVisualBoundary): Removed enclosingBlock and replaced it with this.
1531         (WebCore::Position::upstream): Added better comments, called the new functions.
1532         (WebCore::Position::downstream): Ditto.
1533         * dom/Position.h:
1534
1535 2008-03-19  Dan Bernstein  <mitz@apple.com>
1536
1537         Rubber-stamped by John Sullivan.
1538
1539         - change CSS property and value keyword constants from all-caps with
1540           underscores to intra-caps.
1541
1542         * css/makeprop.pl:
1543         * css/makevalues.pl:
1544         * All files using the constants
1545
1546 2008-03-19  Adam Roben  <aroben@apple.com>
1547
1548         Make clicking anywhere in a row in the DOM tree select that row's node
1549
1550         We now have mousedown and dblclick event listeners on the root of the
1551         tree that forward the event to the node on the row the mouse is over.
1552
1553         Reviewed by Tim Hatcher.
1554
1555         * page/inspector/DocumentPanel.js:
1556         (WebInspector.DocumentPanel): Added a dblclick and mousedown event
1557         listeners to the root of the tree.
1558         (WebInspector.DocumentPanel._treeElementFromEvent): Added. Finds the
1559         tree element for the row underneath the mouse.
1560         (WebInspector.DocumentPanel._ondblclick): Added. Sends the dblclick
1561         event on to the tree element in the current row.
1562         (WebInspector.DocumentPanel._onmousedown): Added. Selects the tree
1563         element in the current row.
1564         * page/inspector/treeoutline.js:
1565         (TreeOutline.treeElementFromPoint): Added.
1566         (TreeElement.treeElementSelected): Changed to call
1567         TreeElement.isEventWithinDisclosureTriangle, and added an early return.
1568         (TreeElement.treeElementToggled): Ditto.
1569         (TreeElement.isEventWithinDisclosureTriangle): Added.
1570         * page/inspector/utilities.js:
1571         (Node.enclosingNodeOrSelfWithNodeNameInArray): Added.
1572         (Node.enclosingNodeOrSelfWithNodeName): Now just calls
1573         enclosingNodeOrSelfWithNodeNameInArray.
1574         (Elemnt.get totalOffsetLeft): Added.
1575         (Elemnt.get totalOffsetTop): Added.
1576
1577 2008-03-19  Dan Bernstein  <mitz@apple.com>
1578
1579         Reviewed by Sam Weinig.
1580
1581         - fix assertion failure in RenderBlock::determineStartPosition() at http://www.wired.com/techbiz/it/magazine/16-04/bz_apple
1582
1583         Test: fast/repaint/line-flow-with-floats-10.html
1584
1585         * rendering/bidi.cpp:
1586         (WebCore::RenderBlock::determineStartPosition): Removed bogus assertion.
1587         If the float's top margin has changed and it has not been repositioned
1588         yet, we do not have its new y position.
1589
1590 2008-03-19  David Hyatt  <hyatt@apple.com>
1591
1592         New implementation of full page zoom.  Because of how much doesn't transform when zooming, and because
1593         of the need to obey viewport constraints, I decided to take a completely different approach.  Now CSS
1594         lengths and intrinsic sizes are simply adjusted by the zoom factor.  This approach works much better and
1595         avoids pixel cracks more than the old approach.   In addition widgets "just work", namely plugins zoom
1596         and scrollbars do not.
1597
1598         This patch also implements the IE zoom CSS property.  This property allows fine-grained control over
1599         zooming at the element level.  It takes values of normal | <number> | <percentage> to match WinIE.  In
1600         addition, in the vein of text-size-adjust for text zooming, I have extended the zoom property with an
1601         extra value, reset.  The reset keyword can be used to prevent a section of the page from scaling at all
1602         when a zoom is applied.
1603
1604         Reviewed by olliej
1605
1606         * css/CSSComputedStyleDeclaration.cpp:
1607         (WebCore::):
1608         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1609         Support the new 'zoom' property for getComputedStyle.
1610
1611         * css/CSSParser.cpp:
1612         (WebCore::CSSParser::parseValue):
1613         Code that parses the 'zoom' property.
1614
1615         * css/CSSPrimitiveValue.cpp:
1616         (WebCore::CSSPrimitiveValue::computeLengthInt):
1617         (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
1618         (WebCore::CSSPrimitiveValue::computeLengthShort):
1619         (WebCore::CSSPrimitiveValue::computeLengthFloat):
1620         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1621         * css/CSSPrimitiveValue.h:
1622         Extend all of the computeLength methods to take a multiplier so that lengths can be adjusted by the
1623         zoom factor.
1624
1625         * css/CSSPropertyNames.in:
1626         Add the new zoom property to the list of properties we understand.
1627
1628         * css/CSSStyleSelector.cpp:
1629         (WebCore::CSSStyleSelector::applyDeclarations):
1630         (WebCore::CSSStyleSelector::applyProperty):
1631         (WebCore::CSSStyleSelector::mapBackgroundSize):
1632         (WebCore::CSSStyleSelector::mapBackgroundXPosition):
1633         (WebCore::CSSStyleSelector::mapBackgroundYPosition):
1634         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1635         * css/CSSStyleSelector.h:
1636         (WebCore::CSSStyleSelector::setStyle):
1637         Pass in the zoom factor when computing all lengths in CSS.
1638
1639         * css/CSSValueKeywords.in:
1640         Add support for the 'reset' keyword of the zoom property.
1641
1642         * dom/Document.cpp:
1643         (WebCore::Document::recalcStyle):
1644         Set the 'zoom' CSS property on the RenderView.  This is how we implement full page zoom.
1645
1646         * html/CanvasRenderingContext2D.cpp:
1647         (WebCore::size):
1648         Make sure the back end canvas size ignores zooming when rendering images.
1649
1650         * html/HTMLImageElement.cpp:
1651         (WebCore::HTMLImageElement::width):
1652         (WebCore::HTMLImageElement::height):
1653         (WebCore::HTMLImageElement::naturalWidth):
1654         (WebCore::HTMLImageElement::naturalHeight):
1655         Use the unzoomed width/height if we have no style information in HTMLImageElement.cpp.
1656
1657         * loader/CachedImage.cpp:
1658         (WebCore::CachedImage::ref):
1659         (WebCore::CachedImage::imageSize):
1660         (WebCore::CachedImage::imageRect):
1661         * loader/CachedImage.h:
1662         (WebCore::CachedImage::canRender):
1663         Force access to the CachedImage metrics to take a multiplier so that people have to think about
1664         the zoom factor.  The "intrinsic size" of the image then takes that into account.
1665
1666         * loader/ImageDocument.cpp:
1667         (WebCore::ImageTokenizer::finish):
1668         (WebCore::ImageDocument::scale):
1669         (WebCore::ImageDocument::resizeImageToFit):
1670         (WebCore::ImageDocument::imageChanged):
1671         (WebCore::ImageDocument::restoreImageSize):
1672         (WebCore::ImageDocument::imageFitsInWindow):
1673         Make sure image documents respect the zoom.
1674
1675         * page/AnimationController.cpp:
1676         (WebCore::ImplicitAnimation::animate):
1677         Make the 'zoom' CSS property work with CSS transitions.
1678
1679         * page/Frame.h:
1680         (WebCore::Frame::pageZoomFactor):
1681         (WebCore::Frame::textZoomFactor):
1682         Add accessors for obtaining the pageZoom vs. textZoom.
1683
1684         * page/FrameView.cpp:
1685         (WebCore::FrameView::adjustViewSize):
1686         Remove the old zoom implementation that used transforms.
1687
1688         * page/mac/WebCoreAXObject.mm:
1689         (-[WebCoreAXObject accessibilityIsIgnored]):
1690         Pass in the zoom factor.
1691
1692         * rendering/InlineFlowBox.cpp:
1693         (WebCore::InlineFlowBox::paintBackground):
1694         (WebCore::InlineFlowBox::paintBoxDecorations):
1695         Pass in the zoom factor when testing for size.
1696
1697         * rendering/RenderBox.cpp:
1698         (WebCore::RenderBox::calculateBackgroundSize):
1699         (WebCore::RenderBox::imageChanged):
1700         (WebCore::RenderBox::paintBackgroundExtended):
1701         (WebCore::RenderBox::calcHeight):
1702         * rendering/RenderFrameSet.cpp:
1703         (WebCore::RenderFrameSet::layout):
1704         * rendering/RenderHTMLCanvas.cpp:
1705         (WebCore::RenderHTMLCanvas::canvasSizeChanged):
1706         * rendering/RenderHTMLCanvas.h:
1707         (WebCore::RenderHTMLCanvas::renderName):
1708         (WebCore::RenderHTMLCanvas::intrinsicSizeChanged):
1709         * rendering/RenderImage.cpp:
1710         (WebCore::RenderImage::setImageSizeForAltText):
1711         (WebCore::RenderImage::imageChanged):
1712         (WebCore::RenderImage::calcReplacedWidth):
1713         (WebCore::RenderImage::calcReplacedHeight):
1714         * rendering/RenderImage.h:
1715         (WebCore::RenderImage::intrinsicSizeChanged):
1716         * rendering/RenderListMarker.cpp:
1717         (WebCore::RenderListMarker::layout):
1718         (WebCore::RenderListMarker::imageChanged):
1719         (WebCore::RenderListMarker::getRelativeMarkerRect):
1720         * rendering/RenderObject.cpp:
1721         (WebCore::RenderObject::mustRepaintBackgroundOrBorder):
1722         (WebCore::RenderObject::paintBorder):
1723         Pass in the zoom factor when testing for size.
1724
1725         * rendering/RenderReplaced.cpp:
1726         (WebCore::RenderReplaced::RenderReplaced):
1727         (WebCore::RenderReplaced::setStyle):
1728         (WebCore::RenderReplaced::intrinsicSizeChanged):
1729         * rendering/RenderReplaced.h:
1730         Added a new call when the zoom factor changes, intrinsicSizeChanged().  Replaced element subclasses
1731         respond to this via overrides.
1732
1733         * rendering/RenderStyle.cpp:
1734         (WebCore::StyleVisualData::StyleVisualData):
1735         (WebCore::StyleInheritedData::StyleInheritedData):
1736         (WebCore::StyleInheritedData::operator==):
1737         (WebCore::RenderStyle::diff):
1738         * rendering/RenderStyle.h:
1739         (WebCore::StyleVisualData::operator==):
1740         (WebCore::RenderStyle::zoom):
1741         (WebCore::RenderStyle::zoomInEffect):
1742         (WebCore::RenderStyle::setZoom):
1743         (WebCore::RenderStyle::setZoomInEffect):
1744         (WebCore::RenderStyle::initialZoom):
1745         Support for 'zoom' in the RenderStyle.  "zoomInEffect" represents the computed zoom taking into account
1746         all the zooms specified on ancestors.
1747
1748         * rendering/RenderTableCol.cpp:
1749         (WebCore::RenderTableCol::imageChanged):
1750         * rendering/RenderTableRow.cpp:
1751         (WebCore::RenderTableRow::imageChanged):
1752         * rendering/RenderTableSection.cpp:
1753         (WebCore::RenderTableSection::imageChanged):
1754         * rendering/RenderVideo.h:
1755         (WebCore::RenderVideo::intrinsicSizeChanged):
1756         Pass in the zoom factor.
1757
1758         * rendering/RenderView.cpp:
1759         (WebCore::RenderView::calcHeight):
1760         (WebCore::RenderView::calcWidth):
1761         (WebCore::RenderView::layout):
1762         (WebCore::RenderView::viewHeight):
1763         (WebCore::RenderView::viewWidth):
1764         * rendering/RenderView.h:
1765         (WebCore::RenderView::zoomFactor):
1766         Back out the old implementation.
1767
1768 2008-03-19  Adam Roben  <aroben@apple.com>
1769
1770         Rename firstParent* methods to enclosingNode*
1771
1772         Rubberstamped by John Sullivan.
1773
1774         * page/inspector/ConsolePanel.js:
1775         * page/inspector/DocumentPanel.js:
1776         * page/inspector/NetworkPanel.js:
1777         * page/inspector/inspector.js:
1778         * page/inspector/utilities.js:
1779
1780 2008-03-19  Dan Bernstein  <mitz@apple.com>
1781
1782         Reviewed by John Sullivan.
1783
1784         - fix <rdar://problem/5805070> CrashTracer: [USER] 33 crashes in Safari at com.apple.WebCore: WebCore::FrameView::layout + 431
1785
1786         Test: fast/dynamic/subtree-parent-static-y.html
1787
1788         * rendering/RenderObject.cpp:
1789         (WebCore::RenderObject::markContainingBlocksForLayout): Avoid calling
1790         this method on the parent if the parent is the new layout subtree root,
1791         which would result in marking all the way to the top, when it should
1792         actually do nothing.
1793
1794 2008-03-19  Mark Rowe  <mrowe@apple.com>
1795
1796         Reviewed by Oliver Hunt.
1797
1798         Use WTF::Unicode abstraction rather than using ICU functions directly.
1799
1800         * html/PreloadScanner.cpp:
1801         (WebCore::PreloadScanner::tokenize):
1802
1803 2008-03-19  Mark Rowe  <mrowe@apple.com>
1804
1805         Attempt to fix the Gtk build.
1806
1807         * platform/network/curl/ResourceHandleCurl.cpp:
1808         (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate):
1809
1810 2008-03-18  Darin Adler  <darin@apple.com>
1811
1812         Reviewed by Maciej.
1813
1814         - Speed up JavaScript built-in properties by changing the
1815           hash table to take advantage of the identifier objects
1816
1817         5% speedup for Acid3 test 26
1818
1819         * bindings/js/JSDOMWindowBase.cpp:
1820         (WebCore::JSDOMWindowBase::getOwnPropertySlot): Update for change to HashTable.
1821         (WebCore::JSDOMWindowBase::put): Ditto.
1822         * bindings/js/JSDOMWindowCustom.cpp:
1823         (WebCore::JSDOMWindow::customGetOwnPropertySlot): Ditto.
1824         * bindings/js/JSHTMLInputElementBase.cpp:
1825         (WebCore::JSHTMLInputElementBase::getOwnPropertySlot): Ditto.
1826         * bindings/js/JSHistoryCustom.cpp:
1827         (WebCore::JSHistory::customGetOwnPropertySlot): Ditto.
1828         * bindings/js/JSLocation.cpp:
1829         (WebCore::JSLocation::customGetOwnPropertySlot): Ditto.
1830         (WebCore::JSLocation::put): Ditto.
1831         * bindings/js/kjs_binding.cpp:
1832         (WebCore::nonCachingStaticFunctionGetter): Ditto.
1833
1834         * bindings/scripts/CodeGeneratorJS.pm: Same changes as in the
1835         create_hash_table script.
1836
1837 2008-03-18  Matt Lilek  <webkit@mattlilek.com>
1838
1839         Fix the Gtk build for real this time.
1840
1841         * platform/network/curl/AuthenticationChallenge.h:
1842
1843 2008-03-18  Sam Weinig  <sam@webkit.org>
1844
1845         Reviewed by Anders Carlsson.
1846
1847         Fix for http://bugs.webkit.org/show_bug.cgi?id=17057
1848         REGRESSION: Frequent random crashes in WebCore::JSNodeList::indexGetter
1849         <rdar://problem/5725058>
1850
1851         Tests: fast/dom/NodeList/5725058-crash-scenario-1.html
1852                fast/dom/NodeList/5725058-crash-scenario-2.html
1853                fast/dom/NodeList/5725058-crash-scenario-3.html
1854
1855         * dom/ChildNodeList.cpp: 
1856         (WebCore::ChildNodeList::ChildNodeList):
1857         * dom/ChildNodeList.h:
1858         Remove rootNodeChildrenChanged() method and fix the constructor to not 
1859         pass in a needsNotifications argument to DynamicNodeList, as it no longer
1860         takes one.
1861
1862         * dom/ClassNodeList.cpp:
1863         (WebCore::ClassNodeList::ClassNodeList):
1864         Don't pass the needsNotifications argument to DynamicNodeList.
1865
1866         * dom/ContainerNode.cpp:
1867         (WebCore::ContainerNode::childrenChanged):
1868         Rename call to hasNodeLists() to hasNodeListCaches().
1869
1870         * dom/Document.cpp:
1871         (WebCore::Document::Document):
1872         (WebCore::Document::~Document): Zero out the m_document variable to signify
1873         to destructors down the destruction chain that this is a Document type node
1874         being destructed, and thus, accessing document() is prohibited.
1875         * dom/Document.h:
1876         (WebCore::Document::addNodeListCache): Renamed from addNodeList.
1877         (WebCore::Document::removeNodeListCache): Renamed from removeNodeList, adds assertion.
1878         (WebCore::Document::hasNodeListCaches): Renamed from hasNodeListCaches.
1879         Rename m_numNodeLists to m_numNodeListCaches.
1880
1881         * dom/DynamicNodeList.cpp:
1882         (WebCore::DynamicNodeList::DynamicNodeList):
1883         (WebCore::DynamicNodeList::~DynamicNodeList):
1884         (WebCore::DynamicNodeList::invalidateCache):
1885         (WebCore::DynamicNodeList::Caches::Caches):
1886         * dom/DynamicNodeList.h:
1887         (WebCore::DynamicNodeList::hasOwnCaches):
1888         Remove the needsNotifications concept from DynamicNodeList, instead, manually
1889         invalidate the cache for lists that own their own cache.
1890
1891         * dom/NameNodeList.cpp:
1892         (WebCore::NameNodeList::NameNodeList):
1893         * dom/NameNodeList.h:
1894         Remove rootNodeAttributeChanged() method and fix the constructor to not 
1895         pass in a needsNotifications argument to DynamicNodeList, as it no longer
1896         takes one.
1897
1898         * dom/Node.cpp:
1899         (WebCore::Node::~Node): Decrement the document's nodeListCache count
1900         if we had a NodeListsNodeData cache and this is not the Document being
1901         destructor, as tagged by a null m_document.
1902         (WebCore::Node::childNodes): Increment the document's nodeListCache count 
1903         if we need create the NodeListsNodeData.
1904         (WebCore::Node::registerDynamicNodeList): Increment the document's nodeListCache count 
1905         if we need create the NodeListsNodeData.  Change to invalidate all the caches, instead 
1906         of just the ChildNodeList, if document has had no NodeListCaches.
1907         (WebCore::Node::unregisterDynamicNodeList): Change to remove the cache from the m_listsWithCaches
1908         set if it is owned by the NodeList and clear the m_nodeLists if it is empty.
1909         (WebCore::Node::notifyLocalNodeListsAttributeChanged): Move logic to 
1910         NodeListsNodeData::invalidateAttributeCaches and clear the cache pointer if it is empty.
1911         (WebCore::Node::notifyLocalNodeListsChildrenChanged): Move logic to 
1912         NodeListsNodeData::invalidateCaches and clear the cache pointer if it is empty.
1913         (WebCore::Node::notifyNodeListsChildrenChanged): Cleanup.
1914         (WebCore::Node::getElementsByName): Increment the document's nodeListCache count 
1915         if we need create the NodeListsNodeData.
1916         (WebCore::Node::getElementsByClassName): Increment the document's nodeListCache count 
1917         if we need create the NodeListsNodeData.
1918
1919         (WebCore::NodeListsNodeData::invalidateCaches): Added.
1920         (WebCore::NodeListsNodeData::invalidateAttributeCaches): Added.
1921         (WebCore::NodeListsNodeData::isEmpty): Added.
1922
1923         * dom/TagNodeList.cpp:
1924         (WebCore::TagNodeList::TagNodeList):
1925         Don't pass the needsNotifications argument to DynamicNodeList.
1926
1927 2008-03-18  Matt Lilek  <webkit@mattlilek.com>
1928
1929         Not reviewed, build fix.
1930
1931         * platform/network/curl/AuthenticationChallenge.h:
1932
1933 2008-03-18  Brent Fulgham  <bfulgham@gmail.com>
1934
1935         Reviewed by Adam Roben.
1936
1937         Provide some stub implementations for things that WebKit
1938         uses for performing authentication/challenge activities.  This
1939         is in support of http://bugs.webkit.org/show_bug.cgi?id=17837
1940
1941         * platform/network/ResourceHandle.h:
1942         * platform/network/curl/AuthenticationChallenge.h:
1943         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
1944         (WebCore::AuthenticationChallenge::sourceHandle):
1945
1946 2008-03-18  Eric Seidel  <eric@webkit.org>
1947
1948         Reviewed by Oliver.
1949
1950         Fix SVGImage crash seen once, and obvious via code inspection.
1951         
1952         I was not able to find a test case for this.
1953
1954         * svg/graphics/SVGImage.cpp:
1955         (WebCore::SVGImage::setContainerSize):
1956         (WebCore::SVGImage::usesContainerSize):
1957         (WebCore::SVGImage::hasRelativeWidth):
1958         (WebCore::SVGImage::hasRelativeHeight):
1959
1960 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
1961
1962         Fix Qt build after r31123.
1963
1964         Add PluginView methods to TemporaryLinkStubs.
1965
1966         * platform/qt/TemporaryLinkStubs.cpp:
1967
1968 2008-03-18  Sam Weinig  <sam@webkit.org>
1969
1970         Reviewed by Darin Adler.
1971
1972         - Speed up JavaScript prototype and constructor object creation
1973           using a static Identifier in the self() methods to avoid the
1974           cost of creating one from a c-string each time.
1975
1976         5% speedup for Acid3 test 26
1977
1978         * bindings/scripts/CodeGeneratorJS.pm:
1979
1980 2008-03-18  Antti Koivisto  <antti@apple.com>
1981
1982         Reviewed by Mark Rowe.
1983
1984         Enable preloading for other platforms besides Mac.
1985
1986         * GNUmakefile.am:
1987         * WebCore.pro:
1988         * WebCore.vcproj/WebCore.vcproj:
1989         * WebCoreSources.bkl:
1990         * html/HTMLTokenizer.cpp:
1991         * html/HTMLTokenizer.h:
1992         * html/PreloadScanner.cpp:
1993         (WebCore::PreloadScanner::tokenize):
1994
1995 2008-03-18  Dan Bernstein  <mitz@apple.com>
1996
1997         Reviewed by Adele Peterson.
1998
1999         - fix <rdar://problem/5805127> REGRESSION (r31116): Assertion failure (floatIndex < floats.size()) in RenderBlock::determineStartPosition() at digg.com
2000
2001         Test: fast/dynamic/floating-to-positioned.html
2002
2003         * rendering/RenderObject.cpp:
2004         (WebCore::RenderObject::setStyle): Added code to remove a float from
2005         object lists if its position property changes to something other than
2006         static, since then it ceases to be a float.
2007
2008 2008-03-18  Adam Roben  <aroben@apple.com>
2009
2010         Windows build fix after r31123
2011
2012         * plugins/win/PluginViewWin.cpp: Add back MozillaUserAgent.
2013
2014 2008-03-18  Dan Bernstein  <mitz@apple.com>
2015
2016         Reviewed by Darin Adler.
2017
2018         - eliminate RenderFlow::m_clear
2019
2020         * rendering/RenderBlock.cpp:
2021         (WebCore::RenderBlock::layoutBlock): Removed code to set m_clear.
2022         (WebCore::RenderBlock::newLine): Added a 'clear' parameter.
2023         * rendering/RenderBlock.h:
2024         * rendering/RenderFlow.h:
2025         (WebCore::RenderFlow::RenderFlow): Removed initialization of m_clear.
2026         * rendering/bidi.cpp:
2027         (WebCore::RenderBlock::layoutInlineChildren): Added a local 'clear'
2028         variable, passing a pointer to it to findNextLineBreak() and its value
2029         to newLine(). 
2030         (WebCore::RenderBlock::findNextLineBreak): Added a 'clear' parameter,
2031         which this method adjusts when it encounters a <br>.
2032
2033 2008-03-18  Simon Hausmann  <hausmann@webkit.org>
2034
2035         Reviewed by Holger.
2036
2037         Fix the Qt build and clean up the invoke mechanism for dispatching
2038         functions in the main thread by using QMetaObject::invokeMethod
2039         instead of posting a null event.
2040
2041         * platform/qt/MainThreadQt.cpp:
2042
2043 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
2044
2045         Fix Mac build from commit of r31123.
2046
2047         Add a typedef for NSView* to PlatformWidget, remove duplicate PluginMessageThrottlerWin definition.
2048
2049         * platform/Widget.h:
2050         * WebCore.vcproj/WebCore.vcproj:
2051
2052 2008-03-18  Rodney Dawes  <dobey@wayofthemonkey.com>
2053
2054         Reviewed by Jon Honeycutt.
2055
2056         Add PluginView.cpp and npapi.cpp to build files.
2057         Copy win/PluginViewWin.cpp to PluginView.cpp for shared code.
2058         Split Windows specific code out of PluginView.cpp.
2059         Add #if USE(NPOBJECT) around dependant code.
2060         Use npruntime_internal.h instead of npapi.h.
2061         Add PlatformWidget typedef to Widget.h.
2062         Update WidgetGtk.cpp for the PlatformWidget usage.
2063         Add needed methods to TemporaryLinkStubs for GTK+ port.
2064
2065         * GNUmakefile.am:
2066         * WebCore.pro:
2067         * WebCoreSources.bkl:
2068         * WebCore.vcproj/WebCore.vcproj:
2069         * plugins/win/PluginViewWin.cpp:
2070         * plugins/PluginView.cpp:
2071         * plugins/PluginView.h:
2072         * plugins/npapi.cpp:
2073         * platform/Widget.h:
2074         * platform/gtk/WidgetGtk.cpp:
2075         * platform/gtk/TemporaryLinkStubs.cpp:
2076
2077 2008-03-17  Darin Adler  <darin@apple.com>
2078
2079         Reviewed by Maciej.
2080
2081         - speed up document property fetching (eliminate the AtomicString
2082           objects made during document property lookup)
2083
2084         3% speedup for Acid3 test 26
2085
2086         * bindings/js/JSDOMWindowBase.cpp:
2087         (WebCore::JSDOMWindowBase::getOwnPropertySlot): Use AtomicString::find to
2088         locate the AtomicString, only if already present. Also call the new faster
2089         versions of the hasNamedItem and hasElementWithId functions that don't
2090         ref/deref the AtomicStringImpl, get inlined, etc.
2091         * bindings/js/JSHTMLDocumentCustom.cpp:
2092         (WebCore::JSHTMLDocument::canGetItemsForName): Ditto.
2093         (WebCore::writeHelper): Use a Vector instead of a String to build up
2094         the string to avoid the bad performance of string append.
2095
2096         * dom/Document.cpp: Tweaked code and comments a bit. Nothing substantive.
2097         * dom/Document.h: Added new hasElementWithId function that's faster than
2098         getElementById because it doesn't ref/deref the AtomicStringImpl*, gets
2099         inlined, doesn't have to handle the 0 case, and doesn't try to return the
2100         element pointer (just a boolean).
2101
2102         * html/HTMLAppletElement.cpp:
2103         (WebCore::HTMLAppletElement::parseMappedAttribute): Use AtomicString
2104         consistently. Also renamed the data member for clarity.
2105         (WebCore::HTMLAppletElement::insertedIntoDocument): Ditto.
2106         (WebCore::HTMLAppletElement::removedFromDocument): Ditto.
2107         * html/HTMLAppletElement.h: Ditto.
2108
2109         * html/HTMLDocument.cpp:
2110         (WebCore::addItemToMap): Use AtomicString instead of String.
2111         (WebCore::removeItemFromMap): Ditto.
2112         (WebCore::HTMLDocument::addNamedItem): Updated for member name change.
2113         (WebCore::HTMLDocument::removeNamedItem): Ditto.
2114         (WebCore::HTMLDocument::addExtraNamedItem): Ditto.
2115         (WebCore::HTMLDocument::removeExtraNamedItem): Ditto.
2116         (WebCore::HTMLDocument::clear): Added. Moved code here from the JavaScript
2117         bindings. If we're going to have an empty placeholder function, there's no
2118         reason to have it in the bindings instead of here.
2119         * html/HTMLDocument.h: Added clear. Changed the named item function
2120         arguments to AtomicString insted of String. Changed the NameCountMap to
2121         use AtomicStringImpl* instead of StringImpl*. Renamed the data members
2122         to add a m_ prefix and remove the needless doc prefix. Added hasNamedItem
2123         and hasExtraNamedItem functions that are inlined and faster than the old
2124         idiom because they doesn't ref/deref the AtomicStringImpl*, get inlined,
2125         and don't have to handle the 0 case.
2126         * html/HTMLDocument.idl: Removed the [Custom] attribute on clear and took
2127         it out of the JavaScript-specific section.
2128
2129         * html/HTMLEmbedElement.cpp:
2130         (WebCore::HTMLEmbedElement::parseMappedAttribute): Use AtomicString
2131         consistently. Also renamed the data member for clarity.
2132         (WebCore::HTMLEmbedElement::insertedIntoDocument): Ditto.
2133         (WebCore::HTMLEmbedElement::removedFromDocument): Ditto.
2134         * html/HTMLFormElement.cpp:
2135         (WebCore::HTMLFormElement::insertedIntoDocument): Ditto.
2136         (WebCore::HTMLFormElement::removedFromDocument): Ditto.
2137         (WebCore::HTMLFormElement::parseMappedAttribute): Ditto.
2138         * html/HTMLFormElement.h: Ditto.
2139
2140         * html/HTMLFrameElementBase.cpp:
2141         (WebCore::HTMLFrameElementBase::openURL): Renamed m_name to m_frameName for
2142         clarity, since the frame name is not the same as the name attribute.
2143         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Ditto.
2144         (WebCore::HTMLFrameElementBase::setNameAndOpenURL): Ditto.
2145         * html/HTMLFrameElementBase.h: Ditto.
2146
2147         * html/HTMLIFrameElement.cpp:
2148         (WebCore::HTMLIFrameElement::parseMappedAttribute): Use AtomicString
2149         consistently. Also renamed the data member for clarity.
2150         (WebCore::HTMLIFrameElement::insertedIntoDocument): Ditto.
2151         (WebCore::HTMLIFrameElement::removedFromDocument): Ditto.
2152         * html/HTMLIFrameElement.h: Ditto.
2153         * html/HTMLImageElement.cpp:
2154         (WebCore::HTMLImageElement::parseMappedAttribute): Ditto.
2155         (WebCore::HTMLImageElement::insertedIntoDocument): Ditto.
2156         (WebCore::HTMLImageElement::removedFromDocument): Ditto.
2157         * html/HTMLImageElement.h: Ditto.
2158         * html/HTMLObjectElement.cpp:
2159         (WebCore::HTMLObjectElement::parseMappedAttribute): Ditto.
2160         (WebCore::HTMLObjectElement::insertedIntoDocument): Ditto.
2161         (WebCore::HTMLObjectElement::removedFromDocument): Ditto.
2162         (WebCore::HTMLObjectElement::updateDocNamedItem): Ditto.
2163         * html/HTMLObjectElement.h: Ditto.
2164
2165         * html/HTMLParamElement.cpp:
2166         (WebCore::HTMLParamElement::isURLAttribute): Use equalIgnoringCase instead
2167         of callling lower().
2168
2169         * html/HTMLPlugInElement.h: Changed the type of m_name. The code that
2170         uses this is in HTMLAppletElement, HTMLEmbedElement, and HTMLObjectElement.
2171
2172         * platform/text/AtomicString.cpp:
2173         (WebCore::equal): Moved to an inline so we can share this code between a
2174         few different functions. It could move to a header too if we want to use
2175         it elsewhere.
2176         (WebCore::UCharBufferTranslator::equal): Change to use inline.
2177         (WebCore::HashAndCharactersTranslator::hash): Added.
2178         (WebCore::HashAndCharactersTranslator::equal): Added.
2179         (WebCore::HashAndCharactersTranslator::translate): Added.
2180         (WebCore::AtomicString::add): Improved the Identifier and UString overloads
2181         to use the already-computed hash code instead of rehashing the string.
2182         (WebCore::AtomicString::find): Added.
2183         * platform/text/AtomicString.h: Added a find function so we can avoid
2184         allocating memory just to look up a string in an atomic string set or map.
2185
2186         * platform/text/StringImpl.h: Added declarations needed for the
2187         AtomicString changes.
2188
2189 2008-03-17  Timothy Hatcher  <timothy@apple.com>
2190
2191         Reviewed by Mark Rowe.
2192
2193         Bug 17908: Various bugs in the Console completion code
2194         http://bugs.webkit.org/show_bug.cgi?id=17908
2195
2196         * page/inspector/ConsolePanel.js:
2197         (WebInspector.ConsolePanel.complete): Moved the code that checked for the caret being at the end
2198         of the prompt into the _caretAtEndOfPrompt helper function.
2199         (WebInspector.ConsolePanel.messagesSelectStart): Clear and redo the auto complete when the selection changes.
2200         (WebInspector.ConsolePanel._caretInsidePrompt): Fixed a logic error that always caused a false result.
2201         (WebInspector.ConsolePanel._caretAtEndOfPrompt): Added. Tests if the selection is a caret at the
2202         end of the prompt.
2203         (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Changed the offset to use the childNodes length.
2204         This makes sure the caret is at the end when there are multiple text nodes in the prompt.
2205
2206 2008-03-17  Dan Bernstein  <mitz@apple.com>
2207
2208         Rubber-stamped by Dave Hyatt.
2209
2210         - FloatingObject cleanup
2211
2212         Renamed FloatingObject's data members as follows: node -> m_renderer,
2213         startY -> m_top, endY -> m_bottom, left -> m_left, width -> m_width,
2214         and noPaint -> !m_shouldPaint, reversing the meaning of the flag.
2215
2216         Also addressed the FIXME in RenderBlock::containsFloat().
2217
2218         * rendering/RenderBlock.cpp:
2219         (WebCore::RenderBlock::repaintOverhangingFloats):
2220         (WebCore::RenderBlock::paintFloats):
2221         (WebCore::RenderBlock::insertFloatingObject):
2222         (WebCore::RenderBlock::removeFloatingObject):
2223         (WebCore::RenderBlock::positionNewFloats):
2224         (WebCore::RenderBlock::leftRelOffset):
2225         (WebCore::RenderBlock::rightRelOffset):
2226         (WebCore::RenderBlock::nextFloatBottomBelow):
2227         (WebCore::RenderBlock::floatBottom):
2228         (WebCore::RenderBlock::floatRect):
2229         (WebCore::RenderBlock::lowestPosition):
2230         (WebCore::RenderBlock::rightmostPosition):
2231         (WebCore::RenderBlock::leftmostPosition):
2232         (WebCore::RenderBlock::leftBottom):
2233         (WebCore::RenderBlock::rightBottom):
2234         (WebCore::RenderBlock::clearFloats):
2235         (WebCore::RenderBlock::addOverhangingFloats):
2236         (WebCore::RenderBlock::addIntrudingFloats):
2237         (WebCore::RenderBlock::containsFloat): Changed to return false if the
2238         floats lists exists but is empty, since line layout code no longer
2239         relies on the buggy behavior.
2240         (WebCore::RenderBlock::nodeAtPoint):
2241         (WebCore::RenderBlock::adjustForBorderFit):
2242         * rendering/RenderBlock.h:
2243         (WebCore::RenderBlock::containsFloats):
2244         (WebCore::RenderBlock::FloatingObject::FloatingObject):
2245         * rendering/bidi.cpp:
2246         (WebCore::RenderBlock::layoutInlineChildren):
2247         (WebCore::RenderBlock::matchedEndLine):
2248
2249 2008-03-17  Dan Bernstein  <mitz@apple.com>
2250
2251         Reviewed by Dave Hyatt.
2252
2253         - allow incremental relayout of blocks that contain floats
2254
2255         Tests: fast/repaint/line-flow-with-floats-[1-9].html
2256
2257         * rendering/RenderBlock.cpp:
2258         (WebCore::RenderBlock::clearFloatsIfNeeded): Cleaned up by moving most
2259         of the function body out of an if statement which was replaced with an
2260         early return.
2261         (WebCore::RenderBlock::insertFloatingObject): Cleaned up by moving most
2262         of the function body out of an if statement and moving the ASSERT, which
2263         is a crash in release builds, to the beginning. Made this function set
2264         the m_isDescendant flag of floating objects it creates.
2265         (WebCore::RenderBlock::removeFloatingObject): Added a call to
2266         markLinesDirtyInVerticalRange() when removing a float from a block with
2267         inline children.
2268         (WebCore::RenderBlock::markLinesDirtyInVerticalRange): Added. Marks the
2269         lines in the given range as dirty.
2270         (WebCore::RenderBlock::clearFloats): Added code to detect changes to
2271         the geometry of floats intruding into this block from other blocks and
2272         mark any lines whose available width has changed as a result as dirty.
2273
2274         * rendering/RenderBlock.h:
2275         (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added a structure
2276         to cache a float with its position and size.
2277         (WebCore::RenderBlock::FloatingObject::FloatingObject): Added an
2278         m_isDescendant flag, used by clearFloats() to distinguish between floats
2279         entering the block from outside and floats internal to the block.
2280
2281         * rendering/RootInlineBox.h:
2282         (WebCore::RootInlineBox::floats): Added.
2283         (WebCore::RootInlineBox::floatsPtr): Added.
2284         (WebCore::RootInlineBox::Overflow::Overflow): Added a data member to
2285         hold the floats originating on the line.
2286
2287         * rendering/bidi.cpp:
2288         (WebCore::RenderBlock::layoutInlineChildren): Made the existence of
2289         floats not force a full layout. Changed to cache the geometry of floats
2290         in the block and detect changes to it. If a float's size or position
2291         changes, all lines from that point on are treated as dirty. An exception
2292         is a change in the dimensions of a float on an otherwise-clean line,
2293         which only dirties lines potentially affected by the change (see
2294         determineStartPosition()). Added code to update each RootInlineBox's
2295         set of floats as lines are laid out. Added code to shift floats
2296         belonging to clean lines in the end along with the lines.
2297         (WebCore::RenderBlock::determineStartPosition): Made this function look
2298         for changes to floats' dimensions and mark lines as dirty accordingly.
2299         Also look for new floats and if found, cause a full layout. Added code
2300         to re-add floats belonging to clean lines.
2301         (WebCore::RenderBlock::matchedEndLine): Added checking that the clean
2302         lines in the end can be shifted vertically as needed, i.e. that the
2303         available width along the way is uniform.
2304
2305 2008-03-17  Eric Seidel  <eric@webkit.org>
2306
2307         Reviewed by darin.
2308
2309         Fix _NPN_IntFromIdentifier (and export the symbol for use!)
2310
2311         Test: plugins/netscape-identifier-conversion.html
2312
2313         * WebCore.NPAPI.exp:
2314         * bridge/npruntime.cpp:
2315         (_NPN_IntFromIdentifier):
2316
2317 2008-03-17  Sam Weinig  <sam@webkit.org>
2318
2319         Reviewed by Dan Bernstein.
2320
2321         Add HTMLCollection constructor to the Window object. (Omission noticed by Harri Porten)
2322
2323         * page/DOMWindow.idl: 
2324
2325 2008-03-17  Holger Hans Peter Freyther  <zecke@selfish.org>
2326
2327         Unreviewed Gtk+ build fix.
2328
2329         * platform/gtk/ScrollViewGtk.cpp: remove const
2330
2331 2008-03-17  Julien Chaffraix  <julien.chaffraix@gmail.com>
2332
2333         Reviewed by Holger.
2334
2335         <http://bugs.webkit.org/show_bug.cgi?id=17754>
2336
2337         - Implement ResourceHandle::loadResourceSynchronously to dispatch synchronous
2338           requests.
2339
2340         - Implement WebCoreSynchronousLoader, the ResourceHandleClient which holds
2341           the network data, response and error for us during the transfert.
2342
2343         * platform/network/ResourceHandleInternal.h: Remove trailing white space.
2344         * platform/network/curl/ResourceHandleCurl.cpp: Add WebCoreSynchronousLoader
2345         (WebCore::WebCoreSynchronousLoader::resourceResponse):
2346         (WebCore::WebCoreSynchronousLoader::resourceError):
2347         (WebCore::WebCoreSynchronousLoader::data):
2348         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
2349         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
2350         (WebCore::WebCoreSynchronousLoader::didReceiveData):
2351         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
2352         (WebCore::WebCoreSynchronousLoader::didFail):
2353         (WebCore::ResourceHandle::loadResourceSynchronously): Implement method
2354         using WebCoreSynchronousLoader.
2355
2356         * platform/network/curl/ResourceHandleManager.cpp:
2357         (WebCore::ResourceHandleManager::dispatchSynchronousJob):
2358         (WebCore::ResourceHandleManager::startJob):
2359         (WebCore::ResourceHandleManager::initializeHandle): Handle initialization
2360         method used both for synchronous and asynchronous job.
2361
2362         * platform/network/curl/ResourceHandleManager.h:
2363
2364 2008-03-17  Darin Adler  <darin@apple.com>
2365
2366         - try to fix GTK build
2367
2368         * platform/ScrollView.h: Make setGtkAdjustments adjustment.
2369         And non-virtual (why was it virtual?).
2370
2371 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
2372
2373         Fix Bug 17898: Split PluginMessageThrottlerWin into its own files
2374
2375         <http://bugs.webkit.org/show_bug.cgi?id=17898>
2376
2377         Move the PluginMessageThrottlerWin class into its own files, in
2378         preparation for refactoring PluginView code to be shared.
2379
2380         Reviewed and tweaked by Adam Roben.
2381
2382         * WebCore.vcproj/WebCore.vcproj:
2383         * plugins/PluginView.h:
2384         * plugins/win/PluginMessageThrottlerWin.cpp: Added.
2385         * plugins/win/PluginMessageThrottlerWin.h: Added.
2386         * plugins/win/PluginViewWin.cpp:
2387
2388 2008-03-17  Adam Roben  <aroben@apple.com>
2389
2390         More Windows build fixes after r31098
2391
2392         * platform/ScrollView.h: Make some more methods public.
2393
2394 2008-03-17  Adam Roben  <aroben@apple.com>
2395
2396         Windows and Qt build fixes after r31098
2397
2398         * platform/ScrollView.h: Mark methods public that still need to be so.
2399
2400 2008-03-16  Timothy Hatcher  <timothy@apple.com>
2401
2402         Reviewed by Darin Adler.
2403
2404         Bug 17883: Console completion should support bracket notation
2405         http://bugs.webkit.org/show_bug.cgi?id=17883
2406
2407         Also fixes a bug where the Inspector's window object was used instead of the
2408         inspected window object.
2409
2410         * page/inspector/ConsolePanel.js:
2411         (WebInspector.ConsolePanel.complete): Add a comment about the _backwardsRange call.
2412         (WebInspector.ConsolePanel.completions): Add a comment about the _backwardsRange call.
2413         Check the last character of the expression for a dot or bracket. Fallback
2414         to the InspectorController.inspectedWindow() instead of window, this was a bad bug.
2415         If the expression caused an exception, just consider the prefix a window property.
2416         When bracket notation is used remember what quote was used and compared property names
2417         with that quote surrounding it. Also escape the property name for the quote and backslash.
2418
2419 2008-03-17  Robert Blaut  <webkit@blaut.biz>
2420
2421         Reviewed by Darin.
2422
2423         Fix for bug http://bugs.webkit.org/show_bug.cgi?id=17696
2424         Set default margin-bottom for form element in quirk mode
2425         and be compatible with Gecko.
2426
2427         Tests: fast/css/margin-bottom-form-element-quirk.html
2428                fast/css/margin-bottom-form-element-strict.html
2429
2430         * css/html4.css:
2431         * css/quirks.css:
2432
2433 2008-03-17  Antti Koivisto  <antti@apple.com>
2434
2435         Reviewed by Darin.
2436
2437         Speculative fix for http://bugs.webkit.org/show_bug.cgi?id=17878
2438         Bug 17878: REGRESSION: Acid3 sometimes crashes Webkit under WebCore::Loader::Host::cancelRequests
2439         
2440         I can't reproduce the crash or make a test case for this one but I'm pretty sure this
2441         is the problem. Essentially the same bug as http://bugs.webkit.org/show_bug.cgi?id=17862
2442         except in didFail() instead of didFinishLoading().
2443
2444         * loader/loader.cpp:
2445         (WebCore::Loader::Host::didFail):
2446
2447 2008-03-17  Jan Michael Alonzo  <jmalonzo@unpluggable.com>
2448
2449         Reviewed and tweaked by Darin.
2450
2451         http://bugs.webkit.org/show_bug.cgi?id=17172
2452         Refactor platform checks in ScrollView.h
2453
2454         * platform/ScrollView.h: Change #ifs around.
2455
2456 2008-03-17  Yuzhu Shen  <yuzhu.shen@gmail.com>
2457
2458         Reviewed by Darin.
2459
2460         Fix the bug: http://bugs.webkit.org/show_bug.cgi?id=17760
2461         It is necessary to load the image even when src="".
2462
2463         Test: fast/images/load-img-with-empty-src.html
2464
2465         * html/HTMLImageLoader.cpp:
2466         (WebCore::HTMLImageLoader::updateFromElement): isNull rather than isEmpty.
2467
2468 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
2469
2470         Fix GTK+ build from r31094.
2471
2472         * plugins/gtk/PluginDatabaseGtk.cpp:
2473         (PluginDatabase::getPluginsInPaths):
2474
2475 2008-03-17  Adam Roben  <aroben@apple.com>
2476
2477         Fix Bug 17876: REGRESSION (r31060): Attempting to visit Ofcom page causes crash
2478
2479         <http://bugs.webkit.org/show_bug.cgi?id=17876>
2480
2481         Reviewed by John.
2482
2483         Test: fast/dom/remove-named-attribute-crash.html
2484
2485         * dom/NamedAttrMap.cpp:
2486         (WebCore::NamedAttrMap::removeAttribute): Store the Attribute we're
2487         going to remove from the m_attributes Vector in a RefPtr so it doesn't
2488         get deleted when it is removed from the Vector.
2489
2490 2008-03-17  Rodney Dawes  <dobey@wayofthemonkey.com>
2491
2492         Reviewed by Adam Roben.
2493
2494         Implement PluginDatabase for GTK+ with PluginDatabaseGtk.cpp.
2495         Remove implemented methods from TemporaryLinkStubs.
2496
2497         * GNUmakefile.am:
2498         * plugins/gtk:
2499         * plugins/gtk/PluginDatabaseGtk.cpp:
2500         * platform/gtk/TemporaryLinkStubs.cpp:
2501
2502 2008-03-17  Simon Hausmann  <hausmann@webkit.org>
2503
2504         Fix the Qt build.
2505
2506         * platform/text/qt/TextCodecQt.cpp:
2507         (WebCore::TextCodecQt::encode):
2508         * platform/text/qt/TextCodecQt.h:
2509
2510 2008-03-16  Maciej Stachowiak  <mjs@apple.com>
2511
2512         Not reviewed, just fixing an incomplete comment from the last commit.
2513
2514         * dom/Range.cpp:
2515         (WebCore::Range::surroundContents):
2516
2517 2008-03-16  Maciej Stachowiak  <mjs@apple.com>
2518
2519         Reviewed by Darin.
2520
2521         - fixed "Acid3 expects different exceptions for surroundContents calls involving comment nodes (affects Acid3 test 11)"
2522         http://bugs.webkit.org/show_bug.cgi?id=17509
2523         
2524         This gets us to 92/100
2525
2526         * dom/Range.cpp:
2527         (WebCore::Range::surroundContents): Check for
2528         HIERARCHY_REQUEST_ERR before BAD_BOUNDARYPOINTS_ERR, since Acid3
2529         expects exceptional conditions to be tested in the order that the
2530         spec lists them. Also, adjust the HIERARCHY_REQUEST_ERR check. If
2531         the start point of the range is in a comment node, the node that
2532         would be the parent of a partial replacement is actually the
2533         comment node's parent (since comment nodes have character
2534         indices), so we should do the HIERARCHY_REQUEST_ERR check based on
2535         the parent of the comment node, as for text nodes, even though it
2536         will fail later with a different exception because it is not
2537         allowed to surround a partially selected non-text node.
2538
2539 2008-03-16  Marvin Decker  <marv.decker@gmail.com>
2540
2541         Reviewed by Darin.
2542
2543         Fix bug 15119: URL query characters that are unencodable in the
2544         request's character set should be converted to XML entities with
2545         non-alphanumeric characters escaped.
2546
2547         Test: http/tests/uri/escaped-entity.html
2548
2549         * html/FormDataList.cpp:
2550         (WebCore::FormDataList::appendString):
2551         * html/HTMLFormElement.cpp:
2552         (WebCore::HTMLFormElement::formData):
2553         * platform/KURL.cpp:
2554         (WebCore::encodeRelativeString):
2555         * platform/text/String.cpp:
2556         (WebCore::String::latin1):
2557         (WebCore::String::utf8):
2558         * platform/text/TextCodec.cpp:
2559         (WebCore::TextCodec::unencodableCharReplacement):
2560         * platform/text/TextCodec.h:
2561         (WebCore::):
2562         * platform/text/TextCodecICU.cpp:
2563         (WebCore::urlEscapedEntityCallback):
2564         (WebCore::gbkUrlEscapedEntityCallack):
2565         (WebCore::TextCodecICU::encode):
2566         * platform/text/TextCodecICU.h:
2567         (WebCore::TextCodecICU::setNeedsGBKFallbacks):
2568         * platform/text/TextCodecLatin1.cpp:
2569         (WebCore::encodeComplexWindowsLatin1):
2570         (WebCore::TextCodecLatin1::encode):
2571         * platform/text/TextCodecLatin1.h:
2572         * platform/text/TextCodecUTF16.cpp:
2573         (WebCore::TextCodecUTF16::encode):
2574         * platform/text/TextCodecUTF16.h:
2575         * platform/text/TextCodecUserDefined.cpp:
2576         (WebCore::encodeComplexUserDefined):
2577         (WebCore::TextCodecUserDefined::encode):
2578         * platform/text/TextCodecUserDefined.h:
2579         * platform/text/TextEncoding.cpp:
2580         (WebCore::TextEncoding::encode):
2581         * platform/text/TextEncoding.h:
2582         * platform/text/mac/TextCodecMac.cpp:
2583         (WebCore::TextCodecMac::encode):
2584         * platform/text/mac/TextCodecMac.h:
2585         * xml/XMLHttpRequest.cpp:
2586         (WebCore::XMLHttpRequest::send):
2587
2588 2008-03-16  Kevin Ollivier  <kevino@theolliviers.com>
2589
2590         Rubber stamped by Darin.
2591
2592         Add set-webkit-configuration support for wx port, and centralize
2593         build dir location setting.
2594
2595         http://bugs.webkit.org/show_bug.cgi?id=17790
2596
2597         * webcore-base.bkl:
2598
2599 2008-03-16  Darin Adler  <darin@apple.com>
2600
2601         Reviewed by Mark Rowe.
2602
2603         - http://bugs.webkit.org/show_bug.cgi?id=17881
2604           a little cleanup for HTMLTextAreaElement
2605
2606         Tests: fast/forms/textarea-default-value-leading-newline.html
2607                fast/forms/textarea-linewrap-dynamic.html
2608
2609         * html/HTMLTextAreaElement.cpp:
2610         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Tweaked names/
2611         (WebCore::HTMLTextAreaElement::selectionStart): Ditto, also use early return
2612         and check for < 0 rather than -1 specifically.
2613         (WebCore::HTMLTextAreaElement::selectionEnd): Ditto.
2614         (WebCore::HTMLTextAreaElement::setSelectionStart): Early return.
2615         (WebCore::HTMLTextAreaElement::setSelectionEnd): Ditto.
2616         (WebCore::HTMLTextAreaElement::select): Ditto.
2617         (WebCore::HTMLTextAreaElement::setSelectionRange): Ditto.
2618         (WebCore::HTMLTextAreaElement::parseMappedAttribute): Changed value parsing
2619         to treat unknown values as meaning "default" rather than "leave value as-is".
2620         Only call setNeedsLayoutAndPrefWidthsRecalc when mode changed.
2621         (WebCore::HTMLTextAreaElement::createRenderer): Removed name of unused argument.
2622         (WebCore::HTMLTextAreaElement::appendFormData): Updated for name changes.
2623         (WebCore::HTMLTextAreaElement::isKeyboardFocusable): Got rid of unnneeded explicit
2624         class name in isFocusable call.
2625         (WebCore::HTMLTextAreaElement::isMouseFocusable): Ditto.
2626         (WebCore::HTMLTextAreaElement::updateFocusAppearance): Tweaked formatting.
2627         (WebCore::HTMLTextAreaElement::defaultEventHandler): Ditto.
2628         (WebCore::HTMLTextAreaElement::updateValue): Early return.
2629         (WebCore::HTMLTextAreaElement::setValue): Got rid of intermediate value to
2630         eliminate on small refcount churn.
2631         (WebCore::HTMLTextAreaElement::defaultValue): Got rid of unneeded redundant
2632         string length checks, since String already checks all indexing and returns 0.
2633         (WebCore::HTMLTextAreaElement::setDefaultValue): Added code to normalize
2634         line endings and add a leading line ending to fix cases where the first
2635         character is a newline.
2636         (WebCore::HTMLTextAreaElement::accessKeyAction): Removed name of unused arg.
2637         (WebCore::HTMLTextAreaElement::accessKey): Changed return value to avoid
2638         refcount churn.
2639         (WebCore::HTMLTextAreaElement::selection): Updated names and use < 0 instead
2640         of -1 specifically.
2641
2642         * html/HTMLTextAreaElement.h: Replaced wrap function with more-specific
2643         shouldWrapText one. Changed return value of accessKey. Made WrapMethod enum
2644         provate and renamed the values. Renamed cachedSelStart and cachedSelEnd to
2645         m_cachedSelectionStart and m_cachedSelectionEnd.
2646
2647         * rendering/RenderTextControl.cpp:
2648         (WebCore::RenderTextControl::createInnerTextStyle): Updated for change to
2649         HTMLTextAreaElement wrap function.
2650
2651 2008-03-16  Antti Koivisto  <antti@apple.com>
2652
2653         Reviewed by Mitz.
2654
2655         Fix http/tests/security/frame-loading-via-document-write.html
2656         which was broken by the preload patch.
2657         
2658         Don't print error message when preload fails local file security check.
2659         Some minor refactoring.
2660
2661         * html/PreloadScanner.cpp:
2662         (WebCore::PreloadScanner::emitTag):
2663         (WebCore::PreloadScanner::emitCSSRule):
2664         * loader/Cache.cpp:
2665         (WebCore::Cache::requestResource):
2666         * loader/Cache.h:
2667         * loader/DocLoader.cpp:
2668         (WebCore::DocLoader::requestResource):
2669         (WebCore::DocLoader::preload):
2670         (WebCore::DocLoader::printPreloadStats):
2671         * loader/DocLoader.h:
2672
2673 2008-03-16  Antti Koivisto  <antti@apple.com>
2674
2675         Reviewed by Darin.
2676         
2677         Fix http://bugs.webkit.org/show_bug.cgi?id=17862
2678         REGRESSION (r31038): Reproducible crash under DocLoader::checkForReload() at marware.com
2679         
2680         This was a memory smasher introduced by the preloading patch. 
2681         If a script resource was marked uncacheable, early deletion of the 
2682         Request object would cause deletion of the CachedResource too if
2683         it was referred more than once in a single document.
2684
2685         Test: http/tests/misc/uncacheable-script-repeated.html
2686
2687         * loader/loader.cpp:
2688         (WebCore::Loader::Host::servePendingRequests):
2689         (WebCore::Loader::Host::didFinishLoading):
2690
2691 2008-03-16  Yuzhu Shen  <yuzhu.shen@gmail.com>
2692
2693         Reviewed by Darin.
2694
2695         Fix bug http://bugs.webkit.org/show_bug.cgi?id=17714
2696         <img href="#"> should go to top of the page.
2697
2698         Test: fast/html/empty-fragment-id-goto-top.html
2699
2700         * loader/FrameLoader.cpp:
2701         (WebCore::FrameLoader::gotoAnchor):
2702
2703 2008-03-16  Thiago Macieira  <thiago.macieira@trolltech.com>
2704
2705         Reviewed by Darin.
2706
2707         Don't use RefPtr in classes you haven't seen the implementation of.
2708
2709         Forward-declaration and declaration of RefPtr<Foo> is ok. But you
2710         cannot *use* said objects until Foo is defined. This is true even for
2711         initialisation with a 0.
2712
2713         Seems the HP aCC compiler is more strict here than gcc.
2714
2715         * editing/SplitTextNodeCommand.h:
2716         * page/FrameTree.h:
2717         * xml/XPathExpressionNode.h:
2718
2719 2008-03-16  Darin Adler  <darin@apple.com>
2720
2721         Reviewed by Mitz.
2722
2723         - fix http://bugs.webkit.org/show_bug.cgi?id=14941
2724           <rdar://problem/5404093> textarea value from JavaScript includes extra newline
2725
2726         Test: fast/forms/textarea-trailing-newline.html
2727
2728         * rendering/RenderTextControl.cpp:
2729         (WebCore::RenderTextControl::finishText): Added code to strip the trailing
2730         newline. It's possible there are some obscure cases where this is not wanted,
2731         but I couldn't find any. If someone finds a case where this is bad, we can
2732         make the code conditional.
2733
2734 2008-03-16  Darin Adler  <darin@apple.com>
2735
2736         Reviewed by Mitz.
2737
2738         - fix http://bugs.webkit.org/show_bug.cgi?id=17876
2739           Attempting to visit Ofcom page causes crash
2740
2741         This is causing intermittent crashes on some existing test cases on the buildbot
2742         too; I don't have a 100% test case right now, but it should be easy to add one later
2743         and this does fix a crash in a test we already have.
2744
2745         * dom/CharacterData.cpp:
2746         (WebCore::CharacterData::CharacterData): Initialize m_data to the empty string,
2747         not the null string. The class assumes the string can never being null.
2748         (WebCore::CharacterData::setData): If asked to set the data to the null string,
2749         set it to the empty string instead. This matches what the (non-empty) constructor
2750         has always done.
2751
2752 2008-03-15  Timothy Hatcher  <timothy@apple.com>
2753
2754         Reviewed by Adam Roben.
2755
2756         Bug 17870: Web Inspector console should feel more like a terminal
2757         http://bugs.webkit.org/show_bug.cgi?id=17870
2758
2759         Bug 14390: Console input area should be more noticeable
2760         http://bugs.webkit.org/show_bug.cgi?id=14390
2761         <rdar://5712831>
2762
2763         Bug 17237: Inspector should tab-complete object properties in the Console
2764         http://bugs.webkit.org/show_bug.cgi?id=17237
2765         <rdar://5732842>
2766
2767         Adds tab completion, auto completion and a blended input prompt.
2768         The prompt is also focused when the console is shown.
2769            Implements a new look, that will be part of the UI refresh.
2770
2771         * page/inspector/ConsolePanel.js: 
2772         (WebInspector.ConsolePanel): Renamed a few properties.
2773         (WebInspector.ConsolePanel.get/set promptText): Property to set
2774         and get the current prompt text. Does not affect command history.
2775         (WebInspector.ConsolePanel.show): Make the prompt focus on show.
2776         (WebInspector.ConsolePanel.acceptAutoComplete): Accepts any
2777         pending auto complete text.
2778         (WebInspector.ConsolePanel.clearAutoComplete): Cancels any pending
2779         auto complete text.
2780         (WebInspector.ConsolePanel.autoCompleteSoon): Sets a timeout to auto
2781         complete in 250 ms, only if there isn't a pending auto complete.
2782         (WebInspector.ConsolePanel.complete): 
2783         (WebInspector.ConsolePanel.completions): Generate a list of possible
2784         completions based on the prefix and the previous expression ranges.
2785         (WebInspector.ConsolePanel._backwardsRange): Helper to scan backwards
2786         from a node and offset to find a start node and offset of the first
2787         character found in the characters string.
2788         (WebInspector.ConsolePanel._evalInInspectedWindow): Helper to eval in the
2789         inspected window.
2790         (WebInspector.ConsolePanel._caretInsidePrompt): Returns true if the selection
2791         is collapsed and is inside the prompt element.
2792         (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Moves the selection
2793         to the end of the prompt.
2794         (WebInspector.ConsolePanel._onTabPressed): Calls complete on
2795         tab press.
2796         (WebInspector.ConsolePanel._onEnterPressed): Call clearAutoComplete so the
2797         autocompletion text is not evaluated.
2798
2799         * page/inspector/Images/errorIcon.png: New image.
2800         * page/inspector/Images/userInputIcon.png: Added.
2801         * page/inspector/Images/userInputPreviousIcon.png: Added.
2802         * page/inspector/Images/warningIcon.png: New image.
2803         * page/inspector/inspector.css: New refreshed UI.
2804
2805 2008-03-15  Mark Mentovai  <mark@moxienet.com>
2806
2807         Reviewed and landed by Darin.
2808
2809         - http://bugs.webkit.org/show_bug.cgi?id=17833
2810           use file extensions instead of explicit file types in WebCore's Xcode project
2811
2812         * WebCore.xcodeproj/project.pbxproj: Remove unnecessary
2813           uses of explicitFileType, preferring lastKnownFileType ("File Type:
2814           Default for File" in Xcode's File Info's General tab).  Files below
2815           that relied on an explicit file type setting other than what would
2816           be implied by their extensions have been renamed to have correct
2817           extensions.
2818         * bridge/jni/jni_jsobject.cpp: Removed.
2819         * bridge/jni/jni_jsobject.mm: Copied from bridge/jni/jni_jsobject.cpp.
2820         * loader/mac/LoaderNSURLExtras.m: Removed.
2821         * loader/mac/LoaderNSURLExtras.mm: Copied from loader/mac/LoaderNSURLExtras.m.
2822         * platform/mac/SharedTimerMac.cpp: Removed.
2823         * platform/mac/SharedTimerMac.mm: Copied from platform/mac/SharedTimerMac.cpp.
2824
2825 2008-03-15  Darin Adler  <darin@apple.com>
2826
2827         Reviewed by Sam.
2828
2829         - fix http://bugs.webkit.org/show_bug.cgi?id=11997
2830           Ranges are not fixed after mutation (affects Acid3 test 13)
2831
2832         Test: fast/dom/Range/mutation.html
2833
2834         * WebCore.xcodeproj/project.pbxproj: Added NodeWithIndex.h, NodeWithIndexAfter.h,
2835         and NodeWithIndexBefore.h.
2836
2837         * dom/CharacterData.cpp:
2838         (WebCore::CharacterData::setData): Replaced call to Document::removeMarkers
2839         with call to Document::textRemoved.
2840         (WebCore::CharacterData::insertData): Replaced call to Document::shiftMarkers
2841         with call to Document::textInserted.
2842         (WebCore::CharacterData::deleteData): Replaced call to Document::removeMarkers
2843         and Document::shiftMarkers with call to Document::textRemoved.
2844         (WebCore::CharacterData::replaceData): Replaced call to Document::removeMarkers
2845         and Document::shiftMarkers with call to Document::textRemoved and
2846         Document::textInserted.
2847         (WebCore::CharacterData::containsOnlyWhitespace): Tweaked a bit.
2848
2849         * dom/ContainerNode.cpp:
2850         (WebCore::ContainerNode::childrenChanged): Added a call to
2851         Document::nodeChildrenChanged when the nmber of children was changed (and not
2852         by the parser).
2853         (WebCore::dispatchChildRemovalEvents): Updated for name change.
2854
2855         * dom/Document.cpp:
2856         (WebCore::Document::~Document): Assert that all ranges are gone.
2857         (WebCore::Document::nodeChildrenChanged): Added. Calls nodeChildrenChanged on
2858         all ranges.
2859         (WebCore::Document::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
2860         Added code to call nodeWillBeRemoved on all ranges.
2861         (WebCore::Document::textInserted): Added. Calls textInserted on all ranges and
2862         also calls shiftMarkers.
2863         (WebCore::Document::textRemoved): Added. Calls textRemoved on all ranges and also
2864         calls removeMarkers and shiftMarkers.
2865         (WebCore::Document::textNodesMerged): Added. Calls textNodesMerged on all ranges.
2866         (WebCore::Document::textNodeSplit): Added. Calls textNodeSplit on all ranges.
2867         (WebCore::Document::attachRange): Added. Adds range to the HashSet of all ranges
2868         for this document.
2869         (WebCore::Document::detachRange): Added. Removes range from the HashSet.
2870         * dom/Document.h: Added the new functions and the data member.
2871
2872         * dom/Element.cpp:
2873         (WebCore::Element::normalizeAttributes): Added. Contains the part of the
2874         normalize function that's specific to Element. Better encapsulation to have it
2875         here rather than in Node::normalize.
2876         * dom/Element.h: Added the new function.
2877
2878         * dom/Node.cpp:
2879         (WebCore::Node::normalize): Rewrote so it's no longer recursive. Also added
2880         a call to textNodesMerged after each pair of nodes is merged but before the
2881         second node is removed.
2882         (WebCore::Node::traverseNextNodePostOrder): Added. Helper function used by
2883         normalize, but also useful elsewhere.
2884         * dom/Node.h: Added the new function.
2885
2886         * dom/NodeIterator.cpp:
2887         (WebCore::NodeIterator::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
2888         * dom/NodeIterator.h: Ditto.
2889
2890         * dom/ProcessingInstruction.cpp:
2891         (WebCore::ProcessingInstruction::setData): Call textRemoved.
2892
2893         * dom/Range.cpp:
2894         (WebCore::NodeWithIndex::index): Added. Computes and stores index.
2895         (WebCore::NodeWithIndexBefore::indexBefore): Added. Computes and stores index.
2896         (WebCore::NodeWithIndexAfter::indexAfter): Added. Computes and stores index.
2897         (WebCore::Range::Range): Call attachRange.
2898         (WebCore::Range::~Range): Call detachRange unless the range is already detached.
2899         (WebCore::Range::commonAncestorContainer): Removed check for WRONG_DOCUMENT_ERR.
2900         It's no longer possible to create a range where the two containers are non-zero
2901         and have no common ancestor.
2902         (WebCore::Range::isPointInRange): Rewrote expression to be more readable.
2903         (WebCore::Range::compareNode): Changed local variable to use int for consistency.
2904         (WebCore::Range::compareBoundaryPoints): Replaced ASSERT with ASSERT_NOT_REACHED.
2905         (WebCore::Range::deleteContents): Removed check for INVALID_STATE_ERR and
2906         initialization of ec to 0; both are now inside checkDeleteExtract.
2907         (WebCore::Range::intersectsNode): Changed local variable to use int for consistency.
2908         Also changed comparison to use < 0 and >= 0 rather than checking explicitly for 1
2909         and -1.
2910         (WebCore::Range::processContents): Changed code to not get the nodeType multiple
2911         times on the same node, and tweaked formatting. Removed code to update the range
2912         on deletion, because the normal delete logic will take care of that now.
2913         (WebCore::Range::extractContents): Removed check for INVALID_STATE_ERR and
2914         initialization of ec to 0; both are now inside checkDeleteExtract.
2915         (WebCore::Range::insertNode): Changed local variable to use int for consistency.
2916         (WebCore::Range::toString): Changed variable name to pastLast.
2917         (WebCore::Range::detach): Call detachRange.
2918         (WebCore::Range::checkDeleteExtract): Added check for detached range and code to
2919         set ec to 0; moved here from the two callers. Also changed variable name to pastLast.
2920         (WebCore::endpointNodeChildrenChanged): Added.
2921         (WebCore::Range::nodeChildrenChanged): Added.
2922         (WebCore::endpointNodeWillBeRemoved): Added.
2923         (WebCore::Range::nodeWillBeRemoved): Added.
2924         (WebCore::endpointTextInserted): Added.
2925         (WebCore::Range::textInserted): Added.
2926         (WebCore::endpointTextRemoved): Added.
2927         (WebCore::Range::textRemoved): Added.
2928         (WebCore::endpointTextNodesMerged): Added.
2929         (WebCore::Range::textNodesMerged): Added.
2930         (WebCore::endpointTextNodesSplit): Added.
2931         (WebCore::Range::textNodeSplit): Added.
2932
2933         * dom/Range.h: Added new member functions.
2934
2935         * dom/NodeWithIndex.h: Added. Makes it so we won't find the index for the same
2936         node more than once.
2937         * dom/NodeWithIndexAfter.h: Added. Similar to NodeWithIndex but gives the index after a
2938         node and treats a node pointer of 0 as meaning "before first node in parent container".
2939         * dom/NodeWithIndexBefore.h: Added.  Similar to NodeWithIndex but treats a node pointer of 0
2940         as meaning "after last node in parent container".
2941
2942         * dom/Text.cpp:
2943         (WebCore::Text::splitText): Call textNodeSplit.
2944
2945         * editing/ApplyStyleCommand.cpp:
2946         (WebCore::ApplyStyleCommand::applyInlineStyle): Changed variable name to pastLast.
2947
2948 2008-03-15  Julien Chaffraix  <julien.chaffraix@gmail.com>
2949
2950         Reviewed by Holger.
2951
2952         [CURL] Crash below ResourceHandleManager::setupPOST when job->request().httpBody() is NULL
2953         http://bugs.webkit.org/show_bug.cgi?id=16906
2954
2955         Add null checks for httpBody() to match other ports.
2956
2957         Test: http/tests/xmlhttprequest/xmlhttprequest-post-crash.html
2958
2959         * platform/network/curl/ResourceHandleManager.cpp:
2960         (WebCore::readCallback): Add null check.
2961         (WebCore::ResourceHandleManager::setupPOST): Ditto.
2962
2963 2008-03-14  Steve Falkenburg  <sfalken@apple.com>
2964
2965         PGO build fixes.
2966
2967         * WebCore.vcproj/WebCore.vcproj:
2968
2969 2008-03-14  Anders Carlsson  <andersca@apple.com>
2970
2971         Reviewed by Sam.
2972
2973         <rdar://problem/5794989>
2974         https://bugs.webkit.org/show_bug.cgi?id=17792
2975         REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
2976
2977         Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
2978         so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame.
2979         
2980         * bindings/js/JSDOMWindowBase.cpp:
2981         (WebCore::createWindow):
2982         * loader/FrameLoader.cpp:
2983         (WebCore::FrameLoader::createWindow):
2984         * loader/FrameLoader.h:
2985
2986 2008-03-14  Dan Bernstein  <mitz@apple.com>
2987
2988         Reviewed by Mark Rowe.
2989
2990         - fix <rdar://problem/5797836> shadow offsets are smaller than specified
2991
2992         * platform/graphics/cg/GraphicsContextCG.cpp:
2993         (WebCore::GraphicsContext::setShadow): Made the workaround for
2994         <rdar://problem/5539388> unconditional.
2995
2996 2008-03-14  Adam Roben  <aroben@apple.com>
2997
2998         Fix it right this time
2999
3000         * platform/MainThread.cpp: Cast to unsigned so we can use %u in the
3001         format string.
3002         * platform/mac/MainThreadMac.mm:
3003
3004 2008-03-14  Adam Roben  <aroben@apple.com>
3005
3006         Mac build fix
3007
3008         * platform/mac/MainThreadMac.mm: Corrected a typo.
3009
3010 2008-03-14  Dan Bernstein  <mitz@apple.com>
3011
3012         Reviewed by Darin Adler.
3013
3014         - fix http://bugs.webkit.org/show_bug.cgi?id=17834
3015           REGRESSION: floated first-letter does not work when included in table
3016
3017         Test: fast/css/first-letter-float.html
3018
3019         * rendering/RenderBlock.cpp:
3020         (WebCore::RenderBlock::updateFirstLetter): Changed the search for the
3021         first text node to stop at a float if that float is an existing first-
3022         letter.
3023
3024 2008-03-14  Sam Weinig  <sam@webkit.org>
3025
3026         Fix Mac build
3027
3028         * WebCore.xcodeproj/project.pbxproj:
3029
3030 2008-03-13  Adam Roben  <aroben@apple.com>
3031
3032         Make most of callOnMainThread's implementation be cross-platform
3033
3034         I took the non-platform-specific parts of MainThreadWin.cpp and moved
3035         them to a new MainThread.cpp. Each platform is now responsible for
3036         implementing one function, scheduleDispatchFunctionsOnMainThread,
3037         which is supposed to set things up so that
3038         dispatchFunctionsFromMainThread gets called from the main thread in
3039         the near future.
3040
3041         Reviewed by Alexey.
3042
3043         * GNUmakefile.am: Added MainThread.cpp to the project.
3044         * WebCore.pro: Ditto.
3045         * WebCore.vcproj/WebCore.vcproj: Ditto.
3046         * WebCore.xcodeproj/project.pbxproj: Ditto.
3047         * WebCoreSources.bkl: Ditto.
3048         * platform/MainThread.cpp:
3049           - Copied from WebCore/platform/win/MainThreadWin.cpp.
3050           - Removed the Windows-specific parts.
3051         (WebCore::callOnMainThread): Changed to call
3052         scheduleDispatchFunctionsOnMainThread instead of PostMessage.
3053         * platform/gtk/MainThreadGtk.cpp:
3054         (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now
3055         just calls dispatchFunctionsFromMainThread.
3056         (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through
3057         to g_timeout_add.
3058         * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to
3059         WebCoreMainThreadCaller.
3060         (-[WebCoreMainThreadCaller call]): Calls through to
3061         dispatchFunctionsFromMainThread.
3062         (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new
3063         WebCoreMainThreadCaller and calls performSelectorOnMainThread on it.
3064         * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent.
3065         (WebCore::MainThreadInvoker::event): Chagned to call through to
3066         dispatchFunctionsFromMainThread.
3067         (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event
3068         to the MainThreadInvoker.
3069         * platform/win/MainThreadWin.cpp:
3070           - Removed the non-Windows-specific parts.
3071           - Removed some unnecessary initialization of static variables to 0.
3072         (WebCore::ThreadingWindowWndProc): Changed to call
3073         dispatchFunctionsFromMainThread.
3074         (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to
3075         PostMessage.
3076         * platform/wx/MainThreadWx.cpp:
3077         (WebCore::scheduleDispatchFunctionsOnMainThread): Added.
3078
3079 2008-03-14  Beth Dakin  <bdakin@apple.com>
3080
3081         Reviewed by Geoff.
3082
3083         Fix for <rdar://problem/5728171> Potential PLT speedup: don't 
3084         realloc every time inside NamedAttrMap::addAttribute
3085
3086         The speed-up for this turned out to be so small that it is mostly 
3087         imperceptible. It is likely that it is a tiny boost, though, and 
3088         the new code is much cleaner.
3089
3090         * dom/Element.cpp:
3091         (WebCore::Element::setAttributeMap): attrs is now called 
3092         m_attributes
3093         * dom/NamedAttrMap.cpp: The array attrs is now the Vector of 
3094         RefPtrs called m_attributes, and there is no longer any need for 
3095         the len member variable. 
3096         (WebCore::NamedAttrMap::NamedAttrMap): 
3097         (WebCore::NamedAttrMap::item):
3098         (WebCore::NamedAttrMap::getAttributeItem):
3099         (WebCore::NamedAttrMap::clearAttributes):
3100         (WebCore::NamedAttrMap::operator=):
3101         (WebCore::NamedAttrMap::addAttribute):
3102         (WebCore::NamedAttrMap::removeAttribute):
3103         (WebCore::NamedAttrMap::mapsEquivalent):
3104         * dom/NamedAttrMap.h: Same.
3105         (WebCore::NamedAttrMap::length):
3106         (WebCore::NamedAttrMap::attributeItem):
3107         (WebCore::NamedAttrMap::shrinkToLength):
3108         (WebCore::NamedAttrMap::reserveCapacity):
3109         * html/HTMLTokenizer.cpp: One of the benefits of the old array was 
3110         that it never took up more memory than it needed to. So the 
3111         tokenizer utilizes new member functions on NamedAttrMap 
3112         (shrinkToLength and reserveCapacity) to try to keep memory usage at 
3113         a minimum. 
3114         (WebCore::Token::addAttribute):
3115         (WebCore::HTMLTokenizer::processToken):
3116
3117 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
3118
3119         BUILD FIX when ENABLE(MAC_JAVA_BRIDGE) set to 0.
3120
3121         * page/mac/FrameMac.mm: Move up #if ENABLE(MAC_JAVA_BRIDGE) guard
3122         to comment out unused code.
3123
3124 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
3125
3126         Unify concept of enabling the Mac Java bridge.
3127
3128         Reviewed by Darin and Anders.
3129
3130         No test cases added since there is no change in functionality.
3131
3132         * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro.
3133         If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES.
3134         * WebCore.JNI.exp: Added.
3135         * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp.
3136
3137         * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
3138         * bridge/jni/jni_class.h: Ditto.
3139         * bridge/jni/jni_instance.cpp: Ditto.
3140         * bridge/jni/jni_instance.h: Ditto.
3141         * bridge/jni/jni_jsobject.cpp: Ditto.
3142         * bridge/jni/jni_jsobject.h: Ditto.
3143         * bridge/jni/jni_objc.mm: Ditto.
3144         * bridge/jni/jni_runtime.cpp: Ditto.
3145         * bridge/jni/jni_runtime.h: Ditto.
3146         * bridge/jni/jni_utility.cpp: Ditto.
3147         * bridge/jni/jni_utility.h: Ditto.
3148
3149         * bridge/runtime.cpp: Removed unused #include statements.
3150         * bridge/runtime.h:
3151         (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE)
3152         guard for JavaLanguage enum.  Also added #if PLATFORM(MAC) guard for
3153         ObjectiveCLanguage enum to match corresponding code in runtime.cpp.
3154
3155         * config.h: Removed definition of HAVE_JNI.
3156
3157         * loader/FrameLoaderClient.h:
3158         (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
3159         * page/Frame.cpp:
3160         (WebCore::Frame::Frame): Ditto.
3161         * page/Frame.h:
3162         (WebCore::Frame::initJavaJSBindings): Ditto.
3163         * page/mac/FrameMac.mm:
3164         (WebCore::Frame::createScriptInstanceForWidget): Ditto.
3165         (WebCore::Frame::initJavaJSBindings): Ditto.
3166
3167 2008-03-13  Darin Adler  <darin@apple.com>
3168
3169         * html/PreloadScanner.h: Corrected license.
3170         * html/PreloadScanner.cpp: Corrected license.
3171
3172 2008-03-13  Mark Mentovai  <mark@moxienet.com>
3173
3174         Reviewed by darin.  Landed by eseidel.
3175
3176         * platform/FloatConversion.h: Include a header to get CoreGraphics
3177         types when using CoreGraphics types.
3178
3179 2008-03-13  Mark Mentovai  <mark@moxienet.com>
3180
3181         Reviewed by eseidel.  Landed by eseidel.
3182
3183         * WebCore.xcodeproj/project.pbxproj:
3184         * css/CSSParser.cpp:
3185         * css/makeprop.pl:
3186         Move CSSPropertyNames.c to CSSPropertyNames.cpp
3187
3188 2008-03-13  Mark Mentovai  <mark@moxienet.com>
3189
3190         Reviewed by eseidel.  Landed by eseidel.
3191
3192         * platform/Arena.h: Use statement1;statement2 instead of
3193         (statement1,statement2) in CLEAR_UNUSED.
3194
3195 2008-03-13  Tommi Komulainen  <tommi.komulainen@iki.fi>
3196
3197         Reviewed by Alp Toker.
3198
3199         http://bugs.webkit.org/show_bug.cgi?id=17821
3200         [SOUP] POST requests are empty
3201
3202         Send the HTTP request body as well.
3203
3204         * platform/network/soup/ResourceHandleSoup.cpp:
3205         (WebCore::ResourceHandle::start):
3206
3207 2008-03-13  Dan Bernstein  <mitz@apple.com>
3208
3209         Reviewed by Dave Hyatt.
3210
3211         - fix http://bugs.webkit.org/show_bug.cgi?id=17819
3212           Border-collapse: collapse later cell wins on PC, earlier cell on Mac
3213
3214         Test: fast/table/border-collapsing/equal-precedence-resolution.html
3215
3216         * rendering/RenderTableCell.cpp:
3217         (WebCore::RenderTableCell::collapsedLeftBorder): When calling
3218         compareBorders() with borders that may have the same precedence, made
3219         sure to pass the border belonging to the earlier (in document order)
3220         element first, since compareBorders() prefers the first argument when
3221         there is a tie.
3222         (WebCore::RenderTableCell::collapsedRightBorder): Ditto.
3223         (WebCore::RenderTableCell::collapsedTopBorder): Ditto.
3224
3225 2008-03-13  Adam Roben  <aroben@apple.com>
3226
3227         wx build fix and Windows leak fix after r31034
3228
3229         * platform/graphics/wx/ImageWx.cpp:
3230         (WebCore::Image::loadPlatformResource): Use SharedBuffer::create.
3231         * platform/win/SharedBufferWin.cpp:
3232         (WebCore::SharedBuffer::createWithContentsOfFile): Ditto (we were
3233         leaking the SharedBuffer here before).
3234
3235 2008-03-13  Antti Koivisto  <antti@apple.com>
3236
3237         Reviewed by Eric.
3238
3239         Correct a few issues spotted by Mike Belshe. 
3240
3241         * html/PreloadScanner.cpp:
3242         (WebCore::PreloadScanner::tokenize):
3243         * loader/loader.cpp:
3244         (WebCore::Loader::cancelRequests):
3245
3246 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
3247
3248         Fix GTK+ build for SharedBuffer changes.
3249
3250         * platform/graphics/gtk/ImageGtk.cpp:
3251         (Image::loadPlatformResource):
3252
3253 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
3254
3255         More PGO build fixes.
3256
3257         * WebCorePrefix.cpp:
3258
3259 2008-03-13  Antti Koivisto  <antti@apple.com>
3260
3261         Reviewed by Darin.
3262         
3263         Make page loads go fast.
3264         
3265         http://bugs.webkit.org/show_bug.cgi?id=17480
3266
3267         - Implement speculative preloading. When a script load blocks the main parser, use a side 
3268           parser to pick up more resources.
3269         - Implement per-host load queues, prioritize scripts and stylesheets over images.
3270         
3271         Depending on content and network latency this may speed things up quite a bit.
3272
3273         * WebCore.xcodeproj/project.pbxproj:
3274         * dom/Document.cpp:
3275         (WebCore::Document::implicitClose):
3276         Clear the preloads after laoding completes.
3277         
3278         * html/HTMLLinkElement.cpp:
3279         (WebCore::HTMLLinkElement::parseMappedAttribute):
3280         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
3281         * html/HTMLLinkElement.h:
3282         Make tokenizeRelAttribute() public static so it can be used from elsewhere.
3283         Eliminate a pointless bitfield so I can get references.
3284         
3285         * html/HTMLTokenizer.cpp:
3286         (WebCore::HTMLTokenizer::scriptHandler):
3287         (WebCore::HTMLTokenizer::scriptExecution):
3288         (WebCore::HTMLTokenizer::write):
3289         * html/HTMLTokenizer.h:
3290         Spin up the preload scanner whenever a script load blocks the parser. One scanner tracks the end of 
3291         the document while temporary ones are created as needed to scan document.write() output.
3292         
3293         * html/PreloadScanner.cpp: Added.
3294         (WebCore::PreloadScanner::PreloadScanner):
3295         (WebCore::PreloadScanner::~PreloadScanner):
3296         (WebCore::PreloadScanner::begin):
3297         (WebCore::PreloadScanner::end):
3298         (WebCore::PreloadScanner::reset):
3299         (WebCore::PreloadScanner::write):
3300         (WebCore::isWhitespace):
3301         (WebCore::PreloadScanner::clearLastCharacters):
3302         (WebCore::PreloadScanner::rememberCharacter):
3303         (WebCore::PreloadScanner::lastCharactersMatch):
3304         (WebCore::legalEntityFor):
3305         (WebCore::PreloadScanner::consumeEntity):
3306         (WebCore::PreloadScanner::tokenize):
3307         (WebCore::PreloadScanner::processAttribute):
3308         (WebCore::PreloadScanner::emitCharacter):
3309         (WebCore::PreloadScanner::tokenizeCSS):
3310         (WebCore::PreloadScanner::emitTag):
3311         (WebCore::PreloadScanner::emitCSSRule):
3312         * html/PreloadScanner.h: Added.
3313         (WebCore::PreloadScanner::inProgress):
3314         (WebCore::PreloadScanner::):
3315         HTML5 tokenization plus some glue code. Fake CSS parsing thrown in just for fun.
3316         
3317         * loader/Cache.cpp:
3318         (WebCore::Cache::pruneDeadResources):
3319         Preloads have zero refcount, avoid kicking them out too early.
3320         
3321         * loader/CachedResource.cpp:
3322         (WebCore::CachedResource::CachedResource):
3323         (WebCore::CachedResource::ref):
3324         * loader/CachedResource.h:
3325         (WebCore::CachedResource::):
3326         (WebCore::CachedResource::preloadResult):
3327         (WebCore::CachedResource::setRequestedFromNetworkingLayer):
3328         (WebCore::CachedResource::canDelete):
3329         (WebCore::CachedResource::isPreloaded):
3330         (WebCore::CachedResource::increasePreloadCount):
3331         (WebCore::CachedResource::decreasePreloadCount):
3332         Keep track which resources are preloads. Avoid deleting them. Track
3333         at which point of the loading preloads get utilized to enable some interesting 
3334         statistics.
3335         
3336         * loader/DocLoader.cpp:
3337         (WebCore::DocLoader::~DocLoader):
3338         (WebCore::DocLoader::checkForReload):
3339         (WebCore::DocLoader::registerPreload):
3340         (WebCore::DocLoader::clearPreloads):
3341         (WebCore::DocLoader::printPreloadStats):
3342         * loader/DocLoader.h:
3343         Ensure we utilize preloaded resources during reloads.
3344         Keep a list of all preloads in the document. Clear the preloads after
3345         parsing is complete. Some debug statistics.
3346         
3347         * loader/DocumentLoader.cpp:
3348         (WebCore::DocumentLoader::isLoadingInAPISense):
3349         Avoid signaling that loading is complete too early. 
3350         
3351         * loader/loader.cpp:
3352         (WebCore::Loader::Loader):
3353         (WebCore::Loader::~Loader):
3354         (WebCore::Loader::determinePriority):
3355         (WebCore::Loader::load):
3356         (WebCore::Loader::scheduleServePendingRequests):
3357         (WebCore::Loader::requestTimerFired):
3358         (WebCore::Loader::servePendingRequests):
3359         (WebCore::Loader::cancelRequests):
3360         (WebCore::Loader::Host::Host):
3361         (WebCore::Loader::Host::~Host):
3362         (WebCore::Loader::Host::addRequest):
3363         (WebCore::Loader::Host::hasRequests):
3364         (WebCore::Loader::Host::servePendingRequests):
3365         (WebCore::Loader::Host::didFinishLoading):
3366         (WebCore::Loader::Host::didFail):
3367         (WebCore::Loader::Host::didReceiveResponse):
3368         (WebCore::Loader::Host::didReceiveData):
3369         (WebCore::Loader::Host::cancelPendingRequests):
3370         (WebCore::Loader::Host::cancelRequests):
3371         * loader/loader.h:
3372         (WebCore::Loader::):
3373         Distribute load requests to per-host priority queues. Limit the number of loads issued to the 
3374         networking layer so we have better changes of getting important requests through first.
3375         Prioritize scripts > stylesheets > images.
3376
3377 2008-03-13  David Hyatt  <hyatt@apple.com>
3378
3379         This patch makes full page zoom work pretty well. It fixes repainting so that it works when transforms
3380         are set on the RenderView. It also implements the "smart layout" behavior that other browsers support when
3381         zooming. The page will still try to constrain to the viewport size even when zoomed.
3382
3383         Reviewed by john
3384
3385         * dom/Document.cpp:
3386         (WebCore::Document::recalcStyle):
3387         Make sure to test for transform changes even when there is no zoom.  This fixes repainting issues
3388         caused by jumping from a zoomed state back to the standard size.
3389
3390         * page/FrameView.cpp:
3391         (WebCore::FrameView::adjustViewSize):
3392         Adjust for the zoom factor (the render tree is in unzoomed coordinates, but the scrollbars of the view
3393         need to handle zoomed coordinates).
3394
3395         * rendering/RenderBox.cpp:
3396         (WebCore::RenderBox::calcHeight):
3397         Fix the body-sizing-to-the-view-height quirk so that it takes the zoom factor into account when
3398         stretching to fill the viewport.
3399
3400         * rendering/RenderLayer.cpp:
3401         (WebCore::RenderLayer::updateLayerPositions):
3402         (WebCore::RenderLayer::setHasVisibleContent):
3403         Remove the FIXMEs now that absoluteClippedOverflowRect works with transforms on the RenderView.
3404
3405         * rendering/RenderView.cpp:
3406         (WebCore::RenderView::calcHeight):
3407         (WebCore::RenderView::calcWidth):
3408         Make sure the calculated width/height take the zoom factor into account in order to get the "smart layout"
3409         behavior.
3410
3411         (WebCore::RenderView::layout):
3412         When deciding whether children have to get a relayout, we need to check the zoomed width/height and not just
3413         the viewport size.
3414
3415         (WebCore::RenderView::computeAbsoluteRepaintRect):
3416         Patched to take into account transforms set on the RenderView.
3417
3418         (WebCore::RenderView::docHeight):
3419         (WebCore::RenderView::docWidth):
3420         Patched to just always use m_width and m_height initially, since those have already been adjusted for
3421         the zoom factor.
3422
3423         (WebCore::RenderView::zoomedHeight):
3424         (WebCore::RenderView::zoomedWidth):
3425         * rendering/RenderView.h:
3426         New helper methods for obtaining the adjusted width/height of the viewport taking into account the
3427         zoom factor.
3428
3429 2008-03-13  Anders Carlsson  <andersca@apple.com>
3430
3431         Build fix.
3432
3433         * WebCore.base.exp:
3434
3435 2008-03-13  Anders Carlsson  <andersca@apple.com>
3436
3437         Reviewed by Adam.
3438
3439         Get rid of actualRequest, it is not used anymore. Also, get rid of 
3440         initialRequest and replace all uses with originalRequest because those are
3441         the same thing.
3442         
3443         * loader/DocumentLoader.cpp:
3444         * loader/DocumentLoader.h:
3445         * loader/FrameLoader.cpp:
3446         (WebCore::FrameLoader::initialRequest):
3447         (WebCore::FrameLoader::originalRequestURL):
3448
3449 2008-03-13  Brady Eidson  <beidson@apple.com>
3450
3451         Reviewed by Anders
3452
3453         Convert SharedBuffer to start with a refCount of 1
3454
3455         * loader/ImageDocument.cpp:
3456         (WebCore::ImageTokenizer::finish):
3457
3458         * loader/ResourceLoader.cpp:
3459         (WebCore::ResourceLoader::addData):
3460         (WebCore::ResourceLoader::willStopBufferingData):
3461
3462         * loader/icon/IconDatabase.cpp:
3463         (WebCore::IconDatabase::defaultIcon):
3464         (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
3465
3466         * loader/loader.cpp:
3467         (WebCore::Loader::didReceiveData):
3468
3469         * platform/SharedBuffer.h:
3470         (WebCore::SharedBuffer::create): Make all constructors private, add ::create() calls
3471         * platform/SharedBuffer.cpp:
3472         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
3473         (WebCore::SharedBuffer::copy):
3474         * platform/mac/SharedBufferMac.mm:
3475         (WebCore::SharedBuffer::wrapNSData):
3476         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
3477
3478 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
3479
3480         PGO build fixes.
3481         
3482         Disable PGO for normal release builds.
3483         Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.
3484
3485         * WebCore.vcproj/WebCore.vcproj:
3486
3487 2008-03-13  Anders Carlsson  <andersca@apple.com>
3488
3489         Reviewed by Darin.
3490
3491         Make a bunch of DocumentLoader setters/getters inline.
3492         
3493         * loader/DocumentLoader.cpp:
3494         * loader/DocumentLoader.h:
3495         (WebCore::DocumentLoader::isStopping):
3496         (WebCore::DocumentLoader::setCommitted):
3497         (WebCore::DocumentLoader::isCommitted):
3498         (WebCore::DocumentLoader::isLoading):
3499         (WebCore::DocumentLoader::setLoading):
3500         (WebCore::DocumentLoader::response):
3501         (WebCore::DocumentLoader::mainDocumentError):
3502         (WebCore::DocumentLoader::setResponse):
3503         (WebCore::DocumentLoader::isClientRedirect):
3504         (WebCore::DocumentLoader::setIsClientRedirect):
3505         (WebCore::DocumentLoader::overrideEncoding):
3506         (WebCore::DocumentLoader::responses):
3507         (WebCore::DocumentLoader::triggeringAction):
3508         (WebCore::DocumentLoader::setTriggeringAction):
3509         (WebCore::DocumentLoader::setOverrideEncoding):
3510         (WebCore::DocumentLoader::setLastCheckedRequest):
3511         (WebCore::DocumentLoader::lastCheckedRequest):
3512         (WebCore::DocumentLoader::title):
3513         (WebCore::DocumentLoader::setLoadingFromCachedPage):
3514         (WebCore::DocumentLoader::isLoadingFromCachedPage):
3515
3516 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
3517
3518         Fix builds without SVG enabled.
3519
3520         * page/Frame.cpp:
3521         (Frame::shouldApplyTextZoom):
3522         (Frame::shouldApplyPageZoom):
3523
3524 2008-03-13  Simon Hausmann  <hausmann@webkit.org>
3525
3526         Fix the Qt build.
3527
3528         * bridge/qt/qt_instance.cpp:
3529         (KJS::Bindings::QtInstance::getQtInstance):
3530         (KJS::Bindings::QtInstance::getRuntimeObject):
3531         * bridge/qt/qt_instance.h:
3532         (KJS::Bindings::QtInstance::create):
3533         * bridge/qt/qt_runtime.cpp:
3534         (KJS::Bindings::convertQVariantToValue):
3535         (KJS::Bindings::QtConnectionObject::execute):
3536         * page/qt/FrameQt.cpp:
3537         (WebCore::Frame::createScriptInstanceForWidget):
3538
3539 2008-03-12  Sam Weinig  <sam@webkit.org>
3540
3541         Reviewed by Darin Adler.
3542
3543         Fix <rdar://problem/5784773>
3544         Crash loading QT movies @ apple.com/ipodtouch/features.html with a PAC file (WebKitThreadingException)
3545
3546         Make bridged RuntimeObjects get collected on the main thread only. This is necessary
3547         because clients of the bridged objects are unlikely to prepared for a collection on 
3548         non-main thread, which can happen with a PAC file.
3549
3550         * bridge/runtime_object.cpp:
3551         (RuntimeObjectImp::RuntimeObjectImp):
3552
3553 2008-03-12  Adam Roben  <aroben@apple.com>
3554
3555         Fix Bug 17815: Inspector's DOM tree should descend into subframes
3556
3557         <http://bugs.webkit.org/show_bug.cgi?id=17815>
3558
3559         Reviewed by Tim.
3560
3561         * page/inspector/DocumentPanel.js:
3562         (WebInspector.DocumentPanel.revealNode): Changed to provide
3563         _isAncestorIncludingParentFramesWithinPanel and
3564         _parentNodeOrFrameElementWithinPanel for the isAncestor and getParent
3565         parameters to findTreeElement so that parent frames will be searched.
3566         (WebInspector.DocumentPanel.updateBreadcrumb):
3567           - Changed while loop to for loop
3568           - Use _parentNodeOrFrameElementWithinPanel instead of
3569             Node.parentNode to move to the next node
3570           - The loop now ends when we reach the DocumentPanel's document node
3571           - Traversal past other Document nodes is now allowed
3572           - We add the "start" class to the final crumb after the loop exits
3573         (WebInspector.DocumentPanel._getDocumentForNode): Added. Simple helper
3574         that returns the node itself if the node is a Document node, or the
3575         node's ownerDocument otherwise.
3576         (WebInspector.DocumentPanel._parentNodeOrFrameElementWithinPanel):
3577         Added. Returns the node's parent node or, in the case of a Document
3578         node, the node's window's owning frame element, but will not return a
3579         node that is in a parent frame of the DocumentPanel's Document.
3580         (WebInspector.DocumentPanel._isAncestorIncludingParentFramesWithinPanel):
3581         Added. Returns true if a is an ancestor of b if a is an ancestor of a
3582         frame element whose subframe(s) contain b.
3583         (WebInspector.DOMNodeTreeElement): We now consider ourselves to have
3584         children if we have a contentDocument.
3585         (WebInspector.DOMNodeTreeElement.onpopulate): Moved the appendChild
3586         loop into a function so that we can add both children of our
3587         contentDocument and children of our node to the tree.
3588         (WebInspector.DOMNodeTreeElement.ondblclick): Changed so that we get
3589         the rootDOMNode by traversing the tree outline hierarchy instead of
3590         the DOM hierarchy so that we can easily jump up to a parent frame.
3591
3592 2008-03-12  Adam Roben  <aroben@apple.com>
3593
3594         Update the styles/metrics panes and breadcrumb after editing DOM
3595         attributes
3596
3597         Reviewed by Tim.
3598
3599         * page/inspector/DocumentPanel.js:
3600         (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update
3601         the parts of the DocumentPanel other than the DOM tree into a new
3602         function, _focusedNodeChanged.
3603         (WebInspector.DocumentPanel._focusedNodeChanged): Added. The
3604         forceUpdate parameter specifies whether the update should occur even
3605         if the focused node hasn't changed since the last update.
3606         (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate
3607         parameter. If forceUpdate is true, we always rebuild the breadcrumbs.
3608         (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate
3609         parameter. If forceUpdate is true, we always rebuild the styles pane.
3610         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a
3611         call to DocumentPanel._focusedNodeChanged. We have to force the update
3612         because we haven't changed the focused node (the attributes of the
3613         node have changed).
3614         * page/inspector/StylesSidebarPane.js:
3615         (WebInspector.StylesSidebarPane.update): Added a forceUpdate
3616         parameter. If forceUpdate is true we always rebuild the styles.
3617
3618 2008-03-12  Mark Rowe  <mrowe@apple.com>
3619
3620         Further Gtk and Qt build fixes.
3621
3622         * bridge/runtime.cpp:
3623         (KJS::Bindings::Instance::createRuntimeObject): Adapt Qt-only code for change to PassRefPtr.
3624         * page/gtk/FrameGtk.cpp: Add missing include.
3625
3626 2008-03-12  Mark Rowe  <mrowe@apple.com>
3627
3628         Fix Gtk and Qt builds.
3629
3630         * page/gtk/FrameGtk.cpp:
3631         * page/qt/FrameQt.cpp:
3632
3633 2008-03-12  Mark Rowe  <mrowe@apple.com>
3634
3635         Mac build fix.
3636
3637         * WebCore.base.exp:  Remove symbol.
3638
3639 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
3640
3641         Build fix.
3642
3643         * page/win/FrameWin.cpp:
3644
3645 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
3646
3647         Build fix.
3648
3649         * plugins/win/PluginViewWin.cpp:
3650         (WebCore::PluginView::bindingInstance):
3651
3652 2008-03-12  Darin Adler  <darin@apple.com>
3653
3654         Reviewed by Anders.
3655
3656         - http://bugs.webkit.org/show_bug.cgi?id=17640
3657           eliminate WebCoreFrameBridge
3658
3659         * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
3660         to WebFrame in WebKit.
3661         * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
3662         WebCoreFrameBridge.h and WebCoreFrameBridge.mm.
3663
3664         * page/Frame.cpp:
3665         (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
3666         the WebCoreFrameBridge.
3667         * page/Frame.h: Added initJavaJSBindings function.
3668
3669         * page/mac/FrameMac.mm:
3670         (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
3671         (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.
3672
3673         * page/mac/WebCoreFrameBridge.h: Removed.
3674         * page/mac/WebCoreFrameBridge.mm: Removed.
3675
3676 2008-03-12  Sam Weinig  <sam@webkit.org>
3677
3678         Reviewed by Anders Carlsson.
3679
3680         Don't go through the Document just to get the frame Element.
3681
3682         * page/DOMWindow.cpp:
3683         (WebCore::DOMWindow::frameElement):
3684
3685 2008-03-12  Anders Carlsson  <andersca@apple.com>
3686
3687         Reviewed by Geoff and Sam.
3688
3689         More Instance cleanup:
3690         
3691         * Make Instance inherit from RefCounted instead of doing its own refcounting.        
3692         * Make all Instance subclasses private, add static create methods.         
3693         * Have Instance start out with a refcount of 1.
3694         * Get rid of Instance::createBindingForLanguageInstance and call the individual 
3695           instance constructor methods instead.
3696         * Fix many methods to take and return PassRefPtr<Instance> to ensure that the
3697           refcounting is done correctly.
3698          
3699         * bridge/c/c_instance.h:
3700         (KJS::Bindings::CInstance::create):
3701         * bridge/c/c_utility.cpp:
3702         (KJS::Bindings::convertNPVariantToValue):
3703         * bridge/jni/jni_instance.cpp:
3704         (JavaInstance::invokeMethod):
3705         * bridge/jni/jni_instance.h:
3706         (KJS::Bindings::JavaInstance::create):
3707         * bridge/jni/jni_jsobject.cpp:
3708         (JavaJSObject::convertJObjectToValue):
3709         * bridge/jni/jni_runtime.cpp:
3710         (JavaField::valueFromInstance):
3711         (JavaArray::valueAt):
3712         * bridge/objc/objc_instance.h:
3713         (KJS::Bindings::ObjcInstance::create):
3714         * bridge/objc/objc_utility.mm:
3715         (KJS::Bindings::convertObjcValueToValue):
3716         * bridge/qt/qt_instance.cpp:
3717         (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
3718         (KJS::Bindings::QtInstance::getQtInstance):
3719         (KJS::Bindings::QtInstance::getRuntimeObject):
3720         * bridge/qt/qt_instance.h:
3721         * bridge/runtime.cpp:
3722         (KJS::Bindings::Instance::Instance):
3723         (KJS::Bindings::Instance::createRuntimeObject):
3724         * bridge/runtime.h:
3725         * bridge/runtime_object.cpp:
3726         (RuntimeObjectImp::RuntimeObjectImp):
3727         * bridge/runtime_object.h:
3728         * page/Frame.h:
3729         * page/mac/FrameMac.mm:
3730         (WebCore::Frame::createScriptInstanceForWidget):
3731         * page/win/FrameWin.cpp:
3732         (WebCore::Frame::createScriptInstanceForWidget):
3733         * plugins/PluginView.h:
3734         * plugins/win/PluginViewWin.cpp:
3735         (WebCore::PluginView::bindingInstance):
3736
3737 2008-03-12  Dan Bernstein  <mitz@apple.com>
3738
3739         Suggested by Darin Adler. Reviewed by Dave Hyatt.
3740
3741         - speed up BidiIterator::direction()
3742
3743         * rendering/bidi.cpp:
3744         (WebCore::BidiIterator::current): Made inline and corrected the
3745         out-of-bounds condition to work with 0-length text and offsets beyond
3746         the end of the text.
3747         (WebCore::BidiIterator::direction): Changed to call current() and not
3748         call the virtual method isListMarker() most of the time.
3749         (WebCore::addMidpoint): Removed unnecessary null-check of smidpoints.
3750         (WebCore::appendRunsForObject): Ditto.
3751
3752 2008-03-12  Adam Roben  <aroben@apple.com>
3753
3754         Make URLs not be underlined while editing them in the DOM view
3755
3756         Reviewed by Tim.
3757
3758         * page/inspector/inspector.css:
3759
3760 2008-03-12  Adam Roben  <aroben@apple.com>
3761
3762         Part of Bug 17224: DOM nodes/attributes should be editable
3763
3764         <http://bugs.webkit.org/show_bug.cgi?id=17224>
3765         <rdar://problem/5732825>
3766
3767         We now start editing if the user single-clicks on an attribute,
3768         attribute value, or text node while the parent element is selected.
3769         Previously, we started editing on double-click regardless of the
3770         selection state of the element.
3771
3772         URLs in the DOM tree are now followed on Alt/Option-click, rather than
3773         on just click.
3774
3775         Reviewed by Tim.
3776
3777         * English.lproj/InspectorLocalizedStrings.js: Added four new localized
3778         strings.
3779         * page/inspector/DocumentPanel.js:
3780         (WebInspector.DOMNodeTreeElement.onattach): Call new
3781         _makeURLSActivateOnModifiedClick.
3782         (WebInspector.DOMNodeTreeElement._makeURLsActivateOnModifiedClick):
3783         Added. Changes the tooltip of each link in this element to indicate
3784         that Alt/Option-click will follow the URL, and sets the
3785         followOnAltClick property on each link.
3786         (WebInspector.DOMNodeTreeElement.onselect): Mark that we're being
3787         selected.
3788         (WebInspector.DOMNodeTreeElement.onmousedown): If we're not currently
3789         being selected, start editing.
3790         (WebInspector.DOMNodeTreeElement.ondblclick): We no longer start
3791         editing here. We block re-rooting of the tree if we're currently
3792         editing.
3793         (WebInspector.DOMNodeTreeElement._startEditing):
3794           - Don't do anything if we're not focused
3795           - Pass the event down to _startEditingAttribute.
3796         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't do
3797         anything if the event target is a URL and the Alt/Option key is
3798         pressed -- in this case we want to follow the link.
3799         (WebInspector.DOMNodeTreeElement._updateTitle): Call
3800         _makeURLsActivateOnClick again since the anchor elements have all been
3801         recreated.
3802         * page/inspector/inspector.js:
3803         (WebInspector.documentClick): If the anchor as a followOnAltClick
3804         property and the Alt/Option key is not pressed, do nothing.
3805
3806 2008-03-12  Ada Chan  <adachan@apple.com>
3807
3808         Fixed the initial value of zoom factor.
3809
3810         Reviewed by Adam.
3811
3812         * page/Frame.cpp:
3813         (WebCore::FramePrivate::FramePrivate):
3814
3815 2008-03-12  David Hyatt  <hyatt@apple.com>
3816
3817         Make full page zoom vaguely work.  This patch uses the CSS transform system to turn on full page zoom at the
3818         document level.  There are many many bugs that I'm going to file to track all the issues (most of the issues
3819         are just bugs with transforms themselves).
3820
3821         Reviewed by Adam Roben
3822
3823         * css/CSSStyleSelector.cpp:
3824         (WebCore::CSSStyleSelector::applyProperty):
3825         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
3826         * dom/Document.cpp:
3827         (WebCore::Document::recalcStyle):
3828         * page/Frame.cpp:
3829         (WebCore::Frame::shouldApplyTextZoom):
3830         (WebCore::Frame::shouldApplyPageZoom):
3831         * page/Frame.h:
3832         * rendering/RenderLayer.cpp:
3833         (WebCore::RenderLayer::updateLayerPositions):
3834         (WebCore::RenderLayer::setHasVisibleContent):
3835         (WebCore::RenderLayer::paintLayer):
3836         (WebCore::RenderLayer::hitTestLayer):
3837         * rendering/RenderLayer.h:
3838
3839 2008-03-12  David Hyatt  <hyatt@apple.com>
3840
3841         Make the zoom factor a float and not a percent.
3842
3843         Reviewed by antti
3844
3845         * WebCore.base.exp:
3846         * css/CSSStyleSelector.cpp:
3847         (WebCore::CSSStyleSelector::applyProperty):
3848         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
3849         * page/Frame.cpp:
3850         (WebCore::Frame::zoomFactor):
3851         (WebCore::Frame::setZoomFactor):
3852         * page/Frame.h:
3853         * page/FramePrivate.h:
3854         * svg/SVGSVGElement.cpp:
3855         (WebCore::SVGSVGElement::currentScale):
3856         (WebCore::SVGSVGElement::setCurrentScale):
3857
3858 2008-03-12  David Hyatt  <hyatt@apple.com>
3859
3860         Eliminate setTextMultiplier from the bridge.  Make Webkit just call setZoomFactor on the frame directly.
3861
3862         Reviewed by Tim H.
3863
3864         * WebCore.base.exp:
3865         * page/mac/WebCoreFrameBridge.h:
3866         * page/mac/WebCoreFrameBridge.mm:
3867
3868 2008-03-12  Dan Bernstein  <mitz@apple.com>
3869
3870         Reviewed by Darin Adler and Sam Weinig.
3871
3872         - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
3873
3874         Use CTFontCopyGraphicsFont and CTFontGetPlatformFont on Leopard instead
3875         of wkGetCGFontFromNSFont and wkGetNSFontATSUFontId, relying on NSFont
3876         and CTFontRef being toll-free bridged.
3877
3878         * WebCore.Tiger.exp:
3879         * WebCore.base.exp:
3880         * platform/graphics/mac/FontMac.mm:
3881         (WebCore::Font::drawGlyphs): Changed to use the cgFont() accessor.
3882         * platform/graphics/mac/FontPlatformData.h:
3883         Made m_cgFont a RetainPtr on Leopard.
3884         (WebCore::toCTFontRef): Added a function that encapsulates the
3885         toll-free bridging.
3886         (WebCore::FontPlatformData::FontPlatformData):
3887         (WebCore::FontPlatformData::cgFont): Added this accessor method.
3888         * platform/graphics/mac/FontPlatformDataMac.mm:
3889         (WebCore::FontPlatformData::FontPlatformData): Changed to use
3890         CoreText API on Leopard.
3891         (WebCore::FontPlatformData::setFont): Ditto.
3892         * platform/graphics/mac/SimpleFontDataMac.mm:
3893         (WebCore::initFontData):
3894         (WebCore::pathFromFont):
3895         (WebCore::SimpleFontData::platformInit):
3896         (WebCore::SimpleFontData::platformWidthForGlyph):
3897         * platform/mac/WebCoreSystemInterface.mm:
3898
3899 2008-03-12  David Harrison  <harrison@apple.com>
3900
3901         Reviewed by Darin.
3902
3903         <rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[WebCoreAXObject isWebArea] + 8
3904
3905         The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was
3906         called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry.
3907         Also saw that cache clearing was missing from Document::detach(), and fixed that.
3908         
3909         Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
3910         
3911         Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled.
3912        
3913         * dom/Document.cpp:
3914         (WebCore::Document::attach):
3915         Assert that there is no AX cache (since there is no renderer).
3916         
3917         (WebCore::Document::detach):
3918         Destroy the AX cache installed on this document.
3919         
3920         (WebCore::Document::clearAXObjectCache):
3921         New. Destroy the AX cache associated with this document.
3922         
3923         (WebCore::Document::axObjectCache):
3924         Added some comments.
3925         
3926         * dom/Document.h:
3927         Declare clearAXObjectCache().
3928         
3929         * page/Frame.cpp:
3930         (WebCore::Frame::disconnectOwnerElement):
3931         Destroy the AX cache associated with this frame's document.
3932         
3933         * page/mac/AXObjectCacheMac.mm:
3934         (WebCore::AXObjectCache::remove):        
3935         * page/mac/WebCoreAXObject.mm:
3936         (-[WebCoreAXObject initWithRenderer:]):
3937         (-[WebCoreAXObject detach]):
3938         * rendering/RenderObject.cpp:
3939         (WebCore::RenderObject::RenderObject):
3940         (WebCore::RenderObject::~RenderObject):
3941         * rendering/RenderObject.h:
3942         (WebCore::RenderObject::setHasAXObject):
3943         (WebCore::RenderObject::hasAXObject):
3944         Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
3945         
3946         * rendering/RenderWidget.cpp:
3947         (WebCore::RenderWidget::destroy):
3948         Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the
3949         very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy().
3950
3951 2008-03-12  Xan Lopez  <xan@gnome.org>
3952
3953         Reviewed by Alp Toker.
3954
3955         http://bugs.webkit.org/show_bug.cgi?id=15229
3956
3957         Add Pango font backend.
3958
3959         Original patch by Sven Herzberg <sven@imendio.com>
3960
3961         * GNUmakefile.am:
3962         * platform/graphics/gtk/FontCacheGtk.cpp:
3963         (WebCore::FontCache::fontExists):
3964         * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Added.
3965         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
3966         (WebCore::FontCustomPlatformData::fontPlatformData):
3967         (WebCore::releaseData):
3968         (WebCore::createFontCustomPlatformData):
3969         * platform/graphics/gtk/FontPlatformData.h:
3970         (WebCore::FontPlatformData::FontPlatformData):
3971         (WebCore::FontPlatformData::hash):
3972         * platform/graphics/gtk/FontPlatformDataPango.cpp: Added.
3973         (WebCore::FontPlatformData::FontPlatformData):
3974         (WebCore::FontPlatformData::init):
3975         (WebCore::FontPlatformData::~FontPlatformData):
3976         (WebCore::FontPlatformData::isFixedPitch):
3977         (WebCore::FontPlatformData::setFont):
3978         (WebCore::FontPlatformData::operator==):
3979         * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: Added.
3980         (WebCore::pango_font_get_glyph):
3981         (WebCore::GlyphPage::fill):
3982         * platform/graphics/gtk/SimpleFontDataPango.cpp: Added.
3983         (WebCore::SimpleFontData::platformInit):
3984         (WebCore::SimpleFontData::platformDestroy):
3985         (WebCore::SimpleFontData::smallCapsFontData):
3986         (WebCore::SimpleFontData::containsCharacters):
3987         (WebCore::SimpleFontData::determinePitch):
3988         (WebCore::SimpleFontData::platformWidthForGlyph):
3989         (WebCore::SimpleFontData::setFont):
3990
3991 2008-03-12  Justin Garcia  <justin.garcia@apple.com>
3992
3993         Reviewed by Oliver.
3994         
3995         <rdar://problem/5770834> Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list
3996         
3997         Fixes some (but not all) of the instances of:
3998         <rdar://problem/5659795> CrashTracer: [REGRESSION] 187 crashes in Safari at com.apple.WebCore: WebCore::InsertTextCommand::prepareForTextInsertion + 241
3999         <rdar://problem/5779631> CrashTracer: [USER] 25 crashes in Mail at WebCore::InsertTextCommand::prepareForTextInsertion
4000
4001         * editing/InsertLineBreakCommand.cpp:
4002         (WebCore::InsertLineBreakCommand::doApply): applyStyle may have destroyed content that held
4003         the old endingSelection(), so we must recompute it.  Added a FIXME.  Added a few comments.
4004         * editing/RemoveFormatCommand.cpp:
4005         (WebCore::RemoveFormatCommand::doApply): Added a FIXME.
4006
4007 2008-03-11  Alexey Proskuryakov  <ap@webkit.org>
4008
4009         Reviewed by Darin.
4010
4011         <rdar://problem/5640615> REGRESSION (Safari 2-3): Changing subframe encoding rules broke
4012         some sites.
4013
4014         Other browsers' behavior keeps changing; let's implement what Firefox and Opera do now:
4015         if the frame and subframe belong to the same site, then the encoding is inherited from parent
4016         frame to subframe. Otherwise, it is not.
4017
4018         Always inheriting the encoding would cause a security problem.
4019
4020         Tests: http/tests/misc/frame-default-enc-different-domain.html
4021                http/tests/misc/frame-default-enc-same-domain.html
4022                fast/encoding/frame-default-enc.html
4023
4024         * loader/FrameLoader.cpp:
4025         (WebCore::FrameLoader::write): Also removed a check for m_frame->document() being non-null -
4026         this function also has code that uses it without checking, so it must be safe.
4027
4028 2008-03-12  Mark Rowe  <mrowe@apple.com>
4029
4030         Gtk build fix.
4031
4032         * page/Frame.h: Forward-declare FramePrivate.
4033
4034 2008-03-11  Steve Falkenburg  <sfalken@apple.com>
4035
4036         Disable LTCG/PGO for all of WebCore for now.
4037         We'll re-enable this as part of follow-on PGO work.
4038         
4039         Reviewed by Oliver.
4040
4041         * WebCore.vcproj/WebCore.vcproj:
4042
4043 2008-03-11  Darin Adler  <darin@apple.com>
4044
4045         Reviewed by Sam.
4046
4047         - remove all bridge-related things from WebCore except the bridge itself
4048
4049         * WebCore.base.exp: Removed the bridge and setBridge functions.
4050
4051         * loader/FrameLoader.cpp:
4052         (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
4053         close method.
4054
4055         * page/Frame.cpp:
4056         (WebCore::Frame::~Frame): Removed call to setBridge(0).
4057         (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
4058         * page/Frame.h: Removed setBridge and bridge functions.
4059         * page/FramePrivate.h: Removed m_bridge pointer.
4060         * page/mac/FrameMac.mm: Removed setBridge and bridge functions.
4061
4062         * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
4063         Removed bridgeForDOMDocument: and clearFrame methods.
4064         * page/mac/WebCoreFrameBridge.mm: Ditto.
4065         (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
4066         (-[WebCoreFrameBridge setWebCoreFrame:]): Added.
4067
4068 2008-03-11  Darin Adler  <darin@apple.com>
4069
4070         - restored some code I removed in the Range change; this code can't go
4071           until the rest of the Range fix is in
4072
4073         * dom/Range.cpp:
4074         (WebCore::Range::commonAncestorContainer): Added back the check for 0
4075         that I removed erroneously in the Range patch.
4076         (WebCore::Range::processContents): Left in assertions I used to debug
4077         this.
4078
4079 2008-03-11  Darin Adler  <darin@apple.com>
4080
4081         - fix Release build
4082
4083         * platform/mac/ScrollViewMac.mm:
4084         (WebCore::ScrollView::setContentsPos): Don't use NSMakePoint.
4085
4086 2008-03-11  Darin Adler  <darin@apple.com>
4087
4088         Reviewed by Anders.
4089
4090         - simplify Mac code for ScrollView, since it's used only for FrameView
4091           and not in two different modes like it was historically
4092         - remove code depending on the bridge to get from an NSView to a WebCore::Frame
4093
4094         * bindings/objc/DOMHTML.mm:
4095         (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView.
4096
4097         * bridge/jni/jni_jsobject.cpp:
4098         (createRootObject): Instead of using WebCoreViewFactory to find the frame given
4099         and NSView, use the WebCoreFrameView interface to do it.
4100
4101         * editing/mac/EditorMac.mm:
4102         (WebCore::Editor::paste): getDocumentView -> documentView.
4103         * editing/mac/SelectionControllerMac.mm:
4104         (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto.
4105
4106         * page/FrameView.h: Fixed comment.
4107
4108         * page/InspectorController.cpp:
4109         (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts
4110         to ScrollView* since FrameView is derived from ScrollView.
4111
4112         * page/mac/EventHandlerMac.mm:
4113         (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView.
4114         * page/mac/FrameMac.mm:
4115         (WebCore::Frame::imageFromRect): Ditto.
4116         * page/mac/WebCoreAXObject.mm:
4117         (-[WebCoreAXObject position]): Ditto.
4118         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
4119         (-[WebCoreAXObject rendererForView:]): Updated code that used to use
4120         WebCoreBridgeHolder to use WebCoreFrameView instead.
4121
4122         * page/mac/WebCoreFrameBridge.mm:
4123         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
4124         getDocumentView -> documentView.
4125
4126         * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just
4127         use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to
4128         WebCoreFrameScrollView, since it's a protocol for the scroll view, not the
4129         frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView
4130         protocol, which returns a WebCore::Frame directly rather than a bridge.
4131
4132         * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method.
4133
4134         * platform/ScrollView.h: Moved the constructor and destructor out of the
4135         class-specific #if blocks. Renamed Mac-specific function that gets the
4136         NSView for from getDocumentView to documentView and a scrollView function
4137         that returns an appropriately classed NSScrollView.
4138
4139         * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView
4140         instead of Widget.
4141         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
4142         (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast.
4143
4144         * platform/mac/PopupMenuMac.mm:
4145         (WebCore::PopupMenu::show): getDocumentView -> documentView.
4146         * platform/mac/ScrollViewMac.mm:
4147         (WebCore::ScrollView::ScrollView): Added.
4148         (WebCore::ScrollView::~ScrollView): Added.
4149         (WebCore::ScrollView::scrollView): Added.
4150         (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case.
4151         (WebCore::ScrollView::visibleHeight): Ditto.
4152         (WebCore::ScrollView::visibleContentRect): Ditto.
4153         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto.
4154         (WebCore::ScrollView::contentsWidth): Ditto.
4155         (WebCore::ScrollView::contentsHeight): Ditto.
4156         (WebCore::ScrollView::contentsX): Ditto.
4157         (WebCore::ScrollView::contentsY): Ditto.
4158         (WebCore::ScrollView::scrollOffset): Ditto.
4159         (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto.
4160         (WebCore::ScrollView::setContentsPos): Ditto.
4161         (WebCore::ScrollView::setVScrollbarMode): Ditto.
4162         (WebCore::ScrollView::setHScrollbarMode): Ditto.
4163         (WebCore::ScrollView::setScrollbarsMode): Ditto.
4164         (WebCore::ScrollView::vScrollbarMode): Ditto.
4165         (WebCore::ScrollView::hScrollbarMode): Ditto.
4166         (WebCore::ScrollView::suppressScrollbars): Ditto.
4167         (WebCore::ScrollView::addChild): Ditto.
4168         (WebCore::ScrollView::resizeContents): Ditto.
4169         (WebCore::ScrollView::updateContents): Ditto.
4170         (WebCore::ScrollView::contentsToWindow): Ditto.
4171         (WebCore::ScrollView::windowToContents): Ditto.
4172         (WebCore::ScrollView::setStaticBackground): Ditto.
4173         (WebCore::ScrollView::documentView): Renamed and removed unused case.
4174         (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment.
4175
4176         * platform/mac/WidgetMac.mm:
4177         (WebCore::Widget::getOuterView): Update for protocol name change.
4178
4179         * rendering/RenderThemeMac.mm:
4180         (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView.
4181         (WebCore::RenderThemeMac::paintRadio): Ditto.
4182         (WebCore::RenderThemeMac::paintButton): Ditto.
4183         (WebCore::RenderThemeMac::paintMenuList): Ditto.
4184         (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
4185         (WebCore::RenderThemeMac::paintSearchField): Ditto.
4186         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto.
4187         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto.
4188         (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto.
4189
4190 2008-03-11  Brent Fulgham  <bfulgham@gmail.com>
4191
4192         Reviewed by Adam Roben.
4193
4194         Split CookieJarWin.cpp into CFNet and non-CFNet versions to
4195         reduce the massive amount of conditionalization in the file.
4196         (see http://bugs.webkit.org/show_bug.cgi?id=17788)
4197
4198         * WebCore.vcproj/WebCore.vcproj:
4199         * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp.
4200         (WebCore::setCookies):
4201         (WebCore::cookies):
4202         (WebCore::cookiesEnabled):
4203         * platform/network/win/CookieJarWin.cpp:
4204         (WebCore::setCookies):
4205         (WebCore::cookies):
4206         (WebCore::cookiesEnabled):
4207
4208 2008-03-11  Darin Adler  <darin@apple.com>
4209
4210         Reviewed by Sam.
4211
4212         - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
4213
4214         * page/ChromeClient.h: Added new client functions to replace calls up to WebKit
4215         that were formerly handled by the bridge.
4216
4217         * page/Frame.h: Removed unneeded declarations. Moved declarations of script-specific
4218         functions to a ScriptController section. Removed willPopupMenu.
4219
4220         * page/mac/ChromeMac.mm:
4221         (WebCore::Chrome::focusNSView): Changed to call firstResponder and makeFirstResponder
4222         via the client instead of the bridge.
4223
4224         * page/mac/EventHandlerMac.mm:
4225         (WebCore::EventHandler::passMouseDownEventToWidget): Changed to call firstResponder
4226         and makeFirstResponder via the chrome client instead of the bridge.
4227
4228         * page/mac/FrameMac.mm: Removed willPopupMenu.
4229
4230         * page/mac/WebCoreFrameBridge.h: Removed WebCoreFrameBridge protocol and
4231         SubclassResponsibility category. Also removed some unneeded imports.
4232
4233         * platform/mac/PopupMenuMac.mm:
4234         (WebCore::PopupMenu::show): Call willPopUpMenu on chrome client instead of frame.
4235
4236         * platform/mac/WidgetMac.mm:
4237         (WebCore::Widget::setIsSelected): Call functions directly on the view rather than
4238         calling via the bridge.
4239
4240 2008-03-11  Darin Adler  <darin@apple.com>
4241
4242         Reviewed by Mitz.
4243
4244         - make some Range improvements (preparation for Range support for DOM mutation)
4245
4246         Made constructors private, added create functions.
4247         Made refcount start at 1 rather than starting at 0 and being incremented.
4248         Made Range use two Position objects for the start/end container/offset pairs.
4249
4250         * WebCore.base.exp: Updated.
4251
4252         * dom/Document.cpp:
4253         (WebCore::Document::createRange): Changed to use Range::create.
4254         (WebCore::Document::removeMarkers): Updated for Range::first/pastLastNode name change.
4255
4256         * dom/Position.cpp:
4257         (WebCore::Position::formatForDebugger): Updated for member variable name change.
4258         (WebCore::Position::showTreeForThis): Ditto.
4259         (WebCore::startPosition): Changed to use Range::startPosition.
4260         (WebCore::endPosition): Changed to use Range::endPosition.
4261
4262         * dom/Position.h: Made the data members public and renamed them to container
4263         and offset. But since offset() is already a function, temporarily used posOffset
4264         for the data member. Later we'll get rid of offset(). Made more functions inline.
4265         Removed the constructor that takes a PositionIterator.
4266
4267         * dom/PositionIterator.cpp:
4268         (WebCore::PositionIterator::operator Position): Added. Replaces the constructor
4269         that used to be in Position.
4270         * dom/PositionIterator.h: Added conversion operator to produce a Position.
4271         Removed friend declaration for Position.
4272
4273         * dom/Range.cpp:
4274         (WebCore::Range::Range): Updated constructors for data member changes and made
4275         them use a refcount of 1.
4276         (WebCore::Range::create): Added.
4277         (WebCore::Range::startContainer): Updated to eliminate use of m_detached; detached
4278         is now indicated by m_start.container of 0. Also updated