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