1 2008-03-17 Timothy Hatcher <timothy@apple.com>
5 Bug 17908: Various bugs in the Console completion code
6 http://bugs.webkit.org/show_bug.cgi?id=17908
8 * page/inspector/ConsolePanel.js:
9 (WebInspector.ConsolePanel.complete): Moved the code that checked for the caret being at the end
10 of the prompt into the _caretAtEndOfPrompt helper function.
11 (WebInspector.ConsolePanel.messagesSelectStart): Clear and redo the auto complete when the selection changes.
12 (WebInspector.ConsolePanel._caretInsidePrompt): Fixed a logic error that always caused a false result.
13 (WebInspector.ConsolePanel._caretAtEndOfPrompt): Added. Tests if the selection is a caret at the
15 (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Changed the offset to use the childNodes length.
16 This makes sure the caret is at the end when there are multiple text nodes in the prompt.
18 2008-03-17 Dan Bernstein <mitz@apple.com>
20 Rubber-stamped by Dave Hyatt.
22 - FloatingObject cleanup
24 Renamed FloatingObject's data members as follows: node -> m_renderer,
25 startY -> m_top, endY -> m_bottom, left -> m_left, width -> m_width,
26 and noPaint -> !m_shouldPaint, reversing the meaning of the flag.
28 Also addressed the FIXME in RenderBlock::containsFloat().
30 * rendering/RenderBlock.cpp:
31 (WebCore::RenderBlock::repaintOverhangingFloats):
32 (WebCore::RenderBlock::paintFloats):
33 (WebCore::RenderBlock::insertFloatingObject):
34 (WebCore::RenderBlock::removeFloatingObject):
35 (WebCore::RenderBlock::positionNewFloats):
36 (WebCore::RenderBlock::leftRelOffset):
37 (WebCore::RenderBlock::rightRelOffset):
38 (WebCore::RenderBlock::nextFloatBottomBelow):
39 (WebCore::RenderBlock::floatBottom):
40 (WebCore::RenderBlock::floatRect):
41 (WebCore::RenderBlock::lowestPosition):
42 (WebCore::RenderBlock::rightmostPosition):
43 (WebCore::RenderBlock::leftmostPosition):
44 (WebCore::RenderBlock::leftBottom):
45 (WebCore::RenderBlock::rightBottom):
46 (WebCore::RenderBlock::clearFloats):
47 (WebCore::RenderBlock::addOverhangingFloats):
48 (WebCore::RenderBlock::addIntrudingFloats):
49 (WebCore::RenderBlock::containsFloat): Changed to return false if the
50 floats lists exists but is empty, since line layout code no longer
51 relies on the buggy behavior.
52 (WebCore::RenderBlock::nodeAtPoint):
53 (WebCore::RenderBlock::adjustForBorderFit):
54 * rendering/RenderBlock.h:
55 (WebCore::RenderBlock::containsFloats):
56 (WebCore::RenderBlock::FloatingObject::FloatingObject):
58 (WebCore::RenderBlock::layoutInlineChildren):
59 (WebCore::RenderBlock::matchedEndLine):
61 2008-03-17 Dan Bernstein <mitz@apple.com>
63 Reviewed by Dave Hyatt.
65 - allow incremental relayout of blocks that contain floats
67 Tests: fast/repaint/line-flow-with-floats-[1-9].html
69 * rendering/RenderBlock.cpp:
70 (WebCore::RenderBlock::clearFloatsIfNeeded): Cleaned up by moving most
71 of the function body out of an if statement which was replaced with an
73 (WebCore::RenderBlock::insertFloatingObject): Cleaned up by moving most
74 of the function body out of an if statement and moving the ASSERT, which
75 is a crash in release builds, to the beginning. Made this function set
76 the m_isDescendant flag of floating objects it creates.
77 (WebCore::RenderBlock::removeFloatingObject): Added a call to
78 markLinesDirtyInVerticalRange() when removing a float from a block with
80 (WebCore::RenderBlock::markLinesDirtyInVerticalRange): Added. Marks the
81 lines in the given range as dirty.
82 (WebCore::RenderBlock::clearFloats): Added code to detect changes to
83 the geometry of floats intruding into this block from other blocks and
84 mark any lines whose available width has changed as a result as dirty.
86 * rendering/RenderBlock.h:
87 (WebCore::RenderBlock::FloatWithRect::FloatWithRect): Added a structure
88 to cache a float with its position and size.
89 (WebCore::RenderBlock::FloatingObject::FloatingObject): Added an
90 m_isDescendant flag, used by clearFloats() to distinguish between floats
91 entering the block from outside and floats internal to the block.
93 * rendering/RootInlineBox.h:
94 (WebCore::RootInlineBox::floats): Added.
95 (WebCore::RootInlineBox::floatsPtr): Added.
96 (WebCore::RootInlineBox::Overflow::Overflow): Added a data member to
97 hold the floats originating on the line.
100 (WebCore::RenderBlock::layoutInlineChildren): Made the existence of
101 floats not force a full layout. Changed to cache the geometry of floats
102 in the block and detect changes to it. If a float's size or position
103 changes, all lines from that point on are treated as dirty. An exception
104 is a change in the dimensions of a float on an otherwise-clean line,
105 which only dirties lines potentially affected by the change (see
106 determineStartPosition()). Added code to update each RootInlineBox's
107 set of floats as lines are laid out. Added code to shift floats
108 belonging to clean lines in the end along with the lines.
109 (WebCore::RenderBlock::determineStartPosition): Made this function look
110 for changes to floats' dimensions and mark lines as dirty accordingly.
111 Also look for new floats and if found, cause a full layout. Added code
112 to re-add floats belonging to clean lines.
113 (WebCore::RenderBlock::matchedEndLine): Added checking that the clean
114 lines in the end can be shifted vertically as needed, i.e. that the
115 available width along the way is uniform.
117 2008-03-17 Eric Seidel <eric@webkit.org>
121 Fix _NPN_IntFromIdentifier (and export the symbol for use!)
123 Test: plugins/netscape-identifier-conversion.html
126 * bridge/npruntime.cpp:
127 (_NPN_IntFromIdentifier):
129 2008-03-17 Sam Weinig <sam@webkit.org>
131 Reviewed by Dan Bernstein.
133 Add HTMLCollection constructor to the Window object. (Omission noticed by Harri Porten)
135 * page/DOMWindow.idl:
137 2008-03-17 Holger Hans Peter Freyther <zecke@selfish.org>
139 Unreviewed Gtk+ build fix.
141 * platform/gtk/ScrollViewGtk.cpp: remove const
143 2008-03-17 Julien Chaffraix <julien.chaffraix@gmail.com>
147 <http://bugs.webkit.org/show_bug.cgi?id=17754>
149 - Implement ResourceHandle::loadResourceSynchronously to dispatch synchronous
152 - Implement WebCoreSynchronousLoader, the ResourceHandleClient which holds
153 the network data, response and error for us during the transfert.
155 * platform/network/ResourceHandleInternal.h: Remove trailing white space.
156 * platform/network/curl/ResourceHandleCurl.cpp: Add WebCoreSynchronousLoader
157 (WebCore::WebCoreSynchronousLoader::resourceResponse):
158 (WebCore::WebCoreSynchronousLoader::resourceError):
159 (WebCore::WebCoreSynchronousLoader::data):
160 (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
161 (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
162 (WebCore::WebCoreSynchronousLoader::didReceiveData):
163 (WebCore::WebCoreSynchronousLoader::didFinishLoading):
164 (WebCore::WebCoreSynchronousLoader::didFail):
165 (WebCore::ResourceHandle::loadResourceSynchronously): Implement method
166 using WebCoreSynchronousLoader.
168 * platform/network/curl/ResourceHandleManager.cpp:
169 (WebCore::ResourceHandleManager::dispatchSynchronousJob):
170 (WebCore::ResourceHandleManager::startJob):
171 (WebCore::ResourceHandleManager::initializeHandle): Handle initialization
172 method used both for synchronous and asynchronous job.
174 * platform/network/curl/ResourceHandleManager.h:
176 2008-03-17 Darin Adler <darin@apple.com>
178 - try to fix GTK build
180 * platform/ScrollView.h: Make setGtkAdjustments adjustment.
181 And non-virtual (why was it virtual?).
183 2008-03-17 Rodney Dawes <dobey@wayofthemonkey.com>
185 Fix Bug 17898: Split PluginMessageThrottlerWin into its own files
187 <http://bugs.webkit.org/show_bug.cgi?id=17898>
189 Move the PluginMessageThrottlerWin class into its own files, in
190 preparation for refactoring PluginView code to be shared.
192 Reviewed and tweaked by Adam Roben.
194 * WebCore.vcproj/WebCore.vcproj:
195 * plugins/PluginView.h:
196 * plugins/win/PluginMessageThrottlerWin.cpp: Added.
197 * plugins/win/PluginMessageThrottlerWin.h: Added.
198 * plugins/win/PluginViewWin.cpp:
200 2008-03-17 Adam Roben <aroben@apple.com>
202 More Windows build fixes after r31098
204 * platform/ScrollView.h: Make some more methods public.
206 2008-03-17 Adam Roben <aroben@apple.com>
208 Windows and Qt build fixes after r31098
210 * platform/ScrollView.h: Mark methods public that still need to be so.
212 2008-03-16 Timothy Hatcher <timothy@apple.com>
214 Reviewed by Darin Adler.
216 Bug 17883: Console completion should support bracket notation
217 http://bugs.webkit.org/show_bug.cgi?id=17883
219 Also fixes a bug where the Inspector's window object was used instead of the
220 inspected window object.
222 * page/inspector/ConsolePanel.js:
223 (WebInspector.ConsolePanel.complete): Add a comment about the _backwardsRange call.
224 (WebInspector.ConsolePanel.completions): Add a comment about the _backwardsRange call.
225 Check the last character of the expression for a dot or bracket. Fallback
226 to the InspectorController.inspectedWindow() instead of window, this was a bad bug.
227 If the expression caused an exception, just consider the prefix a window property.
228 When bracket notation is used remember what quote was used and compared property names
229 with that quote surrounding it. Also escape the property name for the quote and backslash.
231 2008-03-17 Robert Blaut <webkit@blaut.biz>
235 Fix for bug http://bugs.webkit.org/show_bug.cgi?id=17696
236 Set default margin-bottom for form element in quirk mode
237 and be compatible with Gecko.
239 Tests: fast/css/margin-bottom-form-element-quirk.html
240 fast/css/margin-bottom-form-element-strict.html
245 2008-03-17 Antti Koivisto <antti@apple.com>
249 Speculative fix for http://bugs.webkit.org/show_bug.cgi?id=17878
250 Bug 17878: REGRESSION: Acid3 sometimes crashes Webkit under WebCore::Loader::Host::cancelRequests
252 I can't reproduce the crash or make a test case for this one but I'm pretty sure this
253 is the problem. Essentially the same bug as http://bugs.webkit.org/show_bug.cgi?id=17862
254 except in didFail() instead of didFinishLoading().
257 (WebCore::Loader::Host::didFail):
259 2008-03-17 Jan Michael Alonzo <jmalonzo@unpluggable.com>
261 Reviewed and tweaked by Darin.
263 http://bugs.webkit.org/show_bug.cgi?id=17172
264 Refactor platform checks in ScrollView.h
266 * platform/ScrollView.h: Change #ifs around.
268 2008-03-17 Yuzhu Shen <yuzhu.shen@gmail.com>
272 Fix the bug: http://bugs.webkit.org/show_bug.cgi?id=17760
273 It is necessary to load the image even when src="".
275 Test: fast/images/load-img-with-empty-src.html
277 * html/HTMLImageLoader.cpp:
278 (WebCore::HTMLImageLoader::updateFromElement): isNull rather than isEmpty.
280 2008-03-17 Rodney Dawes <dobey@wayofthemonkey.com>
282 Fix GTK+ build from r31094.
284 * plugins/gtk/PluginDatabaseGtk.cpp:
285 (PluginDatabase::getPluginsInPaths):
287 2008-03-17 Adam Roben <aroben@apple.com>
289 Fix Bug 17876: REGRESSION (r31060): Attempting to visit Ofcom page causes crash
291 <http://bugs.webkit.org/show_bug.cgi?id=17876>
295 Test: fast/dom/remove-named-attribute-crash.html
297 * dom/NamedAttrMap.cpp:
298 (WebCore::NamedAttrMap::removeAttribute): Store the Attribute we're
299 going to remove from the m_attributes Vector in a RefPtr so it doesn't
300 get deleted when it is removed from the Vector.
302 2008-03-17 Rodney Dawes <dobey@wayofthemonkey.com>
304 Reviewed by Adam Roben.
306 Implement PluginDatabase for GTK+ with PluginDatabaseGtk.cpp.
307 Remove implemented methods from TemporaryLinkStubs.
311 * plugins/gtk/PluginDatabaseGtk.cpp:
312 * platform/gtk/TemporaryLinkStubs.cpp:
314 2008-03-17 Simon Hausmann <hausmann@webkit.org>
318 * platform/text/qt/TextCodecQt.cpp:
319 (WebCore::TextCodecQt::encode):
320 * platform/text/qt/TextCodecQt.h:
322 2008-03-16 Maciej Stachowiak <mjs@apple.com>
324 Not reviewed, just fixing an incomplete comment from the last commit.
327 (WebCore::Range::surroundContents):
329 2008-03-16 Maciej Stachowiak <mjs@apple.com>
333 - fixed "Acid3 expects different exceptions for surroundContents calls involving comment nodes (affects Acid3 test 11)"
334 http://bugs.webkit.org/show_bug.cgi?id=17509
336 This gets us to 92/100
339 (WebCore::Range::surroundContents): Check for
340 HIERARCHY_REQUEST_ERR before BAD_BOUNDARYPOINTS_ERR, since Acid3
341 expects exceptional conditions to be tested in the order that the
342 spec lists them. Also, adjust the HIERARCHY_REQUEST_ERR check. If
343 the start point of the range is in a comment node, the node that
344 would be the parent of a partial replacement is actually the
345 comment node's parent (since comment nodes have character
346 indices), so we should do the HIERARCHY_REQUEST_ERR check based on
347 the parent of the comment node, as for text nodes, even though it
348 will fail later with a different exception because it is not
349 allowed to surround a partially selected non-text node.
351 2008-03-16 Marvin Decker <marv.decker@gmail.com>
355 Fix bug 15119: URL query characters that are unencodable in the
356 request's character set should be converted to XML entities with
357 non-alphanumeric characters escaped.
359 Test: http/tests/uri/escaped-entity.html
361 * html/FormDataList.cpp:
362 (WebCore::FormDataList::appendString):
363 * html/HTMLFormElement.cpp:
364 (WebCore::HTMLFormElement::formData):
366 (WebCore::encodeRelativeString):
367 * platform/text/String.cpp:
368 (WebCore::String::latin1):
369 (WebCore::String::utf8):
370 * platform/text/TextCodec.cpp:
371 (WebCore::TextCodec::unencodableCharReplacement):
372 * platform/text/TextCodec.h:
374 * platform/text/TextCodecICU.cpp:
375 (WebCore::urlEscapedEntityCallback):
376 (WebCore::gbkUrlEscapedEntityCallack):
377 (WebCore::TextCodecICU::encode):
378 * platform/text/TextCodecICU.h:
379 (WebCore::TextCodecICU::setNeedsGBKFallbacks):
380 * platform/text/TextCodecLatin1.cpp:
381 (WebCore::encodeComplexWindowsLatin1):
382 (WebCore::TextCodecLatin1::encode):
383 * platform/text/TextCodecLatin1.h:
384 * platform/text/TextCodecUTF16.cpp:
385 (WebCore::TextCodecUTF16::encode):
386 * platform/text/TextCodecUTF16.h:
387 * platform/text/TextCodecUserDefined.cpp:
388 (WebCore::encodeComplexUserDefined):
389 (WebCore::TextCodecUserDefined::encode):
390 * platform/text/TextCodecUserDefined.h:
391 * platform/text/TextEncoding.cpp:
392 (WebCore::TextEncoding::encode):
393 * platform/text/TextEncoding.h:
394 * platform/text/mac/TextCodecMac.cpp:
395 (WebCore::TextCodecMac::encode):
396 * platform/text/mac/TextCodecMac.h:
397 * xml/XMLHttpRequest.cpp:
398 (WebCore::XMLHttpRequest::send):
400 2008-03-16 Kevin Ollivier <kevino@theolliviers.com>
402 Rubber stamped by Darin.
404 Add set-webkit-configuration support for wx port, and centralize
405 build dir location setting.
407 http://bugs.webkit.org/show_bug.cgi?id=17790
411 2008-03-16 Darin Adler <darin@apple.com>
413 Reviewed by Mark Rowe.
415 - http://bugs.webkit.org/show_bug.cgi?id=17881
416 a little cleanup for HTMLTextAreaElement
418 Tests: fast/forms/textarea-default-value-leading-newline.html
419 fast/forms/textarea-linewrap-dynamic.html
421 * html/HTMLTextAreaElement.cpp:
422 (WebCore::HTMLTextAreaElement::HTMLTextAreaElement): Tweaked names/
423 (WebCore::HTMLTextAreaElement::selectionStart): Ditto, also use early return
424 and check for < 0 rather than -1 specifically.
425 (WebCore::HTMLTextAreaElement::selectionEnd): Ditto.
426 (WebCore::HTMLTextAreaElement::setSelectionStart): Early return.
427 (WebCore::HTMLTextAreaElement::setSelectionEnd): Ditto.
428 (WebCore::HTMLTextAreaElement::select): Ditto.
429 (WebCore::HTMLTextAreaElement::setSelectionRange): Ditto.
430 (WebCore::HTMLTextAreaElement::parseMappedAttribute): Changed value parsing
431 to treat unknown values as meaning "default" rather than "leave value as-is".
432 Only call setNeedsLayoutAndPrefWidthsRecalc when mode changed.
433 (WebCore::HTMLTextAreaElement::createRenderer): Removed name of unused argument.
434 (WebCore::HTMLTextAreaElement::appendFormData): Updated for name changes.
435 (WebCore::HTMLTextAreaElement::isKeyboardFocusable): Got rid of unnneeded explicit
436 class name in isFocusable call.
437 (WebCore::HTMLTextAreaElement::isMouseFocusable): Ditto.
438 (WebCore::HTMLTextAreaElement::updateFocusAppearance): Tweaked formatting.
439 (WebCore::HTMLTextAreaElement::defaultEventHandler): Ditto.
440 (WebCore::HTMLTextAreaElement::updateValue): Early return.
441 (WebCore::HTMLTextAreaElement::setValue): Got rid of intermediate value to
442 eliminate on small refcount churn.
443 (WebCore::HTMLTextAreaElement::defaultValue): Got rid of unneeded redundant
444 string length checks, since String already checks all indexing and returns 0.
445 (WebCore::HTMLTextAreaElement::setDefaultValue): Added code to normalize
446 line endings and add a leading line ending to fix cases where the first
447 character is a newline.
448 (WebCore::HTMLTextAreaElement::accessKeyAction): Removed name of unused arg.
449 (WebCore::HTMLTextAreaElement::accessKey): Changed return value to avoid
451 (WebCore::HTMLTextAreaElement::selection): Updated names and use < 0 instead
454 * html/HTMLTextAreaElement.h: Replaced wrap function with more-specific
455 shouldWrapText one. Changed return value of accessKey. Made WrapMethod enum
456 provate and renamed the values. Renamed cachedSelStart and cachedSelEnd to
457 m_cachedSelectionStart and m_cachedSelectionEnd.
459 * rendering/RenderTextControl.cpp:
460 (WebCore::RenderTextControl::createInnerTextStyle): Updated for change to
461 HTMLTextAreaElement wrap function.
463 2008-03-16 Antti Koivisto <antti@apple.com>
467 Fix http/tests/security/frame-loading-via-document-write.html
468 which was broken by the preload patch.
470 Don't print error message when preload fails local file security check.
471 Some minor refactoring.
473 * html/PreloadScanner.cpp:
474 (WebCore::PreloadScanner::emitTag):
475 (WebCore::PreloadScanner::emitCSSRule):
477 (WebCore::Cache::requestResource):
479 * loader/DocLoader.cpp:
480 (WebCore::DocLoader::requestResource):
481 (WebCore::DocLoader::preload):
482 (WebCore::DocLoader::printPreloadStats):
483 * loader/DocLoader.h:
485 2008-03-16 Antti Koivisto <antti@apple.com>
489 Fix http://bugs.webkit.org/show_bug.cgi?id=17862
490 REGRESSION (r31038): Reproducible crash under DocLoader::checkForReload() at marware.com
492 This was a memory smasher introduced by the preloading patch.
493 If a script resource was marked uncacheable, early deletion of the
494 Request object would cause deletion of the CachedResource too if
495 it was referred more than once in a single document.
497 Test: http/tests/misc/uncacheable-script-repeated.html
500 (WebCore::Loader::Host::servePendingRequests):
501 (WebCore::Loader::Host::didFinishLoading):
503 2008-03-16 Yuzhu Shen <yuzhu.shen@gmail.com>
507 Fix bug http://bugs.webkit.org/show_bug.cgi?id=17714
508 <img href="#"> should go to top of the page.
510 Test: fast/html/empty-fragment-id-goto-top.html
512 * loader/FrameLoader.cpp:
513 (WebCore::FrameLoader::gotoAnchor):
515 2008-03-16 Thiago Macieira <thiago.macieira@trolltech.com>
519 Don't use RefPtr in classes you haven't seen the implementation of.
521 Forward-declaration and declaration of RefPtr<Foo> is ok. But you
522 cannot *use* said objects until Foo is defined. This is true even for
523 initialisation with a 0.
525 Seems the HP aCC compiler is more strict here than gcc.
527 * editing/SplitTextNodeCommand.h:
529 * xml/XPathExpressionNode.h:
531 2008-03-16 Darin Adler <darin@apple.com>
535 - fix http://bugs.webkit.org/show_bug.cgi?id=14941
536 <rdar://problem/5404093> textarea value from JavaScript includes extra newline
538 Test: fast/forms/textarea-trailing-newline.html
540 * rendering/RenderTextControl.cpp:
541 (WebCore::RenderTextControl::finishText): Added code to strip the trailing
542 newline. It's possible there are some obscure cases where this is not wanted,
543 but I couldn't find any. If someone finds a case where this is bad, we can
544 make the code conditional.
546 2008-03-16 Darin Adler <darin@apple.com>
550 - fix http://bugs.webkit.org/show_bug.cgi?id=17876
551 Attempting to visit Ofcom page causes crash
553 This is causing intermittent crashes on some existing test cases on the buildbot
554 too; I don't have a 100% test case right now, but it should be easy to add one later
555 and this does fix a crash in a test we already have.
557 * dom/CharacterData.cpp:
558 (WebCore::CharacterData::CharacterData): Initialize m_data to the empty string,
559 not the null string. The class assumes the string can never being null.
560 (WebCore::CharacterData::setData): If asked to set the data to the null string,
561 set it to the empty string instead. This matches what the (non-empty) constructor
564 2008-03-15 Timothy Hatcher <timothy@apple.com>
566 Reviewed by Adam Roben.
568 Bug 17870: Web Inspector console should feel more like a terminal
569 http://bugs.webkit.org/show_bug.cgi?id=17870
571 Bug 14390: Console input area should be more noticeable
572 http://bugs.webkit.org/show_bug.cgi?id=14390
574 Adds tab completion, auto completion and a blended input prompt.
575 The prompt is also focused when the console is shown.
576 Implements a new look, that will be part of the UI refresh.
578 * page/inspector/ConsolePanel.js:
579 (WebInspector.ConsolePanel): Renamed a few properties.
580 (WebInspector.ConsolePanel.get/set promptText): Property to set
581 and get the current prompt text. Does not affect command history.
582 (WebInspector.ConsolePanel.show): Make the prompt focus on show.
583 (WebInspector.ConsolePanel.acceptAutoComplete): Accepts any
584 pending auto complete text.
585 (WebInspector.ConsolePanel.clearAutoComplete): Cancels any pending
587 (WebInspector.ConsolePanel.autoCompleteSoon): Sets a timeout to auto
588 complete in 250 ms, only if there isn't a pending auto complete.
589 (WebInspector.ConsolePanel.complete):
590 (WebInspector.ConsolePanel.completions): Generate a list of possible
591 completions based on the prefix and the previous expression ranges.
592 (WebInspector.ConsolePanel._backwardsRange): Helper to scan backwards
593 from a node and offset to find a start node and offset of the first
594 character found in the characters string.
595 (WebInspector.ConsolePanel._evalInInspectedWindow): Helper to eval in the
597 (WebInspector.ConsolePanel._caretInsidePrompt): Returns true if the selection
598 is collapsed and is inside the prompt element.
599 (WebInspector.ConsolePanel._moveCaretToEndOfPrompt): Moves the selection
600 to the end of the prompt.
601 (WebInspector.ConsolePanel._onTabPressed): Calls complete on
603 (WebInspector.ConsolePanel._onEnterPressed): Call clearAutoComplete so the
604 autocompletion text is not evaluated.
606 * page/inspector/Images/errorIcon.png: New image.
607 * page/inspector/Images/userInputIcon.png: Added.
608 * page/inspector/Images/userInputPreviousIcon.png: Added.
609 * page/inspector/Images/warningIcon.png: New image.
610 * page/inspector/inspector.css: New refreshed UI.
612 2008-03-15 Mark Mentovai <mark@moxienet.com>
614 Reviewed and landed by Darin.
616 - http://bugs.webkit.org/show_bug.cgi?id=17833
617 use file extensions instead of explicit file types in WebCore's Xcode project
619 * WebCore.xcodeproj/project.pbxproj: Remove unnecessary
620 uses of explicitFileType, preferring lastKnownFileType ("File Type:
621 Default for File" in Xcode's File Info's General tab). Files below
622 that relied on an explicit file type setting other than what would
623 be implied by their extensions have been renamed to have correct
625 * bridge/jni/jni_jsobject.cpp: Removed.
626 * bridge/jni/jni_jsobject.mm: Copied from bridge/jni/jni_jsobject.cpp.
627 * loader/mac/LoaderNSURLExtras.m: Removed.
628 * loader/mac/LoaderNSURLExtras.mm: Copied from loader/mac/LoaderNSURLExtras.m.
629 * platform/mac/SharedTimerMac.cpp: Removed.
630 * platform/mac/SharedTimerMac.mm: Copied from platform/mac/SharedTimerMac.cpp.
632 2008-03-15 Darin Adler <darin@apple.com>
636 - fix http://bugs.webkit.org/show_bug.cgi?id=11997
637 Ranges are not fixed after mutation (affects Acid3 test 13)
639 Test: fast/dom/Range/mutation.html
641 * WebCore.xcodeproj/project.pbxproj: Added NodeWithIndex.h, NodeWithIndexAfter.h,
642 and NodeWithIndexBefore.h.
644 * dom/CharacterData.cpp:
645 (WebCore::CharacterData::setData): Replaced call to Document::removeMarkers
646 with call to Document::textRemoved.
647 (WebCore::CharacterData::insertData): Replaced call to Document::shiftMarkers
648 with call to Document::textInserted.
649 (WebCore::CharacterData::deleteData): Replaced call to Document::removeMarkers
650 and Document::shiftMarkers with call to Document::textRemoved.
651 (WebCore::CharacterData::replaceData): Replaced call to Document::removeMarkers
652 and Document::shiftMarkers with call to Document::textRemoved and
653 Document::textInserted.
654 (WebCore::CharacterData::containsOnlyWhitespace): Tweaked a bit.
656 * dom/ContainerNode.cpp:
657 (WebCore::ContainerNode::childrenChanged): Added a call to
658 Document::nodeChildrenChanged when the nmber of children was changed (and not
660 (WebCore::dispatchChildRemovalEvents): Updated for name change.
663 (WebCore::Document::~Document): Assert that all ranges are gone.
664 (WebCore::Document::nodeChildrenChanged): Added. Calls nodeChildrenChanged on
666 (WebCore::Document::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
667 Added code to call nodeWillBeRemoved on all ranges.
668 (WebCore::Document::textInserted): Added. Calls textInserted on all ranges and
669 also calls shiftMarkers.
670 (WebCore::Document::textRemoved): Added. Calls textRemoved on all ranges and also
671 calls removeMarkers and shiftMarkers.
672 (WebCore::Document::textNodesMerged): Added. Calls textNodesMerged on all ranges.
673 (WebCore::Document::textNodeSplit): Added. Calls textNodeSplit on all ranges.
674 (WebCore::Document::attachRange): Added. Adds range to the HashSet of all ranges
676 (WebCore::Document::detachRange): Added. Removes range from the HashSet.
677 * dom/Document.h: Added the new functions and the data member.
680 (WebCore::Element::normalizeAttributes): Added. Contains the part of the
681 normalize function that's specific to Element. Better encapsulation to have it
682 here rather than in Node::normalize.
683 * dom/Element.h: Added the new function.
686 (WebCore::Node::normalize): Rewrote so it's no longer recursive. Also added
687 a call to textNodesMerged after each pair of nodes is merged but before the
688 second node is removed.
689 (WebCore::Node::traverseNextNodePostOrder): Added. Helper function used by
690 normalize, but also useful elsewhere.
691 * dom/Node.h: Added the new function.
693 * dom/NodeIterator.cpp:
694 (WebCore::NodeIterator::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
695 * dom/NodeIterator.h: Ditto.
697 * dom/ProcessingInstruction.cpp:
698 (WebCore::ProcessingInstruction::setData): Call textRemoved.
701 (WebCore::NodeWithIndex::index): Added. Computes and stores index.
702 (WebCore::NodeWithIndexBefore::indexBefore): Added. Computes and stores index.
703 (WebCore::NodeWithIndexAfter::indexAfter): Added. Computes and stores index.
704 (WebCore::Range::Range): Call attachRange.
705 (WebCore::Range::~Range): Call detachRange unless the range is already detached.
706 (WebCore::Range::commonAncestorContainer): Removed check for WRONG_DOCUMENT_ERR.
707 It's no longer possible to create a range where the two containers are non-zero
708 and have no common ancestor.
709 (WebCore::Range::isPointInRange): Rewrote expression to be more readable.
710 (WebCore::Range::compareNode): Changed local variable to use int for consistency.
711 (WebCore::Range::compareBoundaryPoints): Replaced ASSERT with ASSERT_NOT_REACHED.
712 (WebCore::Range::deleteContents): Removed check for INVALID_STATE_ERR and
713 initialization of ec to 0; both are now inside checkDeleteExtract.
714 (WebCore::Range::intersectsNode): Changed local variable to use int for consistency.
715 Also changed comparison to use < 0 and >= 0 rather than checking explicitly for 1
717 (WebCore::Range::processContents): Changed code to not get the nodeType multiple
718 times on the same node, and tweaked formatting. Removed code to update the range
719 on deletion, because the normal delete logic will take care of that now.
720 (WebCore::Range::extractContents): Removed check for INVALID_STATE_ERR and
721 initialization of ec to 0; both are now inside checkDeleteExtract.
722 (WebCore::Range::insertNode): Changed local variable to use int for consistency.
723 (WebCore::Range::toString): Changed variable name to pastLast.
724 (WebCore::Range::detach): Call detachRange.
725 (WebCore::Range::checkDeleteExtract): Added check for detached range and code to
726 set ec to 0; moved here from the two callers. Also changed variable name to pastLast.
727 (WebCore::endpointNodeChildrenChanged): Added.
728 (WebCore::Range::nodeChildrenChanged): Added.
729 (WebCore::endpointNodeWillBeRemoved): Added.
730 (WebCore::Range::nodeWillBeRemoved): Added.
731 (WebCore::endpointTextInserted): Added.
732 (WebCore::Range::textInserted): Added.
733 (WebCore::endpointTextRemoved): Added.
734 (WebCore::Range::textRemoved): Added.
735 (WebCore::endpointTextNodesMerged): Added.
736 (WebCore::Range::textNodesMerged): Added.
737 (WebCore::endpointTextNodesSplit): Added.
738 (WebCore::Range::textNodeSplit): Added.
740 * dom/Range.h: Added new member functions.
742 * dom/NodeWithIndex.h: Added. Makes it so we won't find the index for the same
744 * dom/NodeWithIndexAfter.h: Added. Similar to NodeWithIndex but gives the index after a
745 node and treats a node pointer of 0 as meaning "before first node in parent container".
746 * dom/NodeWithIndexBefore.h: Added. Similar to NodeWithIndex but treats a node pointer of 0
747 as meaning "after last node in parent container".
750 (WebCore::Text::splitText): Call textNodeSplit.
752 * editing/ApplyStyleCommand.cpp:
753 (WebCore::ApplyStyleCommand::applyInlineStyle): Changed variable name to pastLast.
755 2008-03-15 Julien Chaffraix <julien.chaffraix@gmail.com>
759 [CURL] Crash below ResourceHandleManager::setupPOST when job->request().httpBody() is NULL
760 http://bugs.webkit.org/show_bug.cgi?id=16906
762 Add null checks for httpBody() to match other ports.
764 Test: http/tests/xmlhttprequest/xmlhttprequest-post-crash.html
766 * platform/network/curl/ResourceHandleManager.cpp:
767 (WebCore::readCallback): Add null check.
768 (WebCore::ResourceHandleManager::setupPOST): Ditto.
770 2008-03-14 Steve Falkenburg <sfalken@apple.com>
774 * WebCore.vcproj/WebCore.vcproj:
776 2008-03-14 Anders Carlsson <andersca@apple.com>
780 <rdar://problem/5794989>
781 https://bugs.webkit.org/show_bug.cgi?id=17792
782 REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
784 Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
785 so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame.
787 * bindings/js/JSDOMWindowBase.cpp:
788 (WebCore::createWindow):
789 * loader/FrameLoader.cpp:
790 (WebCore::FrameLoader::createWindow):
791 * loader/FrameLoader.h:
793 2008-03-14 Dan Bernstein <mitz@apple.com>
795 Reviewed by Mark Rowe.
797 - fix <rdar://problem/5797836> shadow offsets are smaller than specified
799 * platform/graphics/cg/GraphicsContextCG.cpp:
800 (WebCore::GraphicsContext::setShadow): Made the workaround for
801 <rdar://problem/5539388> unconditional.
803 2008-03-14 Adam Roben <aroben@apple.com>
805 Fix it right this time
807 * platform/MainThread.cpp: Cast to unsigned so we can use %u in the
809 * platform/mac/MainThreadMac.mm:
811 2008-03-14 Adam Roben <aroben@apple.com>
815 * platform/mac/MainThreadMac.mm: Corrected a typo.
817 2008-03-14 Dan Bernstein <mitz@apple.com>
819 Reviewed by Darin Adler.
821 - fix http://bugs.webkit.org/show_bug.cgi?id=17834
822 REGRESSION: floated first-letter does not work when included in table
824 Test: fast/css/first-letter-float.html
826 * rendering/RenderBlock.cpp:
827 (WebCore::RenderBlock::updateFirstLetter): Changed the search for the
828 first text node to stop at a float if that float is an existing first-
831 2008-03-14 Sam Weinig <sam@webkit.org>
835 * WebCore.xcodeproj/project.pbxproj:
837 2008-03-13 Adam Roben <aroben@apple.com>
839 Make most of callOnMainThread's implementation be cross-platform
841 I took the non-platform-specific parts of MainThreadWin.cpp and moved
842 them to a new MainThread.cpp. Each platform is now responsible for
843 implementing one function, scheduleDispatchFunctionsOnMainThread,
844 which is supposed to set things up so that
845 dispatchFunctionsFromMainThread gets called from the main thread in
850 * GNUmakefile.am: Added MainThread.cpp to the project.
851 * WebCore.pro: Ditto.
852 * WebCore.vcproj/WebCore.vcproj: Ditto.
853 * WebCore.xcodeproj/project.pbxproj: Ditto.
854 * WebCoreSources.bkl: Ditto.
855 * platform/MainThread.cpp:
856 - Copied from WebCore/platform/win/MainThreadWin.cpp.
857 - Removed the Windows-specific parts.
858 (WebCore::callOnMainThread): Changed to call
859 scheduleDispatchFunctionsOnMainThread instead of PostMessage.
860 * platform/gtk/MainThreadGtk.cpp:
861 (WebCore::timeoutFired): Renamed from callFunctionOnMainThread. Now
862 just calls dispatchFunctionsFromMainThread.
863 (WebCore::scheduleDispatchFunctionsOnMainThread): Added. Calls through
865 * platform/mac/MainThreadMac.mm: Renamed WebCoreFunctionWrapper to
866 WebCoreMainThreadCaller.
867 (-[WebCoreMainThreadCaller call]): Calls through to
868 dispatchFunctionsFromMainThread.
869 (WebCore::scheduleDispatchFunctionsOnMainThread): Makes a new
870 WebCoreMainThreadCaller and calls performSelectorOnMainThread on it.
871 * platform/qt/MainThreadQt.cpp: Removed PerformFunctionEvent.
872 (WebCore::MainThreadInvoker::event): Chagned to call through to
873 dispatchFunctionsFromMainThread.
874 (WebCore::scheduleDispatchFunctionsOnMainThread): Sends an empty event
875 to the MainThreadInvoker.
876 * platform/win/MainThreadWin.cpp:
877 - Removed the non-Windows-specific parts.
878 - Removed some unnecessary initialization of static variables to 0.
879 (WebCore::ThreadingWindowWndProc): Changed to call
880 dispatchFunctionsFromMainThread.
881 (WebCore::scheduleDispatchFunctionsOnMainThread): Calls through to
883 * platform/wx/MainThreadWx.cpp:
884 (WebCore::scheduleDispatchFunctionsOnMainThread): Added.
886 2008-03-14 Beth Dakin <bdakin@apple.com>
890 Fix for <rdar://problem/5728171> Potential PLT speedup: don't
891 realloc every time inside NamedAttrMap::addAttribute
893 The speed-up for this turned out to be so small that it is mostly
894 imperceptible. It is likely that it is a tiny boost, though, and
895 the new code is much cleaner.
898 (WebCore::Element::setAttributeMap): attrs is now called
900 * dom/NamedAttrMap.cpp: The array attrs is now the Vector of
901 RefPtrs called m_attributes, and there is no longer any need for
902 the len member variable.
903 (WebCore::NamedAttrMap::NamedAttrMap):
904 (WebCore::NamedAttrMap::item):
905 (WebCore::NamedAttrMap::getAttributeItem):
906 (WebCore::NamedAttrMap::clearAttributes):
907 (WebCore::NamedAttrMap::operator=):
908 (WebCore::NamedAttrMap::addAttribute):
909 (WebCore::NamedAttrMap::removeAttribute):
910 (WebCore::NamedAttrMap::mapsEquivalent):
911 * dom/NamedAttrMap.h: Same.
912 (WebCore::NamedAttrMap::length):
913 (WebCore::NamedAttrMap::attributeItem):
914 (WebCore::NamedAttrMap::shrinkToLength):
915 (WebCore::NamedAttrMap::reserveCapacity):
916 * html/HTMLTokenizer.cpp: One of the benefits of the old array was
917 that it never took up more memory than it needed to. So the
918 tokenizer utilizes new member functions on NamedAttrMap
919 (shrinkToLength and reserveCapacity) to try to keep memory usage at
921 (WebCore::Token::addAttribute):
922 (WebCore::HTMLTokenizer::processToken):
924 2008-03-14 David D. Kilzer <ddkilzer@apple.com>
926 BUILD FIX when ENABLE(MAC_JAVA_BRIDGE) set to 0.
928 * page/mac/FrameMac.mm: Move up #if ENABLE(MAC_JAVA_BRIDGE) guard
929 to comment out unused code.
931 2008-03-14 David D. Kilzer <ddkilzer@apple.com>
933 Unify concept of enabling the Mac Java bridge.
935 Reviewed by Darin and Anders.
937 No test cases added since there is no change in functionality.
939 * DerivedSources.make: Added check for ENABLE_MAC_JAVA_BRIDGE macro.
940 If defined as "1", add WebCore.JNI.exp to WEBCORE_EXPORT_DEPENDENCIES.
941 * WebCore.JNI.exp: Added.
942 * WebCore.base.exp: Moved exported JNI methods to WebCore.JNI.exp.
944 * bridge/jni/jni_class.cpp: Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
945 * bridge/jni/jni_class.h: Ditto.
946 * bridge/jni/jni_instance.cpp: Ditto.
947 * bridge/jni/jni_instance.h: Ditto.
948 * bridge/jni/jni_jsobject.cpp: Ditto.
949 * bridge/jni/jni_jsobject.h: Ditto.
950 * bridge/jni/jni_objc.mm: Ditto.
951 * bridge/jni/jni_runtime.cpp: Ditto.
952 * bridge/jni/jni_runtime.h: Ditto.
953 * bridge/jni/jni_utility.cpp: Ditto.
954 * bridge/jni/jni_utility.h: Ditto.
956 * bridge/runtime.cpp: Removed unused #include statements.
958 (KJS::Bindings::Instance::BindingLanguage): Added #if ENABLE(MAC_JAVA_BRIDGE)
959 guard for JavaLanguage enum. Also added #if PLATFORM(MAC) guard for
960 ObjectiveCLanguage enum to match corresponding code in runtime.cpp.
962 * config.h: Removed definition of HAVE_JNI.
964 * loader/FrameLoaderClient.h:
965 (WebCore::FrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
967 (WebCore::Frame::Frame): Ditto.
969 (WebCore::Frame::initJavaJSBindings): Ditto.
970 * page/mac/FrameMac.mm:
971 (WebCore::Frame::createScriptInstanceForWidget): Ditto.
972 (WebCore::Frame::initJavaJSBindings): Ditto.
974 2008-03-13 Darin Adler <darin@apple.com>
976 * html/PreloadScanner.h: Corrected license.
977 * html/PreloadScanner.cpp: Corrected license.
979 2008-03-13 Mark Mentovai <mark@moxienet.com>
981 Reviewed by darin. Landed by eseidel.
983 * platform/FloatConversion.h: Include a header to get CoreGraphics
984 types when using CoreGraphics types.
986 2008-03-13 Mark Mentovai <mark@moxienet.com>
988 Reviewed by eseidel. Landed by eseidel.
990 * WebCore.xcodeproj/project.pbxproj:
993 Move CSSPropertyNames.c to CSSPropertyNames.cpp
995 2008-03-13 Mark Mentovai <mark@moxienet.com>
997 Reviewed by eseidel. Landed by eseidel.
999 * platform/Arena.h: Use statement1;statement2 instead of
1000 (statement1,statement2) in CLEAR_UNUSED.
1002 2008-03-13 Tommi Komulainen <tommi.komulainen@iki.fi>
1004 Reviewed by Alp Toker.
1006 http://bugs.webkit.org/show_bug.cgi?id=17821
1007 [SOUP] POST requests are empty
1009 Send the HTTP request body as well.
1011 * platform/network/soup/ResourceHandleSoup.cpp:
1012 (WebCore::ResourceHandle::start):
1014 2008-03-13 Dan Bernstein <mitz@apple.com>
1016 Reviewed by Dave Hyatt.
1018 - fix http://bugs.webkit.org/show_bug.cgi?id=17819
1019 Border-collapse: collapse later cell wins on PC, earlier cell on Mac
1021 Test: fast/table/border-collapsing/equal-precedence-resolution.html
1023 * rendering/RenderTableCell.cpp:
1024 (WebCore::RenderTableCell::collapsedLeftBorder): When calling
1025 compareBorders() with borders that may have the same precedence, made
1026 sure to pass the border belonging to the earlier (in document order)
1027 element first, since compareBorders() prefers the first argument when
1029 (WebCore::RenderTableCell::collapsedRightBorder): Ditto.
1030 (WebCore::RenderTableCell::collapsedTopBorder): Ditto.
1032 2008-03-13 Adam Roben <aroben@apple.com>
1034 wx build fix and Windows leak fix after r31034
1036 * platform/graphics/wx/ImageWx.cpp:
1037 (WebCore::Image::loadPlatformResource): Use SharedBuffer::create.
1038 * platform/win/SharedBufferWin.cpp:
1039 (WebCore::SharedBuffer::createWithContentsOfFile): Ditto (we were
1040 leaking the SharedBuffer here before).
1042 2008-03-13 Antti Koivisto <antti@apple.com>
1046 Correct a few issues spotted by Mike Belshe.
1048 * html/PreloadScanner.cpp:
1049 (WebCore::PreloadScanner::tokenize):
1050 * loader/loader.cpp:
1051 (WebCore::Loader::cancelRequests):
1053 2008-03-13 Rodney Dawes <dobey@wayofthemonkey.com>
1055 Fix GTK+ build for SharedBuffer changes.
1057 * platform/graphics/gtk/ImageGtk.cpp:
1058 (Image::loadPlatformResource):
1060 2008-03-13 Steve Falkenburg <sfalken@apple.com>
1062 More PGO build fixes.
1064 * WebCorePrefix.cpp:
1066 2008-03-13 Antti Koivisto <antti@apple.com>
1070 Make page loads go fast.
1072 http://bugs.webkit.org/show_bug.cgi?id=17480
1074 - Implement speculative preloading. When a script load blocks the main parser, use a side
1075 parser to pick up more resources.
1076 - Implement per-host load queues, prioritize scripts and stylesheets over images.
1078 Depending on content and network latency this may speed things up quite a bit.
1080 * WebCore.xcodeproj/project.pbxproj:
1082 (WebCore::Document::implicitClose):
1083 Clear the preloads after laoding completes.
1085 * html/HTMLLinkElement.cpp:
1086 (WebCore::HTMLLinkElement::parseMappedAttribute):
1087 (WebCore::HTMLLinkElement::tokenizeRelAttribute):
1088 * html/HTMLLinkElement.h:
1089 Make tokenizeRelAttribute() public static so it can be used from elsewhere.
1090 Eliminate a pointless bitfield so I can get references.
1092 * html/HTMLTokenizer.cpp:
1093 (WebCore::HTMLTokenizer::scriptHandler):
1094 (WebCore::HTMLTokenizer::scriptExecution):
1095 (WebCore::HTMLTokenizer::write):
1096 * html/HTMLTokenizer.h:
1097 Spin up the preload scanner whenever a script load blocks the parser. One scanner tracks the end of
1098 the document while temporary ones are created as needed to scan document.write() output.
1100 * html/PreloadScanner.cpp: Added.
1101 (WebCore::PreloadScanner::PreloadScanner):
1102 (WebCore::PreloadScanner::~PreloadScanner):
1103 (WebCore::PreloadScanner::begin):
1104 (WebCore::PreloadScanner::end):
1105 (WebCore::PreloadScanner::reset):
1106 (WebCore::PreloadScanner::write):
1107 (WebCore::isWhitespace):
1108 (WebCore::PreloadScanner::clearLastCharacters):
1109 (WebCore::PreloadScanner::rememberCharacter):
1110 (WebCore::PreloadScanner::lastCharactersMatch):
1111 (WebCore::legalEntityFor):
1112 (WebCore::PreloadScanner::consumeEntity):
1113 (WebCore::PreloadScanner::tokenize):
1114 (WebCore::PreloadScanner::processAttribute):
1115 (WebCore::PreloadScanner::emitCharacter):
1116 (WebCore::PreloadScanner::tokenizeCSS):
1117 (WebCore::PreloadScanner::emitTag):
1118 (WebCore::PreloadScanner::emitCSSRule):
1119 * html/PreloadScanner.h: Added.
1120 (WebCore::PreloadScanner::inProgress):
1121 (WebCore::PreloadScanner::):
1122 HTML5 tokenization plus some glue code. Fake CSS parsing thrown in just for fun.
1125 (WebCore::Cache::pruneDeadResources):
1126 Preloads have zero refcount, avoid kicking them out too early.
1128 * loader/CachedResource.cpp:
1129 (WebCore::CachedResource::CachedResource):
1130 (WebCore::CachedResource::ref):
1131 * loader/CachedResource.h:
1132 (WebCore::CachedResource::):
1133 (WebCore::CachedResource::preloadResult):
1134 (WebCore::CachedResource::setRequestedFromNetworkingLayer):
1135 (WebCore::CachedResource::canDelete):
1136 (WebCore::CachedResource::isPreloaded):
1137 (WebCore::CachedResource::increasePreloadCount):
1138 (WebCore::CachedResource::decreasePreloadCount):
1139 Keep track which resources are preloads. Avoid deleting them. Track
1140 at which point of the loading preloads get utilized to enable some interesting
1143 * loader/DocLoader.cpp:
1144 (WebCore::DocLoader::~DocLoader):
1145 (WebCore::DocLoader::checkForReload):
1146 (WebCore::DocLoader::registerPreload):
1147 (WebCore::DocLoader::clearPreloads):
1148 (WebCore::DocLoader::printPreloadStats):
1149 * loader/DocLoader.h:
1150 Ensure we utilize preloaded resources during reloads.
1151 Keep a list of all preloads in the document. Clear the preloads after
1152 parsing is complete. Some debug statistics.
1154 * loader/DocumentLoader.cpp:
1155 (WebCore::DocumentLoader::isLoadingInAPISense):
1156 Avoid signaling that loading is complete too early.
1158 * loader/loader.cpp:
1159 (WebCore::Loader::Loader):
1160 (WebCore::Loader::~Loader):
1161 (WebCore::Loader::determinePriority):
1162 (WebCore::Loader::load):
1163 (WebCore::Loader::scheduleServePendingRequests):
1164 (WebCore::Loader::requestTimerFired):
1165 (WebCore::Loader::servePendingRequests):
1166 (WebCore::Loader::cancelRequests):
1167 (WebCore::Loader::Host::Host):
1168 (WebCore::Loader::Host::~Host):
1169 (WebCore::Loader::Host::addRequest):
1170 (WebCore::Loader::Host::hasRequests):
1171 (WebCore::Loader::Host::servePendingRequests):
1172 (WebCore::Loader::Host::didFinishLoading):
1173 (WebCore::Loader::Host::didFail):
1174 (WebCore::Loader::Host::didReceiveResponse):
1175 (WebCore::Loader::Host::didReceiveData):
1176 (WebCore::Loader::Host::cancelPendingRequests):
1177 (WebCore::Loader::Host::cancelRequests):
1179 (WebCore::Loader::):
1180 Distribute load requests to per-host priority queues. Limit the number of loads issued to the
1181 networking layer so we have better changes of getting important requests through first.
1182 Prioritize scripts > stylesheets > images.
1184 2008-03-13 David Hyatt <hyatt@apple.com>
1186 This patch makes full page zoom work pretty well. It fixes repainting so that it works when transforms
1187 are set on the RenderView. It also implements the "smart layout" behavior that other browsers support when
1188 zooming. The page will still try to constrain to the viewport size even when zoomed.
1193 (WebCore::Document::recalcStyle):
1194 Make sure to test for transform changes even when there is no zoom. This fixes repainting issues
1195 caused by jumping from a zoomed state back to the standard size.
1197 * page/FrameView.cpp:
1198 (WebCore::FrameView::adjustViewSize):
1199 Adjust for the zoom factor (the render tree is in unzoomed coordinates, but the scrollbars of the view
1200 need to handle zoomed coordinates).
1202 * rendering/RenderBox.cpp:
1203 (WebCore::RenderBox::calcHeight):
1204 Fix the body-sizing-to-the-view-height quirk so that it takes the zoom factor into account when
1205 stretching to fill the viewport.
1207 * rendering/RenderLayer.cpp:
1208 (WebCore::RenderLayer::updateLayerPositions):
1209 (WebCore::RenderLayer::setHasVisibleContent):
1210 Remove the FIXMEs now that absoluteClippedOverflowRect works with transforms on the RenderView.
1212 * rendering/RenderView.cpp:
1213 (WebCore::RenderView::calcHeight):
1214 (WebCore::RenderView::calcWidth):
1215 Make sure the calculated width/height take the zoom factor into account in order to get the "smart layout"
1218 (WebCore::RenderView::layout):
1219 When deciding whether children have to get a relayout, we need to check the zoomed width/height and not just
1222 (WebCore::RenderView::computeAbsoluteRepaintRect):
1223 Patched to take into account transforms set on the RenderView.
1225 (WebCore::RenderView::docHeight):
1226 (WebCore::RenderView::docWidth):
1227 Patched to just always use m_width and m_height initially, since those have already been adjusted for
1230 (WebCore::RenderView::zoomedHeight):
1231 (WebCore::RenderView::zoomedWidth):
1232 * rendering/RenderView.h:
1233 New helper methods for obtaining the adjusted width/height of the viewport taking into account the
1236 2008-03-13 Anders Carlsson <andersca@apple.com>
1242 2008-03-13 Anders Carlsson <andersca@apple.com>
1246 Get rid of actualRequest, it is not used anymore. Also, get rid of
1247 initialRequest and replace all uses with originalRequest because those are
1250 * loader/DocumentLoader.cpp:
1251 * loader/DocumentLoader.h:
1252 * loader/FrameLoader.cpp:
1253 (WebCore::FrameLoader::initialRequest):
1254 (WebCore::FrameLoader::originalRequestURL):
1256 2008-03-13 Brady Eidson <beidson@apple.com>
1260 Convert SharedBuffer to start with a refCount of 1
1262 * loader/ImageDocument.cpp:
1263 (WebCore::ImageTokenizer::finish):
1265 * loader/ResourceLoader.cpp:
1266 (WebCore::ResourceLoader::addData):
1267 (WebCore::ResourceLoader::willStopBufferingData):
1269 * loader/icon/IconDatabase.cpp:
1270 (WebCore::IconDatabase::defaultIcon):
1271 (WebCore::IconDatabase::getImageDataForIconURLFromSQLDatabase):
1273 * loader/loader.cpp:
1274 (WebCore::Loader::didReceiveData):
1276 * platform/SharedBuffer.h:
1277 (WebCore::SharedBuffer::create): Make all constructors private, add ::create() calls
1278 * platform/SharedBuffer.cpp:
1279 (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
1280 (WebCore::SharedBuffer::copy):
1281 * platform/mac/SharedBufferMac.mm:
1282 (WebCore::SharedBuffer::wrapNSData):
1283 (WebCore::SharedBuffer::SharedBuffer): Revert to default RefCounted constructor to start with a ref count of 1
1285 2008-03-13 Steve Falkenburg <sfalken@apple.com>
1289 Disable PGO for normal release builds.
1290 Added work-in-progress Release_PGOInstrument/Release_PGOOptimize targets.
1292 * WebCore.vcproj/WebCore.vcproj:
1294 2008-03-13 Anders Carlsson <andersca@apple.com>
1298 Make a bunch of DocumentLoader setters/getters inline.
1300 * loader/DocumentLoader.cpp:
1301 * loader/DocumentLoader.h:
1302 (WebCore::DocumentLoader::isStopping):
1303 (WebCore::DocumentLoader::setCommitted):
1304 (WebCore::DocumentLoader::isCommitted):
1305 (WebCore::DocumentLoader::isLoading):
1306 (WebCore::DocumentLoader::setLoading):
1307 (WebCore::DocumentLoader::response):
1308 (WebCore::DocumentLoader::mainDocumentError):
1309 (WebCore::DocumentLoader::setResponse):
1310 (WebCore::DocumentLoader::isClientRedirect):
1311 (WebCore::DocumentLoader::setIsClientRedirect):
1312 (WebCore::DocumentLoader::overrideEncoding):
1313 (WebCore::DocumentLoader::responses):
1314 (WebCore::DocumentLoader::triggeringAction):
1315 (WebCore::DocumentLoader::setTriggeringAction):
1316 (WebCore::DocumentLoader::setOverrideEncoding):
1317 (WebCore::DocumentLoader::setLastCheckedRequest):
1318 (WebCore::DocumentLoader::lastCheckedRequest):
1319 (WebCore::DocumentLoader::title):
1320 (WebCore::DocumentLoader::setLoadingFromCachedPage):
1321 (WebCore::DocumentLoader::isLoadingFromCachedPage):
1323 2008-03-13 Rodney Dawes <dobey@wayofthemonkey.com>
1325 Fix builds without SVG enabled.
1328 (Frame::shouldApplyTextZoom):
1329 (Frame::shouldApplyPageZoom):
1331 2008-03-13 Simon Hausmann <hausmann@webkit.org>
1335 * bridge/qt/qt_instance.cpp:
1336 (KJS::Bindings::QtInstance::getQtInstance):
1337 (KJS::Bindings::QtInstance::getRuntimeObject):
1338 * bridge/qt/qt_instance.h:
1339 (KJS::Bindings::QtInstance::create):
1340 * bridge/qt/qt_runtime.cpp:
1341 (KJS::Bindings::convertQVariantToValue):
1342 (KJS::Bindings::QtConnectionObject::execute):
1343 * page/qt/FrameQt.cpp:
1344 (WebCore::Frame::createScriptInstanceForWidget):
1346 2008-03-12 Sam Weinig <sam@webkit.org>
1348 Reviewed by Darin Adler.
1350 Fix <rdar://problem/5784773>
1351 Crash loading QT movies @ apple.com/ipodtouch/features.html with a PAC file (WebKitThreadingException)
1353 Make bridged RuntimeObjects get collected on the main thread only. This is necessary
1354 because clients of the bridged objects are unlikely to prepared for a collection on
1355 non-main thread, which can happen with a PAC file.
1357 * bridge/runtime_object.cpp:
1358 (RuntimeObjectImp::RuntimeObjectImp):
1360 2008-03-12 Adam Roben <aroben@apple.com>
1362 Fix Bug 17815: Inspector's DOM tree should descend into subframes
1364 <http://bugs.webkit.org/show_bug.cgi?id=17815>
1368 * page/inspector/DocumentPanel.js:
1369 (WebInspector.DocumentPanel.revealNode): Changed to provide
1370 _isAncestorIncludingParentFramesWithinPanel and
1371 _parentNodeOrFrameElementWithinPanel for the isAncestor and getParent
1372 parameters to findTreeElement so that parent frames will be searched.
1373 (WebInspector.DocumentPanel.updateBreadcrumb):
1374 - Changed while loop to for loop
1375 - Use _parentNodeOrFrameElementWithinPanel instead of
1376 Node.parentNode to move to the next node
1377 - The loop now ends when we reach the DocumentPanel's document node
1378 - Traversal past other Document nodes is now allowed
1379 - We add the "start" class to the final crumb after the loop exits
1380 (WebInspector.DocumentPanel._getDocumentForNode): Added. Simple helper
1381 that returns the node itself if the node is a Document node, or the
1382 node's ownerDocument otherwise.
1383 (WebInspector.DocumentPanel._parentNodeOrFrameElementWithinPanel):
1384 Added. Returns the node's parent node or, in the case of a Document
1385 node, the node's window's owning frame element, but will not return a
1386 node that is in a parent frame of the DocumentPanel's Document.
1387 (WebInspector.DocumentPanel._isAncestorIncludingParentFramesWithinPanel):
1388 Added. Returns true if a is an ancestor of b if a is an ancestor of a
1389 frame element whose subframe(s) contain b.
1390 (WebInspector.DOMNodeTreeElement): We now consider ourselves to have
1391 children if we have a contentDocument.
1392 (WebInspector.DOMNodeTreeElement.onpopulate): Moved the appendChild
1393 loop into a function so that we can add both children of our
1394 contentDocument and children of our node to the tree.
1395 (WebInspector.DOMNodeTreeElement.ondblclick): Changed so that we get
1396 the rootDOMNode by traversing the tree outline hierarchy instead of
1397 the DOM hierarchy so that we can easily jump up to a parent frame.
1399 2008-03-12 Adam Roben <aroben@apple.com>
1401 Update the styles/metrics panes and breadcrumb after editing DOM
1406 * page/inspector/DocumentPanel.js:
1407 (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update
1408 the parts of the DocumentPanel other than the DOM tree into a new
1409 function, _focusedNodeChanged.
1410 (WebInspector.DocumentPanel._focusedNodeChanged): Added. The
1411 forceUpdate parameter specifies whether the update should occur even
1412 if the focused node hasn't changed since the last update.
1413 (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate
1414 parameter. If forceUpdate is true, we always rebuild the breadcrumbs.
1415 (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate
1416 parameter. If forceUpdate is true, we always rebuild the styles pane.
1417 (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a
1418 call to DocumentPanel._focusedNodeChanged. We have to force the update
1419 because we haven't changed the focused node (the attributes of the
1421 * page/inspector/StylesSidebarPane.js:
1422 (WebInspector.StylesSidebarPane.update): Added a forceUpdate
1423 parameter. If forceUpdate is true we always rebuild the styles.
1425 2008-03-12 Mark Rowe <mrowe@apple.com>
1427 Further Gtk and Qt build fixes.
1429 * bridge/runtime.cpp:
1430 (KJS::Bindings::Instance::createRuntimeObject): Adapt Qt-only code for change to PassRefPtr.
1431 * page/gtk/FrameGtk.cpp: Add missing include.
1433 2008-03-12 Mark Rowe <mrowe@apple.com>
1435 Fix Gtk and Qt builds.
1437 * page/gtk/FrameGtk.cpp:
1438 * page/qt/FrameQt.cpp:
1440 2008-03-12 Mark Rowe <mrowe@apple.com>
1444 * WebCore.base.exp: Remove symbol.
1446 2008-03-12 Steve Falkenburg <sfalken@apple.com>
1450 * page/win/FrameWin.cpp:
1452 2008-03-12 Steve Falkenburg <sfalken@apple.com>
1456 * plugins/win/PluginViewWin.cpp:
1457 (WebCore::PluginView::bindingInstance):
1459 2008-03-12 Darin Adler <darin@apple.com>
1463 - http://bugs.webkit.org/show_bug.cgi?id=17640
1464 eliminate WebCoreFrameBridge
1466 * WebCore.base.exp: Added more exports, needed by code moved from WebCoreFrameBridge
1467 to WebFrame in WebKit.
1468 * WebCore.xcodeproj/project.pbxproj: Added more headers, same reason. Also deleted
1469 WebCoreFrameBridge.h and WebCoreFrameBridge.mm.
1472 (WebCore::Frame::Frame): Added call to initJavaJSBindings(), formerly handled by
1473 the WebCoreFrameBridge.
1474 * page/Frame.h: Added initJavaJSBindings function.
1476 * page/mac/FrameMac.mm:
1477 (WebCore::updateRenderingForBindings): Moved here from WebCoreFrameBridge.
1478 (WebCore::Frame::initJavaJSBindings): Ditto; code was in the init function.
1480 * page/mac/WebCoreFrameBridge.h: Removed.
1481 * page/mac/WebCoreFrameBridge.mm: Removed.
1483 2008-03-12 Sam Weinig <sam@webkit.org>
1485 Reviewed by Anders Carlsson.
1487 Don't go through the Document just to get the frame Element.
1489 * page/DOMWindow.cpp:
1490 (WebCore::DOMWindow::frameElement):
1492 2008-03-12 Anders Carlsson <andersca@apple.com>
1494 Reviewed by Geoff and Sam.
1496 More Instance cleanup:
1498 * Make Instance inherit from RefCounted instead of doing its own refcounting.
1499 * Make all Instance subclasses private, add static create methods.
1500 * Have Instance start out with a refcount of 1.
1501 * Get rid of Instance::createBindingForLanguageInstance and call the individual
1502 instance constructor methods instead.
1503 * Fix many methods to take and return PassRefPtr<Instance> to ensure that the
1504 refcounting is done correctly.
1506 * bridge/c/c_instance.h:
1507 (KJS::Bindings::CInstance::create):
1508 * bridge/c/c_utility.cpp:
1509 (KJS::Bindings::convertNPVariantToValue):
1510 * bridge/jni/jni_instance.cpp:
1511 (JavaInstance::invokeMethod):
1512 * bridge/jni/jni_instance.h:
1513 (KJS::Bindings::JavaInstance::create):
1514 * bridge/jni/jni_jsobject.cpp:
1515 (JavaJSObject::convertJObjectToValue):
1516 * bridge/jni/jni_runtime.cpp:
1517 (JavaField::valueFromInstance):
1518 (JavaArray::valueAt):
1519 * bridge/objc/objc_instance.h:
1520 (KJS::Bindings::ObjcInstance::create):
1521 * bridge/objc/objc_utility.mm:
1522 (KJS::Bindings::convertObjcValueToValue):
1523 * bridge/qt/qt_instance.cpp:
1524 (KJS::Bindings::QtRuntimeObjectImp::QtRuntimeObjectImp):
1525 (KJS::Bindings::QtInstance::getQtInstance):
1526 (KJS::Bindings::QtInstance::getRuntimeObject):
1527 * bridge/qt/qt_instance.h:
1528 * bridge/runtime.cpp:
1529 (KJS::Bindings::Instance::Instance):
1530 (KJS::Bindings::Instance::createRuntimeObject):
1532 * bridge/runtime_object.cpp:
1533 (RuntimeObjectImp::RuntimeObjectImp):
1534 * bridge/runtime_object.h:
1536 * page/mac/FrameMac.mm:
1537 (WebCore::Frame::createScriptInstanceForWidget):
1538 * page/win/FrameWin.cpp:
1539 (WebCore::Frame::createScriptInstanceForWidget):
1540 * plugins/PluginView.h:
1541 * plugins/win/PluginViewWin.cpp:
1542 (WebCore::PluginView::bindingInstance):
1544 2008-03-12 Dan Bernstein <mitz@apple.com>
1546 Suggested by Darin Adler. Reviewed by Dave Hyatt.
1548 - speed up BidiIterator::direction()
1550 * rendering/bidi.cpp:
1551 (WebCore::BidiIterator::current): Made inline and corrected the
1552 out-of-bounds condition to work with 0-length text and offsets beyond
1553 the end of the text.
1554 (WebCore::BidiIterator::direction): Changed to call current() and not
1555 call the virtual method isListMarker() most of the time.
1556 (WebCore::addMidpoint): Removed unnecessary null-check of smidpoints.
1557 (WebCore::appendRunsForObject): Ditto.
1559 2008-03-12 Adam Roben <aroben@apple.com>
1561 Make URLs not be underlined while editing them in the DOM view
1565 * page/inspector/inspector.css:
1567 2008-03-12 Adam Roben <aroben@apple.com>
1569 Part of Bug 17224: DOM nodes/attributes should be editable
1571 <http://bugs.webkit.org/show_bug.cgi?id=17224>
1572 <rdar://problem/5732825>
1574 We now start editing if the user single-clicks on an attribute,
1575 attribute value, or text node while the parent element is selected.
1576 Previously, we started editing on double-click regardless of the
1577 selection state of the element.
1579 URLs in the DOM tree are now followed on Alt/Option-click, rather than
1584 * English.lproj/InspectorLocalizedStrings.js: Added four new localized
1586 * page/inspector/DocumentPanel.js:
1587 (WebInspector.DOMNodeTreeElement.onattach): Call new
1588 _makeURLSActivateOnModifiedClick.
1589 (WebInspector.DOMNodeTreeElement._makeURLsActivateOnModifiedClick):
1590 Added. Changes the tooltip of each link in this element to indicate
1591 that Alt/Option-click will follow the URL, and sets the
1592 followOnAltClick property on each link.
1593 (WebInspector.DOMNodeTreeElement.onselect): Mark that we're being
1595 (WebInspector.DOMNodeTreeElement.onmousedown): If we're not currently
1596 being selected, start editing.
1597 (WebInspector.DOMNodeTreeElement.ondblclick): We no longer start
1598 editing here. We block re-rooting of the tree if we're currently
1600 (WebInspector.DOMNodeTreeElement._startEditing):
1601 - Don't do anything if we're not focused
1602 - Pass the event down to _startEditingAttribute.
1603 (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't do
1604 anything if the event target is a URL and the Alt/Option key is
1605 pressed -- in this case we want to follow the link.
1606 (WebInspector.DOMNodeTreeElement._updateTitle): Call
1607 _makeURLsActivateOnClick again since the anchor elements have all been
1609 * page/inspector/inspector.js:
1610 (WebInspector.documentClick): If the anchor as a followOnAltClick
1611 property and the Alt/Option key is not pressed, do nothing.
1613 2008-03-12 Ada Chan <adachan@apple.com>
1615 Fixed the initial value of zoom factor.
1620 (WebCore::FramePrivate::FramePrivate):
1622 2008-03-12 David Hyatt <hyatt@apple.com>
1624 Make full page zoom vaguely work. This patch uses the CSS transform system to turn on full page zoom at the
1625 document level. There are many many bugs that I'm going to file to track all the issues (most of the issues
1626 are just bugs with transforms themselves).
1628 Reviewed by Adam Roben
1630 * css/CSSStyleSelector.cpp:
1631 (WebCore::CSSStyleSelector::applyProperty):
1632 (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1634 (WebCore::Document::recalcStyle):
1636 (WebCore::Frame::shouldApplyTextZoom):
1637 (WebCore::Frame::shouldApplyPageZoom):
1639 * rendering/RenderLayer.cpp:
1640 (WebCore::RenderLayer::updateLayerPositions):
1641 (WebCore::RenderLayer::setHasVisibleContent):
1642 (WebCore::RenderLayer::paintLayer):
1643 (WebCore::RenderLayer::hitTestLayer):
1644 * rendering/RenderLayer.h:
1646 2008-03-12 David Hyatt <hyatt@apple.com>
1648 Make the zoom factor a float and not a percent.
1653 * css/CSSStyleSelector.cpp:
1654 (WebCore::CSSStyleSelector::applyProperty):
1655 (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
1657 (WebCore::Frame::zoomFactor):
1658 (WebCore::Frame::setZoomFactor):
1660 * page/FramePrivate.h:
1661 * svg/SVGSVGElement.cpp:
1662 (WebCore::SVGSVGElement::currentScale):
1663 (WebCore::SVGSVGElement::setCurrentScale):
1665 2008-03-12 David Hyatt <hyatt@apple.com>
1667 Eliminate setTextMultiplier from the bridge. Make Webkit just call setZoomFactor on the frame directly.
1672 * page/mac/WebCoreFrameBridge.h:
1673 * page/mac/WebCoreFrameBridge.mm:
1675 2008-03-12 Dan Bernstein <mitz@apple.com>
1677 Reviewed by Darin Adler and Sam Weinig.
1679 - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
1681 Use CTFontCopyGraphicsFont and CTFontGetPlatformFont on Leopard instead
1682 of wkGetCGFontFromNSFont and wkGetNSFontATSUFontId, relying on NSFont
1683 and CTFontRef being toll-free bridged.
1685 * WebCore.Tiger.exp:
1687 * platform/graphics/mac/FontMac.mm:
1688 (WebCore::Font::drawGlyphs): Changed to use the cgFont() accessor.
1689 * platform/graphics/mac/FontPlatformData.h:
1690 Made m_cgFont a RetainPtr on Leopard.
1691 (WebCore::toCTFontRef): Added a function that encapsulates the
1693 (WebCore::FontPlatformData::FontPlatformData):
1694 (WebCore::FontPlatformData::cgFont): Added this accessor method.
1695 * platform/graphics/mac/FontPlatformDataMac.mm:
1696 (WebCore::FontPlatformData::FontPlatformData): Changed to use
1697 CoreText API on Leopard.
1698 (WebCore::FontPlatformData::setFont): Ditto.
1699 * platform/graphics/mac/SimpleFontDataMac.mm:
1700 (WebCore::initFontData):
1701 (WebCore::pathFromFont):
1702 (WebCore::SimpleFontData::platformInit):
1703 (WebCore::SimpleFontData::platformWidthForGlyph):
1704 * platform/mac/WebCoreSystemInterface.mm:
1706 2008-03-12 David Harrison <harrison@apple.com>
1710 <rdar://problem/5607382> CrashTracer: [REGRESSION] 2290 crashes in Safari at com.apple.WebCore: -[WebCoreAXObject isWebArea] + 8
1712 The problem was that we lost track of the AX cache for a subframe when Frame::disconnectOwnerElement() was
1713 called, so we were unable to locate the AXObjects to de-register from AppKit's accessibility registry.
1714 Also saw that cache clearing was missing from Document::detach(), and fixed that.
1716 Also added a debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
1718 Lastly, RenderWidget::destroy() now skips trying to remove the AXObject if accessibility has never been enabled.
1721 (WebCore::Document::attach):
1722 Assert that there is no AX cache (since there is no renderer).
1724 (WebCore::Document::detach):
1725 Destroy the AX cache installed on this document.
1727 (WebCore::Document::clearAXObjectCache):
1728 New. Destroy the AX cache associated with this document.
1730 (WebCore::Document::axObjectCache):
1731 Added some comments.
1734 Declare clearAXObjectCache().
1737 (WebCore::Frame::disconnectOwnerElement):
1738 Destroy the AX cache associated with this frame's document.
1740 * page/mac/AXObjectCacheMac.mm:
1741 (WebCore::AXObjectCache::remove):
1742 * page/mac/WebCoreAXObject.mm:
1743 (-[WebCoreAXObject initWithRenderer:]):
1744 (-[WebCoreAXObject detach]):
1745 * rendering/RenderObject.cpp:
1746 (WebCore::RenderObject::RenderObject):
1747 (WebCore::RenderObject::~RenderObject):
1748 * rendering/RenderObject.h:
1749 (WebCore::RenderObject::setHasAXObject):
1750 (WebCore::RenderObject::hasAXObject):
1751 Add debug-only check that AXObjectCache::remove() not finding the AXObject is expected.
1753 * rendering/RenderWidget.cpp:
1754 (WebCore::RenderWidget::destroy):
1755 Skip call to remove the AXObject if accessibility has never been enabled. A simple speed optimization in the
1756 very common case that the accessibility APIs are not being used. Same as in RenderObject::destroy().
1758 2008-03-12 Xan Lopez <xan@gnome.org>
1760 Reviewed by Alp Toker.
1762 http://bugs.webkit.org/show_bug.cgi?id=15229
1764 Add Pango font backend.
1766 Original patch by Sven Herzberg <sven@imendio.com>
1769 * platform/graphics/gtk/FontCacheGtk.cpp:
1770 (WebCore::FontCache::fontExists):
1771 * platform/graphics/gtk/FontCustomPlatformDataPango.cpp: Added.
1772 (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1773 (WebCore::FontCustomPlatformData::fontPlatformData):
1774 (WebCore::releaseData):
1775 (WebCore::createFontCustomPlatformData):
1776 * platform/graphics/gtk/FontPlatformData.h:
1777 (WebCore::FontPlatformData::FontPlatformData):
1778 (WebCore::FontPlatformData::hash):
1779 * platform/graphics/gtk/FontPlatformDataPango.cpp: Added.
1780 (WebCore::FontPlatformData::FontPlatformData):
1781 (WebCore::FontPlatformData::init):
1782 (WebCore::FontPlatformData::~FontPlatformData):
1783 (WebCore::FontPlatformData::isFixedPitch):
1784 (WebCore::FontPlatformData::setFont):
1785 (WebCore::FontPlatformData::operator==):
1786 * platform/graphics/gtk/GlyphPageTreeNodePango.cpp: Added.
1787 (WebCore::pango_font_get_glyph):
1788 (WebCore::GlyphPage::fill):
1789 * platform/graphics/gtk/SimpleFontDataPango.cpp: Added.
1790 (WebCore::SimpleFontData::platformInit):
1791 (WebCore::SimpleFontData::platformDestroy):
1792 (WebCore::SimpleFontData::smallCapsFontData):
1793 (WebCore::SimpleFontData::containsCharacters):
1794 (WebCore::SimpleFontData::determinePitch):
1795 (WebCore::SimpleFontData::platformWidthForGlyph):
1796 (WebCore::SimpleFontData::setFont):
1798 2008-03-12 Justin Garcia <justin.garcia@apple.com>
1802 <rdar://problem/5770834> Crash at InsertTextCommand::prepareForTextInsertion() doing RemoveFormat in a certain list
1804 Fixes some (but not all) of the instances of:
1805 <rdar://problem/5659795> CrashTracer: [REGRESSION] 187 crashes in Safari at com.apple.WebCore: WebCore::InsertTextCommand::prepareForTextInsertion + 241
1806 <rdar://problem/5779631> CrashTracer: [USER] 25 crashes in Mail at WebCore::InsertTextCommand::prepareForTextInsertion
1808 * editing/InsertLineBreakCommand.cpp:
1809 (WebCore::InsertLineBreakCommand::doApply): applyStyle may have destroyed content that held
1810 the old endingSelection(), so we must recompute it. Added a FIXME. Added a few comments.
1811 * editing/RemoveFormatCommand.cpp:
1812 (WebCore::RemoveFormatCommand::doApply): Added a FIXME.
1814 2008-03-11 Alexey Proskuryakov <ap@webkit.org>
1818 <rdar://problem/5640615> REGRESSION (Safari 2-3): Changing subframe encoding rules broke
1821 Other browsers' behavior keeps changing; let's implement what Firefox and Opera do now:
1822 if the frame and subframe belong to the same site, then the encoding is inherited from parent
1823 frame to subframe. Otherwise, it is not.
1825 Always inheriting the encoding would cause a security problem.
1827 Tests: http/tests/misc/frame-default-enc-different-domain.html
1828 http/tests/misc/frame-default-enc-same-domain.html
1829 fast/encoding/frame-default-enc.html
1831 * loader/FrameLoader.cpp:
1832 (WebCore::FrameLoader::write): Also removed a check for m_frame->document() being non-null -
1833 this function also has code that uses it without checking, so it must be safe.
1835 2008-03-12 Mark Rowe <mrowe@apple.com>
1839 * page/Frame.h: Forward-declare FramePrivate.
1841 2008-03-11 Steve Falkenburg <sfalken@apple.com>
1843 Disable LTCG/PGO for all of WebCore for now.
1844 We'll re-enable this as part of follow-on PGO work.
1848 * WebCore.vcproj/WebCore.vcproj:
1850 2008-03-11 Darin Adler <darin@apple.com>
1854 - remove all bridge-related things from WebCore except the bridge itself
1856 * WebCore.base.exp: Removed the bridge and setBridge functions.
1858 * loader/FrameLoader.cpp:
1859 (WebCore::FrameLoader::detachFromParent): Removed call to the bridge's
1863 (WebCore::Frame::~Frame): Removed call to setBridge(0).
1864 (WebCore::FramePrivate::FramePrivate): Removed initialization of m_bridge.
1865 * page/Frame.h: Removed setBridge and bridge functions.
1866 * page/FramePrivate.h: Removed m_bridge pointer.
1867 * page/mac/FrameMac.mm: Removed setBridge and bridge functions.
1869 * page/mac/WebCoreFrameBridge.h: Added setWebCoreFrame: method.
1870 Removed bridgeForDOMDocument: and clearFrame methods.
1871 * page/mac/WebCoreFrameBridge.mm: Ditto.
1872 (-[WebCoreFrameBridge close]): Changed to set m_frame to 0 directly.
1873 (-[WebCoreFrameBridge setWebCoreFrame:]): Added.
1875 2008-03-11 Darin Adler <darin@apple.com>
1877 - restored some code I removed in the Range change; this code can't go
1878 until the rest of the Range fix is in
1881 (WebCore::Range::commonAncestorContainer): Added back the check for 0
1882 that I removed erroneously in the Range patch.
1883 (WebCore::Range::processContents): Left in assertions I used to debug
1886 2008-03-11 Darin Adler <darin@apple.com>
1890 * platform/mac/ScrollViewMac.mm:
1891 (WebCore::ScrollView::setContentsPos): Don't use NSMakePoint.
1893 2008-03-11 Darin Adler <darin@apple.com>
1897 - simplify Mac code for ScrollView, since it's used only for FrameView
1898 and not in two different modes like it was historically
1899 - remove code depending on the bridge to get from an NSView to a WebCore::Frame
1901 * bindings/objc/DOMHTML.mm:
1902 (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView.
1904 * bridge/jni/jni_jsobject.cpp:
1905 (createRootObject): Instead of using WebCoreViewFactory to find the frame given
1906 and NSView, use the WebCoreFrameView interface to do it.
1908 * editing/mac/EditorMac.mm:
1909 (WebCore::Editor::paste): getDocumentView -> documentView.
1910 * editing/mac/SelectionControllerMac.mm:
1911 (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto.
1913 * page/FrameView.h: Fixed comment.
1915 * page/InspectorController.cpp:
1916 (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts
1917 to ScrollView* since FrameView is derived from ScrollView.
1919 * page/mac/EventHandlerMac.mm:
1920 (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView.
1921 * page/mac/FrameMac.mm:
1922 (WebCore::Frame::imageFromRect): Ditto.
1923 * page/mac/WebCoreAXObject.mm:
1924 (-[WebCoreAXObject position]): Ditto.
1925 (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
1926 (-[WebCoreAXObject rendererForView:]): Updated code that used to use
1927 WebCoreBridgeHolder to use WebCoreFrameView instead.
1929 * page/mac/WebCoreFrameBridge.mm:
1930 (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
1931 getDocumentView -> documentView.
1933 * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just
1934 use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to
1935 WebCoreFrameScrollView, since it's a protocol for the scroll view, not the
1936 frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView
1937 protocol, which returns a WebCore::Frame directly rather than a bridge.
1939 * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method.
1941 * platform/ScrollView.h: Moved the constructor and destructor out of the
1942 class-specific #if blocks. Renamed Mac-specific function that gets the
1943 NSView for from getDocumentView to documentView and a scrollView function
1944 that returns an appropriately classed NSScrollView.
1946 * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView
1948 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1949 (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast.
1951 * platform/mac/PopupMenuMac.mm:
1952 (WebCore::PopupMenu::show): getDocumentView -> documentView.
1953 * platform/mac/ScrollViewMac.mm:
1954 (WebCore::ScrollView::ScrollView): Added.
1955 (WebCore::ScrollView::~ScrollView): Added.
1956 (WebCore::ScrollView::scrollView): Added.
1957 (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case.
1958 (WebCore::ScrollView::visibleHeight): Ditto.
1959 (WebCore::ScrollView::visibleContentRect): Ditto.
1960 (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto.
1961 (WebCore::ScrollView::contentsWidth): Ditto.
1962 (WebCore::ScrollView::contentsHeight): Ditto.
1963 (WebCore::ScrollView::contentsX): Ditto.
1964 (WebCore::ScrollView::contentsY): Ditto.
1965 (WebCore::ScrollView::scrollOffset): Ditto.
1966 (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto.
1967 (WebCore::ScrollView::setContentsPos): Ditto.
1968 (WebCore::ScrollView::setVScrollbarMode): Ditto.
1969 (WebCore::ScrollView::setHScrollbarMode): Ditto.
1970 (WebCore::ScrollView::setScrollbarsMode): Ditto.
1971 (WebCore::ScrollView::vScrollbarMode): Ditto.
1972 (WebCore::ScrollView::hScrollbarMode): Ditto.
1973 (WebCore::ScrollView::suppressScrollbars): Ditto.
1974 (WebCore::ScrollView::addChild): Ditto.
1975 (WebCore::ScrollView::resizeContents): Ditto.
1976 (WebCore::ScrollView::updateContents): Ditto.
1977 (WebCore::ScrollView::contentsToWindow): Ditto.
1978 (WebCore::ScrollView::windowToContents): Ditto.
1979 (WebCore::ScrollView::setStaticBackground): Ditto.
1980 (WebCore::ScrollView::documentView): Renamed and removed unused case.
1981 (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment.
1983 * platform/mac/WidgetMac.mm:
1984 (WebCore::Widget::getOuterView): Update for protocol name change.
1986 * rendering/RenderThemeMac.mm:
1987 (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView.
1988 (WebCore::RenderThemeMac::paintRadio): Ditto.
1989 (WebCore::RenderThemeMac::paintButton): Ditto.
1990 (WebCore::RenderThemeMac::paintMenuList): Ditto.
1991 (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
1992 (WebCore::RenderThemeMac::paintSearchField): Ditto.
1993 (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto.
1994 (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto.
1995 (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto.
1997 2008-03-11 Brent Fulgham <bfulgham@gmail.com>
1999 Reviewed by Adam Roben.
2001 Split CookieJarWin.cpp into CFNet and non-CFNet versions to
2002 reduce the massive amount of conditionalization in the file.
2003 (see http://bugs.webkit.org/show_bug.cgi?id=17788)
2005 * WebCore.vcproj/WebCore.vcproj:
2006 * platform/network/win/CookieJarCFNetWin.cpp: Copied from WebCore/platform/network/win/CookieJarWin.cpp.
2007 (WebCore::setCookies):
2009 (WebCore::cookiesEnabled):
2010 * platform/network/win/CookieJarWin.cpp:
2011 (WebCore::setCookies):
2013 (WebCore::cookiesEnabled):
2015 2008-03-11 Darin Adler <darin@apple.com>
2019 - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
2021 * page/ChromeClient.h: Added new client functions to replace calls up to WebKit
2022 that were formerly handled by the bridge.
2024 * page/Frame.h: Removed unneeded declarations. Moved declarations of script-specific
2025 functions to a ScriptController section. Removed willPopupMenu.
2027 * page/mac/ChromeMac.mm:
2028 (WebCore::Chrome::focusNSView): Changed to call firstResponder and makeFirstResponder
2029 via the client instead of the bridge.
2031 * page/mac/EventHandlerMac.mm:
2032 (WebCore::EventHandler::passMouseDownEventToWidget): Changed to call firstResponder
2033 and makeFirstResponder via the chrome client instead of the bridge.
2035 * page/mac/FrameMac.mm: Removed willPopupMenu.
2037 * page/mac/WebCoreFrameBridge.h: Removed WebCoreFrameBridge protocol and
2038 SubclassResponsibility category. Also removed some unneeded imports.
2040 * platform/mac/PopupMenuMac.mm:
2041 (WebCore::PopupMenu::show): Call willPopUpMenu on chrome client instead of frame.
2043 * platform/mac/WidgetMac.mm:
2044 (WebCore::Widget::setIsSelected): Call functions directly on the view rather than
2045 calling via the bridge.
2047 2008-03-11 Darin Adler <darin@apple.com>
2051 - make some Range improvements (preparation for Range support for DOM mutation)
2053 Made constructors private, added create functions.
2054 Made refcount start at 1 rather than starting at 0 and being incremented.
2055 Made Range use two Position objects for the start/end container/offset pairs.
2057 * WebCore.base.exp: Updated.
2060 (WebCore::Document::createRange): Changed to use Range::create.
2061 (WebCore::Document::removeMarkers): Updated for Range::first/pastLastNode name change.
2064 (WebCore::Position::formatForDebugger): Updated for member variable name change.
2065 (WebCore::Position::showTreeForThis): Ditto.
2066 (WebCore::startPosition): Changed to use Range::startPosition.
2067 (WebCore::endPosition): Changed to use Range::endPosition.
2069 * dom/Position.h: Made the data members public and renamed them to container
2070 and offset. But since offset() is already a function, temporarily used posOffset
2071 for the data member. Later we'll get rid of offset(). Made more functions inline.
2072 Removed the constructor that takes a PositionIterator.
2074 * dom/PositionIterator.cpp:
2075 (WebCore::PositionIterator::operator Position): Added. Replaces the constructor
2076 that used to be in Position.
2077 * dom/PositionIterator.h: Added conversion operator to produce a Position.
2078 Removed friend declaration for Position.
2081 (WebCore::Range::Range): Updated constructors for data member changes and made
2082 them use a refcount of 1.
2083 (WebCore::Range::create): Added.
2084 (WebCore::Range::startContainer): Updated to eliminate use of m_detached; detached
2085 is now indicated by m_start.container of 0. Also updated to use m_start instead
2086 of the old m_startContainer.
2087 (WebCore::Range::startOffset): Ditto.
2088 (WebCore::Range::endContainer): Ditto.
2089 (WebCore::Range::endOffset): Ditto.
2090 (WebCore::Range::commonAncestorContainer): Ditto.
2091 (WebCore::Range::collapsed): Ditto.
2092 (WebCore::Range::setStart): Ditto.
2093 (WebCore::Range::setEnd): Ditto.
2094 (WebCore::Range::collapse): Ditto.
2095 (WebCore::Range::isPointInRange): Ditto.
2096 (WebCore::Range::comparePoint): Ditto.
2097 (WebCore::Range::compareNode): Ditto.
2098 (WebCore::Range::compareBoundaryPoints): Ditto.
2099 (WebCore::Range::boundaryPointsValid): Ditto.
2100 (WebCore::Range::deleteContents): Ditto.
2101 (WebCore::Range::intersectsNode): Ditto.
2102 (WebCore::Range::processContents): Ditto.
2103 (WebCore::Range::extractContents): Ditto.
2104 (WebCore::Range::cloneContents): Ditto.
2105 (WebCore::Range::insertNode): Ditto.
2106 (WebCore::Range::toString): Ditto.
2107 (WebCore::Range::text): Ditto.
2108 (WebCore::Range::createContextualFragment): Ditto.
2109 (WebCore::Range::detach): Ditto.
2110 (WebCore::Range::checkNodeBA): Changed to use switch statements instead of
2111 multiple calls to the virtual nodeType() function.
2112 (WebCore::Range::cloneRange): Ditto.
2113 (WebCore::Range::setStartAfter): Ditto.
2114 (WebCore::Range::setEndBefore): Ditto.
2115 (WebCore::Range::setEndAfter): Ditto.
2116 (WebCore::Range::selectNode): Ditto.
2117 (WebCore::Range::selectNodeContents): Ditto.
2118 (WebCore::Range::surroundContents): Ditto.
2119 (WebCore::Range::setStartBefore): Ditto.
2120 (WebCore::Range::checkDeleteExtract): Ditto.
2121 (WebCore::Range::containedByReadOnly): Ditto.
2122 (WebCore::Range::firstNode): Ditto.
2123 (WebCore::Range::editingStartPosition): Ditto.
2124 (WebCore::Range::pastLastNode): Ditto.
2125 (WebCore::Range::addLineBoxRects): Ditto.
2126 (WebCore::Range::formatForDebugger): Ditto.
2127 (WebCore::operator==): Ditto.
2128 (WebCore::rangeOfContents): Ditto.
2129 (WebCore::Range::maxStartOffset): Ditto.
2130 (WebCore::Range::maxEndOffset): Ditto.
2132 * dom/Range.h: Made constructors private. Added create functions.
2133 Added getters for startContainer/Offset and endContainer/Offset that
2134 return 0 instead of an exception for detached ranges that are inline
2135 and don't require an ExceptionCode out parameter. Changed the parameters
2136 to setStart and setEnd to PassRefPtr. Removed isDetached function.
2137 Made ActionType and processContents private. Made startPosition and
2138 endPosition inlines and have then return const&. Renamed startNode and
2139 pastEndNode to firstNode and pastLastNode to reduce the chance of
2140 confusion with startContainer/endContainer. Used Position for m_start
2141 and m_end instead of separate container and offset members. Changed
2142 maxStartOffset and maxEndOffset into int to match other offsets.
2144 * editing/ApplyStyleCommand.cpp:
2145 (WebCore::ApplyStyleCommand::applyBlockStyle): Changed to use Range::create.
2146 (WebCore::ApplyStyleCommand::applyInlineStyle): Ditto.
2147 * editing/CompositeEditCommand.cpp:
2148 (WebCore::CompositeEditCommand::inputText): Ditto.
2149 (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
2150 * editing/DeleteSelectionCommand.cpp:
2151 (WebCore::DeleteSelectionCommand::mergeParagraphs): Ditto.
2152 * editing/Editor.cpp:
2153 (WebCore::Editor::fontForSelection): Changed for pastLastNode name change.
2154 (WebCore::Editor::setComposition): Changed to use Range::create.
2155 (WebCore::paragraphAlignedRangeForRange): Ditto.
2156 (WebCore::markMisspellingsOrBadGrammar): Changed to get rid of check for
2157 isDetached and check for 0 from startContainer instead.
2158 (WebCore::Editor::compositionRange): Changed to use Range::create.
2159 * editing/EditorCommand.cpp:
2160 (WebCore::unionDOMRanges): Ditto.
2161 * editing/Selection.cpp:
2162 (WebCore::Selection::toRange): Ditto.
2163 * editing/TextIterator.cpp:
2164 (WebCore::TextIterator::TextIterator): Changed for firstNode and pastLastNode
2166 (WebCore::TextIterator::range): Changed to use Range::create.
2167 (WebCore::SimplifiedBackwardsTextIterator::range): Ditto.
2168 (WebCore::TextIterator::subrange): Ditto.
2169 * editing/VisiblePosition.cpp:
2170 (WebCore::makeRange): Ditto.
2171 * editing/VisiblePosition.h: Added now-needed include.
2172 * editing/htmlediting.cpp:
2173 (WebCore::indexForVisiblePosition): Changed to use Range::create.
2174 (WebCore::avoidIntersectionWithNode): Changed to get rid of check for
2175 isDetached and check for 0 instead and to use Range::create.
2176 * editing/markup.cpp:
2177 (WebCore::renderedText): Changed to use Range::create.
2178 (WebCore::createMarkup): Changed to no longer use isDetached and also
2179 for new firstNode/pastEndNode names.
2180 (WebCore::createFragmentFromText): Ditto.
2181 * editing/visible_units.cpp:
2182 (WebCore::previousBoundary): Changed to use Range::create.
2183 * page/mac/WebCoreFrameBridge.mm:
2184 (-[WebCoreFrameBridge convertToNSRange:]): Changed to no longer use
2186 * rendering/RenderTextControl.cpp:
2187 (WebCore::RenderTextControl::visiblePositionForIndex): Changed to use Range::create.
2188 (WebCore::RenderTextControl::indexForVisiblePosition): Ditto.
2190 2008-03-11 Daniel Zucker <zucker@wake3.com>
2192 Reviewed by Adam Roben.
2194 There are a handful of placed where the use of CFNetwork-specific
2195 calls are protected by PLATFORM(CF). Revise to use the more specific
2196 USE(CFNETWORK) macro. (See http://bugs.webkit.org/show_bug.cgi?id=17783)
2198 * platform/network/ProtectionSpace.cpp: Change PLATFORM(CF) to USE(CFNETWORK)
2199 * platform/network/ResourceHandle.cpp: Change PLATFORM(CF) to USE(CFNETWORK)
2200 * platform/network/win/CookieJarWin.cpp: Correct error in
2201 InternetGetCookie call. Conditionalize 'cookiesEnabled' the same
2202 as all other implementations in this file.
2204 2008-03-11 Xan Lopez <xan@gnome.org>
2206 Reviewed by Alp Toker.
2208 http://bugs.webkit.org/show_bug.cgi?id=16476
2210 Add libsoup HTTP backend.
2213 * platform/network/ResourceHandleInternal.h:
2214 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2215 * platform/network/soup/AuthenticationChallenge.h: Added.
2216 (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2217 * platform/network/soup/ResourceError.h: Added.
2218 (WebCore::ResourceError::ResourceError):
2219 * platform/network/soup/ResourceHandleSoup.cpp: Added.
2220 (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2221 (WebCore::ResourceHandle::~ResourceHandle):
2222 (WebCore::dataCallback):
2223 (WebCore::parseDataUrl):
2224 (WebCore::ResourceHandle::start):
2225 (WebCore::ResourceHandle::cancel):
2226 (WebCore::ResourceHandle::bufferedData):
2227 (WebCore::ResourceHandle::supportsBufferedData):
2228 (WebCore::ResourceHandle::setDefersLoading):
2229 (WebCore::ResourceHandle::loadsBlocked):
2230 (WebCore::ResourceHandle::willLoadFromCache):
2231 * platform/network/soup/ResourceRequest.h: Copied from WebCore/platform/network/curl/ResourceRequest.h.
2232 (WebCore::ResourceRequest::ResourceRequest):
2233 (WebCore::ResourceRequest::doUpdatePlatformRequest):
2234 * platform/network/soup/ResourceResponse.h: Added.
2235 (WebCore::ResourceResponse::ResourceResponse):
2236 (WebCore::ResourceResponse::setResponseFired):
2237 (WebCore::ResourceResponse::responseFired):
2238 (WebCore::ResourceResponse::doUpdateResourceResponse):
2240 2008-03-11 Rodney Dawes <dobey@wayofthemonkey.com>
2244 * plugins/qt/PluginDataQt.cpp:
2245 (PluginData::initPlugins)
2247 2008-03-11 Adam Roben <aroben@apple.com>
2249 Make attribute quoting in DOM view more consistent with source view
2251 Two changes which make the DOM view more consistent with source view:
2252 1) We now quote all attribute values, including URLs
2253 2) The quotes around the values are now purple, matching the left and
2254 right angle brackets that surround the tag
2256 One bug fixed by these changes:
2257 1) The entire URL is selected for editing when you double-click a URL
2258 that is an attribute value. Previously, the first and last
2259 characters were not included in the selection.
2263 * page/inspector/DocumentPanel.js:
2264 (WebInspector.DOMNodeTreeElement._startEditingAttribute): Don't need
2265 to account for the quotes around attribute values anymore because the
2266 quotes are now outside the webkit-html-attribute-value span.
2267 * page/inspector/utilities.js:
2268 (nodeTitleInfo): Quote all attribute values, including URLs, and place
2269 the quotes outside the webkit-html-attribute-value span.
2271 2008-03-11 Adam Roben <aroben@apple.com>
2273 Stop including pthread.h in WebCore on Windows
2277 * WebCore.vcproj/WebCore.vcproj:
2278 - Changed the include path to not contain pthreads/
2279 - Let VS remove a duplicate FileConfiguration element
2280 - Let VS have its way with the file ordering
2281 * WebCorePrefix.h: Made the #include of pthread.h be compiled out on
2283 * loader/FTPDirectoryDocument.cpp: Added a Windows-specific #define of
2284 localtime_r (pthread.h was providing a macro that substituted plain
2285 old localtime before, but localtime_s is "more secure", so I went with
2287 * loader/FTPDirectoryParser.cpp: Ditto for gmtime_r.
2289 2008-03-11 Adam Roben <aroben@apple.com>
2291 Roll out r30961 since it broke the default site icon on Windows
2293 * loader/icon/IconDatabase.cpp:
2294 (WebCore::IconDatabase::defaultIcon):
2296 2008-03-11 Dan Bernstein <mitz@apple.com>
2298 Reviewed by Darin Adler.
2300 - clean up line layout code
2302 * platform/graphics/GraphicsContext.cpp:
2303 (WebCore::TextRunIterator::increment): Removed the resolver parameter.
2304 (WebCore::GraphicsContext::drawBidiText): Adjusted for changes to
2305 createBidiRunsForLine(), which no longer takes a start parameter.
2306 * platform/text/BidiResolver.h:
2307 (WebCore::BidiResolver::): Made Noncopyable and removed the
2308 m_adjustEmbedding member variable.
2309 (WebCore::BidiResolver::position): Added. Returns the resolver's current
2311 (WebCore::BidiResolver::setPosition): Added. Sets the resolver's current
2312 position without changing any other state.
2313 (WebCore::BidiResolver::increment): Added. Advances the resolver to the
2314 next position, allowing the iterator to push and pop embedding.
2315 (WebCore::BidiResolver::appendRun): Removed the resolver parameter in
2316 the call to increment().
2317 (WebCore::BidiResolver::embed): Removed code to save, set and restore
2319 (WebCore::BidiResolver::createBidiRunsForLine): Changed to not take a
2320 'start' iterator. Instead, start at the current position. Removed code
2321 to set m_adjustEmbedding. Changed for noncopyability.
2322 * rendering/RenderBlock.h:
2323 * rendering/bidi.cpp:
2324 (WebCore::bidiNext): Made the resolver parameter optional. Changed to
2325 null-check the 'end of inline' pointer only twice.
2326 (WebCore::bidiFirst): Made the resolver parameter optional.
2327 (WebCore::BidiIterator::increment): Ditto.
2328 (WebCore::BidiState::increment): Added. Overrides the default
2329 BidiResolver::increment() method by passing the resolver to
2330 BidiIterator::increment().
2331 (WebCore::checkMidpoints): Removed the resolver parameter.
2332 (WebCore::BidiState::appendRun): Removed code to save, set and restore
2333 m_adjustEmbedding. Adjusted for change to increment().
2334 (WebCore::RenderBlock::bidiReorderLine): Removed the 'start' parameter
2335 and unreachable code.
2336 (WebCore::buildCompactRuns): Adjusted for changes to BidiResolver/
2337 (WebCore::RenderBlock::layoutInlineChildren): Moved code to initialize
2338 the resolver from this method to determineStartPosition(). Unified the
2339 resolver with the 'start' iterator. Removed unreachable code. Moved one
2340 statement from the beginning of the while loop to the end.
2341 (WebCore::RenderBlock::determineStartPosition): Moved code to initialize
2342 the resolver from layoutInlineChildren() into this method.
2343 (WebCore::RenderBlock::matchedEndLine): Adjusted for the resolver and
2344 the 'start' iterator being one object.
2345 (WebCore::skipNonBreakingSpace): Made the parameter const.
2346 (WebCore::requiresLineBox): Ditto.
2347 (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Adjusted for
2348 the change to BidiIterator::increment().
2349 (WebCore::RenderBlock::skipWhitespace): Made two versions of this
2350 method, one for BidiIterator and one for BidiState.
2351 (WebCore::shouldSkipWhitespaceAfterStartObject): Removed the resolver
2353 (WebCore::RenderBlock::findNextLineBreak): Removed the resolver
2354 parameter. Removed calls to setAdjustEmbedding(). Removed the 'previous'
2355 variable and changed the 'last' variable to do its job.
2358 2008-03-10 Adam Roben <aroben@apple.com>
2360 Part of Bug 17224: DOM nodes/attributes should be editable
2362 <http://bugs.webkit.org/show_bug.cgi?id=17224>
2363 <rdar://problem/5732825>
2365 This patch makes text nodes editable via double-click.
2369 * page/inspector/DocumentPanel.js:
2370 (WebInspector.DOMNodeTreeElement._startEditing):
2371 - Moved most of this code to _startEditingAttribute
2372 - Calls _startEditingTextNode or _startEditingAttribute as
2374 (WebInspector.DOMNodeTreeElement._startEditingAttribute): Added. Code
2375 came from _startEditing.
2376 (WebInspector.DOMNodeTreeElement._startEditingTextNode): Added.
2377 (WebInspector.DOMNodeTreeElement._textNodeEditingCommitted): Added.
2378 (WebInspector.DOMNodeTreeElement._editingCancelled): Renamed from
2379 _attributeEditingCancelled.
2380 * page/inspector/utilities.js:
2381 (nodeTitleInfo): Wrap text nodes in a webkit-html-text-node span so
2382 that we can easily recognize/edit them.
2384 2008-03-11 Holger Hans Peter Freyther <zecke@selfish.org>
2388 r25512 inlined the urlIcon to improve the startup time of Safari on Mac. Inlining is
2389 not suitable for platforms where this icon is themable. E.g. the Qt platform is allowing
2390 to theme this icon and the Gtk+ platform will probably end up with themable icons
2393 Remove dead code from the windows port and move the urlIcon from the windows
2394 directory to the Resource directory to be used by Qt and other ports.
2396 Ifdef the usage of the built-in icon in IconDatabase.cpp and for Qt do not use
2397 it. Gtk+ currently has no proper implementation of Image::loadPlatformResource but
2398 once it does it wants to use this for getting the urlIcon as well.
2400 * Resources/urlIcon.png: Renamed from WebKit/win/WebKit.vcproj/urlIcon.png.
2401 * loader/icon/IconDatabase.cpp:
2402 (WebCore::IconDatabase::defaultIcon):
2404 2008-03-11 Tor Arne Vestbø <tavestbo@trolltech.com>
2408 Implemented HTML media element support for QtWebKit, using Phonon.
2410 http://bugs.webkit.org/show_bug.cgi?id=17766
2413 * platform/graphics/MediaPlayer.cpp:
2414 * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: Added.
2416 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2417 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2418 (WebCore::MediaPlayerPrivate::getSupportedTypes):
2419 (WebCore::MediaPlayerPrivate::hasVideo):
2420 (WebCore::MediaPlayerPrivate::load):
2421 (WebCore::MediaPlayerPrivate::cancelLoad):
2422 (WebCore::MediaPlayerPrivate::play):
2423 (WebCore::MediaPlayerPrivate::pause):
2424 (WebCore::MediaPlayerPrivate::paused):
2425 (WebCore::MediaPlayerPrivate::seek):
2426 (WebCore::MediaPlayerPrivate::seeking):
2427 (WebCore::MediaPlayerPrivate::duration):
2428 (WebCore::MediaPlayerPrivate::currentTime):
2429 (WebCore::MediaPlayerPrivate::setEndTime):
2430 (WebCore::MediaPlayerPrivate::maxTimeBuffered):
2431 (WebCore::MediaPlayerPrivate::maxTimeSeekable):
2432 (WebCore::MediaPlayerPrivate::bytesLoaded):
2433 (WebCore::MediaPlayerPrivate::totalBytesKnown):
2434 (WebCore::MediaPlayerPrivate::totalBytes):
2435 (WebCore::MediaPlayerPrivate::setRate):
2436 (WebCore::MediaPlayerPrivate::setVolume):
2437 (WebCore::MediaPlayerPrivate::setMuted):
2438 (WebCore::MediaPlayerPrivate::dataRate):
2439 (WebCore::MediaPlayerPrivate::networkState):
2440 (WebCore::MediaPlayerPrivate::readyState):
2441 (WebCore::MediaPlayerPrivate::updateStates):
2442 (WebCore::MediaPlayerPrivate::setVisible):
2443 (WebCore::MediaPlayerPrivate::setRect):
2444 (WebCore::MediaPlayerPrivate::loadStateChanged):
2445 (WebCore::MediaPlayerPrivate::rateChanged):
2446 (WebCore::MediaPlayerPrivate::sizeChanged):
2447 (WebCore::MediaPlayerPrivate::timeChanged):
2448 (WebCore::MediaPlayerPrivate::volumeChanged):
2449 (WebCore::MediaPlayerPrivate::didEnd):
2450 (WebCore::MediaPlayerPrivate::loadingFailed):
2451 (WebCore::MediaPlayerPrivate::naturalSize):
2452 (WebCore::MediaPlayerPrivate::eventFilter):
2453 (WebCore::MediaPlayerPrivate::repaint):
2454 (WebCore::MediaPlayerPrivate::paint):
2455 (WebCore::MediaPlayerPrivate::stateChanged):
2456 (WebCore::MediaPlayerPrivate::tick):
2457 (WebCore::MediaPlayerPrivate::metaDataChanged):
2458 (WebCore::MediaPlayerPrivate::seekableChanged):
2459 (WebCore::MediaPlayerPrivate::hasVideoChanged):
2460 (WebCore::MediaPlayerPrivate::bufferStatus):
2461 (WebCore::MediaPlayerPrivate::finished):
2462 (WebCore::MediaPlayerPrivate::currentSourceChanged):
2463 (WebCore::MediaPlayerPrivate::aboutToFinish):
2464 (WebCore::MediaPlayerPrivate::prefinishMarkReached):
2465 (WebCore::MediaPlayerPrivate::totalTimeChanged):
2466 * platform/graphics/qt/MediaPlayerPrivatePhonon.h: Added.
2467 (WebCore::MediaPlayerPrivate::):
2468 (WebCore::MediaPlayerPrivate::isAvailable):
2470 2008-03-10 Sam Weinig <sam@webkit.org>
2472 Reviewed by Beth Dakin.
2474 Throw a SECURITY_ERR when accessing a tainted canvas
2475 by CanvasRenderingContext2D::getImageData() and
2476 HTMLCanvasElement::toDataURL().
2478 * html/CanvasRenderingContext2D.cpp:
2479 (WebCore::CanvasRenderingContext2D::getImageData):
2480 * html/CanvasRenderingContext2D.h:
2481 * html/CanvasRenderingContext2D.idl:
2482 * html/HTMLCanvasElement.cpp:
2483 (WebCore::HTMLCanvasElement::toDataURL):
2484 * html/HTMLCanvasElement.h:
2485 * html/HTMLCanvasElement.idl:
2487 2008-03-10 Justin Garcia <justin.garcia@apple.com>
2491 <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog
2493 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2494 (WebCore::hasCSSPropertyNamePrefix): Fixed a typo. The code was only
2495 comparing the first character of the prefix to the first character
2496 of the property name.
2498 2008-03-10 Andre Boule <aboule@apple.com>
2502 Hold off on initializing the frame to avoid the RenderView getting
2503 a null FrameView. This could potentially cause problems.
2505 * svg/graphics/SVGImage.cpp:
2506 (WebCore::SVGImage::dataChanged):
2508 2008-03-10 Darin Adler <darin@apple.com>
2510 - try to fix Qt build
2512 * bridge/qt/qt_runtime.cpp:
2513 (KJS::Bindings::convertQVariantToValue): Change KJS::UChar to UChar.
2515 2008-03-10 Darin Adler <darin@apple.com>
2519 - fix <rdar://problem/3059610> VIP: links opened in new frame, window, or tab
2520 should be redrawn as visited immediately
2521 - fix <rdar://problem/4382809> Going "back" a page doesn't change the color of
2522 the visited URL at directory.umi
2523 - fix http://bugs.webkit.org/show_bug.cgi?id=4941
2524 Visited links should be marked as visited
2525 - fix http://bugs.webkit.org/show_bug.cgi?id=7960
2526 REGRESSION: Visited link color doesn't displayed after loading page from cache
2528 We now mark all links on a page as "changed" at the appropriate times.
2530 * WebCore.base.exp: Update since I made completeURL be a const member function.
2532 * css/CSSStyleSelector.cpp: Got rid of some unneeded globals that could be turned
2533 into locals. Also changed some static data members to file-scoped globals with
2534 internal linkage. Renamed the globals to get rid of the m_ prefix. Changed the
2535 prefix on m_styleNotYetAvailable to s_styleNotYetAvailable.
2536 (WebCore::CSSStyleSelector::CSSStyleSelector): Updated for name changes.
2537 (WebCore::parseUASheet): Tweak the comment.
2538 (WebCore::CSSStyleSelector::loadDefaultStyle): Updated for name changes and to
2539 use local variables instead of globals where possible.
2540 (WebCore::CSSStyleSelector::checkPseudoState): Made this a member function so
2541 it can store the link in a hash. Also changed it to have a return value instead
2542 of having it modify a global variable. Added code to put the hash into a set so
2543 we can tell later if this is one of the links that affects this page.
2544 (WebCore::CSSStyleSelector::canShareStyleWithElement): Updated for the change to
2546 (WebCore::CSSStyleSelector::matchUARules): Updated for name changes.
2547 (WebCore::CSSStyleSelector::styleForElement): Ditto.
2548 (WebCore::CSSStyleSelector::adjustRenderStyle): Ditto.
2549 (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): Changed code to read
2550 the SVG style sheet to use a boolean global and put it right here in the function
2551 since this is the only code that needs to know about it.
2552 (WebCore::CSSStyleSelector::checkOneSelector): Updated for name changes.
2553 (WebCore::colorForCSSValue): Moved code inside the function that is not needed
2555 (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): Updaed for the change
2556 to checkPseudoState.
2557 (WebCore::CSSStyleSelector::allVisitedStateChanged): Added. Calls setChanged on
2558 all links if there were any in the set.
2559 (WebCore::CSSStyleSelector::visitedStateChanged): Added. Calls setChanged on all
2560 links if the one that changed is in the set.
2562 * css/CSSStyleSelector.h: Removed unused StyleSelector class and State enum. Made
2563 CSSStyleSelector derive from Noncopyable. Made lots of member functions private that
2564 didn't need to be public, and removed others that could be made into non-member
2565 functions. Changed pseudoStyleRulesForElement to take a const String& instead of
2566 a StringImpl*. Added new allVisitedStateChanged and visitedStateChanged functions.
2567 Got rid of unneeded friend declarations.
2570 (WebCore::Document::completeURL): Made const.
2571 (WebCore::findSlashDotDotSlash): Moved here from PageGroup.
2572 (WebCore::findSlashSlash): Ditto.
2573 (WebCore::findSlashDotSlash): Ditto.
2574 (WebCore::containsColonSlashSlash):
2575 (WebCore::cleanPath): Ditto.
2576 (WebCore::matchLetter): Ditto.
2577 (WebCore::needsTrailingSlash): Ditto.
2578 (WebCore::Document::visitedLinkHash): Moved this here from PageGroup. This is
2579 the poor-man's completeURL function. The idea of putting it here is that this
2580 way it can be alongside the real completeURL function. Later we should figure out
2581 a way to make this function share more code with the real thing and match behavior.
2583 * dom/Document.h: Marked completeURL function const. Added visitedLinkHash function.
2585 * page/DOMWindow.cpp:
2586 (WebCore::DOMWindow::getMatchedCSSRules): Updated for change to CSSStyleSelector.
2589 (WebCore::Page::allVisitedStateChanged): Added. Calls allVisitedStateChanged on all
2591 (WebCore::Page::visitedStateChanged): Ditto.
2592 * page/Page.h: Added the above functions.
2594 * page/PageGroup.cpp:
2595 (WebCore::PageGroup::isLinkVisited): Changed to take a visitedLinkHash parameter.
2596 The CSSStyleSelector now handles actually computing the hash, and it does so by
2597 calling code in Document.
2598 (WebCore::PageGroup::addVisitedLink): Refactored so the two overloaded copies share
2599 a bit more code. Added code that calls visitedStateChanged if a new link was added.
2600 (WebCore::PageGroup::removeVisitedLinks): Added code to call allVisitedStateChanged
2601 if any visited links are removed.
2602 * page/PageGroup.h: Include StringHash.h instead of having the AlreadyHashed struct
2605 * platform/text/StringHash.h:
2606 (WebCore::CaseFoldingHash::hash): Tweaked to make this a bit more consistent with
2607 the StringImpl::computeHash function, using the same technique for avoiding 0.
2608 (WebCore::AlreadyHashed::hash): Added. Was formerly in PageGroup.h.
2609 (WebCore::AlreadyHashed::avoidDeletedValue): Added. Was formerly in PageGroup.cpp.
2611 * rendering/RenderStyle.cpp:
2612 (WebCore::RenderStyle::isStyleAvailable): Changed to use an inline function instead
2613 of getting directly at a data member so the data member could be made private.
2615 * loader/FrameLoader.cpp:
2616 (WebCore::FrameLoader::scrollToAnchor): Added call to updateHistoryForAnchorScroll.
2617 (WebCore::FrameLoader::updateHistoryForAnchorScroll): Added.
2618 * loader/FrameLoader.h: Added updateHistoryForAnchorScroll.
2620 2008-03-10 Adam Roben <aroben@apple.com>
2622 Part of Bug 17224: DOM nodes/attributes should be editable
2624 <http://bugs.webkit.org/show_bug.cgi?id=17224>
2625 <rdar://problem/5732825>
2627 This patch makes DOM attributes editable via double-click.
2631 * page/inspector/DocumentPanel.js:
2632 (WebInspector.DOMNodeTreeElement.onmousedown): Don't do anything if
2633 we're being edited, since we want default editing behaviors to work.
2634 (WebInspector.DOMNodeTreeElement.ondblclick): Try to start editing
2635 before doing anything else.
2636 (WebInspector.DOMNodeTreeElement._startEditing): Added. Currently only
2637 lets you edit attributes.
2638 (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added.
2639 Uses a scratch element to get the new attribute(s) parsed, then sets
2640 the attribute(s) on the node in the inspected document.
2641 (WebInspector.DOMNodeTreeElement._attributeEditingCancelled): Added.
2642 (WebInspector.DOMNodeTreeElement._updateTitle): Added. Refreshes the
2643 representation of the node in the Inspector's DOM tree to reflect
2644 the node's current state.
2645 * page/inspector/inspector.css: Made the .editing class apply
2647 * page/inspector/utilities.js:
2648 (nodeTitleInfo): Changed to surround attribute name/value pairs in a
2649 webkit-html-attribute span so that we can easily edit the pair as a
2652 2008-03-10 David Kilzer <ddkilzer@apple.com>
2656 Reviewed by Stephanie.
2658 WebCore.exp only gets generated once for both 32-bit and 64-bit builds,
2659 so we must exclude the _NPN symbols when creating WebCore.LP64.exp.
2661 * WebCore.xcodeproj/project.pbxproj: Reverted build phase shell code to
2662 r30826 to remove _NPN symbols from 64-bit builds in WebCore.LP64.exp.
2664 2008-03-10 Eric Seidel <eric@webkit.org>
2668 Remove KJS::UChar, use ::UChar instead
2669 http://bugs.webkit.org/show_bug.cgi?id=17017
2671 To functional changes, thus no tests.
2673 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2674 (WebCore::hasCSSPropertyNamePrefix):
2675 (WebCore::cssPropertyName):
2676 * bindings/js/JSDOMWindowBase.cpp:
2677 (WebCore::windowProtoFuncAToB):
2678 (WebCore::windowProtoFuncBToA):
2679 * bindings/js/JSSVGPODTypeWrapper.h:
2680 * bindings/js/kjs_proxy.cpp:
2681 (WebCore::KJSProxy::evaluate):
2682 * bridge/objc/objc_utility.mm:
2683 (KJS::Bindings::throwError):
2685 (WebCore::Document::parseQualifiedName):
2686 * platform/text/AtomicString.cpp:
2687 (WebCore::AtomicString::add):
2688 * platform/text/String.cpp:
2689 (WebCore::String::String):
2690 (WebCore::String::operator Identifier):
2691 (WebCore::String::operator UString):
2692 * platform/text/TextCodecICU.cpp:
2693 (WebCore::TextCodecICU::decode):
2694 * svg/SVGAnimatedTemplate.h:
2696 2008-03-10 Darin Adler <darin@apple.com>
2700 - eliminate keyboard UI mode method from WebCoreFrameBridge
2702 * page/ChromeClient.h: Added keyboardUIMode function.
2703 (WebCore::ChromeClient::keyboardUIMode): Ditto.
2704 * page/mac/EventHandlerMac.mm:
2705 (WebCore::EventHandler::tabsToAllControls): Call chrome client function instead
2707 * page/mac/WebCoreFrameBridge.h: Removed keyboardUIMode method, and other unused
2710 * WebCore.xcodeproj/project.pbxproj: Allowed Xcode to change the project.
2711 Do not try to fight the Xcode.
2713 2008-03-10 Darin Adler <darin@apple.com>
2715 - oops, forgot to save last couple changes from the editor
2717 * bindings/js/JSDOMWindowCustom.cpp:
2718 (WebCore::markDOMObjectWrapper): Tweaked a tiny bit.
2719 (WebCore::JSDOMWindow::mark): Sorted alphabetically.
2721 2008-03-10 Darin Adler <darin@apple.com>
2725 - fix failing regression test (window.navigator is getting garbage
2726 collected and thus losing its custom properties)
2728 * bindings/js/JSDOMWindowCustom.cpp:
2729 (WebCore::markDOMObject): Added helper function.
2730 (WebCore::JSDOMWindow::mark): Added. Marks the wrappers for all the objects that hang
2731 off the window object.
2734 (WebCore::DOMWindow::optionalScreen): Added so we can get the Screen object without
2735 creating it if it's already there.
2736 (WebCore::DOMWindow::optionalSelection): Ditto.
2737 (WebCore::DOMWindow::optionalHistory): Ditto.
2738 (WebCore::DOMWindow::optionalLocationbar): Ditto.
2739 (WebCore::DOMWindow::optionalMenubar): Ditto.
2740 (WebCore::DOMWindow::optionalPersonalbar): Ditto.
2741 (WebCore::DOMWindow::optionalScrollbars): Ditto.
2742 (WebCore::DOMWindow::optionalStatusbar): Ditto.
2743 (WebCore::DOMWindow::optionalToolbar): Ditto.
2744 (WebCore::DOMWindow::optionalConsole): Ditto.
2745 (WebCore::DOMWindow::optionalNavigator): Ditto.
2747 * page/DOMWindow.idl: Added the CustomMarkFunction flag. Sorted the flags in
2748 alphabetical order since there are a lot of them.
2750 2008-03-10 Darin Adler <darin@apple.com>
2754 - eliminate Java applet methods from WebCoreFrameBridge
2756 * loader/FrameLoaderClient.h: Added a javaApplet function.
2757 * page/mac/FrameMac.mm:
2758 (WebCore::Frame::createScriptInstanceForWidget): Streamlined the code.
2759 Use the loader client instead of the bridge to get the applet.
2760 * page/mac/WebCoreFrameBridge.h: Removed the getAppletInView and
2761 pollForAppletInView methods. Also removed other unused things.
2763 2008-03-10 Marc-Antoine Ruel <maruel@gmail.com>
2765 Reviewed by Eric, landed by Darin.
2767 http://bugs.webkit.org/show_bug.cgi?id=16095
2768 Move GraphicsContextPrivate to its own header file.
2770 Moves GraphicsContextState and GraphicsContextPrivate to its
2773 * WebCore.vcproj/WebCore.vcproj:
2774 * platform/graphics/GraphicsContext.cpp:
2775 * platform/graphics/GraphicsContextPrivate.h: Added.
2776 (WebCore::GraphicsContextState::GraphicsContextState):
2777 (WebCore::GraphicsContextPrivate::GraphicsContextPrivate):
2779 2008-03-10 Julien Chaffraix <julien.chaffraix@gmail.com>
2781 Reviewed and landed by Darin.
2783 bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations
2785 Removed reference to PERMISSION_DENIED (previous non standard exception) and replaced it
2786 by DOM exception SECURITY_ERR. Updated XMLHttpRequest::open to raise SECURITY_ERR.
2788 * bindings/js/kjs_binding.cpp:
2789 (WebCore::setDOMException): Removed PERMISSION_DENIED code.
2790 * dom/ExceptionCode.cpp: Added SECURITY_ERR exception.
2791 * dom/ExceptionCode.h: Ditto.
2792 * xml/XMLHttpRequest.cpp:
2793 (WebCore::XMLHttpRequest::open): Returns SECURITY_ERR now.
2794 * xml/XMLHttpRequestException.h: Removed PERMISSION_DENIED.
2796 2008-03-09 Adam Roben <aroben@apple.com>
2798 Refactor CSS editing code so we can share it with DOM editing
2800 Add WebInspector.startEditing, which takes the element to be edited, a
2801 committedCallback, a cancelledCallback, and a context parameter. This
2802 function takes care of setting up the element for editing, and calls
2803 either the cancelledCallback or committedCallback when editing ends.
2807 * page/inspector/StylesSidebarPane.js:
2808 (WebInspector.StylePropertyTreeElement.startEditing):
2809 - Call WebInspector.isBeingEdited and WebInspector.startEditing
2810 - Removed code now handled by WebInspector.startEditing
2811 (WebInspector.StylePropertyTreeElement.editingEnded):
2812 - Renamed from endEditing
2813 - Removed code now handled by WebInspector.startEditing
2814 (WebInspector.StylePropertyTreeElement.editingCancelled):
2815 - Renamed from cancelEditing
2816 - Changed parameters to match WebInspector.startEditing's
2818 (WebInspector.StylePropertyTreeElement.editingCommitted):
2819 - Renamed from commitEditing
2820 - Changed parameters to match WebInspector.startEditing's
2822 * page/inspector/inspector.js:
2823 (WebInspector.changeFocus): Changed a call to firstParentWithClassName
2824 to firstParentOrSelfWithClassName so that if the focusable element
2825 itself is the target it will be recognized. I don't know why this
2826 change wasn't needed before this.
2827 (WebInspector.isBeingEdited): Added.
2828 (WebInspector.startEditing): Added.
2830 2008-03-10 Adam Roben <aroben@apple.com>
2834 * WebCore.vcproj/WebCore.vcproj: Pick up generated source files out of
2835 $(WebKitOutputDir) instead of hard-coding WebKitBuild.
2837 2008-03-10 Darin Adler <darin@apple.com>
2839 * DerivedSources.make: Merge plug-in-related changes with the new way of handling
2840 autogenerated DOM classes.
2842 2008-03-10 Johnny Ding <johnnyding.webkit@gmail.com>
2844 Reviewed, tweaked and landed by Alexey.
2846 - fix http://bugs.webkit.org/show_bug.cgi?id=17732
2848 We didn't have a fallback to frame encoding in the case of loading a script via
2849 changing its src attribute.
2851 Test: fast/dom/HTMLScriptElement/script-decoding-error-after-setting-src.html
2853 * html/HTMLScriptElement.cpp:
2854 (WebCore::HTMLScriptElement::parseMappedAttribute): Use a helper function to get proper
2855 charset for correct decoding of script content.
2856 (WebCore::HTMLScriptElement::insertedIntoDocument):
2857 (WebCore::HTMLScriptElement::scriptCharset): A helper function for getting proper charset
2858 for the script (as much as can be determined prior to loading it).
2859 * html/HTMLScriptElement.h:
2860 * html/HTMLTokenizer.cpp:
2861 (WebCore::HTMLTokenizer::parseTag): Use a helper function to get proper charset for correct
2862 decoding of script content.
2864 2008-03-10 Simon Hausmann <hausmann@webkit.org>
2868 Fix reference counting of returned MimeType and Plugin objects
2869 created in the array wrappers.
2871 * plugins/MimeTypeArray.cpp:
2872 * plugins/MimeTypeArray.h:
2873 * plugins/Plugin.cpp:
2875 * plugins/PluginArray.cpp:
2876 * plugins/PluginArray.h:
2878 2008-03-10 Simon Hausmann <hausmann@webkit.org>
2882 Added missing stubs for PluginData.
2884 * platform/wx/TemporaryLinkStubs.cpp:
2886 2008-03-10 Simon Hausmann <hausmann@webkit.org>
2888 Windows build fix that I forgot to merge earlier ;(
2890 Forward declare Page as class, not struct.
2892 * plugins/PluginData.h:
2894 2008-03-10 Simon Hausmann <hausmann@webkit.org>
2896 Attempt to fix the Wx build.
2898 * WebCoreSources.bkl:
2900 2008-03-07 Simon Hausmann <hausmann@webkit.org>
2906 http://bugs.webkit.org/show_bug.cgi?id=16815
2908 Ported the manually written JS bindings of window.navigator,
2909 window.navigator.plugins and window.navigator.mimeTypes to
2910 auto-generated bindings.
2912 Moved the globally cached plugin and mimetype information to a
2913 per WebCore::Page shared PluginData structure.
2915 Implemented window.navigator.plugins.refresh() in a
2916 platform-independent way.
2918 * DerivedSources.make:
2921 * WebCore.vcproj/WebCore.vcproj:
2922 * WebCore.xcodeproj/project.pbxproj:
2923 * bindings/js/JSDOMWindowBase.cpp:
2924 (WebCore::JSDOMWindowBase::getValueProperty):
2925 * bindings/js/JSMimeTypeArrayCustom.cpp: Added.
2926 (WebCore::JSMimeTypeArray::canGetItemsForName):
2927 (WebCore::JSMimeTypeArray::nameGetter):
2928 * bindings/js/JSNavigatorCustom.cpp: Added.
2929 (WebCore::needsYouTubeQuirk):
2930 (WebCore::JSNavigator::appVersion):
2931 * bindings/js/JSPluginArrayCustom.cpp: Added.
2932 (WebCore::JSPluginArray::canGetItemsForName):
2933 (WebCore::JSPluginArray::nameGetter):
2934 * bindings/js/JSPluginCustom.cpp: Added.
2935 (WebCore::JSPlugin::canGetItemsForName):
2936 (WebCore::JSPlugin::nameGetter):
2937 * bindings/js/kjs_navigator.cpp: Removed.
2938 * bindings/js/kjs_navigator.h: Removed.
2939 * dom/Clipboard.cpp:
2940 * dom/DOMImplementation.cpp:
2941 (WebCore::DOMImplementation::createDocument):
2942 * loader/FrameLoader.cpp:
2943 (WebCore::FrameLoader::shouldUsePlugin):
2944 * page/DOMWindow.cpp:
2945 (WebCore::DOMWindow::clear):
2946 (WebCore::DOMWindow::navigator):
2948 * page/DOMWindow.idl:
2949 * page/DragController.cpp:
2952 * page/Navigator.cpp: Added.
2953 (WebCore::Navigator::Navigator):
2954 (WebCore::Navigator::~Navigator):
2955 (WebCore::Navigator::disconnectFrame):
2956 (WebCore::Navigator::appCodeName):
2957 (WebCore::Navigator::appName):
2958 (WebCore::Navigator::appVersion):
2959 (WebCore::Navigator::language):
2960 (WebCore::Navigator::userAgent):
2961 (WebCore::Navigator::platform):
2962 (WebCore::Navigator::plugins):
2963 (WebCore::Navigator::mimeTypes):
2964 (WebCore::Navigator::product):
2965 (WebCore::Navigator::productSub):
2966 (WebCore::Navigator::vendor):
2967 (WebCore::Navigator::vendorSub):
2968 (WebCore::Navigator::cookieEnabled):
2969 (WebCore::Navigator::javaEnabled):
2970 * page/Navigator.h: Added.
2971 (WebCore::Navigator::create):
2972 (WebCore::Navigator::frame):
2973 * page/Navigator.idl: Added.
2975 (WebCore::Page::refreshPlugins):
2976 (WebCore::Page::pluginData):
2978 * page/Plugin.h: Removed.
2979 * page/mac/FrameMac.mm:
2980 * page/mac/WebCoreFrameBridge.mm:
2981 (-[WebCoreFrameBridge canProvideDocumentSource]):
2982 * page/mac/WebCoreViewFactory.h:
2983 * page/qt/FrameQt.cpp:
2984 * page/win/FrameWin.cpp:
2985 * platform/gtk/TemporaryLinkStubs.cpp:
2986 * platform/mac/PlugInInfoStoreMac.mm: Removed.
2987 * platform/qt/MIMETypeRegistryQt.cpp:
2988 (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
2989 * plugins/MimeType.cpp: Added.
2990 (WebCore::MimeType::MimeType):
2991 (WebCore::MimeType::~MimeType):
2992 (WebCore::MimeType::type):
2993 (WebCore::MimeType::suffixes):
2994 (WebCore::MimeType::description):
2995 (WebCore::MimeType::enabledPlugin):
2996 * plugins/MimeType.h: Added.
2997 (WebCore::MimeType::create):
2998 * plugins/MimeType.idl: Added.
2999 * plugins/MimeTypeArray.cpp: Added.
3000 (WebCore::MimeTypeArray::MimeTypeArray):
3001 (WebCore::MimeTypeArray::~MimeTypeArray):
3002 (WebCore::MimeTypeArray::length):
3003 (WebCore::MimeTypeArray::item):
3004 (WebCore::MimeTypeArray::canGetItemsForName):
3005 (WebCore::MimeTypeArray::nameGetter):
3006 (WebCore::MimeTypeArray::getPluginData):
3007 * plugins/MimeTypeArray.h: Added.
3008 (WebCore::MimeTypeArray::create):
3009 (WebCore::MimeTypeArray::disconnectFrame):
3010 * plugins/MimeTypeArray.idl: Added.
3011 * plugins/Plugin.cpp: Added.
3012 (WebCore::Plugin::Plugin):
3013 (WebCore::Plugin::~Plugin):
3014 (WebCore::Plugin::name):
3015 (WebCore::Plugin::filename):
3016 (WebCore::Plugin::description):
3017 (WebCore::Plugin::length):
3018 (WebCore::Plugin::item):
3019 (WebCore::Plugin::canGetItemsForName):
3020 (WebCore::Plugin::nameGetter):
3021 * plugins/Plugin.h: Added.
3022 (WebCore::Plugin::create):
3023 * plugins/Plugin.idl: Added.
3024 * plugins/PluginArray.cpp: Added.
3025 (WebCore::PluginArray::PluginArray):
3026 (WebCore::PluginArray::~PluginArray):
3027 (WebCore::PluginArray::length):
3028 (WebCore::PluginArray::item):
3029 (WebCore::PluginArray::canGetItemsForName):
3030 (WebCore::PluginArray::nameGetter):
3031 (WebCore::PluginArray::refresh):
3032 (WebCore::PluginArray::getPluginData):
3033 * plugins/PluginArray.h: Added.
3034 (WebCore::PluginArray::create):
3035 (WebCore::PluginArray::disconnectFrame):
3036 * plugins/PluginArray.idl: Added.
3037 * plugins/PluginData.cpp: Added.
3038 (WebCore::PluginData::PluginData):
3039 (WebCore::PluginData::~PluginData):
3040 (WebCore::PluginData::supportsMimeType):
3041 (WebCore::PluginData::pluginNameForMimeType):
3042 * plugins/PluginData.h: Added.
3043 (WebCore::PluginData::create):
3044 (WebCore::PluginData::disconnectPage):
3045 (WebCore::PluginData::page):
3046 (WebCore::PluginData::plugins):
3047 (WebCore::PluginData::mimes):
3048 * plugins/mac/PluginDataMac.mm: Added.
3049 (WebCore::PluginData::initPlugins):
3050 (WebCore::PluginData::refresh):
3051 * plugins/qt/PluginDataQt.cpp: Added.
3052 (WebCore::PluginData::initPlugins):
3053 * plugins/win/PluginDataWin.cpp: Added.
3054 (WebCore::PluginData::initPlugins):
3055 (WebCore::PluginData::refresh):
3057 2008-03-10 Simon Hausmann <hausmann@webkit.org>
3061 Replace two printfs() in the Qt port with notImplemented().
3063 * html/CanvasRenderingContext2D.cpp:
3064 (WebCore::CanvasRenderingContext2D::applyStrokePattern):
3065 (WebCore::CanvasRenderingContext2D::applyFillPattern):
3067 2008-03-10 Simon Hausmann <hausmann@webkit.org>
3071 Compilation fix with gcc 4.3: Include stdio.h for printf.
3073 * html/CanvasRenderingContext2D.cpp:
3074 * html/HTMLCanvasElement.cpp:
3076 2008-03-09 Steve Falkenburg <sfalken@apple.com>
3078 Stop Windows build if an error occurs in a prior project.
3080 Rubber stamped by Darin.
3082 * WebCore.vcproj/WebCore.vcproj:
3083 * WebCore.vcproj/WebCoreGenerated.vcproj:
3085 2008-03-09 Darin Adler <darin@apple.com>
3087 * DerivedSources.make: Third try at fixing the build.
3088 * bindings/js/JSRGBColor.cpp: And touching this file.
3090 2008-03-09 Darin Adler <darin@apple.com>
3092 * DerivedSources.make: One *more* try at fixing the build.
3094 2008-03-09 Darin Adler <darin@apple.com>
3096 * DerivedSources.make: One more try at fixing the build.
3098 2008-03-09 Darin Adler <darin@apple.com>
3100 * DerivedSources.make: Re-land the change, fixed, and with an attempt to fix the
3101 bots by removing the incorrect file.
3103 2008-03-09 Oliver Hunt <oliver@apple.com>
3107 Roll out r30909 -- it breaks the build and is a non-trivial fix (according to weinig)
3109 * DerivedSources.make:
3111 2008-03-09 Darin Adler <darin@apple.com>
3115 * DerivedSources.make: Put the list of DOM classes into its own
3116 variable, and generate the JavaScript bindings and Objective-C
3117 bindings dependencies from that. Added some separators to make it
3118 a little easier to see the sections of the file. Moved all the
3119 Mac-specific rules (except for the SVG conditional part) down
3120 to the bottom of the file in a separate section.
3122 2008-03-09 Adam Roben <aroben@apple.com>
3126 * WebCore.vcproj/WebCore.vcproj: Make sure all Cairo files are
3127 excluded from all three CG-based configurations: Debug, Release, and
3130 2008-03-08 Mark Rowe <mrowe@apple.com>
3132 Attempt to fix the Qt build.
3134 * platform/MIMETypeRegistry.cpp: Add missing include.
3136 2008-03-08 Oliver Hunt <oliver@apple.com>
3140 Bug 16516: canvas image patterns stop working with some transformations
3142 Simple fix. We used x/yStep of FLT_MAX to fake a no-repeat-x/y pattern
3143 with CG. However any transforms involving FLT_MAX immediately get
3144 consumed by the introduced floating point error. yStep had already been
3145 clamped to a much smaller arbitrary value, and this patch makes us use
3146 that clamp value for xStep as well.
3148 * html/CanvasPattern.cpp:
3149 (WebCore::CanvasPattern::createPattern):
3151 2008-03-08 Oliver Hunt <oliver@apple.com>
3155 Bug 17728: Canvas.createPattern with null repeat argument throws an exception
3157 Trivial fix, we were calling toString on null which produces the string "null",
3158 we just needed to switch to using valueToStringWithNullCheck rather than
3159 JSValue::toString directly
3161 Test: fast/canvas/canvas-pattern-behaviour.html
3163 * WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp:
3164 (WebCore::JSCanvasRenderingContext2D::createPattern):
3166 2008-03-08 Mark Rowe <mrowe@apple.com>
3168 Reviewed by Darin Adler.
3170 Fix 64-bit build with GCC 4.2.
3172 * bindings/objc/WebScriptObject.mm: Use NSUInteger in place of unsigned where required.
3173 * platform/mac/SharedBufferMac.mm: Ditto.
3175 2008-03-08 Dan Bernstein <mitz@apple.com>
3177 Reviewed by Oliver Hunt.
3179 - fix garbage in transparent areas in canvas.toDataURL results
3181 * platform/graphics/cg/ImageBufferCG.cpp:
3182 (WebCore::ImageBuffer::toDataURL): Clear the bitmap context before
3183 painting the canvas image onto it.
3185 2008-03-08 Darin Adler <darin@apple.com>
3189 - eliminate custom highlight methods from WebCoreFrameBridge
3192 (WebCore::ChromeClient::customHighlightRect): Added.
3193 (WebCore::ChromeClient::paintCustomHighlight): Added.
3194 * page/ChromeClient.h: Added custom highlight functions.
3195 * page/Frame.h: Removed custom highlight functions.
3196 * page/mac/FrameMac.mm: Ditto.
3197 * page/mac/WebCoreFrameBridge.h: Removed custom highlight methods.
3198 * rendering/InlineTextBox.cpp:
3199 (WebCore::InlineTextBox::paintCustomHighlight): Changed code to use
3200 the ChromeClient instead of WebCoreFrameBridge to do the custom highlight.
3201 * rendering/RenderBox.cpp:
3202 (WebCore::RenderBox::paintCustomHighlight): Ditto.
3203 * rendering/RootInlineBox.cpp:
3204 (WebCore::RootInlineBox::addHighlightOverflow): Ditto.
3205 (WebCore::RootInlineBox::paintCustomHighlight): Ditto.
3207 2008-03-07 Stephanie Lewis <slewis@apple.com>
3213 * platform/graphics/cg/ImageBufferCG.cpp:
3214 (WebCore::ImageBuffer::toDataURL):
3216 2008-03-07 David D. Kilzer <ddkilzer@apple.com>
3218 Unify concept of enabling Netscape Plug-in API (NPAPI).
3222 No test cases since there is no change in functionality.
3224 * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro.
3225 If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES.
3226 * WebCore.NPAPI.exp: Added.
3227 * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp.
3228 * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except
3229 comments) since we now handle exported NPAPI methods via DerivedSources.make.
3231 * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as
3232 defined in Platform.h.
3234 * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3235 (-[DOMElement _NPObject]):
3237 * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with
3238 ENABLE(NETSCAPE_PLUGIN_API).
3239 * bridge/NP_jsobject.h: Ditto.
3240 * bridge/c/c_class.cpp: Ditto.
3241 * bridge/c/c_class.h: Ditto.
3242 * bridge/c/c_instance.cpp: Ditto.
3243 * bridge/c/c_instance.h: Ditto.
3244 * bridge/c/c_runtime.cpp: Ditto.
3245 * bridge/c/c_runtime.h: Ditto.
3246 * bridge/c/c_utility.cpp: Ditto.
3247 * bridge/c/c_utility.h: Ditto.
3248 * bridge/npruntime.cpp: Ditto.
3249 * bridge/npruntime_impl.h: Ditto.
3250 * bridge/npruntime_priv.h: Ditto.
3251 * bridge/runtime.cpp: Ditto.
3252 (KJS::Bindings::Instance::createBindingForLanguageInstance):
3254 * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3255 (WebCore::HTMLPlugInElement::HTMLPlugInElement):
3256 (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
3257 * html/HTMLPlugInElement.h: Ditto.
3259 * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3260 (WebCore::Frame::clearScriptObjects):
3261 (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API)
3262 guard around m_windowScriptNPObject.
3263 * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3264 * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around
3265 m_windowScriptNPObject.
3266 * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
3267 (WebCore::Frame::createScriptInstanceForWidget):
3269 2008-03-07 Alexey Proskuryakov <ap@webkit.org>
3273 REGRESSION: Korean decoding doesn't support extended EUC-KR.
3275 Test: fast/encoding/char-decoding.html
3277 * platform/text/TextCodecICU.cpp:
3278 (WebCore::TextCodecICU::registerExtendedEncodingNames): Untangle the system of duplicate ICU
3279 encoding names by manually registering windows-939-2000, and mapping all other related
3282 2008-03-07 Dan Bernstein <mitz@apple.com>
3284 Reviewed by Stephanie.
3286 - try to fix leaks seen on Tiger after r30840
3288 * css/CSSStyleSelector.cpp:
3289 (WebCore::CSSStyleSelector::~CSSStyleSelector): Use the default operator
3290 delete, rather than arena delete, to deallocate the root default style.
3292 2008-03-07 Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>
3294 Reviewed by Alp Toker.
3296 http://bugs.webkit.org/show_bug.cgi?id=17681
3297 GtkLauncher fails to render an element with position: fixed
3299 Implement the required parts of PlatformScreenGtk.
3302 * platform/gtk/PlatformScreenGtk.cpp:
3303 (WebCore::screenDepth):
3304 (WebCore::screenIsMonochrome):
3305 (WebCore::screenRect):
3307 2008-03-07 Oliver Hunt <oliver@apple.com>
3309 Reviewed by Darin Adler.
3311 Bug 16610: <canvas> restore() removes path segments created before it
3313 The problem here is that WebKit stored the Path as part of the state, so
3314 restore would incorrectly lose changes made to the canvas path. To match
3315 Firefox and HTML5 we make two real changes:
3316 * Move the context path from the state object directly onto the context.
3317 This is responsible for all the changes to the path manipulation functions
3318 * Add transform tracking to each state -- this is needed to correctly transform
3319 the current path when restore()-ing to a prior state.
3321 Test: fast/canvas/canvas-save-restore-with-path.html
3323 * html/CanvasRenderingContext2D.cpp:
3324 (WebCore::CanvasRenderingContext2D::restore):
3325 (WebCore::CanvasRenderingContext2D::scale):
3326 (WebCore::CanvasRenderingContext2D::rotate):
3327 (WebCore::CanvasRenderingContext2D::translate):
3328 (WebCore::CanvasRenderingContext2D::transform):
3329 (WebCore::CanvasRenderingContext2D::beginPath):
3330 (WebCore::CanvasRenderingContext2D::closePath):
3331 (WebCore::CanvasRenderingContext2D::moveTo):
3332 (WebCore::CanvasRenderingContext2D::lineTo):
3333 (WebCore::CanvasRenderingContext2D::quadraticCurveTo):
3334 (WebCore::CanvasRenderingContext2D::arcTo):
3335 (WebCore::CanvasRenderingContext2D::arc):
3336 (WebCore::CanvasRenderingContext2D::rect):
3337 (WebCore::CanvasRenderingContext2D::clearPathForDashboardBackwardCompatibilityMode):
3338 (WebCore::CanvasRenderingContext2D::fill):
3339 (WebCore::CanvasRenderingContext2D::stroke):
3340 (WebCore::CanvasRenderingContext2D::clip):
3341 (WebCore::CanvasRenderingContext2D::isPointInPath):
3342 * html/CanvasRenderingContext2D.h:
3344 2008-03-07 Oliver Hunt <oliver@apple.com>
3348 Fix for crash caused by FrameLoader incorrectly assuming it has
3351 In some circumstances an application embedding a WebView may
3352 choose to prevent a webview from loading a resource. If that
3353 resource was requested by an <object> element then we may
3354 fallback to different content which may not produce a RenderWidget.
3355 Unfortunately FrameLoader::loadSubframe was assuming that if a
3356 renderer was produced it would always be a RenderWidget, and arbitrarily
3357 performed what could be an incorrect cast. This could then lead to
3360 We currently don't have anyway of making a test for this.
3362 * loader/FrameLoader.cpp:
3363 (WebCore::FrameLoader::loadSubframe):
3365 2008-03-07 Samuel Weinig <sam@webkit.org>
3367 Reviewed by Oliver Hunt.
3369 Fix for http://bugs.webkit.org/show_bug.cgi?id=16673
3370 <canvas> lacks toDataURL()
3372 Tests: fast/canvas/toDataURL-noData.html
3373 fast/canvas/toDataURL-supportedTypes.html
3375 * html/CanvasRenderingContext2D.cpp:
3376 (WebCore::CanvasRenderingContext2D::printSecurityExceptionMessage): Make message non-global.
3377 * html/HTMLCanvasElement.cpp:
3378 (WebCore::HTMLCanvasElement::printSecurityExceptionMessage): Log error message indicating that toDataURL has
3379 been called on a tainted canvas.
3380 (WebCore::HTMLCanvasElement::toDataURL): This does the tainted canvas check, ensures that the canvas has pixel
3381 data, checks to see if the MIME type is supported. Unsupported MIME types and the null string (which is made
3382 by passing no argument/null/undefined in JavaScript) are treated as being PNG, as per the spec. The actual
3383 toDataURL logic is actually done in the ImageBuffer class.
3384 * html/HTMLCanvasElement.h: Add function declarations.
3385 * html/HTMLCanvasElement.idl: Add function declaration.
3387 * platform/MIMETypeRegistry.cpp:
3388 (WebCore::initializeSupportedImageMIMETypes):
3389 (WebCore::initializeSupportedImageMIMETypesForEncoding):
3390 (WebCore::initializeSupportedJavaScriptMIMETypes):
3391 (WebCore::initializeSupportedNonImageMimeTypes):
3392 (WebCore::initializeSupportedMediaMIMETypes):
3393 (WebCore::initializeMIMETypeRegistry):
3394 (WebCore::MIMETypeRegistry::getMIMETypeForPath):
3395 (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
3396 (WebCore::MIMETypeRegistry::isSupportedImageResourceMIMEType):
3397 (WebCore::MIMETypeRegistry::isSupportedImageMIMETypeForEncoding):
3398 (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType):
3399 (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType):
3400 (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
3401 (WebCore::MIMETypeRegistry::isJavaAppletMIMEType):
3402 (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes):
3403 (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes):
3404 (WebCore::MIMETypeRegistry::getSupportedImageMIMETypesForEncoding):
3405 (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes):
3406 (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
3407 * platform/MIMETypeRegistry.h:
3408 Clean up and add new supportedImageMIMETypesForEncoding set which contains the set of
3409 MIME types the platform knows how to encode. Currently only implemented for CG and Qt.
3411 * platform/graphics/ImageBuffer.h: Add toDataURL method.
3412 * platform/graphics/cairo/ImageBufferCairo.cpp:
3413 (WebCore::ImageBuffer::toDataURL): Add stub.
3414 * platform/graphics/cg/ImageBufferCG.cpp:
3415 (WebCore::ImageBuffer::create):
3416 (WebCore::ImageBuffer::getImageData):
3417 (WebCore::ImageBuffer::putImageData):
3418 (WebCore::ImageBuffer::toDataURL):
3419 Converts the current context to a data: url of the specified MIME type. This method
3420 unfortunately has to flip the context, resulting in less than optimal code.
3422 * platform/graphics/qt/ImageBufferQt.cpp:
3423 (WebCore::ImageBuffer::toDataURL): Add stub.
3424 * platform/graphics/wx/ImageBufferWx.cpp:
3425 (WebCore::ImageBuffer::toDataURL): Add stub.
3427 2008-03-07 Steve Falkenburg <sfalken@apple.com>
3431 * WebCore.vcproj/WebCore.vcproj:
3433 2008-03-07 Brent Fulgham <bfulgham@gmail.com>
3435 Reviewed by Mark Rowe.
3437 Correct build intermediary output
3438 (http://bugs.webkit.org/show_bug.cgi?id=17713)
3440 * WebCore/WebCore.vcproj: Correct intermediary paths
3442 2008-03-07 Brent Fulgham <bfulgham@gmail.com>
3444 Reviewed by Steve Falkenburg.
3446 Add Cairo build requirements to WebCore.vcproj under a new
3447 set of targets. Exclude Cairo elements from normal CG build.
3448 Exclude CG elements from Cairo builds.
3449 (http://bugs.webkit.org/show_bug.cgi?id=17300)
3451 * WebCore.vcproj/WebCore.vcproj:
3452 * WebCore.vcproj/webcore.vsprops: Added.
3454 2008-03-07 Darin Adler <darin@apple.com>
3458 - eliminated WebCoreFrameBridge runOpenPanel
3460 * page/ChromeClient.h: Added runOpenPanel function.
3461 * page/mac/ChromeMac.mm:
3462 (WebCore::ChromeClient::runOpenPanel): Added.
3463 * platform/FileChooser.cpp:
3464 (WebCore::FileChooser::FileChooser): Moved this here. It's no longer platform-specific.
3465 Also start the refcount at 1.
3466 (WebCore::FileChooser::create): Added adoptRef since the refcount no starts at one.
3467 (WebCore::FileChooser::~FileChooser): Moved here. No longer platform-specific.
3468 * platform/FileChooser.h: Removed m_controller, which was Macintosh-specific.
3469 * platform/gtk/FileChooserGtk.cpp: Removed FileChooser constructor and destructor,
3470 since they are no longer platform-specific.
3471 * platform/qt/FileChooserQt.cpp: Ditto.
3472 * platform/win/FileChooserWin.cpp: Ditto.
3473 * platform/wx/TemporaryLinkStubs.cpp: Ditto.
3474 * platform/mac/FileChooserMac.mm:
3475 (WebCore::FileChooser::openFileChooser): Call the chrome client instead of the
3476 bridge to run the open panel. Allows us to get rid of the WebCoreOpenPanelController
3477 class and m_controller data member and move the cosntrutor/destructor to platform-
3480 2008-03-07 Adam Roben <aroben@apple.com>
3482 Add JavaScriptDebugServer
3484 This class is a singleton which allows one or more
3485 JavaScriptDebugListeners to receive callbacks during JavaScript
3488 Right now all listeners receive callbacks for all Pages in the
3489 process. Eventually we will want to support listeners registering for
3490 callbacks for specific Pages (e.g., the Inspector will want to listen
3491 for execution in just the Page it's inspecting).
3493 Pages notify the JavaScriptDebugServer when they are created so that
3494 it can install itself as the Page's debugger.
3498 * GNUMakefile.am: Added new files to project.
3499 * WebCore.pro: Ditto.
3500 * WebCore.vcproj/WebCore.vcproj: Ditto.
3501 * WebCore.xcodeproj/project.pbxproj: Ditto.
3502 * WebCoreSources.bkl: Ditto.
3503 * page/JavaScriptDebugListener.h: Added.
3504 * page/JavaScriptDebugServer.cpp: Added.
3506 (WebCore::JavaScriptDebugServer::shared):
3507 (WebCore::JavaScriptDebugServer::JavaScriptDebugServer):
3508 (WebCore::JavaScriptDebugServer::~JavaScriptDebugServer):
3509 (WebCore::JavaScriptDebugServer::addListener): Registers as the
3510 debugger for all Pages if we're adding our first listener.
3511 (WebCore::JavaScriptDebugServer::removeListener): Deregisters as the
3512 debugger for all Pages if we're removing our last listner.
3513 (WebCore::JavaScriptDebugServer::pageCreated): Registers as the
3514 debugger for the newly created Page if we have any listeners.
3515 (WebCore::dispatchDidParseSource): Helper function.
3516 (WebCore::dispatchFailedToParseSource): Ditto.
3517 (WebCore::JavaScriptDebugServer::sourceParsed): Call
3518 dispatchDidParseSource or dispatchFailedToParseSource depending on
3519 whether there was an error or not.
3520 (WebCore::JavaScriptDebugServer::dispatchFunctionToListeners): Calls
3521 the passed-in JavaScriptExecutionCallback on each listener, guarding
3523 (WebCore::JavaScriptDebugServer::callEvent): Dispatch didEnterCallFrame.
3524 (WebCore::JavaScriptDebugServer::atStatement): Dispatch willExecuteStatement.
3525 (WebCore::JavaScriptDebugServer::returnEvent): Dispatch willLeaveCallFrame.
3526 (WebCore::JavaScriptDebugServer::exception): Dispatch exceptionWasRaised.