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