5be7c5dfd4a186e6ccd3af6eec32e76d31e98a94
[WebKit.git] / WebCore / ChangeLog
1 2008-03-16  Maciej Stachowiak  <mjs@apple.com>
2
3         Reviewed by Darin.
4
5         - fixed "Acid3 expects different exceptions for surroundContents calls involving comment nodes (affects Acid3 test 11)"
6         http://bugs.webkit.org/show_bug.cgi?id=17509
7         
8         This gets us to 92/100
9
10         * dom/Range.cpp:
11         (WebCore::Range::surroundContents): Check for
12         HIERARCHY_REQUEST_ERR before BAD_BOUNDARYPOINTS_ERR, since Acid3
13         expects exceptional conditions to be tested in the order that the
14         spec lists them. Also, adjust the HIERARCHY_REQUEST_ERR check. If
15         the start point of the range is in a comment node, the node that
16         would be the parent of a partial replacement is actually the
17         comment node's parent (since comment nodes have character
18         indices), so we should do the HIERARCHY_REQUEST_ERR check based on
19         the parent of the comment node, as for text nodes, even though it
20         will fail later with a different exception because it is not
21         allowed to surround a partially selected non-text node.
22
23 2008-03-16  Marvin Decker  <marv.decker@gmail.com>
24
25         Reviewed by Darin.
26
27         Fix bug 15119: URL query characters that are unencodable in the
28         request's character set should be converted to XML entities with
29         non-alphanumeric characters escaped.
30
31         Test: http/tests/uri/escaped-entity.html
32
33         * html/FormDataList.cpp:
34         (WebCore::FormDataList::appendString):
35         * html/HTMLFormElement.cpp:
36         (WebCore::HTMLFormElement::formData):
37         * platform/KURL.cpp:
38         (WebCore::encodeRelativeString):
39         * platform/text/String.cpp:
40         (WebCore::String::latin1):
41         (WebCore::String::utf8):
42         * platform/text/TextCodec.cpp:
43         (WebCore::TextCodec::unencodableCharReplacement):
44         * platform/text/TextCodec.h:
45         (WebCore::):
46         * platform/text/TextCodecICU.cpp:
47         (WebCore::urlEscapedEntityCallback):
48         (WebCore::gbkUrlEscapedEntityCallack):
49         (WebCore::TextCodecICU::encode):
50         * platform/text/TextCodecICU.h:
51         (WebCore::TextCodecICU::setNeedsGBKFallbacks):
52         * platform/text/TextCodecLatin1.cpp:
53         (WebCore::encodeComplexWindowsLatin1):
54         (WebCore::TextCodecLatin1::encode):
55         * platform/text/TextCodecLatin1.h:
56         * platform/text/TextCodecUTF16.cpp:
57         (WebCore::TextCodecUTF16::encode):
58         * platform/text/TextCodecUTF16.h:
59         * platform/text/TextCodecUserDefined.cpp:
60         (WebCore::encodeComplexUserDefined):
61         (WebCore::TextCodecUserDefined::encode):
62         * platform/text/TextCodecUserDefined.h:
63         * platform/text/TextEncoding.cpp:
64         (WebCore::TextEncoding::encode):
65         * platform/text/TextEncoding.h:
66         * platform/text/mac/TextCodecMac.cpp:
67         (WebCore::TextCodecMac::encode):
68         * platform/text/mac/TextCodecMac.h:
69         * xml/XMLHttpRequest.cpp:
70         (WebCore::XMLHttpRequest::send):
71
72 2008-03-16  Kevin Ollivier  <kevino@theolliviers.com>
73
74         Rubber stamped by Darin.
75
76         Add set-webkit-configuration support for wx port, and centralize
77         build dir location setting.
78
79         http://bugs.webkit.org/show_bug.cgi?id=17790
80
81         * webcore-base.bkl:
82
83 2008-03-16  Darin Adler  <darin@apple.com>
84
85         Reviewed by Mark Rowe.
86
87         - http://bugs.webkit.org/show_bug.cgi?id=17881
88           a little cleanup for HTMLTextAreaElement
89
90         Tests: fast/forms/textarea-default-value-leading-newline.html
91                fast/forms/textarea-linewrap-dynamic.html
92
93         * html/HTMLTextAreaElement.cpp:
94         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Tweaked names/
95         (WebCore::HTMLTextAreaElement::selectionStart): Ditto, also use early return
96         and check for < 0 rather than -1 specifically.
97         (WebCore::HTMLTextAreaElement::selectionEnd): Ditto.
98         (WebCore::HTMLTextAreaElement::setSelectionStart): Early return.
99         (WebCore::HTMLTextAreaElement::setSelectionEnd): Ditto.
100         (WebCore::HTMLTextAreaElement::select): Ditto.
101         (WebCore::HTMLTextAreaElement::setSelectionRange): Ditto.
102         (WebCore::HTMLTextAreaElement::parseMappedAttribute): Changed value parsing
103         to treat unknown values as meaning "default" rather than "leave value as-is".
104         Only call setNeedsLayoutAndPrefWidthsRecalc when mode changed.
105         (WebCore::HTMLTextAreaElement::createRenderer): Removed name of unused argument.
106         (WebCore::HTMLTextAreaElement::appendFormData): Updated for name changes.
107         (WebCore::HTMLTextAreaElement::isKeyboardFocusable): Got rid of unnneeded explicit
108         class name in isFocusable call.
109         (WebCore::HTMLTextAreaElement::isMouseFocusable): Ditto.
110         (WebCore::HTMLTextAreaElement::updateFocusAppearance): Tweaked formatting.
111         (WebCore::HTMLTextAreaElement::defaultEventHandler): Ditto.
112         (WebCore::HTMLTextAreaElement::updateValue): Early return.
113         (WebCore::HTMLTextAreaElement::setValue): Got rid of intermediate value to
114         eliminate on small refcount churn.
115         (WebCore::HTMLTextAreaElement::defaultValue): Got rid of unneeded redundant
116         string length checks, since String already checks all indexing and returns 0.
117         (WebCore::HTMLTextAreaElement::setDefaultValue): Added code to normalize
118         line endings and add a leading line ending to fix cases where the first
119         character is a newline.
120         (WebCore::HTMLTextAreaElement::accessKeyAction): Removed name of unused arg.
121         (WebCore::HTMLTextAreaElement::accessKey): Changed return value to avoid
122         refcount churn.
123         (WebCore::HTMLTextAreaElement::selection): Updated names and use < 0 instead
124         of -1 specifically.
125
126         * html/HTMLTextAreaElement.h: Replaced wrap function with more-specific
127         shouldWrapText one. Changed return value of accessKey. Made WrapMethod enum
128         provate and renamed the values. Renamed cachedSelStart and cachedSelEnd to
129         m_cachedSelectionStart and m_cachedSelectionEnd.
130
131         * rendering/RenderTextControl.cpp:
132         (WebCore::RenderTextControl::createInnerTextStyle): Updated for change to
133         HTMLTextAreaElement wrap function.
134
135 2008-03-16  Antti Koivisto  <antti@apple.com>
136
137         Reviewed by Mitz.
138
139         Fix http/tests/security/frame-loading-via-document-write.html
140         which was broken by the preload patch.
141         
142         Don't print error message when preload fails local file security check.
143         Some minor refactoring.
144
145         * html/PreloadScanner.cpp:
146         (WebCore::PreloadScanner::emitTag):
147         (WebCore::PreloadScanner::emitCSSRule):
148         * loader/Cache.cpp:
149         (WebCore::Cache::requestResource):
150         * loader/Cache.h:
151         * loader/DocLoader.cpp:
152         (WebCore::DocLoader::requestResource):
153         (WebCore::DocLoader::preload):
154         (WebCore::DocLoader::printPreloadStats):
155         * loader/DocLoader.h:
156
157 2008-03-16  Antti Koivisto  <antti@apple.com>
158
159         Reviewed by Darin.
160         
161         Fix http://bugs.webkit.org/show_bug.cgi?id=17862
162         REGRESSION (r31038): Reproducible crash under DocLoader::checkForReload() at marware.com
163         
164         This was a memory smasher introduced by the preloading patch. 
165         If a script resource was marked uncacheable, early deletion of the 
166         Request object would cause deletion of the CachedResource too if
167         it was referred more than once in a single document.
168
169         Test: http/tests/misc/uncacheable-script-repeated.html
170
171         * loader/loader.cpp:
172         (WebCore::Loader::Host::servePendingRequests):
173         (WebCore::Loader::Host::didFinishLoading):
174
175 2008-03-16  Yuzhu Shen  <yuzhu.shen@gmail.com>
176
177         Reviewed by Darin.
178
179         Fix bug http://bugs.webkit.org/show_bug.cgi?id=17714
180         <img href="#"> should go to top of the page.
181
182         Test: fast/html/empty-fragment-id-goto-top.html
183
184         * loader/FrameLoader.cpp:
185         (WebCore::FrameLoader::gotoAnchor):
186
187 2008-03-16  Thiago Macieira  <thiago.macieira@trolltech.com>
188
189         Reviewed by Darin.
190
191         Don't use RefPtr in classes you haven't seen the implementation of.
192
193         Forward-declaration and declaration of RefPtr<Foo> is ok. But you
194         cannot *use* said objects until Foo is defined. This is true even for
195         initialisation with a 0.
196
197         Seems the HP aCC compiler is more strict here than gcc.
198
199         * editing/SplitTextNodeCommand.h:
200         * page/FrameTree.h:
201         * xml/XPathExpressionNode.h:
202
203 2008-03-16  Darin Adler  <darin@apple.com>
204
205         Reviewed by Mitz.
206
207         - fix http://bugs.webkit.org/show_bug.cgi?id=14941
208           <rdar://problem/5404093> textarea value from JavaScript includes extra newline
209
210         Test: fast/forms/textarea-trailing-newline.html
211
212         * rendering/RenderTextControl.cpp:
213         (WebCore::RenderTextControl::finishText): Added code to strip the trailing
214         newline. It's possible there are some obscure cases where this is not wanted,
215         but I couldn't find any. If someone finds a case where this is bad, we can
216         make the code conditional.
217
218 2008-03-16  Darin Adler  <darin@apple.com>
219
220         Reviewed by Mitz.
221
222         - fix http://bugs.webkit.org/show_bug.cgi?id=17876
223           Attempting to visit Ofcom page causes crash
224
225         This is causing intermittent crashes on some existing test cases on the buildbot
226         too; I don't have a 100% test case right now, but it should be easy to add one later
227         and this does fix a crash in a test we already have.
228
229         * dom/CharacterData.cpp:
230         (WebCore::CharacterData::CharacterData): Initialize m_data to the empty string,
231         not the null string. The class assumes the string can never being null.
232         (WebCore::CharacterData::setData): If asked to set the data to the null string,
233         set it to the empty string instead. This matches what the (non-empty) constructor
234         has always done.
235
236 2008-03-15  Timothy Hatcher  <timothy@apple.com>
237
238         Reviewed by Adam Roben.
239
240         Bug 17870: Web Inspector console should feel more like a terminal
241         http://bugs.webkit.org/show_bug.cgi?id=17870
242
243         Bug 14390: Console input area should be more noticeable
244         http://bugs.webkit.org/show_bug.cgi?id=14390
245
246         Adds tab completion, auto completion and a blended input prompt.
247         The prompt is also focused when the console is shown.
248            Implements a new look, that will be part of the UI refresh.
249
250         * page/inspector/ConsolePanel.js: 
251         (WebInspector.ConsolePanel): Renamed a few properties.
252         (WebInspector.ConsolePanel.get/set promptText): Property to set
253         and get the current prompt text. Does not affect command history.
254         (WebInspector.ConsolePanel.show): Make the prompt focus on show.
255         (WebInspector.ConsolePanel.acceptAutoComplete): Accepts any
256         pending auto complete text.
257         (WebInspector.ConsolePanel.clearAutoComplete): Cancels any pending
258         auto complete text.
259         (WebInspector.ConsolePanel.autoCompleteSoon): Sets a timeout to auto
260         complete in 250 ms, only if there isn't a pending auto complete.
261         (WebInspector.ConsolePanel.complete): 
262         (WebInspector.ConsolePanel.completions): Generate a list of possible
263         completions based on the prefix and the previous expression ranges.
264         (WebInspector.ConsolePanel._backwardsRange): Helper to scan backwards
265         from a node and offset to find a start node and offset of the first
266         character found in the characters string.
267         (WebInspector.ConsolePanel._evalInInspectedWindow): Helper to eval in the
268         inspected window.
269         (WebInspector.ConsolePanel._caretInsidePrompt): Returns true if the selection
270         is collapsed and is inside the prompt element.
271         (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Moves the selection
272         to the end of the prompt.
273         (WebInspector.ConsolePanel._onTabPressed): Calls complete on
274         tab press.
275         (WebInspector.ConsolePanel._onEnterPressed): Call clearAutoComplete so the
276         autocompletion text is not evaluated.
277
278         * page/inspector/Images/errorIcon.png: New image.
279         * page/inspector/Images/userInputIcon.png: Added.
280         * page/inspector/Images/userInputPreviousIcon.png: Added.
281         * page/inspector/Images/warningIcon.png: New image.
282         * page/inspector/inspector.css: New refreshed UI.
283
284 2008-03-15  Mark Mentovai  <mark@moxienet.com>
285
286         Reviewed and landed by Darin.
287
288         - http://bugs.webkit.org/show_bug.cgi?id=17833
289           use file extensions instead of explicit file types in WebCore's Xcode project
290
291         * WebCore.xcodeproj/project.pbxproj: Remove unnecessary
292           uses of explicitFileType, preferring lastKnownFileType ("File Type:
293           Default for File" in Xcode's File Info's General tab).  Files below
294           that relied on an explicit file type setting other than what would
295           be implied by their extensions have been renamed to have correct
296           extensions.
297         * bridge/jni/jni_jsobject.cpp: Removed.
298         * bridge/jni/jni_jsobject.mm: Copied from bridge/jni/jni_jsobject.cpp.
299         * loader/mac/LoaderNSURLExtras.m: Removed.
300         * loader/mac/LoaderNSURLExtras.mm: Copied from loader/mac/LoaderNSURLExtras.m.
301         * platform/mac/SharedTimerMac.cpp: Removed.
302         * platform/mac/SharedTimerMac.mm: Copied from platform/mac/SharedTimerMac.cpp.
303
304 2008-03-15  Darin Adler  <darin@apple.com>
305
306         Reviewed by Sam.
307
308         - fix http://bugs.webkit.org/show_bug.cgi?id=11997
309           Ranges are not fixed after mutation (affects Acid3 test 13)
310
311         Test: fast/dom/Range/mutation.html
312
313         * WebCore.xcodeproj/project.pbxproj: Added NodeWithIndex.h, NodeWithIndexAfter.h,
314         and NodeWithIndexBefore.h.
315
316         * dom/CharacterData.cpp:
317         (WebCore::CharacterData::setData): Replaced call to Document::removeMarkers
318         with call to Document::textRemoved.
319         (WebCore::CharacterData::insertData): Replaced call to Document::shiftMarkers
320         with call to Document::textInserted.
321         (WebCore::CharacterData::deleteData): Replaced call to Document::removeMarkers
322         and Document::shiftMarkers with call to Document::textRemoved.
323         (WebCore::CharacterData::replaceData): Replaced call to Document::removeMarkers
324         and Document::shiftMarkers with call to Document::textRemoved and
325         Document::textInserted.
326         (WebCore::CharacterData::containsOnlyWhitespace): Tweaked a bit.
327
328         * dom/ContainerNode.cpp:
329         (WebCore::ContainerNode::childrenChanged): Added a call to
330         Document::nodeChildrenChanged when the nmber of children was changed (and not
331         by the parser).
332         (WebCore::dispatchChildRemovalEvents): Updated for name change.
333
334         * dom/Document.cpp:
335         (WebCore::Document::~Document): Assert that all ranges are gone.
336         (WebCore::Document::nodeChildrenChanged): Added. Calls nodeChildrenChanged on
337         all ranges.
338         (WebCore::Document::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
339         Added code to call nodeWillBeRemoved on all ranges.
340         (WebCore::Document::textInserted): Added. Calls textInserted on all ranges and
341         also calls shiftMarkers.
342         (WebCore::Document::textRemoved): Added. Calls textRemoved on all ranges and also
343         calls removeMarkers and shiftMarkers.
344         (WebCore::Document::textNodesMerged): Added. Calls textNodesMerged on all ranges.
345         (WebCore::Document::textNodeSplit): Added. Calls textNodeSplit on all ranges.
346         (WebCore::Document::attachRange): Added. Adds range to the HashSet of all ranges
347         for this document.
348         (WebCore::Document::detachRange): Added. Removes range from the HashSet.
349         * dom/Document.h: Added the new functions and the data member.
350
351         * dom/Element.cpp:
352         (WebCore::Element::normalizeAttributes): Added. Contains the part of the
353         normalize function that's specific to Element. Better encapsulation to have it
354         here rather than in Node::normalize.
355         * dom/Element.h: Added the new function.
356
357         * dom/Node.cpp:
358         (WebCore::Node::normalize): Rewrote so it's no longer recursive. Also added
359         a call to textNodesMerged after each pair of nodes is merged but before the
360         second node is removed.
361         (WebCore::Node::traverseNextNodePostOrder): Added. Helper function used by
362         normalize, but also useful elsewhere.
363         * dom/Node.h: Added the new function.
364
365         * dom/NodeIterator.cpp:
366         (WebCore::NodeIterator::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
367         * dom/NodeIterator.h: Ditto.
368
369         * dom/ProcessingInstruction.cpp:
370         (WebCore::ProcessingInstruction::setData): Call textRemoved.
371
372         * dom/Range.cpp:
373         (WebCore::NodeWithIndex::index): Added. Computes and stores index.
374         (WebCore::NodeWithIndexBefore::indexBefore): Added. Computes and stores index.
375         (WebCore::NodeWithIndexAfter::indexAfter): Added. Computes and stores index.
376         (WebCore::Range::Range): Call attachRange.
377         (WebCore::Range::~Range): Call detachRange unless the range is already detached.
378         (WebCore::Range::commonAncestorContainer): Removed check for WRONG_DOCUMENT_ERR.
379         It's no longer possible to create a range where the two containers are non-zero
380         and have no common ancestor.
381         (WebCore::Range::isPointInRange): Rewrote expression to be more readable.
382         (WebCore::Range::compareNode): Changed local variable to use int for consistency.
383         (WebCore::Range::compareBoundaryPoints): Replaced ASSERT with ASSERT_NOT_REACHED.
384         (WebCore::Range::deleteContents): Removed check for INVALID_STATE_ERR and
385         initialization of ec to 0; both are now inside checkDeleteExtract.
386         (WebCore::Range::intersectsNode): Changed local variable to use int for consistency.
387         Also changed comparison to use < 0 and >= 0 rather than checking explicitly for 1
388         and -1.
389         (WebCore::Range::processContents): Changed code to not get the nodeType multiple
390         times on the same node, and tweaked formatting. Removed code to update the range
391         on deletion, because the normal delete logic will take care of that now.
392         (WebCore::Range::extractContents): Removed check for INVALID_STATE_ERR and
393         initialization of ec to 0; both are now inside checkDeleteExtract.
394         (WebCore::Range::insertNode): Changed local variable to use int for consistency.
395         (WebCore::Range::toString): Changed variable name to pastLast.
396         (WebCore::Range::detach): Call detachRange.
397         (WebCore::Range::checkDeleteExtract): Added check for detached range and code to
398         set ec to 0; moved here from the two callers. Also changed variable name to pastLast.
399         (WebCore::endpointNodeChildrenChanged): Added.
400         (WebCore::Range::nodeChildrenChanged): Added.
401         (WebCore::endpointNodeWillBeRemoved): Added.
402         (WebCore::Range::nodeWillBeRemoved): Added.
403         (WebCore::endpointTextInserted): Added.
404         (WebCore::Range::textInserted): Added.
405         (WebCore::endpointTextRemoved): Added.
406         (WebCore::Range::textRemoved): Added.
407         (WebCore::endpointTextNodesMerged): Added.
408         (WebCore::Range::textNodesMerged): Added.
409         (WebCore::endpointTextNodesSplit): Added.
410         (WebCore::Range::textNodeSplit): Added.
411
412         * dom/Range.h: Added new member functions.
413
414         * dom/NodeWithIndex.h: Added. Makes it so we won't find the index for the same
415         node more than once.
416         * dom/NodeWithIndexAfter.h: Added. Similar to NodeWithIndex but gives the index after a
417         node and treats a node pointer of 0 as meaning "before first node in parent container".
418         * dom/NodeWithIndexBefore.h: Added.  Similar to NodeWithIndex but treats a node pointer of 0
419         as meaning "after last node in parent container".
420
421         * dom/Text.cpp:
422         (WebCore::Text::splitText): Call textNodeSplit.
423
424         * editing/ApplyStyleCommand.cpp:
425         (WebCore::ApplyStyleCommand::applyInlineStyle): Changed variable name to pastLast.
426
427 2008-03-15  Julien Chaffraix  <julien.chaffraix@gmail.com>
428
429         Reviewed by Holger.
430
431         [CURL] Crash below ResourceHandleManager::setupPOST when job->request().httpBody() is NULL
432         http://bugs.webkit.org/show_bug.cgi?id=16906
433
434         Add null checks for httpBody() to match other ports.
435
436         Test: http/tests/xmlhttprequest/xmlhttprequest-post-crash.html
437
438         * platform/network/curl/ResourceHandleManager.cpp:
439         (WebCore::readCallback): Add null check.
440         (WebCore::ResourceHandleManager::setupPOST): Ditto.
441
442 2008-03-14  Steve Falkenburg  <sfalken@apple.com>
443
444         PGO build fixes.
445
446         * WebCore.vcproj/WebCore.vcproj:
447
448 2008-03-14  Anders Carlsson  <andersca@apple.com>
449
450         Reviewed by Sam.
451
452         <rdar://problem/5794989>
453         https://bugs.webkit.org/show_bug.cgi?id=17792
454         REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
455
456         Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
457         so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame.
458         
459         * bindings/js/JSDOMWindowBase.cpp:
460         (WebCore::createWindow):
461         * loader/FrameLoader.cpp:
462         (WebCore::FrameLoader::createWindow):
463         * loader/FrameLoader.h:
464
465 2008-03-14  Dan Bernstein  <mitz@apple.com>
466
467         Reviewed by Mark Rowe.
468
469         - fix <rdar://problem/5797836> shadow offsets are smaller than specified
470
471         * platform/graphics/cg/GraphicsContextCG.cpp:
472         (WebCore::GraphicsContext::setShadow): Made the workaround for
473         <rdar://problem/5539388> unconditional.
474
475 2008-03-14  Adam Roben  <aroben@apple.com>
476
477         Fix it right this time
478
479         * platform/MainThread.cpp: Cast to unsigned so we can use %u in the
480         format string.
481         * platform/mac/MainThreadMac.mm:
482
483 2008-03-14  Adam Roben  <aroben@apple.com>
484
485         Mac build fix
486
487         * platform/mac/MainThreadMac.mm: Corrected a typo.
488
489 2008-03-14  Dan Bernstein  <mitz@apple.com>
490
491         Reviewed by Darin Adler.
492
493         - fix http://bugs.webkit.org/show_bug.cgi?id=17834
494           REGRESSION: floated first-letter does not work when included in table
495
496         Test: fast/css/first-letter-float.html
497
498         * rendering/RenderBlock.cpp:
499         (WebCore::RenderBlock::updateFirstLetter): Changed the search for the
500         first text node to stop at a float if that float is an existing first-
501         letter.
502
503 2008-03-14  Sam Weinig  <sam@webkit.org>
504
505         Fix Mac build
506
507         * WebCore.xcodeproj/project.pbxproj:
508
509 2008-03-13  Adam Roben  <aroben@apple.com>
510
511         Make most of callOnMainThread's implementation be cross-platform
512
513         I took the non-platform-specific parts of MainThreadWin.cpp and moved
514         them to a new MainThread.cpp. Each platform is now responsible for
515         implementing one function, scheduleDispatchFunctionsOnMainThread,
516         which is supposed to set things up so that
517         dispatchFunctionsFromMainThread gets called from the main thread in
518         the near future.
519
520         Reviewed by Alexey.
521
522         * GNUmakefile.am: Added MainThread.cpp to the project.
523         * WebCore.pro: Ditto.
524         * WebCore.vcproj/WebCore.vcproj: Ditto.
525         * WebCore.xcodeproj/project.pbxproj: Ditto.
526         * WebCoreSources.bkl: Ditto.
527         * platform/MainThread.cpp:
528           - Copied from WebCore/platform/win/MainThreadWin.cpp.
529           - Removed the Windows-specific parts.
530         (WebCore::callOnMainThread): Changed to call
531         scheduleDispatchFunctionsOnMainThread instead of PostMessage.
532         * platform/gtk/MainThreadGtk.cpp:
533         (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now
534         just calls dispatchFunctionsFromMainThread.
535         (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through
536         to g_timeout_add.
537         * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to
538         WebCoreMainThreadCaller.
539         (-[WebCoreMainThreadCaller call]): Calls through to
540         dispatchFunctionsFromMainThread.
541         (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new
542         WebCoreMainThreadCaller and calls performSelectorOnMainThread on it.
543         * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent.
544         (WebCore::MainThreadInvoker::event): Chagned to call through to
545         dispatchFunctionsFromMainThread.
546         (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event
547         to the MainThreadInvoker.
548         * platform/win/MainThreadWin.cpp:
549           - Removed the non-Windows-specific parts.
550           - Removed some unnecessary initialization of static variables to 0.
551         (WebCore::ThreadingWindowWndProc): Changed to call
552         dispatchFunctionsFromMainThread.
553         (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to
554         PostMessage.
555         * platform/wx/MainThreadWx.cpp:
556         (WebCore::scheduleDispatchFunctionsOnMainThread): Added.
557
558 2008-03-14  Beth Dakin  <bdakin@apple.com>
559
560         Reviewed by Geoff.
561
562         Fix for <rdar://problem/5728171> Potential PLT speedup: don't 
563         realloc every time inside NamedAttrMap::addAttribute
564
565         The speed-up for this turned out to be so small that it is mostly 
566         imperceptible. It is likely that it is a tiny boost, though, and 
567         the new code is much cleaner.
568
569         * dom/Element.cpp:
570         (WebCore::Element::setAttributeMap): attrs is now called 
571         m_attributes
572         * dom/NamedAttrMap.cpp: The array attrs is now the Vector of 
573         RefPtrs called m_attributes, and there is no longer any need for 
574         the len member variable. 
575         (WebCore::NamedAttrMap::NamedAttrMap): 
576         (WebCore::NamedAttrMap::item):
577         (WebCore::NamedAttrMap::getAttributeItem):
578         (WebCore::NamedAttrMap::clearAttributes):
579         (WebCore::NamedAttrMap::operator=):
580         (WebCore::NamedAttrMap::addAttribute):
581         (WebCore::NamedAttrMap::removeAttribute):
582         (WebCore::NamedAttrMap::mapsEquivalent):
583         * dom/NamedAttrMap.h: Same.
584         (WebCore::NamedAttrMap::length):
585         (WebCore::NamedAttrMap::attributeItem):
586         (WebCore::NamedAttrMap::shrinkToLength):
587         (WebCore::NamedAttrMap::reserveCapacity):
588         * html/HTMLTokenizer.cpp: One of the benefits of the old array was 
589         that it never took up more memory than it needed to. So the 
590         tokenizer utilizes new member functions on NamedAttrMap 
591         (shrinkToLength and reserveCapacity) to try to keep memory usage at 
592         a minimum. 
593         (WebCore::Token::addAttribute):
594         (WebCore::HTMLTokenizer::processToken):
595
596 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
597
598         BUILD FIX when ENABLE(MAC_JAVA_BRIDGE) set to 0.
599
600         * page/mac/FrameMac.mm: Move up #if ENABLE(MAC_JAVA_BRIDGE) guard
601         to comment out unused code.
602
603 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
604
605         Unify concept of enabling the Mac Java bridge.
606
607         Reviewed by Darin and Anders.
608
609         No test cases added since there is no change in functionality.
610
611         * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro.
612         If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES.
613         * WebCore.JNI.exp: Added.
614         * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp.
615
616         * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
617         * bridge/jni/jni_class.h: Ditto.
618         * bridge/jni/jni_instance.cpp: Ditto.
619         * bridge/jni/jni_instance.h: Ditto.
620         * bridge/jni/jni_jsobject.cpp: Ditto.
621         * bridge/jni/jni_jsobject.h: Ditto.
622         * bridge/jni/jni_objc.mm: Ditto.
623         * bridge/jni/jni_runtime.cpp: Ditto.
624         * bridge/jni/jni_runtime.h: Ditto.
625         * bridge/jni/jni_utility.cpp: Ditto.
626         * bridge/jni/jni_utility.h: Ditto.
627
628         * bridge/runtime.cpp: Removed unused #include statements.
629         * bridge/runtime.h:
630         (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE)
631         guard for JavaLanguage enum.  Also added #if PLATFORM(MAC) guard for
632         ObjectiveCLanguage enum to match corresponding code in runtime.cpp.
633
634         * config.h: Removed definition of HAVE_JNI.
635
636         * loader/FrameLoaderClient.h:
637         (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
638         * page/Frame.cpp:
639         (WebCore::Frame::Frame): Ditto.
640         * page/Frame.h:
641         (WebCore::Frame::initJavaJSBindings): Ditto.
642         * page/mac/FrameMac.mm:
643         (WebCore::Frame::createScriptInstanceForWidget): Ditto.
644         (WebCore::Frame::initJavaJSBindings): Ditto.
645
646 2008-03-13  Darin Adler  <darin@apple.com>
647
648         * html/PreloadScanner.h: Corrected license.
649         * html/PreloadScanner.cpp: Corrected license.
650
651 2008-03-13  Mark Mentovai  <mark@moxienet.com>
652
653         Reviewed by darin.  Landed by eseidel.
654
655         * platform/FloatConversion.h: Include a header to get CoreGraphics
656         types when using CoreGraphics types.
657
658 2008-03-13  Mark Mentovai  <mark@moxienet.com>
659
660         Reviewed by eseidel.  Landed by eseidel.
661
662         * WebCore.xcodeproj/project.pbxproj:
663         * css/CSSParser.cpp:
664         * css/makeprop.pl:
665         Move CSSPropertyNames.c to CSSPropertyNames.cpp
666
667 2008-03-13  Mark Mentovai  <mark@moxienet.com>
668
669         Reviewed by eseidel.  Landed by eseidel.
670
671         * platform/Arena.h: Use statement1;statement2 instead of
672         (statement1,statement2) in CLEAR_UNUSED.
673
674 2008-03-13  Tommi Komulainen  <tommi.komulainen@iki.fi>
675
676         Reviewed by Alp Toker.
677
678         http://bugs.webkit.org/show_bug.cgi?id=17821
679         [SOUP] POST requests are empty
680
681         Send the HTTP request body as well.
682
683         * platform/network/soup/ResourceHandleSoup.cpp:
684         (WebCore::ResourceHandle::start):
685
686 2008-03-13  Dan Bernstein  <mitz@apple.com>
687
688         Reviewed by Dave Hyatt.
689
690         - fix http://bugs.webkit.org/show_bug.cgi?id=17819
691           Border-collapse: collapse later cell wins on PC, earlier cell on Mac
692
693         Test: fast/table/border-collapsing/equal-precedence-resolution.html
694
695         * rendering/RenderTableCell.cpp:
696         (WebCore::RenderTableCell::collapsedLeftBorder): When calling
697         compareBorders() with borders that may have the same precedence, made
698         sure to pass the border belonging to the earlier (in document order)
699         element first, since compareBorders() prefers the first argument when
700         there is a tie.
701         (WebCore::RenderTableCell::collapsedRightBorder): Ditto.
702         (WebCore::RenderTableCell::collapsedTopBorder): Ditto.
703
704 2008-03-13  Adam Roben  <aroben@apple.com>
705
706         wx build fix and Windows leak fix after r31034
707
708         * platform/graphics/wx/ImageWx.cpp:
709         (WebCore::Image::loadPlatformResource): Use SharedBuffer::create.
710         * platform/win/SharedBufferWin.cpp:
711         (WebCore::SharedBuffer::createWithContentsOfFile): Ditto (we were
712         leaking the SharedBuffer here before).
713
714 2008-03-13  Antti Koivisto  <antti@apple.com>
715
716         Reviewed by Eric.
717
718         Correct a few issues spotted by Mike Belshe. 
719
720         * html/PreloadScanner.cpp:
721         (WebCore::PreloadScanner::tokenize):
722         * loader/loader.cpp:
723         (WebCore::Loader::cancelRequests):
724
725 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
726
727         Fix GTK+ build for SharedBuffer changes.
728
729         * platform/graphics/gtk/ImageGtk.cpp:
730         (Image::loadPlatformResource):
731
732 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
733
734         More PGO build fixes.
735
736         * WebCorePrefix.cpp:
737
738 2008-03-13  Antti Koivisto  <antti@apple.com>
739
740         Reviewed by Darin.
741         
742         Make page loads go fast.
743         
744         http://bugs.webkit.org/show_bug.cgi?id=17480
745
746         - Implement speculative preloading. When a script load blocks the main parser, use a side 
747           parser to pick up more resources.
748         - Implement per-host load queues, prioritize scripts and stylesheets over images.
749         
750         Depending on content and network latency this may speed things up quite a bit.
751
752         * WebCore.xcodeproj/project.pbxproj:
753         * dom/Document.cpp:
754         (WebCore::Document::implicitClose):
755         Clear the preloads after laoding completes.
756         
757         * html/HTMLLinkElement.cpp:
758         (WebCore::HTMLLinkElement::parseMappedAttribute):
759         (WebCore::HTMLLinkElement::tokenizeRelAttribute):
760         * html/HTMLLinkElement.h:
761         Make tokenizeRelAttribute() public static so it can be used from elsewhere.
762         Eliminate a pointless bitfield so I can get references.
763         
764         * html/HTMLTokenizer.cpp:
765         (WebCore::HTMLTokenizer::scriptHandler):
766         (WebCore::HTMLTokenizer::scriptExecution):
767         (WebCore::HTMLTokenizer::write):
768         * html/HTMLTokenizer.h:
769         Spin up the preload scanner whenever a script load blocks the parser. One scanner tracks the end of 
770         the document while temporary ones are created as needed to scan document.write() output.
771         
772         * html/PreloadScanner.cpp: Added.
773         (WebCore::PreloadScanner::PreloadScanner):
774         (WebCore::PreloadScanner::~PreloadScanner):
775         (WebCore::PreloadScanner::begin):
776         (WebCore::PreloadScanner::end):
777         (WebCore::PreloadScanner::reset):
778         (WebCore::PreloadScanner::write):
779         (WebCore::isWhitespace):
780         (WebCore::PreloadScanner::clearLastCharacters):
781         (WebCore::PreloadScanner::rememberCharacter):
782         (WebCore::PreloadScanner::lastCharactersMatch):
783         (WebCore::legalEntityFor):
784         (WebCore::PreloadScanner::consumeEntity):
785         (WebCore::PreloadScanner::tokenize):
786         (WebCore::PreloadScanner::processAttribute):
787         (WebCore::PreloadScanner::emitCharacter):
788         (WebCore::PreloadScanner::tokenizeCSS):
789         (WebCore::PreloadScanner::emitTag):
790         (WebCore::PreloadScanner::emitCSSRule):
791         * html/PreloadScanner.h: Added.
792         (WebCore::PreloadScanner::inProgress):
793         (WebCore::PreloadScanner::):
794         HTML5 tokenization plus some glue code. Fake CSS parsing thrown in just for fun.
795         
796         * loader/Cache.cpp:
797         (WebCore::Cache::pruneDeadResources):
798         Preloads have zero refcount, avoid kicking them out too early.
799         
800         * loader/CachedResource.cpp:
801         (WebCore::CachedResource::CachedResource):
802         (WebCore::CachedResource::ref):
803         * loader/CachedResource.h:
804         (WebCore::CachedResource::):
805         (WebCore::CachedResource::preloadResult):
806         (WebCore::CachedResource::setRequestedFromNetworkingLayer):
807         (WebCore::CachedResource::canDelete):
808         (WebCore::CachedResource::isPreloaded):
809         (WebCore::CachedResource::increasePreloadCount):
810         (WebCore::CachedResource::decreasePreloadCount):
811         Keep track which resources are preloads. Avoid deleting them. Track
812         at which point of the loading preloads get utilized to enable some interesting 
813         statistics.
814         
815         * loader/DocLoader.cpp:
816         (WebCore::DocLoader::~DocLoader):
817         (WebCore::DocLoader::checkForReload):
818         (WebCore::DocLoader::registerPreload):
819         (WebCore::DocLoader::clearPreloads):
820         (WebCore::DocLoader::printPreloadStats):
821         * loader/DocLoader.h:
822         Ensure we utilize preloaded resources during reloads.
823         Keep a list of all preloads in the document. Clear the preloads after
824         parsing is complete. Some debug statistics.
825         
826         * loader/DocumentLoader.cpp:
827         (WebCore::DocumentLoader::isLoadingInAPISense):
828         Avoid signaling that loading is complete too early. 
829         
830         * loader/loader.cpp:
831         (WebCore::Loader::Loader):
832         (WebCore::Loader::~Loader):
833         (WebCore::Loader::determinePriority):
834         (WebCore::Loader::load):
835         (WebCore::Loader::scheduleServePendingRequests):
836         (WebCore::Loader::requestTimerFired):
837         (WebCore::Loader::servePendingRequests):
838         (WebCore::Loader::cancelRequests):
839         (WebCore::Loader::Host::Host):
840         (WebCore::Loader::Host::~Host):
841         (WebCore::Loader::Host::addRequest):
842         (WebCore::Loader::Host::hasRequests):
843         (WebCore::Loader::Host::servePendingRequests):
844         (WebCore::Loader::Host::didFinishLoading):
845         (WebCore::Loader::Host::didFail):
846         (WebCore::Loader::Host::didReceiveResponse):
847         (WebCore::Loader::Host::didReceiveData):
848         (WebCore::Loader::Host::cancelPendingRequests):
849         (WebCore::Loader::Host::cancelRequests):
850         * loader/loader.h:
851         (WebCore::Loader::):
852         Distribute load requests to per-host priority queues. Limit the number of loads issued to the 
853         networking layer so we have better changes of getting important requests through first.
854         Prioritize scripts > stylesheets > images.
855
856 2008-03-13  David Hyatt  <hyatt@apple.com>
857
858         This patch makes full page zoom work pretty well. It fixes repainting so that it works when transforms
859         are set on the RenderView. It also implements the "smart layout" behavior that other browsers support when
860         zooming. The page will still try to constrain to the viewport size even when zoomed.
861
862         Reviewed by john
863
864         * dom/Document.cpp:
865         (WebCore::Document::recalcStyle):
866         Make sure to test for transform changes even when there is no zoom.  This fixes repainting issues
867         caused by jumping from a zoomed state back to the standard size.
868
869         * page/FrameView.cpp:
870         (WebCore::FrameView::adjustViewSize):
871         Adjust for the zoom factor (the render tree is in unzoomed coordinates, but the scrollbars of the view
872         need to handle zoomed coordinates).
873
874         * rendering/RenderBox.cpp:
875         (WebCore::RenderBox::calcHeight):
876         Fix the body-sizing-to-the-view-height quirk so that it takes the zoom factor into account when
877         stretching to fill the viewport.
878
879         * rendering/RenderLayer.cpp:
880         (WebCore::RenderLayer::updateLayerPositions):
881         (WebCore::RenderLayer::setHasVisibleContent):
882         Remove the FIXMEs now that absoluteClippedOverflowRect works with transforms on the RenderView.
883
884         * rendering/RenderView.cpp:
885         (WebCore::RenderView::calcHeight):
886         (WebCore::RenderView::calcWidth):
887         Make sure the calculated width/height take the zoom factor into account in order to get the "smart layout"
888         behavior.
889
890         (WebCore::RenderView::layout):
891         When deciding whether children have to get a relayout, we need to check the zoomed width/height and not just
892         the viewport size.
893
894         (WebCore::RenderView::computeAbsoluteRepaintRect):
895         Patched to take into account transforms set on the RenderView.
896
897         (WebCore::RenderView::docHeight):
898         (WebCore::RenderView::docWidth):
899         Patched to just always use m_width and m_height initially, since those have already been adjusted for
900         the zoom factor.
901
902         (WebCore::RenderView::zoomedHeight):
903         (WebCore::RenderView::zoomedWidth):
904         * rendering/RenderView.h:
905         New helper methods for obtaining the adjusted width/height of the viewport taking into account the
906         zoom factor.
907
908 2008-03-13  Anders Carlsson  <andersca@apple.com>
909
910         Build fix.
911
912         * WebCore.base.exp:
913
914 2008-03-13  Anders Carlsson  <andersca@apple.com>
915
916         Reviewed by Adam.
917
918         Get rid of actualRequest, it is not used anymore. Also, get rid of 
919         initialRequest and replace all uses with originalRequest because those are
920         the same thing.
921         
922         * loader/DocumentLoader.cpp:
923         * loader/DocumentLoader.h:
924         * loader/FrameLoader.cpp:
925         (WebCore::FrameLoader::initialRequest):
926         (WebCore::FrameLoader::originalRequestURL):
927
928 2008-03-13  Brady Eidson  <beidson@apple.com>
929
930         Reviewed by Anders
931
932         Convert SharedBuffer to start with a refCount of 1
933
934         * loader/ImageDocument.cpp:
935         (WebCore::ImageTokenizer::finish):
936
937         * loader/ResourceLoader.cpp:
938         (WebCore::ResourceLoader::addData):
939         (WebCore::ResourceLoader::willStopBufferingData):
940
941         * loader/icon/IconDatabase.cpp:
942         (WebCore::IconDatabase::defaultIcon):
943         (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
944
945         * loader/loader.cpp:
946         (WebCore::Loader::didReceiveData):
947
948         * platform/SharedBuffer.h:
949         (WebCore::SharedBuffer::create): Make all constructors private, add ::create() calls
950         * platform/SharedBuffer.cpp:
951         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
952         (WebCore::SharedBuffer::copy):
953         * platform/mac/SharedBufferMac.mm:
954         (WebCore::SharedBuffer::wrapNSData):
955         (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
956
957 2008-03-13  Steve Falkenburg  <sfalken@apple.com>
958
959         PGO build fixes.
960         
961         Disable PGO for normal release builds.
962         Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.
963
964         * WebCore.vcproj/WebCore.vcproj:
965
966 2008-03-13  Anders Carlsson  <andersca@apple.com>
967
968         Reviewed by Darin.
969
970         Make a bunch of DocumentLoader setters/getters inline.
971         
972         * loader/DocumentLoader.cpp:
973         * loader/DocumentLoader.h:
974         (WebCore::DocumentLoader::isStopping):
975         (WebCore::DocumentLoader::setCommitted):
976         (WebCore::DocumentLoader::isCommitted):
977         (WebCore::DocumentLoader::isLoading):
978         (WebCore::DocumentLoader::setLoading):
979         (WebCore::DocumentLoader::response):
980         (WebCore::DocumentLoader::mainDocumentError):
981         (WebCore::DocumentLoader::setResponse):
982         (WebCore::DocumentLoader::isClientRedirect):
983         (WebCore::DocumentLoader::setIsClientRedirect):
984         (WebCore::DocumentLoader::overrideEncoding):
985         (WebCore::DocumentLoader::responses):
986         (WebCore::DocumentLoader::triggeringAction):
987         (WebCore::DocumentLoader::setTriggeringAction):
988         (WebCore::DocumentLoader::setOverrideEncoding):
989         (WebCore::DocumentLoader::setLastCheckedRequest):
990         (WebCore::DocumentLoader::lastCheckedRequest):
991         (WebCore::DocumentLoader::title):
992         (WebCore::DocumentLoader::setLoadingFromCachedPage):
993         (WebCore::DocumentLoader::isLoadingFromCachedPage):
994
995 2008-03-13  Rodney Dawes  <dobey@wayofthemonkey.com>
996
997         Fix builds without SVG enabled.
998
999         * page/Frame.cpp:
1000         (Frame::shouldApplyTextZoom):
1001         (Frame::shouldApplyPageZoom):
1002
1003 2008-03-13  Simon Hausmann  <hausmann@webkit.org>
1004
1005         Fix the Qt build.
1006
1007         * bridge/qt/qt_instance.cpp:
1008         (KJS::Bindings::QtInstance::getQtInstance):
1009         (KJS::Bindings::QtInstance::getRuntimeObject):
1010         * bridge/qt/qt_instance.h:
1011         (KJS::Bindings::QtInstance::create):
1012         * bridge/qt/qt_runtime.cpp:
1013         (KJS::Bindings::convertQVariantToValue):
1014         (KJS::Bindings::QtConnectionObject::execute):
1015         * page/qt/FrameQt.cpp:
1016         (WebCore::Frame::createScriptInstanceForWidget):
1017
1018 2008-03-12  Sam Weinig  <sam@webkit.org>
1019
1020         Reviewed by Darin Adler.
1021
1022         Fix <rdar://problem/5784773>
1023         Crash loading QT movies @ apple.com/ipodtouch/features.html with a PAC file (WebKitThreadingException)
1024
1025         Make bridged RuntimeObjects get collected on the main thread only. This is necessary
1026         because clients of the bridged objects are unlikely to prepared for a collection on 
1027         non-main thread, which can happen with a PAC file.
1028
1029         * bridge/runtime_object.cpp:
1030         (RuntimeObjectImp::RuntimeObjectImp):
1031
1032 2008-03-12  Adam Roben  <aroben@apple.com>
1033
1034         Fix Bug 17815: Inspector's DOM tree should descend into subframes
1035
1036         <http://bugs.webkit.org/show_bug.cgi?id=17815>
1037
1038         Reviewed by Tim.
1039
1040         * page/inspector/DocumentPanel.js:
1041         (WebInspector.DocumentPanel.revealNode): Changed to provide
1042         _isAncestorIncludingParentFramesWithinPanel and
1043         _parentNodeOrFrameElementWithinPanel for the isAncestor and getParent
1044         parameters to findTreeElement so that parent frames will be searched.
1045         (WebInspector.DocumentPanel.updateBreadcrumb):
1046           - Changed while loop to for loop
1047           - Use _parentNodeOrFrameElementWithinPanel instead of
1048             Node.parentNode to move to the next node
1049           - The loop now ends when we reach the DocumentPanel's document node
1050           - Traversal past other Document nodes is now allowed
1051           - We add the "start" class to the final crumb after the loop exits
1052         (WebInspector.DocumentPanel._getDocumentForNode): Added. Simple helper
1053         that returns the node itself if the node is a Document node, or the
1054         node's ownerDocument otherwise.
1055         (WebInspector.DocumentPanel._parentNodeOrFrameElementWithinPanel):
1056         Added. Returns the node's parent node or, in the case of a Document
1057         node, the node's window's owning frame element, but will not return a
1058         node that is in a parent frame of the DocumentPanel's Document.
1059         (WebInspector.DocumentPanel._isAncestorIncludingParentFramesWithinPanel):
1060         Added. Returns true if a is an ancestor of b if a is an ancestor of a
1061         frame element whose subframe(s) contain b.
1062         (WebInspector.DOMNodeTreeElement): We now consider ourselves to have
1063         children if we have a contentDocument.
1064         (WebInspector.DOMNodeTreeElement.onpopulate): Moved the appendChild
1065         loop into a function so that we can add both children of our
1066         contentDocument and children of our node to the tree.
1067         (WebInspector.DOMNodeTreeElement.ondblclick): Changed so that we get
1068         the rootDOMNode by traversing the tree outline hierarchy instead of
1069         the DOM hierarchy so that we can easily jump up to a parent frame.
1070
1071 2008-03-12  Adam Roben  <aroben@apple.com>
1072
1073         Update the styles/metrics panes and breadcrumb after editing DOM
1074         attributes
1075
1076         Reviewed by Tim.
1077
1078         * page/inspector/DocumentPanel.js:
1079         (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update
1080         the parts of the DocumentPanel other than the DOM tree into a new
1081         function, _focusedNodeChanged.
1082         (WebInspector.DocumentPanel._focusedNodeChanged): Added. The
1083         forceUpdate parameter specifies whether the update should occur even
1084         if the focused node hasn't changed since the last update.
1085         (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate
1086         parameter. If forceUpdate is true, we always rebuild the breadcrumbs.
1087         (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate
1088         parameter. If forceUpdate is true, we always rebuild the styles pane.
1089         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a
1090         call to DocumentPanel._focusedNodeChanged. We have to force the update
1091         because we haven't changed the focused node (the attributes of the
1092         node have changed).
1093         * page/inspector/StylesSidebarPane.js:
1094         (WebInspector.StylesSidebarPane.update): Added a forceUpdate
1095         parameter. If forceUpdate is true we always rebuild the styles.
1096
1097 2008-03-12  Mark Rowe  <mrowe@apple.com>
1098
1099         Further Gtk and Qt build fixes.
1100
1101         * bridge/runtime.cpp:
1102         (KJS::Bindings::Instance::createRuntimeObject): Adapt Qt-only code for change to PassRefPtr.
1103         * page/gtk/FrameGtk.cpp: Add missing include.
1104
1105 2008-03-12  Mark Rowe  <mrowe@apple.com>
1106
1107         Fix Gtk and Qt builds.
1108
1109         * page/gtk/FrameGtk.cpp:
1110         * page/qt/FrameQt.cpp:
1111
1112 2008-03-12  Mark Rowe  <mrowe@apple.com>
1113
1114         Mac build fix.
1115
1116         * WebCore.base.exp:  Remove symbol.
1117
1118 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
1119
1120         Build fix.
1121
1122         * page/win/FrameWin.cpp:
1123
1124 2008-03-12  Steve Falkenburg  <sfalken@apple.com>
1125
1126         Build fix.
1127
1128         * plugins/win/PluginViewWin.cpp:
1129         (WebCore::PluginView::bindingInstance):
1130
1131 2008-03-12  Darin Adler  <darin@apple.com>
1132
1133         Reviewed by Anders.
1134
1135         - http://bugs.webkit.org/show_bug.cgi?id=17640
1136           eliminate WebCoreFrameBridge
1137
1138         * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
1139         to WebFrame in WebKit.
1140         * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
1141         WebCoreFrameBridge.h and WebCoreFrameBridge.mm.
1142
1143         * page/Frame.cpp:
1144         (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
1145         the WebCoreFrameBridge.
1146         * page/Frame.h: Added initJavaJSBindings function.
1147
1148         * page/mac/FrameMac.mm:
1149         (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
1150         (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.
1151
1152         * page/mac/WebCoreFrameBridge.h: Removed.
1153         * page/mac/WebCoreFrameBridge.mm: Removed.
1154
1155 2008-03-12  Sam Weinig  <sam@webkit.org>
1156
1157         Reviewed by Anders Carlsson.
1158
1159         Don't go through the Document just to get the frame Element.
1160
1161         * page/DOMWindow.cpp:
1162         (WebCore::DOMWindow::frameElement):
1163
1164 2008-03-12  Anders Carlsson  <andersca@apple.com>
1165
1166         Reviewed by Geoff and Sam.
1167
1168         More Instance cleanup:
1169         
1170         * Make Instance inherit from RefCounted instead of doing its own refcounting.        
1171         * Make all Instance subclasses private, add static create methods.         
1172         * Have Instance start out with a refcount of 1.
1173         * Get rid of Instance::createBindingForLanguageInstance and call the individual 
1174           instance constructor methods instead.
1175         * Fix many methods to take and return PassRefPtr<Instance> to ensure that the
1176           refcounting is done correctly.
1177          
1178         * bridge/c/c_instance.h:
1179         (KJS::Bindings::CInstance::create):
1180         * bridge/c/c_utility.cpp:
1181         (KJS::Bindings::convertNPVariantToValue):
1182         * bridge/jni/jni_instance.cpp:
1183         (JavaInstance::invokeMethod):
1184         * bridge/jni/jni_instance.h:
1185         (KJS::Bindings::JavaInstance::create):
1186         * bridge/jni/jni_jsobject.cpp:
1187         (JavaJSObject::convertJObjectToValue):
1188         * bridge/jni/jni_runtime.cpp:
1189         (JavaField::valueFromInstance):
1190         (JavaArray::valueAt):
1191         * bridge/objc/objc_instance.h:
1192         (KJS::Bindings::ObjcInstance::create):
1193         * bridge/objc/objc_utility.mm:
1194         (KJS::Bindings::convertObjcValueToValue):
1195         * bridge/qt/qt_instance.cpp:
1196         (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
1197         (KJS::Bindings::QtInstance::getQtInstance):
1198         (KJS::Bindings::QtInstance::getRuntimeObject):
1199         * bridge/qt/qt_instance.h:
1200         * bridge/runtime.cpp:
1201         (KJS::Bindings::Instance::Instance):
1202         (KJS::Bindings::Instance::createRuntimeObject):
1203         * bridge/runtime.h:
1204         * bridge/runtime_object.cpp:
1205         (RuntimeObjectImp::RuntimeObjectImp):
1206         * bridge/runtime_object.h:
1207         * page/Frame.h:
1208         * page/mac/FrameMac.mm:
1209         (WebCore::Frame::createScriptInstanceForWidget):
1210         * page/win/FrameWin.cpp:
1211         (WebCore::Frame::createScriptInstanceForWidget):
1212         * plugins/PluginView.h:
1213         * plugins/win/PluginViewWin.cpp:
1214         (WebCore::PluginView::bindingInstance):
1215
1216 2008-03-12  Dan Bernstein  <mitz@apple.com>
1217
1218         Suggested by Darin Adler. Reviewed by Dave Hyatt.
1219
1220         - speed up BidiIterator::direction()
1221
1222         * rendering/bidi.cpp:
1223         (WebCore::BidiIterator::current): Made inline and corrected the
1224         out-of-bounds condition to work with 0-length text and offsets beyond
1225         the end of the text.
1226         (WebCore::BidiIterator::direction): Changed to call current() and not
1227         call the virtual method isListMarker() most of the time.
1228         (WebCore::addMidpoint): Removed unnecessary null-check of smidpoints.
1229         (WebCore::appendRunsForObject): Ditto.
1230
1231 2008-03-12  Adam Roben  <aroben@apple.com>
1232
1233         Make URLs not be underlined while editing them in the DOM view
1234
1235         Reviewed by Tim.
1236
1237         * page/inspector/inspector.css:
1238
1239 2008-03-12  Adam Roben  <aroben@apple.com>
1240
1241         Part of Bug 17224: DOM nodes/attributes should be editable
1242
1243         <http://bugs.webkit.org/show_bug.cgi?id=17224>
1244         <rdar://problem/5732825>
1245
1246         We now start editing if the user single-clicks on an attribute,
1247         attribute value, or text node while the parent element is selected.
1248         Previously, we started editing on double-click regardless of the
1249         selection state of the element.
1250
1251         URLs in the DOM tree are now followed on Alt/Option-click, rather than
1252         on just click.
1253
1254         Reviewed by Tim.
1255
1256         * English.lproj/InspectorLocalizedStrings.js: Added four new localized
1257         strings.
1258         * page/inspector/DocumentPanel.js:
1259         (WebInspector.DOMNodeTreeElement.onattach): Call new
1260         _makeURLSActivateOnModifiedClick.
1261         (WebInspector.DOMNodeTreeElement._makeURLsActivateOnModifiedClick):
1262         Added. Changes the tooltip of each link in this element to indicate
1263         that Alt/Option-click will follow the URL, and sets the
1264         followOnAltClick property on each link.
1265         (WebInspector.DOMNodeTreeElement.onselect): Mark that we're being
1266         selected.
1267         (WebInspector.DOMNodeTreeElement.onmousedown): If we're not currently
1268         being selected, start editing.
1269         (WebInspector.DOMNodeTreeElement.ondblclick): We no longer start
1270         editing here. We block re-rooting of the tree if we're currently
1271         editing.
1272         (WebInspector.DOMNodeTreeElement._startEditing):
1273           - Don't do anything if we're not focused
1274           - Pass the event down to _startEditingAttribute.
1275         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't do
1276         anything if the event target is a URL and the Alt/Option key is
1277         pressed -- in this case we want to follow the link.
1278         (WebInspector.DOMNodeTreeElement._updateTitle): Call
1279         _makeURLsActivateOnClick again since the anchor elements have all been
1280         recreated.
1281         * page/inspector/inspector.js:
1282         (WebInspector.documentClick): If the anchor as a followOnAltClick
1283         property and the Alt/Option key is not pressed, do nothing.
1284
1285 2008-03-12  Ada Chan  <adachan@apple.com>
1286
1287         Fixed the initial value of zoom factor.
1288
1289         Reviewed by Adam.
1290
1291         * page/Frame.cpp:
1292         (WebCore::FramePrivate::FramePrivate):
1293
1294 2008-03-12  David Hyatt  <hyatt@apple.com>
1295
1296         Make full page zoom vaguely work.  This patch uses the CSS transform system to turn on full page zoom at the
1297         document level.  There are many many bugs that I'm going to file to track all the issues (most of the issues
1298         are just bugs with transforms themselves).
1299
1300         Reviewed by Adam Roben
1301
1302         * css/CSSStyleSelector.cpp:
1303         (WebCore::CSSStyleSelector::applyProperty):
1304         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1305         * dom/Document.cpp:
1306         (WebCore::Document::recalcStyle):
1307         * page/Frame.cpp:
1308         (WebCore::Frame::shouldApplyTextZoom):
1309         (WebCore::Frame::shouldApplyPageZoom):
1310         * page/Frame.h:
1311         * rendering/RenderLayer.cpp:
1312         (WebCore::RenderLayer::updateLayerPositions):
1313         (WebCore::RenderLayer::setHasVisibleContent):
1314         (WebCore::RenderLayer::paintLayer):
1315         (WebCore::RenderLayer::hitTestLayer):
1316         * rendering/RenderLayer.h:
1317
1318 2008-03-12  David Hyatt  <hyatt@apple.com>
1319
1320         Make the zoom factor a float and not a percent.
1321
1322         Reviewed by antti
1323
1324         * WebCore.base.exp:
1325         * css/CSSStyleSelector.cpp:
1326         (WebCore::CSSStyleSelector::applyProperty):
1327         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1328         * page/Frame.cpp:
1329         (WebCore::Frame::zoomFactor):
1330         (WebCore::Frame::setZoomFactor):
1331         * page/Frame.h:
1332         * page/FramePrivate.h:
1333         * svg/SVGSVGElement.cpp:
1334         (WebCore::SVGSVGElement::currentScale):
1335         (WebCore::SVGSVGElement::setCurrentScale):
1336
1337 2008-03-12  David Hyatt  <hyatt@apple.com>
1338
1339         Eliminate setTextMultiplier from the bridge.  Make Webkit just call setZoomFactor on the frame directly.
1340
1341         Reviewed by Tim H.
1342
1343         * WebCore.base.exp:
1344         * page/mac/WebCoreFrameBridge.h:
1345         * page/mac/WebCoreFrameBridge.mm:
1346
1347 2008-03-12  Dan Bernstein  <mitz@apple.com>
1348
1349         Reviewed by Darin Adler and Sam Weinig.
1350
1351         - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
1352
1353         Use CTFontCopyGraphicsFont and CTFontGetPlatformFont on Leopard instead
1354         of wkGetCGFontFromNSFont and wkGetNSFontATSUFontId, relying on NSFont
1355         and CTFontRef being toll-free bridged.
1356
1357         * WebCore.Tiger.exp:
1358         * WebCore.base.exp:
1359         * platform/graphics/mac/FontMac.mm:
1360         (WebCore::Font::drawGlyphs): Changed to use the cgFont() accessor.
1361         * platform/graphics/mac/FontPlatformData.h:
1362         Made m_cgFont a RetainPtr on Leopard.
1363         (WebCore::toCTFontRef): Added a function that encapsulates the
1364         toll-free bridging.
1365         (WebCore::FontPlatformData::FontPlatformData):
1366         (WebCore::FontPlatformData::cgFont): Added this accessor method.
1367         * platform/graphics/mac/FontPlatformDataMac.mm:
1368         (WebCore::FontPlatformData::FontPlatformData): Changed to use
1369         CoreText API on Leopard.
1370         (WebCore::FontPlatformData::setFont): Ditto.
1371         * platform/graphics/mac/SimpleFontDataMac.mm:
1372         (WebCore::initFontData):
1373         (WebCore::pathFromFont):
1374         (WebCore::SimpleFontData::platformInit):
1375         (WebCore::SimpleFontData::platformWidthForGlyph):
1376         * platform/mac/WebCoreSystemInterface.mm:
1377
1378 2008-03-12  David Harrison  <harrison@apple.com>
1379
1380         Reviewed by Darin.
1381
1382         <rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[WebCoreAXObject isWebArea] + 8
1383
1384         The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was
1385         called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry.
1386         Also saw that cache clearing was missing from Document::detach(), and fixed that.
1387         
1388         Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
1389         
1390         Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled.
1391        
1392         * dom/Document.cpp:
1393         (WebCore::Document::attach):
1394         Assert that there is no AX cache (since there is no renderer).
1395         
1396         (WebCore::Document::detach):
1397         Destroy the AX cache installed on this document.
1398         
1399         (WebCore::Document::clearAXObjectCache):
1400         New. Destroy the AX cache associated with this document.
1401         
1402         (WebCore::Document::axObjectCache):
1403         Added some comments.
1404         
1405         * dom/Document.h:
1406         Declare clearAXObjectCache().
1407         
1408         * page/Frame.cpp:
1409         (WebCore::Frame::disconnectOwnerElement):
1410         Destroy the AX cache associated with this frame's document.
1411         
1412         * page/mac/AXObjectCacheMac.mm:
1413         (WebCore::AXObjectCache::remove):        
1414         * page/mac/WebCoreAXObject.mm:
1415         (-[WebCoreAXObject initWithRenderer:]):
1416         (-[WebCoreAXObject detach]):
1417         * rendering/RenderObject.cpp:
1418         (WebCore::RenderObject::RenderObject):
1419         (WebCore::RenderObject::~RenderObject):
1420         * rendering/RenderObject.h:
1421         (WebCore::RenderObject::setHasAXObject):
1422         (WebCore::RenderObject::hasAXObject):
1423         Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
1424         
1425         * rendering/RenderWidget.cpp:
1426         (WebCore::RenderWidget::destroy):
1427         Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the
1428         very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy().
1429
1430 2008-03-12  Xan Lopez  <xan@gnome.org>
1431
1432         Reviewed by Alp Toker.
1433
1434         http://bugs.webkit.org/show_bug.cgi?id=15229
1435
1436         Add Pango font backend.
1437
1438         Original patch by Sven Herzberg <sven@imendio.com>
1439
1440         * GNUmakefile.am:
1441         * platform/graphics/gtk/FontCacheGtk.cpp:
1442         (WebCore::FontCache::fontExists):
1443         * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Added.
1444         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1445         (WebCore::FontCustomPlatformData::fontPlatformData):
1446         (WebCore::releaseData):
1447         (WebCore::createFontCustomPlatformData):
1448         * platform/graphics/gtk/FontPlatformData.h:
1449         (WebCore::FontPlatformData::FontPlatformData):
1450         (WebCore::FontPlatformData::hash):
1451         * platform/graphics/gtk/FontPlatformDataPango.cpp: Added.
1452         (WebCore::FontPlatformData::FontPlatformData):
1453         (WebCore::FontPlatformData::init):
1454         (WebCore::FontPlatformData::~FontPlatformData):
1455         (WebCore::FontPlatformData::isFixedPitch):
1456         (WebCore::FontPlatformData::setFont):
1457         (WebCore::FontPlatformData::operator==):
1458         * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: Added.
1459         (WebCore::pango_font_get_glyph):
1460         (WebCore::GlyphPage::fill):
1461         * platform/graphics/gtk/SimpleFontDataPango.cpp: Added.
1462         (WebCore::SimpleFontData::platformInit):
1463         (WebCore::SimpleFontData::platformDestroy):
1464         (WebCore::SimpleFontData::smallCapsFontData):
1465         (WebCore::SimpleFontData::containsCharacters):
1466         (WebCore::SimpleFontData::determinePitch):
1467         (WebCore::SimpleFontData::platformWidthForGlyph):
1468         (WebCore::SimpleFontData::setFont):
1469
1470 2008-03-12  Justin Garcia  <justin.garcia@apple.com>
1471
1472         Reviewed by Oliver.
1473         
1474         <rdar://problem/5770834> Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list
1475         
1476         Fixes some (but not all) of the instances of:
1477         <rdar://problem/5659795> CrashTracer: [REGRESSION] 187 crashes in Safari at com.apple.WebCore: WebCore::InsertTextCommand::prepareForTextInsertion + 241
1478         <rdar://problem/5779631> CrashTracer: [USER] 25 crashes in Mail at WebCore::InsertTextCommand::prepareForTextInsertion
1479
1480         * editing/InsertLineBreakCommand.cpp:
1481         (WebCore::InsertLineBreakCommand::doApply): applyStyle may have destroyed content that held
1482         the old endingSelection(), so we must recompute it.  Added a FIXME.  Added a few comments.
1483         * editing/RemoveFormatCommand.cpp:
1484         (WebCore::RemoveFormatCommand::doApply): Added a FIXME.
1485
1486 2008-03-11  Alexey Proskuryakov  <ap@webkit.org>
1487
1488         Reviewed by Darin.
1489
1490         <rdar://problem/5640615> REGRESSION (Safari 2-3): Changing subframe encoding rules broke
1491         some sites.
1492
1493         Other browsers' behavior keeps changing; let's implement what Firefox and Opera do now:
1494         if the frame and subframe belong to the same site, then the encoding is inherited from parent
1495         frame to subframe. Otherwise, it is not.
1496
1497         Always inheriting the encoding would cause a security problem.
1498
1499         Tests: http/tests/misc/frame-default-enc-different-domain.html
1500                http/tests/misc/frame-default-enc-same-domain.html
1501                fast/encoding/frame-default-enc.html
1502
1503         * loader/FrameLoader.cpp:
1504         (WebCore::FrameLoader::write): Also removed a check for m_frame->document() being non-null -
1505         this function also has code that uses it without checking, so it must be safe.
1506
1507 2008-03-12  Mark Rowe  <mrowe@apple.com>
1508
1509         Gtk build fix.
1510
1511         * page/Frame.h: Forward-declare FramePrivate.
1512
1513 2008-03-11  Steve Falkenburg  <sfalken@apple.com>
1514
1515         Disable LTCG/PGO for all of WebCore for now.
1516         We'll re-enable this as part of follow-on PGO work.
1517         
1518         Reviewed by Oliver.
1519
1520         * WebCore.vcproj/WebCore.vcproj:
1521
1522 2008-03-11  Darin Adler  <darin@apple.com>
1523
1524         Reviewed by Sam.
1525
1526         - remove all bridge-related things from WebCore except the bridge itself
1527
1528         * WebCore.base.exp: Removed the bridge and setBridge functions.
1529
1530         * loader/FrameLoader.cpp:
1531         (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
1532         close method.
1533
1534         * page/Frame.cpp:
1535         (WebCore::Frame::~Frame): Removed call to setBridge(0).
1536         (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
1537         * page/Frame.h: Removed setBridge and bridge functions.
1538         * page/FramePrivate.h: Removed m_bridge pointer.
1539         * page/mac/FrameMac.mm: Removed setBridge and bridge functions.
1540
1541         * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
1542         Removed bridgeForDOMDocument: and clearFrame methods.
1543         * page/mac/WebCoreFrameBridge.mm: Ditto.
1544         (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
1545         (-[WebCoreFrameBridge setWebCoreFrame:]): Added.
1546
1547 2008-03-11  Darin Adler  <darin@apple.com>
1548
1549         - restored some code I removed in the Range change; this code can't go
1550           until the rest of the Range fix is in
1551
1552         * dom/Range.cpp:
1553         (WebCore::Range::commonAncestorContainer): Added back the check for 0
1554         that I removed erroneously in the Range patch.
1555         (WebCore::Range::processContents): Left in assertions I used to debug
1556         this.
1557
1558 2008-03-11  Darin Adler  <darin@apple.com>
1559
1560         - fix Release build
1561
1562         * platform/mac/ScrollViewMac.mm:
1563         (WebCore::ScrollView::setContentsPos): Don't use NSMakePoint.
1564
1565 2008-03-11  Darin Adler  <darin@apple.com>
1566
1567         Reviewed by Anders.
1568
1569         - simplify Mac code for ScrollView, since it's used only for FrameView
1570           and not in two different modes like it was historically
1571         - remove code depending on the bridge to get from an NSView to a WebCore::Frame
1572
1573         * bindings/objc/DOMHTML.mm:
1574         (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView.
1575
1576         * bridge/jni/jni_jsobject.cpp:
1577         (createRootObject): Instead of using WebCoreViewFactory to find the frame given
1578         and NSView, use the WebCoreFrameView interface to do it.
1579
1580         * editing/mac/EditorMac.mm:
1581         (WebCore::Editor::paste): getDocumentView -> documentView.
1582         * editing/mac/SelectionControllerMac.mm:
1583         (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto.
1584
1585         * page/FrameView.h: Fixed comment.
1586
1587         * page/InspectorController.cpp:
1588         (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts
1589         to ScrollView* since FrameView is derived from ScrollView.
1590
1591         * page/mac/EventHandlerMac.mm:
1592         (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView.
1593         * page/mac/FrameMac.mm:
1594         (WebCore::Frame::imageFromRect): Ditto.
1595         * page/mac/WebCoreAXObject.mm:
1596         (-[WebCoreAXObject position]): Ditto.
1597         (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
1598         (-[WebCoreAXObject rendererForView:]): Updated code that used to use
1599         WebCoreBridgeHolder to use WebCoreFrameView instead.
1600
1601         * page/mac/WebCoreFrameBridge.mm:
1602         (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1603         getDocumentView -> documentView.
1604
1605         * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just
1606         use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to
1607         WebCoreFrameScrollView, since it's a protocol for the scroll view, not the
1608         frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView
1609         protocol, which returns a WebCore::Frame directly rather than a bridge.
1610
1611         * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method.
1612
1613         * platform/ScrollView.h: Moved the constructor and destructor out of the
1614         class-specific #if blocks. Renamed Mac-specific function that gets the
1615         NSView for from getDocumentView to documentView and a scrollView function
1616         that returns an appropriately classed NSScrollView.
1617
1618         * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView
1619         instead of Widget.
1620         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1621         (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast.
1622
1623         * platform/mac/PopupMenuMac.mm:
1624         (WebCore::PopupMenu::show): getDocumentView -> documentView.
1625         * platform/mac/ScrollViewMac.mm:
1626         (WebCore::ScrollView::ScrollView): Added.
1627         (WebCore::ScrollView::~ScrollView): Added.
1628         (WebCore::ScrollView::scrollView): Added.
1629         (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case.
1630         (WebCore::ScrollView::visibleHeight): Ditto.
1631         (WebCore::ScrollView::visibleContentRect): Ditto.
1632         (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto.
1633         (WebCore::ScrollView::contentsWidth): Ditto.
1634         (WebCore::ScrollView::contentsHeight): Ditto.
1635         (WebCore::ScrollView::contentsX): Ditto.
1636         (WebCore::ScrollView::contentsY): Ditto.
1637         (WebCore::ScrollView::scrollOffset): Ditto.
1638         (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto.
1639         (WebCore::ScrollView::setContentsPos): Ditto.
1640         (WebCore::ScrollView::setVScrollbarMode): Ditto.
1641         (WebCore::ScrollView::setHScrollbarMode): Ditto.
1642         (WebCore::ScrollView::setScrollbarsMode): Ditto.
1643         (WebCore::ScrollView::vScrollbarMode): Ditto.
1644         (WebCore::ScrollView::hScrollbarMode): Ditto.
1645         (WebCore::ScrollView::suppressScrollbars): Ditto.
1646         (WebCore::ScrollView::addChild): Ditto.
1647         (WebCore::ScrollView::resizeContents): Ditto.
1648         (WebCore::ScrollView::updateContents): Ditto.
1649         (WebCore::ScrollView::contentsToWindow): Ditto.
1650         (WebCore::ScrollView::windowToContents): Ditto.
1651         (WebCore::ScrollView::setStaticBackground): Ditto.
1652         (WebCore::ScrollView::documentView): Renamed and removed unused case.
1653         (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment.
1654
1655         * platform/mac/WidgetMac.mm:
1656         (WebCore::Widget::getOuterView): Update for protocol name change.
1657
1658         * rendering/RenderThemeMac.mm:
1659         (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView.
1660         (WebCore::RenderThemeMac::paintRadio): Ditto.
1661         (WebCore::RenderThemeMac::paintButton): Ditto.
1662         (WebCore::RenderThemeMac::paintMenuList): Ditto.
1663         (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
1664         (WebCore::RenderThemeMac::paintSearchField): Ditto.
1665         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto.
1666         (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto.
1667         (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto.
1668
1669 2008-03-11  Brent Fulgham  <bfulgham@gmail.com>
1670
1671         Reviewed by Adam Roben.
1672
1673         Split CookieJarWin.cpp into CFNet and non-CFNet versions to
1674         reduce the massive amount of conditionalization in the file.
1675         (see http://bugs.webkit.org/show_bug.cgi?id=17788)
1676
1677         * WebCore.vcproj/WebCore.vcproj:
1678         * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp.
1679         (WebCore::setCookies):
1680         (WebCore::cookies):
1681         (WebCore::cookiesEnabled):
1682         * platform/network/win/CookieJarWin.cpp:
1683         (WebCore::setCookies):
1684         (WebCore::cookies):
1685         (WebCore::cookiesEnabled):
1686
1687 2008-03-11  Darin Adler  <darin@apple.com>
1688
1689         Reviewed by Sam.
1690
1691         - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
1692
1693         * page/ChromeClient.h: Added new client functions to replace calls up to WebKit
1694         that were formerly handled by the bridge.
1695
1696         * page/Frame.h: Removed unneeded declarations. Moved declarations of script-specific
1697         functions to a ScriptController section. Removed willPopupMenu.
1698
1699         * page/mac/ChromeMac.mm:
1700         (WebCore::Chrome::focusNSView): Changed to call firstResponder and makeFirstResponder
1701         via the client instead of the bridge.
1702
1703         * page/mac/EventHandlerMac.mm:
1704         (WebCore::EventHandler::passMouseDownEventToWidget): Changed to call firstResponder
1705         and makeFirstResponder via the chrome client instead of the bridge.
1706
1707         * page/mac/FrameMac.mm: Removed willPopupMenu.
1708
1709         * page/mac/WebCoreFrameBridge.h: Removed WebCoreFrameBridge protocol and
1710         SubclassResponsibility category. Also removed some unneeded imports.
1711
1712         * platform/mac/PopupMenuMac.mm:
1713         (WebCore::PopupMenu::show): Call willPopUpMenu on chrome client instead of frame.
1714
1715         * platform/mac/WidgetMac.mm:
1716         (WebCore::Widget::setIsSelected): Call functions directly on the view rather than
1717         calling via the bridge.
1718
1719 2008-03-11  Darin Adler  <darin@apple.com>
1720
1721         Reviewed by Mitz.
1722
1723         - make some Range improvements (preparation for Range support for DOM mutation)
1724
1725         Made constructors private, added create functions.
1726         Made refcount start at 1 rather than starting at 0 and being incremented.
1727         Made Range use two Position objects for the start/end container/offset pairs.
1728
1729         * WebCore.base.exp: Updated.
1730
1731         * dom/Document.cpp:
1732         (WebCore::Document::createRange): Changed to use Range::create.
1733         (WebCore::Document::removeMarkers): Updated for Range::first/pastLastNode name change.
1734
1735         * dom/Position.cpp:
1736         (WebCore::Position::formatForDebugger): Updated for member variable name change.
1737         (WebCore::Position::showTreeForThis): Ditto.
1738         (WebCore::startPosition): Changed to use Range::startPosition.
1739         (WebCore::endPosition): Changed to use Range::endPosition.
1740
1741         * dom/Position.h: Made the data members public and renamed them to container
1742         and offset. But since offset() is already a function, temporarily used posOffset
1743         for the data member. Later we'll get rid of offset(). Made more functions inline.
1744         Removed the constructor that takes a PositionIterator.
1745
1746         * dom/PositionIterator.cpp:
1747         (WebCore::PositionIterator::operator Position): Added. Replaces the constructor
1748         that used to be in Position.
1749         * dom/PositionIterator.h: Added conversion operator to produce a Position.
1750         Removed friend declaration for Position.
1751
1752         * dom/Range.cpp:
1753         (WebCore::Range::Range): Updated constructors for data member changes and made
1754         them use a refcount of 1.
1755         (WebCore::Range::create): Added.
1756         (WebCore::Range::startContainer): Updated to eliminate use of m_detached; detached
1757         is now indicated by m_start.container of 0. Also updated to use m_start instead
1758         of the old m_startContainer.
1759         (WebCore::Range::startOffset): Ditto.
1760         (WebCore::Range::endContainer): Ditto.
1761         (WebCore::Range::endOffset): Ditto.
1762         (WebCore::Range::commonAncestorContainer): Ditto.
1763         (WebCore::Range::collapsed): Ditto.
1764         (WebCore::Range::setStart): Ditto.
1765         (WebCore::Range::setEnd): Ditto.
1766         (WebCore::Range::collapse): Ditto.
1767         (WebCore::Range::isPointInRange): Ditto.
1768         (WebCore::Range::comparePoint): Ditto.
1769         (WebCore::Range::compareNode): Ditto.
1770         (WebCore::Range::compareBoundaryPoints): Ditto.
1771         (WebCore::Range::boundaryPointsValid): Ditto.
1772         (WebCore::Range::deleteContents): Ditto.
1773         (WebCore::Range::intersectsNode): Ditto.
1774         (WebCore::Range::processContents): Ditto.
1775         (WebCore::Range::extractContents): Ditto.
1776         (WebCore::Range::cloneContents): Ditto.
1777         (WebCore::Range::insertNode): Ditto.
1778         (WebCore::Range::toString): Ditto.
1779         (WebCore::Range::text): Ditto.
1780         (WebCore::Range::createContextualFragment): Ditto.
1781         (WebCore::Range::detach): Ditto.
1782         (WebCore::Range::checkNodeBA): Changed to use switch statements instead of
1783         multiple calls to the virtual nodeType() function.
1784         (WebCore::Range::cloneRange): Ditto.
1785         (WebCore::Range::setStartAfter): Ditto.
1786         (WebCore::Range::setEndBefore): Ditto.
1787         (WebCore::Range::setEndAfter): Ditto.
1788         (WebCore::Range::selectNode): Ditto.
1789         (WebCore::Range::selectNodeContents): Ditto.
1790         (WebCore::Range::surroundContents): Ditto.
1791         (WebCore::Range::setStartBefore): Ditto.
1792         (WebCore::Range::checkDeleteExtract): Ditto.
1793         (WebCore::Range::containedByReadOnly): Ditto.
1794         (WebCore::Range::firstNode): Ditto.
1795         (WebCore::Range::editingStartPosition): Ditto.
1796         (WebCore::Range::pastLastNode): Ditto.
1797         (WebCore::Range::addLineBoxRects): Ditto.
1798         (WebCore::Range::formatForDebugger): Ditto.
1799         (WebCore::operator==): Ditto.
1800         (WebCore::rangeOfContents): Ditto.
1801         (WebCore::Range::maxStartOffset): Ditto.
1802         (WebCore::Range::maxEndOffset): Ditto.
1803
1804         * dom/Range.h: Made constructors private. Added create functions.
1805         Added getters for startContainer/Offset and endContainer/Offset that
1806         return 0 instead of an exception for detached ranges that are inline
1807         and don't require an ExceptionCode out parameter. Changed the parameters
1808         to setStart and setEnd to PassRefPtr. Removed isDetached function.
1809         Made ActionType and processContents private. Made startPosition and
1810         endPosition inlines and have then return const&. Renamed startNode and
1811         pastEndNode to firstNode and pastLastNode to reduce the chance of
1812         confusion with startContainer/endContainer. Used Position for m_start
1813         and m_end instead of separate container and offset members. Changed
1814         maxStartOffset and maxEndOffset into int to match other offsets.
1815
1816         * editing/ApplyStyleCommand.cpp:
1817         (WebCore::ApplyStyleCommand::applyBlockStyle): Changed to use Range::create.
1818         (WebCore::ApplyStyleCommand::applyInlineStyle): Ditto.
1819         * editing/CompositeEditCommand.cpp:
1820         (WebCore::CompositeEditCommand::inputText): Ditto.
1821         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
1822         * editing/DeleteSelectionCommand.cpp:
1823         (WebCore::DeleteSelectionCommand::mergeParagraphs): Ditto.
1824         * editing/Editor.cpp:
1825         (WebCore::Editor::fontForSelection): Changed for pastLastNode name change.
1826         (WebCore::Editor::setComposition): Changed to use Range::create.
1827         (WebCore::paragraphAlignedRangeForRange): Ditto.
1828         (WebCore::markMisspellingsOrBadGrammar): Changed to get rid of check for
1829         isDetached and check for 0 from startContainer instead.
1830         (WebCore::Editor::compositionRange): Changed to use Range::create.
1831         * editing/EditorCommand.cpp:
1832         (WebCore::unionDOMRanges): Ditto.
1833         * editing/Selection.cpp:
1834         (WebCore::Selection::toRange): Ditto.
1835         * editing/TextIterator.cpp:
1836         (WebCore::TextIterator::TextIterator): Changed for firstNode and pastLastNode
1837         name change.
1838         (WebCore::TextIterator::range): Changed to use Range::create.
1839         (WebCore::SimplifiedBackwardsTextIterator::range): Ditto.
1840         (WebCore::TextIterator::subrange): Ditto.
1841         * editing/VisiblePosition.cpp:
1842         (WebCore::makeRange): Ditto.
1843         * editing/VisiblePosition.h: Added now-needed include.
1844         * editing/htmlediting.cpp:
1845         (WebCore::indexForVisiblePosition): Changed to use Range::create.
1846         (WebCore::avoidIntersectionWithNode): Changed to get rid of check for
1847         isDetached and check for 0 instead and to use Range::create.
1848         * editing/markup.cpp:
1849         (WebCore::renderedText): Changed to use Range::create.
1850         (WebCore::createMarkup): Changed to no longer use isDetached and also
1851         for new firstNode/pastEndNode names.
1852         (WebCore::createFragmentFromText): Ditto.
1853         * editing/visible_units.cpp:
1854         (WebCore::previousBoundary): Changed to use Range::create.
1855         * page/mac/WebCoreFrameBridge.mm:
1856         (-[WebCoreFrameBridge convertToNSRange:]): Changed to no longer use
1857         isDetached().
1858         * rendering/RenderTextControl.cpp:
1859         (WebCore::RenderTextControl::visiblePositionForIndex): Changed to use Range::create.
1860         (WebCore::RenderTextControl::indexForVisiblePosition): Ditto.
1861
1862 2008-03-11  Daniel Zucker <zucker@wake3.com>
1863
1864         Reviewed by Adam Roben.
1865
1866         There are a handful of placed where the use of CFNetwork-specific
1867         calls are protected by PLATFORM(CF).  Revise to use the more specific
1868         USE(CFNETWORK) macro.  (See http://bugs.webkit.org/show_bug.cgi?id=17783) 
1869
1870         * platform/network/ProtectionSpace.cpp:  Change PLATFORM(CF) to USE(CFNETWORK)
1871         * platform/network/ResourceHandle.cpp: Change PLATFORM(CF) to USE(CFNETWORK)
1872         * platform/network/win/CookieJarWin.cpp:  Correct error in
1873           InternetGetCookie call.  Conditionalize 'cookiesEnabled' the same
1874           as all other implementations in this file.
1875
1876 2008-03-11  Xan Lopez  <xan@gnome.org>
1877
1878         Reviewed by Alp Toker.
1879
1880         http://bugs.webkit.org/show_bug.cgi?id=16476
1881
1882         Add libsoup HTTP backend.
1883         
1884         * GNUmakefile.am:
1885         * platform/network/ResourceHandleInternal.h:
1886         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1887         * platform/network/soup/AuthenticationChallenge.h: Added.
1888         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
1889         * platform/network/soup/ResourceError.h: Added.
1890         (WebCore::ResourceError::ResourceError):
1891         * platform/network/soup/ResourceHandleSoup.cpp: Added.
1892         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
1893         (WebCore::ResourceHandle::~ResourceHandle):
1894         (WebCore::dataCallback):
1895         (WebCore::parseDataUrl):
1896         (WebCore::ResourceHandle::start):
1897         (WebCore::ResourceHandle::cancel):
1898         (WebCore::ResourceHandle::bufferedData):
1899         (WebCore::ResourceHandle::supportsBufferedData):
1900         (WebCore::ResourceHandle::setDefersLoading):
1901         (WebCore::ResourceHandle::loadsBlocked):
1902         (WebCore::ResourceHandle::willLoadFromCache):
1903         * platform/network/soup/ResourceRequest.h: Copied from WebCore/platform/network/curl/ResourceRequest.h.
1904         (WebCore::ResourceRequest::ResourceRequest):
1905         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1906         * platform/network/soup/ResourceResponse.h: Added.
1907         (WebCore::ResourceResponse::ResourceResponse):
1908         (WebCore::ResourceResponse::setResponseFired):
1909         (WebCore::ResourceResponse::responseFired):
1910         (WebCore::ResourceResponse::doUpdateResourceResponse):
1911
1912 2008-03-11  Rodney Dawes  <dobey@wayofthemonkey.com>
1913
1914         Fix Qt build.
1915
1916         * plugins/qt/PluginDataQt.cpp:
1917         (PluginData::initPlugins)
1918
1919 2008-03-11  Adam Roben  <aroben@apple.com>
1920
1921         Make attribute quoting in DOM view more consistent with source view
1922
1923         Two changes which make the DOM view more consistent with source view:
1924          1) We now quote all attribute values, including URLs
1925          2) The quotes around the values are now purple, matching the left and
1926             right angle brackets that surround the tag
1927
1928         One bug fixed by these changes:
1929          1) The entire URL is selected for editing when you double-click a URL
1930             that is an attribute value. Previously, the first and last
1931             characters were not included in the selection.
1932
1933         Reviewed by Darin.
1934
1935         * page/inspector/DocumentPanel.js:
1936         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't need
1937         to account for the quotes around attribute values anymore because the
1938         quotes are now outside the webkit-html-attribute-value span.
1939         * page/inspector/utilities.js:
1940         (nodeTitleInfo): Quote all attribute values, including URLs, and place
1941         the quotes outside the webkit-html-attribute-value span.
1942
1943 2008-03-11  Adam Roben  <aroben@apple.com>
1944
1945         Stop including pthread.h in WebCore on Windows
1946
1947         Reviewed by Darin.
1948
1949         * WebCore.vcproj/WebCore.vcproj:
1950           - Changed the include path to not contain pthreads/
1951           - Let VS remove a duplicate FileConfiguration element
1952           - Let VS have its way with the file ordering
1953         * WebCorePrefix.h: Made the #include of pthread.h be compiled out on
1954         Windows.
1955         * loader/FTPDirectoryDocument.cpp: Added a Windows-specific #define of
1956         localtime_r (pthread.h was providing a macro that substituted plain
1957         old localtime before, but localtime_s is "more secure", so I went with
1958         that).
1959         * loader/FTPDirectoryParser.cpp: Ditto for gmtime_r.
1960
1961 2008-03-11  Adam Roben  <aroben@apple.com>
1962
1963         Roll out r30961 since it broke the default site icon on Windows
1964
1965         * loader/icon/IconDatabase.cpp:
1966         (WebCore::IconDatabase::defaultIcon):
1967
1968 2008-03-11  Dan Bernstein  <mitz@apple.com>
1969
1970         Reviewed by Darin Adler.
1971
1972         - clean up line layout code
1973
1974         * platform/graphics/GraphicsContext.cpp:
1975         (WebCore::TextRunIterator::increment): Removed the resolver parameter.
1976         (WebCore::GraphicsContext::drawBidiText): Adjusted for changes to
1977         createBidiRunsForLine(), which no longer takes a start parameter.
1978         * platform/text/BidiResolver.h:
1979         (WebCore::BidiResolver::): Made Noncopyable and removed the
1980         m_adjustEmbedding member variable.
1981         (WebCore::BidiResolver::position): Added. Returns the resolver's current
1982         position.
1983         (WebCore::BidiResolver::setPosition): Added. Sets the resolver's current
1984         position without changing any other state.
1985         (WebCore::BidiResolver::increment): Added. Advances the resolver to the
1986         next position, allowing the iterator to push and pop embedding.
1987         (WebCore::BidiResolver::appendRun): Removed the resolver parameter in
1988         the call to increment().
1989         (WebCore::BidiResolver::embed): Removed code to save, set and restore
1990         m_adjustEmbedding.
1991         (WebCore::BidiResolver::createBidiRunsForLine): Changed to not take a
1992         'start' iterator. Instead, start at the current position. Removed code
1993         to set m_adjustEmbedding. Changed for noncopyability.
1994         * rendering/RenderBlock.h:
1995         * rendering/bidi.cpp:
1996         (WebCore::bidiNext): Made the resolver parameter optional. Changed to
1997         null-check the 'end of inline' pointer only twice.
1998         (WebCore::bidiFirst): Made the resolver parameter optional.
1999         (WebCore::BidiIterator::increment): Ditto.
2000         (WebCore::BidiState::increment): Added. Overrides the default
2001         BidiResolver::increment() method by passing the resolver to
2002         BidiIterator::increment().
2003         (WebCore::checkMidpoints): Removed the resolver parameter.
2004         (WebCore::BidiState::appendRun): Removed code to save, set and restore
2005         m_adjustEmbedding. Adjusted for change to increment().
2006         (WebCore::RenderBlock::bidiReorderLine): Removed the 'start' parameter
2007         and unreachable code.
2008         (WebCore::buildCompactRuns): Adjusted for changes to BidiResolver/
2009         (WebCore::RenderBlock::layoutInlineChildren): Moved code to initialize
2010         the resolver from this method to determineStartPosition(). Unified the
2011         resolver with the 'start' iterator. Removed unreachable code. Moved one
2012         statement from the beginning of the while loop to the end.
2013         (WebCore::RenderBlock::determineStartPosition): Moved code to initialize
2014         the resolver from layoutInlineChildren() into this method.
2015         (WebCore::RenderBlock::matchedEndLine): Adjusted for the resolver and
2016         the 'start' iterator being one object.
2017         (WebCore::skipNonBreakingSpace): Made the parameter const.
2018         (WebCore::requiresLineBox): Ditto.
2019         (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Adjusted for
2020         the change to BidiIterator::increment().
2021         (WebCore::RenderBlock::skipWhitespace): Made two versions of this
2022         method, one for BidiIterator and one for BidiState.
2023         (WebCore::shouldSkipWhitespaceAfterStartObject): Removed the resolver
2024         parameter.
2025         (WebCore::RenderBlock::findNextLineBreak): Removed the resolver
2026         parameter. Removed calls to setAdjustEmbedding(). Removed the 'previous'
2027         variable and changed the 'last' variable to do its job.
2028         * rendering/bidi.h:
2029
2030 2008-03-10  Adam Roben  <aroben@apple.com>
2031
2032         Part of Bug 17224: DOM nodes/attributes should be editable
2033
2034         <http://bugs.webkit.org/show_bug.cgi?id=17224>
2035         <rdar://problem/5732825>
2036
2037         This patch makes text nodes editable via double-click.
2038
2039         Reviewed by Tim.
2040
2041         * page/inspector/DocumentPanel.js:
2042         (WebInspector.DOMNodeTreeElement._startEditing):
2043           - Moved most of this code to _startEditingAttribute
2044           - Calls _startEditingTextNode or _startEditingAttribute as
2045             appropriate
2046         (WebInspector.DOMNodeTreeElement._startEditingAttribute): Added. Code
2047         came from _startEditing.
2048         (WebInspector.DOMNodeTreeElement._startEditingTextNode): Added.
2049         (WebInspector.DOMNodeTreeElement._textNodeEditingCommitted): Added.
2050         (WebInspector.DOMNodeTreeElement._editingCancelled): Renamed from
2051         _attributeEditingCancelled.
2052         * page/inspector/utilities.js:
2053         (nodeTitleInfo): Wrap text nodes in a webkit-html-text-node span so
2054         that we can easily recognize/edit them.
2055
2056 2008-03-11  Holger Hans Peter Freyther  <zecke@selfish.org>
2057
2058         Reviewed by Darin.
2059
2060         r25512 inlined the urlIcon to improve the startup time of Safari on Mac. Inlining is
2061         not suitable for platforms where this icon is themable. E.g. the Qt platform is allowing
2062         to theme this icon and the Gtk+ platform will probably end up with themable icons
2063         as well.
2064         
2065         Remove dead code from the windows port and move the urlIcon from the windows
2066         directory to the Resource directory to be used by Qt and other ports.
2067         
2068         Ifdef the usage of the built-in icon in IconDatabase.cpp and for Qt do not use
2069         it. Gtk+ currently has no proper implementation of Image::loadPlatformResource but
2070         once it does it wants to use this for getting the urlIcon as well.
2071
2072         * Resources/urlIcon.png: Renamed from WebKit/win/WebKit.vcproj/urlIcon.png.
2073         * loader/icon/IconDatabase.cpp:
2074         (WebCore::IconDatabase::defaultIcon):
2075
2076 2008-03-11  Tor Arne Vestbø  <tavestbo@trolltech.com>
2077
2078         Reviewed by Darin.
2079
2080         Implemented HTML media element support for QtWebKit, using Phonon.
2081
2082         http://bugs.webkit.org/show_bug.cgi?id=17766
2083
2084         * WebCore.pro:
2085         * platform/graphics/MediaPlayer.cpp:
2086         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Added.
2087         (debugMediaObject):
2088         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2089         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2090         (WebCore::MediaPlayerPrivate::getSupportedTypes):
2091         (WebCore::MediaPlayerPrivate::hasVideo):
2092         (WebCore::MediaPlayerPrivate::load):
2093         (WebCore::MediaPlayerPrivate::cancelLoad):
2094         (WebCore::MediaPlayerPrivate::play):
2095         (WebCore::MediaPlayerPrivate::pause):
2096         (WebCore::MediaPlayerPrivate::paused):
2097         (WebCore::MediaPlayerPrivate::seek):
2098         (WebCore::MediaPlayerPrivate::seeking):
2099         (WebCore::MediaPlayerPrivate::duration):
2100         (WebCore::MediaPlayerPrivate::currentTime):
2101         (WebCore::MediaPlayerPrivate::setEndTime):
2102         (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2103         (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2104         (WebCore::MediaPlayerPrivate::bytesLoaded):
2105         (WebCore::MediaPlayerPrivate::totalBytesKnown):
2106         (WebCore::MediaPlayerPrivate::totalBytes):
2107         (WebCore::MediaPlayerPrivate::setRate):
2108         (WebCore::MediaPlayerPrivate::setVolume):
2109         (WebCore::MediaPlayerPrivate::setMuted):
2110         (WebCore::MediaPlayerPrivate::dataRate):
2111         (WebCore::MediaPlayerPrivate::networkState):
2112         (WebCore::MediaPlayerPrivate::readyState):
2113         (WebCore::MediaPlayerPrivate::updateStates):
2114         (WebCore::MediaPlayerPrivate::setVisible):
2115         (WebCore::MediaPlayerPrivate::setRect):
2116         (WebCore::MediaPlayerPrivate::loadStateChanged):
2117         (WebCore::MediaPlayerPrivate::rateChanged):
2118         (WebCore::MediaPlayerPrivate::sizeChanged):
2119         (WebCore::MediaPlayerPrivate::timeChanged):
2120         (WebCore::MediaPlayerPrivate::volumeChanged):
2121         (WebCore::MediaPlayerPrivate::didEnd):
2122         (WebCore::MediaPlayerPrivate::loadingFailed):
2123         (WebCore::MediaPlayerPrivate::naturalSize):
2124         (WebCore::MediaPlayerPrivate::eventFilter):
2125         (WebCore::MediaPlayerPrivate::repaint):
2126         (WebCore::MediaPlayerPrivate::paint):
2127         (WebCore::MediaPlayerPrivate::stateChanged):
2128         (WebCore::MediaPlayerPrivate::tick):
2129         (WebCore::MediaPlayerPrivate::metaDataChanged):
2130         (WebCore::MediaPlayerPrivate::seekableChanged):
2131         (WebCore::MediaPlayerPrivate::hasVideoChanged):
2132         (WebCore::MediaPlayerPrivate::bufferStatus):
2133         (WebCore::MediaPlayerPrivate::finished):
2134         (WebCore::MediaPlayerPrivate::currentSourceChanged):
2135         (WebCore::MediaPlayerPrivate::aboutToFinish):
2136         (WebCore::MediaPlayerPrivate::prefinishMarkReached):
2137         (WebCore::MediaPlayerPrivate::totalTimeChanged):
2138         * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Added.
2139         (WebCore::MediaPlayerPrivate::):
2140         (WebCore::MediaPlayerPrivate::isAvailable):
2141
2142 2008-03-10  Sam Weinig  <sam@webkit.org>
2143
2144         Reviewed by Beth Dakin.
2145
2146         Throw a SECURITY_ERR when accessing a tainted canvas
2147         by CanvasRenderingContext2D::getImageData() and
2148         HTMLCanvasElement::toDataURL().
2149
2150         * html/CanvasRenderingContext2D.cpp:
2151         (WebCore::CanvasRenderingContext2D::getImageData):
2152         * html/CanvasRenderingContext2D.h:
2153         * html/CanvasRenderingContext2D.idl:
2154         * html/HTMLCanvasElement.cpp:
2155         (WebCore::HTMLCanvasElement::toDataURL):
2156         * html/HTMLCanvasElement.h:
2157         * html/HTMLCanvasElement.idl:
2158
2159 2008-03-10  Justin Garcia  <justin.garcia@apple.com>
2160
2161         Reviewed by Sam.
2162
2163         <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog
2164
2165         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2166         (WebCore::hasCSSPropertyNamePrefix): Fixed a typo.  The code was only
2167         comparing the first character of the prefix to the first character
2168         of the property name.
2169
2170 2008-03-10  Andre Boule  <aboule@apple.com>
2171
2172         Reviewed by Beth.
2173
2174         Hold off on initializing the frame to avoid the RenderView getting 
2175         a null FrameView. This could potentially cause problems.
2176
2177         * svg/graphics/SVGImage.cpp:
2178         (WebCore::SVGImage::dataChanged):
2179
2180 2008-03-10  Darin Adler  <darin@apple.com>
2181
2182         - try to fix Qt build
2183
2184         * bridge/qt/qt_runtime.cpp:
2185         (KJS::Bindings::convertQVariantToValue): Change KJS::UChar to UChar.
2186
2187 2008-03-10  Darin Adler  <darin@apple.com>
2188
2189         Reviewed by Antti.
2190
2191         - fix <rdar://problem/3059610> VIP: links opened in new frame, window, or tab
2192           should be redrawn as visited immediately
2193         - fix <rdar://problem/4382809> Going "back" a page doesn't change the color of
2194           the visited URL at directory.umi
2195         - fix http://bugs.webkit.org/show_bug.cgi?id=4941
2196           Visited links should be marked as visited
2197         - fix http://bugs.webkit.org/show_bug.cgi?id=7960
2198           REGRESSION: Visited link color doesn't displayed after loading page from cache
2199
2200         We now mark all links on a page as "changed" at the appropriate times.
2201
2202         * WebCore.base.exp: Update since I made completeURL be a const member function.
2203
2204         * css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned
2205         into locals. Also changed some static data members to file-scoped globals with
2206         internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the
2207         prefix on m_styleNotYetAvailable to s_styleNotYetAvailable.
2208         (WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes.
2209         (WebCore::parseUASheet): Tweak the comment.
2210         (WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to
2211         use local variables instead of globals where possible.
2212         (WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so
2213         it can store the link in a hash. Also changed it to have a return value instead
2214         of having it modify a global variable. Added code to put the hash into a set so
2215         we can tell later if this is one of the links that affects this page.
2216         (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to
2217         checkPseudoState.
2218         (WebCore::CSSStyleSelector::matchUARules): Updated for name changes.
2219         (WebCore::CSSStyleSelector::styleForElement): Ditto.
2220         (WebCore::CSSStyleSelector::adjustRenderStyle): Ditto.
2221         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read
2222         the SVG style sheet to use a boolean global and put it right here in the function
2223         since this is the only code that needs to know about it.
2224         (WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes.
2225         (WebCore::colorForCSSValue): Moved code inside the function that is not needed
2226         anywhere else.
2227         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change
2228         to checkPseudoState.
2229         (WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on
2230         all links if there were any in the set.
2231         (WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all
2232         links if the one that changed is in the set.
2233
2234         * css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made
2235         CSSStyleSelector derive from Noncopyable. Made lots of member functions private that
2236         didn't need to be public, and removed others that could be made into non-member
2237         functions. Changed pseudoStyleRulesForElement to take a const String& instead of
2238         a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions.
2239         Got rid of unneeded friend declarations.
2240
2241         * dom/Document.cpp:
2242         (WebCore::Document::completeURL): Made const.
2243         (WebCore::findSlashDotDotSlash): Moved here from PageGroup.
2244         (WebCore::findSlashSlash): Ditto.
2245         (WebCore::findSlashDotSlash): Ditto.
2246         (WebCore::containsColonSlashSlash):
2247         (WebCore::cleanPath): Ditto.
2248         (WebCore::matchLetter): Ditto.
2249         (WebCore::needsTrailingSlash): Ditto.
2250         (WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is
2251         the poor-man's completeURL function. The idea of putting it here is that this
2252         way it can be alongside the real completeURL function. Later we should figure out
2253         a way to make this function share more code with the real thing and match behavior.
2254
2255         * dom/Document.h: Marked completeURL function const. Added visitedLinkHash function.
2256
2257         * page/DOMWindow.cpp:
2258         (WebCore::DOMWindow::getMatchedCSSRules): Updated for change to CSSStyleSelector.
2259
2260         * page/Page.cpp:
2261         (WebCore::Page::allVisitedStateChanged): Added. Calls allVisitedStateChanged on all
2262         style selectors.
2263         (WebCore::Page::visitedStateChanged): Ditto.
2264         * page/Page.h: Added the above functions.
2265
2266         * page/PageGroup.cpp:
2267         (WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter.
2268         The CSSStyleSelector now handles actually computing the hash, and it does so by
2269         calling code in Document.
2270         (WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share
2271         a bit more code. Added code that calls visitedStateChanged if a new link was added.
2272         (WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged
2273         if any visited links are removed.
2274         * page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct
2275         definition here.
2276
2277         * platform/text/StringHash.h:
2278         (WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with
2279         the StringImpl::computeHash function, using the same technique for avoiding 0.
2280         (WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h.
2281         (WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp.
2282
2283         * rendering/RenderStyle.cpp:
2284         (WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead
2285         of getting directly at a data member so the data member could be made private.
2286
2287         * loader/FrameLoader.cpp:
2288         (WebCore::FrameLoader::scrollToAnchor): Added call to updateHistoryForAnchorScroll.
2289         (WebCore::FrameLoader::updateHistoryForAnchorScroll): Added.
2290         * loader/FrameLoader.h: Added updateHistoryForAnchorScroll.
2291
2292 2008-03-10  Adam Roben  <aroben@apple.com>
2293
2294         Part of Bug 17224: DOM nodes/attributes should be editable
2295
2296         <http://bugs.webkit.org/show_bug.cgi?id=17224>
2297         <rdar://problem/5732825>
2298
2299         This patch makes DOM attributes editable via double-click.
2300
2301         Reviewed by Tim.
2302
2303         * page/inspector/DocumentPanel.js:
2304         (WebInspector.DOMNodeTreeElement.onmousedown): Don't do anything if
2305         we're being edited, since we want default editing behaviors to work.
2306         (WebInspector.DOMNodeTreeElement.ondblclick): Try to start editing
2307         before doing anything else.
2308         (WebInspector.DOMNodeTreeElement._startEditing): Added. Currently only
2309         lets you edit attributes.
2310         (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added.
2311         Uses a scratch element to get the new attribute(s) parsed, then sets
2312         the attribute(s) on the node in the inspected document.
2313         (WebInspector.DOMNodeTreeElement._attributeEditingCancelled): Added.
2314         (WebInspector.DOMNodeTreeElement._updateTitle): Added. Refreshes the
2315         representation of the node in the Inspector's DOM tree to reflect
2316         the node's current state.
2317         * page/inspector/inspector.css: Made the .editing class apply
2318         everywhere.
2319         * page/inspector/utilities.js:
2320         (nodeTitleInfo): Changed to surround attribute name/value pairs in a
2321         webkit-html-attribute span so that we can easily edit the pair as a
2322         whole.
2323
2324 2008-03-10  David Kilzer  <ddkilzer@apple.com>
2325
2326         Fix 64-bit builds.
2327
2328         Reviewed by Stephanie.
2329
2330         WebCore.exp only gets generated once for both 32-bit and 64-bit builds,
2331         so we must exclude the _NPN symbols when creating WebCore.LP64.exp.
2332
2333         * WebCore.xcodeproj/project.pbxproj: Reverted build phase shell code to
2334         r30826 to remove _NPN symbols from 64-bit builds in WebCore.LP64.exp.
2335
2336 2008-03-10  Eric Seidel  <eric@webkit.org>
2337
2338         Reviewed by Darin.
2339
2340         Remove KJS::UChar, use ::UChar instead
2341         http://bugs.webkit.org/show_bug.cgi?id=17017
2342
2343         To functional changes, thus no tests.
2344
2345         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2346         (WebCore::hasCSSPropertyNamePrefix):
2347         (WebCore::cssPropertyName):
2348         * bindings/js/JSDOMWindowBase.cpp:
2349         (WebCore::windowProtoFuncAToB):
2350         (WebCore::windowProtoFuncBToA):
2351         * bindings/js/JSSVGPODTypeWrapper.h:
2352         * bindings/js/kjs_proxy.cpp:
2353         (WebCore::KJSProxy::evaluate):
2354         * bridge/objc/objc_utility.mm:
2355         (KJS::Bindings::throwError):
2356         * dom/Document.cpp:
2357         (WebCore::Document::parseQualifiedName):
2358         * platform/text/AtomicString.cpp:
2359         (WebCore::AtomicString::add):
2360         * platform/text/String.cpp:
2361         (WebCore::String::String):
2362         (WebCore::String::operator Identifier):
2363         (WebCore::String::operator UString):
2364         * platform/text/TextCodecICU.cpp:
2365         (WebCore::TextCodecICU::decode):
2366         * svg/SVGAnimatedTemplate.h:
2367
2368 2008-03-10  Darin Adler  <darin@apple.com>
2369
2370         Reviewed by Sam.
2371
2372         - eliminate keyboard UI mode method from WebCoreFrameBridge
2373
2374         * page/ChromeClient.h: Added keyboardUIMode function.
2375         (WebCore::ChromeClient::keyboardUIMode): Ditto.
2376         * page/mac/EventHandlerMac.mm:
2377         (WebCore::EventHandler::tabsToAllControls): Call chrome client function instead
2378         of bridge function.
2379         * page/mac/WebCoreFrameBridge.h: Removed keyboardUIMode method, and other unused
2380         ones.
2381
2382         * WebCore.xcodeproj/project.pbxproj: Allowed Xcode to change the project.
2383         Do not try to fight the Xcode.
2384
2385 2008-03-10  Darin Adler  <darin@apple.com>
2386
2387         - oops, forgot to save last couple changes from the editor
2388
2389         * bindings/js/JSDOMWindowCustom.cpp:
2390         (WebCore::markDOMObjectWrapper): Tweaked a tiny bit.
2391         (WebCore::JSDOMWindow::mark): Sorted alphabetically.
2392
2393 2008-03-10  Darin Adler  <darin@apple.com>
2394
2395         Reviewed by Geoff.
2396
2397         - fix failing regression test (window.navigator is getting garbage
2398           collected and thus losing its custom properties)
2399
2400         * bindings/js/JSDOMWindowCustom.cpp:
2401         (WebCore::markDOMObject): Added helper function.
2402         (WebCore::JSDOMWindow::mark): Added. Marks the wrappers for all the objects that hang
2403         off the window object.
2404
2405         * page/DOMWindow.h:
2406         (WebCore::DOMWindow::optionalScreen): Added so we can get the Screen object without
2407         creating it if it's already there.
2408         (WebCore::DOMWindow::optionalSelection): Ditto.
2409         (WebCore::DOMWindow::optionalHistory): Ditto.
2410         (WebCore::DOMWindow::optionalLocationbar): Ditto.
2411         (WebCore::DOMWindow::optionalMenubar): Ditto.
2412         (WebCore::DOMWindow::optionalPersonalbar): Ditto.
2413         (WebCore::DOMWindow::optionalScrollbars): Ditto.
2414         (WebCore::DOMWindow::optionalStatusbar): Ditto.
2415         (WebCore::DOMWindow::optionalToolbar): Ditto.
2416         (WebCore::DOMWindow::optionalConsole): Ditto.
2417         (WebCore::DOMWindow::optionalNavigator): Ditto.
2418
2419         * page/DOMWindow.idl: Added the CustomMarkFunction flag. Sorted the flags in
2420         alphabetical order since there are a lot of them.
2421
2422 2008-03-10  Darin Adler  <darin@apple.com>
2423
2424         Reviewed by Sam.
2425
2426         - eliminate Java applet methods from WebCoreFrameBridge
2427
2428         * loader/FrameLoaderClient.h: Added a javaApplet function.
2429         * page/mac/FrameMac.mm:
2430         (WebCore::Frame::createScriptInstanceForWidget): Streamlined the code.
2431         Use the loader client instead of the bridge to get the applet.
2432         * page/mac/WebCoreFrameBridge.h: Removed the getAppletInView and
2433         pollForAppletInView methods. Also removed other unused things.
2434
2435 2008-03-10  Marc-Antoine Ruel  <maruel@gmail.com>
2436
2437         Reviewed by Eric, landed by Darin.
2438
2439         http://bugs.webkit.org/show_bug.cgi?id=16095
2440         Move GraphicsContextPrivate to its own header file.
2441
2442         Moves GraphicsContextState and GraphicsContextPrivate to its
2443         own header
2444
2445         * WebCore.vcproj/WebCore.vcproj:
2446         * platform/graphics/GraphicsContext.cpp:
2447         * platform/graphics/GraphicsContextPrivate.h: Added.
2448         (WebCore::GraphicsContextState::GraphicsContextState):
2449         (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
2450
2451 2008-03-10  Julien Chaffraix  <julien.chaffraix@gmail.com>
2452
2453         Reviewed and landed by Darin.
2454
2455         bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations
2456
2457         Removed reference to PERMISSION_DENIED (previous non standard exception) and replaced it
2458         by DOM exception SECURITY_ERR. Updated XMLHttpRequest::open to raise SECURITY_ERR.
2459
2460         * bindings/js/kjs_binding.cpp:
2461         (WebCore::setDOMException): Removed PERMISSION_DENIED code.
2462         * dom/ExceptionCode.cpp: Added SECURITY_ERR exception.
2463         * dom/ExceptionCode.h: Ditto.
2464         * xml/XMLHttpRequest.cpp:
2465         (WebCore::XMLHttpRequest::open): Returns SECURITY_ERR now.
2466         * xml/XMLHttpRequestException.h: Removed PERMISSION_DENIED.
2467
2468 2008-03-09  Adam Roben  <aroben@apple.com>
2469
2470         Refactor CSS editing code so we can share it with DOM editing
2471
2472         Add WebInspector.startEditing, which takes the element to be edited, a
2473         committedCallback, a cancelledCallback, and a context parameter. This
2474         function takes care of setting up the element for editing, and calls
2475         either the cancelledCallback or committedCallback when editing ends.
2476
2477         Reviewed by Tim.
2478
2479         * page/inspector/StylesSidebarPane.js:
2480         (WebInspector.StylePropertyTreeElement.startEditing):
2481           - Call WebInspector.isBeingEdited and WebInspector.startEditing
2482           - Removed code now handled by WebInspector.startEditing
2483         (WebInspector.StylePropertyTreeElement.editingEnded):
2484           - Renamed from endEditing
2485           - Removed code now handled by WebInspector.startEditing
2486         (WebInspector.StylePropertyTreeElement.editingCancelled):
2487           - Renamed from cancelEditing
2488           - Changed parameters to match WebInspector.startEditing's
2489             cancelledCallback
2490         (WebInspector.StylePropertyTreeElement.editingCommitted):
2491           - Renamed from commitEditing
2492           - Changed parameters to match WebInspector.startEditing's
2493             committedCallback
2494         * page/inspector/inspector.js:
2495         (WebInspector.changeFocus): Changed a call to firstParentWithClassName
2496         to firstParentOrSelfWithClassName so that if the focusable element
2497         itself is the target it will be recognized. I don't know why this
2498         change wasn't needed before this.
2499         (WebInspector.isBeingEdited): Added.
2500         (WebInspector.startEditing): Added.
2501
2502 2008-03-10  Adam Roben  <aroben@apple.com>
2503
2504         Windows build fix
2505
2506         * WebCore.vcproj/WebCore.vcproj: Pick up generated source files out of
2507         $(WebKitOutputDir) instead of hard-coding WebKitBuild.
2508
2509 2008-03-10  Darin Adler  <darin@apple.com>
2510
2511         * DerivedSources.make: Merge plug-in-related changes with the new way of handling
2512         autogenerated DOM classes.
2513
2514 2008-03-10  Johnny Ding  <johnnyding.webkit@gmail.com>
2515
2516         Reviewed, tweaked and landed by Alexey.
2517
2518         - fix http://bugs.webkit.org/show_bug.cgi?id=17732        
2519
2520         We didn't have a fallback to frame encoding in the case of loading a script via
2521         changing its src attribute.
2522
2523         Test: fast/dom/HTMLScriptElement/script-decoding-error-after-setting-src.html
2524
2525         * html/HTMLScriptElement.cpp:
2526         (WebCore::HTMLScriptElement::parseMappedAttribute): Use a helper function to get proper
2527         charset for correct decoding of script content.
2528         (WebCore::HTMLScriptElement::insertedIntoDocument):
2529         (WebCore::HTMLScriptElement::scriptCharset): A helper function for getting proper charset
2530         for the script (as much as can be determined prior to loading it).
2531         * html/HTMLScriptElement.h:
2532         * html/HTMLTokenizer.cpp:
2533         (WebCore::HTMLTokenizer::parseTag): Use a helper function to get proper charset for correct
2534         decoding of script content.
2535
2536 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2537
2538         Reviewed by Lars.
2539
2540         Fix reference counting of returned MimeType and Plugin objects
2541         created in the array wrappers.
2542
2543         * plugins/MimeTypeArray.cpp:
2544         * plugins/MimeTypeArray.h:
2545         * plugins/Plugin.cpp:
2546         * plugins/Plugin.h:
2547         * plugins/PluginArray.cpp:
2548         * plugins/PluginArray.h:
2549
2550 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2551
2552         Wx linking fix.
2553
2554         Added missing stubs for PluginData.
2555
2556         * platform/wx/TemporaryLinkStubs.cpp:
2557
2558 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2559
2560         Windows build fix that I forgot to merge earlier ;(
2561
2562         Forward declare Page as class, not struct.
2563
2564         * plugins/PluginData.h:
2565
2566 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2567
2568         Attempt to fix the Wx build.
2569
2570         * WebCoreSources.bkl:
2571
2572 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
2573
2574         Reviewed by Darin.
2575
2576         Done with Lars.
2577
2578         http://bugs.webkit.org/show_bug.cgi?id=16815
2579
2580         Ported the manually written JS bindings of window.navigator,
2581         window.navigator.plugins and window.navigator.mimeTypes to
2582         auto-generated bindings.
2583
2584         Moved the globally cached plugin and mimetype information to a
2585         per WebCore::Page shared PluginData structure.
2586
2587         Implemented window.navigator.plugins.refresh() in a
2588         platform-independent way.
2589
2590         * DerivedSources.make:
2591         * GNUmakefile.am:
2592         * WebCore.pro:
2593         * WebCore.vcproj/WebCore.vcproj:
2594         * WebCore.xcodeproj/project.pbxproj:
2595         * bindings/js/JSDOMWindowBase.cpp:
2596         (WebCore::JSDOMWindowBase::getValueProperty):
2597         * bindings/js/JSMimeTypeArrayCustom.cpp: Added.
2598         (WebCore::JSMimeTypeArray::canGetItemsForName):
2599         (WebCore::JSMimeTypeArray::nameGetter):
2600         * bindings/js/JSNavigatorCustom.cpp: Added.
2601         (WebCore::needsYouTubeQuirk):
2602         (WebCore::JSNavigator::appVersion):
2603         * bindings/js/JSPluginArrayCustom.cpp: Added.
2604         (WebCore::JSPluginArray::canGetItemsForName):
2605         (WebCore::JSPluginArray::nameGetter):
2606         * bindings/js/JSPluginCustom.cpp: Added.
2607         (WebCore::JSPlugin::canGetItemsForName):
2608         (WebCore::JSPlugin::nameGetter):
2609         * bindings/js/kjs_navigator.cpp: Removed.
2610         * bindings/js/kjs_navigator.h: Removed.
2611         * dom/Clipboard.cpp:
2612         * dom/DOMImplementation.cpp:
2613         (WebCore::DOMImplementation::createDocument):
2614         * loader/FrameLoader.cpp:
2615         (WebCore::FrameLoader::shouldUsePlugin):
2616         * page/DOMWindow.cpp:
2617         (WebCore::DOMWindow::clear):
2618         (WebCore::DOMWindow::navigator):
2619         * page/DOMWindow.h:
2620         * page/DOMWindow.idl:
2621         * page/DragController.cpp:
2622         * page/Frame.cpp:
2623         * page/Frame.h:
2624         * page/Navigator.cpp: Added.
2625         (WebCore::Navigator::Navigator):
2626         (WebCore::Navigator::~Navigator):
2627         (WebCore::Navigator::disconnectFrame):
2628         (WebCore::Navigator::appCodeName):
2629         (WebCore::Navigator::appName):
2630         (WebCore::Navigator::appVersion):
2631         (WebCore::Navigator::language):
2632         (WebCore::Navigator::userAgent):
2633         (WebCore::Navigator::platform):
2634         (WebCore::Navigator::plugins):
2635         (WebCore::Navigator::mimeTypes):
2636         (WebCore::Navigator::product):
2637         (WebCore::Navigator::productSub):
2638         (WebCore::Navigator::vendor):
2639         (WebCore::Navigator::vendorSub):
2640         (WebCore::Navigator::cookieEnabled):
2641         (WebCore::Navigator::javaEnabled):
2642         * page/Navigator.h: Added.
2643         (WebCore::Navigator::create):
2644         (WebCore::Navigator::frame):
2645         * page/Navigator.idl: Added.
2646         * page/Page.cpp:
2647         (WebCore::Page::refreshPlugins):
2648         (WebCore::Page::pluginData):
2649         * page/Page.h:
2650         * page/Plugin.h: Removed.
2651         * page/mac/FrameMac.mm:
2652         * page/mac/WebCoreFrameBridge.mm:
2653         (-[WebCoreFrameBridge canProvideDocumentSource]):
2654         * page/mac/WebCoreViewFactory.h:
2655         * page/qt/FrameQt.cpp:
2656         * page/win/FrameWin.cpp:
2657         * platform/gtk/TemporaryLinkStubs.cpp:
2658         * platform/mac/PlugInInfoStoreMac.mm: Removed.
2659         * platform/qt/MIMETypeRegistryQt.cpp:
2660         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2661         * plugins/MimeType.cpp: Added.
2662         (WebCore::MimeType::MimeType):
2663         (WebCore::MimeType::~MimeType):
2664         (WebCore::MimeType::type):
2665         (WebCore::MimeType::suffixes):
2666         (WebCore::MimeType::description):
2667         (WebCore::MimeType::enabledPlugin):
2668         * plugins/MimeType.h: Added.
2669         (WebCore::MimeType::create):
2670         * plugins/MimeType.idl: Added.
2671         * plugins/MimeTypeArray.cpp: Added.
2672         (WebCore::MimeTypeArray::MimeTypeArray):
2673         (WebCore::MimeTypeArray::~MimeTypeArray):
2674         (WebCore::MimeTypeArray::length):
2675         (WebCore::MimeTypeArray::item):
2676         (WebCore::MimeTypeArray::canGetItemsForName):
2677         (WebCore::MimeTypeArray::nameGetter):
2678         (WebCore::MimeTypeArray::getPluginData):
2679         * plugins/MimeTypeArray.h: Added.
2680         (WebCore::MimeTypeArray::create):
2681         (WebCore::MimeTypeArray::disconnectFrame):
2682         * plugins/MimeTypeArray.idl: Added.
2683         * plugins/Plugin.cpp: Added.
2684         (WebCore::Plugin::Plugin):
2685         (WebCore::Plugin::~Plugin):
2686         (WebCore::Plugin::name):
2687         (WebCore::Plugin::filename):
2688         (WebCore::Plugin::description):
2689         (WebCore::Plugin::length):
2690         (WebCore::Plugin::item):
2691         (WebCore::Plugin::canGetItemsForName):
2692         (WebCore::Plugin::nameGetter):
2693         * plugins/Plugin.h: Added.
2694         (WebCore::Plugin::create):
2695         * plugins/Plugin.idl: Added.
2696         * plugins/PluginArray.cpp: Added.
2697         (WebCore::PluginArray::PluginArray):
2698         (WebCore::PluginArray::~PluginArray):
2699         (WebCore::PluginArray::length):
2700         (WebCore::PluginArray::item):
2701         (WebCore::PluginArray::canGetItemsForName):
2702         (WebCore::PluginArray::nameGetter):
2703         (WebCore::PluginArray::refresh):
2704         (WebCore::PluginArray::getPluginData):
2705         * plugins/PluginArray.h: Added.
2706         (WebCore::PluginArray::create):
2707         (WebCore::PluginArray::disconnectFrame):
2708         * plugins/PluginArray.idl: Added.
2709         * plugins/PluginData.cpp: Added.
2710         (WebCore::PluginData::PluginData):
2711         (WebCore::PluginData::~PluginData):
2712         (WebCore::PluginData::supportsMimeType):
2713         (WebCore::PluginData::pluginNameForMimeType):
2714         * plugins/PluginData.h: Added.
2715         (WebCore::PluginData::create):
2716         (WebCore::PluginData::disconnectPage):
2717         (WebCore::PluginData::page):
2718         (WebCore::PluginData::plugins):
2719         (WebCore::PluginData::mimes):
2720         * plugins/mac/PluginDataMac.mm: Added.
2721         (WebCore::PluginData::initPlugins):
2722         (WebCore::PluginData::refresh):
2723         * plugins/qt/PluginDataQt.cpp: Added.
2724         (WebCore::PluginData::initPlugins):
2725         * plugins/win/PluginDataWin.cpp: Added.
2726         (WebCore::PluginData::initPlugins):
2727         (WebCore::PluginData::refresh):
2728
2729 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2730
2731         Reviewed by Holger.
2732
2733         Replace two printfs() in the Qt port with notImplemented().
2734
2735         * html/CanvasRenderingContext2D.cpp:
2736         (WebCore::CanvasRenderingContext2D::applyStrokePattern):
2737         (WebCore::CanvasRenderingContext2D::applyFillPattern):
2738
2739 2008-03-10  Simon Hausmann  <hausmann@webkit.org>
2740
2741         Reviewed by Alp.
2742
2743         Compilation fix with gcc 4.3: Include stdio.h for printf.
2744
2745         * html/CanvasRenderingContext2D.cpp:
2746         * html/HTMLCanvasElement.cpp:
2747
2748 2008-03-09  Steve Falkenburg  <sfalken@apple.com>
2749
2750         Stop Windows build if an error occurs in a prior project.
2751
2752         Rubber stamped by Darin.
2753
2754         * WebCore.vcproj/WebCore.vcproj:
2755         * WebCore.vcproj/WebCoreGenerated.vcproj:
2756
2757 2008-03-09  Darin Adler  <darin@apple.com>
2758
2759         * DerivedSources.make: Third try at fixing the build.
2760         * bindings/js/JSRGBColor.cpp: And touching this file.
2761
2762 2008-03-09  Darin Adler  <darin@apple.com>
2763
2764         * DerivedSources.make: One *more* try at fixing the build.
2765
2766 2008-03-09  Darin Adler  <darin@apple.com>
2767
2768         * DerivedSources.make: One more try at fixing the build.
2769
2770 2008-03-09  Darin Adler  <darin@apple.com>
2771
2772         * DerivedSources.make: Re-land the change, fixed, and with an attempt to fix the
2773         bots by removing the incorrect file.
2774
2775 2008-03-09  Oliver Hunt  <oliver@apple.com>
2776
2777         RS=Mark Rowe
2778
2779         Roll out r30909 -- it breaks the build and is a non-trivial fix (according to weinig)
2780
2781         * DerivedSources.make:
2782
2783 2008-03-09  Darin Adler  <darin@apple.com>
2784
2785         Reviewed by Adam.
2786
2787         * DerivedSources.make: Put the list of DOM classes into its own
2788         variable, and generate the JavaScript bindings and Objective-C
2789         bindings dependencies from that. Added some separators to make it
2790         a little easier to see the sections of the file. Moved all the
2791         Mac-specific rules (except for the SVG conditional part) down
2792         to the bottom of the file in a separate section.
2793
2794 2008-03-09  Adam Roben  <aroben@apple.com>
2795
2796         Windows build fix
2797
2798         * WebCore.vcproj/WebCore.vcproj: Make sure all Cairo files are
2799         excluded from all three CG-based configurations: Debug, Release, and
2800         Debug_Internal.
2801
2802 2008-03-08  Mark Rowe  <mrowe@apple.com>
2803
2804         Attempt to fix the Qt build.
2805
2806         * platform/MIMETypeRegistry.cpp:  Add missing include.
2807
2808 2008-03-08  Oliver Hunt  <oliver@apple.com>
2809
2810         Reviewed by Sam W.
2811
2812         Bug 16516: canvas image patterns stop working with some transformations
2813
2814         Simple fix.  We used x/yStep of FLT_MAX to fake a no-repeat-x/y pattern
2815         with CG.  However any transforms involving FLT_MAX immediately get
2816         consumed by the introduced floating point error.  yStep had already been
2817         clamped to a much smaller arbitrary value, and this patch makes us use
2818         that clamp value for xStep as well.
2819
2820         * html/CanvasPattern.cpp:
2821         (WebCore::CanvasPattern::createPattern):
2822
2823 2008-03-08  Oliver Hunt  <oliver@apple.com>
2824
2825         Reviewed by Mitz.
2826
2827         Bug 17728: Canvas.createPattern with null repeat argument throws an exception
2828
2829         Trivial fix, we were calling toString on null which produces the string "null",
2830         we just needed to switch to using valueToStringWithNullCheck rather than 
2831         JSValue::toString directly
2832
2833         Test: fast/canvas/canvas-pattern-behaviour.html
2834
2835         * WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2836         (WebCore::JSCanvasRenderingContext2D::createPattern):
2837
2838 2008-03-08  Mark Rowe  <mrowe@apple.com>
2839
2840         Reviewed by Darin Adler.
2841
2842         Fix 64-bit build with GCC 4.2.
2843
2844         * bindings/objc/WebScriptObject.mm: Use NSUInteger in place of unsigned where required.
2845         * platform/mac/SharedBufferMac.mm: Ditto.
2846
2847 2008-03-08  Dan Bernstein  <mitz@apple.com>
2848
2849         Reviewed by Oliver Hunt.
2850
2851         - fix garbage in transparent areas in canvas.toDataURL results
2852
2853         * platform/graphics/cg/ImageBufferCG.cpp:
2854         (WebCore::ImageBuffer::toDataURL): Clear the bitmap context before
2855         painting the canvas image onto it.
2856
2857 2008-03-08  Darin Adler  <darin@apple.com>
2858
2859         Reviewed by Adele.
2860
2861         - eliminate custom highlight methods from WebCoreFrameBridge
2862
2863         * page/Chrome.cpp:
2864         (WebCore::ChromeClient::customHighlightRect): Added.
2865         (WebCore::ChromeClient::paintCustomHighlight): Added.
2866         * page/ChromeClient.h: Added custom highlight functions.
2867         * page/Frame.h: Removed custom highlight functions.
2868         * page/mac/FrameMac.mm: Ditto.
2869         * page/mac/WebCoreFrameBridge.h: Removed custom highlight methods.
2870         * rendering/InlineTextBox.cpp:
2871         (WebCore::InlineTextBox::paintCustomHighlight): Changed code to use
2872         the ChromeClient instead of WebCoreFrameBridge to do the custom highlight.
2873         * rendering/RenderBox.cpp:
2874         (WebCore::RenderBox::paintCustomHighlight): Ditto.
2875         * rendering/RootInlineBox.cpp:
2876         (WebCore::RootInlineBox::addHighlightOverflow): Ditto.
2877         (WebCore::RootInlineBox::paintCustomHighlight): Ditto.
2878
2879 2008-03-07  Stephanie Lewis  <slewis@apple.com>
2880
2881         Reviewed by Oliver.
2882
2883         Fix Windows build.
2884
2885         * platform/graphics/cg/ImageBufferCG.cpp:
2886         (WebCore::ImageBuffer::toDataURL):
2887
2888 2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
2889
2890         Unify concept of enabling Netscape Plug-in API (NPAPI).
2891
2892         Reviewed by Darin.
2893
2894         No test cases since there is no change in functionality.
2895
2896         * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro.
2897         If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES.
2898         * WebCore.NPAPI.exp: Added.
2899         * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp.
2900         * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except
2901         comments) since we now handle exported NPAPI methods via DerivedSources.make.
2902
2903         * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as
2904         defined in Platform.h.
2905
2906         * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
2907         (-[DOMElement _NPObject]):
2908
2909         * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with
2910         ENABLE(NETSCAPE_PLUGIN_API).
2911         * bridge/NP_jsobject.h: Ditto.
2912         * bridge/c/c_class.cpp: Ditto.
2913         * bridge/c/c_class.h: Ditto.
2914         * bridge/c/c_instance.cpp: Ditto.
2915         * bridge/c/c_instance.h: Ditto.
2916         * bridge/c/c_runtime.cpp: Ditto.
2917         * bridge/c/c_runtime.h: Ditto.
2918         * bridge/c/c_utility.cpp: Ditto.
2919         * bridge/c/c_utility.h: Ditto.
2920         * bridge/npruntime.cpp: Ditto.
2921         * bridge/npruntime_impl.h: Ditto.
2922         * bridge/npruntime_priv.h: Ditto.
2923         * bridge/runtime.cpp: Ditto.
2924         (KJS::Bindings::Instance::createBindingForLanguageInstance):
2925
2926         * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
2927         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
2928         (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
2929         * html/HTMLPlugInElement.h: Ditto.
2930
2931         * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
2932         (WebCore::Frame::clearScriptObjects):
2933         (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API)
2934         guard around m_windowScriptNPObject.
2935         * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
2936         * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around
2937         m_windowScriptNPObject.
2938         * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
2939         (WebCore::Frame::createScriptInstanceForWidget):
2940
2941 2008-03-07  Alexey Proskuryakov  <ap@webkit.org>
2942
2943         Reviewed by Darin.
2944
2945         REGRESSION: Korean decoding doesn't support extended EUC-KR.
2946
2947         Test: fast/encoding/char-decoding.html
2948
2949         * platform/text/TextCodecICU.cpp:
2950         (WebCore::TextCodecICU::registerExtendedEncodingNames): Untangle the system of duplicate ICU
2951         encoding names by manually registering windows-939-2000, and mapping all other related
2952         encodings to it.
2953
2954 2008-03-07  Dan Bernstein  <mitz@apple.com>
2955
2956         Reviewed by Stephanie.
2957
2958         - try to fix leaks seen on Tiger after r30840
2959
2960         * css/CSSStyleSelector.cpp:
2961         (WebCore::CSSStyleSelector::~CSSStyleSelector): Use the default operator
2962         delete, rather than arena delete, to deallocate the root default style.
2963
2964 2008-03-07  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
2965
2966         Reviewed by Alp Toker.
2967
2968         http://bugs.webkit.org/show_bug.cgi?id=17681
2969         GtkLauncher fails to render an element with position: fixed
2970
2971         Implement the required parts of PlatformScreenGtk.
2972
2973         * ChangeLog:
2974         * platform/gtk/PlatformScreenGtk.cpp:
2975         (WebCore::screenDepth):
2976         (WebCore::screenIsMonochrome):
2977         (WebCore::screenRect):
2978
2979 2008-03-07  Oliver Hunt  <oliver@apple.com>
2980
2981         Reviewed by Darin Adler.
2982
2983         Bug 16610: <canvas> restore() removes path segments created before it
2984
2985         The problem here is that WebKit stored the Path as part of the state, so
2986         restore would incorrectly lose changes made to the canvas path.  To match
2987         Firefox and HTML5 we make two real changes:
2988           * Move the context path from the state object directly onto the context.
2989             This is responsible for all the changes to the path manipulation functions
2990           * Add transform tracking to each state -- this is needed to correctly transform
2991             the current path when restore()-ing to a prior state.
2992
2993         Test: fast/canvas/canvas-save-restore-with-path.html
2994
2995         * html/CanvasRenderingContext2D.cpp:
2996         (WebCore::CanvasRenderingContext2D::restore):
2997         (WebCore::CanvasRenderingContext2D::scale):
2998         (WebCore::CanvasRenderingContext2D::rotate):
2999         (WebCore::CanvasRenderingContext2D::translate):
3000         (WebCore::CanvasRenderingContext2D::transform):
3001         (WebCore::CanvasRenderingContext2D::beginPath):
3002         (WebCore::CanvasRenderingContext2D::closePath):
3003         (WebCore::CanvasRenderingContext2D::moveTo):
3004         (WebCore::CanvasRenderingContext2D::lineTo):
3005         (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
3006         (WebCore::CanvasRenderingContext2D::arcTo):
3007         (WebCore::CanvasRenderingContext2D::arc):
3008         (WebCore::CanvasRenderingContext2D::rect):
3009         (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode):
3010         (WebCore::CanvasRenderingContext2D::fill):
3011         (WebCore::CanvasRenderingContext2D::stroke):
3012         (WebCore::CanvasRenderingContext2D::clip):
3013         (WebCore::CanvasRenderingContext2D::isPointInPath):
3014         * html/CanvasRenderingContext2D.h:
3015
3016 2008-03-07  Oliver Hunt  <oliver@apple.com>
3017
3018         Reviewed by Ada.
3019
3020         Fix for crash caused by FrameLoader incorrectly assuming it has
3021         a RenderWidget
3022
3023         In some circumstances an application embedding a WebView may 
3024         choose to prevent a webview from loading a resource.  If that
3025         resource was requested by an <object> element then we may 
3026         fallback to different content which may not produce a RenderWidget.
3027         Unfortunately FrameLoader::loadSubframe was assuming that if a
3028         renderer was produced it would always be a RenderWidget, and arbitrarily
3029         performed what could be an incorrect cast.  This could then lead to
3030         a crash.
3031
3032         We currently don't have anyway of making a test for this.
3033
3034         * loader/FrameLoader.cpp:
3035         (WebCore::FrameLoader::loadSubframe):
3036
3037 2008-03-07  Samuel Weinig  <sam@webkit.org>
3038
3039         Reviewed by Oliver Hunt.
3040
3041         Fix for http://bugs.webkit.org/show_bug.cgi?id=16673
3042         <canvas> lacks toDataURL()
3043
3044         Tests: fast/canvas/toDataURL-noData.html
3045                fast/canvas/toDataURL-supportedTypes.html
3046
3047         * html/CanvasRenderingContext2D.cpp:
3048         (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage): Make message non-global.
3049         * html/HTMLCanvasElement.cpp:
3050         (WebCore::HTMLCanvasElement::printSecurityExceptionMessage): Log error message indicating that toDataURL has
3051         been called on a tainted canvas. 
3052         (WebCore::HTMLCanvasElement::toDataURL): This does the tainted canvas check, ensures that the canvas has pixel
3053         data, checks to see if the MIME type is supported.  Unsupported MIME types and the null string (which is made
3054         by passing no argument/null/undefined in JavaScript) are treated as being PNG, as per the spec.  The actual 
3055         toDataURL logic is actually done in the ImageBuffer class.
3056         * html/HTMLCanvasElement.h: Add function declarations.
3057         * html/HTMLCanvasElement.idl: Add function declaration.
3058
3059         * platform/MIMETypeRegistry.cpp:
3060         (WebCore::initializeSupportedImageMIMETypes):
3061         (WebCore::initializeSupportedImageMIMETypesForEncoding):
3062         (WebCore::initializeSupportedJavaScriptMIMETypes):
3063         (WebCore::initializeSupportedNonImageMimeTypes):
3064         (WebCore::initializeSupportedMediaMIMETypes):
3065         (WebCore::initializeMIMETypeRegistry):
3066         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
3067         (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
3068         (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
3069         (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
3070         (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
3071         (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
3072         (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
3073         (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
3074         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
3075         (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
3076         (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding):
3077         (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
3078         (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
3079         * platform/MIMETypeRegistry.h:
3080         Clean up and add new supportedImageMIMETypesForEncoding set which contains the set of
3081         MIME types the platform knows how to encode. Currently only implemented for CG and Qt.
3082
3083         * platform/graphics/ImageBuffer.h: Add toDataURL method.
3084         * platform/graphics/cairo/ImageBufferCairo.cpp:
3085         (WebCore::ImageBuffer::toDataURL): Add stub.
3086         * platform/graphics/cg/ImageBufferCG.cpp:
3087         (WebCore::ImageBuffer::create):
3088         (WebCore::ImageBuffer::getImageData):
3089         (WebCore::ImageBuffer::putImageData):
3090         (WebCore::ImageBuffer::toDataURL):
3091         Converts the current context to a data: url of the specified MIME type.  This method
3092         unfortunately has to flip the context, resulting in less than optimal code.
3093
3094         * platform/graphics/qt/ImageBufferQt.cpp:
3095         (WebCore::ImageBuffer::toDataURL): Add stub.
3096         * platform/graphics/wx/ImageBufferWx.cpp:
3097         (WebCore::ImageBuffer::toDataURL): Add stub.
3098
3099 2008-03-07  Steve Falkenburg  <sfalken@apple.com>
3100
3101         Build fix.
3102
3103         * WebCore.vcproj/WebCore.vcproj:
3104
3105 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
3106
3107         Reviewed by Mark Rowe.
3108
3109         Correct build intermediary output
3110         (http://bugs.webkit.org/show_bug.cgi?id=17713)
3111
3112         * WebCore/WebCore.vcproj:  Correct intermediary paths
3113
3114 2008-03-07  Brent Fulgham  <bfulgham@gmail.com>
3115
3116         Reviewed by Steve Falkenburg.
3117
3118         Add Cairo build requirements to WebCore.vcproj under a new
3119         set of targets.  Exclude Cairo elements from normal CG build.
3120         Exclude CG elements from Cairo builds.
3121         (http://bugs.webkit.org/show_bug.cgi?id=17300)
3122
3123         * WebCore.vcproj/WebCore.vcproj:
3124         * WebCore.vcproj/webcore.vsprops: Added.
3125
3126 2008-03-07  Darin Adler  <darin@apple.com>
3127
3128         Reviewed by Adam.
3129
3130         - eliminated WebCoreFrameBridge runOpenPanel
3131
3132         * page/ChromeClient.h: Added runOpenPanel function.
3133         * page/mac/ChromeMac.mm:
3134         (WebCore::ChromeClient::runOpenPanel): Added.
3135         * platform/FileChooser.cpp:
3136         (WebCore::FileChooser::FileChooser): Moved this here. It's no longer platform-specific.
3137         Also start the refcount at 1.
3138         (WebCore::FileChooser::create): Added adoptRef since the refcount no starts at one.
3139         (WebCore::FileChooser::~FileChooser): Moved here. No longer platform-specific.
3140         * platform/FileChooser.h: Removed m_controller, which was Macintosh-specific.
3141         * platform/gtk/FileChooserGtk.cpp: Removed FileChooser constructor and destructor,
3142         since they are no longer platform-specific.
3143         * platform/qt/FileChooserQt.cpp: Ditto.
3144         * platform/win/FileChooserWin.cpp: Ditto.
3145         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
3146         * platform/mac/FileChooserMac.mm:
3147         (WebCore::FileChooser::openFileChooser): Call the chrome client instead of the
3148         bridge to run the open panel. Allows us to get rid of the WebCoreOpenPanelController
3149         class and m_controller data member and move the cosntrutor/destructor to platform-
3150         independent code.
3151
3152 2008-03-07  Adam Roben  <aroben@apple.com>
3153
3154         Add JavaScriptDebugServer
3155
3156         This class is a singleton which allows one or more
3157         JavaScriptDebugListeners to receive callbacks during JavaScript
3158         execution.
3159
3160         Right now all listeners receive callbacks for all Pages in the
3161         process. Eventually we will want to support listeners registering for
3162         callbacks for specific Pages (e.g., the Inspector will want to listen
3163         for execution in just the Page it's inspecting).
3164
3165         Pages notify the JavaScriptDebugServer when they are created so that
3166         it can install itself as the Page's debugger.
3167
3168         Reviewed by Darin.
3169
3170         * GNUMakefile.am: Added new files to project.
3171         * WebCore.pro: Ditto.
3172         * WebCore.vcproj/WebCore.vcproj: Ditto.
3173         * WebCore.xcodeproj/project.pbxproj: Ditto.
3174         * WebCoreSources.bkl: Ditto.
3175         * page/JavaScriptDebugListener.h: Added.
3176         * page/JavaScriptDebugServer.cpp: Added.
3177         (WebCore::toFrame):
3178         (WebCore::JavaScriptDebugServer::shared):
3179         (WebCore::JavaScriptDebugServer::JavaScriptDebugServer):
3180         (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
3181         (WebCore::JavaScriptDebugServer::addListener): Registers as the
3182         debugger for all Pages if we're adding our first listener.
3183         (WebCore::JavaScriptDebugServer::removeListener): Deregisters as the
3184         debugger for all Pages if we're removing our last listner.
3185         (WebCore::JavaScriptDebugServer::pageCreated): Registers as the
3186         debugger for the newly created Page if we have any listeners.
3187         (WebCore::dispatchDidParseSource): Helper function.
3188         (WebCore::dispatchFailedToParseSource): Ditto.
3189         (WebCore::JavaScriptDebugServer::sourceParsed): Call
3190         dispatchDidParseSource or dispatchFailedToParseSource depending on
3191         whether there was an error or not.
3192         (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Calls
3193         the passed-in JavaScriptExecutionCallback on each listener, guarding
3194         against re-entry.
3195         (WebCore::JavaScriptDebugServer::callEvent): Dispatch didEnterCallFrame.
3196         (WebCore::JavaScriptDebugServer::atStatement): Dispatch willExecuteStatement.
3197         (WebCore::JavaScriptDebugServer::returnEvent): Dispatch willLeaveCallFrame.
3198         (WebCore::JavaScriptDebugServer::exception): Dispatch exceptionWasRaised.
3199         * page/JavaScriptDebugServer.h: Added.
3200         * page/Page.cpp:
3201         (WebCore::Page::Page): Tell the shared JavaScriptDebugServer we were
3202         created so it can register as our debugger if needed.
3203
3204 2008-03-07  Darin Adler  <darin@apple.com>
3205
3206         Reviewed by Brady.
3207
3208         - fix a theoretical problem with the visited-link hash table by avoiding collision
3209           with the special "deleted" value
3210         - improve efficiency of with the visited-link hash table by not hashing twice
3211
3212         * page/PageGroup.cpp:
3213         (WebCore::avoidDeletedValue): Added. Makes sure we never try to use the "all ones"
3214         value, since the hash table uses that for deleted hash table entries.
3215         (WebCore::PageGroup::isLinkVisited): Call avoidDeletedValue before using the hash
3216         value with the HashSet.
3217         (WebCore::PageGroup::addVisitedLink): Ditto.
3218
3219         * page/PageGroup.h: Added a new hash function, AlreadyHashed, for unsigned integer
3220         values. This assumes that the value is already a hash value, and doesn't try to
3221         hash it again. Used this for m_visitedLinkHashes.
3222
3223 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
3224
3225         Fix the Qt build.
3226
3227         * WebCore.pro:
3228
3229 2008-03-06  Sam Weinig  <sam@webkit.org> with a little help from Oliver Hunt  <oliver@apple.com>
3230
3231         Reviewed by Mitz.
3232
3233         Implement the HTML5 canvas tainting rules to prevent potential data leakage
3234
3235         Added originClean to HTMLCanvasElement and CanvasPattern
3236         to track whether a canvas (or pattern) is tainted by remote
3237         data.
3238         Use originClean flag to determine whether getImageData should
3239         return, well, image data.
3240
3241         Test: http/tests/security/canvas-remote-read-remote-image.html
3242
3243         * html/CanvasPattern.cpp:
3244         (WebCore::CanvasPattern::CanvasPattern):
3245         * html/CanvasPattern.h:
3246         * html/CanvasRenderingContext2D.cpp:
3247         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
3248         (WebCore::CanvasRenderingContext2D::setFillStyle):
3249         (WebCore::CanvasRenderingContext2D::checkOrigin):
3250         (WebCore::CanvasRenderingContext2D::drawImage):
3251         (WebCore::CanvasRenderingContext2D::drawImageFromRect):
3252         (WebCore::CanvasRenderingContext2D::createPattern):
3253         (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage):
3254         (WebCore::CanvasRenderingContext2D::getImageData):
3255         * html/CanvasRenderingContext2D.h:
3256         * html/HTMLCanvasElement.cpp:
3257         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
3258         * html/HTMLCanvasElement.h:
3259         (WebCore::HTMLCanvasElement::setOriginTainted):
3260         (WebCore::HTMLCanvasElement::originClean):
3261
3262 2008-03-06  Anders Carlsson  <andersca@apple.com>
3263
3264         Reviewed by Jon.
3265
3266         Templatize the JNI call code to reduce the amount of code that has
3267         to be duplicated.
3268
3269         * bridge/jni/jni_class.cpp:
3270         (JavaClass::JavaClass):
3271         * bridge/jni/jni_instance.cpp:
3272         (JavaInstance::stringValue):
3273         (JavaInstance::numberValue):
3274         (JavaInstance::booleanValue):
3275         (JavaInstance::invokeMethod):
3276         * bridge/jni/jni_jsobject.cpp:
3277         (JavaJSObject::convertJObjectToValue):
3278         * bridge/jni/jni_runtime.cpp:
3279         (JavaField::JavaField):
3280         (JavaMethod::JavaMethod):
3281         * bridge/jni/jni_utility.cpp:
3282         * bridge/jni/jni_utility.h:
3283         (KJS::Bindings::):
3284         (KJS::Bindings::callJNIMethodIDA):
3285         (KJS::Bindings::callJNIMethodV):
3286         (KJS::Bindings::callJNIMethod):
3287         (KJS::Bindings::callJNIStaticMethod):
3288
3289 2008-03-06  Darin Adler  <darin@apple.com>
3290
3291         Reviewed by Mitz.
3292
3293         - fix regression test failures from the visited-link change
3294
3295         * WebCore.base.exp: Export PageGroup::setShouldTrackVisitedLinks.
3296         * page/PageGroup.cpp:
3297         (WebCore::PageGroup::addVisitedLink): Do nothing and return early
3298         if shouldTrackVisitedLinks is false.
3299         (WebCore::PageGroup::removeVisitedLinks): Reset m_visitedLinksPopulated
3300         so the next time a link is queried this will be populated from history.
3301         (WebCore::PageGroup::setShouldTrackVisitedLinks): Added.
3302         * page/PageGroup.h: Added setShouldTrackVisitedLinks. This is global
3303         for now, but it would be better if it was per-page-group instead.
3304
3305 2008-03-06  Adele Peterson  <adele@apple.com>
3306
3307         Reviewed by Darin.
3308
3309         Fixes for for <rdar://problem/5785892> Implement activeElement attribute for HTMLDocument (HTML5)
3310         and <rdar://problem/5785895> Implement hasFocus() for HTMLDocument (HTML5)
3311
3312         Tests: fast/dom/HTMLDocument/activeElement.html
3313                fast/dom/HTMLDocument/hasFocus.html
3314
3315         * html/HTMLDocument.cpp:
3316         (WebCore::HTMLDocument::activeElement): Added. Returns the focused element, or the body element if nothing's focused.
3317         (WebCore::HTMLDocument::hasFocus): Added. Returns whether or not the document has focus (inclusive of sub-frames).
3318         * html/HTMLDocument.h: Added methods for activeElement and hasFocus.
3319         * html/HTMLDocument.idl: Added definitions for activeElement and hasFocus.
3320
3321 2008-03-06  Dan Bernstein  <mitz@apple.com>
3322
3323         Reviewed by Darin Adler.
3324
3325         - fix <rdar://problem/5741981> 154008 WebKit: Some asian language font glyphs are not shown (in Mail and Entourage)
3326
3327         Test: fast/text/soft-hyphen-3.html
3328
3329         * rendering/bidi.cpp:
3330         (WebCore::checkMidpoints):
3331         (WebCore::RenderBlock::findNextLineBreak): Made 'pos' unsigned. Made the
3332         midpoint after a hyphen always be a valid iterator, not allowing an
3333         offset past the end of a text node. Changed the check for consecutive
3334         soft hyphens to account for that.
3335
3336 2008-03-06  Darin Adler  <darin@apple.com>
3337
3338         - try to fix Wx build
3339
3340         * WebCoreSources.bkl: Added PageGroup.cpp.
3341
3342 2008-03-06  Darin Adler  <darin@apple.com>
3343
3344         - fix some builds
3345
3346         * GNUmakefile.am: Added PageGroup.cpp.
3347         * WebCore.base.exp: Removed WebCoreHistory.
3348         * WebCore.pro: Added PageGroup.cpp.
3349
3350 2008-03-06  Alexey Proskuryakov  <ap@webkit.org>
3351
3352         Reviewed by Darin.
3353
3354         <rdar://problem/5687269> Need to create a Collator abstraction for WebCore and JavaScriptCore
3355         
3356         * ForwardingHeaders/wtf/unicode/Collator.h: Added.
3357         * xml/XSLTUnicodeSort.cpp:
3358         (WebCore::xsltUnicodeSortFunction):
3359         * xml/XSLTUnicodeSort.h:
3360
3361 2008-03-06  Darin Adler  <darin@apple.com>
3362
3363         Reviewed by Mitz.
3364
3365         - fix http://bugs.webkit.org/show_bug.cgi?id=17526
3366           REGRESSION: iframes are added to Safari's History menu
3367           by separating the visited link machinery from global history
3368
3369         This should also make page loading faster due to more efficient visited link coloring.
3370
3371         * WebCore.base.exp: Updated.
3372         * WebCore.vcproj/WebCore.vcproj: Added PageGroup.h/cpp, removed GlobalHistory.h/cpp.
3373         * WebCore.xcodeproj/project.pbxproj: Ditto. Also removed WebCoreHistory.h/m.
3374
3375         * css/CSSStyleSelector.cpp: Updated includes.
3376         (WebCore::CSSStyleSelector::initElementAndPseudoState): Eliminated code to set
3377         currentEncodedURL.
3378         (WebCore::checkPseudoState): Moved most of the code inside a new
3379         PageGroup::isLinkVisited function.
3380         (WebCore::CSSStyleSelector::canShareStyleWithElement): Tightened code a bit by using
3381         references and only getting colors when needed.
3382         (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Ditto.
3383         * css/CSSStyleSelector.h: Removed EncodedURL, m_encodedURL, and setEncodedURL.
3384
3385         * dom/Document.cpp:
3386         (WebCore::Document::attach): Removed call to setEncodedURL.
3387         (WebCore::Document::setURL): Ditto.
3388         (WebCore::Document::recalcStyleSelector): Ditto.
3389
3390         * loader/FrameLoader.cpp:
3391         (WebCore::FrameLoader::addBackForwardItemClippedAtTarget): Changed code to use
3392         early exit idiom to be a little more readable.
3393         (WebCore::FrameLoader::urlsMatchItem): Change to use a reference for slightly
3394         better efficiency.
3395         (WebCore::FrameLoader::goToItem): Use early exit idiom to be a little more
3396         readable.
3397         (WebCore::FrameLoader::updateHistoryForStandardLoad): Moved history code back
3398         in here and got rid of the helper function updateGlobalHistory, restoring the
3399         logic before r30549. Also added a call to the new addVisitedLink function.
3400         (WebCore::FrameLoader::updateHistoryForClientRedirect): Added code to call
3401         addVisitedLink here.
3402         (WebCore::FrameLoader::updateHistoryForBackForwardNavigation): Removed comment.
3403         (WebCore::FrameLoader::updateHistoryForReload): Removed call to
3404         updateGlobalHistory; we can just go without updating global history or
3405         visited links here, at least for now, since it's not clear that a reload
3406         is a "history event".
3407         (WebCore::FrameLoader::updateHistoryForRedirectWithLockedHistory): Moved
3408         history code back where it was, and added the call to addVisitedLink, just
3409         as in updateHistoryForStandardLoad above.
3410         * loader/FrameLoader.h: Removed updateGlobalHistory function.
3411
3412         * page/Chrome.cpp:
3413         (WebCore::ChromeClient::populateVisitedLinks): Added. Empty placeholder so we
3414         don't have to implement this for every port all at once.
3415         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Changed to use the
3416         new PageGroup class.
3417         * page/ChromeClient.h: Added populateVisitedLinks function, used to fill the
3418         visited links set from the global history at application startup time.
3419
3420         * page/FrameTree.cpp:
3421         (WebCore::FrameTree::find): Updated to use the new PageGroup class.
3422
3423         * page/GlobalHistory.h: Removed.
3424         * page/win/GlobalHistoryWin.cpp: Removed.
3425         * page/mac/GlobalHistoryMac.mm: Removed.
3426         * platform/mac/WebCoreHistory.h: Removed.
3427         * platform/mac/WebCoreHistory.m: Removed.
3428         * platform/win/WebCoreHistory.cpp: Removed.
3429         * platform/win/WebCoreHistory.h: Removed.
3430
3431         * page/Page.cpp:
3432         (WebCore::Page::Page): Set m_group to 0.
3433         (WebCore::Page::setGroupName): Set up m_group. If the page is not in any
3434         group, set it to 0 for now to postpone the cost of creating a group.
3435         (WebCore::Page::initGroup): Added. Sets m_group to point to a single-page
3436         group; used when getting a group.
3437         (WebCore::Page::removeAllVisitedLinks): Added. Calls removeVisitedLinks
3438         on all page groups.
3439         * page/Page.h: Moved enums inside the WebCore namespace. Removed the
3440         frameNamespace function and instead added the group and groupPtr functions.
3441
3442         * page/PageGroup.cpp: Added. Contains all the visited code from the
3443         CSSStyleSelector in the isVisitedLink function, but more efficient because
3444         we don't allocate memory for the buffer.
3445         * page/PageGroup.h: Added.
3446
3447         * platform/gtk/TemporaryLinkStubs.cpp: Removed historyContains.
3448         * platform/qt/TemporaryLinkStubs.cpp: Removed unneeded include.
3449         * platform/wx/TemporaryLinkStubs.cpp: Removed historyContains.
3450
3451 2008-03-06  Mark Rowe  <mrowe@apple.com>
3452
3453         Fix 64-bit Mac build.
3454
3455         * WebCore.xcodeproj/project.pbxproj:  Exclude _NPN symbols from the exports list as they
3456         are compiled out of 64-bit builds.
3457
3458 2008-03-06  Mark Rowe  <mrowe@apple.com>
3459
3460         Leopard build fix.
3461
3462         * WebCore.base.exp:
3463
3464 2008-03-05  Kevin Ollivier  <kevino@theolliviers.com>
3465
3466         Fix the wx build after the bindings move.
3467
3468         * WebCoreSources.bkl:
3469         * webcore-base.bkl:
3470         * webcore-wx.bkl:
3471
3472 2008-03-05  Dan Bernstein  <mitz@apple.com>
3473
3474         Reviewed by Adele Peterson.
3475
3476         - fix "background-position: inherit"
3477
3478         * css/CSSStyleSelector.cpp:
3479         Made HANDLE_MULTILAYER_INHERIT_AND_INITIAL fall through and added
3480         a return statement in HANDLE_MULTILAYER_VALUE. Also removed an unused
3481         macro.
3482
3483 2008-03-05  Alp Toker  <alp@atoker.com>
3484
3485         Add a missing make dependency for derived sources to improve
3486         autotools build dependency tracking.
3487
3488         Issue spotted by Ori Bernstein.
3489
3490         * GNUmakefile.am:
3491
3492 2008-03-05  Alp Toker  <alp@atoker.com>
3493
3494         GTK+ build fix for breakage introduced in r30800.
3495
3496         Track moved bridge sources from JavaScriptCore to WebCore.
3497
3498         * GNUmakefile.am:
3499
3500 2008-03-05  Justin Garcia  <justin.garcia@apple.com>
3501
3502         Reviewed by Darin.
3503
3504         One part of fix for:
3505         <rdar://problem/5780697> Copying content with percentage based rules in a style sheet will cause fidelity issues
3506
3507         * editing/markup.cpp:
3508         (WebCore::appendStartMarkup): Styles from matched rules should take precedence over those in
3509         inline style declarations, not the other way around. 
3510
3511 2008-03-05  Anders Carlsson  <andersca@apple.com>
3512
3513         Reviewed by Darin.
3514
3515         Move JNI specific code from runtime_root over to jni_jsobject, where it is used.
3516
3517         * bridge/jni/jni_jsobject.cpp:
3518         (completedJavaScriptAccess):
3519         (initializeJavaScriptAccessLock):
3520         (lockJavaScriptAccess):
3521         (unlockJavaScriptAccess):
3522         (dispatchToJavaScriptThread):
3523         (performJavaScriptAccess):
3524         (JavaJSObject::initializeJNIThreading):
3525         (isJavaScriptThread):
3526         (JavaJSObject::invoke):
3527         * bridge/jni/jni_jsobject.h:
3528         * bridge/runtime_root.cpp:
3529         * bridge/runtime_root.h:
3530         * page/mac/WebCoreFrameBridge.mm:
3531         (-[WebCoreFrameBridge init]):
3532
3533 2008-03-05  Darin Adler  <darin@apple.com>
3534
3535         Reviewed by Sam.
3536
3537         - add functions giving offsets within a KURL, slated to replace the
3538           EncodedURL object in CSSStyleSelector (in a future "visited link" change)
3539         - changed all KURL data members names to use the traditional m_ prefix
3540         - initialize all members to 0 in invalid KURLs rather than having all
3541           functions check m_isValid
3542
3543         * platform/KURL.cpp:
3544         (WebCore::KURL::invalidate): Added. Initializes all the fields except for
3545         m_string to the "invalid" values. For use in the empty constructor and
3546         in the init and parse functions.
3547         (WebCore::KURL::init): Tweaked comments. Changed all code paths that return
3548         early to use the invalidate() function. Updated for member variable name
3549         changes.
3550         (WebCore::KURL::hasPath): Updated for member variable name changes.
3551         Remove now-unneeded check of m_isValid.
3552         (WebCore::KURL::lastPathComponent): Ditto.
3553         (WebCore::KURL::protocol): Ditto.
3554         (WebCore::KURL::host): Ditto.
3555         (WebCore::KURL::port): Ditto.
3556         (WebCore::KURL::pass): Ditto.
3557         (WebCore::KURL::user): Ditto.
3558         (WebCore::KURL::ref): Ditto.
3559         (WebCore::KURL::hasRef): Ditto.
3560         (WebCore::KURL::protocolIs): Ditto.
3561         (WebCore::KURL::query): Ditto.
3562         (WebCore::KURL::path): Ditto.
3563         (WebCore::KURL::setProtocol): Ditto.
3564         (WebCore::KURL::setHost): Ditto.
3565         (WebCore::KURL::setPort): Ditto.
3566         (WebCore::KURL::setHostAndPort): Ditto.
3567         (WebCore::KURL::setUser): Ditto.
3568         (WebCore::KURL::setPass): Ditto.
3569         (WebCore::KURL::setRef): Ditto.
3570         (WebCore::KURL::setQuery): Ditto.
3571         (WebCore::KURL::setPath): Ditto.
3572         (WebCore::KURL::prettyURL): Ditto.
3573         (WebCore::copyPathRemovingDots): Removed braces to match our code style.
3574         (WebCore::KURL::parse): Changed all code paths that return early to use
3575         the invalidate function. Moved code to set m_isValid to true to the very
3576         end of the function. Removed braces to match our code style. Removed an
3577         extra copy of the path/query/fragment code (there were two identical copies
3578         in the two sides of an if statement). Removed some commented-out code.
3579         Reversed an if statment. Added code to set the new m_pathAfterLastSlash
3580         field. Updated for member variable name changes.
3581         (WebCore::equalIgnoringRef): Updated for member variable name changes.
3582         (WebCore::KURL::isHierarchical): Ditto.
3583
3584         * platform/KURL.h: Added a FIXME about ref vs. fragment. Made the empty
3585         constructor inline and called the new invalidate function. Added new
3586         pathStart, pathEnd, and pathAfterLastSlash functions, for use in the
3587         new visited link code. Added an invalidate function. Renamed all the
3588         data members to use the m_ prefix.
3589
3590         * WebCore.base.exp: Updated.
3591
3592 2008-03-05  Anders Carlsson  <andersca@apple.com>
3593
3594         Reviewed by Sam.
3595
3596         * WebCore.xcodeproj/project.pbxproj:
3597         Change jni_jsobject.cpp to be Obj-C++ for now. The plan is to merge 
3598         this with jni_objc.mm and create jni_jsobject.mm.
3599         
3600         * bridge/jni/jni_jsobject.cpp:
3601         (createRootObject):
3602         Move createRootObject here from WebCoreFrameBridge.
3603         
3604         (JavaJSObject::createNative):
3605         Call the newly added createRootObject function.
3606         
3607         * bridge/runtime_root.cpp:
3608         (KJS::Bindings::RootObject::initializeJNIThreading):
3609         * bridge/runtime_root.h:
3610         setCreateRootObject no longer takes a root object, rename it to initializeJNIThreading.
3611
3612         * page/mac/FrameMac.mm:
3613         (WebCore::Frame::createScriptInstanceForWidget):
3614         Just call Frame::createRootObject here.
3615         
3616         * page/mac/WebCoreFrameBridge.mm:
3617         (-[WebCoreFrameBridge init]):
3618         Call initializeJNIThreading.
3619
3620 2008-03-05  Anders Carlsson  <andersca@apple.com>
3621
3622         Reviewed by Sam.
3623
3624         Change some static class variables to be regular static variables,
3625         making it easier to move the chunk of mac-specific code out of runtime_root.[cpp|h]
3626
3627         * bridge/runtime_root.cpp:
3628         (KJS::Bindings::completedJavaScriptAccess):
3629         (KJS::Bindings::RootObject::dispatchToJavaScriptThread):
3630         (KJS::Bindings::performJavaScriptAccess):
3631         (KJS::Bindings::RootObject::createRootObject):
3632         (KJS::Bindings::RootObject::runLoop):
3633         (KJS::Bindings::RootObject::setCreateRootObject):
3634         * bridge/runtime_root.h:
3635
3636 2008-03-05  Brent Fulgham <bfulgham@gmail.com>
3637
3638         Reviewed by Adam Roben.
3639
3640         Modify source files to use the USE(SAFARI_THEME) macro, rather than
3641         USE_SAFARI_THEME.  (http://bugs.webkit.org/show_bug.cgi?id=17683)
3642
3643         * WebCore/platform/win/PlatformScrollBarSafari.cpp
3644         * WebCore/rendering/RenderThemeSafari.cpp
3645         * WebCore/rendering/RenderThemeSafari.h
3646         * config.h: Move definition of WTF_USE_SAFARI_THEME here 
3647
3648 2008-03-05  Brady Eidson  <beidson@apple.com>
3649
3650         Reviewed by Alexey and Mark Rowe
3651
3652         Fix for <rdar://problem/5778247> - Reproducible crash on storage/execute-sql-args.html
3653
3654         DatabaseThread::unscheduleDatabaseTasks() manually filters through a MessageQueue,
3655         removing particular items for Databases that were shutting down.
3656
3657         This filtering operation is not atomic, and therefore causes a race condition with the
3658         database thread waking up and reading from the message queue.  
3659
3660         The end result was an attempt to dereference a null DatabaseTask.  Timing-wise, this never
3661         seemed to happen in a debug build, otherwise an assertion would've caught it.  Replacing that
3662         assertion with a crash in a release build is what revealed this bug.
3663
3664         The fix for the above symptom was entirely in WTF::MessageQueue in JSCore.  With this fix in 
3665         place, another crash popped up in the layout tests that was related to dereferencing a 
3666         deallocated object - simply because SQLTransaction had a raw pointer to it's Database object 
3667         when it needed to be a ref pointer.
3668
3669         * storage/SQLTransaction.cpp:
3670         (WebCore::SQLTransaction::runCurrentStatement):
3671         * storage/SQLTransaction.h: Change m_database to be a RefPtr
3672         (WebCore::SQLTransaction::database):
3673
3674 2008-03-05  Mark Rowe  <mrowe@apple.com>
3675
3676         Build fix.
3677
3678         * WebCore.base.exp:  Remove symbol that no longer exists from the exports file.
3679
3680 2008-03-05  Adam Roben  <aroben@apple.com>
3681
3682         Export a header/symbol for WebKit
3683
3684         Reviewed by Kevin M.
3685
3686         * WebCore.base.exp:
3687         * WebCore.xcodeproj/project.pbxproj:
3688
3689 2008-03-05  Adam Roben  <aroben@apple.com>
3690
3691         Move WebCoreScriptDebugger up to WebKit
3692
3693         Reviewed by Darin.
3694
3695         * WebCore.base.exp: Exported some functions used by
3696         WebCoreScriptDebugger, and sorted the list.
3697         * WebCore.xcodeproj/project.pbxproj: Removed
3698         WebCoreScriptDebugger.{h,mm} from the project and marked
3699         a few headers private so that WebKit can use them.
3700         * page/mac/WebCoreScriptDebugger.h: Removed.
3701         * page/mac/WebCoreScriptDebugger.mm: Removed.
3702
3703 2008-03-05  Anders Carlsson  <andersca@apple.com>
3704
3705         Build bridge/. Copy some headers over to WebKit as part of the post-build step.
3706         
3707         * WebCore.vcproj/WebCore.vcproj:
3708
3709 2008-03-05  Anders Carlsson  <andersca@apple.com>
3710
3711         Reviewed by Geoff.
3712
3713         * WebCore.base.exp:
3714         Add the NPN and KJS methods.
3715         
3716         * WebCore.xcodeproj/project.pbxproj:
3717         Bring in bridge/
3718
3719         * config.h:
3720         Add HAVE_JNI define.
3721         
3722         * bindings/js/kjs_html.cpp:
3723         * bindings/objc/DOMInternal.mm:
3724         * bindings/objc/DOMUtility.mm:
3725         * bindings/objc/WebScriptObject.mm:
3726         * html/HTMLAppletElement.cpp:
3727         * html/HTMLEmbedElement.cpp:
3728         * html/HTMLObjectElement.cpp:
3729         * html/HTMLPlugInElement.cpp:
3730         * page/Frame.cpp:
3731         * page/mac/FrameMac.mm:
3732         * page/mac/WebCoreFrameBridge.mm:
3733         * page/mac/WebCoreScriptDebugger.mm:
3734         * plugins/win/PluginViewWin.cpp:
3735         Include file changes.
3736
3737 2008-03-04  Anders Carlsson  <andersca@apple.com>
3738
3739         Reviewed by Sam.
3740
3741         Rewrite NPRuntime string conversion routines to use WebCore::String
3742         
3743         * bridge/NP_jsobject.cpp:
3744         (_NPN_Evaluate):
3745         * bridge/c/c_utility.cpp:
3746         (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback):
3747         (KJS::Bindings::convertNPVariantToValue):
3748         (KJS::Bindings::convertNPStringToUTF16):
3749         (KJS::Bindings::identifierFromNPIdentifier):
3750         * bridge/c/c_utility.h:
3751
3752 2008-03-05  Oliver Hunt  <oliver@apple.com>
3753
3754         Reviewed by Alexey P.
3755
3756         Small performance improvement to putImageData (3-5% on assignment in my tests)
3757
3758         * html/CanvasPixelArray.h:
3759         (WebCore::CanvasPixelArray::set):
3760
3761 2008-03-04  Sam Weinig  <sam@webkit.org>
3762
3763         Reviewed by Adele.
3764
3765         * bindings/js/JSXMLHttpRequest.h: Remove unnecessary override of toBoolean.
3766
3767 2008-03-04  Maciej Stachowiak  <mjs@apple.com>
3768
3769         Reviewed by Sam and Oliver.
3770
3771         - fixed http://bugs.webkit.org/show_bug.cgi?id=16289
3772         - fixed Acid3 tests 26 and 27 (not exactly the same issue but related)
3773
3774         * bindings/js/JSNodeCustom.cpp:
3775         (WebCore::JSNode::mark): When marking a node that's in-document,
3776         mark the owner document if it hasn't been already. This means holding on
3777         to a single node from an unreferenced document now keeps the whole document alive.
3778         
3779         We are now at 90/100 on Acid3.
3780
3781 2008-03-04  Sam Weinig  <sam@webkit.org>
3782
3783         Qt build fix.
3784
3785         * page/qt/FrameQt.cpp:
3786
3787 2008-03-04  Sam Weinig  <sam@webkit.org>
3788
3789         Reviewed by Mark Rowe.
3790
3791         Rename kjs_window to JSDOMWindowBase.
3792
3793         - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
3794           JSDOMWindow.h
3795
3796         * ChangeLog:
3797         * DerivedSources.make:
3798         * GNUmakefile.am:
3799         * WebCore.pro:
3800         * WebCore.vcproj/WebCore.vcproj:
3801         * WebCore.xcodeproj/project.pbxproj:
3802         * WebCoreSources.bkl:
3803         * bindings/js/JSCustomVoidCallback.cpp:
3804         * bindings/js/JSCustomXPathNSResolver.cpp:
3805         * bindings/js/JSDOMWindowBase.cpp: Copied from bindings/js/kjs_window.cpp.
3806         * bindings/js/JSDOMWindowBase.h: Copied from bindings/js/kjs_window.h.
3807         * bindings/js/JSDOMWindowCustom.cpp:
3808         * bindings/js/JSDatabaseCustom.cpp:
3809         * bindings/js/JSEventTargetBase.cpp:
3810         * bindings/js/JSEventTargetBase.h:
3811         * bindings/js/JSEventTargetNode.cpp:
3812         * bindings/js/JSHTMLDocumentCustom.cpp:
3813         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
3814         * bindings/js/JSHistoryCustom.cpp:
3815         * bindings/js/JSLocation.cpp:
3816         * bindings/js/JSSQLTransactionCustom.cpp:
3817         * bindings/js/JSXMLHttpRequest.cpp:
3818         * bindings/js/ScheduledAction.cpp:
3819         * bindings/js/kjs_binding.cpp:
3820         * bindings/js/kjs_events.cpp:
3821         * bindings/js/kjs_navigator.cpp:
3822         * bindings/js/kjs_proxy.cpp:
3823         * bindings/js/kjs_window.cpp: Removed.
3824         * bindings/js/kjs_window.h: Removed.
3825         * bindings/scripts/CodeGeneratorJS.pm:
3826         * history/CachedPage.cpp:
3827         * loader/FrameLoader.cpp:
3828         * page/Chrome.cpp:
3829         * page/InspectorController.cpp:
3830         * page/mac/FrameMac.mm:
3831         * page/mac/WebCoreFrameBridge.mm:
3832         * page/qt/FrameQt.cpp:
3833         * page/win/FrameWin.cpp:
3834         * plugins/win/PluginViewWin.cpp:
3835
3836 2008-03-04  Mark Rowe  <mrowe@apple.com>
3837
3838         Speculative Qt build fix.
3839
3840         * platform/qt/PasteboardQt.cpp:
3841
3842 2008-03-04  Anders Carlsson  <andersca@apple.com>
3843
3844         Reviewed by Sam.
3845
3846         Update include paths. This code is not used yet.
3847
3848         * bridge/NP_jsobject.cpp:
3849         * bridge/c/c_class.cpp:
3850         * bridge/c/c_instance.cpp:
3851         * bridge/c/c_utility.cpp:
3852         (KJS::Bindings::convertUTF8ToUTF16WithLatin1Fallback):
3853         #if 0 this out for now. 
3854         
3855         * bridge/jni/jni_class.cpp:
3856         * bridge/jni/jni_jsobject.cpp:
3857         * bridge/jni/jni_objc.mm:
3858         * bridge/jni/jni_runtime.cpp:
3859         * bridge/jni/jni_utility.cpp:
3860         * bridge/jni/jni_utility.h:
3861         * bridge/npruntime.cpp:
3862         * bridge/objc/WebScriptObject.h:
3863         * bridge/objc/objc_class.h:
3864         * bridge/objc/objc_instance.h:
3865         * bridge/objc/objc_runtime.h:
3866         * bridge/objc/objc_utility.h:
3867         * bridge/objc/objc_utility.mm:
3868         * bridge/runtime.cpp:
3869         * bridge/runtime.h:
3870         * bridge/runtime_array.cpp:
3871         * bridge/runtime_array.h:
3872         * bridge/runtime_method.cpp:
3873         * bridge/runtime_method.h:
3874         * bridge/runtime_object.cpp:
3875         * bridge/runtime_object.h:
3876         * bridge/runtime_root.cpp:
3877         * bridge/runtime_root.h:
3878
3879 2008-03-04  Dan Bernstein  <mitz@apple.com>
3880
3881         Reviewed by Darin Adler.
3882
3883         - fix http://bugs.webkit.org/show_bug.cgi?id=17676
3884           <rdar://problem/5781091> REGRESSION (r30240-r30267): href attribute values with non-ASCII characters in the host part do not work
3885
3886         Test: fast/encoding/url-host-name-non-ascii.html
3887
3888         * platform/KURL.cpp:
3889         (WebCore::appendEncodedHostname): Added an early return in the all-ASCII
3890         case to avoid copying the host name twice and corrected the error
3891         checking after calling uidna_IDNToASCII().
3892
3893 2008-03-04  Sam Weinig  <sam@webkit.org>
3894
3895         Reviewed by Dan Bernstein.
3896
3897         Use JSDOMWindow exclusively instead of JSDOMWindowBase.
3898
3899         * bindings/js/ScheduledAction.cpp:
3900         (WebCore::ScheduledAction::execute):
3901         * bindings/js/ScheduledAction.h:
3902         * bindings/js/kjs_window.cpp:
3903         (WebCore::JSDOMWindowBase::timerFired):
3904
3905 2008-03-04  Timothy Hatcher  <timothy@apple.com>
3906
3907         Reviewed by Darin Adler.
3908
3909         <rdar://problem/5720160> Browser windows "do nothing" while modal
3910         dialog or menu is up due to run loop modes (or while scrolling)
3911
3912         Adds a new SchedulePair object that holds a runloop and the mode to use.
3913         A HashSet of SchedulePairs is tracked by Page so it can be used for resource
3914         loading and, in the future, maybe SharedTimerMac.
3915
3916         * WebCore.base.exp: Add new exports for WebKit.
3917         * WebCore.xcodeproj/project.pbxproj: Add new files.
3918         * loader/mac/DocumentLoaderMac.cpp: Added.
3919         (WebCore::scheduleAll): Call schedule all the ResourceLoader handles.
3920         (WebCore::unscheduleAll): Call unschedule all the ResourceLoader handles.
3921         (WebCore::DocumentLoader::schedule): Schedule all the ResourceLoaders owned by the DocumentLoader.
3922         (WebCore::DocumentLoader::unschedule): Unschedule all the ResourceLoaders owned by the DocumentLoader.
3923         * loader/DocumentLoader.h:
3924         * page/Page.h:
3925         (WebCore::Page::scheduledRunLoopPairs): Return m_scheduledRunLoopPairs.
3926         * page/mac/PageMac.cpp:
3927         (WebCore::Page::addSchedulePair): Add a SchedulePair to m_scheduledRunLoopPairs.
3928         (WebCore::Page::removeSchedulePair): Removes a SchedulePair from m_scheduledRunLoopPairs.
3929         * platform/cf/SchedulePair.cpp: Added.
3930         * platform/cf/SchedulePair.h: Added.
3931         * platform/mac/SchedulePairMac.mm: Added.
3932         * platform/network/ResourceHandle.h:
3933         * platform/network/mac/FormDataStreamMac.mm:
3934         (WebCore::advanceCurrentStream): Use the new SchedulePair.
3935         (WebCore::formCreate): Ditto.
3936         (WebCore::formFinalize): Ditto.
3937         (WebCore::formSchedule): Ditto.
3938         (WebCore::formUnschedule): Ditto.
3939         * platform/network/mac/ResourceHandleMac.mm:
3940         (WebCore::ResourceHandle::start): Schedule the connection with all the SchedulePairs
3941         that Page holds. If Page has no SchedulePairs, schedule with the current runloop, and
3942         pick the mode based on ResourceHandle::loadsDuringCommonRunLoopModes.
3943         (WebCore::ResourceHandle::schedule):
3944         (WebCore::ResourceHandle::unschedule):
3945
3946 2008-03-04  Sam Weinig  <sam@webkit.org>
3947
3948         Reviewed by Darin Adler.
3949
3950         Rename kjs_css to JSRGBColor.
3951
3952         * DerivedSources.make:
3953         * GNUmakefile.am:
3954         * WebCore.pro:
3955         * WebCore.vcproj/WebCore.vcproj:
3956         * WebCore.xcodeproj/project.pbxproj:
3957         * WebCoreSources.bkl:
3958         * bindings/js/JSRGBColor.cpp: Copied from bindings/js/kjs_css.cpp.
3959         * bindings/js/JSRGBColor.h: Copied from bindings/js/kjs_css.h.
3960         * bindings/js/kjs_css.cpp: Removed.
3961         * bindings/js/kjs_css.h: Removed.
3962         * bindings/js/kjs_window.cpp:
3963         * bindings/objc/DOMUtility.mm:
3964         * bindings/scripts/CodeGeneratorJS.pm:
3965
3966 2008-03-04  Anders Carlsson  <andersca@apple.com>
3967
3968         Fix 64-bit build.
3969         
3970         * html/HTMLPlugInElement.cpp:
3971
3972 2008-03-04  Nikolas Zimmermann  <zimmermann@kde.org>
3973
3974         Reviewed by Eric & David.
3975
3976         Fixes: http://bugs.webkit.org/show_bug.cgi?id=17078
3977
3978         Fix getSubStringLength() handling, verified by Acid3 test 77.
3979         Brings up Acid3 score to 88/100.
3980
3981         Added test: svg/custom/acid3-test-77.html
3982                     svg/custom/getSubStringLength.html
3983
3984         * svg/SVGTextContentElement.cpp:
3985         (WebCore::cummulatedCharacterRangeLength): Simplify some code.
3986         (WebCore::SVGTextContentElement::getSubStringLength):
3987
3988 2008-03-04  Anders Carlsson  <andersca@apple.com>
3989
3990         Mac build fix. Neither me, Sam nor Adam know why we need to do this though :(
3991
3992         * bindings/js/kjs_proxy.cpp:
3993         (WebCore::KJSProxy::attachDebugger):
3994         * page/Page.cpp:
3995         (WebCore::Page::setDebuggerForAllPages):
3996         (WebCore::Page::setDebugger):
3997
3998 2008-03-04  Adam Roben  <aroben@apple.com>
3999
4000         Add ExecState.h to ForwardingHeaders
4001
4002         Reviewed by Anders.
4003
4004         * ForwardingHeaders/kjs/ExecState.h: Added.
4005         * page/Page.cpp: Touch this to force WebCore to build and the headers
4006         to be copied.
4007
4008 2008-03-04  Adam Roben  <aroben@apple.com>
4009
4010         Make it possible to set a KJS::Debugger on all Frames in a Page and
4011         all Pages in the process
4012
4013         Reviewed by Kevin M.
4014
4015         * ForwardingHeaders/kjs/debugger.h: Added.
4016         * bindings/js/kjs_proxy.cpp:
4017         (WebCore::KJSProxy::initScript): Attach the Page's debugger if there
4018         is one.
4019         (WebCore::KJSProxy::attachDebugger): Attach the passed-in debugger, or
4020         detach any existing debugger if none was passed in.
4021         * bindings/js/kjs_proxy.h:
4022         * page/Page.cpp:
4023         (WebCore::Page::Page): Initialize new member.
4024         (WebCore::Page::setDebuggerForAllPages): Call setDebugger on each Page
4025         in the process.
4026         (WebCore::Page::setDebugger): Store the debugger and pass it off to
4027         all our Frames.
4028         * page/Page.h:
4029
4030 2008-03-04  Sam Weinig  <sam@webkit.org>
4031
4032         Reviewed by Darin Adler.
4033
4034         Add ClassInfo to custom constructors so that they toString properly
4035
4036         - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp,
4037           and XSLTProcessorConstructorImp and prefix all the classes with JS. 
4038
4039         * bindings/js/JSAudioConstructor.cpp:
4040         (WebCore::): Added ClassInfo definition.
4041         (WebCore::JSAudioConstructor::JSAudioConstructor):
4042         (WebCore::JSAudioConstructor::construct): Cleanup.
4043         * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document.
4044         (WebCore::JSAudioConstructor::classInfo): Added.
4045
4046         * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype 
4047         to JSHTMLInputElementBasePrototype as seen if toString'ed.
4048         (WebCore::):
4049
4050         * bindings/js/JSHTMLOptionElementConstructor.cpp:
4051         (WebCore::): Added ClassInfo definition.
4052         * bindings/js/JSHTMLOptionElementConstructor.h:
4053         (WebCore::JSHTMLOptionElementConstructor::classInfo): Added.
4054
4055         * bindings/js/JSImageConstructor.cpp:
4056         (WebCore::): Added ClassInfo definition.
4057         (WebCore::JSImageConstructor::implementsConstruct): Moved here from header.
4058         * bindings/js/JSImageConstructor.h:
4059         (WebCore::JSImageConstructor::classInfo): Added.
4060
4061         * bindings/js/JSXMLHttpRequest.cpp:
4062         (WebCore::): Rename XMLHttpRequestPrototype  to JSXMLHttpRequestPrototype 
4063         as seen if toString'ed.
4064         (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
4065         (WebCore::JSXMLHttpRequestConstructor::implementsConstruct):
4066         (WebCore::JSXMLHttpRequestConstructor::construct):
4067         * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to
4068         JSXMLHttpRequestConstructor and doc to m_document and 
4069         (WebCore::JSXMLHttpRequestConstructor::classInfo): Added.
4070
4071         * bindings/js/JSXSLTProcessor.cpp:
4072         (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and 
4073         XSLTProcessorConstructorImp to JSXSLTProcessorConstructor.
4074         (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
4075         (WebCore::JSXSLTProcessorConstructor::implementsConstruct):
4076         (WebCore::JSXSLTProcessorConstructor::construct):
4077         * bindings/js/JSXSLTProcessor.h:
4078         (WebCore::JSXSLTProcessorConstructor::classInfo): Added.
4079
4080         * bindings/js/kjs_window.cpp:
4081         (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names.
4082
4083 2008-03-04  Dan Bernstein  <mitz@apple.com>
4084
4085         Reviewed by Oliver Hunt and Geoffrey Garen.
4086
4087         - fix http://bugs.webkit.org/show_bug.cgi?id=17667
4088           <rdar://problem/5779658> REGRESSION (r30587): Document::implicitClose() not called when done loading page (Image does not get scaled to fit)
4089
4090         * loader/loader.cpp:
4091         (WebCore::Loader::didFinishLoading): Changed to call
4092         setLoadInProgress(false) even for 4xx errors, because that triggers
4093         load completion check.
4094
4095 2008-03-04  Adele Peterson  <adele@apple.com>
4096
4097         Reviewed by Beth.
4098
4099         Fix for <rdar://problem/5779718> focus() does not work for anchor elements with no content
4100
4101         If an anchor has zero size, don't exclude it from being focusable from JS, just exclude it
4102         from being keyboard focusable (using the tab key).
4103
4104         * html/HTMLAnchorElement.cpp:
4105         (WebCore::HTMLAnchorElement::isFocusable):
4106         (WebCore::HTMLAnchorElement::isKeyboardFocusable):
4107
4108 2008-03-04  Chris Fleizach  <cfleizach@apple.com>
4109
4110         Reviewed by Darin Adler.
4111
4112         - fix <rdar://problem/5119360> ER - Seed: Google results do not have AXHeading information
4113
4114         * page/mac/WebCoreAXObject.mm:
4115         (headingLevel):
4116         (-[WebCoreAXObject accessibilityIsIgnored]):
4117
4118 2008-03-04  Sam Weinig  <sam@webkit.org>
4119
4120         GTK+ build fix.
4121
4122         * GNUmakefile.am:
4123
4124 2008-03-04  Sam Weinig  <sam@webkit.org>
4125
4126         Reviewed by Darin Adler.
4127
4128         Remame ImageConstructorImp to JSImageConstructor and move it into its
4129         own file.
4130
4131         * GNUmakefile.am:
4132         * WebCore.pro:
4133         * WebCore.vcproj/WebCore.vcproj:
4134         * WebCore.xcodeproj/project.pbxproj:
4135         * WebCoreSources.bkl:
4136         * bindings/js/JSImageConstructor.cpp: Copied from bindings/js/kjs_html.cpp.
4137         (WebCore::JSImageConstructor::JSImageConstructor):
4138         (WebCore::JSImageConstructor::construct):
4139         * bindings/js/JSImageConstructor.h: Copied from bindings/js/kjs_html.h.
4140         * bindings/js/kjs_html.cpp:
4141         (WebCore::getRuntimeObject): Make this function static since it is only used
4142         in this file.
4143         * bindings/js/kjs_html.h:
4144         * bindings/js/kjs_window.cpp:
4145         (WebCore::JSDOMWindowBase::getValueProperty):
4146
4147 2008-03-04  Adam Roben  <aroben@apple.com>
4148
4149         Fix an uninitialized value warning in CodeGeneratorJS.pm
4150
4151         * bindings/scripts/CodeGeneratorJS.pm: Remove reference to
4152         non-existent $maybeOkParam (this was removed in r30753).
4153
4154 2008-03-04  Sam Weinig  <sam@webkit.org>
4155
4156         Reviewed by Darin Adler.
4157
4158         Remove kjs_dom.{h,cpp}.
4159
4160         - Removed custom toAttr, which took a boolean ok, and teach CodeGeneratorJS.pm
4161           to us a null return value as an indication of failure. (This new logic is used
4162           for toVoidCallback as well.)
4163         - Move getRuntimeObject to kjs_html where a bunch of other runtime object related
4164           functions currently live.
4165         - Move checkNodeSecurity to kjs_binding, where other frame security functions 
4166           currently live.
4167         - Remove getNodeConstructor.  It had no implementation.
4168
4169         * GNUmakefile.am:
4170         * WebCore.pro:
4171         * WebCore.vcproj/WebCore.vcproj:
4172         * WebCore.xcodeproj/project.pbxproj:
4173         * WebCoreSources.bkl:
4174         * bindings/js/JSAttrCustom.cpp:
4175         * bindings/js/JSCustomVoidCallback.cpp:
4176         (WebCore::toVoidCallback):
4177         * bindings/js/JSCustomVoidCallback.h:
4178         * bindings/js/JSDatabaseCustom.cpp:
4179         (WebCore::JSDatabase::changeVersion):
4180         (WebCore::JSDatabase::transaction):
4181         * bindings/js/JSElementCustom.cpp:
4182         (WebCore::JSElement::setAttributeNode):
4183         (WebCore::JSElement::setAttributeNodeNS):
4184         * bindings/js/JSEventTargetBase.cpp:
4185         (WebCore::toJS):
4186         * bindings/js/JSEventTargetBase.h:
4187         * bindings/js/JSHTMLAppletElementCustom.cpp:
4188         * bindings/js/JSHTMLElementCustom.cpp:
4189         * bindings/js/JSHTMLEmbedElementCustom.cpp:
4190         * bindings/js/JSHTMLFormElementCustom.cpp:
4191         * bindings/js/JSHTMLFrameElementCustom.cpp:
4192         * bindings/js/JSHTMLIFrameElementCustom.cpp:
4193         * bindings/js/JSHTMLObjectElementCustom.cpp:
4194         * bindings/js/JSNamedNodeMapCustom.cpp:
4195         * bindings/js/JSNamedNodesCollection.cpp:
4196         * bindings/js/JSNodeFilterCustom.cpp:
4197         * bindings/js/JSXSLTProcessor.cpp:
4198         * bindings/js/kjs_binding.cpp:
4199         (WebCore::checkNodeSecurity):
4200         * bindings/js/kjs_binding.h:
4201         * bindings/js/kjs_css.cpp:
4202         * bindings/js/kjs_dom.cpp: Removed.
4203         * bindings/js/kjs_dom.h: Removed.
4204         * bindings/js/kjs_events.cpp:
4205         * bindings/js/kjs_html.cpp:
4206         (WebCore::getRuntimeObject):
4207         * bindings/js/kjs_html.h:
4208         * bindings/js/kjs_window.cpp:
4209         * bindings/scripts/CodeGeneratorJS.pm:
4210         * dom/Attr.idl:
4211         * html/HTMLPlugInElement.cpp:
4212         * page/InspectorController.cpp:
4213
4214 2008-03-04  Adam Roben  <aroben@apple.com>
4215
4216         Win/Qt/GTK+/wx build fix after r30740
4217
4218         * editing/Editor.cpp: Added missing #include.
4219         * page/qt/FrameQt.cpp: Removed Frame::dashboardRegionsChanged.
4220         * page/win/FrameWin.cpp: Ditto.
4221         * platform/wx/TemporaryLinkStubs.cpp: Ditto.
4222
4223 2008-03-04  Alp Toker  <alp@atoker.com>
4224
4225         GTK+ build fix for breakage introduced in r30740.
4226
4227         Remove Frame::dashboardRegionsChanged(). There's now a default
4228         implementation at ChromeClient::dashboardRegionsChanged().
4229
4230         * page/gtk/FrameGtk.cpp:
4231
4232 2008-03-04  Alp Toker  <alp@atoker.com>
4233
4234         GTK+ build fix suggested by aroben. Remove an unused Mac-specific
4235         included introduced in r30740.
4236
4237         * page/ChromeClient.h:
4238
4239 2008-03-04  Dan Bernstein  <mitz@apple.com>
4240
4241         Reviewed by Sam Weinig.
4242
4243         - fix <rdar://problem/5622336> Burmese text does not render on http://www.myanmarbible.com/bible/Judson/html/index.html
4244
4245         Test: platform/win/fast/text/uniscribe-missing-glyph.html
4246
4247         Note that default installations of Windows do not have Myanmar fonts.
4248         What this patch does is ensure that the Myanmar and other complex
4249         scripts are rendered as missing glyphs rather than not rendered at all.
4250         The particular page in the bug measures the relative widths of two
4251         rendered strings and, if they are rendered as missing glyphs, detects
4252         that a Myanmar fonts is not available and substitutes the text with
4253         images. By not rendering (and measuring) missing glyphs, WebKit was
4254         throwing the page's detection code off.
4255
4256         * platform/graphics/win/UniscribeController.cpp:
4257         (WebCore::UniscribeController::shape): Removed an early return in case
4258         shaping resulted in missing glyphs. This is now expected if font
4259         fallback failed to produce a font containing glyphs for the character.
4260         Also changed two resize()s to shrink()s.
4261
4262 2008-03-04  Darin Adler  <darin@apple.com>
4263
4264     &nbs