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