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