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