1 2007-09-04 David Harrison <harrison@apple.com>
3 Reviewed by Maciej and John.
5 <rdar://problem/5452675> CrashTracer: [USER] 10 crashes in Mail at com.apple.WebCore: WebCore::Node::nodeIndex const + 6
7 * editing/InsertParagraphSeparatorCommand.cpp:
8 (WebCore::InsertParagraphSeparatorCommand::doApply):
9 Adjust pos to pos.downstream() after the refNode is calculated, but before the insertion. Doing it earlier
10 undid the logic of positionAvoidingSpecialElementBoundary(). The downstream is still needed just to set the
13 2007-09-04 Antti Koivisto <antti@apple.com>
17 Fix <rdar://problem/5452112>
18 REGRESSION: Initially focused textfield on www.mac.com login page has no insertion point, and doesn't accept typed characters
20 Use updateLayoutIgnorePendingStylesheets() instead of updateLayout(). We need to have rendering to set input focus.
22 Test: fast/forms/focus-style-pending.html
25 (WebCore::Element::focus):
27 2007-09-04 Girish Ramakrishnan <girish@trolltech.com>
31 Fixed Qt build on Windows
33 * html/HTMLFormElement.cpp:
34 (WebCore::pathGetFilename):
36 2007-09-03 David Harrison <harrison@apple.com>
38 Reviewed by Kevin Decker.
40 <rdar://problem/5456785> REGRESSION (r15963-r15970): Heading text not placed in VoiceOver Item Chooser (15132)
42 * bridge/mac/WebCoreAXObject.mm:
43 (-[WebCoreAXObject title]):
44 For headings, return the text under the element instead of nil.
46 2007-08-20 Oleg Sukhodolsky <son.two@gmail.com>
50 WebKitQt/WebCoreSupport should not be added to INCLUDEPATH for gdk-port
54 2007-09-03 Mark Rowe <mrowe@apple.com>
56 Reviewed by Tim Hatcher.
58 <rdar://problem/5452164> Production build with in symbols directory has no debug info
60 Enable debug symbol generation on all build configurations. Production builds are stripped
61 of symbols by Xcode during deployment post-processing.
63 * Configurations/Base.xcconfig:
64 * WebCore.xcodeproj/project.pbxproj:
66 2007-09-02 Brady Eidson <beidson@apple.com>
68 Reviewed by John Sullivan and Mark Rowe
70 Groundwork for support for monitoring IconDatabase in-memory statistics
73 * loader/icon/IconDatabase.cpp:
74 (WebCore::IconDatabase::pageURLMappingCount): Stub for now
75 (WebCore::IconDatabase::retainedPageURLCount): Ditto
76 (WebCore::IconDatabase::iconRecordCount): Ditto
77 (WebCore::IconDatabase::iconRecordCountWithData): Ditto
78 * loader/icon/IconDatabase.h:
80 2007-09-02 Mark Rowe <mrowe@apple.com>
84 <rdar://problem/5454704> WebKit seems to get too-narrow widths for "Monotype Corsiva", so lays out incorrectly
86 * platform/mac/FontDataMac.mm:
87 (WebCore::FontData::determinePitch): Work around NSFont incorrectly reporting Monotype Corsiva as fixed pitch.
89 2007-09-01 Darin Adler <darin@apple.com>
91 - rolled out fix for bug 12988 because it broke getElementById in a layout test
92 I'm working on a new fix.
94 * dom/Document.cpp: Rolled out.
96 2007-09-01 Oliver Hunt <oliver@apple.com>
100 <rdar://problem/5344848> IME is incorrectly used for key events when on non-editable regions
102 Adding a new EditorClient method so it is possible to inform WebKit of focus changes.
103 Also added new virtual method Node::shouldUseInputMethod to allow us to trivially check
104 whether an input method should be used when processing input for the currently focused
107 * bridge/EditorClient.h:
109 (WebCore::Node::shouldUseInputMethod):
111 * html/HTMLInputElement.cpp:
112 (WebCore::HTMLInputElement::shouldUseInputMethod):
113 * html/HTMLInputElement.h:
114 * html/HTMLTextAreaElement.cpp:
115 (WebCore::HTMLTextAreaElement::shouldUseInputMethod):
116 * html/HTMLTextAreaElement.h:
117 * page/FocusController.cpp:
118 (WebCore::FocusController::setFocusedNode):
119 * platform/graphics/svg/SVGImageEmptyClients.h:
120 (WebCore::SVGEmptyEditorClient::setInputMethodState):
122 2007-09-01 Rob Buis <buis@kde.org>
126 http://bugs.webkit.org/show_bug.cgi?id=12988
127 First element (in document order) is not returned when other duplicate ID-ed elements were created first
129 Reset the element id cache when id's are added or removed and there
130 are duplicates for that id.
132 Tests: fast/dom/duplicate-ids-document-order.html
135 (WebCore::Document::getElementById):
136 (WebCore::Document::addElementById):
137 (WebCore::Document::removeElementById):
139 2007-09-01 Rob Buis <buis@kde.org>
143 http://bugs.webkit.org/show_bug.cgi?id=15083
144 Some symbols in WebKit do not need to be exported
146 Do not export these symbols.
148 * dom/QualifiedName.cpp:
149 (WebCore::hashComponents):
150 * dom/XMLTokenizer.cpp:
152 (WebCore::getTokenizer):
153 * history/HistoryItem.cpp:
154 (WebCore::defaultNotifyHistoryItemChanged):
155 * platform/Arena.cpp:
156 (WebCore::CeilingLog2):
157 * platform/graphics/Color.cpp:
159 * platform/graphics/Path.cpp:
160 (WebCore::pathLengthApplierFunction):
161 * platform/graphics/cg/PathCG.cpp:
162 (WebCore::CGPathToCFStringApplierFunction):
163 (WebCore::CFStringFromCGPath):
164 * rendering/RenderText.cpp:
165 (WebCore::isSpaceAccordingToStyle):
167 2007-08-31 Alice Liu <alice.liu@apple.com>
169 Reviewed by Tim Hatcher.
171 Fixed <rdar://problem/5420682> Mail crashes at WebCore::InsertLineBreakCommand::doApply() after dropping a selected image over container's close box
173 * editing/DeleteButtonController.cpp:
174 (WebCore::DeleteButtonController::show):
175 Factored out the code in ::show() that created and styled the elements of the Deletion UI
177 (WebCore::DeleteButtonController::createDeletionUI):
178 Neglecting to move the append of the deletionUI elements into the same clause that handles the creation
179 of them ended up creating multiple elements at were repeatedly appended to the target, resulting in a
180 bloated table deletion UI which was slow to show and hide.
182 * editing/DeleteButtonController.h:
183 (WebCore::DeleteButtonController::enabled):
184 Restore this function to how it used to be pre-r25305, sans asserts
186 * editing/EditCommand.cpp:
187 Add disable/enable sandwich when undoing/redoing commands too
188 (WebCore::EditCommand::unapply):
189 (WebCore::EditCommand::reapply):
191 2007-08-31 Antti Koivisto <antti@apple.com>
195 Fix <rdar://problem/5452943>
196 REGRESSION (r25283): Reproducible crash in HTMLObjectElement::getInstance under guard malloc
198 Calling updateLayoutIgnorePendingStylesheets() may do arbitrary things to render tree so
199 no RenderObjects can be cached over it.
201 * html/HTMLEmbedElement.cpp:
202 (WebCore::findWidgetRenderer):
203 (WebCore::HTMLEmbedElement::getInstance):
204 * html/HTMLObjectElement.cpp:
205 (WebCore::HTMLObjectElement::getInstance):
207 2007-08-31 Anders Carlsson <andersca@apple.com>
211 <rdar://problem/5443936>
212 Crash after QT movie completes playback at apple.com/imac
214 If the plug-in or one of its children have focus, set it to NULL to prevent the web view window from getting the focus,
215 which can cause a layout to happen while in HTMLObjectElement::detach. (This is what we do on the Mac).
217 * plugins/win/PluginViewWin.cpp:
218 (WebCore::PluginViewWin::setParent):
220 2007-08-30 Adele Peterson <adele@apple.com>
224 Fix for <rdar://problem/5450600> REGRESSION: can't paste in textfield if its in a body that has user-select:none set (affects widgets)
226 Test: editing/pasteboard/paste-plaintext-user-select-none.html
228 * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::insertFragmentForTestRendering):
229 Copy the user-select style from the current selection node and apply it so it is considered during the test rendering.
230 This is important since we recently changed user-select to be inherited. When we consider valid VisiblePositions for the test rendering,
231 we need to have the correct user-select value that will actually be used for the real insertion.
233 2007-08-31 Anders Carlsson <andersca@apple.com>
237 <rdar://problem/5423939>
238 http://bugs.webkit.org/show_bug.cgi?id=15013
239 ASSERTION FAILED !m_inDestructor in WebCore::Shared<WebCore::PluginStreamWin>::ref() on Windows
241 Protect the stream in case it's destroyed by the plug-in.
243 * plugins/win/PluginStreamWin.cpp:
244 (WebCore::PluginStreamWin::didReceiveData):
246 a2007-08-31 Darin Adler <darin@apple.com>
250 - http://bugs.webkit.org/show_bug.cgi?id=15122
252 * editing/htmlediting.cpp: (WebCore::avoidIntersectionWithNode):
253 Change assertion so that it only fires when actually modifying the selection.
254 This isn't nearly as helpful, because the old assertion could catch potential
255 problems in more cases, but it's not obvious how to do better.
257 2007-08-30 Oliver Hunt <oliver@apple.com>
261 <rdar://problem/5430772> REGRESSION(303-310A5) list items do not show with mouse over on istweb.apple.com/quack.apple.com
263 VC++ treats bitfields as signed members, so Node::m_styleChange would be
264 sign extended if it was assigned the value FullStyleChange. This caused
265 style recalculation to stop propagating.
267 We work around this VC++ oddity by storing the enum as an unsigned, and
268 casting back to StyleChangeType in the getter.
270 Test: fast/css/hover-affects-child.html
273 (WebCore::Node::styleChangeType):
275 2007-08-29 Justin Garcia <justin.garcia@apple.com>
279 <rdar://problem/5368833>
280 REGRESSION: Pasting a triple-clicked line of quoted text at the top of a message adds an extra, quoted line
282 * editing/CompositeEditCommand.cpp:
283 (WebCore::CompositeEditCommand::insertParagraphSeparator): Added an option for
284 using a plain div to hold the new paragraph, instead of a clone of the previous
286 * editing/CompositeEditCommand.h:
287 * editing/InsertParagraphSeparatorCommand.cpp: Ditto.
288 (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand): Ditto.
289 (WebCore::InsertParagraphSeparatorCommand::doApply): Ditto.
290 * editing/InsertParagraphSeparatorCommand.h:
291 * editing/ReplaceSelectionCommand.cpp:
292 (WebCore::ReplaceSelectionCommand::doApply): Use a default block element when creating
293 new paragraphs, so that empty paragraphs don't contain the block style of the previous
295 Don't expand collapsed brs at the end of inserted content, this was the root of the bug.
296 We'd copy <blockquote>hello<br></blockquote><br class="Apple-interchange-newline">
297 and get an extra paragraph. The removed code used to make sure that if the copied
298 selection ends with a paragraph break that is represented in the copied markup by a
299 regular br (not an interchange newline br), that that paragraph break appears in the
300 pasted content, but shouldMergeEnd, which was introduced after this code was written,
301 now takes care of that.
302 (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Inserted content should always
303 displace placeholder brs, even if that inserted content ends with a br.
304 * editing/markup.cpp:
305 (WebCore::needInterchangeNewlineAfter): This code failed to add an interchange newline
306 if the user copied <div>hello</div><br>, only don't add an interchange newline when
307 copying ^hello<br>^<br>, because then the copied paragraph break will already be
308 represented in the copied markup by a br.
309 (WebCore::createMarkup):
311 2007-08-30 David Harrison <harrison@apple.com>
315 <rdar://problem/5423900> Seed: safari crashes on submit feedback page in -[WebCoreAXObject isAttachment]
317 * bridge/mac/WebCoreAXObject.mm:
318 (-[WebCoreAXObject isAttachment]):
319 Add nil check since element could be detached.
321 2007-08-30 Mitz Pettel <mitz@webkit.org>
323 Reviewed by Dave Hyatt.
325 - fix http://bugs.webkit.org/show_bug.cgi?id=13282
326 <rdar://problem/5126392> REGRESSION (NativePopUp): Rightmost character cut off in pop-up menu
328 * rendering/RenderMenuList.cpp:
329 (WebCore::RenderMenuList::updateOptionsWidth): When measuring option text, use
330 the same WebCore run rounding behavior that is used to draw it in the popup button.
332 2007-08-30 Riku Voipio <riku.voipio@iki.fi>
334 Reviewed by Dave Kilzer.
338 * platform/DeprecatedString.h: Update comments to reflect the
339 change and update test to fit changes to Platform.h.
341 2007-08-30 Darin Adler <darin@apple.com>
343 Reviewed by Tim Hatcher.
345 - fix http://bugs.webkig.org/show_bug.cgi?id=14981
346 DEBUG builds of WebKit hang videwing Yahoo! Mail messages
347 with ~5 MB text attachment
349 * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::checkConsistency):
350 * rendering/RenderFlow.cpp: (WebCore::RenderFlow::checkConsistency):
351 * rendering/RenderText.cpp: (WebCore::RenderText::checkConsistency):
352 Put the actual consistency check inside an ifdef. If you need it you can
353 turn it on. There's still some function call overhead in builds that don't
354 have NDEBUG defined, but that's worth it so we can turn this on and off
355 without recompiling the world.
357 - small code style improvement to recently changed function
359 * editing/TextIterator.cpp: (WebCore::plainTextToMallocAllocatedBuffer):
360 Use a typedef and make_pair to make the code dealing with the pair simpler to read.
362 2007-08-30 Simon Hausmann <hausmann@kde.org>
366 Fix Qt/Gdk build. gcc on Linux at least doesn't like initializing
367 variables between jumps with goto ("jump to label foo crosses
368 initialization of bar").
370 * editing/TextIterator.cpp:
371 (WebCore::plainTextToMallocAllocatedBuffer):
373 2007-08-30 Darin Adler <darin@apple.com>
377 - fix <rdar://problem/5423270> CrashTracer: [USER] 1 crash in Safari at com.apple.WebCore:
378 WebCore::plainTextToMallocAllocatedBuffer + 762
380 * editing/TextIterator.cpp: (WebCore::plainTextToMallocAllocatedBuffer):
381 Check for a malloc failure and exit the function if it failed.
383 2007-08-29 Anders Carlsson <andersca@apple.com>
387 <rdar://problem/5404329>
388 Plugin content starves WM_TIMER events on UI thread (affects idle behavior of app) on http://www.vincent-vella.com/, http://www.sagmeister.com/
390 Add a tiny delay to invalidation timer to prevent it from starving other timers.
392 * plugins/win/PluginViewWin.cpp:
393 (WebCore::PluginViewWin::invalidateRect):
395 2007-08-29 Darin Adler <darin@apple.com>
399 * editing/htmlediting.cpp: (WebCore::avoidIntersectionWithNode):
400 Fix an assert that was firing for me all the time when doing editing operations.
402 2007-08-29 Anders Carlsson <andersca@apple.com>
406 <rdar://problem/5386098>
407 Repro hang with some Flash plugin content (http://dougmccune.com/blog/2007/07/25/coming-to-flexcamp-at-adobe/)
409 In some cases, Flash ends up starving the main loop by sending a lot of WM_USER + 1 messages. Throttle these
410 messages so they won't end up hanging the web browser.
412 * plugins/win/PluginViewWin.cpp:
413 (WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin):
414 (WebCore::PluginMessageThrottlerWin::~PluginMessageThrottlerWin):
415 (WebCore::PluginMessageThrottlerWin::appendMessage):
416 (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
417 (WebCore::PluginMessageThrottlerWin::allocateMessage):
418 (WebCore::PluginMessageThrottlerWin::isInlineMessage):
419 (WebCore::PluginMessageThrottlerWin::freeMessage):
420 (WebCore::PluginViewWndProc):
421 (WebCore::PluginViewWin::wndProc):
422 (WebCore::PluginViewWin::determineQuirks):
423 * plugins/win/PluginViewWin.h:
425 (WebCore::PluginViewWin::pluginWndProc):
427 2007-08-29 Beth Dakin <bdakin@apple.com>
431 Fix for <rdar://problem/5436800> REGRESSION: PLT is 1.5% slower due
434 In r25098, we only called setCreatedByParser for XML! This patch
435 calls it for HTML too, and takes care of the performance
438 * html/HTMLElementFactory.cpp:
439 (WebCore::styleConstructor):
441 2007-08-29 Antti Koivisto <antti@apple.com>
445 Fix <rdar://problem/5425951>
446 REGRESSION: change to updateLayoutIgnorePendingStylesheets causes SAP Portal page to render wrong
448 If new nodes have been added or style recalc has been done with style sheets still pending, some nodes
449 may not have had their real style calculated yet. Normally this state gets cleaned when style sheets arrive
450 but in updateLayoutIgnorePendingStylesheets() we need to do full style recalc to get up-to-date style immediatly.
452 Added a document flag to track if there are any nodes that did not have their real style calculated due to
455 Test: fast/dynamic/style-access-late-stylesheet-load.html
457 * css/CSSStyleSelector.cpp:
458 (WebCore::CSSStyleSelector::styleForElement):
460 (WebCore::Document::Document):
461 (WebCore::Document::recalcStyle):
462 (WebCore::Document::updateLayoutIgnorePendingStylesheets):
464 (WebCore::Document::setHasNodesWithPlaceholderStyle):
466 2007-08-29 Alice Liu <alice.liu@apple.com>
470 We disable the DeleteButton UI before applying any editing commands.
471 This patch simply moves those disable/enable calls to a more correct place, closer to the actual application of the editing command.
473 * editing/EditCommand.cpp:
474 (WebCore::EditCommand::apply):
475 (WebCore::applyCommand):
477 2007-08-28 Alice Liu <alice.liu@apple.com>
479 fixed <rdar://problem/5420682> Mail crashes at WebCore::InsertLineBreakCommand::doApply()
480 after dropping a selected image over container's close box
482 Reviewed by Darin and Maciej.
484 * editing/DeleteButtonController.cpp:
485 (WebCore::DeleteButtonController::show):
486 (WebCore::DeleteButtonController::hide):
487 * editing/DeleteButtonController.h:
488 (WebCore::DeleteButtonController::enabled):
489 General changes made to DeleteButtonController: when hiding, it's not necessary to clear out
490 the m_containerElement and m_target, especially since to fix this bug we need to keep
491 their values around. It's sufficient to just detach the container from target.
493 * editing/EditCommand.cpp:
494 (WebCore::EditCommand::EditCommand):
495 Move the selection out of the deletion UI since we don't want to expose the deletion UI to any editing.
497 * editing/Editor.cpp:
498 (WebCore::Editor::rangeForPoint):
499 Move the range out of the deletion UI since we don't want to expose the deletion UI to any editing.
501 * editing/htmlediting.cpp:
502 * editing/htmlediting.h:
503 (WebCore::avoidIntersectionWithNode):
504 Moved function that operates on Range from markup.cpp to here
505 Added new implementation for function that operates on Selection
507 * editing/markup.cpp:
508 (WebCore::createMarkup):
509 Moved function out of this file to htmlediting.cpp, and renamed to avoidIntersectionWithNode
511 2007-08-29 David Hyatt <hyatt@apple.com>
513 Fix for 5441281, remove our dependency on cursor rects and drag margins
514 in AppKit for a large performance boost on the PLT and iBench.
518 * platform/mac/WidgetMac.mm:
519 (WebCore::safeRemoveFromSuperview):
520 (WebCore::Widget::addToSuperview):
521 Suppress the resetting of drag margins when views are added and removed.
523 (WebCore::Widget::setCursor):
524 Just use NSCursor's set method to immediately set the cursor. We no longer
525 rely on NSScrollView/NSClipView setDocumentCursor, since that is implemented
528 2007-08-29 Rick <rick@writhe.org.uk>
530 Reviewed by Tim Hatcher.
532 Fix http://bugs.webkit.org/show_bug.cgi?id=14853
533 Bug 14853: Incorrect implementation of ArrayImpl's equality operator
535 * platform/ArrayImpl.cpp:
536 (WebCore::ArrayImpl::operator==):
537 Fixed typo so that correct variable is used in equality comparison.
539 2007-08-29 Peter Kasting <zerodpx@gmail.com>
543 - fix http://bugs.webkit.org/show_bug.cgi?id=15096
544 Move the GIF frame duration minimum check into the various
545 ImageSource*.cpp backends and use the same values as
548 * platform/graphics/cairo/ImageSourceCairo.cpp:
549 (WebCore::ImageSource::frameDurationAtIndex):
550 * platform/graphics/qt/ImageSourceQt.cpp:
551 (WebCore::ImageSource::frameDurationAtIndex):
552 * platform/image-decoders/gif/GIFImageReader.cpp:
553 (GIFImageReader::read):
555 2007-08-29 Peter Kasting <zerodpx@gmail.com>
559 - fix http://bugs.webkit.org/show_bug.cgi?id=15097
560 Make PNGImageDecoder.cpp size its frame buffer vector in its
561 constructor, so it never throws decoded image data away no matter
562 what order its functions are called in.
564 * platform/image-decoders/png/PNGImageDecoder.cpp:
565 (WebCore::PNGImageDecoder::PNGImageDecoder):
566 (WebCore::PNGImageDecoder::frameBufferAtIndex):
567 (WebCore::PNGImageDecoder::decode):
568 (WebCore::PNGImageDecoder::rowAvailable):
569 (WebCore::PNGImageDecoder::pngComplete):
571 2007-08-29 Peter Kasting <zerodpx@gmail.com>
575 - fix http://bugs.webkit.org/show_bug.cgi?id=15104
576 Don't double-compensate for sizeof(unsigned) when making a buffer
577 overflow check in the GIF decoder. Now interlaced GIFs don't
578 sometimes get nothing/garbage in some of the bottom rows.
580 * platform/image-decoders/gif/GIFImageDecoder.cpp:
581 (WebCore::GIFImageDecoder::haveDecodedRow):
583 2007-08-28 Sam Weinig <sam@webkit.org>
587 Update fix landed in r25249 to account for XMLHttpRequest, which can also be EventTargets.
589 Tests: http/tests/security/listener/xss-XMLHttpRequest-addEventListener.html
590 http/tests/security/listener/xss-XMLHttpRequest-shortcut.html
592 * bindings/js/JSXMLHttpRequest.cpp:
593 (KJS::JSXMLHttpRequest::putValueProperty): Use the Window object associated with document's frame, not the active Window.
594 (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction): ditto
595 * xml/XMLHttpRequest.h:
596 (WebCore::XMLHttpRequest::document): Expose Document member so bindings can access the correct frame.
598 2007-08-28 Anders Carlsson <andersca@apple.com>
602 <rdar://problem/5424866> Bottom portion of any Web Clip widget appears transparent
604 Restore the previous behavior, creating plug-ins on attach, for WebKit plug-ins. Netscape plug-ins
605 are still created during the first layout.
607 * html/HTMLEmbedElement.cpp:
608 (WebCore::HTMLEmbedElement::getInstance):
609 Only call layout if the renderer doesn't have a widget.
611 * html/HTMLObjectElement.cpp:
612 (WebCore::HTMLObjectElement::getInstance):
615 * loader/FrameLoader.cpp:
616 (WebCore::FrameLoader::shouldUsePlugin):
617 Update for enum change.
619 * loader/FrameLoaderTypes.h:
620 Add ObjectContentNetscapePlugin and ObjectContentOtherPlugin.
622 * page/mac/WebCoreFrameBridge.h:
623 Get rid of the enum here, we can use the one in FrameLoaderTypes.h
625 * rendering/RenderPartObject.cpp:
626 (WebCore::RenderPartObject::updateWidget):
627 Only create the plug-in if it's not a Netscape plug-in.
629 (WebCore::RenderPartObject::layout):
632 2007-08-28 David Harrison <harrison@apple.com>
636 <rdar://problem/5415006> Command Left in a To Do causes caret to disappear
638 The selection was ending up inside non-editable content at the To Do Options
639 arrow image, rather then at the editable position just to the left of that image.
640 The problem was that startPositionForLine looked only at line boxes, and there
641 is no linebox for the editable position at the far left of a To Do, which is
642 a table. Addressed by having startPositionForLine use table offset 0 instead
643 of the first VisiblePosition inside the table.
645 Found and fixed the similar case with option-left (move by word position).
648 * editing/selection/mixed-editability-8.html: Added.
649 * editing/selection/mixed-editability-9.html: Added.
652 * editing/SelectionController.cpp:
653 (WebCore::SelectionController::modifyMovingLeftBackward):
655 * editing/VisiblePosition.cpp:
656 (WebCore::VisiblePosition::next):
657 (WebCore::VisiblePosition::previous):
658 (WebCore::VisiblePosition::stayInEditableContentLeft):
659 (WebCore::VisiblePosition::stayInEditableContentRight):
660 Factored stayInEditableContentLeft() and stayInEditableContentRight()
661 out of previous() and next().
663 * editing/VisiblePosition.h:
664 Declare stayInEditableContentLeft() and stayInEditableContentRight().
666 * editing/visible_units.cpp:
667 (WebCore::previousWordPosition):
668 (WebCore::nextWordPosition):
669 (WebCore::startOfLine):
670 (WebCore::endOfLine):
671 (WebCore::previousSentencePosition):
672 (WebCore::nextSentencePosition):
673 Call stayInEditableContentLeft() or stayInEditableContentRight(), as
674 appropriate, so prevent crossing from editable content into
677 (WebCore::startPositionForLine):
678 Use table offset 0 instead of the first VisiblePosition in the table.
680 2007-08-28 Mark Rowe <mrowe@apple.com>
682 Reviewed by Darin Adler.
684 <rdar://problem/5443453> Decreasing history expiration time from 1 year to 1 week can lead to long hang while icon database syncs
686 Perform the sync inside a SQLite transaction. This drops the time taken for the sync from over 90s to under half a second in the
687 extreme case of over 90,000 URLs being pruned.
689 * loader/icon/IconDatabase.cpp:
690 (WebCore::IconDatabase::syncDatabase):
692 2007-08-28 Mark Rowe <mrowe@apple.com>
694 Reviewed by Darin Adler.
696 <rdar://problem/5437983> Loading history containing 100,000 entries adds 20s to Safari's startup
698 Add a new constructor for HistoryItem that initializes the alternate title. This prevents WebHistoryItem
699 in WebKit from having explicitly set the display title, which triggers a history item changed notification
700 to be posted, for each history item loaded.
703 * history/HistoryItem.cpp:
704 (WebCore::HistoryItem::HistoryItem):
705 * history/HistoryItem.h:
707 2007-08-28 Anders Carlsson <andersca@apple.com>
711 <rdar://problem/5298296> XMLHttpRequest readyState 3 & responseText buffer issues
713 Add a shouldContentSniff flag to ResourceLoader and ResourceHandle and have XMLHttpRequest
714 pass in false when creating its subresource loader.
717 * loader/MainResourceLoader.cpp:
718 (WebCore::MainResourceLoader::MainResourceLoader):
719 (WebCore::MainResourceLoader::loadNow):
720 * loader/ResourceLoader.cpp:
721 (WebCore::ResourceLoader::ResourceLoader):
722 (WebCore::ResourceLoader::load):
723 * loader/ResourceLoader.h:
724 * loader/SubresourceLoader.cpp:
725 (WebCore::SubresourceLoader::SubresourceLoader):
726 (WebCore::SubresourceLoader::create):
727 * loader/SubresourceLoader.h:
728 * loader/mac/NetscapePlugInStreamLoaderMac.mm:
729 (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
730 * platform/mac/WebCoreSystemInterface.h:
731 * platform/mac/WebCoreSystemInterface.mm:
732 * platform/network/ResourceHandle.cpp:
733 (WebCore::ResourceHandle::ResourceHandle):
734 (WebCore::ResourceHandle::create):
735 * platform/network/ResourceHandle.h:
736 * platform/network/ResourceHandleInternal.h:
737 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
738 * platform/network/mac/ResourceHandleMac.mm:
739 (WebCore::ResourceHandle::start):
740 * xml/XMLHttpRequest.cpp:
741 (WebCore::XMLHttpRequest::send):
743 2007-08-27 Steve Falkenburg <sfalken@apple.com>
745 Added getter for committedFirstRealDocumentLoad.
749 * loader/FrameLoader.h: Added committedFirstRealDocumentLoad.
750 (WebCore::FrameLoader::committedFirstRealDocumentLoad): Added.
752 2007-08-27 Antti Koivisto <antti@apple.com>
756 Fix <rdar://problem/5433144>
757 REGRESSION: Unable to click "Select" link at Expedia for car rentals
759 javascript: URLs need special handling when serializing. Escaping them like
760 normal attribute values can do bad things. Try hard to not escape anything,
761 escape quote characters only if really necessary. Try to match Firefox.
763 Test: fast/innerHTML/javascript-url.html
765 * editing/markup.cpp:
766 (WebCore::urlAttributeToQuotedString):
767 (WebCore::startMarkup):
769 2007-08-27 David Hyatt <hyatt@apple.com>
771 Fix for 5441224, micro-optimizations to improve the PLT by 1%.
775 * css/CSSStyleSelector.cpp:
776 (WebCore::CSSStyleSelector::canShareStyleWithElement):
777 * platform/mac/FontMac.mm:
778 (WebCore::Font::drawGlyphs):
779 * rendering/RenderInline.cpp:
780 (WebCore::RenderInline::requiresLayer):
781 * rendering/RenderObject.cpp:
782 (WebCore::RenderObject::isBody):
783 * rendering/RenderObject.h:
784 (WebCore::RenderObject::renderArena):
785 (WebCore::RenderObject::isRoot):
787 2007-08-27 Mitz Pettel <mitz@webkit.org>
791 - fix http://bugs.webkit.org/show_bug.cgi?id=15091
792 Crash in RenderBlock::skipWhitespace during layout <rdar://problem/5439631>
794 Test: fast/replaced/applet-disabled-positioned.html
796 * html/HTMLAppletElement.cpp:
797 (WebCore::HTMLAppletElement::createRenderer): Changed to call
798 RenderObject::createObject(), which accounts for style.
800 2007-08-26 Antti Koivisto <antti@apple.com>
804 Fix for <rdar://problem/5433726>
805 Mail crash at WebCore::Frame::styleForSelectionStart() when deleting a selection in a HTML message (http://www.yahoo.com/)
807 Test: editing/style/temporary-span-crash.html
810 (WebCore::Frame::styleForSelectionStart):
811 Temporary span created here might not have renderer if document has style sheet that makes it display:none.
812 Set display:inline explicitly in spans style attribute. This temporary span does not need to get its display
813 value from actual document style sheets. Null check the renderer too to be sure.
816 2007-08-24 Sam Weinig <sam@webkit.org>
820 Fix for <rdar://problem/5426142>
822 Use the EventTarget's frame when creating the EventListener.
824 Tests: http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener.html
825 http/tests/security/listener/xss-JSTargetNode-onclick-shortcut.html
826 http/tests/security/listener/xss-window-onclick-addEventListener.html
827 http/tests/security/listener/xss-window-onclick-shortcut.html
829 * bindings/js/JSEventTargetNode.cpp:
830 (WebCore::JSEventTargetNode::setListener):
831 (WebCore::JSEventTargetNodePrototypeFunction::callAsFunction):
832 * bindings/js/kjs_window.cpp:
833 (KJS::WindowFunc::callAsFunction):
835 2007-08-25 Mitz Pettel <mitz@webkit.org>
837 Reviewed by Sam Weinig.
839 - fix http://bugs.webkit.org/show_bug.cgi?id=15077
840 REGRESSION: Cannot drag selected text out of a background window
842 * manual-tests/drag-out-of-background-window.html: Added.
843 * page/EventHandler.cpp:
844 (WebCore::EventHandler::eventMayStartDrag): Added missing coordinate
847 2007-08-25 Rob Buis <buis@kde.org>
851 http://bugs.webkit.org/show_bug.cgi?id=14848
852 DOM table rules are not updated when changed
854 On a dynamic rules attr change, mark the table cells and
855 their ancestors (up to and including the table tag) as
858 Tests: fast/table/rules-attr-dynchange1.html
859 fast/table/rules-attr-dynchange2.html
861 * html/HTMLTableElement.cpp:
862 (WebCore::isTableCellAncestor):
863 (WebCore::setTableCellsChanged):
864 (WebCore::HTMLTableElement::parseMappedAttribute):
866 2007-08-25 Adele Peterson <adele@apple.com>
870 Fix for http://bugs.webkit.org/show_bug.cgi?id=15073
871 <rdar://problem/5426557> REGRESSION: Can no longer drag text from textareas
873 Test: fast/forms/drag-out-of-textarea.html
875 * rendering/RenderTextControl.cpp: (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
876 Only restricts hit testing if the placeholder text is visible.
877 * rendering/RenderTextControl.h: (WebCore::RenderTextControl::placeholderIsVisible): Added.
879 2007-08-25 Peter Kasting <zerodpx@gmail.org>
881 Reviewed by Sam Weinig.
883 Part 2 of http://bugs.webkit.org/show_bug.cgi?id=14967.
884 Eliminate all remaining implicit conversions of wtf::Vector<T> to T*. Where code was
885 previously checking that the Vector's data pointer was non-NULL, check !Vector::isEmpty()
888 * bindings/js/kjs_navigator.cpp:
889 (KJS::PluginBase::cachePluginDataIfNecessary):
890 * loader/mac/LoaderNSURLExtras.m:
891 (suggestedFilenameWithMIMEType):
892 * page/FrameView.cpp:
893 (WebCore::FrameView::~FrameView):
894 (WebCore::FrameView::pauseScheduledEvents):
895 (WebCore::FrameView::resumeScheduledEvents):
896 (WebCore::FrameView::dispatchScheduledEvents):
897 * platform/mac/PlugInInfoStoreMac.mm:
898 (WebCore::PlugInInfoStore::createPluginInfoForPluginAtIndex):
900 2007-08-25 Mitz Pettel <mitz@webkit.org>
902 Rubber-stamped by Adam Roben
906 * platform/win/MouseEventWin.cpp: Removed.
908 2007-08-25 Jasper Bryant-Greene <m@ni.ac.nz>
910 Reviewed by Oliver Hunt.
912 Set paintingDisabled to true in Cairo's GraphicsContext constructor
913 when passed a null PlatformGraphicsContext.
915 * platform/graphics/cairo/GraphicsContextCairo.cpp:
916 (WebCore::GraphicsContext::GraphicsContext):
918 2007-08-25 Mitz Pettel <mitz@webkit.org>
920 Reviewed by Dave Hyatt.
922 - fix http://bugs.webkit.org/show_bug.cgi?id=15056
923 REGRESSION (r21472): Digg Podcasts Episodes Render "Digg" counter incorrectly
925 Covered by fast/parser/residual-style-close-across-n-blocks.html
927 * html/HTMLParser.cpp:
928 (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): If the
929 residual style was closed before anything else in the block (so it does
930 not apply to anything inside the block) avoid creating an empty element for
933 2007-08-25 Mitz Pettel <mitz@webkit.org>
935 Reviewed by Dave Hyatt.
937 - fix http://bugs.webkit.org/show_bug.cgi?id=14972
938 Moving cursor down in contentEditable section fails if styled line-height:1em
940 Test: editing/selection/move-by-line-003.html
942 * rendering/RenderText.cpp:
943 (WebCore::RenderText::positionForCoordinates): Changed hit testing so that each
944 line is tested for hits between its overflow top and the next line's overflow top.
945 This matches RenderBlock::positionForCoordinates.
947 2007-08-25 Mitz Pettel <mitz@webkit.org>
951 - fix http://bugs.webkit.org/show_bug.cgi?id=14792
952 <rdar://problem/5367763> REGRESSION: Copy inserts carriage return in middle of selection
954 Test: editing/pasteboard/newlines-around-floating-or-positioned.html
956 * editing/TextIterator.cpp:
957 (WebCore::shouldEmitNewlinesBeforeAndAfterNode): Do not emit newlines around
958 floating or positioned blocks. This behavior seems to match WinIE's.
960 2007-08-23 Justin Garcia <justin.garcia@apple.com>
964 <rdar://problem/5432254> GoogleDocs: A hang occurs when applying list style to selected table
966 * editing/DeleteSelectionCommand.cpp:
967 (WebCore::DeleteSelectionCommand::handleGeneralDelete): If the position
968 that marked the start of the range to delete has been removed from the
969 document, and it was inside the node that holds the position that marks
970 the end of the range to delete, don't remove any children of that node,
971 because we don't know how many to remove. For example, if the end is
972 [a, 5] and the start was in some descendant of a and was removed, don't
973 remove any of the children of a. We will now refuse to remove some content
974 incorrectly, but that's less dangerous than removing content incorrectly.
975 Long term we need to update these positions as we remove content from the
976 document, but that seems like a more risky change. Added a testcase.
977 * editing/InsertListCommand.cpp:
978 (WebCore::InsertListCommand::modifyRange): If the end of the selection to
979 modify is just after a table, and if the start of the selection is inside
980 that table, the last paragraph that we'll want modify is the last one inside
981 the table, not the paragraph that contains the table itself. Adjust
982 startOfLastParagraph here to avoid infinite recursion.
984 2007-08-24 Anders Carlsson <andersca@apple.com>
988 <rdar://problem/5430165>
989 REGRESSION: Dynamically loaded images fail to load
991 * html/HTMLImageLoader.cpp:
992 (WebCore::HTMLImageLoader::HTMLImageLoader):
993 Initialize the m_elementIsProtected member.
995 (WebCore::HTMLImageLoader::~HTMLImageLoader):
996 Assert that the element is not protected.
998 (WebCore::HTMLImageLoader::setLoadingImage):
999 If the image is not null, protect the element. Otherwise, unprotect it.
1001 (WebCore::HTMLImageLoader::dispatchLoadEvent):
1002 Unprotect the element here.
1004 (WebCore::HTMLImageLoader::protectElement):
1005 (WebCore::HTMLImageLoader::unprotectElement):
1006 New methods which protect and unprotect the element.
1008 * html/HTMLImageLoader.h:
1010 2007-08-24 Kevin McCullough <kmccullough@apple.com>
1014 2007-08-24 Beth Dakin <bdakin@apple.com>
1016 Reviewed by Hyatt and Adele.
1018 Fix for <rdar://problem/5417203> Google Gmail 1.0 widget - unread
1021 * rendering/FixedTableLayout.cpp:
1022 (WebCore::FixedTableLayout::calcWidthArray): Calc pref widths for
1023 our cells, if needed.
1025 2007-08-24 Kevin McCullough <kmccullough@apple.com>
1029 <rdar://problem/5437038> 1 credential object leaked for each call to credentialWithUser:password:persistence
1030 - Use initWithUser instead of credentialWithUser because credentialWithUser leaks.
1032 * platform/network/mac/AuthenticationMac.mm:
1034 * platform/network/mac/ResourceHandleMac.mm:
1035 (-[WebCoreResourceHandleAsDelegate connection:didReceiveAuthenticationChallenge:]):
1036 (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]):
1038 2007-08-24 Jon Honeycutt <jhoneycutt@apple.com>
1042 <rdar://problem/5433236> Print preview of empty txt file crashes Safari
1043 Fix: Adjust computePageRectsForFrame to always return at least one
1044 page rect, even if document height is zero.
1046 * WebCore.vcproj/WebCore.vcproj:
1047 * bridge/win/FrameWin.h: Added Vector& parameter to
1048 computePagesRectsForFrame; changed its return type to void.
1049 * bridge/win/FrameWin.cpp:
1050 (WebCore::computePageRectsForFrame): Reordered the loop that inserts
1051 rects into the vector.
1053 2007-08-24 Antti Koivisto <antti@apple.com>
1057 Fix <rdar://problem/5393758>
1058 Crash in WebCore::FontData::platformInit
1060 Null check glyph page.
1062 If font has somehow failed to initialize it is possible to have null glyph page. Based on
1063 crash dumps this seems to occasionally happen when running Mail under guard malloc.
1065 No test case, I don't know how to get to this state.
1067 * platform/FontData.cpp:
1068 (WebCore::FontData::FontData):
1069 * platform/mac/FontDataMac.mm:
1070 (WebCore::FontData::platformInit):
1072 2007-08-24 George Wright <george.wright@collabora.co.uk>
1076 http://bugs.webkit.org/show_bug.cgi?id=15071
1077 [cairo] SVG skews are incorrect
1079 Fix Cairo implementation of AffineTransform::shear so that shearing is
1080 done in the correct direction.
1082 * platform/graphics/cairo/AffineTransformCairo.cpp:
1083 (WebCore::AffineTransform::shear):
1085 2007-08-23 Anders Carlsson <andersca@apple.com>
1089 If necessary, re-set the window proc after each call to NPP_SetWindow. This is to ensure that
1090 our window proc is always run even if a plug-in subclasses the window and replaces the window proc.
1092 Also, make sure that the default window proc is of type ASCII so we can eliminate the
1093 * plugins/win/PluginViewWin.cpp:
1094 (WebCore::registerPluginView):
1095 (WebCore::PluginViewWndProc):
1096 (WebCore::PluginViewWin::setNPWindowRect):
1097 (WebCore::PluginViewWin::stop):
1098 (WebCore::PluginViewWin::determineQuirks):
1099 (WebCore::PluginViewWin::PluginViewWin):
1100 (WebCore::PluginViewWin::init):
1101 * plugins/win/PluginViewWin.h:
1103 (WebCore::PluginViewWin::pluginWndProc):
1105 2007-08-23 Justin Garcia <justin.garcia@apple.com>
1109 <rdar://problem/5156801> REGRESSION: Crash at DeleteSelectionCommand::doApply() when deleting table content
1111 * editing/DeleteSelectionCommand.cpp:
1112 (WebCore::DeleteSelectionCommand::handleGeneralDelete): Use a RefPtr
1113 for node. If the node to be removed contains the selection, and if
1114 the next node to be removed (nextNode) is inside the deletion UI,
1115 removing node will remove nextNode from the document. nextNode is
1116 a RefPtr, but node isn't and when nextNode falls out of scope the node
1117 that node points to will be destroyed and we'll end up using a stale pointer.
1118 Long term we should probably just disable the deletion UI before editing
1119 operations because the undo of the removal of node in the situation
1120 described above relies on the presence of the deletion UI, but it isn't
1121 present because its added and removed in a non-undoable way.
1123 2007-08-23 Mitz Pettel <mitz@webkit.org>
1127 - fix http://bugs.webkit.org/show_bug.cgi?id=14899
1128 !d->m_view->needsLayout() in Frame::paint() (Causes assert)
1130 WebKit copies the width and height attributes of an <embed> to its
1131 nearest <object> ancestor. This used to be done in updateWidget(), but
1132 that could lead to the document being dirty right after layout and
1133 before painting. The patch moves the copying of the attributes to when
1134 the <embed> is inserted into the document or its attributes change.
1136 * html/HTMLEmbedElement.cpp:
1137 (WebCore::HTMLEmbedElement::insertedIntoDocument):
1138 (WebCore::HTMLEmbedElement::attributeChanged):
1139 * html/HTMLEmbedElement.h:
1140 * manual-tests/bugzilla-14899.html: Added.
1141 * rendering/RenderPartObject.cpp:
1142 (WebCore::RenderPartObject::updateWidget):
1144 2007-08-22 Anders Carlsson <andersca@apple.com>
1146 Reviewed by Darin and Oliver.
1148 <rdar://problem/5422410>
1149 http://bugs.webkit.org/show_bug.cgi?id=15019
1150 REGRESSION (r25124-r25140): New posts and hot topics won't show at mobile01.com
1152 Remove the call to checkCallImplicitClose(). Calling it in loadPlugin is bad for two reasons:
1154 1. It could cause onload to be dispatched even when the page has subresources that are still
1155 loading, such as images.
1157 2. Now that loadPlugin is called during layout, it could cause onload to be dispatched during
1158 layout, which can execute javascript and do pretty much anything while the render tree is in an
1161 * loader/FrameLoader.cpp:
1162 (WebCore::FrameLoader::loadPlugin):
1164 2007-08-22 Anders Carlsson <andersca@apple.com>
1168 <rdar://problem/5430584>
1169 http://bugs.webkit.org/show_bug.cgi?id=15053
1170 WebKit does not check Windows Registry HKEY_CURRENT_USER for NPAPI plugin locations
1172 * plugins/win/PluginDatabaseWin.cpp:
1173 (WebCore::addPluginsFromRegistry):
1174 (WebCore::PluginDatabaseWin::getPluginsInPaths):
1176 2007-08-22 Justin Garcia <justin.garcia@apple.com>
1180 <rdar://problem/5418891> CrashTracer: [USER] 1 crash in Mail at -[WebViewEditor webView:shouldInsertText:replacingDOMRange:givenAction:]
1182 * editing/BreakBlockquoteCommand.cpp:
1183 (WebCore::BreakBlockquoteCommand::doApply): We're reusing the topBlockquote
1184 variable. Null it out first. If there is no new topBlockquote and we don't null
1185 it out first, we'll assume that there was a new one and crash.
1187 2007-08-22 Kevin McCullough <kmccullough@apple.com>
1191 - rdar:5423067 Reapplyingthe change but only when the text area is in focus.
1193 * html/HTMLTextAreaElement.cpp:
1194 (WebCore::HTMLTextAreaElement::setValue):
1196 2007-08-21 David Hyatt <hyatt@apple.com>
1198 Fix for <rdar://problem/5249757> Painting of JPGs in WebKit is too slow.
1200 Use a new Leopard API for fast tiling of images. We only use this API
1201 when the whole image is being tiled and when the current CGImageRef to tile
1202 has a size that matches the size of the whole image.
1204 We can optimize border-image in the future by adding a cache of the 9
1209 * platform/graphics/cg/ImageCG.cpp:
1210 (WebCore::Image::drawPattern):
1212 2007-08-22 Kevin McCullough <kmccullough@apple.com>
1214 - Rolling back since I need to update some layouttests this change breaks.
1216 * html/HTMLTextAreaElement.cpp:
1217 (WebCore::HTMLTextAreaElement::setValue):
1219 2007-08-21 Kevin McCullough <kmccullough@apple.com>
1221 Reviewed by Geof, Adam, Hyatt, Maciej and Oliver.
1223 - In order to match the behavior of the other major browsers, selection is moved to the end of the text value when a change occurs to the contents of a text area instead of remembering the location of the selection.
1224 - <rdar://problem/5423067> gmail is super annoying when trying to add a new name to the TO, CC or BCC fields
1226 * html/HTMLTextAreaElement.cpp:
1227 (WebCore::HTMLTextAreaElement::setValue):
1229 2007-08-21 Adam Roben <aroben@apple.com>
1233 Keep FrameView::layoutIfNeededRecursive Windows- and Gtk-only for now
1234 (sadly). This will have to wait until we merge ScrollView and FrameView.
1238 * page/FrameView.cpp:
1241 2007-08-21 Adam Roben <aroben@apple.com>
1243 Fix an ASSERT when using Find in Page
1249 * bridge/win/FrameWin.cpp:
1250 (WebCore::imageFromSelection): Make sure to update layout before
1251 painting so we don't hit an ASSERT in painting code (Frame::selectionImage
1252 in FrameMac.mm does this as well).
1254 2007-08-21 Adam Roben <aroben@apple.com>
1256 Made FrameView::layoutIfNeededRecursive available to all platforms
1258 Currently it's only used on Gtk+ and Windows.
1262 * page/FrameView.cpp: Removed #ifdef.
1263 * page/FrameView.h: Ditto.
1265 2007-08-21 Adele Peterson <adele@apple.com>
1267 Build fix for release build.
1269 * rendering/AutoTableLayout.cpp:
1270 (WebCore::AutoTableLayout::calcEffectiveWidth):
1271 (WebCore::AutoTableLayout::layout):
1273 2007-08-21 Mitz Pettel <mitz@webkit.org>
1277 - fix http://bugs.webkit.org/show_bug.cgi?id=15010
1278 <rdar://problem/5423956> REGRESSION (r25000-r25065): Table rendering broken by a recent nightly
1280 Test: fast/table/max-width-integer-overflow.html
1282 Avoid integer overflows when dealing with maximum widths by
1283 1) using floating point arithmetic when summing or multiplying column max widths
1284 2) capping max widths at INT_MAX / 2
1286 * rendering/AutoTableLayout.cpp:
1287 (WebCore::AutoTableLayout::calcPrefWidths):
1288 (WebCore::AutoTableLayout::calcEffectiveWidth):
1289 (WebCore::AutoTableLayout::layout):
1291 2007-08-20 John Sullivan <sullivan@apple.com>
1293 Reviewed by Adam Roben
1295 WebCore part of fix for:
1296 <rdar://problem/5417777> WebKit focus ring color no longer matches system focus rings
1298 Adele wrote the first version of this patch. No test cases added because I made sure the
1299 layout tests are unaffected. Two additional bug fixes were made in passing, but neither
1300 of them had any effect on any known real-world case, and both were too difficult to write
1301 test cases for to be worthwhile.
1304 added symbols for these new functions so WebKit can call them
1306 * WebCore.xcodeproj/project.pbxproj:
1307 updated for new file
1309 * platform/graphics/mac/ColorMac.h: Added.
1310 New file to hold the increasing amount of Mac-specific color stuff.
1312 * platform/graphics/Color.h:
1313 removed #if PLATFORM(MAC) code, which is now in ColorMac.h
1315 * platform/graphics/mac/ColorMac.mm:
1316 (WebCore::makeRGBAFromNSColor):
1317 new static function to convert an NSColor object to an RGBA32 struct
1318 (WebCore::colorFromNSColor):
1319 new public function to convert an NSColor object to a WebCore-style Color object
1320 (WebCore::focusRingColor):
1321 Uses (cached) systemFocusRingColor instead of hardwired values, unless usesTestModeFocusRingColor is true,
1322 in which case it uses the old hardwired color
1323 (WebCore::usesTestModeFocusRingColor):
1324 returns value of global var
1325 (WebCore::setUsesTestModeFocusRingColor):
1326 sets value of global var
1327 (+[WebCoreControlTintObserver controlTintDidChange]):
1328 Uses [NSColor keyboardFocusIndicatorColor] to set systemFocusRingColor; don't compile if COLORMATCH_EVERYTHING
1329 is set since we don't know what it would take to satisfy this state.
1331 * bindings/objc/DOMRGBColor.mm:
1332 now includes ColorMac.h to account for moved declarations
1333 * bridge/mac/WebCoreAXObject.mm:
1336 * page/mac/FrameMac.mm:
1337 (WebCore::convertAttributesToUnderlines):
1338 now uses new colorFromNSColor. The old code was swapping G & B, but it didn't matter in practice because
1339 this function is only used to convert the color of an input manager's marked text underline, which is always black
1341 * page/mac/WebCoreFrameBridge.mm:
1342 (-[WebCoreFrameBridge setBaseBackgroundColor:]):
1343 now uses new colorFromNSColor. The old code was swapping G & B, but it didn't matter in practice because
1344 this function is only called with a grayscale color perhaps containing an alpha value
1346 * rendering/RenderView.cpp:
1347 (WebCore::RenderView::paintBoxDecorations):
1348 just updated a comment
1350 2007-08-20 Mitz Pettel <mitz@webkit.org>
1352 Reviewed by Dave Hyatt.
1354 - fix http://bugs.webkit.org/show_bug.cgi?id=15023
1355 REGRESSION (r21113-r21143): JavaScript tooltip rendering bug
1357 Test: fast/repaint/layer-visibility.html
1359 * rendering/RenderLayer.cpp:
1360 (WebCore::RenderLayer::setHasVisibleContent): Cache the layer's
1361 rects when it changes to visible.
1363 2007-08-20 Kevin Decker <kdecker@apple.com>
1367 Fixed: <rdar://problem/5325262> REGRESSION (Tiger-Leopard): PictureTalk plug-in doesn't work
1369 The problem was that this particular plug-in handles "text/ptf", but WebCore wasn't giving the plug-in a chance to load
1370 any type with "text/"
1372 * dom/DOMImplementation.cpp:
1373 (WebCore::DOMImplementation::createDocument): Allow plug-ins to once again use "text/" MIME types, but only if the MIME
1374 type is not "text/plain". Disallowing plug-ins to use text/plain prevents plug-ins from hijacking a fundamental type
1375 that the browser is expected to handle, and also serves as an optimization to prevent loading the plug-in database in
1378 2007-08-20 Adam Roben <aroben@apple.com>
1380 Remove workarounds for <rdar://problem/5386894> now that it's been fixed
1384 Tests: fast/loader/local-svg-parsed-as-svg.svg
1385 fast/loader/local-xhtml-parsed-as-xhtml.xhtml
1387 * platform/network/cf/ResourceResponseCFNet.cpp:
1388 (WebCore::ResourceResponse::doUpdateResourceResponse): Removed hackish
1391 2007-08-20 Anders Carlsson <andersca@apple.com>
1395 <rdar://problem/5412988>
1396 Crash when visiting http://www.rockonflash.com/blog/?p=58
1398 * plugins/win/PluginViewWin.cpp:
1399 (WebCore::PluginViewWin::updateWindow):
1400 Just return if the plugin view hasn't been inserted in the hierarchy yet.
1402 2007-08-20 Holger Hans Peter Freyther <zecke@selfish.org>
1406 Do not define svg as ImageMIMEType if we can use ksvg2.
1408 * platform/MIMETypeRegistry.cpp:
1409 (WebCore::initialiseSupportedImageMIMETypes):
1411 2007-08-19 Adam Roben <aroben@apple.com>
1415 * platform/gdk/TemporaryLinkStubs.cpp: Removed const.
1417 2007-08-19 Adam Roben <aroben@apple.com>
1419 Fix <rdar://5395835> REGRESSION (r24527): Context menu for edit fields is missing "Font & Writing Direction"
1421 The problem was that ContextMenuItem::setSubMenu was just copying the
1422 HMENU from the ContextMenu passed in on Windows, but that HMENU was
1423 later getting destroyed when the ContextMenu went out of scope.
1425 I added a new ContextMenu::releasePlatformDescription method that is
1426 used in setSubMenu instead. I think an ultimately better design would
1427 be for setSubMenu to take ownership of the ContextMenu that's passed in
1428 (as should insertItem and appendItem), but I decided to be conservative
1429 and just make the changes needed to fix the bug.
1435 * platform/ContextMenu.h: Added releasePlatformDescription.
1436 * platform/gdk/TemporaryLinkStubs.cpp: Added stub implementation.
1437 * platform/mac/ContextMenuMac.mm:
1438 (WebCore::ContextMenu::releasePlatformDescription): Implemented, though
1439 it's never called on this platform.
1440 * platform/qt/ContextMenuQt.cpp:
1441 (WebCore::ContextMenu::releasePlatformDescription): Ditto.
1442 * platform/win/ContextMenuItemWin.cpp:
1443 (WebCore::ContextMenuItem::setSubMenu): Call releasePlatformDescription
1444 since we need to take ownership of the HMENU.
1445 * platform/win/ContextMenuWin.cpp:
1446 (WebCore::ContextMenu::releasePlatformDescription): Implemented.
1448 2007-08-18 Maciej Stachowiak <mjs@apple.com>
1452 - fixed <rdar://problem/5198272> REGRESSION: PLT 1.5% slower due to r21367 (change to start frames with empty documents)
1454 There were three main cuases of extra time due to creating the initial empty document:
1456 1) Creating an extra WebHTMLView and swapping it for a new one for each frame created.
1457 2) Parsing the minimal markup for the initial document's contents.
1458 3) Clearing the Window object an extra time and dispatching the corresponding delegate method.
1460 The WebCore part of the fixes addresses 2 and 3.
1462 * loader/FrameLoader.cpp:
1463 (WebCore::FrameLoader::init): Don't parse "<html><body>" for the initial
1464 empty document; it turns out not to be needed.
1465 (WebCore::FrameLoader::dispatchWindowObjectAvailable): Don't
1466 dispatch the delegate if we haven't created a ScriptInterpreter yet.
1467 * bindings/js/kjs_proxy.cpp:
1468 (WebCore::KJSProxy::initScriptIfNeeded): Dispatch the window object
1469 delegate when we first create the interpreter, since that is now done
1471 * loader/FrameLoader.h:
1472 (WebCore::FrameLoader::committingFirstRealLoad): Helper for WebKit
1473 to know when to reuse a WebHTMLView.
1475 2007-08-19 Mitz Pettel <mitz@webkit.org>
1477 Reviewed by Adam Roben.
1479 - fix http://bugs.webkit.org/show_bug.cgi?id=15008
1480 ASSERTION FAILED: !firstLineBox() == !lastLineBox() setting content on image
1482 Test: fast/images/text-content-crash-2.html
1484 * html/HTMLImageLoader.cpp:
1485 (WebCore::HTMLImageLoader::setImage): Added a check that the renderer is an
1487 (WebCore::HTMLImageLoader::updateFromElement): Ditto.
1488 (WebCore::HTMLImageLoader::notifyFinished): Ditto.
1490 2007-08-17 Maciej Stachowiak <mjs@apple.com>
1494 - WebCore part of fix to scrollbar suppression hack for Leopard
1496 * loader/FrameLoader.cpp:
1497 (WebCore::FrameLoader::transitionToCommitted): Suppress scrollbars earlier, so it happens
1498 before any potential view swap.
1500 2007-08-17 Antti Koivisto <antti@apple.com>
1504 Fix <rdar://problem/5403773>
1505 CrashTracer: [USER] 88 crashes in Safari at com.apple.WebCore: WebCore::RenderTableSection::paint + 846
1507 * rendering/RenderBlock.cpp:
1508 (WebCore::RenderBlock::removePositionedObjects):
1510 Fix crash in http://www.infobae.com/interior/home.html
1511 Positioned objects removed from m_positionedObjects would in some cases not get added back to any
1512 positioned objects list. Adding objects happens in block layout but since layout was not invalidated
1513 correctly in removePositionedObjects() it would not get invoked. As a result some positioned objects
1514 would stay in layout dirty state leading to crashes and other bad things.
1516 * rendering/RenderTableSection.cpp:
1517 (WebCore::RenderTableSection::paint):
1519 Add needLayout() guard to eliminate this class of crashes from release builds.
1520 Assert commented out for now since one existing layout test can't handle it.
1522 2007-08-17 Kevin Decker <kdecker@apple.com>
1524 Code change by Darin, landed and reviewed by me.
1526 Fixed: <rdar://problem/5252836> Adobe Help Viewer: Japanese characters in the Help Tree structure are shown as garbage
1527 Added fast/encoding/namespace-tolerance.html test.
1529 * loader/TextResourceDecoder.cpp:
1530 (WebCore::TextResourceDecoder::checkForHeadCharset): Slightly loosen the charset decoder heuristic by tweaking it
1531 to ignore namespaces. This restores compatibility to documents which (1) use namespace prefixes on HTML elements
1532 (2) specify a non-latin charset and (3) contain non-latin characters.
1534 Added fast/encoding/namespace-tolerance.html test.
1536 2007-08-17 Anders Carlsson <andersca@apple.com>
1538 Reviewed by Dave Hyatt.
1540 <rdar://problem/5379040>
1541 REGRESSION (Tiger-Leopard): ADOBE: Safari calls NPP_SetWindow with bad values sometimes
1543 Instantiate plug-ins during the first layout instead of doing so when creating the renderer.
1544 This ensures that the plug-in widget will have a correct initial size.
1546 * html/HTMLEmbedElement.cpp:
1547 (WebCore::HTMLEmbedElement::getInstance):
1548 Force a layout if the plug-in doesn't have an instance.
1550 (WebCore::HTMLEmbedElement::attach):
1551 Pass true to updateWidget, causing it to only create a widget if it won't be a plug-in.
1553 * html/HTMLIFrameElement.cpp:
1554 (WebCore::HTMLIFrameElement::attach):
1555 Pass false to updateWidget, this will only create subframes anyway.
1557 * html/HTMLObjectElement.cpp:
1558 (WebCore::HTMLObjectElement::getInstance):
1559 Force a layout if the plug-in doesn't have an instance.
1561 (WebCore::HTMLObjectElement::attach):
1562 Pass true to updateWidget, causing it to only create a widget if it won't be a plug-in.
1564 * loader/FrameLoader.cpp:
1565 (WebCore::FrameLoader::loadPlugin):
1566 Get the size from the renderer and pass it to the client.
1568 * loader/FrameLoaderClient.h:
1569 * page/mac/WebCoreFrameBridge.h:
1570 * platform/graphics/svg/SVGImageEmptyClients.h:
1571 (WebCore::SVGEmptyFrameLoaderClient::createPlugin):
1572 Update declarations.
1574 * rendering/RenderPart.cpp:
1575 (WebCore::RenderPart::setWidget):
1576 No need to mark the renderer as dirty here.
1578 * rendering/RenderPartObject.h:
1579 * rendering/RenderPartObject.cpp:
1580 (WebCore::RenderPartObject::updateWidget):
1581 Add a parameter, onlyCreateNonPlugins. If this is true the widget
1582 will only be created if it's not a plug-in.
1584 (WebCore::RenderPartObject::layout):
1585 Call updateWidget here if m_widget is 0, causing the plug-in to be instantiated.
1587 2007-08-17 Oliver Hunt <oliver@apple.com>
1591 http://bugs.webkit.org/show_bug.cgi?id=14189
1592 <rdar://problem/5319511> REPRODUCIBLE CRASH: Canvas createPattern(canvas, ...) crashes on Windows (14189)
1594 Ensure that we actually retain the CG pattern correctly.
1596 Credit to Henry Mason <hmason@mac.com> for finding the cause of this.
1598 * html/CanvasPattern.cpp:
1599 (WebCore::CanvasPattern::~CanvasPattern):
1600 (WebCore::CanvasPattern::createPattern):
1601 * html/CanvasPattern.h:
1602 (WebCore::CanvasPattern::platformImage):
1604 2007-08-16 Geoffrey Garen <ggaren@apple.com>
1609 (WebCore::Cache::pruneLiveResources):
1610 (WebCore::Cache::pruneDeadResources):
1612 2007-08-16 Justin Garcia <justin.garcia@apple.com>
1614 Reviewed by Harrison.
1616 <rdar://problem/5378473>
1617 REGRESSION: Undoing a deletion that is part of an open typing command fails to reinsert the caret
1619 We recently made Undo of a series of deletes select all of the
1620 characters that were deleted, not just the most recently deleted
1621 character. But the code that did this set a new starting selection
1622 after every delete, even those that were part of an open typing
1623 command that started with character insertions or forward deletes,
1624 operations that when undone, remove the starting selection being
1625 set from the document.
1627 After this change we only set a new starting selection if the open typing
1628 command was opened by a backward delete. The new behavior matches TextEdit.
1629 We don't do something similar or forward deletes because TextEdit opens
1630 and closes a new typing command on forward delete (added a FIXME about this).
1632 * editing/TypingCommand.cpp:
1633 (WebCore::TypingCommand::TypingCommand): Initialize
1634 m_openedByBackwardDelete.
1635 (WebCore::TypingCommand::forwardDeleteKeyPressed): Added a FIXME about
1636 how in TextEdit, forward deletes open and close a new typing command.
1637 (WebCore::TypingCommand::doApply): Set m_openedByBackwardDelete
1639 (WebCore::TypingCommand::deleteKeyPressed): Only set the starting
1640 selection if this delete is the first one in an open typing command
1641 or one in a series of deletes that opened the typing command.
1642 * editing/TypingCommand.h: Added m_openedByBackwardDelete.
1644 2007-08-13 Geoffrey Garen <ggaren@apple.com>
1646 Reviewed by Dave Hyatt.
1648 Tweaked the cache eviction model to better balance between live and
1651 For the sake of avoiding evictions during the PLT, the old model
1652 required the sum of dead and live resources to grow to twice the cache
1653 capacity before evicting, and would then evict dead or live down to 0
1654 if necessary. This was a too-high high water mark, which would nullify
1655 much of the value of eviction, and a too-low low water mark, which
1656 would nullify much of the value of the LRU-SP strategy.
1658 This patch changes the model in 3 ways.
1660 1. The new model for dead resources is a flexible window with a fixed
1661 minimum and maximum. The dead resource window is big when live resource
1662 pressure is small, and vice versa. This has the immediate advantage of
1663 cutting the high water mark by up to 50%. It also enables the following
1664 tunable optimizations in future patches:
1665 a. A dead resource limit of 0 for clients who want that. (Just set
1666 the fixed maximum to 0.)
1667 b. A much higher low water mark. (Just set the fixed minimum to,
1668 say, 25% of the cache's capacity.)
1669 c. A much lower high water mark for users who browse simple pages
1670 in one tab. (Just set the fixed maximum to, say, 50% of the cache's
1673 I plan to make the changes that actually take advantage of these
1674 tunable optimizations in another check-in.
1676 The new model won't hurt the PLT because it will notice the PLT's low
1677 live resource size, and up the dead resource capacity in response. For
1678 the same reason, the new model should establish a good balance in
1681 2. Live resource eviction is now based on size(), not encodedSize().
1682 So, a page with lots of large, encoded images will start evicting
1683 resources, if necessary, even before all the images paint. This allows
1684 you to more accurately stipulate an exact high water mark.
1686 3. When pruning, prune to a small percentage below capacity, to avoid
1687 just having to prune again immediately.
1689 Layout tests pass. PLT shows no regression.
1691 * history/PageCache.cpp:
1692 (WebCore::PageCache::releaseAutoreleasedPagesNow): Updated for rename.
1694 * loader/Cache.cpp: Implemented the algorithm explained above.
1695 * loader/Cache.h: Removed explicit tracking of decoded data size, since
1698 * loader/CachedResource.cpp: ditto on tracking of decoded data size
1700 2007-08-16 Darin Adler <darin@apple.com>
1702 Reviewed by Tim Hatcher.
1704 - fix <rdar://problem/5415029> In Mail, a crash occurs at WebCore::Node::isDescendantOf()
1705 when attempting to delete a selection in a table
1707 The bug was caused by createMarkup trying to operate on a range that
1708 has an endpoint in the delete button DOM, because it removes that DOM
1709 during its operation! Still working on a regression test -- it's hard
1710 to make the kind of bad selection that's needed with the DOM, so I might
1711 have to use the eventSender.
1713 * editing/DeleteButtonController.h: Made some of the identifiers private.
1714 We can make them public if we need to use them. Added a getter function
1715 for the container element so we can figure out if a given node is inside
1716 the DOM added for the delete button.
1718 * editing/markup.cpp:
1719 (WebCore::moveEndpointsBeforeNode): Added. General purpose helper function
1720 that moves endpoints of a range to before a given node -- we do this before
1721 removing the delete button, so the endpoint is where the delete button was,
1722 rather than having an endpoint that's not in the document.
1723 (WebCore::createMarkup): Always return empty string, not null string.
1724 Get the document by calling ownerDocument on the range rather than getting
1725 the document of the commonAncestorContainer. That's because we need to
1726 get at the delete button before calling commonAncestorContainer. Call
1727 moveEndpointsBeforeNode to move the range endpoints out of the delete
1728 button interface before calling disable() which will remove it from the
1729 DOM if it's in there. Added an early return for the case where commonAncestor
1730 is non-0. If this happens, we would crash later because pastEndNode would
1731 not be in the tree. This change alone would prevent the crash, but we'd get
1732 bad markup, so we need the moveEndpointsBeforeNode fix. Added null checks
1733 for the frame to the range version as in the single-node version so this
1734 won't crash immediately on documents that are not in a frame. For the
1735 single-node version, added a check if a ndoe of 0 and a node inside the
1736 delete button user interface, and return the empty string for those cases.
1738 2007-08-16 Justin Garcia <justin.garcia@apple.com>
1742 <rdar://problem/5378847> After creating and removing a ToDo, the caret disappears as soon as I start to type
1744 * editing/InsertTextCommand.cpp:
1745 (WebCore::InsertTextCommand::input): A whitespace text node inserted by Mail
1746 when a ToDo is removed is completely removed by deleteInsignificantWhitespace,
1747 and since it contains the text insertion position, insertion fails.
1748 Save the position before the node where text insertion will occur,
1749 and if that node is removed, use the saved position for insertion.
1751 2007-08-16 Darin Adler <darin@apple.com>
1755 - fix <rdar://problem/5413488> REGRESSION: every DOM element is about 40
1756 bytes bigger because it has a Timer
1758 Moved the timer to the document from the element.
1760 * dom/Document.h: Made frame() inline. Added updateFocusApperanceSoon(),
1761 cancelFocusAppearanceUpdate(), m_updateFocusAppearanceTimer,
1762 clearXMLVersion(), and updateFocusAppearanceTimerFired(). Also made
1763 everything that was previously protected be private instead.
1765 (WebCore::Document::Document): Initialize m_updateFocusAppearanceTimer.
1766 (WebCore::Document::updateFocusAppearanceSoon): Added. Starts timer.
1767 (WebCore::Document::cancelFocusAppearanceUpdate): Added. Stops timer.
1768 (WebCore::Document::updateFocusAppearanceTimerFired): Added. If the
1769 focused node is a focusable element, then calls
1770 updateFocusAppearance(false) on it.
1772 * dom/Element.h: Removed default value of the boolean parameter to
1773 updateFocusAppareance. Removed needsFocusAppearanceUpdate(),
1774 setNeedsFocusAppearanceUpdate(), updateFocusAppearanceTimerFired(),
1775 stopUpdateFocusAppearanceTimer(), m_updateFocusAppearanceTimer, and
1776 m_needsFocusAppearanceUpdate. Added
1777 updateFocusAppearanceSoonAfterAttach() and cancelFocusAppearanceUpdate().
1779 (WebCore::ElementRareData::ElementRareData): Added initializer for
1780 m_needsFocusAppearanceUpdateSoonAfterAttach.
1781 (WebCore::Element::Element): Removed initializers for
1782 m_updateFocusAppearanceTimer and m_needsFocusAppearanceUpdate.
1783 (WebCore::Element::attach): Updated code that starts the focus
1784 appearance timer to instead call updateFocusAppearanceSoon() on the
1786 (WebCore::Element::detach): Replaced call to
1787 stopUpdateFocusAppearanceTimer with call to cancelFocusAppearanceUpdate.
1788 (WebCore::Element::focus): Added check for node that's already focused,
1789 to match the logic that's in the derived classes. This makes it safe for
1790 us to remove the override in the derived classes. Also replaced the code
1791 that called setNeedsFocusAppearanceUpdate(true) with code to set the
1792 rare data flag m_needsFocusAppearanceUpdateSoonAfterAttach and added a
1793 call to cancelFocusAppearanceUpdate() in the case where there's no focus
1795 (WebCore::Element::blur): Replaced call to
1796 stopUpdateFocusAppearanceTimer with call to cancelFocusAppearanceUpdate.
1797 (WebCore::Element::cancelFocusAppearanceUpdate): Added. Sets
1798 m_needsFocusAppearanceUpdateSoonAfterAttach to false, and then calls
1799 cancelFocusAppearanceUpdate() on the document, but only if the element
1800 is the focused node of the document.
1802 * html/HTMLDocument.cpp:
1803 (WebCore::HTMLDocument::HTMLDocument): Replaced code that sets
1804 m_xmlVersion directly with a call to a new inline clearXMLVersion()
1806 (WebCore::HTMLDocument::setCookie): Replaced use of m_policyBaseURL with
1808 (WebCore::HTMLDocument::createTokenizer): Replaced uses of m_frame with
1810 (WebCore::HTMLDocument::determineParseMode): Replaced code that sets
1811 pMode and hMode directly with calls to setParseMode and setHTMLMode.
1812 Replaced use of m_styleSelector with styleSelector().
1814 * html/HTMLInputElement.h: Removed now-unneed override of focus().
1815 Removed default value of the boolean parameter to updateFocusAppareance.
1816 * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateFocusAppearance):
1817 Pass the restorePreviousSelection boolean through -- while it's ignored,
1818 it no longer has a default value.
1820 * html/HTMLTextAreaElement.h: Removed now-unneed override of focus().
1821 Removed default value of the boolean parameter to updateFocusAppareance.
1822 * html/HTMLTextAreaElement.cpp: Ditto.
1824 * WebCore.exp: Removed the Document::frame() symbol, since it's now inline.
1826 2007-08-15 Antti Koivisto <antti@apple.com>
1830 Fix <rdar://problem/5388936>
1831 Crash while setting display:none for a table cell with selection
1833 Super class destroy() could (through some selection code in removeChild()) trigger section recalc
1834 in middle of RenderTableCell::destroy(), cleaning section dirty bit. This would later crash in
1835 layout since cell grid would still have refence to the dead cell.
1837 Ensure table sections are dirty when leaving destroy method.
1839 I can't figure out tests for row and section changes but they look like
1840 they could crash in similar way as cell.
1842 * rendering/RenderTableCell.cpp:
1843 (WebCore::RenderTableCell::destroy):
1844 * rendering/RenderTableRow.cpp:
1845 (WebCore::RenderTableRow::destroy):
1846 * rendering/RenderTableSection.cpp:
1847 (WebCore::RenderTableSection::destroy):
1849 2007-08-15 Maciej Stachowiak <mjs@apple.com>
1853 <rdar://problem/5389696> leak of 32-byte NSData object (and more?) in WebIconDatabase code path with each refresh of http://www.apple.com
1855 * platform/graphics/BitmapImage.h: Use RetainPtr for m_nsImage and m_tiffRep
1856 * platform/graphics/mac/ImageMac.mm:
1857 (WebCore::BitmapImage::initPlatformData): No need to do anything now
1858 (WebCore::BitmapImage::invalidatePlatformData): Simplify
1859 (WebCore::BitmapImage::getTIFFRepresentation): Use RetainPtr to avoid leaks
1860 (WebCore::BitmapImage::getNSImage): Use RetainPtr to avoid leaks
1862 2007-08-15 Darin Adler <darin@apple.com>
1866 - fix <rdar://problem/5094895> REGRESSION (r19094): JavaScript timers don't
1867 work inside showModalDialog; caret also doesn't blink
1869 * platform/Timer.h: Added fireTimersInNestedEventLoop.
1870 * platform/Timer.cpp:
1871 (WebCore::TimerBase::fireTimers): Added code to exit if the timersReadyToFire
1872 is cleared. This indicates that someone fired the timers in the nested event
1873 loop, so we should not fire any more timers ourselves.
1874 (WebCore::TimerBase::fireTimersInNestedEventLoop): Added. Sets timersReadyToFire
1875 to 0 so we won't return early and do nothing if the shared timer first. Then
1876 calls updateSharedTimer() so the shared timer will get scheduled as needed based
1877 on any pending timers.
1879 * page/Chrome.cpp: (WebCore::Chrome::runModal): Call
1880 fireTimersInNestedEventLoop before calling runModal on the client.
1882 * manual-tests/modal-dialog.html: Added a test that uses a timeout.
1883 * manual-tests/show-modal-dialog-test.html: Fixed a typo.
1885 2007-08-15 Justin Garcia <justin.garcia@apple.com>
1889 http://bugs.webkit.org/show_bug.cgi?id=14971
1890 REGRESSION: cannot select reporter's e-mail in bugzilla
1892 * page/EventHandler.cpp:
1893 (WebCore::EventHandler::canMouseDragExtendSelect): Allow drag-selecting inside
1894 a -webkit-user-select:ignore region.
1896 2007-08-15 Beth Dakin <bdakin@apple.com>
1900 Rolling back in. I made a silly mistake in XMLTokenizer that caused
1901 this patch to crash SVG tests. It's fixed now!
1903 Refactor of change for <rdar://problem/5404899> REGRESSION: Mail
1904 crash in WebCore::FontFallbackList::fontDataAt() after dragging
1905 image into text multiple times
1907 The original fix that I made last night prevents the pending style
1908 sheet count from being incremented until the element is in the
1909 document. This fix prevents the style sheet from loading at all
1910 until it is in the document.
1913 * dom/StyleElement.cpp:
1914 (WebCore::StyleElement::insertedIntoDocument): Call process.
1915 (WebCore::StyleElement::removedFromDocument): This can be reverted
1916 to its original state before my patch last night.
1917 (WebCore::StyleElement::process): childrenChanged is now called
1918 process. Return early if your not in the document.
1919 (WebCore::StyleElement::createSheet): Revert change from last
1920 night. The inDocument check is now in caller childrenChanged.
1921 * dom/StyleElement.h: insertedIntoDocument() must now accept an
1922 element in addition to a document.
1924 This is an optimization to prevent calling updateStyleSelector()
1926 * dom/XMLTokenizer.cpp:
1927 (WebCore::XMLTokenizer::startElementNs):
1928 * html/HTMLStyleElement.cpp:
1929 (WebCore::HTMLStyleElement::HTMLStyleElement):
1930 (WebCore::HTMLStyleElement::finishedParsing):
1931 (WebCore::HTMLStyleElement::insertedIntoDocument):
1932 (WebCore::HTMLStyleElement::childrenChanged):
1933 (WebCore::HTMLStyleElement::sheetLoaded):
1934 * html/HTMLStyleElement.h:
1935 * ksvg2/svg/SVGStyleElement.cpp:
1936 (WebCore::SVGStyleElement::SVGStyleElement):
1937 (WebCore::SVGStyleElement::finishedParsing):
1938 (WebCore::SVGStyleElement::insertedIntoDocument):
1939 (WebCore::SVGStyleElement::childrenChanged):
1940 (WebCore::SVGStyleElement::sheetLoaded):
1941 * ksvg2/svg/SVGStyleElement.h:
1942 (WebCore::SVGStyleElement::setCreatedByParser):
1944 This is a name change. Document::stylesheetLoaded()
1945 is now Document::removePendingSheet()
1947 (WebCore::Document::removePendingSheet):
1949 * dom/ProcessingInstruction.cpp:
1950 (WebCore::ProcessingInstruction::sheetLoaded):
1951 * html/HTMLLinkElement.cpp:
1952 (WebCore::HTMLLinkElement::~HTMLLinkElement):
1953 (WebCore::HTMLLinkElement::setDisabledState):
1954 (WebCore::HTMLLinkElement::process):
1955 (WebCore::HTMLLinkElement::sheetLoaded):
1957 (WebCore::UserStyleSheetLoader::~UserStyleSheetLoader):
1958 (WebCore::UserStyleSheetLoader::setCSSStyleSheet):
1960 This is another name change. closeRenderer() is now
1963 (WebCore::Node::finishedParsing):
1964 * dom/XMLTokenizer.cpp:
1965 (WebCore::XMLTokenizer::endElementNs):
1967 * html/HTMLAppletElement.cpp:
1968 (WebCore::HTMLAppletElement::finishedParsing):
1969 * html/HTMLAppletElement.h:
1970 * html/HTMLGenericFormElement.cpp:
1971 (WebCore::HTMLFormControlElementWithState::finishedParsing):
1972 * html/HTMLGenericFormElement.h:
1973 * html/HTMLObjectElement.cpp:
1974 (WebCore::HTMLObjectElement::finishedParsing):
1975 * html/HTMLObjectElement.h:
1976 * html/HTMLParser.cpp:
1977 (WebCore::HTMLParser::insertNode):
1978 (WebCore::HTMLParser::popOneBlockCommon):
1979 * html/HTMLScriptElement.cpp:
1980 (WebCore::HTMLScriptElement::finishedParsing):
1981 * html/HTMLScriptElement.h:
1982 (WebCore::HTMLStyleElement::setCreatedByParser):
1983 * ksvg2/svg/SVGAnimationElement.cpp:
1984 (WebCore::SVGAnimationElement::finishedParsing):
1985 * ksvg2/svg/SVGAnimationElement.h:
1986 * ksvg2/svg/SVGElement.cpp:
1987 (WebCore::SVGElement::finishedParsing):
1988 * ksvg2/svg/SVGElement.h:
1990 2007-08-15 David Harrison <harrison@apple.com>
1992 Reviewed by Antti Koivisto.
1994 <rdar://problem/5411803> Bumpercar crashes when loading a partial URL (FrameLoader::receivedMainResourceError())
1996 * loader/MainResourceLoader.cpp:
1997 (WebCore::MainResourceLoader::receivedError):
1998 Nil check for the FrameLoader.
2000 2007-08-14 Steve Falkenburg <sfalken@apple.com>
2002 <rdar://problem/5411482> Windows user agent language always returns "en"
2004 Implement defaultLanguage().
2008 * WebCore.vcproj/WebCore.vcproj: Added Language.cpp.
2009 * platform/win/Language.cpp: Added.
2010 (WebCore::localeInfo): Added.
2011 (WebCore::defaultLanguage): Added.
2012 * platform/win/TemporaryLinkStubs.cpp: Remove defaultLanguage stub.
2014 2007-08-14 Sam Weinig <sam@webkit.org>
2016 Reviewed by Geoff and Oliver.
2018 Fix for <rdar://problem/5267870>
2019 Mangleme: Reproducible assertion failure in -[WebCoreFrameBridge installInFrame:]
2021 - Change embed/plugin code path to detach the frame on willRemove instead of detach.
2022 This matches what frame and iframe do.
2024 Test: http/tests/misc/embedCrasher.html
2026 * html/HTMLPlugInElement.cpp:
2027 (WebCore::HTMLPlugInElement::willRemove):
2028 * html/HTMLPlugInElement.h:
2030 2007-08-14 Adele Peterson <adele@apple.com>
2034 Fix for <rdar://problem/5370059> REGRESSION: Cannot type into edit fields on a form (sccsheriff.org)
2036 This change makes -webkit-user-select an inherited css property. For "user-select: none" we were already
2037 acting like it was an inheritable property, where we let user-select:text on the children override its parent's user-select:none.
2038 By making user-select really inherited (instead of inherited for some values), we eliminate the need for crawling up the tree to see
2039 if an ancestor has user-select ignore set.
2041 * page/EventHandler.cpp: (WebCore::EventHandler::canMouseDownStartSelect):
2042 Now that user-select is inherited, you don't need to walk up the render tree looking for ancestors with user-select:ignore set.
2044 * css/CSSStyleSelector.cpp: Eliminate SELECT_AUTO.
2045 (WebCore::CSSStyleSelector::adjustRenderStyle):
2046 (WebCore::CSSStyleSelector::applyProperty):
2047 * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2049 * rendering/RenderStyle.h:
2050 (WebCore::): Eliminate SELECT_AUTO. Make userSelect inherited.
2051 (WebCore::RenderStyle::userSelect):
2052 (WebCore::RenderStyle::setUserSelect):
2053 (WebCore::RenderStyle::initialUserSelect):
2054 * rendering/RenderStyle.cpp:
2055 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2056 (WebCore::StyleRareNonInheritedData::operator==):
2057 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2058 (WebCore::StyleRareInheritedData::operator==):
2059 (WebCore::RenderStyle::diff):
2061 2007-08-15 Peter Kasting <zerodpx@gmail.org>
2065 http://bugs.webkit.org/show_bug.cgi?id=14967 part 1 - Eliminate most implicit
2066 conversions of wtf::Vector<T> to T* by explicitly calling .data()
2068 * html/HTMLSelectElement.cpp:
2069 (WebCore::HTMLSelectElement::saveState):
2070 * platform/KURL.cpp:
2071 (WebCore::KURL::KURL):
2072 (WebCore::KURL::init):
2073 (WebCore::KURL::decode_string):
2074 (WebCore::KURL::parse):
2075 (WebCore::KURL::encode_string):
2076 * platform/cf/KURLCFNet.cpp:
2077 (WebCore::KURL::KURL):
2078 * platform/mac/KURLMac.mm:
2079 (WebCore::KURL::KURL):
2080 * rendering/RenderFrameSet.cpp:
2081 (WebCore::RenderFrameSet::layOutAxis):
2083 2007-08-14 Ricci Adams <iccir@apple.com>
2085 Reviewed by Darin, Hyatt.
2087 - fix <rdar://problem/5407795> -apple-line-clamp should never display less than one line
2089 * rendering/RenderFlexibleBox.cpp:(WebCore::RenderFlexibleBox::layoutVerticalBox): Use
2090 max to make sure it never computes a minimum of less than one line.
2092 2007-08-14 Brady Eidson <beidson@apple.com>
2094 Reviewed by Darin, John, Maciej, Oliver, and Tim
2096 <rdar://problem/5394708> - Crash on launch with corrupt icon database
2098 The main part of the fix is to not disable SQLite's default level of protection - to leave the sync options at their normal,
2101 But in case lightning strikes at the exact right moment and someone ends up with a corrupt database, add some support code to
2102 detect that condition and recover from it.
2104 This is mainly accomplished by exposing the "PRAGMA integrity_check;" facilities of sqlite through IconDatabase SPI as well as
2105 running that integrity check if a journal file is detected at launch (a strong indication that the last quit was not clean).
2106 There's also a method exposed to allow clients to tell the icon database "I suspect something bad happened, please check integrity"
2108 * loader/icon/IconDatabase.cpp:
2109 (WebCore::IconDatabase::checkIntegrityBeforeOpening): Allow clients to suggest an integrity check
2110 (WebCore::IconDatabase::open): Add a check to see if the journal file for the database exists. If it does, run the integrity
2111 check. Also run the check if a client has suggested it to be necessary.
2112 If the integrity-check fails, we sadly have to destroy the database and recreate from scratch.
2113 Also - quite importantly - do not adjust the default sync preferences for the SQLDatabase. They were an optimization that
2114 might have been valid at one time but no longer affects any benchmarks we care about.
2115 (WebCore::IconDatabase::checkIntegrity): Perform the SQLite integrity_check pragma
2116 * loader/icon/IconDatabase.h:
2118 * loader/icon/IconDatabaseNone.cpp:
2119 (WebCore::IconDatabase::checkIntegrity): Keep IconDatabaseNone users building
2120 (WebCore::IconDatabase::checkIntegrityBeforeOpening): Ditto
2122 * loader/icon/SQLDatabase.cpp:
2123 (WebCore::SQLDatabase::open): Make a copy of the path string so we don't accidentally mutate anyone else's string on ::close()
2125 * platform/FileSystem.h: Added. Begin a long-needed platform file system abstraction
2126 * platform/mac/FileSystemMac.mm: Added.
2127 (WebCore::fileExists): Check if a file exists
2128 (WebCore::deleteFile): Delete a file
2130 * platform/gdk/TemporaryLinkStubs.cpp:
2131 (WebCore::fileExists):
2132 (WebCore::deleteFile):
2133 * platform/qt/TemporaryLinkStubs.cpp:
2134 (WebCore::fileExists):
2135 (WebCore::deleteFile):
2136 * platform/win/TemporaryLinkStubs.cpp:
2137 (WebCore::fileExists):
2138 (WebCore::deleteFile):
2141 * WebCore.xcodeproj/project.pbxproj:
2143 2007-08-14 Jon Honeycutt <jhoneycutt@apple.com>
2147 Build fix for Windows.
2149 * html/HTMLFormElement.cpp:
2151 2007-08-14 George Staikos <staikos@kde.org>
2153 Only connect the menu signal once.
2155 * platform/qt/ContextMenuQt.cpp:
2156 (WebCore::ContextMenu::ContextMenu):
2157 (WebCore::ContextMenu::insertItem):
2159 2007-08-14 Justin Garcia <justin.garcia@apple.com>
2163 <rdar://problem/5408255> REGRESSION: In Mail, clicking the containing element's UI closebox doesn't delete element
2165 * editing/DeleteButtonController.cpp:
2166 (WebCore::DeleteButtonController::show): Use -webkit-user-select:ignore for
2169 2007-08-14 Antti Koivisto <antti@apple.com>
2173 Fix <rdar://problem/5143183>
2174 Air Mail postmark shows up wrong in Firefox due to use of CSS background-position-x/y
2176 Safari was using non-standard background-position-x/y properties when serializing style, both normal
2177 and computed. As a result Safari generated CSS would not render correctly in Firefox.
2179 Use standard background-position property instead.
2181 * css/CSSComputedStyleDeclaration.cpp:
2183 * css/CSSMutableStyleDeclaration.cpp:
2184 (WebCore::CSSMutableStyleDeclaration::cssText):
2186 2007-08-14 Sam Weinig <sam@webkit.org>
2188 Reviewed by Brady and Dr. Harrison.
2190 Fix typo. 'whitespace' property is spelled 'white-space'.
2192 * page/inspector/inspector.css:
2194 2007-08-13 Beth Dakin <bdakin@apple.com>
2198 Fix for <rdar://problem/5404899> REGRESSION: Mail crash in
2199 WebCore::FontFallbackList::fontDataAt() after dragging image into
2202 We were crashing because style information was not up-to-date. This
2203 patch fixes the problem in two ways:
2205 Style information was not up to date at the time of the crash
2206 because the document thought there was still a pending style sheet.
2207 The pending style sheet counter was incremented when a call to
2208 cloneNode from Mail cloned a style node with an imported style
2209 sheet. Because Mail disables the cache, the style sheet did not
2210 load immediately for the cloned node, and we do not check again to
2211 see if it has loaded in time to decrement the pending style sheet
2212 counter before the crash point. The fix here is only to increment
2213 the pending style sheet counter for elements that are already in
2215 * dom/StyleElement.cpp:
2216 (WebCore::StyleElement::insertedIntoDocument): If we have a CSS
2217 style sheet that is currently loading, increment the pending style
2218 sheet counter. This should keep the counter accurate in the case
2219 where a style node is cloned and then immediately inserted into the
2221 (WebCore::StyleElement::removedFromDocument): If we have a CSS
2222 style sheet that is currently loading, decrement the pending style
2223 sheet count. This is required to keep the correct balance, given
2225 (WebCore::StyleElement::createSheet): Only addPendingSheet() and
2226 checkLoaded() if we are in the document.
2228 Here is Darin's original fix. It seems worth keeping this fix too.
2229 Font style information should not cause a crash if there are still
2230 pending style sheets. This is good belt-and-suspenders in case
2231 there is another way to run into this bug with a wacky timing
2233 * css/CSSStyleSelector.cpp:
2234 (WebCore::CSSStyleSelector::styleForElement): Update the font.
2236 2007-08-13 Alexey Proskuryakov <ap@webkit.org>
2240 http://bugs.webkit.org/show_bug.cgi?id=14635
2241 rdar://problem/5340188
2242 Uploading file with non-ASCII character in path fails
2244 File upload cannot be tested in DumpRenderTree.
2246 * html/HTMLFormElement.cpp:
2247 (WebCore::pathGetFilename): A cross-platform helper that extracts a file name from a path.
2248 (WebCore::HTMLFormElement::formData): Use the above helper instead of code that doesn't
2251 2007-08-13 Alexey Proskuryakov <ap@webkit.org>
2255 http://bugs.webkit.org/show_bug.cgi?id=14951
2256 REGRESSION: page interpreted as UTF-8 because of stray <?xml> after <head>
2258 Test: fast/encoding/misplaced-xml-declaration.html
2260 * loader/TextResourceDecoder.cpp:
2261 (WebCore::TextResourceDecoder::checkForHeadCharset): Only honor XML declaration
2262 at the very beginning of the file.
2264 2007-08-13 Oliver Hunt <oliver@apple.com>
2268 Correct accidentally modified code.
2270 * platform/mac/FontDataMac.mm:
2271 (WebCore::FontData::platformInit):
2273 2007-08-13 Adele Peterson <adele@apple.com>
2277 Fix for http://bugs.webkit.org/show_bug.cgi?id=14746
2278 <rdar://problem/5401041> REGRESSION: Form state not saved for forms that submit via HTTPS even if they do not contain a password field
2280 * loader/FrameLoader.cpp: (WebCore::FrameLoader::saveDocumentState): Restore our old behavior that will save form state for secure forms.
2281 This will also match Firefox behavior.
2283 * dom/Document.cpp: Removed secureFormAdded(), secureFormRemoved(), hasSecureForm() which are no longer used.
2285 * html/HTMLFormElement.cpp:
2286 (WebCore::HTMLFormElement::attach):
2287 (WebCore::HTMLFormElement::parseMappedAttribute):
2289 2007-08-13 Oliver Hunt <oliver@apple.com>
2293 <rdar://problem/5386183> REGRESSION (9A504-9A508): Underline of inline hole is too thin
2294 on Japanese DotMac page
2296 Hack the line metrics for the Hiragino font families so that they always allow space for
2297 the marked text underline.
2299 * platform/mac/FontDataMac.mm:
2300 (WebCore::FontData::platformInit):
2302 2007-08-13 David Hyatt <hyatt@apple.com>
2306 <rdar://problem/5400446> messed up content on calendar.yahoo.com and my.yahoo.com
2308 Fix some more bad assumptions about <html> being the first child of the document now that we
2309 properly support HTML5's model (where a comment node preceding <html> will in fact be its sibling).
2311 * html/HTMLParser.cpp:
2312 (WebCore::HTMLParser::handleError):
2313 (WebCore::HTMLParser::createHead):
2315 2007-08-13 Justin Garcia <justin.garcia@apple.com>
2319 <rdar://problem/5333725> -webkit-user-select: none makes selection difficult
2321 Let users create selections if they mouse down in a -webkit-user-select:none
2322 region, just (continue to) disallow selection endpoints in those regions, and
2323 don't paint those regions as selected if they are fully enclosed by a selection.
2324 For example, in xxyyyxx where x is -webkit-user-select:none, a user can mouse down
2325 between the first two xs and drag across yyy to the second two xs to create a
2326 selection xx^yyy^xx.
2328 * editing/SelectionController.cpp:
2329 (WebCore::SelectionController::selectAll): Allow selectAll inside a root
2330 that has -webkit-user-select:none, because it may contain content that
2331 is selectable (VisiblePosition and Selection creation will keep Selection
2332 endpoints out of -webkit-user-select:none regions).
2333 * page/EventHandler.cpp:
2334 (WebCore::EventHandler::selectClosestWordFromMouseEvent): Use canMouseDownStartSelect
2335 instead of the ambiguously named shouldSelect().
2336 (WebCore::EventHandler::handleMousePressEventTripleClick): Ditto.
2337 (WebCore::EventHandler::handleMousePressEventSingleClick): Ditto.
2338 (WebCore::EventHandler::updateSelectionForMouseDrag): Use canMouseDragExtendSelect.
2339 (WebCore::EventHandler::selectCursor): Paint an ibeam in -webkit-user-select:none regions,
2340 because you can click in those regions to create a selection.
2341 (WebCore::EventHandler::canMouseDownStartSelect): Now fires the selectStart event, and
2342 returns true in -webkit-user-select: none regions.
2343 (WebCore::EventHandler::canMouseDragExtendSelect): This is identical to
2344 canMouseDownStartSelect because of 12823, even though it seems strange that we would fire
2345 the selectStart event here.
2346 * page/EventHandler.h:
2347 * rendering/RenderObject.cpp:
2348 (WebCore::RenderObject::draggableNode): Only -webkit-user-select:ignore regions will
2349 prevent selection creation.
2350 * rendering/RenderObject.h:
2352 2007-08-13 Anders Carlsson <andersca@apple.com>
2356 <rdar://problem/5360748>
2357 REGRESSION (r21002-r21003): Flash widget sniffer doesn't work (affects iWeb)
2359 Don't check whether the document is being parsed or not, because the node list
2360 could be accessed after the document has finished parsing.
2363 (WebCore::Node::registerNodeList):
2365 2007-08-13 Lars Knoll <lars@trolltech.com>
2369 no need to update regions that are not visible on the webpage.
2371 * platform/qt/ScrollViewQt.cpp:
2372 (WebCore::ScrollView::updateContents):
2374 2007-08-12 Maciej Stachowiak <mjs@apple.com>
2376 Reviewed by Darin and Sam.
2378 <rdar://problem/5395213> cross-domain access to individual components of location object should be denied.
2380 * bindings/js/kjs_window.cpp:
2381 (KJS::Location::put): Add the appropriate cross-domain access checks.
2383 2007-08-12 Darin Adler <darin@apple.com>
2385 Reviewed by John Sullivan.
2387 - fix <rdar://problem/5403724> REGRESSION: text inputs are not scrolled to make inline input visible (14912)
2389 * editing/Editor.h: Made setIgnoreMarkedTextSelectionChange no longer inline.
2390 It now has a side effect of revealing the selection when you set it to false.
2391 Added private revealSelectionAfterEditingOperation helper.
2392 * editing/Editor.cpp:
2393 (WebCore::Editor::deleteRange): Calls revealSelectionAfterEditingOperation instead
2394 of calling m_frame->revealSelection directly.
2395 (WebCore::Editor::replaceSelectionWithFragment): Ditto.
2396 (WebCore::Editor::insertOrderedList): Ditto.
2397 (WebCore::Editor::insertUnorderedList): Ditto.
2398 (WebCore::Editor::increaseSelectionListLevel): Ditto.
2399 (WebCore::Editor::increaseSelectionListLevelOrdered): Ditto.
2400 (WebCore::Editor::increaseSelectionListLevelUnordered): Ditto.
2401 (WebCore::Editor::decreaseSelectionListLevel): Ditto.
2402 (WebCore::Editor::insertLineBreak): Ditto.
2403 (WebCore::Editor::insertParagraphSeparator): Ditto.
2404 (WebCore::Editor::replaceMarkedText): Ditto.
2405 (WebCore::Editor::revealSelectionAfterEditingOperation): Added. Calls revealSelection,
2406 unless we are in the ignoreMarkedTextSelectionChange state. If we are in that state,
2407 we're in the middle of a composite editing operation and we shouldn't try to scroll
2408 to reveal the selection until the operation is done.
2409 (WebCore::Editor::setIgnoreMarkedTextSelectionChange): Made no longer inline. If
2410 changing the state from true to false, then calls revealSelectionAfterEditingOperation.
2412 * WebCore.exp: Add new entry point for no-longer-inline setter function.
2414 2007-08-12 Geoffrey Garen <ggaren@apple.com>
2416 Reviewed by Maciej Stachowiak, Dave Hyatt.
2418 Changed the dead resource LRU-SP algorithm to measure an object's
2419 total size, not just its encoded size. This will allow us to make
2420 better decisions about what data to evict when the cache is small. For
2421 example, the PLT can now run with a 16MB cache without fully evicting
2424 (Previously, we had assumed that decoded size would be an OK estimate
2425 of encoded size, but that is not true of GIF, whose decoded size can be
2426 orders of magnitude greater than its encoded size.)
2428 Subtly, destroying a resource's decoded data now increases its recency
2429 by moving it to the head of a smaller LRU list. This is slightly odd,
2430 but, since all resources get the same treatment, it shouldn't hurt
2431 the eviction algorithm.
2433 * history/PageCache.cpp:
2434 (WebCore::PageCache::releaseAutoreleasedPagesNow): Make sure that a
2435 dead resource eviction doesn't happen until we've released all of our
2436 dead pages. Otherwise, the cache will make terrible decisions about
2437 what to evict because all of our dead resources will seem live.
2440 (WebCore::Cache::Cache):
2441 (WebCore::Cache::pruneLiveResources):
2442 (WebCore::Cache::pruneDeadResources): Removed call to
2443 removeFromLiveDecodedResourcesList because this happens automatically
2444 now as a part of the process of changing the resource's decoded size.
2445 (WebCore::Cache::lruListFor): *** The key change. *** Compute the
2446 appropriate LRU list based on total size, not encoded size.
2447 (WebCore::Cache::dumpLRULists): Added debug logging function to help
2448 visualize the cache.
2451 (WebCore::Cache::setDeadResourcePruneEnabled):
2452 (WebCore::Cache::deadResourcePruneEnabled):
2454 * loader/CachedImage.cpp: Moved decoded size tracking code from here
2455 up into the base class. Currently, only CachedImage has a use for that
2456 functionality, but other subclasses might need it in the future, and
2457 the base class is already responsible for similar code related to
2458 encoded size tracking.
2459 (WebCore::CachedImage::decodedSizeChanged):
2460 * loader/CachedImage.h:
2462 * loader/CachedResource.cpp:
2463 (WebCore::CachedResource::CachedResource):
2464 (WebCore::CachedResource::setDecodedSize): Move us in the LRU-SP list
2465 just like setEncodedSize does, since decoded size counts now, too.
2466 (WebCore::CachedResource::setEncodedSize): Changed slightly to match
2467 the style of setDecodedSize.
2469 * loader/CachedResource.h:
2470 (WebCore::CachedResource::decodedSize):
2472 2007-08-11 Mitz Pettel <mitz@webkit.org>
2476 - fix http://bugs.webkit.org/show_bug.cgi?id=13670
2477 <rdar://problem/5399619> Table misrender when one of the TDs has width=100%
2479 Tests: fast/table/100-percent-cell-width.html
2480 fast/table/percent-widths-stretch.html
2482 * rendering/AutoTableLayout.cpp:
2483 (WebCore::AutoTableLayout::calcPrefWidths): Changed the value used instead of
2484 0% to avoid division by zero from 1% to less than 0.01%. Removed code that
2485 added 0.5px to non-percent widths when calculating the scaling factor. The
2486 latter change is covered by the percent-widths-stretch test, where the new
2487 results match both WinIE 7 and Firefox 3.
2489 2007-08-11 Darin Adler <darin@apple.com>
2493 - fix <rdar://problem/5266535> REGRESSION: <img> inside <map> no longer allowed in strict mode
2494 (breaks chemicalelements.com)
2496 Test: fast/parser/strict-img-in-map.html
2498 * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::checkDTD): Removed FIXME saying this
2499 code is strange, since this code matches the HTML 4 specification almost exactly. Made
2500 <img> elements allowed even in strict mode and added small comments to clarify what comes
2501 from the DTD and what is non-standard.
2503 2007-08-11 Holger Hans Peter Freyther <zecke@selfish.org>
2507 Implement passing events to a subframe. The code is copied from
2508 the windows port and passSubframeEventToSubframe was removed as it
2509 is not called and it is not avilable in the windows port as well.
2511 * page/gdk/EventHandlerGdk.cpp:
2512 (WebCore::EventHandler::passMousePressEventToSubframe):
2513 (WebCore::EventHandler::passMouseMoveEventToSubframe):
2514 (WebCore::EventHandler::passMouseReleaseEventToSubframe):
2516 2007-08-11 Holger Hans Peter Freyther <zecke@selfish.org>
2520 GdkEventKey::string is not supposed to be used. The length
2521 of this string is zero for non ascii characters. Use the
2522 gdk_unicode_to_keyval to convert the keyval to a UChar and construct
2523 a String. This change makes it possible to input non ascii
2526 * platform/gdk/KeyEventGdk.cpp:
2527 (WebCore::keyIdentifierForGdkKeyCode):
2528 (WebCore::singleCharacterString):
2529 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2531 2007-08-11 Andrew Wellington <proton@wiretapped.net>
2533 Reviewed by Mark Rowe.
2535 Fix http://bugs.webkit.org/show_bug.cgi?id=14645
2536 getPropertyValue should be case insensitive
2538 When we get the propertyID for a given string we convert to lowercase.
2540 This also applies to setProperty, removeProperty and others.
2542 * css/CSSStyleDeclaration.cpp:
2543 (WebCore::propertyID):
2545 2007-08-11 Mark Rowe <mrowe@apple.com>
2547 Build fix. Change "#ifdef PLATFORM(GDK)" to "#if PLATFORM(GDK)".
2549 * page/FrameView.cpp:
2552 2007-08-11 Holger Hans Peter Freyther <zecke@selfish.org>
2556 Copy the WebFrame::layoutIfNeededRecursive method of the windows port
2557 to FrameView to be used by the Gtk+ port. Simplify the implementation due
2558 moving it to the FrameView class.
2560 Implement the ScrollView::children() method for the Gtk+ port and make it
2561 available to the FrameView as children() is used within the layoutIfNeededRecursive method.
2563 * page/FrameView.cpp:
2564 (WebCore::FrameView::layoutIfNeededRecursive):
2566 * platform/ScrollView.h:
2567 * platform/gdk/ScrollViewGdk.cpp:
2569 2007-08-11 Holger Hans Peter Freyther <zecke@selfish.org>
2573 To fix text selection make the PlatformMouseEvent set the pressed
2574 button even when moving the mouse.
2576 Add building of the WebKit::DragClient stubs as they are needed to
2577 make text selection work.
2580 * platform/gdk/MouseEventGdk.cpp:
2581 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2583 2007-08-10 Anders Carlsson <andersca@apple.com>
2585 Reviewed by Darin and Maciej.
2587 <rdar://problem/5360748>
2588 REGRESSION(r21002-r21003) Flash widget sniffer doesn't work
2590 Add a per-document NodeList counter. When parsing, only call notifyNodeListsChildrenChanged
2591 if the document has node lists. Also, make sure to reset the cache when the node list count has
2592 been 0 and a new node list is registered to avoid any stale cache information.
2594 * dom/ContainerNode.cpp:
2595 (WebCore::ContainerNode::addChild):
2597 (WebCore::Document::Document):
2599 (WebCore::Document::addNodeList):
2600 (WebCore::Document::removeNodeList):
2601 (WebCore::Document::hasNodeLists):
2603 (WebCore::Node::registerNodeList):
2604 (WebCore::Node::unregisterNodeList):
2606 2007-08-10 Timothy Hatcher <timothy@apple.com>
2610 <rdar://problem/5394449> Stop using some Carbon UI APIs for 64 bit
2612 Disable NPObject use in 64-bit on Mac OS X.
2614 * Configurations/WebCore.xcconfig: Add a framework search path to the sub-framworks of Carbon.
2615 * WebCore.xcodeproj/project.pbxproj: Filter out the Frame::windowScriptNPObject() symbol in 64-bit.
2616 * bindings/objc/DOM.mm:
2617 (-[DOMElement _NPObject]): Return null in 64-bit.
2618 * config.h: Set WTF_USE_NPOBJECT to 0 in 64-bit Mac OS X.
2620 (WebCore::Frame::cleanupScriptObjects): Add more #if USE(NPOBJECT) blocks where needed.
2621 * page/Frame.h: Ditto.
2622 * page/mac/FrameMac.mm:
2623 (WebCore::Frame::createScriptInstanceForWidget): Ditto.
2624 * page/mac/WebCoreFrameBridge.h: Ditto.
2625 * page/mac/WebCoreFrameBridge.mm: Ditto.
2627 2007-08-10 Mitz Pettel <mitz@webkit.org>
2631 - fix <rdar://problem/5397344> http://bugs.webkit.org/show_bug.cgi?id=14911
2632 REGRESSION: Clicking in pasted text doesn't position the insertion point correctly
2634 Test: editing/selection/inline-closest-leaf-child.html
2636 * rendering/RootInlineBox.cpp:
2637 (WebCore::RootInlineBox::closestLeafChildForXPos): Return the last leaf if
2638 it's the closest match, or if no other leaf matches (for example if all
2639 leaves are list markers or non-editable where editable is required).
2641 2007-08-10 Anders Carlsson <andersca@apple.com>
2645 <rdar://problem/5390568>
2646 REGRESSION: -[WebFrame loadHTMLString:baseURL:] leaks the data source.
2648 Revert the fix for <rdar://problem/5133420> which caused us to not cancel
2649 substitute data loads. It's better to remove the assertion in the WebKit layer.
2651 * loader/ResourceLoader.cpp:
2652 (WebCore::ResourceLoader::didCancel):
2654 2007-08-10 Sam Weinig <sam@webkit.org>
2656 Rubber-stamped by Adam Roben.
2658 Fix Windows, Qt and Gtk build.
2661 * WebCore.vcproj/WebCore.vcproj:
2663 2007-08-09 Sam Weinig <sam@webkit.org>
2667 Fix for <rdar://problem/5395618>
2669 Use checkNodeSecurity when setting the 'src' or 'location' attribute of an
2670 iframe or frame element.
2672 * WebCore.xcodeproj/project.pbxproj:
2673 * bindings/js/JSAttrCustom.cpp: Added.
2674 (WebCore::JSAttr::setValue): Call checkNodeSecurity for attributes with a current iframe or frame
2675 ownerElement when setting src to a javascript: URL.
2676 * bindings/js/JSElementCustom.cpp: Added.
2677 (WebCore::allowSettingSrcToJavascriptURL):
2678 (WebCore::JSElement::setAttribute): Call checkNodeSecurity when element is a frame or iframe and
2679 setting he src attribute to a javascript: URL.
2680 (WebCore::JSElement::setAttributeNode): Ditto.
2681 (WebCore::JSElement::setAttributeNS): Ditto.
2682 (WebCore::JSElement::setAttributeNodeNS): Ditto.
2683 * bindings/js/JSHTMLFrameElementCustom.cpp: Added.
2684 (WebCore::allowSettingJavascriptURL):
2685 (WebCore::JSHTMLFrameElement::setSrc): Call checkNodeSecurity when setting to a javascript: URL.
2686 (WebCore::JSHTMLFrameElement::setLocation): Ditto.
2687 * bindings/js/JSHTMLIFrameElementCustom.cpp: Added.
2688 (WebCore::JSHTMLIFrameElement::setSrc): Call checkNodeSecurity when setting to a javascript: URL.
2689 * bindings/scripts/CodeGeneratorJS.pm: Add support for [CustomGetter] and [CustomSetter]
2692 * html/HTMLFrameElement.idl:
2693 * html/HTMLIFrameElement.idl:
2695 2007-08-10 Holger Hans Peter Freyther <zecke@selfish.org>
2699 Make the containingWindow a GtkContainer and make use of the
2700 GtkWidget::window instead of the GtkLayout::bin_window.
2702 * platform/Widget.h:
2703 * platform/gdk/PlatformScreenGdk.cpp:
2704 (WebCore::screenDepth):
2705 * platform/gdk/ScrollViewGdk.cpp:
2706 (WebCore::ScrollView::updateContents):
2707 (WebCore::ScrollView::update):
2708 * platform/gdk/WidgetGdk.cpp:
2709 (WebCore::Widget::setContainingWindow):
2710 (WebCore::Widget::setCursor):
2712 2007-08-10 Simon Hausmann <hausmann@kde.org>
2716 Revert r24699 as it broke timers. The precision of QTime::toTime_t() is just seconds, which is not good enough. Revert back
2717 to the old implementation and use the simple implementation of currentTime() from win/ for the Qt/Windows build (fingers crossed :)
2720 * platform/qt/SystemTimeQt.cpp:
2721 (WebCore::currentTime):
2723 2007-08-10 Simon Hausmann <hausmann@kde.org>
2727 Recognize .htm as valid extension for text/html.
2729 * platform/qt/MIMETypeRegistryQt.cpp:
2732 2007-08-10 Lars Knoll <lars@trolltech.com>
2736 remove an assertion that leads to crashes. The whole design of WidgetQt and ScrollViewQt needs to be reevaluated soon anyways.
2738 * platform/qt/ScrollViewQt.cpp:
2740 2007-08-10 Mark Rowe <mrowe@apple.com>
2744 * ForwardingHeaders/bindings/runtime_object.h: Added.
2746 2007-08-10 Simon Hausmann <hausmann@kde.org>
2750 Make sure -fno-strict-aliasing is also added for mkspecs like linux-g++-64.
2754 2007-08-10 Simon Hausmann <hausmann@kde.org>
2758 Enable JavaScript bindings for HTML Object/Applet elements in the Qt port.
2761 * bindings/js/kjs_dom.cpp:
2762 * html/HTMLAppletElement.h:
2763 * html/HTMLEmbedElement.h:
2764 * page/qt/FrameQt.cpp:
2765 (WebCore::Frame::createScriptInstanceForWidget):
2767 2007-08-10 Mitz Pettel <mitz@webkit.org>
2769 Reviewed by Dave Hyatt.
2771 - fix http://bugs.webkit.org/show_bug.cgi?id=14798
2772 Incorrect bidi reordering of neutrals and digits after RTL embed
2773 and other bugs in the bidi algorithm.
2775 Test: fast/text/international/bidi-neutral-run.html
2777 Fixed several bugs in resolving the embedding level of runs of neutral
2778 characters. Changed the logic to rely on the eor direction only for
2779 the number types, and otherwise consider the last strong type.
2781 * platform/BidiContext.h:
2782 (WebCore::BidiContext::BidiContext): Added an ASSERT.
2783 * platform/BidiResolver.h:
2785 (WebCore::::createBidiRunsForLine):
2786 * platform/graphics/GraphicsContext.cpp:
2787 (WebCore::TextRunIterator::atEnd): Changed to return true instead of
2788 crashing when called on the empty iterator.
2790 2007-08-09 Mark Rowe <mrowe@apple.com>
2794 <rdar://problem/5400709> Versioning in debug and release builds should include minor and tiny version before +
2796 * Configurations/Version.xcconfig:
2797 * WebCore.xcodeproj/project.pbxproj: Add a shell script phase to make to dependency between
2798 Version.xcconfig and Info.plist explicit to Xcode.
2800 2007-08-09 Mitz Pettel <mitz@webkit.org>
2802 Reviewed by Justin Garcia.
2804 - fix http://bugs.webkit.org/show_bug.cgi?id=14347
2805 REGRESSION (r21291): Initiating a drag near the edge of a selection deselects it
2807 Test: editing/selection/contains-boundaries.html
2809 * editing/SelectionController.cpp:
2810 (WebCore::SelectionController::contains): Changed to return true for the
2811 selection boundaries too.
2813 2007-08-09 Mitz Pettel <mitz@webkit.org>
2815 Reviewed by Dave Hyatt.
2817 - fix http://bugs.webkit.org/show_bug.cgi?id=14742
2818 Document::recalcStyle(Force) called for every updateStyleIgnorePendingStylesheets while waiting for stylesheets
2819 <rdar://problem/5376306>
2821 updateStyleSelector() is normally called when something changes that factors
2822 into the style selector. However, updateLayoutIgnorePendingStylesheets() calls it for
2823 a different reason, namely to account for all the preceding changes that were ignored
2824 because of the early return in updateStyleSelector(). After that, the early return
2825 can no longer occur, so changes are accounted for as they happen, and
2826 updateLayoutIgnorePendingStylesheets() does not need to call updateStyleSelector()
2830 (WebCore::Document::updateLayoutIgnorePendingStylesheets): Call updateStyleSelector()
2831 only before the first layout.
2833 2007-08-09 Mitz Pettel <mitz@webkit.org>
2835 Reviewed by Adam Roben.
2837 - fix http://bugs.webkit.org/show_bug.cgi?id=14362
2838 Opening a select list always highlights first element in list
2840 * platform/win/PopupMenuWin.cpp:
2841 (WebCore::PopupWndProc): Track the mouse only inside the popup.
2843 2007-08-09 Mitz Pettel <mitz@webkit.org>
2845 Reviewed by Dave Hyatt.
2847 - fix http://bugs.webkit.org/show_bug.cgi?id=14875
2848 Textarea with nowrap - left/right nav, Up/down nav both hide text
2850 Test: fast/layers/scroll-rect-to-visible.html
2852 * rendering/RenderLayer.cpp:
2853 (WebCore::RenderLayer::scrollRectToVisible): Account for borders and scroll bars.
2855 2007-08-09 Geoffrey Garen <ggaren@apple.com>
2857 Reviewed by Dave Hyatt.
2859 Refactored live decoded resource eviction to be more modular /
2862 This fixes one known place where we forgot to hook into the live
2863 decoded eviction mechanism -- canvas. There might be other, unknown
2864 places. In a canvas test page, which I broke off from the Safari
2865 pageout test, I saw an RPRVT reduction of ~10MB.
2868 - "m_lastLiveAccessTime" => "m_lastDecodedAccessTime" because the data
2869 point we're recording is access to the resource in decoded form.
2871 - "liveResourceAccessed" => "didAccessDecodedData" for the same reason.
2873 - "pruneAllResources" => "pruneDeadResources" because this function
2874 does not prune live resources.
2877 Instead of updating cache metadata at the call site whenver drawing an
2878 image, just have an image notify its observer whenever it draws. The
2879 observer, which is a CachedResource, can then update the metadata.
2881 * loader/Cache.cpp: Renames
2882 * loader/Cache.h: Removed stale declarations, updated comments
2883 * loader/CachedImage.cpp:
2884 (WebCore::CachedImage::didDraw): Implemented didDraw to update cache
2885 metadata whenever our image draws.
2886 * loader/CachedImage.h: Grouped parts of the ImageObserver interface.
2887 * loader/CachedResource.cpp:
2888 (WebCore::CachedResource::CachedResource):
2889 (WebCore::CachedResource::deref):
2890 (WebCore::CachedResource::didAccessDecodedData): Made this function
2891 slightly more modular by allowing the caller to provide a time stamp.
2892 In theory, not all CachedResources will necessarily want to use the
2893 current paint time stamp.
2894 * platform/graphics/cg/ImageCG.cpp:
2895 (WebCore::BitmapImage::draw): Notify our observer that we drew.
2896 (WebCore::Image::drawPattern): ditto
2897 * platform/graphics/cg/PDFDocumentImage.cpp:
2898 (WebCore::PDFDocumentImage::draw): ditto
2899 * platform/graphics/svg/SVGImage.cpp:
2900 (WebCore::SVGImage::draw): ditto
2902 Removed old code at image drawing call sites:
2904 * rendering/RenderBox.cpp:
2905 (WebCore::RenderBox::paintBackgroundExtended):
2906 * rendering/RenderImage.cpp:
2907 (WebCore::RenderImage::paint):
2908 * rendering/RenderListMarker.cpp:
2909 (WebCore::RenderListMarker::paint):
2910 * rendering/RenderObject.cpp:
2911 (WebCore::RenderObject::paintBorderImage):
2913 2007-08-10 Holger Hans Peter Freyther <zecke@selfish.org>
2917 Move the various *ClientGdk.{h,cpp} away from the WebCore directory as
2918 of http://bugs.webkit.org/show_bug.cgi?id=14727.
2921 * platform/gdk/TemporaryLinkStubs.cpp:
2923 2007-08-09 Anders Carlsson <andersca@apple.com>
2927 <rdar://problem/5400029> iframes with an image src rarely load image
2929 Don't try to shrink standalone images in subframes. The resize event is not
2930 sent for subframes which screws up the shrink-to-fit logic.
2932 * loader/ImageDocument.cpp:
2933 (WebCore::ImageDocument::createDocumentStructure):
2934 (WebCore::ImageDocument::imageChanged):
2935 (WebCore::ImageDocument::shouldShrinkToFit):
2936 * loader/ImageDocument.h:
2938 2007-08-10 Holger Hans Peter Freyther <zecke@selfish.org>
2942 Implement FrameLoaderClientGdk::createFrame mostly by copying
2943 the windows implementation. A method similiar to WebFrame::loadURLIntoChild
2944 was not introduced instead we have a simplified version similiar to the
2947 Remove building of WebKit/gtk/webkitgtkframedata.{cpp,h}.
2950 * loader/gdk/FrameLoaderClientGdk.cpp:
2951 (WebCore::FrameLoaderClientGdk::createFrame):
2953 2007-08-10 Holger Hans Peter Freyther <zecke@selfish.org>
2957 Use the ScrollView/Widget design of the Windows port to only use one
2958 native window for the whole page. This will make it possible to implement
2959 FrameLoaderClientGdk::createFrame.
2961 In contrast to the windows port the ScrollBars are GtkWidgets. To paint them
2962 at the right position we need to position them correctly. To not scroll the
2963 ScrollBar's belonging to the ScrollView a ScrollViewScrollbar is introduced with
2964 a different geometryChanged method.
2966 To allow the Gtk+ way of scrolling the ScrollView allows to get GtkAdjustments
2967 set. In this case no ScrollViewScrollbar will be created.
2970 * platform/ScrollView.h:
2971 * platform/Widget.h:
2972 * platform/gdk/PlatformScreenGdk.cpp:
2973 (WebCore::screenDepth):
2974 * platform/gdk/PlatformScrollBar.h:
2975 * platform/gdk/PlatformScrollBarGdk.cpp:
2976 (PlatformScrollbar::PlatformScrollbar):
2977 (PlatformScrollbar::~PlatformScrollbar):
2978 (PlatformScrollbar::setRect):
2979 (PlatformScrollbar::geometryChanged):
2980 * platform/gdk/ScrollViewGdk.cpp:
2981 (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
2982 (WebCore::ScrollView::ScrollViewPrivate::~ScrollViewPrivate):
2983 (WebCore::ScrollViewScrollbar::ScrollViewScrollbar):
2984 (WebCore::ScrollViewScrollbar::geometryChanged):
2985 (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
2986 (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
2987 (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
2988 (WebCore::ScrollView::ScrollViewPrivate::adjustmentChanged):
2989 (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
2990 (WebCore::ScrollView::ScrollViewPrivate::windowClipRect):
2991 (WebCore::ScrollView::setGtkAdjustments):
2992 (WebCore::ScrollView::updateContents):
2993 (WebCore::ScrollView::update):
2994 (WebCore::ScrollView::visibleWidth):
2995 (WebCore::ScrollView::resizeContents):
2996 (WebCore::ScrollView::contentsX):
2997 (WebCore::ScrollView::scrollOffset):
2998 (WebCore::ScrollView::maximumScroll):
2999 (WebCore::ScrollView::scrollBy):
3000 (WebCore::ScrollView::suppressScrollbars):
3001 (WebCore::ScrollView::setHScrollbarMode):
3002 (WebCore::ScrollView::setVScrollbarMode):
3003 (WebCore::ScrollView::setScrollbarsMode):
3004 (WebCore::ScrollView::setFrameGeometry):
3005 (WebCore::ScrollView::addChild):
3006 (WebCore::ScrollView::removeChild):
3007 (WebCore::ScrollView::scrollRectIntoViewRecursively):
3008 (WebCore::ScrollView::wheelEvent):
3009 (WebCore::ScrollView::updateScrollbars):
3010 (WebCore::ScrollView::windowToContents):
3011 (WebCore::ScrollView::contentsToWindow):
3012 (WebCore::ScrollView::scrollbarUnderMouse):
3013 (WebCore::ScrollView::convertChildToSelf):
3014 (WebCore::ScrollView::convertSelfToChild):
3015 (WebCore::ScrollView::paint):
3016 (WebCore::ScrollView::geometryChanged):
3017 (WebCore::ScrollView::scroll):
3018 (WebCore::ScrollView::addToDirtyRegion):
3019 (WebCore::ScrollView::scrollBackingStore):
3020 (WebCore::ScrollView::updateBackingStore):
3021 * platform/gdk/WidgetGdk.cpp:
3022 (WebCore::WidgetPrivate::gdkDrawable):
3023 (WebCore::Widget::Widget):
3024 (WebCore::Widget::setContainingWindow):
3025 (WebCore::Widget::containingWindow):
3026 (WebCore::Widget::frameGeometry):
3027 (WebCore::Widget::setFrameGeometry):
3028 (WebCore::Widget::setParent):
3029 (WebCore::Widget::parent):
3030 (WebCore::Widget::setCursor):
3031 (WebCore::Widget::show):
3032 (WebCore::Widget::hide):
3033 (WebCore::Widget::removeFromParent):
3034 (WebCore::Widget::paint):
3035 (WebCore::Widget::invalidate):
3036 (WebCore::Widget::invalidateRect):
3037 (WebCore::Widget::convertToContainingWindow):
3038 (WebCore::Widget::convertFromContainingWindow):
3039 (WebCore::Widget::convertChildToSelf):
3040 (WebCore::Widget::convertSelfToChild):
3041 (WebCore::Widget::suppressInvalidation):
3042 (WebCore::Widget::setSuppressInvalidation):
3044 2007-08-09 Adele Peterson <adele@apple.com>
3046 Fix by Brady, reviewed by me.
3048 Fix for <rdar://problem/5380697> connection:willSendRequest:redirectResponse: is called on every NSURLConnection
3050 * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
3051 Work around a behavior change in CFNetwork where willSendRequest gets called more often by returning early.
3053 2007-08-09 Darin Adler <darin@apple.com>
3057 - fix <rdar://problem/4889753> REGRESSION: Selection doesn't continue with drag selecting
3058 when autoscrolling vertically (in Notes as well as Safari)
3060 The bug doesn't happen inside DumpRenderTree, so I was unable to make an automated
3063 * manual-tests/autoscroll-when-outside-window.html: Added.
3065 * rendering/RenderLayer.cpp: (WebCore::RenderLayer::autoscroll): Removed unneeded null
3066 check for the layer's renderer and the document, neither of which can be null. Call
3067 the new updateSelectionForMouseDrag instead of doing selection updating here.
3069 * page/EventHandler.h:
3070 * page/EventHandler.cpp:
3071 (WebCore::EventHandler::handleMouseDraggedEvent): Refactored most of the logic
3072 about updating the selection into updateSelectionForMouseDrag.
3073 (WebCore::EventHandler::updateSelectionForMouseDrag): Added. The public version of
3074 this function takes no parameters, and is for use from auto-scrolling code. The
3075 private version of this function takes node and point parameters and contains the
3076 shared code, including everything from updateSelectionForMouseDragOverPosition.
3077 Aside from the code motion, variable name changes, and sharing more code, this
3078 differs from the old code in RenderLayer::autoscroll in the following ways:
3080 1) The old code did hit testing only in the layer that was auto-scrolling,
3081 and the new code instead starts the hit testing at the root layer, which is
3082 better because it's the same thing we do for mouse moved events. Further,
3083 the code to do this by calling convertToLayerCoords had a bug because the
3084 x and y variables were uninitialized.
3085 2) The old code passed false for active to HitTestRequest, which was wrong.
3086 The new code passes true. This flag needs to be true for hit testing done
3087 while the mouse is down and false for hit testing done while the mouse is up.
3088 3) The old code did not have the SVG-specific logic to match the mouse moved case.
3089 4) The old code wouldn't do any selection updating if the return value from hitTest
3090 was false, which is incorrect. The new code ignores the return value as it should.
3092 2007-08-08 Beth Dakin <bdakin@apple.com>
3094 Reviewed by Geoff Garen.
3096 Fx for <rdar://problem/5286443>, http://bugs.webkit.org/
3097 show_bug.cgi?id=14268 REGRESSION: Radio buttons don't stay selected
3098 due to unclosed <label> tags
3100 This patch maintains the behavior that allows <label> tags to nest.
3101 This matches WinIE, and appears to match the spec, since the spec
3102 does not explicitly say that they cannot nest. It fixes the bug
3103 instead by calling setDefaultHandled() in two places it should have
3104 been called anyway. This keeps the appropriate button checked as
3107 * html/HTMLInputElement.cpp:
3108 (WebCore::HTMLInputElement::postDispatchEventHandler):
3109 * html/HTMLLabelElement.cpp:
3110 (WebCore::HTMLLabelElement::defaultEventHandler):
3112 2007-08-08 Justin Garcia <justin.garcia@apple.com>
3116 <rdar://problem/5387578> Crash at ReplaceSelectionCommand::doApply() when pasting just after table cell content
3118 ReplaceSelectionCommand::doApply() inserts a line break before insertion
3119 to prevent block nesting. InsertLineBreakCommand::doApply was accidently
3120 destroying a text node when it removed insignificant whitespace and then
3121 setting a nil endingSelection().
3123 * editing/InsertLineBreakCommand.cpp:
3124 (WebCore::InsertLineBreakCommand::doApply): If insignificant whitespace
3125 removal removes textNode from the document, insert a text node containing
3126 the non-breaking space we were attempting to insert and then insert it
3127 at the position that the removed textNode occupied.
3129 2007-08-08 Geoffrey Garen <ggaren@apple.com>
3131 Reviewed by Maciej Stachowiak.
3133 Added a thrash check to live decoded resource eviction.
3135 Here's the strategy: Stamp every image with its paint time. Don't evict
3136 a live decoded resource until another resource paints with a reasonably
3137 (1 second) larger time stamp.
3139 If no other resource paints, or another resource paints, but very soon
3140 after the resource in question, the resource in question is very likely
3141 to paint again soon. In fact, it's probably still on screen. So we
3142 leave it alone. (Previously, we evicted it on a timer, but that would
3143 evict a resource that was still on screen, hurting speed without
3144 helping memory use.)
3146 In theory, this algorithm allows a single large resource or closely
3147 related set of resources to linger in the live decoded cache even
3148 though the cache is over its limit. However, that can only happen as
3149 long as no other resource ever paints again, which guarantees an
3150 absolute cap on cache memory usage from then on. Also, the resources
3151 will only linger as long as they remain live. Upon going dead, they
3152 will flush. Also, these circumstances are so rare that they are almost
3153 impossible to encounter in the wild. So don't sweat it.
3155 Stop evicting if the next resource painted too recently:
3158 (WebCore::Cache::pruneLiveResources):
3159 * loader/CachedResource.cpp:
3160 (WebCore::CachedResource::CachedResource):
3161 (WebCore::CachedResource::liveResourceAccessed):
3162 * loader/CachedResource.h:
3164 Track the paint time stamp in Frame. We do this to give a consistent
3165 stamp to all resources painted in a single paint operation (in case the
3166 operation takes a significant amount of time), and to avoid excessive
3167 calls to system time functions, which hurt the PLT:
3170 (WebCore::Frame::paint):
3172 (WebCore::Frame::currentPaintTimeStamp):
3174 2007-08-08 Sam Weinig <sam@webkit.org>
3176 Reviewed by Adam Roben.
3178 Update project file to reflect the moving of character-sets.txt
3179 and make-charset-table.pl to platform/mac a while ago.
3181 * WebCore.xcodeproj/project.pbxproj:
3183 2007-08-08 Justin Garcia <justin.garcia@apple.com>
3185 Reviewed by Harrison.
3187 <rdar://problem/5390681> WebKit asserts when deleting To Do content selected with a double-click
3190 (WebCore::Position::trailingWhitespacePosition): Use VisiblePosition::characterAfter
3191 to look for a trailing space. The old code would incorrectly return a position before
3192 a non-editable space if it had a collapsed space before it.
3194 2007-08-08 Sam Weinig <sam@webkit.org>
3198 Make protocol and host compares case-insensitive.
3200 * bindings/js/kjs_window.cpp:
3201 (KJS::Window::isSafeScript):
3203 (WebCore::Document::initSecurityPolicyURL):
3204 * platform/DeprecatedString.cpp:
3205 (WebCore::equalIgnoringCase):
3206 * platform/DeprecatedString.h:
3207 (WebCore::equalIgnoringCase):
3209 2007-08-08 Justin Garcia <justin.garcia@apple.com>
3211 Reviewed by Harrison.
3213 <rdar://problem/5390681> WebKit asserts when deleting To Do content selected with a double-click
3216 (WebCore::Position::leadingWhitespacePosition): Added checks to prevent expansion across editable an boundary.
3217 (WebCore::Position::trailingWhitespacePosition): Ditto.
3219 2007-08-08 Adele Peterson <adele@apple.com>
3223 Fix for <rdar://problem/5393798> 100% reproducible crash in WebCore::Scrollbar::setValue
3225 * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent):
3226 If the hit testing originally determined the event was in a scrollbar,
3227 refetch the MouseEventWithHitTestResults in case the scrollbar widget was destroyed when the mouse event was handled.
3229 2007-08-08 Sam Weinig <sam@webkit.org>
3231 Reviewed by Geoff Garen.
3233 Fix for <rdar://problem/5354635>
3235 Match Firefox's model for data: URLs by not allowing them script access
3236 to any frames other then itself.
3238 * bindings/js/kjs_window.cpp:
3239 (KJS::Window::isSafeScript):
3241 (WebCore::Document::initSecurityPolicyURL):
3243 2007-08-08 Darin Adler <darin@apple.com>
3245 Reviewed by Kevin Decker.
3247 - fix for <rdar://problem/5390708> CrashTracer: [USER] 27 crashes in Safari at
3248 com.apple.WebCore: WTF::HashMap<etc>::set + 68, beneath pruneUnretainedIconsAtStartup
3250 * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::pruneUnretainedIconsOnStartup):
3251 Eliminate an unnecessary HashMap from the implementation; we can just use the
3252 m_pageURLToRetainCount map directly. This simplifies the code and allows us to handle
3253 the empty string, which otherwise poses a problem for HashMap.
3255 2007-08-08 Antti Koivisto <antti@apple.com>
3259 Fix for <rdar://problem/5391576>
3260 Malformed table innerHTML causes Safari to crash in HTMLParser::handleError (14894)
3262 Add null checks to protect against
3264 e.innerHTML = "<tr>text</tr>";
3266 type cases. Normal assumptions about document tree structure don't hold when parsing
3267 fragments. Results don't match Firefox in all cases. It seems to have some sort of
3268 anything-goes fragment parsing mode.
3270 * html/HTMLParser.cpp:
3271 (WebCore::HTMLParser::handleError):
3273 2007-08-07 Kevin McCullough <kmccullough@apple.com>
3275 Reviewed by Maciej and Hyatt.
3277 - <rdar://problem/4976879> REGRESSION: Safari doesn't work with Zimbra enhanced login.
3278 - Reverting a previous change, and modifying how documents are created so that we better match other browsers behavior with respect to namespaceURIs.
3280 * WebCore.xcodeproj/project.pbxproj:
3281 * dom/DOMImplementation.cpp:
3282 (WebCore::DOMImplementation::createDocument):
3284 (WebCore::Document::Document):
3285 (WebCore::Document::createElement):
3287 * html/HTMLDocument.cpp:
3288 (WebCore::HTMLDocument::createElement):
3289 * html/HTMLDocument.h:
3291 2007-08-08 Cameron Zwarich <cwzwarich@uwaterloo.ca>
3293 Reviewed and landed by Brady
3295 Fixes <http://bugs.webkit.org/show_bug.cgi?id=13422>
3297 Bug 13422: REGRESSION: Page reload loses page position
3299 * loader/FrameLoader.cpp:
3300 (WebCore::FrameLoader::updateHistoryForReload):
3302 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
3306 Be paranoid and disconnect from the signal before going away.
3308 * platform/gdk/PlatformScrollBarGdk.cpp:
3309 (PlatformScrollbar::~PlatformScrollbar):
3311 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
3315 Use GraphicsContext::translatePoint in RenderThemeGdk to paint at the
3317 This is needed as the Gtk+ theming code does not know about the translation
3318 of the GraphicsContext.
3320 * platform/gdk/RenderThemeGdk.cpp:
3321 (WebCore::RenderThemeGdk::paintCheckbox):
3322 (WebCore::RenderThemeGdk::paintRadio):
3323 (WebCore::RenderThemeGdk::paintButton):
3325 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
3329 Implement Widget::paint for the Gtk port. This is needed to paint
3330 Widgets in z-order. The original GdkEventExpose is stored within the
3331 GraphicsContext and then used to draw the children. This is similiar
3332 to gtk_container_propagate_expose but we try to honor the GraphicsConntext
3335 * platform/gdk/WidgetGdk.cpp:
3336 (WebCore::Widget::paint):
3337 * platform/graphics/GraphicsContext.h:
3338 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3339 (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3340 (WebCore::GraphicsContext::setGdkExposeEvent):
3341 (WebCore::GraphicsContext::gdkExposeEvent):
3342 (WebCore::GraphicsContext::gdkDrawable):
3343 (WebCore::GraphicsContext::translatePoint):
3345 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
3347 Reviewed by Oliver Hunt.
3349 Implement PlatformScrollbar by calling ScrollBar::setValue from
3350 gtkValueChange connected to the value-changed signal of the
3352 Update 'value' of the GtkAdjustment in updateThumbPosition and
3353 set upper, page-increment, step-increment and page_size in
3354 updateThumbProportion.
3356 This is from bug http://bugs.webkit.org/show_bug.cgi?id=14795.
3358 * platform/gdk/PlatformScrollBar.h:
3359 * platform/gdk/PlatformScrollBarGdk.cpp:
3360 (PlatformScrollbar::PlatformScrollbar):
3361 (PlatformScrollbar::updateThumbPosition):
3362 (PlatformScrollbar::updateThumbProportion):
3363 (PlatformScrollbar::gtkValueChanged):
3365 2007-08-07 Geoffrey Garen <ggaren@apple.com>
3367 Reviewed by Maciej Stachowiak. Based on earlier review from Dave Hyatt.
3369 First chunk of work for <rdar://problem/5326009> Make non-browser
3370 WebKit clients have no memory cache, or a very tiny one
3374 Removed decodedSizeWillChange mechanism because my last patch to
3375 change the live resources list to a strict LRU model made that code
3378 Renamed "liveResourcesList" and related stuff =>
3379 "liveDecodedResourcesList" because only live resources with decoded
3380 data are kept in the list.
3382 * loader/CachedImage.cpp:
3383 (WebCore::CachedImage::decodedSizeChanged): Only add ourselves to the
3384 list if we're live, our decoded size has grown, and we're not in the
3385 list already. (Otherwise, either we're not live, we're not decoded,
3386 or we're already in the list.)
3388 * loader/CachedResource.cpp:
3389 (WebCore::CachedResource::liveResourceAccessed): Only re-insert
3390 ourselves into the list if we're already there. (In theory, this should
3391 be always, but it's a little more clear to check.)
3393 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
3397 Kill class FrameGdk and move the stubs to page/gdk/FrameGdk.cpp and the
3398 remainings into WebKitGtkFrame.
3399 The DRT functionality of class FrameGdk is currently lost.
3402 * loader/gdk/FrameLoaderClientGdk.cpp:
3403 * loader/gdk/FrameLoaderClientGdk.h:
3404 * page/gdk/FrameGdk.cpp: Renamed from WebCore/platform/gdk/FrameGdk.cpp.
3405 (WebCore::Frame::issueTransposeCommand):
3406 (WebCore::Frame::cleanupPlatformScriptObjects):
3407 (WebCore::Frame::dragImageForSelection):
3408 (WebCore::Frame::dashboardRegionsChanged):
3409 * platform/gdk/FrameGdk.h: Removed.
3410 * platform/gdk/TemporaryLinkStubs.cpp: Removed Frame stub, added the loadResourceIntoArray stub
3411 * platform/gdk/WidgetGdk.cpp:
3413 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
3417 Remove the event handling code and move it to WebKit/gtk/Api/webkitgtkpage.cpp
3419 * platform/gdk/FrameGdk.cpp:
3420 * platform/gdk/FrameGdk.h:
3422 2007-08-07 Holger Hans Peter Freyther <zecke@selfish.org>
3426 Switch from the generic union GdkEvent to the specific struct GdkEvent*. This is needed
3427 to make WebKitGtkPage handle the events by reimplementing the default handlers in the near
3430 * platform/PlatformKeyboardEvent.h:
3431 * platform/PlatformMouseEvent.h:
3432 * platform/PlatformWheelEvent.h:
3433 * platform/gdk/FrameGdk.cpp:
3434 (WebCore::FrameGdk::handleGdkEvent):
3435 * platform/gdk/KeyEventGdk.cpp:
3436 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3437 * platform/gdk/MouseEventGdk.cpp:
3438 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3439 * platform/gdk/WheelEventGdk.cpp:
3440 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3442 2007-08-07 George Staikos <staikos@kde.org>
3444 Some QStyles don't handle negative maximum well (crash)
3446 * platform/qt/PlatformScrollBarQt.cpp:
3447 (WebCore::PlatformScrollbar::paint):
3449 2007-08-07 Antti Koivisto <antti@apple.com>
3453 Fix <rdar://problem/5102553>
3454 Mail spins trying to display or edit a specific long plain text message in WebCore::TimerBase::...
3456 Calling removeLeftoverAnonymousBoxes() from RenderBlock::addChildToFlow() made adding children
3457 O(n^2) in simple cases (repeated <div><div></div></div> for example).
3459 I couldn't find any limited fix so here is a more complete one. It removes iterating/recursing
3460 removeLeftoverAnonymousBoxes() method altogether. Instead of hunting around wildly, just get
3461 rid of anonymous boxes with block children when they occur.
3463 * rendering/RenderBlock.cpp:
3464 (WebCore::RenderBlock::addChildToFlow):
3465 * rendering/RenderButton.h:
3466 (WebCore::RenderButton::removeLeftoverAnonymousBlock):
3467 * rendering/RenderContainer.cpp:
3468 (WebCore::RenderContainer::removeLeftoverAnonymousBlock):
3469 * rendering/RenderContainer.h:
3470 * rendering/RenderObject.cpp:
3471 (WebCore::RenderObject::handleDynamicFloatPositionChange):
3472 (WebCore::RenderObject::removeLeftoverAnonymousBlock):
3473 * rendering/RenderObject.h:
3474 * rendering/RenderTextControl.h:
3475 (WebCore::RenderTextControl::removeLeftoverAnonymousBlock):
3477 2007-08-06 Sam Weinig <sam@webkit.org>
3481 Fix for <rdar://problem/5354689>
3483 - Use document variable to determine permissions instead
3484 of traversing the frame tree.
3486 * bindings/js/kjs_window.cpp:
3487 (KJS::Window::isSafeScript):
3489 (WebCore::Document::Document):
3490 (WebCore::Document::initSecurityPolicyURL):
3492 (WebCore::Document::securityPolicyURL):
3493 * loader/FrameLoader.cpp:
3494 (WebCore::FrameLoader::setOpener): We must re-initialize the
3495 safeScript URL when setting the opener because the opener was
3496 not known at Document construction.
3498 2007-08-06 David Hyatt <hyatt@apple.com>
3500 Make sure to clear out the parent of the ellipsis box so that it doesn't
3501 trigger the consistency check for line boxes.
3506 * rendering/RootInlineBox.cpp:
3507 (WebCore::RootInlineBox::detachEllipsisBox):
3509 2007-08-06 David Hyatt <hyatt@apple.com>
3511 Back out fix for <rdar://problem/5366582> and replace it with the correct
3512 fix. Make sure to delete the line box tree before splitting an inline flow
3513 into a continuation. The added layout test for the original checkin covers
3518 * rendering/RenderBlock.cpp:
3519 (WebCore::RenderBlock::makeChildrenNonInline):