1 2007-08-09 Anders Carlsson <andersca@apple.com>
5 <rdar://problem/5400029> iframes with an image src rarely load image
7 Don't try to shrink standalone images in subframes. The resize event is not
8 sent for subframes which screws up the shrink-to-fit logic.
10 * loader/ImageDocument.cpp:
11 (WebCore::ImageDocument::createDocumentStructure):
12 (WebCore::ImageDocument::imageChanged):
13 (WebCore::ImageDocument::shouldShrinkToFit):
14 * loader/ImageDocument.h:
16 2007-08-10 Holger Hans Peter Freyther <zecke@selfish.org>
20 Implement FrameLoaderClientGdk::createFrame mostly by copying
21 the windows implementation. A method similiar to WebFrame::loadURLIntoChild
22 was not introduced instead we have a simplified version similiar to the
25 Remove building of WebKit/gtk/webkitgtkframedata.{cpp,h}.
28 * loader/gdk/FrameLoaderClientGdk.cpp:
29 (WebCore::FrameLoaderClientGdk::createFrame):
31 2007-08-10 Holger Hans Peter Freyther <zecke@selfish.org>
35 Use the ScrollView/Widget design of the Windows port to only use one
36 native window for the whole page. This will make it possible to implement
37 FrameLoaderClientGdk::createFrame.
39 In contrast to the windows port the ScrollBars are GtkWidgets. To paint them
40 at the right position we need to position them correctly. To not scroll the
41 ScrollBar's belonging to the ScrollView a ScrollViewScrollbar is introduced with
42 a different geometryChanged method.
44 To allow the Gtk+ way of scrolling the ScrollView allows to get GtkAdjustments
45 set. In this case no ScrollViewScrollbar will be created.
48 * platform/ScrollView.h:
50 * platform/gdk/PlatformScreenGdk.cpp:
51 (WebCore::screenDepth):
52 * platform/gdk/PlatformScrollBar.h:
53 * platform/gdk/PlatformScrollBarGdk.cpp:
54 (PlatformScrollbar::PlatformScrollbar):
55 (PlatformScrollbar::~PlatformScrollbar):
56 (PlatformScrollbar::setRect):
57 (PlatformScrollbar::geometryChanged):
58 * platform/gdk/ScrollViewGdk.cpp:
59 (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
60 (WebCore::ScrollView::ScrollViewPrivate::~ScrollViewPrivate):
61 (WebCore::ScrollViewScrollbar::ScrollViewScrollbar):
62 (WebCore::ScrollViewScrollbar::geometryChanged):
63 (WebCore::ScrollView::ScrollViewPrivate::setHasHorizontalScrollbar):
64 (WebCore::ScrollView::ScrollViewPrivate::setHasVerticalScrollbar):
65 (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
66 (WebCore::ScrollView::ScrollViewPrivate::adjustmentChanged):
67 (WebCore::ScrollView::ScrollViewPrivate::valueChanged):
68 (WebCore::ScrollView::ScrollViewPrivate::windowClipRect):
69 (WebCore::ScrollView::setGtkAdjustments):
70 (WebCore::ScrollView::updateContents):
71 (WebCore::ScrollView::update):
72 (WebCore::ScrollView::visibleWidth):
73 (WebCore::ScrollView::resizeContents):
74 (WebCore::ScrollView::contentsX):
75 (WebCore::ScrollView::scrollOffset):
76 (WebCore::ScrollView::maximumScroll):
77 (WebCore::ScrollView::scrollBy):
78 (WebCore::ScrollView::suppressScrollbars):
79 (WebCore::ScrollView::setHScrollbarMode):
80 (WebCore::ScrollView::setVScrollbarMode):
81 (WebCore::ScrollView::setScrollbarsMode):
82 (WebCore::ScrollView::setFrameGeometry):
83 (WebCore::ScrollView::addChild):
84 (WebCore::ScrollView::removeChild):
85 (WebCore::ScrollView::scrollRectIntoViewRecursively):
86 (WebCore::ScrollView::wheelEvent):
87 (WebCore::ScrollView::updateScrollbars):
88 (WebCore::ScrollView::windowToContents):
89 (WebCore::ScrollView::contentsToWindow):
90 (WebCore::ScrollView::scrollbarUnderMouse):
91 (WebCore::ScrollView::convertChildToSelf):
92 (WebCore::ScrollView::convertSelfToChild):
93 (WebCore::ScrollView::paint):
94 (WebCore::ScrollView::geometryChanged):
95 (WebCore::ScrollView::scroll):
96 (WebCore::ScrollView::addToDirtyRegion):
97 (WebCore::ScrollView::scrollBackingStore):
98 (WebCore::ScrollView::updateBackingStore):
99 * platform/gdk/WidgetGdk.cpp:
100 (WebCore::WidgetPrivate::gdkDrawable):
101 (WebCore::Widget::Widget):
102 (WebCore::Widget::setContainingWindow):
103 (WebCore::Widget::containingWindow):
104 (WebCore::Widget::frameGeometry):
105 (WebCore::Widget::setFrameGeometry):
106 (WebCore::Widget::setParent):
107 (WebCore::Widget::parent):
108 (WebCore::Widget::setCursor):
109 (WebCore::Widget::show):
110 (WebCore::Widget::hide):
111 (WebCore::Widget::removeFromParent):
112 (WebCore::Widget::paint):
113 (WebCore::Widget::invalidate):
114 (WebCore::Widget::invalidateRect):
115 (WebCore::Widget::convertToContainingWindow):
116 (WebCore::Widget::convertFromContainingWindow):
117 (WebCore::Widget::convertChildToSelf):
118 (WebCore::Widget::convertSelfToChild):
119 (WebCore::Widget::suppressInvalidation):
120 (WebCore::Widget::setSuppressInvalidation):
122 2007-08-09 Adele Peterson <adele@apple.com>
124 Fix by Brady, reviewed by me.
126 Fix for <rdar://problem/5380697> connection:willSendRequest:redirectResponse: is called on every NSURLConnection
128 * platform/network/mac/ResourceHandleMac.mm: (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
129 Work around a behavior change in CFNetwork where willSendRequest gets called more often by returning early.
131 2007-08-09 Darin Adler <darin@apple.com>
135 - fix <rdar://problem/4889753> REGRESSION: Selection doesn't continue with drag selecting
136 when autoscrolling vertically (in Notes as well as Safari)
138 The bug doesn't happen inside DumpRenderTree, so I was unable to make an automated
141 * manual-tests/autoscroll-when-outside-window.html: Added.
143 * rendering/RenderLayer.cpp: (WebCore::RenderLayer::autoscroll): Removed unneeded null
144 check for the layer's renderer and the document, neither of which can be null. Call
145 the new updateSelectionForMouseDrag instead of doing selection updating here.
147 * page/EventHandler.h:
148 * page/EventHandler.cpp:
149 (WebCore::EventHandler::handleMouseDraggedEvent): Refactored most of the logic
150 about updating the selection into updateSelectionForMouseDrag.
151 (WebCore::EventHandler::updateSelectionForMouseDrag): Added. The public version of
152 this function takes no parameters, and is for use from auto-scrolling code. The
153 private version of this function takes node and point parameters and contains the
154 shared code, including everything from updateSelectionForMouseDragOverPosition.
155 Aside from the code motion, variable name changes, and sharing more code, this
156 differs from the old code in RenderLayer::autoscroll in the following ways:
158 1) The old code did hit testing only in the layer that was auto-scrolling,
159 and the new code instead starts the hit testing at the root layer, which is
160 better because it's the same thing we do for mouse moved events. Further,
161 the code to do this by calling convertToLayerCoords had a bug because the
162 x and y variables were uninitialized.
163 2) The old code passed false for active to HitTestRequest, which was wrong.
164 The new code passes true. This flag needs to be true for hit testing done
165 while the mouse is down and false for hit testing done while the mouse is up.
166 3) The old code did not have the SVG-specific logic to match the mouse moved case.
167 4) The old code wouldn't do any selection updating if the return value from hitTest
168 was false, which is incorrect. The new code ignores the return value as it should.
170 2007-08-08 Beth Dakin <bdakin@apple.com>
172 Reviewed by Geoff Garen.
174 Fx for <rdar://problem/5286443>, http://bugs.webkit.org/
175 show_bug.cgi?id=14268 REGRESSION: Radio buttons don't stay selected
176 due to unclosed <label> tags
178 This patch maintains the behavior that allows <label> tags to nest.
179 This matches WinIE, and appears to match the spec, since the spec
180 does not explicitly say that they cannot nest. It fixes the bug
181 instead by calling setDefaultHandled() in two places it should have
182 been called anyway. This keeps the appropriate button checked as
185 * html/HTMLInputElement.cpp:
186 (WebCore::HTMLInputElement::postDispatchEventHandler):
187 * html/HTMLLabelElement.cpp:
188 (WebCore::HTMLLabelElement::defaultEventHandler):
190 2007-08-08 Justin Garcia <justin.garcia@apple.com>
194 <rdar://problem/5387578> Crash at ReplaceSelectionCommand::doApply() when pasting just after table cell content
196 ReplaceSelectionCommand::doApply() inserts a line break before insertion
197 to prevent block nesting. InsertLineBreakCommand::doApply was accidently
198 destroying a text node when it removed insignificant whitespace and then
199 setting a nil endingSelection().
201 * editing/InsertLineBreakCommand.cpp:
202 (WebCore::InsertLineBreakCommand::doApply): If insignificant whitespace
203 removal removes textNode from the document, insert a text node containing
204 the non-breaking space we were attempting to insert and then insert it
205 at the position that the removed textNode occupied.
207 2007-08-08 Geoffrey Garen <ggaren@apple.com>
209 Reviewed by Maciej Stachowiak.
211 Added a thrash check to live decoded resource eviction.
213 Here's the strategy: Stamp every image with its paint time. Don't evict
214 a live decoded resource until another resource paints with a reasonably
215 (1 second) larger time stamp.
217 If no other resource paints, or another resource paints, but very soon
218 after the resource in question, the resource in question is very likely
219 to paint again soon. In fact, it's probably still on screen. So we
220 leave it alone. (Previously, we evicted it on a timer, but that would
221 evict a resource that was still on screen, hurting speed without
224 In theory, this algorithm allows a single large resource or closely
225 related set of resources to linger in the live decoded cache even
226 though the cache is over its limit. However, that can only happen as
227 long as no other resource ever paints again, which guarantees an
228 absolute cap on cache memory usage from then on. Also, the resources
229 will only linger as long as they remain live. Upon going dead, they
230 will flush. Also, these circumstances are so rare that they are almost
231 impossible to encounter in the wild. So don't sweat it.
233 Stop evicting if the next resource painted too recently:
236 (WebCore::Cache::pruneLiveResources):
237 * loader/CachedResource.cpp:
238 (WebCore::CachedResource::CachedResource):
239 (WebCore::CachedResource::liveResourceAccessed):
240 * loader/CachedResource.h:
242 Track the paint time stamp in Frame. We do this to give a consistent
243 stamp to all resources painted in a single paint operation (in case the
244 operation takes a significant amount of time), and to avoid excessive
245 calls to system time functions, which hurt the PLT:
248 (WebCore::Frame::paint):
250 (WebCore::Frame::currentPaintTimeStamp):
252 2007-08-08 Sam Weinig <sam@webkit.org>
254 Reviewed by Adam Roben.
256 Update project file to reflect the moving of character-sets.txt
257 and make-charset-table.pl to platform/mac a while ago.
259 * WebCore.xcodeproj/project.pbxproj:
261 2007-08-08 Justin Garcia <justin.garcia@apple.com>
263 Reviewed by Harrison.
265 <rdar://problem/5390681> WebKit asserts when deleting To Do content selected with a double-click
268 (WebCore::Position::trailingWhitespacePosition): Use VisiblePosition::characterAfter
269 to look for a trailing space. The old code would incorrectly return a position before
270 a non-editable space if it had a collapsed space before it.
272 2007-08-08 Sam Weinig <sam@webkit.org>
276 Make protocol and host compares case-insensitive.
278 * bindings/js/kjs_window.cpp:
279 (KJS::Window::isSafeScript):
281 (WebCore::Document::initSecurityPolicyURL):
282 * platform/DeprecatedString.cpp:
283 (WebCore::equalIgnoringCase):
284 * platform/DeprecatedString.h:
285 (WebCore::equalIgnoringCase):
287 2007-08-08 Justin Garcia <justin.garcia@apple.com>
289 Reviewed by Harrison.
291 <rdar://problem/5390681> WebKit asserts when deleting To Do content selected with a double-click
294 (WebCore::Position::leadingWhitespacePosition): Added checks to prevent expansion across editable an boundary.
295 (WebCore::Position::trailingWhitespacePosition): Ditto.
297 2007-08-08 Adele Peterson <adele@apple.com>
301 Fix for <rdar://problem/5393798> 100% reproducible crash in WebCore::Scrollbar::setValue
303 * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent):
304 If the hit testing originally determined the event was in a scrollbar,
305 refetch the MouseEventWithHitTestResults in case the scrollbar widget was destroyed when the mouse event was handled.
307 2007-08-08 Sam Weinig <sam@webkit.org>
309 Reviewed by Geoff Garen.
311 Fix for <rdar://problem/5354635>
313 Match Firefox's model for data: URLs by not allowing them script access
314 to any frames other then itself.
316 * bindings/js/kjs_window.cpp:
317 (KJS::Window::isSafeScript):
319 (WebCore::Document::initSecurityPolicyURL):
321 2007-08-08 Darin Adler <darin@apple.com>
323 Reviewed by Kevin Decker.
325 - fix for <rdar://problem/5390708> CrashTracer: [USER] 27 crashes in Safari at
326 com.apple.WebCore: WTF::HashMap<etc>::set + 68, beneath pruneUnretainedIconsAtStartup
328 * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::pruneUnretainedIconsOnStartup):
329 Eliminate an unnecessary HashMap from the implementation; we can just use the
330 m_pageURLToRetainCount map directly. This simplifies the code and allows us to handle
331 the empty string, which otherwise poses a problem for HashMap.
333 2007-08-08 Antti Koivisto <antti@apple.com>
337 Fix for <rdar://problem/5391576>
338 Malformed table innerHTML causes Safari to crash in HTMLParser::handleError (14894)
340 Add null checks to protect against
342 e.innerHTML = "<tr>text</tr>";
344 type cases. Normal assumptions about document tree structure don't hold when parsing
345 fragments. Results don't match Firefox in all cases. It seems to have some sort of
346 anything-goes fragment parsing mode.
348 * html/HTMLParser.cpp:
349 (WebCore::HTMLParser::handleError):
351 2007-08-07 Kevin McCullough <kmccullough@apple.com>
353 Reviewed by Maciej and Hyatt.
355 - <rdar://problem/4976879> REGRESSION: Safari doesn't work with Zimbra enhanced login.
356 - Reverting a previous change, and modifying how documents are created so that we better match other browsers behavior with respect to namespaceURIs.
358 * WebCore.xcodeproj/project.pbxproj:
359 * dom/DOMImplementation.cpp:
360 (WebCore::DOMImplementation::createDocument):
362 (WebCore::Document::Document):
363 (WebCore::Document::createElement):
365 * html/HTMLDocument.cpp:
366 (WebCore::HTMLDocument::createElement):
367 * html/HTMLDocument.h:
369 2007-08-08 Cameron Zwarich <cwzwarich@uwaterloo.ca>
371 Reviewed and landed by Brady
373 Fixes <http://bugs.webkit.org/show_bug.cgi?id=13422>
375 Bug 13422: REGRESSION: Page reload loses page position
377 * loader/FrameLoader.cpp:
378 (WebCore::FrameLoader::updateHistoryForReload):
380 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
384 Be paranoid and disconnect from the signal before going away.
386 * platform/gdk/PlatformScrollBarGdk.cpp:
387 (PlatformScrollbar::~PlatformScrollbar):
389 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
393 Use GraphicsContext::translatePoint in RenderThemeGdk to paint at the
395 This is needed as the Gtk+ theming code does not know about the translation
396 of the GraphicsContext.
398 * platform/gdk/RenderThemeGdk.cpp:
399 (WebCore::RenderThemeGdk::paintCheckbox):
400 (WebCore::RenderThemeGdk::paintRadio):
401 (WebCore::RenderThemeGdk::paintButton):
403 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
407 Implement Widget::paint for the Gtk port. This is needed to paint
408 Widgets in z-order. The original GdkEventExpose is stored within the
409 GraphicsContext and then used to draw the children. This is similiar
410 to gtk_container_propagate_expose but we try to honor the GraphicsConntext
413 * platform/gdk/WidgetGdk.cpp:
414 (WebCore::Widget::paint):
415 * platform/graphics/GraphicsContext.h:
416 * platform/graphics/cairo/GraphicsContextCairo.cpp:
417 (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
418 (WebCore::GraphicsContext::setGdkExposeEvent):
419 (WebCore::GraphicsContext::gdkExposeEvent):
420 (WebCore::GraphicsContext::gdkDrawable):
421 (WebCore::GraphicsContext::translatePoint):
423 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
425 Reviewed by Oliver Hunt.
427 Implement PlatformScrollbar by calling ScrollBar::setValue from
428 gtkValueChange connected to the value-changed signal of the
430 Update 'value' of the GtkAdjustment in updateThumbPosition and
431 set upper, page-increment, step-increment and page_size in
432 updateThumbProportion.
434 This is from bug http://bugs.webkit.org/show_bug.cgi?id=14795.
436 * platform/gdk/PlatformScrollBar.h:
437 * platform/gdk/PlatformScrollBarGdk.cpp:
438 (PlatformScrollbar::PlatformScrollbar):
439 (PlatformScrollbar::updateThumbPosition):
440 (PlatformScrollbar::updateThumbProportion):
441 (PlatformScrollbar::gtkValueChanged):
443 2007-08-07 Geoffrey Garen <ggaren@apple.com>
445 Reviewed by Maciej Stachowiak. Based on earlier review from Dave Hyatt.
447 First chunk of work for <rdar://problem/5326009> Make non-browser
448 WebKit clients have no memory cache, or a very tiny one
452 Removed decodedSizeWillChange mechanism because my last patch to
453 change the live resources list to a strict LRU model made that code
456 Renamed "liveResourcesList" and related stuff =>
457 "liveDecodedResourcesList" because only live resources with decoded
458 data are kept in the list.
460 * loader/CachedImage.cpp:
461 (WebCore::CachedImage::decodedSizeChanged): Only add ourselves to the
462 list if we're live, our decoded size has grown, and we're not in the
463 list already. (Otherwise, either we're not live, we're not decoded,
464 or we're already in the list.)
466 * loader/CachedResource.cpp:
467 (WebCore::CachedResource::liveResourceAccessed): Only re-insert
468 ourselves into the list if we're already there. (In theory, this should
469 be always, but it's a little more clear to check.)
471 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
475 Kill class FrameGdk and move the stubs to page/gdk/FrameGdk.cpp and the
476 remainings into WebKitGtkFrame.
477 The DRT functionality of class FrameGdk is currently lost.
480 * loader/gdk/FrameLoaderClientGdk.cpp:
481 * loader/gdk/FrameLoaderClientGdk.h:
482 * page/gdk/FrameGdk.cpp: Renamed from WebCore/platform/gdk/FrameGdk.cpp.
483 (WebCore::Frame::issueTransposeCommand):
484 (WebCore::Frame::cleanupPlatformScriptObjects):
485 (WebCore::Frame::dragImageForSelection):
486 (WebCore::Frame::dashboardRegionsChanged):
487 * platform/gdk/FrameGdk.h: Removed.
488 * platform/gdk/TemporaryLinkStubs.cpp: Removed Frame stub, added the loadResourceIntoArray stub
489 * platform/gdk/WidgetGdk.cpp:
491 2007-08-08 Holger Hans Peter Freyther <zecke@selfish.org>
495 Remove the event handling code and move it to WebKit/gtk/Api/webkitgtkpage.cpp
497 * platform/gdk/FrameGdk.cpp:
498 * platform/gdk/FrameGdk.h:
500 2007-08-07 Holger Hans Peter Freyther <zecke@selfish.org>
504 Switch from the generic union GdkEvent to the specific struct GdkEvent*. This is needed
505 to make WebKitGtkPage handle the events by reimplementing the default handlers in the near
508 * platform/PlatformKeyboardEvent.h:
509 * platform/PlatformMouseEvent.h:
510 * platform/PlatformWheelEvent.h:
511 * platform/gdk/FrameGdk.cpp:
512 (WebCore::FrameGdk::handleGdkEvent):
513 * platform/gdk/KeyEventGdk.cpp:
514 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
515 * platform/gdk/MouseEventGdk.cpp:
516 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
517 * platform/gdk/WheelEventGdk.cpp:
518 (WebCore::PlatformWheelEvent::PlatformWheelEvent):
520 2007-08-07 George Staikos <staikos@kde.org>
522 Some QStyles don't handle negative maximum well (crash)
524 * platform/qt/PlatformScrollBarQt.cpp:
525 (WebCore::PlatformScrollbar::paint):
527 2007-08-07 Antti Koivisto <antti@apple.com>
531 Fix <rdar://problem/5102553>
532 Mail spins trying to display or edit a specific long plain text message in WebCore::TimerBase::...
534 Calling removeLeftoverAnonymousBoxes() from RenderBlock::addChildToFlow() made adding children
535 O(n^2) in simple cases (repeated <div><div></div></div> for example).
537 I couldn't find any limited fix so here is a more complete one. It removes iterating/recursing
538 removeLeftoverAnonymousBoxes() method altogether. Instead of hunting around wildly, just get
539 rid of anonymous boxes with block children when they occur.
541 * rendering/RenderBlock.cpp:
542 (WebCore::RenderBlock::addChildToFlow):
543 * rendering/RenderButton.h:
544 (WebCore::RenderButton::removeLeftoverAnonymousBlock):
545 * rendering/RenderContainer.cpp:
546 (WebCore::RenderContainer::removeLeftoverAnonymousBlock):
547 * rendering/RenderContainer.h:
548 * rendering/RenderObject.cpp:
549 (WebCore::RenderObject::handleDynamicFloatPositionChange):
550 (WebCore::RenderObject::removeLeftoverAnonymousBlock):
551 * rendering/RenderObject.h:
552 * rendering/RenderTextControl.h:
553 (WebCore::RenderTextControl::removeLeftoverAnonymousBlock):
555 2007-08-06 Sam Weinig <sam@webkit.org>
559 Fix for <rdar://problem/5354689>
561 - Use document variable to determine permissions instead
562 of traversing the frame tree.
564 * bindings/js/kjs_window.cpp:
565 (KJS::Window::isSafeScript):
567 (WebCore::Document::Document):
568 (WebCore::Document::initSecurityPolicyURL):
570 (WebCore::Document::securityPolicyURL):
571 * loader/FrameLoader.cpp:
572 (WebCore::FrameLoader::setOpener): We must re-initialize the
573 safeScript URL when setting the opener because the opener was
574 not known at Document construction.
576 2007-08-06 David Hyatt <hyatt@apple.com>
578 Make sure to clear out the parent of the ellipsis box so that it doesn't
579 trigger the consistency check for line boxes.
584 * rendering/RootInlineBox.cpp:
585 (WebCore::RootInlineBox::detachEllipsisBox):
587 2007-08-06 David Hyatt <hyatt@apple.com>
589 Back out fix for <rdar://problem/5366582> and replace it with the correct
590 fix. Make sure to delete the line box tree before splitting an inline flow
591 into a continuation. The added layout test for the original checkin covers
596 * rendering/RenderBlock.cpp:
597 (WebCore::RenderBlock::makeChildrenNonInline):
600 * rendering/RenderFlow.cpp:
601 (WebCore::RenderFlow::destroy):
604 * rendering/RenderInline.cpp:
605 (WebCore::RenderInline::splitFlow):
608 2007-08-06 Geoffrey Garen <ggaren@apple.com>
610 Reviewed by Darin Adler.
612 Touching a file to force a re-build.
614 2007-08-06 Darin Adler <darin@apple.com>
618 * rendering/RenderText.h: (WebCore::RenderText::checkConsistency):
621 2007-08-06 Darin Adler <darin@apple.com>
625 - fix <rdar://problem/5366582> crash on it.eurosport.yahoo.com page
627 Test: fast/dynamic/inline-to-block-crash.html
629 I added some consistency checks for the line box tree, which helped me figure out
630 what was going on with this bug pretty quickly.
632 * rendering/RenderBlock.cpp: (WebCore::RenderBlock::makeChildrenNonInline):
633 This is the actual fix. If the block needs layout, then don't try to delete the line
634 box tree because it's going to be rebuilt as part of layout. More importantly, the
635 child list in the tree is no good, so we will crash if we try to delete here.
637 * rendering/RenderFlow.cpp: (WebCore::RenderFlow::destroy):
638 Here's a second fix. We have the same issue in the code that handles anonymous
639 blocks -- if it's already running as part of layout, we can't walk through the
640 already partly destroyed line box tree. This crashed in one of the layout tests.
642 * rendering/InlineBox.h: Made more fields private, since I wanted to do a bit more
643 work in setters. Made setNextOnLine() and setPrevOnLine() assert that the box has a
644 parent. Made parent() assert that the parent is good. Also removed the unused
645 isChildOfParent() function.
646 * rendering/InlineBox.cpp: (WebCore::InlineBox::~InlineBox): At destruction time, if
647 we are still attached to a parent, tag that parent as having a "bad" child list.
649 * rendering/InlineFlowBox.h: Added m_reasonForBadChildList, checkConsistency(),
650 setHasBadChildList(), and hasBadChildList(). Also changed firstChild() and lastChild() so
651 they call checkConsistency() and made all the fields private instead of protected.
652 * rendering/InlineFlowBox.cpp:
653 (WebCore::InlineFlowBox::addToLine): Added consistency checks before and after adding a
654 box to the line. Also checked that next and prev start out as 0. Changed manipulation of
655 next and prev to use accessor functions.
656 (WebCore::InlineFlowBox::removeChild): Added consistency checks before and after removing
657 the box from the line.
658 (WebCore::InlineFlowBox::deleteLine): Use firstChild() instead of getting at m_firstChild
659 directly so we get a consistency check. Also set the parent to 0 before destroying so that
660 the assertion in ~InlineBox will work properly.
661 (WebCore::InlineFlowBox::extractLine): Ditto.
662 (WebCore::InlineFlowBox::attachLine): Ditto.
663 (WebCore::InlineFlowBox::adjustPosition): Ditto.
664 (WebCore::InlineFlowBox::checkConsistency): Added. Checks consistency of the child list by
665 looking at the parent, next, and prev pointers. Also asserts that we are not yet in the
666 "bad" child list state, which happens if one of our children is destroyed without removing
667 it from our list; that's normal, but once it happens we can't look at our child list again.
669 * rendering/InlineTextBox.h:
670 * rendering/InlineTextBox.cpp: Remove unnneeded destroy/new/delete functions -- these are
671 inherited from the InlineBox base class and don't need to be defined again.
673 * rendering/RenderFlow.h:
674 * rendering/RenderFlow.cpp:
675 (WebCore::RenderFlow::~RenderFlow): Assert that there are no children to confirm that we
676 didn't leak something.
677 (WebCore::RenderFlow::extractLineBox): Added consistency checks before and after removing
678 a run of boxes from the list.
679 (WebCore::RenderFlow::attachLineBox): Added consistency checks before and after adding
681 (WebCore::RenderFlow::removeLineBox): Added consistency checks before and after removing
683 (WebCore::RenderFlow::createInlineBox): Added consistency checks before and after adding
685 (WebCore::RenderFlow::checkConsistency): Added.
687 * rendering/RenderText.h:
688 * rendering/RenderText.cpp:
689 (WebCore::RenderText::~RenderText): Assert that there are no children to confirm that we
690 didn't leak something.
691 (WebCore::RenderText::extractTextBox): Added consistency checks before and after removing
692 a run of boxes from the list.
693 (WebCore::RenderText::attachTextBox): Added consistency checks before and after adding
695 (WebCore::RenderText::removeTextBox): Added consistency checks before and after removing
697 (WebCore::RenderText::deleteTextBoxes): Added code to call setHasBadChildList since this
698 destroys line boxes without informing the parent.
699 (WebCore::RenderText::checkConsistency): Added.
701 2007-08-06 Adele Peterson <adele@apple.com>
705 Fix for <rdar://problem/5382483> REGRESSION: <select> element's text is clipped when a CSS line-height is specified
707 Don't honor line-height for styled popup buttons. We already don't honor line-height for unstyled popups
708 and since IE and FF don't honor it at all for popups, we shouldn't either.
710 * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::adjustMenuListButtonStyle):
711 * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
713 2007-08-06 Antti <antti@apple.com>
717 Fix <rdar://problem/5378214>
718 Mail crashes at RenderLayer::paintLayer() when dragging a selection over To Do text
720 ObjC interface does not guarantee that Document::updateRendering() gets called after
721 modification are made to document. This can lead to situation where paint()
722 is invoked with document still dirty which can then crash in number of interesting ways.
724 - add hasChangedChild() as needsLayout() condition. layout() will then call recalcStyle()
725 catching most cases and making sure document is not dirty when entering painting.
726 - protect recalcStyle() and layout() from being executed during painting. There are some
727 cases needsLayout() protection does not cover.
729 No layout test, these states are very hard or impossible to reach using Javascript interface
730 (which generally guarantees that updateRendering() is done right after execution).
733 (WebCore::Document::recalcStyle):
735 (WebCore::Frame::paint):
736 (WebCore::Frame::setPaintRestriction):
737 (WebCore::Frame::isPainting):
738 (WebCore::FramePrivate::FramePrivate):
740 * page/FramePrivate.h:
741 * page/FrameView.cpp:
742 (WebCore::FrameView::layout):
743 (WebCore::FrameView::needsLayout):
745 2007-08-05 Maciej Stachowiak <mjs@apple.com>
747 Reviewed by Darin Adler.
749 <rdar://problem/5369110> CrashTracer: [USER] reproducible crash opening particular mail messages
751 * platform/network/mac/ResourceHandleMac.mm:
752 (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]): Make sure to retain
753 self for the body of this method. Otherwise, the willSendRequest could trigger events which will
754 cancel the connection, and we access ivars after this point.
755 (-[WebCoreSynchronousLoader connection:willSendRequest:redirectResponse:]): retain and release
758 2007-08-04 Adam Roben <aroben@apple.com>
760 Another workaround for <rdar://problem/5386894>
764 This fixed ~150 failing tests.
766 * platform/network/cf/ResourceResponseCFNet.cpp:
767 (WebCore::ResourceResponse::doUpdateResourceResponse): Hardcode the
768 MIME type for .svg files as well.
770 2007-08-04 Adam Roben <aroben@apple.com>
772 Workaround for <rdar://problem/5386894> CFURLResponseGetMIMEType returns "text/html" for local .xhtml and .xml files
776 This fixes ~350 failing tests.
778 * platform/network/cf/ResourceResponseCFNet.cpp:
779 (WebCore::ResourceResponse::doUpdateResourceResponse): Use a workaround
780 identical to the one in ResourceResponseMac.mm, but include .xml files
783 2007-08-04 David Kilzer <ddkilzer@webkit.org>
787 - fix for http://bugs.webkit.org/show_bug.cgi?id=14882
788 <rdar://problem/5386550> REGRESSION (r24866): text/plain documents are always downloaded
790 The supportedNonImageMimeTypes list is used to determine which MIME types may be viewed
791 within the web browser (e.g., plug-ins add their own MIME types to the list during
792 initialization), so we must add "text/plain" and "text/" back to the list. Since
793 this change would then break DOMImplementation::isTextMIMEType(), that method was reverted
794 to its original form and MIMETypeRegistry::shouldTreatAsText() was removed.
796 * dom/DOMImplementation.cpp:
797 (WebCore::DOMImplementation::isTextMIMEType): Revert to previous version.
798 * platform/MIMETypeRegistry.cpp:
799 (WebCore::initialiseSupportedNonImageMimeTypes): Added back "text/plain" and "text/" to the list.
800 (WebCore::MIMETypeRegistry::shouldTreatAsText): Removed.
801 * platform/MIMETypeRegistry.h:
803 2007-08-03 Brady Eidson <beidson@apple.com>
807 Fix for http://bugs.webkit.org/show_bug.cgi?id=14824 and <rdar://problem/5372989>
810 1 - The WebCore MIMEType registry was designed assuming the list of types would never change
811 That is false, as WebKit has API and SPI calls which directly mutate the MIMETypeRegistry
812 2 - DOMImplementation didn't consult the registry for any MIMEType that started with "text/",
813 instead maintaining it's own hard coded rules
815 * dom/DOMImplementation.cpp:
816 (WebCore::DOMImplementation::isTextMIMEType): For now, call through to the MIMETypeRegistry
817 until we decided a different fate for this function
819 * platform/MIMETypeRegistry.cpp:
820 (WebCore::initialiseSupportedNonImageMimeTypes): "SupportedNonImageMIMETypes" is really a misnomer for
821 "MIMETypes we should show as HTML" but that line has slowly been blurred since Tiger. In an attempt
822 to start to unblur it, remove "text/" and "text/plain"
823 (WebCore::MIMETypeRegistry::shouldTreatAsText): The decision is very close to the old DOMImplementation
824 method, except we don't automatically hand off "text/" types as true if they are in the set of supported
826 (WebCore::MIMETypeRegistry::getSupportedImageMIMETypes): Non-const (can be changed!)
827 (WebCore::MIMETypeRegistry::getSupportedImageResourceMIMETypes): Non-const (can be changed!)
828 (WebCore::MIMETypeRegistry::getSupportedNonImageMIMETypes): Non-const (can be changed!)
829 * platform/MIMETypeRegistry.h:
831 2007-08-03 Adele Peterson <adele@apple.com>
835 Fix for <rdar://problem/5345862> CrashTracer: [USER] 4 crashes in Safari at com.apple.WebCore: WebCore::Frame::isContentEditable const + 10
837 Couldn't reproduce the problem, but a nil check for the frame should fix this.
839 * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle):
841 2007-08-03 Anders Carlsson <andersca@apple.com>
845 <rdar://problem/5383286>
846 XMLHTTPRequest does not return 401 when user cancels authentication dialog (affects .Mac)
848 * loader/ResourceLoader.h:
849 Make receivedCancellation virtual.
851 * loader/SubresourceLoader.cpp:
852 (WebCore::SubresourceLoader::receivedCancellation):
853 Call SubresourceLoaderClient::receivedCancellation.
855 * xml/XMLHttpRequest.cpp:
856 (WebCore::XMLHttpRequest::receivedCancellation):
857 Save the failure response.
859 2007-08-03 Anders Carlsson <andersca@apple.com>
863 <rdar://problem/5374393>
864 Image change on disk not noticed by WebView; -[WebCache setDisabled:] used to cause a reload every time
866 This is essentially a better fix for the crash in <rdar://problem/5362783>.
868 * loader/DocLoader.cpp:
869 (WebCore::DocLoader::requestResource):
870 If the resource already exists in the m_docResources map, remove it and disassociate it from the doc loader.
872 2007-08-03 Oliver Hunt <oliver@apple.com>
876 <rdar://problem/5375190> Mail crashed in WebCore::CachedImage::imageSize() const when viewing a particular message
878 Fix the uncached load path to confirm that the type of resource being
879 returned actually matches the type that was requested.
881 Also make sure we never create a resource in the Cache for invalid urls.
884 (WebCore::Cache::requestResource):
885 * loader/DocLoader.cpp:
886 (WebCore::DocLoader::requestResource):
888 2007-08-03 Mitz Pettel <mitz@webkit.org>
892 - fix http://bugs.webkit.org/show_bug.cgi?id=14879
893 REGRESSION: First item in select (pop-up menu) is displayed even if another item was selected via JavaScript
895 Test: fast/forms/menulist-deselect-update.html
897 * html/HTMLOptionElement.cpp:
898 (WebCore::HTMLOptionElement::setSelected): Reordered to allow setSelectedIndex() to call setChanged().
900 2007-08-03 Anders Carlsson <andersca@apple.com>
904 <rdar://problem/5286444>
905 http://bugs.webkit.org/show_bug.cgi?id=14269
906 REGRESSION: Gmail links stop working after computer sleep
908 Add a PowerNotifier object that takes care of resetting and firing the shared timer when coming
911 * platform/mac/SharedTimerMac.cpp:
912 (-[PowerNotifier init]):
913 (-[PowerNotifier didWake:]):
914 (WebCore::setSharedTimerFireTime):
916 2007-08-04 Mark Rowe <mrowe@apple.com>
920 * rendering/RenderTextControl.cpp: Don't use the same name for two arguments.
922 2007-08-03 Mitz Pettel <mitz@webkit.org>
926 - fix http://bugs.webkit.org/show_bug.cgi?id=14653
927 REGRESSION (r23994): No caret is drawn after clicking a search field's placeholder text
928 <rdar://problem/5383841>
930 Test: fast/forms/search-click-in-placeholder.html
932 Defined a subclass of RenderBlock that never hit-tests children for use in
933 text controls. This avoids returning placeholder text as the hit node.
934 Since text controls cannot contain inline elements, there is no harm in
935 doing that unconditionally, and not just in the case that the field is
936 showing placeholder text.
938 * rendering/RenderTextControl.cpp:
939 (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock):
940 (WebCore::RenderTextControlInnerBlock::~RenderTextControlInnerBlock):
941 (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
942 (WebCore::RenderTextControl::createSubtreeIfNeeded):
944 2007-08-02 Oliver Hunt <oliver@apple.com>
948 Fix for <rdar://problem/5369332> Xcode crashes while selecting a hyperlink within a AppleScript dictionary (WebCore::Font::drawGlyphBuffer)
950 There were many places where we were not correctly retaining/releasing the
951 NSFont object stored in the C++ PlatformFontData object, this resulted in
952 the GC incorrectly collecting the NSFont.
954 This patch fixes the problem by prevent direct modification of the PlatformFontData
955 font pointer, allowing us to enforce correct CFRetain/Release behaviour.
957 * platform/FontData.h:
958 (WebCore::FontData::getNSFont):
959 * platform/mac/FontCacheMac.mm:
960 (WebCore::FontCache::getFontDataForCharacters):
961 (WebCore::FontCache::createFontPlatformData):
962 * platform/mac/FontDataMac.mm:
963 (WebCore::initFontData):
964 (WebCore::FontData::platformInit):
965 (WebCore::FontData::platformDestroy):
966 (WebCore::FontData::smallCapsFontData):
967 (WebCore::FontData::containsCharacters):
968 (WebCore::FontData::determinePitch):
969 (WebCore::FontData::platformWidthForGlyph):
970 (WebCore::FontData::checkShapesArabic):
971 * platform/mac/FontMac.mm:
972 (WebCore::initializeATSUStyle):
973 (WebCore::overrideLayoutOperation):
974 (WebCore::Font::drawGlyphs):
975 * platform/mac/FontPlatformData.h:
976 (WebCore::FontPlatformData::FontPlatformData):
977 (WebCore::FontPlatformData::~FontPlatformData):
978 (WebCore::FontPlatformData::hash):
979 (WebCore::FontPlatformData::operator==):
980 (WebCore::FontPlatformData::font):
981 (WebCore::FontPlatformData::setFont):
983 2007-08-03 Antti Koivisto <antti@apple.com>
985 Oops, this change wasn't supposed to be commited.
987 * page/mac/WebCoreFrameBridge.mm:
988 (-[WebCoreFrameBridge setBaseBackgroundColor:]):
990 2007-08-02 Antti Koivisto <antti@apple.com>
994 <rdar://problem/5355951>
995 plainText() fragments TCMalloc heap badly on large pages
997 also likely fixes some cases of
998 <rdar://problem/5335382>
999 CrashTracer: [REGRESSION] 73 crashes in Safari at com.apple.WebCore: WebCore::DeprecatedStringData::increaseUnicodeSize + 52
1001 If you load http://dscoder.com/test.txt with WebKit build with TCMalloc and system malloc you see that
1002 Safari RPRVT with TCMalloc is 118.8MB
1003 Safari RPRVT with system malloc is 69.7MB
1005 Difference is almost entirely caused by heap fragmentation from a full document plainText() call (for indexing purposes).
1007 The patch helps in two ways:
1008 - construct plainText string in pieces to avoid O(n^2) reallocs
1009 - allocate buffers using system malloc so they can be returned back to OS and don't fragment and grow TCMalloc heap
1011 This shrinks http://dscoder.com/test.txt RPRVT to 79.0MB and makes full document plainText() take 50ms instead of 500ms.
1012 The benefits are not limited to extreme cases, web pages above ~200kB can show substantial improvement in RPRVT.
1014 * editing/TextIterator.cpp:
1015 (WebCore::plainTextToMallocAllocatedBuffer):
1016 (WebCore::plainText):
1017 * editing/TextIterator.h:
1018 * page/mac/WebCoreFrameBridge.mm:
1019 (-[WebCoreFrameBridge selectedString]):
1020 (-[WebCoreFrameBridge stringForRange:]):
1022 2007-08-02 David Hyatt <hyatt@apple.com>
1024 Fix for 5374437, allow comment nodes to be the child of a document.
1025 Refine the check to always make a root element to check documentElement()
1026 rather than firstChild(), since a comment node could be present as the
1029 Reviewed by Tim Hatcher
1031 * html/HTMLDocument.cpp:
1032 (WebCore::HTMLDocument::childAllowed):
1033 * html/HTMLParser.cpp:
1034 (WebCore::HTMLParser::finished):
1036 2007-08-02 Antti Koivisto <antti@apple.com>
1040 <rdar://problem/5228138>
1041 REGRESSION(Leopard): test failures: tests that test Georgian numbering
1043 Fix to Georgian number tables to get CSS2.1 test results right. Font has relevant characters now
1044 which revealed that results were actually wrong.
1046 * rendering/RenderListMarker.cpp:
1047 (WebCore::toGeorgian):
1049 2007-08-02 Ada Chan <adachan@apple.com>
1053 <rdar://problem/5079175> Added parameters headerHeight and footerHeight to
1054 computePageRectsForFrame() so we can account for the header and footer when
1055 calculating page heights for this frame.
1057 * bridge/win/FrameWin.cpp:
1058 (WebCore::computePageRectsForFrame):
1059 * bridge/win/FrameWin.h:
1061 2007-08-02 Alice Liu <alice.liu@apple.com>
1063 Reviewed by Kevin McCullough.
1065 fixed <rdar://problem/5310312> REGRESSION: javascript is mis-escaped at http://labs.zarate.org/passwd causing bookmarklet to break
1068 expose some calls for WebKit to call.
1069 * manual-tests/JavaScript-bookmarklets.html: Added.
1071 2007-08-01 Adam Treat <treat@kde.org>
1073 Reviewed by George Staikos.
1075 Add an interface to manage global history for clients
1078 * platform/qt/TemporaryLinkStubs.cpp:
1080 2007-08-01 Adam Treat <treat@kde.org>
1082 Reviewed by George Staikos.
1084 Do not call update or paint from inside a paint event.
1086 * platform/qt/ScrollViewQt.cpp:
1087 (WebCore::ScrollView::updateContents):
1088 * platform/qt/WidgetQt.cpp:
1089 (WebCore::Widget::invalidateRect):
1091 2007-08-01 Timothy Hatcher <timothy@apple.com>
1095 <rdar://problem/5376156> Mail crash in DeleteButtonController::hide() when dropping selected image on DIV's border
1097 Add the container element back so the selection can not touch the deletion UI nodes. The container
1098 has style to prevent user selection, user drag and user modification.
1100 * editing/DeleteButtonController.cpp:
1101 (WebCore::DeleteButtonController::show): Make the container node, and append the button and outline elements.
1102 (WebCore::DeleteButtonController::hide): Remove the container elements and null out the other nodes.
1103 * editing/DeleteButtonController.h:
1105 2007-08-01 Steve Falkenburg <sfalken@apple.com>
1107 Build mod: Fix sln to match configs in vcproj.
1111 * WebCore.vcproj/WebCore.make:
1113 2007-07-31 David Harrison <harrison@apple.com>
1117 <rdar://problem/5362659> CrashTracer: [USER] 11 crashes in Mail at WebCore::InsertLineBreakCommand::doApply()
1119 The problem was that deleting with the X control leaves the selection inside the fragment that was deleted.
1121 * editing/DeleteButtonController.cpp:
1122 (WebCore::DeleteButtonController::deleteTarget):
1123 Because the deletion UI only appears when the selection is entirely
1124 within the target, we unconditionally update the selection to be
1125 a caret where the target had been.
1127 2007-07-31 Adele Peterson <adele@apple.com>
1131 Fix for <rdar://problem/5339395> REGRESSION:http://sudokucraving.com does not render grid correctly
1133 * rendering/RenderTextControl.h: (WebCore::RenderTextControl::hasControlClip): Clip for search fields.
1134 * rendering/RenderTextControl.cpp:
1135 (WebCore::RenderTextControl::controlClipRect): Added a control clip so the search field's cancel button and magnifier glass
1136 never draw outside the control's bounds.
1137 (WebCore::RenderTextControl::calcPrefWidths): Only include the inner box's padding when calculating the min/max width without using calcContentBoxWidth.
1138 Our old behavior was causing that inner padding to get counted twice. Also, no need to add in the border
1139 for an inner box that can't be controlled from outside this class.
1140 * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::calcPrefWidths): ditto.
1142 2007-07-31 Anders Carlsson <andersca@apple.com>
1146 Speculative fix for <rdar://problem/5359695>
1147 REGRESSION (Tiger Beta): Multiple crashes in WebCore::Widget::getView() const + 6
1149 * page/EventHandler.cpp:
1150 (WebCore::EventHandler::updateDragAndDrop):
1151 Null check the frame view.
1153 2007-07-31 Timothy Hatcher <timothy@apple.com>
1155 Reviewed by Oliver and Beth.
1157 <rdar://problem/5211271> ADOBE Leopard 9A410: At the first Launching InDesign after deactivate, EULA page gets blanked.
1159 Rename needsAcrobatFrameReloadingQuirk to needsAdobeFrameReloadingQuirk, since this now applies to more Adobe applications.
1162 * page/Settings.cpp:
1163 (WebCore::Settings::Settings):
1164 (WebCore::Settings::setNeedsAdobeFrameReloadingQuirk):
1166 (WebCore::Settings::needsAcrobatFrameReloadingQuirk):
1168 2007-07-31 Matt Perry <mpComplete@gmail.com>
1170 Reviewed by Brady and Darin, tweaked by Brady, landed by Brady
1172 Fix for http://bugs.webkit.org/show_bug.cgi?id=14757 and <rdar://problem/5364692>
1173 HTMLTokenizer::processingData implementation is incorrect
1175 * html/HTMLTokenizer.cpp:
1176 (WebCore::HTMLTokenizer::processingData): Made it also return true if the HTMLTokenizer was inside the write() call.
1177 * loader/FrameLoader.cpp:
1178 (WebCore::FrameLoader::FrameLoader):
1179 (WebCore::FrameLoader::checkLoadCompleteTimerFired):
1180 (WebCore::FrameLoader::scheduleCheckLoadComplete):
1181 (WebCore::FrameLoader::stopForUserCancel): Changed a call to checkLoadComplete to be asynchronous, since
1182 stopForUserCancel can be called while parsing.
1183 * loader/FrameLoader.h:
1185 2007-07-31 Anders Carlsson <andersca@apple.com>
1189 <rdar://problem/5371582>
1190 REGRESSION: PLT .5% slower due to r24451 (copying HTMLCollection objects)
1192 Make the hash maps store CollectionInfo pointers to reduce amount of copying when
1193 inserting/rehashing etc.
1196 (WebCore::Document::~Document):
1197 (WebCore::Document::nameCollectionInfo):
1200 2007-07-31 Sam Weinig <sam@webkit.org>
1204 Fix for http://bugs.webkit.org/show_bug.cgi?id=14825
1205 Non-integer hsl() colours are ignored
1207 * css/CSSParser.cpp:
1208 (WebCore::CSSParser::parseHSLParameters): Parse hue as a Number,
1211 2007-07-30 Justin Garcia <justin.garcia@apple.com>
1215 <rdar://problem/5369009> Crash due to infinite recursion in moveParagraphs on delete
1217 After the delete, we moved content into the previous block, and a style
1218 rule turned a style span in the moved content into a block, throwing
1219 moveParagraphs into infinite recursion, as it continually tried and failed
1220 to get the style span into the same paragraph as the content just before it.
1222 Added a method to ReplaceSelectionCommand to keep inserted style spans
1223 from turning into blocks because of style rules. Will add code to prevent
1224 other kinds of content from changing appearance because of style rules,
1225 post-Leopard (5371536). Also added a bool to ReplaceSelectionCommand's
1226 constructor to guard against infinite recursion.
1228 * editing/CompositeEditCommand.cpp:
1229 (WebCore::CompositeEditCommand::moveParagraphs):
1230 * editing/JSEditor.cpp:
1231 * editing/ReplaceSelectionCommand.cpp:
1232 (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
1233 (WebCore::ReplaceSelectionCommand::negateStyleRulesThatEffectAppearance):
1234 (WebCore::ReplaceSelectionCommand::doApply):
1235 * editing/ReplaceSelectionCommand.h:
1237 2007-07-30 Anders Carlsson <andersca@apple.com>
1241 <rdar://problem/5371515>
1242 BitmapImage::getTIFFRepresentation() bug results in favicons not working at many sites
1244 Don't bail out if a single frame is invalid.
1246 * platform/graphics/mac/ImageMac.mm:
1247 (WebCore::BitmapImage::getTIFFRepresentation):
1249 2007-07-30 Adele Peterson <adele@apple.com>
1253 Fix for <rdar://problem/5274937> Safari 3 breaks Missing Sync's WebKit code by crashing
1255 * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy): Nil check for the FrameLoader.
1257 2007-07-30 Anders Carlsson <andersca@apple.com>
1261 <rdar://problem/5370710>
1262 REGRESSION: After switching from Bookmark view, the Find Banner won't appear while displaying a PDF file
1264 Add a hasHTMLView to FrameLoaderClient. This is only useful for clients who can show different views for different
1265 MIME types and URL schemes.
1267 * loader/FrameLoader.cpp:
1268 (WebCore::FrameLoader::transitionToCommitted):
1269 Call delegate methods here if the current view is not a HTML view.
1271 * loader/FrameLoaderClient.h:
1272 (WebCore::FrameLoaderClient::hasHTMLView):
1274 2007-07-30 Sam Weinig <sam@webkit.org>
1278 Fix for <rdar://problem/5363896>
1279 REGRESSION: Setting document.domain does not override port-based cross-frame security checks -- breaks SAP NetWeaver
1281 Updates the results for:
1282 http/tests/security/cross-frame-access-port-explicit-domain.html
1283 http/tests/security/cross-frame-access-protocol-explicit-domain.html
1285 * bindings/js/kjs_window.cpp:
1286 (KJS::createWindow): Use the new setDomainInternal method.
1287 (KJS::Window::isSafeScript): Don't set check the port or protocol
1288 if both documents have explicitly set document.domain in the DOM
1289 and the those domains are equal.
1291 (WebCore::Document::Document):
1292 (WebCore::Document::setDomain): Remove force parameter and change
1293 all calls that relied on it use the new setDomainInternal method
1294 which does the same thing.
1295 (WebCore::Document::setDomainInternal):
1296 * dom/Document.h: Add new m_domainWasSetInDOM variable and accessor.
1297 (WebCore::Document::domainWasSetInDOM):
1298 * loader/FrameLoader.cpp:
1299 (WebCore::FrameLoader::checkCallImplicitClose): Use the new setDomainInternal method.
1301 2007-07-30 Justin Garcia <justin.garcia@apple.com>
1303 Reviewed by Tristan.
1305 <rdar://problem/5098931> Attachments are lost when they are moved into a ToDo after a delete
1307 Added an editor client method for asking whether or not it is
1308 OK to merge content after a delete.
1310 * bridge/EditorClient.h:
1311 * editing/DeleteSelectionCommand.cpp:
1312 (WebCore::DeleteSelectionCommand::mergeParagraphs): Ask if the
1314 * platform/gdk/EditorClientGdk.cpp:
1315 (WebCore::EditorClientGdk::shouldMoveRangeAfterDelete): Added a method stub.
1316 * platform/gdk/EditorClientGdk.h:
1317 * platform/graphics/svg/SVGImageEmptyClients.h:
1318 (WebCore::SVGEmptyEditorClient::shouldMoveRangeAfterDelete): Ditto.
1320 2007-07-30 Alexey Proskuryakov <ap@webkit.org>
1324 <rdar://problem/5352526>
1325 http://bugs.webkit.org/show_bug.cgi?id=14704
1326 REGRESSION: sync XMLHttpRequest.send() raises an exception for failed authentication
1328 Test: http/tests/xmlhttprequest/failed-auth.html
1330 * platform/network/mac/ResourceHandleMac.mm:
1331 (WebCore::ResourceHandle::loadResourceSynchronously): Make the fake response better match the real one
1332 in case of failed authentication. Unfortunately, NSURLConnection doesn't give us the real response.
1334 * xml/XMLHttpRequest.cpp:
1335 (WebCore::XMLHttpRequest::send): If the response has an HTTP code in it, then the error wasn't
1336 a network one, and an exception shouldn't be raised.
1338 2007-07-30 Anders Carlsson <andersca@apple.com>
1342 <rdar://problem/4942372> REGRESSION: Anchor links in Mail don't work anymore
1344 Make it possible for KURL to handle addig fragments to non-hierarchical URLs
1345 such as mailto: and cid:.
1347 * platform/KURL.cpp:
1348 (WebCore::KURL::init):
1349 If the base URL is not hierarchical but the relative URL is a fragment, then
1352 (WebCore::KURL::parse):
1353 If the URL is not hierarchical, set the fragment start and end positions correctly.
1355 2007-07-30 Simon Hausmann <hausmann@kde.org>
1359 On Windows make sure the dll also ends up in $$OUTPUT_DIR/bin, so that QtLauncher can find it.
1363 2007-07-30 Simon Hausmann <hausmann@kde.org>
1367 Removed the __BUILDING_QT ifdef in JSStringRef.h and changed UChar for the Qt build to use wchar_t on Windows.
1369 * platform/TextEncoding.cpp:
1370 (WebCore::TextEncoding::encode):
1372 2007-07-30 Simon Hausmann <hausmann@kde.org>
1376 Don't link against libxml/libxslt unless we really need it.
1380 2007-07-29 Tristan O'Tierney <tristan@apple.com>
1382 Reviewed by Oliver Hunt.
1384 <rdar://problem/5369282> REGRESSION: DOMHTMLInput throwing exception due to missing _isEdited method
1386 * bindings/objc/DOMHTML.mm:
1387 (-[DOMHTMLInputElement _isEdited]):
1388 (-[DOMHTMLTextAreaElement _isEdited]):
1389 * bindings/objc/DOMPrivate.h:
1390 Renamed _isUserEdited to _isEdited.
1392 2007-07-29 Adam Treat <treat@kde.org>
1394 Reviewed by George Staikos.
1396 Correctly set the update rect for the scrollbars when they are invalidated.
1397 Do not paint entire page for each scroll delta. Cache the dirty regions
1398 when webkit calls ScrollView::updateContents as webkit expects the paint
1399 routine to use the dirty regions bounding rect.
1401 These changes greatly reduce the cpu load as we are no longer painting the
1402 entire page for each 1px scroll :P
1404 * platform/qt/ScrollViewQt.cpp:
1405 (WebCore::ScrollView::ScrollViewPrivate::scrollBackingStore):
1406 (WebCore::ScrollView::updateContents):
1407 (WebCore::ScrollView::paint):
1408 * platform/qt/WidgetQt.cpp:
1409 (WebCore::Widget::invalidateRect):
1411 2007-07-29 Adele Peterson <adele@apple.com>
1415 WebCore part of fix for <rdar://problem/5102522> REGRESSION: Can't tab to webview that doesn't have editable content (affects Safari, preview pane in Mail)
1418 * page/FocusController.cpp:
1419 (WebCore::FocusController::setInitialFocus): Added.
1420 (WebCore::FocusController::advanceFocus): Don't give the focus back to the chrome if this is the initial focus.
1421 * page/FocusController.h:
1423 2007-07-29 Adam Treat <treat@kde.org>
1425 Reviewed by Alexey Proskuryakov.
1427 WebCore::Widget::setParent should be virtual.
1428 It is reimplemented in ScrollViewQt for instance.
1430 * platform/Widget.h:
1432 2007-07-29 Alp Toker <alp.toker@collabora.co.uk>
1436 http://bugs.webkit.org/show_bug.cgi?id=14711 (revisited)
1437 RenderThemeGdk's buttons are state-agnostic (pressed, hovered)
1439 Generalize shadow state into a function.
1440 use a GtkHBox to work around a theme bug (thanks to Nigel Tao).
1442 * platform/gdk/RenderThemeGdk.cpp:
1443 (WebCore::RenderThemeGdk::determineShadow):
1444 (WebCore::RenderThemeGdk::paintCheckbox):
1445 (WebCore::RenderThemeGdk::paintRadio):
1446 (WebCore::RenderThemeGdk::paintButton):
1447 (WebCore::RenderThemeGdk::gtkWindowContainer):
1448 * platform/gdk/RenderThemeGdk.h:
1450 2007-07-27 Adele Peterson <adele@apple.com>
1454 Temporary fix for Windows to prevent crashing on all frame pages. Darin
1455 is working on a more permanent fix.
1457 * loader/FrameLoader.cpp:
1459 2007-07-27 Adam Treat <treat@kde.org>
1461 Reviewed by David Hyatt.
1463 Fix crash when using QtWebKit canvas support.
1466 * html/HTMLCanvasElement.cpp:
1467 (WebCore::HTMLCanvasElement::reset):
1469 2007-07-27 Darin Adler <darin@apple.com>
1471 * rendering/RenderLayer.cpp: Rolled out accidentally-checked-in code.
1473 2007-07-27 Darin Adler <darin@apple.com>
1475 Reviewed by John Sullivan.
1477 - fix <rdar://problem/5261393> In Mail the plain text alternatives to messages with attachments show weird little OBJ thingies
1479 The "weird little thingies" are U+FFFC characters. It's good to render them as zero-width, the way we do
1480 with control characters -- helps Mail and doesn't hurt web browsing.
1482 Test: fast/text/zero-width-characters.html
1484 * platform/CharacterNames.h: Add names for leftToRightMark, rightToLeftMark, and objectReplacementCharacter.
1485 * platform/GlyphPageTreeNode.cpp: (WebCore::GlyphPageTreeNode::initializePage): Give objectReplacementCharacter
1486 zero width in the same way we do it for the various other characters.
1488 2007-07-27 Lars Knoll <lars@trolltech.com>
1492 Enable XSLT support for the gtk port.
1496 2007-07-27 Zack Rusin <zack@kde.org>
1498 Reviewed by Zack and Lars.
1500 Premature end after finishing parsing is a fatal error.
1502 * dom/XMLTokenizer.cpp:
1503 (WebCore::XMLTokenizer::end):
1505 2007-07-27 Lars Knoll <lars@trolltech.com>
1507 Reviewed by Zack and Lars.
1509 Simplify conversions that go from a QStringRef to a WebCore::String to not use a temporary QString.
1511 * dom/XMLTokenizer.cpp:
1514 2007-07-27 Zack Rusin <zack@kde.org>
1516 Reviewed by Zack and Lars.
1518 Fix entity handling in the main document content (attributes still broken)
1520 * dom/XMLTokenizer.cpp:
1523 2007-07-27 Lars Knoll <lars@trolltech.com>
1525 Reviewed by Zack and Lars.
1527 Correctly convert a null QString into a null WebCore::String. Add a String(const QStringRef&) constructor so that we can avoid converting QStringRef via QString to WebCore::String.
1529 * dom/XMLTokenizer.cpp:
1531 * platform/PlatformString.h:
1532 * platform/qt/StringQt.cpp:
1533 (WebCore::String::String):
1535 2007-07-27 Zack Rusin <zack@kde.org>
1537 Reviewed by Zack and Lars.
1539 Parse version and encoding of the xml document.
1541 * dom/XMLTokenizer.cpp:
1542 (WebCore::XMLTokenizer::write):
1544 2007-07-27 Zack Rusin <zack@kde.org>
1546 Reviewed by Zack and Lars.
1548 Correctly or semi-correctly parse the public and system id.
1552 * dom/XMLTokenizer.cpp:
1555 2007-07-27 Zack Rusin <zack@kde.org>
1557 Reviewed by Zack and Lars.
1559 Fix uri parsing for attributes.
1561 * dom/XMLTokenizer.cpp:
1564 2007-07-27 Zack Rusin <zack@kde.org>
1566 Reviewed by Zack and Lars.
1568 Fixing qualified name parsing - from Lars.
1570 * dom/XMLTokenizer.cpp:
1571 (WebCore::XMLTokenizer::insertErrorMessageBlock):
1574 2007-07-27 Zack Rusin <zack@kde.org>
1576 Reviewed by Zack and Lars.
1580 * dom/XMLTokenizer.cpp:
1581 (WebCore::XMLTokenizer::resumeParsing):
1583 * dom/XMLTokenizer.h:
1585 2007-07-27 Zack Rusin <zack@kde.org>
1587 Reviewed by Zack and Lars.
1589 Implement error handling.
1593 * dom/XMLTokenizer.cpp:
1594 (WebCore::XMLTokenizer::handleError):
1595 (WebCore::XMLTokenizer::end):
1597 * dom/XMLTokenizer.h:
1599 2007-07-27 Zack Rusin <zack@kde.org>
1601 Reviewed by Zack and Lars.
1603 Making the stylesheets work (plus everything else basically)
1605 * dom/XMLTokenizer.cpp:
1606 (WebCore::XMLTokenizer::write):
1607 (WebCore::XMLTokenizer::insertErrorMessageBlock):
1609 * dom/XMLTokenizer.h:
1611 2007-07-27 Zack Rusin <zack@kde.org>
1613 Reviewed by Zack and Lars.
1615 Remove the libxml dependency when not compiling with XSLT.
1617 Just ifdefing, displaying xml doesn't work.
1620 * dom/XMLTokenizer.cpp:
1621 (WebCore::XMLTokenizer::XMLTokenizer):
1622 (WebCore::XMLTokenizer::write):
1623 (WebCore::XMLTokenizer::startElementNs):
1624 (WebCore::XMLTokenizer::enterText):
1625 (WebCore::XMLTokenizer::exitText):
1626 (WebCore::XMLTokenizer::initializeParserContext):
1627 (WebCore::XMLTokenizer::end):
1628 (WebCore::XMLTokenizer::lineNumber):
1629 (WebCore::XMLTokenizer::columnNumber):
1630 (WebCore::XMLTokenizer::stopParsing):
1631 (WebCore::XMLTokenizer::resumeParsing):
1633 * dom/XMLTokenizer.h:
1635 2007-07-27 Simon Hausmann <hausmann@kde.org>
1639 Work around bug in the moc when used as preprocessor for generating the bindings. -DFOO=1 is needed instead of -DFOO
1640 to make the <hash>if FOO conditional match.
1644 2007-07-27 Patrick Hanna <phanna@email.unc.edu>
1646 Reviewed by Darin Adler.
1648 Change PluginBase::refresh to be static and update PluginsFunc::callAsFunction accordingly. Now we no longer
1649 allocate an instance of a JSObject subclass on the stack which could lead to a crash during garbage collection.
1651 * bindings/js/kjs_navigator.cpp:
1652 (KJS::PluginsFunc::callAsFunction):
1654 2007-07-27 Simon Hausmann <hausmann@kde.org>
1656 Done with and reviewed by Lars and Zack.
1658 Fix snprintf hack for the Qt/Windows build with mingw-gcc. MingW has snprintf, so we don't need this helper function.
1660 * page/FrameTree.cpp:
1661 * platform/DeprecatedString.cpp:
1662 (WebCore::DeprecatedString::format):
1663 * platform/String.cpp:
1664 (WebCore::String::format):
1666 2007-07-27 Simon Hausmann <hausmann@kde.org>
1668 Done with and reviewed by Lars and Zack.
1670 Make the DocTypeStrings.cpp generation work with MingW. Cleaned it up to be a regular extra compiler at the same time.
1674 2007-07-27 Simon Hausmann <hausmann@kde.org>
1676 Done with and reviewed by Lars and Zack.
1678 MingW build fixes: Do the "OBJECTS_TRAILING_SLASH" trick not only for win32-msvc but for all win32 mkspecs. Added LIB/INCLUDE hack from Qt to make us pick up 3rdparty libraries such as libxml from these environment variables.
1682 2007-07-27 Simon Hausmann <hausmann@kde.org>
1684 Done with and reviewed by Lars and Zack.
1686 Use $(MOVE) instead of mv to eliminated the shell dependency and replaced the long shell line to call bison and modify the css grammar file with a few lines of portable perl code.
1689 * css/makegrammar.pl: Added.
1691 2007-07-27 Simon Hausmann <hausmann@kde.org>
1693 Done with and reviewed by Lars and Zack.
1695 On make install on Windows copy the dll into the bin dir.
1699 2007-07-27 Simon Hausmann <hausmann@kde.org>
1701 Done with and reviewed by Lars and Zack.
1703 Link in libxml and libxslt on Windows.
1707 2007-07-27 Simon Hausmann <hausmann@kde.org>
1709 Done with and reviewed by Lars and Zack.
1711 Temporarily disable the ICO support for the Qt build on Windows.
1714 * platform/graphics/qt/ImageDecoderQt.cpp:
1716 2007-07-27 Simon Hausmann <hausmann@kde.org>
1718 Done with and reviewed by Lars and Zack.
1720 Fix evaluation with ActiveState Perl 5.6. Somehow it tried to treat nameEntries as array.
1722 * bindings/scripts/CodeGeneratorJS.pm:
1724 2007-07-27 Simon Hausmann <hausmann@kde.org>
1726 Done with and reviewed by Lars and Zack.
1728 Fix compilation with MSVC in the Qt build (missing header files).
1730 * loader/icon/IconDatabaseNone.cpp:
1731 * platform/graphics/svg/SVGImage.cpp:
1733 2007-07-27 Simon Hausmann <hausmann@kde.org>
1735 Done with and reviewed by Lars and Zack.
1737 Disable the favicon database on Windows for now, to eliminate the sqlite dependency.
1741 2007-07-27 Simon Hausmann <hausmann@kde.org>
1743 Done with and reviewed by Lars and Zack.
1745 Added custom preprocessor support to make_names.pl and use the moc for it in the Qt build.
1748 * ksvg2/scripts/make_names.pl:
1750 2007-07-27 Simon Hausmann <hausmann@kde.org>
1752 Done with and reviewed by Lars and Zack.
1754 Disable the batch mode for nmake to work around the clash of Node.c and Node.cpp both mapping to Node.obj
1758 2007-07-27 Simon Hausmann <hausmann@kde.org>
1760 Done with and reviewed by Lars and Zack.
1762 Fix compilation under Windows (removed sys/time.h dependency, use Qt instead).
1764 * platform/qt/SystemTimeQt.cpp:
1766 2007-07-27 Simon Hausmann <hausmann@kde.org>
1768 Done with and reviewed by Lars and Zack.
1770 Fix compilation on Windows.
1772 * platform/graphics/qt/PathQt.cpp:
1774 2007-07-27 Simon Hausmann <hausmann@kde.org>
1776 Done with and reviewed by Lars and Zack.
1778 Fix generation of ColorData.c on Windows.
1782 2007-07-27 Simon Hausmann <hausmann@kde.org>
1784 Done with and reviewed by Lars and Zack.
1786 Fix compilation under Qt/Windows.
1788 * loader/icon/IconDatabase.cpp:
1789 (WebCore::IconDatabase::open):
1791 2007-07-27 Simon Hausmann <hausmann@kde.org>
1793 Done with and reviewed by Lars and Zack.
1795 Changed extendedAttributes to be a variable instead of a hash directly. Required to work with ActiveState perl.
1797 * bindings/scripts/IDLStructure.pm:
1799 2007-07-27 Simon Hausmann <hausmann@kde.org>
1801 Done with and reviewed by Lars and Zack.
1803 Fix header guard generation for CSSGrammar.h under Windows
1807 2007-07-27 Simon Hausmann <hausmann@kde.org>
1809 Done with and reviewed by Lars and Zack.
1811 Fix build with moc as preprocessor. Don't rely the preprocessor preserving whitespace at the beginning of lines.
1813 * bindings/scripts/IDLParser.pm:
1815 2007-07-27 Simon Hausmann <hausmann@kde.org>
1817 Done with and reviewed by Lars and Zack.
1819 Make make-css-file-arrays.pl work on Windows by not calling /usr/bin/gcc as preprocessor for the Qt build.
1822 * css/make-css-file-arrays.pl:
1824 2007-07-27 Simon Hausmann <hausmann@kde.org>
1826 Done with and reviewed by Lars and Zack.
1828 More gperf commandline fixes for Windows.
1832 2007-07-27 Simon Hausmann <hausmann@kde.org>
1834 Done with and reviewed by Lars and Zack.
1836 More quoting fixes for perl under Windows.
1840 2007-07-27 Simon Hausmann <hausmann@kde.org>
1842 Done with and reviewed by Lars and Zack.
1844 Fix command quoting under Windows
1848 2007-07-27 Simon Hausmann <hausmann@kde.org>
1850 Done with and reviewed by Lars and Zack.
1852 Fix cssmakeprops and cssmakevalue scripts to work on Windows without cygwin perl. Avoid inplace substitutions and direct invocation of /bin/sh. Also call gperf with arguments that GnuWin32's gperf understands.
1854 * ksvg2/scripts/cssmakeprops:
1855 * ksvg2/scripts/cssmakevalues:
1857 2007-07-27 Simon Hausmann <hausmann@kde.org>
1859 Done with and reviewed by Lars and Zack.
1861 Beautiful hacks to make more of the extra compiler magic work under Windows outside of cygwin.
1865 2007-07-27 Simon Hausmann <hausmann@kde.org>
1867 Done with and reviewed by Lars and Zack.
1869 Correctly propagate the custom preprocessor option through the idl parser and the codegenerator.
1871 * bindings/scripts/CodeGenerator.pm:
1872 * bindings/scripts/generate-bindings.pl:
1874 2007-07-27 Simon Hausmann <hausmann@kde.org>
1876 Done with and reviewed by Lars and Zack.
1878 When constructing the absolute path when searching for IDL files in the list of search paths don't prepend a slash if $SOURCEROOT as environment variable is not set. In the Qt build we pass absolute search paths already and we don't set SOURCEROOT. Under Unix that gives a double slash for the directory which works fine, under Windows we get /c:\webkit\foo which of course does not work.
1880 * bindings/scripts/CodeGenerator.pm:
1882 2007-07-27 Simon Hausmann <hausmann@kde.org>
1884 Done with and reviewed by Lars and Zack.
1886 Relax the regular expression that tries to find constant declarations in the IDL source to not require leading whitespace. This makes it work with preprocessors that happen to eliminate leading whitespace.
1888 * bindings/scripts/IDLParser.pm:
1890 2007-07-27 Simon Hausmann <hausmann@kde.org>
1892 Done with and reviewed by Lars and Zack.
1894 Try to use the moc as preprocessor for the IDL bindings generator
1898 2007-07-27 Simon Hausmann <hausmann@kde.org>
1900 Done with and reviewed by Lars and Zack.
1902 Make it possible to specify the preprocessor the bindings generator uses instead of hardcoding /usr/bin/gcc (which is of course no option on Windows). Also try to use a more portable and Windows friendly way of opening the reading pipe to the preprocessor.
1904 * bindings/scripts/IDLParser.pm:
1905 * bindings/scripts/generate-bindings.pl:
1907 2007-07-27 Simon Hausmann <hausmann@kde.org>
1909 Done with and reviewed by Lars and Zack.
1911 Don't use stdout redirection for make_names.pl as it doesn't work under Windows perl (outside cygwin).
1913 * ksvg2/scripts/make_names.pl:
1915 2007-07-27 Simon Hausmann <hausmann@kde.org>
1917 Done with and reviewed by Lars and Zack.
1919 Fix DocTypeStrings.cpp generation to work on Windows with cmd.exe
1923 2007-07-27 Simon Hausmann <hausmann@kde.org>
1927 Work around aliasing bugs in WebCore by compiling with -fno-strict-aliasing for gcc builds for now.
1931 2007-07-27 Simon Hausmann <hausmann@kde.org>
1935 Use -Wreturn-type only when compiling with g++
1939 2007-07-27 Simon Hausmann <hausmann@kde.org>
1943 Don't use pkg-config on Windows for the Qt build
1947 2007-07-27 Simon Hausmann <hausmann@kde.org>
1951 Fix compilation with MSVC.
1953 * platform/graphics/qt/ImageDecoderQt.cpp:
1955 2007-07-26 Tristan O'Tierney <tristan@apple.com>
1957 Reviewed by Anders Carlsson.
1959 <rdar://problem/5350019> REGRESSION: Pages on milliyet.com are added to Back list when visited, causing Back button to just reload
1961 * loader/FrameLoader.cpp:
1962 (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
1963 If the policy action is FrameLoadTypeRedirectLockHistory, don't add the frame load url to the history.
1965 2007-07-26 Anders Carlsson <andersca@apple.com>
1969 Add a FIXME about caching pages with plug-ins that have outstanding NPObjects.
1971 * loader/FrameLoader.cpp:
1972 (WebCore::FrameLoader::canCachePage):
1974 2007-07-26 David Hyatt <hyatt@apple.com>
1976 FIx for <rdar://problem/5289721> CrashTracer: [REGRESSION] 2658 crashes in Safari at com.apple.WebCore: WebCore::RenderInline::height const + 16
1978 Adding a null check for now and an assert. We don't know how/why this
1979 bug happens, but hopefully the assert will help people to reproduce.
1983 * rendering/RenderInline.cpp:
1984 (WebCore::RenderInline::height):
1986 2007-07-26 Anders Carlsson <andersca@apple.com>
1990 <rdar://problem/5362783>
1991 In Mail, a crash occurs at WTF::fastMalloc() when attempting to create a new HTML message from http://nytimes.com/
1993 If the cache is disabled and there is already a resource with the given URL, return it instead of creating a new one.
1995 * loader/DocLoader.cpp:
1996 (WebCore::DocLoader::requestResource):
1998 2007-07-26 Adele Peterson <adele@apple.com>
2004 * platform/network/cf/ResourceRequest.h:
2006 2007-07-26 Anders Carlsson <andersca@apple.com>
2008 Reviewed by John Sullivan.
2010 <rdar://problem/5349389>
2011 Some frame load delegate methods not called when loading a page from the BF cache
2013 These calls were moved to FrameLoader::begin, which is never called for pages loaded
2014 from the BF cache. This happened in revision 24490.
2016 * loader/FrameLoader.cpp:
2017 (WebCore::FrameLoader::transitionToCommitted):
2018 Call delegate methods if the load is from the BF cache.
2020 2007-07-26 Kevin McCullough <kmccullough@apple.com>
2022 Reviewed by Darin, Geoff and Sam.
2024 - <rdar://problem/5150461> Resizing the window larger than the screen causes no resize.
2025 - We now better match the behavior of other browsers.
2027 * bindings/js/kjs_window.cpp:
2028 (KJS::constrainToVisible):
2029 (KJS::WindowFunc::callAsFunction):
2031 2007-07-26 Tristan O'Tierney <tristan@apple.com>
2033 Reviewed by Adele Peterson.
2035 <rdar://problem/5359921> WebCore should maintain a dirty flag for confirmation on unsaved changes
2037 * bindings/objc/DOMHTML.mm:
2038 (-[DOMHTMLInputElement _isUserEdited]):
2039 (-[DOMHTMLTextAreaElement _isUserEdited]):
2040 Renamed _isEdited to _isUserEdited since the functionality is now different
2042 * bindings/objc/DOMPrivate.h:
2043 Renamed _isEdited to _isUserEdited.
2045 * rendering/RenderTextControl.cpp:
2046 (WebCore::RenderTextControl::RenderTextControl):
2047 Defaulted m_userEdited to false
2049 (WebCore::RenderTextControl::updateFromElement):
2050 Set m_userEdited to false, since the change wasn't triggered first by an edit
2052 (WebCore::RenderTextControl::subtreeHasChanged):
2053 Set m_userEdited to true, since it has been touched by the user
2055 * rendering/RenderTextControl.h:
2056 (WebCore::RenderTextControl::isUserEdited):
2057 (WebCore::RenderTextControl::setUserEdited):
2058 Added two new methods to set/return the userEdited boolean value.
2060 2007-07-26 Geoffrey Garen <ggaren@apple.com>
2062 Reviewed by Beth Dakin.
2064 Fixed NULL-dereference crash seen on buildbot.
2066 No bug filed because this is a part of <rdar://problem/5241167>.
2068 * history/PageCache.h:
2069 (WebCore::PageCache::get): NULL-check HistoryItems passed to get()
2070 and remove(), to match the old semantics of HashMap. For clarity,
2071 ASSERT that add() is not called with NULL arguments.
2073 2007-07-26 Anders Carlsson <andersca@apple.com>
2075 Reviewed by Oliver Hunt.
2077 <rdar://problem/5361106> Crash in user style sheet when loading webpage
2082 (WebCore::Document::stylesheetLoaded):
2084 2007-07-26 Geoffrey Garen <ggaren@apple.com>
2086 Used `svn merge -r24646:24645' to revert project changes I accidentally
2089 * WebCore.xcodeproj/project.pbxproj:
2091 2007-07-26 Geoffrey Garen <ggaren@apple.com>
2093 Reviewed by Darin Adler.
2095 Fixed <rdar://problem/5241167> REGRESSION: PLT 1% slower due to r21793
2096 (global page cache cap)
2098 I just measured a .1%-.2% regression in PLT average, but a .4% win in
2099 PLT fastest run, so I think this regression is licked.
2101 Surprisingly, the combination of wtf data structures I originally used
2102 for PageCache turned out to be too slow, so I reworked PageCache to use
2103 a hand-crafted linked list for LRU tracking (instead of ListHashSet),
2104 to store its CachedPages in the HistoryItems to which they corresponded
2105 (instead of using a HashMap), and to ref/deref HistoryItems manually
2106 (instead of using RefPtr, which would ref once for every reference in
2109 * history/HistoryItem.h: Added data members for PageCache data. Made
2110 PageCache a friend so it could access them. Ideally (from an
2111 encapsulation perspective), we would store this data an independent
2112 structure, but that's just too slow.
2114 * history/PageCache.cpp: Added a hand-crafted linked list for LRU
2116 (WebCore::PageCache::PageCache):
2117 (WebCore::PageCache::add): Adopt the HistoryItem's ref when it's added.
2118 (WebCore::PageCache::remove): deref() the Historyitem when it's
2120 (WebCore::PageCache::prune):
2121 (WebCore::PageCache::addToLRUList):
2122 (WebCore::PageCache::removeFromLRUList):
2124 * history/PageCache.h:
2125 (WebCore::PageCache::get): Inlined just in case.
2127 2007-07-26 Adam Treat <treat@kde.org>
2129 Reviewed by George Staikos.
2131 Launch the context menu in the right place.
2133 * platform/qt/ContextMenuQt.cpp:
2134 (WebCore::ContextMenu::setPlatformDescription):
2136 2007-07-25 Maciej Stachowiak <mjs@apple.com>
2140 - follow-up to previous change to avoid assertion failures in debug
2142 * xml/XMLHttpRequest.cpp:
2143 (WebCore::XMLHttpRequest::getResponseText): hold JSLock when needed
2144 (WebCore::XMLHttpRequest::open): ditto
2145 (WebCore::XMLHttpRequest::didFinishLoading): ditto
2146 (WebCore::XMLHttpRequest::didReceiveData): ditto
2147 * xml/XMLHttpRequest.h:
2149 2007-07-25 Anders Carlsson <andersca@apple.com>
2153 <rdar://problem/5327912>
2154 iDisk: Web iDisk & main iDisk appear blank
2156 Prepend any remaining text that scripts might have written.
2158 * html/HTMLTokenizer.cpp:
2159 (WebCore::HTMLTokenizer::scriptExecution):
2161 2007-07-25 Kevin McCullough <kmccullough@apple.com>
2163 Reviewed by Tim, Darin, Oliver.
2165 - <rdar://problem/5329440> REGRESSION: Clicking links with the feed:// protocol in Safari 3 does nothing
2166 - Check for file:// urls when clicking links, not block all schemes that are treated as local.
2168 * loader/FrameLoader.cpp:
2169 (WebCore::FrameLoader::load):
2171 2007-07-25 Maciej Stachowiak <mjs@apple.com>
2175 - fixed <rdar://problem/5300291> Optimize GC to reclaim big, temporary objects (like XMLHttpRequest.responseXML) quickly
2177 With this plus related JavaScriptCore changes, a number of XMLHttpRequest situations that
2178 result in huge data sets are addressed, including a single huge responseXML on an XMR done
2179 repeatedly, or accessing responseText repeatedly during loading of a single large XHR.
2181 In addition to the GC changes in JavaScriptCore, I changed responseText to be stored as a
2182 KJS::UString instead of a WebCore::String so that the JavaScript responseText value can
2183 share the buffer (indeed multiple intermediate responseTexts can share its buffer).
2186 First of all, here's some manual test cases that will each blow out the process VM without this fix,
2187 but will settle into decent steady state with.
2189 * manual-tests/memory: Added.
2190 * manual-tests/memory/MessageUidsAlreadyDownloaded2: Added.
2191 * manual-tests/memory/string-growth.html: Added.
2192 * manual-tests/memory/xhr-multiple-requests-responseText.html: Added.
2193 * manual-tests/memory/xhr-multiple-requests-responseXML.html: Added.
2194 * manual-tests/memory/xhr-multiple-requests.html: Added.
2195 * manual-tests/memory/xhr-repeated-string-access.xml: Added.
2197 And here's the actual code changes:
2199 * WebCore.xcodeproj/project.pbxproj:
2200 * bindings/js/JSDocumentCustom.cpp:
2201 (WebCore::toJS): Record extra cost if the document is frameless (counting the nodes
2202 doesn't make a measurable performance difference here in any case I could find)
2203 * bindings/js/JSXMLHttpRequest.cpp:
2204 (KJS::JSXMLHttpRequest::getValueProperty): Adjust for the fact that ressponseText
2205 is now stored as a UString.
2206 * bindings/js/kjs_binding.cpp:
2207 (KJS::jsOwnedStringOrNull): New helper.
2208 * bindings/js/kjs_binding.h:
2209 * xml/XMLHttpRequest.cpp:
2210 (WebCore::XMLHttpRequest::getResponseText): It's a UString!
2211 (WebCore::XMLHttpRequest::getResponseXML): handle the fact that m_responseText
2213 (WebCore::XMLHttpRequest::XMLHttpRequest): ditto.
2214 (WebCore::XMLHttpRequest::abort): call dropProtection
2215 (WebCore::XMLHttpRequest::didFinishLoading): call dropProtection
2216 (WebCore::XMLHttpRequest::dropProtection): after removing our GC protection,
2217 report extra cost of this XHR's responseText buffer.
2218 * xml/XMLHttpRequest.h:
2220 2007-07-25 Timothy Hatcher <timothy@apple.com>
2224 <rdar://problem/4796657> table deletion outline does not always follow the table size as editing occurs inside
2226 Change the outline element to position itself automaticlly using the top, left, bottom and right CSS properties.
2227 This made the container element redundant, so it has been removed. Now the outline element and the delete button
2228 both get appended to the target element and positioned based on that container element. This removes the need
2229 to update the width and height when the target contents changed.
2231 * editing/DeleteButtonController.cpp:
2232 (WebCore::DeleteButtonController::show): Change the style properties and remove the container element.
2233 (WebCore::DeleteButtonController::hide): Remove the button and outline from the target element.
2234 * editing/DeleteButtonController.h: Removed updateOutlineStyle, respondToChangedContents and m_containerElement.
2235 * editing/Editor.cpp:
2236 (WebCore::Editor::respondToChangedContents): Remove the call to DeleteButtonController respondToChangedContents.
2238 2007-07-25 Anders Carlsson <andersca@apple.com>
2242 <rdar://problem/5344471>
2243 CrashTracer: [USER] 1 crash in Mail at WebCore::PluginTokenizer::writeRawData(char const*, int)
2245 Make sure to layout so we'll have a renderer. Also null-check the renderer for extra safety.
2247 * loader/PluginDocument.cpp:
2248 (WebCore::PluginTokenizer::writeRawData):
2250 2007-07-25 Marvin Decker <marv.decker@gmail.com>
2252 Reviewed by Maciej, Darin.
2254 - http://bugs.webkit.org/show_bug.cgi?id=14030
2256 Add ResourceHandle::setClient to resolve some messiness with handle
2257 releasing. Clear the client when ResourceLoader is going to release
2258 the handle to prevent crashes in the case where somebody still holds a
2259 reference (this doesn't seem to currently happen in practice). Add
2260 NULL-checking for ResourceHandle implementations using the client.
2262 * loader/ResourceLoader.cpp:
2263 (WebCore::ResourceLoader::releaseResources):
2264 * platform/network/ResourceHandle.cpp:
2265 (WebCore::ResourceHandle::fireBlockedFailure):
2266 (WebCore::ResourceHandle::setClient):
2267 * platform/network/ResourceHandle.h:
2268 * platform/network/cf/ResourceHandleCFNet.cpp:
2269 (WebCore::willSendRequest):
2270 (WebCore::didReceiveResponse):
2271 (WebCore::didReceiveData):
2272 (WebCore::didFinishLoading):
2274 (WebCore::willCacheResponse):
2275 (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2276 (WebCore::ResourceHandle::receivedCancellation):
2277 * platform/network/mac/ResourceHandleMac.mm:
2278 (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2279 (WebCore::ResourceHandle::didCancelAuthenticationChallenge):
2280 (WebCore::ResourceHandle::receivedCancellation):
2281 (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
2282 (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
2283 (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]):
2284 (-[WebCoreResourceHandleAsDelegate connection:willStopBufferingData:]):
2285 (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]):
2286 (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]):
2287 (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
2289 2007-07-25 Maxime Britto <mbritto@pleyo.com>
2293 - fix http://bugs.webkit.org/show_bug.cgi?id=11756
2294 <rdar://problem/5286420>
2296 Fix a typo error to really compare the present domain to the domain of the parent of the targeted frame.
2298 * loader/FrameLoader.cpp: (WebCore::FrameLoader::canTarget):
2300 2007-07-25 Mitz Pettel <mitz@webkit.org>
2304 - fix http://bugs.webkit.org/show_bug.cgi?id=14758
2305 REGRESSION: Repeated text after line break on facebook.com
2307 Test: fast/text/reset-emptyRun.html
2309 * platform/BidiResolver.h:
2310 (WebCore::::deleteRuns): Re-add a line that was removed for no reason at all
2311 during refactoring in r24485.
2312 * rendering/bidi.cpp:
2313 (WebCore::BidiState::deleteRuns): Ditto.
2315 2007-07-24 Oliver Hunt <oliver@apple.com>
2317 Reviewed by Adam and Justin.
2319 <rdar://problem/5141779> WebView editableDOMRangeForPoint: & moveDragCaretToPoint: returns last position in DOMText range
2321 Remove bridge implementation for editableDOMRangeForPoint: and moveDragCaretToPoint:.
2322 Now use cross-platform code Editor::rangeForPoint and DragController::placeDragCaret instead.
2323 This required lifting local code from DragController.cpp into the shared methods
2324 Frame::visiblePositionForPoint and Frame::documentAtPoint.
2327 * editing/Editor.cpp:
2328 (WebCore::Editor::rangeForPoint):
2330 * page/DragController.cpp:
2331 (WebCore::DragController::dragEnded):
2332 (WebCore::DragController::performDrag):
2333 (WebCore::DragController::dragEnteredOrUpdated):
2334 (WebCore::DragController::tryDocumentDrag):
2335 (WebCore::DragController::operationForLoad):
2336 (WebCore::setSelectionToDragCaret):
2337 (WebCore::DragController::concludeDrag):
2338 (WebCore::DragController::placeDragCaret):
2339 * page/DragController.h:
2341 (WebCore::Frame::visiblePositionForPoint):
2342 (WebCore::Frame::documentAtPoint):
2344 * page/mac/WebCoreFrameBridge.h:
2345 * page/mac/WebCoreFrameBridge.mm:
2347 2007-07-24 Sam Weinig <sam@webkit.org>
2349 Rubber-stamped by Adam Roben.
2351 Remove unused .strip files.
2353 * WebCore.xcodeproj/project.pbxproj:
2355 2007-07-24 Adele Peterson <adele@apple.com>
2359 Fix for <rdar://problem/5308492> Computed width for elements with box-sizing: border-box is not equal to the width set in the CSS
2361 Test: fast/css/getComputedStyle-border-box.html
2363 * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2364 For the width and height properties, when you get the value from the renderer, use the renderer's box sizing value to determine the size.
2366 2007-07-24 Anders Carlsson <andersca@apple.com>
2368 Reviewed by Kevin Decker.
2370 <rdar://problem/5355781>
2371 REGRESSION: reproducible crash in CoreFoundation!CFRunLoopFinished on Flash pages
2373 Null check the loader.
2375 * plugins/win/PluginStreamWin.cpp:
2376 (WebCore::PluginStreamWin::start):
2378 2007-07-24 Adele Peterson <adele@apple.com>
2380 Reviewed by Hyatt and Adam.
2382 Fix for <rdar://problem/5130590> REGRESSION: style="width:1px" on <select> element no longer hides the element
2384 Removed hack that forced large padding on popup buttons. Now we put that padding in the inner block, so that
2385 the specified width will be honored.
2387 * rendering/RenderMenuList.cpp:
2388 (WebCore::RenderMenuList::adjustInnerStyle): Set the padding on the inner block based on the metrics provided by the theme.
2389 (WebCore::RenderMenuList::controlClipRect): Clip to the intersection of the inner content box and the outer content box.
2390 This will leave room for the arrows which sit in the inner box padding, and if the inner box ever spills out of the outer box,
2391 that will get clipped too.
2392 (WebCore::RenderMenuList::calcPrefWidths): Add in the inner box's padding and border to the pref widths.
2394 * rendering/RenderThemeMac.mm:
2395 (WebCore::RenderThemeMac::paintMenuList): Only inflate the rect for the shadow if the rect is big enough to fit the whole control.
2396 Also, on Leopard, the NSCell will draw outside of a small rect, so add a clip for that case.
2397 (WebCore::RenderThemeMac::paintMenuListButton): Restrict font scale to make sure the arrows will actually fit in the bounds vertically.
2398 Don't draw the arrows if they won't fit horizontally. Reset padding. Since WinIE doesn't honor padding for popups, its not critical to
2399 support padding at this time.
2400 (WebCore::RenderThemeMac::adjustMenuListStyle): Don't set the padding here. Instead, we're going to set the padding on the inner block of the select.
2401 (WebCore::RenderThemeMac::adjustMenuListButtonStyle): ditto.
2402 (WebCore::RenderThemeMac::popupInternalPaddingLeft): Added. Provides internal padding values for RenderMenuList.
2403 (WebCore::RenderThemeMac::popupInternalPaddingRight): ditto.
2404 (WebCore::RenderThemeMac::popupInternalPaddingTop): ditto.
2405 (WebCore::RenderThemeMac::popupInternalPaddingBottom): ditto.
2406 * rendering/RenderThemeMac.h:
2408 * rendering/RenderThemeSafari.cpp: The same changes that were made to RenderThemeMac were made here, with variations for the arrow differences.
2409 This code should be refactored and shared, but now did not seem like the right time to do that refactoring.
2410 (WebCore::RenderThemeSafari::paintMenuList):
2411 (WebCore::RenderThemeSafari::paintMenuListButton):
2412 (WebCore::RenderThemeSafari::adjustMenuListStyle):
2413 (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
2414 (WebCore::RenderThemeSafari::popupInternalPaddingRight):
2415 (WebCore::RenderThemeSafari::popupInternalPaddingTop):
2416 (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
2417 (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
2418 * rendering/RenderThemeSafari.h:
2420 * rendering/RenderTheme.h: Added to provide internal padding values for RenderMenuList.
2421 (WebCore::RenderTheme::popupInternalPaddingLeft):
2422 (WebCore::RenderTheme::popupInternalPaddingRight):
2423 (WebCore::RenderTheme::popupInternalPaddingTop):
2424 (WebCore::RenderTheme::popupInternalPaddingBottom):
2426 2007-07-24 Lars Knoll <lars@trolltech.com>
2428 Reviewed by Adam Roben & David Kilzer.
2430 replace the makeprop and makevalues shell scripts by equivalent perl versions. This is required to remove the last shell dependency when building QtWebKit on Windows.
2432 * DerivedSources.make:
2434 * WebCore.xcodeproj/project.pbxproj:
2435 * css/makeprop: Added.
2436 * css/makeprop.pl: Removed.
2437 * css/makevalues: Added.
2438 * css/makevalues.pl: Removed.
2440 2007-07-24 Beth Dakin <bdakin@apple.com>
2444 Fix for http://bugs.webkit.org/show_bug.cgi?id=14714 REGRESSION:
2445 ASSERTION FAILED: i < size() in Vector.h:401 on negative -webkit-
2448 http://bugs.webkit.org/show_bug.cgi?id=14718 REGRESSION: ASSERTION
2449 FAILED: i < size() in Vector.h:401 on zero -webkit-column-count
2451 * rendering/RenderBlock.cpp:
2452 (WebCore::RenderBlock::calcColumnWidth): Make 1 the minimum value
2453 for column-width and column-count. Since the spec does not address
2454 what to do with negative values for these properties, we are
2455 patching the rendering code instead of the parser.
2457 2007-07-24 Anders Carlsson <andersca@apple.com>
2461 <rdar://problem/5355403>
2462 REGRESSION: 303A2 does not display pdf files with AdobeReader 8.1
2464 Close the file before handing off the file name to the plug-in.
2466 * plugins/win/PluginStreamWin.cpp:
2467 (WebCore::PluginStreamWin::destroyStream):
2469 2007-07-24 Alp Toker <alp.toker@collabora.co.uk>
2473 http://bugs.webkit.org/show_bug.cgi?id=14711
2474 RenderThemeGdk's buttons are state-agnostic (pressed, hovered)
2476 Remove unnecessary label from widget instances.
2477 Render check and radio widgets correctly.
2478 Determine the widget state and render it appropriately.
2480 * platform/gdk/RenderThemeGdk.cpp:
2481 (WebCore::RenderThemeGdk::determineState):
2482 (WebCore::RenderThemeGdk::paintCheckbox):
2483 (WebCore::RenderThemeGdk::paintRadio):
2484 (WebCore::RenderThemeGdk::paintButton):
2485 (WebCore::RenderThemeGdk::gtkButton):
2486 (WebCore::RenderThemeGdk::gtkCheckbox):
2487 (WebCore::RenderThemeGdk::gtkRadioButton):
2488 * platform/gdk/RenderThemeGdk.h:
2490 2007-07-24 Mark Rowe <mrowe@apple.com>
2494 <rdar://problem/5356666> NSMenuItem's seen leaking on buildbot
2496 * platform/mac/ContextMenuItemMac.mm:
2497 (WebCore::ContextMenuItem::releasePlatformDescription): Transfer ownership from the RetainPtr's CF-based retain
2498 count to the Foundation retain count so that callers of releasePlatformDescription can use -[NSObject release]
2499 to dispose of it in a manner that won't leak under Obj-C GC.
2500 * platform/mac/ContextMenuMac.mm:
2501 (WebCore::ContextMenu::appendItem): Release platformItem as we were transferred its ownership by releasePlatformDescription.
2502 (WebCore::ContextMenu::insertItem): ditto.
2504 2007-07-24 Mitz Pettel <mitz@webkit.org>
2508 - fix http://bugs.webkit.org/show_bug.cgi?id=14684
2509 Hebrew text in Safari chrome is reversed (LTR instead of RTL)
2511 Test: fast/text/drawBidiText.html
2514 * WebCore.vcproj/WebCore.vcproj:
2515 * WebCore.xcodeproj/project.pbxproj:
2516 * WebCoreSources.bkl:
2517 * manual-tests/chrome-bidi-text.html: Added.
2518 * manual-tests/resources/chrome-bidi-text-window.html: Added.
2519 * platform/BidiReorderCharacters.cpp: Removed.
2520 * platform/BidiReorderCharacters.h: Removed.
2521 * platform/BidiResolver.h:
2522 (WebCore::BidiCharacterRun::start): Added accessor method.
2523 (WebCore::BidiCharacterRun::stop): Ditto.
2524 (WebCore::BidiCharacterRun::level): Ditto.
2525 (WebCore::BidiCharacterRun::next): Ditto.
2526 (WebCore::::appendRun): Added default implementation.
2527 * platform/TextStyle.h:
2528 (WebCore::TextStyle::setDirectionalOverride): Added accessor method.
2529 * platform/graphics/GraphicsContext.cpp:
2530 (WebCore::TextRunIterator::TextRunIterator): Added. A BidiResolver-
2531 compliant iterator over the characters in a TextRun.
2532 (WebCore::TextRunIterator::offset):
2533 (WebCore::TextRunIterator::increment):
2534 (WebCore::TextRunIterator::atEnd):
2535 (WebCore::TextRunIterator::current):
2536 (WebCore::TextRunIterator::direction):
2537 (WebCore::TextRunIterator::operator==):
2538 (WebCore::TextRunIterator::operator!=):
2539 (WebCore::GraphicsContext::drawBidiText): Added. Applies the Unicode
2540 Bidi Algorithm to the text and draws the resulting unidirectional runs
2541 in the right order and with the right directionality.
2542 * platform/graphics/GraphicsContext.h:
2543 * platform/win/PopupMenuWin.cpp:
2544 (WebCore::PopupMenu::paint): Replaced the use of a character buffer
2545 and BidiReorderCharacters with calling to drawBidiText(). Removed special
2546 handling of '-webkit-rtl-ordering:visual' because that CSS property is an
2547 implementation detail of WebCore's visual Hebrew support, and the UA stylesheet
2548 sets it to 'logical' for this form control. Authors can specify the ordering
2549 using the 'direction' and 'unicode-bidi' properties.
2550 * platform/win/WebCoreTextRenderer.cpp:
2551 (WebCore::isOneLeftToRightRun): Added. Checks if the text consists of
2552 a single left-to-right run, in which case it requires no bidi processing.
2553 (WebCore::doDrawTextAtPoint): Changed to call drawBidiText if the text
2554 is not entirely left-to-right.
2555 * rendering/RenderFileUploadControl.cpp:
2556 (WebCore::RenderFileUploadControl::paintObject): Replaced the use of a
2557 character buffer in BidiReorderCharacters with calling to drawBidiText().
2558 Removed special handling of '-webkit-rtl-ordering:visual' for the same reason
2560 * rendering/RenderListBox.cpp:
2561 (WebCore::RenderListBox::paintItemForeground): Ditto. Also changed the
2562 run-rounding modes used when drawing to match those used when measuring.
2564 2007-07-23 Oliver Hunt <oliver@apple.com>
2568 Windows build fix, remove superfluous !
2570 * page/EventHandler.cpp:
2571 (WebCore::EventHandler::keyEvent):
2573 2007-07-23 Adam Roben <aroben@apple.com>
2575 Add an assignment operator for BString that takes a BSTR
2577 Reviewed by Geoff and Oliver.
2579 * platform/win/BString.cpp:
2580 (WebCore::BString::operator=):
2581 * platform/win/BString.h:
2583 2007-07-23 Justin Garcia <justin.garcia@apple.com>
2587 <rdar://problem/5354455> Word selection when right-clicking can be confusing (14728)
2589 * page/EventHandler.cpp:
2590 (WebCore::EventHandler::sendContextMenuEvent): In non-editable content,
2591 only do word selection over text. In editable content, we will continue
2592 to select images, line breaks and other elements on right-clicks, to match
2593 TextEdit. For now, in editable content, we'll live with the cases where
2594 positionForPoint creates selections that aren't underneath the mouse. These
2595 aren't regressions because we've always done word selection on right clicks
2596 in editable content.
2598 2007-07-23 Anders Carlsson <andersca@apple.com>
2602 <rdar://problem/5335354>
2603 REGRESSION(r21359-r21368): Can't edit inside RTEF editable region
2605 If Document::open is called and there's a pending load that has not yet started,
2606 that load should be cancelled.
2609 (WebCore::Document::open):
2611 2007-07-23 Timothy Hatcher <timothy@apple.com>
2615 <rdar://problem/5242145> REGRESSION: Clicking on symbol in documentation often doesn't scroll to symbol
2617 A renderer for the anchor wasn't always available at the time parsing finished. So we need
2618 to bail out of gotoAnchor if stylesheets are pending and remember to call gotoAnchor later
2619 once all of the pending stylesheets load.
2622 (WebCore::Document::Document): Initialize m_gotoAnchorNeededAfterStylesheetsLoad to false.
2623 (WebCore::Document::stylesheetLoaded): If we have no more pending stylesheets, call gotoAnchor if needed.
2625 (WebCore::Document::gotoAnchorNeededAfterStylesheetsLoad): New method.
2626 (WebCore::Document::setGotoAnchorNeededAfterStylesheetsLoad): Ditto.
2627 * loader/FrameLoader.cpp:
2628 (WebCore::FrameLoader::gotoAnchor): Bail early if the document still has pending stylesheets.
2629 * loader/FrameLoader.h: Make gotoAnchor() public.
2631 2007-07-23 John Sullivan <sullivan@apple.com>
2635 - fixed <rdar://problem/5327887> Printing Mail note (or Safari page) with misspelled word prints red underline
2637 * rendering/InlineTextBox.cpp:
2638 (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
2639 When printing, bail out without doing any work. Also moved a couple of lines down below another early
2640 bailout since they were pointless above it.
2642 2007-07-23 Oliver Hunt <oliver@apple.com>
2646 <rdar://problem/5353577> WebKit key event behaviour needs to better match other browsers keyevent behaviour
2647 <rdar://problem/5352152> REGRESSION (24399-24479): Pressing Enter in a search field at apple.com no longer starts a search with Korean IM
2648 <rdar://problem/5352649> WebKit should send keyDown event on autorepeat keyDowns
2649 http://bugs.webkit.org/show_bug.cgi?id=14690
2651 Perform Input Method call first so that our behaviour is determined by whether or not
2652 the input method has actually handle the event, rather than by making guesses based
2653 on the existences of marked text. This fixes issues with IMs that have side effects
2654 even on events they do not handle.
2656 Refactored the code in order to improve clarity given the hoisting required by performing
2657 the IM call earlier.
2659 * page/EventHandler.cpp:
2660 (WebCore::EventHandler::keyEvent):
2662 2007-07-23 Anders Carlsson <andersca@apple.com>
2666 <rdar://problem/5045711>
2667 http://bugs.webkit.org/show_bug.cgi?id=12938
2668 Google calendar settings page crashes
2670 Move handling of checked radio buttons to a new class, HTMLFormElement::CheckedRadioButtons.
2671 Each <form> element has an instance of this class. For radio buttons without a containing
2672 form, the document has an instance of HTMLFormElement::CheckedRadioButtons where the
2673 state of those radio buttons will be stored.
2676 This also fixes another bug where removing a checked radio button that does not have a
2677 containing form would not remove the radio button from the checked radio buttons map,
2678 which could lead to a crash due to a dangling pointer.
2681 (WebCore::Document::~Document):
2683 (WebCore::Document::checkedRadioButtons):
2684 * html/HTMLFormElement.cpp:
2685 (WebCore::HTMLFormElement::registerFormElement):
2686 (WebCore::HTMLFormElement::removeFormElement):
2687 (WebCore::HTMLFormElement::CheckedRadioButtons::didCheckButton):
2688 (WebCore::HTMLFormElement::CheckedRadioButtons::checkedButtonForGroup):
2689 (WebCore::HTMLFormElement::CheckedRadioButtons::removeButtonIfChecked):
2690 * html/HTMLFormElement.h:
2691 (WebCore::HTMLFormElement::checkedRadioButtons):
2692 * html/HTMLGenericFormElement.cpp:
2693 (WebCore::HTMLGenericFormElement::insertedIntoTree):
2694 * html/HTMLInputElement.cpp:
2695 (WebCore::HTMLInputElement::~HTMLInputElement):
2696 (WebCore::checkedRadioButtons):
2697 (WebCore::HTMLInputElement::isKeyboardFocusable):
2698 (WebCore::HTMLInputElement::setInputType):
2699 (WebCore::HTMLInputElement::parseMappedAttribute):
2700 (WebCore::HTMLInputElement::setChecked):
2701 (WebCore::HTMLInputElement::preDispatchEventHandler):
2702 (WebCore::HTMLInputElement::willMoveToNewOwnerDocument):
2703 * manual-tests/remove-form-node-with-radio-buttons-crash.html: Added.
2705 2007-07-23 David Hyatt <hyatt@apple.com>
2707 Fix for 5350587, hang in iExploder text 8101. The code that painted outlines for continuations was buggy
2708 in that it assumed the chain was always inline-block-inline, but this is only true for the innermost chained
2709 continuation. To make this more robust, we always just use the inline's containing block's containing block,
2710 which should be guaranteed to enclose all renderers in the continuation chain. In addition, there is now a
2711 null check (to guarantee no more hangs) and an assert (to check if we hit this situation again where the block
2712 used to paint does not properly enclose the continuation chain).
2716 fast/inline/outline-continuation.html
2718 * rendering/RenderBlock.cpp:
2719 (WebCore::RenderBlock::paintContinuationOutlines):
2720 * rendering/InlineFlowBox.cpp:
2721 (WebCore::RenderInline::paint):
2723 2007-07-22 Holger Hans Peter Freyther <zecke@selfish.org>
2727 WARNING: NO TEST CASES ADDED OR CHANGED
2729 Add the WebKit/Gtk API to the buildsystem, ask qmake to create a
2730 pkg-config file and install headers and libraries.
2732 Start to emit signals from FrameLoaderClientGdk, hide the kit Frame
2733 inside the the FrameLoaderClientGdk.
2735 Move ChromeClientGdk to WebKit/gtk/WebCoreSupport
2738 * loader/gdk/FrameLoaderClientGdk.cpp:
2739 * loader/gdk/FrameLoaderClientGdk.h:
2740 * platform/gdk/ChromeClientGdk.h: Removed.
2741 * platform/gdk/FrameGdk.cpp: Remove code not belonging here
2742 * platform/gdk/FrameGdk.h:
2743 * platform/gdk/ScrollViewGdk.cpp: The gdkDrawable won't exist at that time and it is fine
2744 * platform/gdk/TemporaryLinkStubs.cpp: Removed ChromeClientGdk stubs
2746 2007-07-22 Maciej Stachowiak <mjs@apple.com>
2750 <rdar://problem/5353174> REGRESSION: 1% JavaScript performance regression fro Window refactoring (14717)
2751 http://bugs.webkit.org/show_bug.cgi?id=14717
2753 * bindings/js/kjs_window.cpp:
2754 * bindings/js/kjs_window.h:
2755 (KJS::Window::impl): inlined
2756 * page/DOMWindow.cpp:
2758 (WebCore::DOMWindow::frame): inlined
2760 2007-07-22 Darin Adler <darin@apple.com>
2762 * platform/ContextMenu.cpp: Added missing include.
2764 2007-07-22 Sam Weinig <sam@webkit.org>
2768 Fix for http://bugs.webkit.org/show_bug.cgi?id=14682
2769 REGRESSION(24285-24399): alerts do not appear at W3C RTL test page
2771 Test: fast/dom/Window/window-function-name-getter-precedence.html
2773 * bindings/js/JSDOMWindowCustom.cpp:
2774 (WebCore::JSDOMWindow::customGetOwnPropertySlot): Make sure to return functions
2775 before the custom name getter.
2777 2007-07-22 Darin Adler <darin@apple.com>
2781 - fix <rdar://problem/5353263> ContextMenuItem and ContextMenu objects leaking (seen on buildbot)
2783 * platform/ContextMenu.cpp:
2784 (WebCore::separatorItem): Return an auto_ptr instead of a raw pointer, since this function
2785 creates an object that's the caller's responsibility to delete.
2786 (WebCore::createAndAppendFontSubMenu): Create the context menu on the stack, not the heap,
2787 since setSubMenu does not take ownership, and hence the objects were leaking.
2788 (WebCore::createAndAppendSpellingAndGrammarSubMenu): Ditto.
2789 (WebCore::createAndAppendSpellingSubMenu): Ditto.
2790 (WebCore::createAndAppendSpeechSubMenu): Ditto.
2791 (WebCore::createAndAppendWritingDirectionSubMenu): Ditto.
2793 2007-07-22 Darin Adler <darin@apple.com>
2795 Reviewed by Kevin Decker.
2797 - fix <rdar://problem/5126394> REGRESSION: Crash after clicking back button in test application (13250)
2798 http://bugs.webkit.org/show_bug.cgi?id=13250
2800 * bindings/objc/WebScriptObject.mm:
2801 (_didExecute): Removed unnecessary check for isValid() since the _rootObject method already
2802 takes care of that check.
2803 (-[WebScriptObject _imp]): Made this return 0 if there is not a valid rootObject.
2804 (-[WebScriptObject _isSafeScript]): Made this always return false if there is not a valid
2805 rootObject, eliminating the need to check _rootObject for nil if the code is checking _isSafeScript.
2806 (-[WebScriptObject callWebScriptMethod:withArguments:]): Removed check of _rootObject, since it's
2807 immediately followed by a check of _isSafeScript. Removed awkward conversion of name from NSString *
2808 to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
2809 arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
2810 the _imp pointer. Added a second check of _isSafeScript after calling get to get the function
2811 object, since arbitrary changes could occur in there, including navigation to a new frame.
2812 This also takes care of null checking the second call to _imp.
2813 (-[WebScriptObject evaluateWebScript:]): Removed check of _rootObject, since it's
2814 immediately followed by a check of _isSafeScript. Removed awkward conversion of script from NSString *
2815 to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
2816 arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
2818 (-[WebScriptObject setValue:forKey:]): Removed check of _rootObject, since it's
2819 immediately followed by a check of _isSafeScript. Removed awkward conversion of key from NSString *
2820 to KJS::Identifier and did it using WebCore::String instead -- makes it clear that there's no
2821 arbitrary JavaScript execution after _isSafeScript and before _imp, so we don't need to null-check
2823 (-[WebScriptObject valueForKey:]): Ditto.
2824 (-[WebScriptObject removeWebScriptKey:]): Ditto.
2825 (-[WebScriptObject stringRepresentation]): Removed check of _rootObject, since it's
2826 immediately followed by a check of _isSafeScript. Removed unnecessary local variable
2827 and const_cast from the call to the _imp method.
2828 (-[WebScriptObject webScriptValueAtIndex:]): Removed check of _rootObject, since it's
2829 immediately followed by a check of _isSafeScript.
2830 (-[WebScriptObject setWebScriptValueAtIndex:value:]): Ditto.
2831 (-[WebScriptObject JSObject]): Ditto.
2833 2007-07-22 Darin Adler <darin@apple.com>
2835 Reviewed by Anders Carlsson and John Sullivan.
2837 - speculative fix for <rdar://problem/5337500> CrashTracer: [USER] 4 crashes in Mail
2838 at WebCore::HTMLImageElement::isURLAttribute(WebCore::Attribute*) const
2840 * editing/markup.cpp: Added AttributeChange class.
2841 (WebCore::completeURLs): Changed function so that all the URL completion is done in
2842 a separate pass after finding all the URL attributes. This is safer, since actually
2843 applying an attribute change could have any arbitrary effect on the document; it's
2844 tricky to iterate a document while it's being modified and we don't have the checks
2845 here that would be needed to make that work in pathological cases.
2847 2007-07-18 Darin Adler <darin@apple.com>
2851 - fix <rdar://problem/5350604> REGRESSION: Crash in inspector controller code after
2852 clicking back button in test application (14337)
2854 * page/InspectorController.cpp: (WebCore::InspectorController::addScriptResource):
2855 Replace an assertion that was firing with some code that at least doesn't immediately crash.
2857 2007-07-22 Darin Adler <darin@apple.com>
2861 - improve the fix for <rdar://problem/5298816> Crash redirecting message,
2862 in -[SharedBufferData initWithSharedBuffer:]; fixes a crash seen on the buildbot
2864 * loader/DocLoader.cpp: (WebCore::DocLoader::~DocLoader): Call setDocLoader(0) on all
2865 the resources so they don't try to use a stale DocLoader pointer later.
2867 2007-07-21 Mitz Pettel <mitz@webkit.org>
2869 Reviewed by Sam Weinig.
2871 - fixed typos and markup in the following manual tests
2873 * manual-tests/accidental-strict-mode.html:
2874 * manual-tests/caretScrolling.html:
2875 * manual-tests/close-on-closedWindow.html:
2877 2007-07-21 Sam Weinig <sam@webkit.org>
2881 Patch for <rdar://problem/5352013>
2882 The computed style for background-position is wrong for the initial value
2884 - Set the initial value for background-position-x and background-position-y (and
2885 therefore background-position) to 0% instead of 0px.
2887 * rendering/RenderStyle.cpp:
2888 (WebCore::BackgroundLayer::BackgroundLayer):
2889 * rendering/RenderStyle.h:
2890 (WebCore::RenderStyle::initialBackgroundXPosition):
2891 (WebCore::RenderStyle::initialBackgroundYPosition):
2893 2007-07-20 Brady Eidson <beidson@apple.com>
2895 Reviewed by Adele and Andersca
2897 <rdar://problem/5336105> - WebBackForwardList created from scratch is unusable (always leads to crash)
2899 * WebCore.exp: Export the BackForwardList c'tor so WebKit can create one explicitly
2901 2007-07-20 Sam Weinig <sam@webkit.org>
2903 Reviewed by Beth Dakin.
2905 Fix for <rdar://problem/5351901>
2906 Computed value of border-position should return a CSSValueList, not a CSSPrimitiveValue
2908 - Return a space separated CSSValueList for background-position
2909 instead of a CSSPrimitiveValue (string type).
2910 - Remove the "else if (renderer)" case as it never returns a different
2911 value than just calling length.value().
2912 - Make background-position-x and background-position-y behave like
2913 background-position. Fix case of initial value return 'auto' instead
2916 Test: fast/css/getComputedStyle-background-position.html
2918 * css/CSSComputedStyleDeclaration.cpp:
2919 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2921 2007-07-20 Geoffrey Garen <ggaren@apple.com>
2923 Build fix for non-Mac platforms.
2925 * bindings/js/GCController.cpp:
2927 2007-07-20 Anders Carlsson <andersca@apple.com>
2931 If the style sheet requested is a user style sheet, don't store it in the DocLoader's resource map;
2932 user style sheets can outlive their doc loaders.
2934 * loader/DocLoader.cpp:
2935 (WebCore::DocLoader::requestCSSStyleSheet):
2937 2007-07-20 Justin Garcia <justin.garcia@apple.com>
2941 <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it
2943 * bridge/EditorClient.h: Removed a client method for enabling/disabling
2944 word selection on right clicks.
2945 * editing/Editor.cpp: Ditto.
2947 * page/EventHandler.cpp:
2948 (WebCore::EventHandler::sendContextMenuEvent): Select the
2949 word underneath the mouse regardless of whether its editable.
2951 2007-07-20 Ada Chan <adachan@apple.com>
2953 Reviewed by Darin and Adam.
2955 <rdar://problem/5338385> Fixed infinite loop in ScrollView::scrollRectIntoViewRecursively().
2956 Also removed an unused local variable.
2958 * platform/win/ScrollViewWin.cpp:
2959 (WebCore::ScrollView::scrollRectIntoViewRecursively):
2961 2007-07-21 Antti <antti@apple.com>
2965 Fix <rdar://problem/5305788>
2966 REGRESSION: Safari sometimes loads IE-specific stylesheet on www.apaema.org
2968 Pick the preferred style sheet set based on document order even if the sheet is still loading. Previously
2969 the set was chosen based on which stylesheet happened to arrive first. Just fix the problem at hand
2970 and resist urge to start refactoring this function.
2973 (WebCore::Document::recalcStyleSelector):
2975 2007-07-20 Sam Weinig <sam@webkit.org>
2979 Fix for <rdar://problem/5351252>
2980 Computed value for -webkit-background-size and border-spacing
2981 should be space separated CSSValueLists.
2983 * css/CSSComputedStyleDeclaration.cpp:
2984 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2986 2007-07-20 Geoffrey Garen <ggaren@apple.com>
2988 Suggested by Darin Adler.
2990 Slight tweak to my last commit: changed gcController() to return a
2991 reference instead of a pointer.
2993 2007-07-20 Geoffrey Garen <ggaren@apple.com>
2995 Reviewed by Darin Adler.
2997 Fixed http://bugs.webkit.org/show_bug.cgi?id=12900 Page tear-down
2998 forces garbage collection once per frame
3000 Also fixed <rdar://problem/5286989> GC on window close does not always
3001 bring the JS object count down to 0
3003 Implemented a 0-delay GC timer in WebCore. Instead of forcing GC
3004 immediately, code that thinks it has created a lot of garbage starts
3005 the timer. This has two advantages:
3007 1) Multiple GCs can coalesce. In my pathological test case, this
3008 improves performance by an order of magnitude.
3010 2) Conservative marking is less likely to keep alive important dead
3011 objects, like the window object, because the stack is small and free of
3012 JS processing when the timer fires.
3014 Added GCController.h/.cpp, sometimes blindly:
3016 * WebCore.vcproj/WebCore.vcproj:
3017 * WebCore.xcodeproj/project.pbxproj:
3018 * WebCoreSources.bkl:
3020 Added singleton that implements GC on a 0-delay timer:
3021 * bindings/js/GCController.h: Added.
3022 * bindings/js/GCController.cpp: Added.
3024 Changed Collector::collect() calls below to call to the singleton:
3025 * bindings/js/kjs_proxy.cpp:
3026 (WebCore::KJSProxy::~KJSProxy):
3027 * bindings/js/kjs_window.cpp:
3028 (KJS::Window::clear):
3029 * history/CachedPage.cpp:
3030 (WebCore::CachedPage::clear):
3033 (WebCore::Frame::~Frame): Removed previous slightly hackish attempt to
3034 avoid conservative marking of the window object.
3036 2007-07-20 Anders Carlsson <andersca@apple.com>
3040 <rdar://problem/5298816> Crash redirecting message, in -[SharedBufferData initWithSharedBuffer:]
3042 Have cached resources keep track of what DocLoader they belong to. This is so that they can remove themselves
3043 from the DocLoader's resource map when they're destroyed when the cache is disabled.
3045 * html/HTMLImageLoader.cpp:
3046 (WebCore::HTMLImageLoader::updateFromElement):
3048 (WebCore::Cache::requestResource):
3049 * loader/CachedResource.cpp:
3050 (WebCore::CachedResource::CachedResource):
3051 (WebCore::CachedResource::~CachedResource):
3052 * loader/CachedResource.h:
3053 (WebCore::CachedResource::setDocLoader):
3055 2007-07-20 Brady Eidson <beidson@apple.com>
3059 <rdar://problem/5153021> and http://bugs.webkit.org/show_bug.cgi?id=13364
3061 The issue here was that if a document in a subframe was loaded from a URL, but then a script did
3062 document.open or document.write during parsing, we would overwrite the document's url and baseurl
3063 with the parent frame's url. WRONG!
3066 (WebCore::Document::open): Only set the url and baseURL in document.open if they are still empty or about:blank
3068 2007-07-20 Maciej Stachowiak <mjs@apple.com>
3072 <rdar://problem/5326303> REGRESSION: blur event fires upon navigating away from a page with focused element
3076 The proximate cause was the recent change to keep focus on the
3077 WebHTMLView when switching views. But the reason this happend was
3078 that didCommitLoadForFrame got called at a time when the new view
3079 was in place, but the old document was still there. This was a
3080 longstanding problem with the delegate, and fixing it cleans it
3083 * loader/FrameLoader.cpp:
3084 (WebCore::FrameLoader::begin): Don't send dispatchWindowObjectAvailable if
3085 caller asked not to (this is to allow order of delegates to be the same).
3086 (WebCore::FrameLoader::transitionToCommitted): Don't emit didCommitLoadForFrame here.
3087 (WebCore::FrameLoader::receivedFirstData): Instead do it here, after calling begin(),
3088 so the new document is set up.
3089 * loader/FrameLoader.h: Add new optional parameter to begin().
3091 2007-07-20 Sam Weinig <sam@webkit.org>
3093 Reviewed by Beth Dakin.
3095 Update for fix for http://bugs.webkit.org/show_bug.cgi?id=14646
3096 <rdar://problem/5340449>
3098 - Return a CSSValueList instead of CSSValue (with a Pair type) for
3099 computed values of border radii.
3100 - Add ability to CSSValueList to print out a space separated list
3102 - Add border radii to list of computed styles that we create and can
3105 * css/CSSComputedStyleDeclaration.cpp:
3107 (WebCore::getBorderRadiusCornerValue):
3108 * css/CSSValueList.cpp:
3109 (WebCore::CSSValueList::CSSValueList):
3110 (WebCore::CSSValueList::cssText):
3111 * css/CSSValueList.h:
3113 2007-07-20 Mitz Pettel <mitz@webkit.org>
3117 - http://bugs.webkit.org/show_bug.cgi?id=14626
3118 Make bidiReorderCharacters independent of RenderBlock
3120 No layout test possible because there is no change in functionality.
3122 This patch generalizes RenderBlock's implementation of the Unicode Bidi Algorithm
3123 in the form of the BidiResolver class template. An instance of a BidiResolver class
3124 can generate a sequence of runs with corresponding level and override attributes,
3125 given a range specified by start and end iterators. The iterators can optionally
3126 call back to the BidiResolver instance to push or pop explicit embedding levels.
3128 The patch replaces BidiState with a specialization of BidiResolver that uses
3129 BidiIterators and generates BidiRuns. It also eliminates some of the file statics
3130 in bidi.cpp, instead relying on BidiResolver data members.
3132 The patch makes the BidiContext part of BidiStatus, thus making BidiStatus the
3133 entire state that needs to be saved and restored in order to restart the bidi
3134 algorithm at a given point. Previously, you had to keep and pass around two
3135 separate structures, namely the BidiContext and the BidiStatus.
3137 bidiReorderCharacters is implemented without relying on render objects, using
3138 a BidiResolver specialization that uses simple character buffer iterators and
3139 simple run structures.
3142 * WebCore.vcproj/WebCore.vcproj:
3143 * WebCore.xcodeproj/project.pbxproj:
3144 * WebCoreSources.bkl:
3145 * platform/BidiContext.cpp: Added.
3146 (WebCore::operator==):
3147 * platform/BidiContext.h: Added.
3148 (WebCore::BidiContext::BidiContext):
3149 (WebCore::BidiContext::ref):
3150 (WebCore::BidiContext::deref):
3151 (WebCore::BidiContext::parent):
3152 (WebCore::BidiContext::level):
3153 (WebCore::BidiContext::dir):
3154 (WebCore::BidiContext::override):
3155 * platform/BidiReorderCharacters.cpp: Added.
3156 (WebCore::CharacterBufferIterator::CharacterBufferIterator):
3157 (WebCore::CharacterBufferIterator::offset):
3158 (WebCore::CharacterBufferIterator::increment):
3159 (WebCore::CharacterBufferIterator::atEnd):
3160 (WebCore::CharacterBufferIterator::current):
3161 (WebCore::CharacterBufferIterator::direction):
3162 (WebCore::CharacterBufferIterator::operator==):
3163 (WebCore::CharacterBufferIterator::operator!=):
3164 (WebCore::::appendRun):
3165 (WebCore::bidiReorderCharacters):
3166 * platform/BidiReorderCharacters.h: Added.
3167 * platform/BidiResolver.h: Added.
3168 (WebCore::BidiStatus::BidiStatus):
3169 (WebCore::operator==):
3170 (WebCore::operator!=):
3171 (WebCore::BidiCharacterRun::BidiCharacterRun):
3172 (WebCore::BidiCharacterRun::reversed):
3173 (WebCore::BidiCharacterRun::dirOverride):
3174 (WebCore::BidiCharacterRun::next):
3175 (WebCore::BidiResolver::):
3176 (WebCore::BidiResolver::context):
3177 (WebCore::BidiResolver::setContext):
3178 (WebCore::BidiResolver::setLastDir):
3179 (WebCore::BidiResolver::setLastStrongDir):
3180 (WebCore::BidiResolver::setEorDir):
3181 (WebCore::BidiResolver::dir):
3182 (WebCore::BidiResolver::setDir):
3183 (WebCore::BidiResolver::status):
3184 (WebCore::BidiResolver::setStatus):
3185 (WebCore::BidiResolver::adjustEmbedding):
3186 (WebCore::BidiResolver::setAdjustEmbedding):
3187 (WebCore::BidiResolver::firstRun):
3188 (WebCore::BidiResolver::lastRun):
3189 (WebCore::BidiResolver::runCount):
3191 (WebCore::::deleteRuns):
3192 (WebCore::::reverseRuns):
3193 (WebCore::::createBidiRunsForLine):
3194 * platform/win/PopupMenuWin.cpp:
3195 (WebCore::PopupMenu::paint):
3196 * rendering/RenderBlock.h:
3197 * rendering/RenderFileUploadControl.cpp:
3198 (WebCore::RenderFileUploadControl::paintObject):
3199 * rendering/RenderListBox.cpp:
3200 (WebCore::RenderListBox::paintItemForeground):
3201 * rendering/RootInlineBox.cpp:
3202 (WebCore::RootInlineBox::childRemoved):
3203 (WebCore::RootInlineBox::lineBreakBidiStatus):
3204 (WebCore::RootInlineBox::setLineBreakInfo):
3205 * rendering/RootInlineBox.h:
3206 (WebCore::RootInlineBox::RootInlineBox):
3207 * rendering/bidi.cpp:
3208 (WebCore::BidiIterator::BidiIterator):
3209 (WebCore::BidiState::deleteRuns):
3210 (WebCore::operator==):
3211 (WebCore::operator!=):
3212 (WebCore::bidiNext):
3213 (WebCore::bidiFirst):
3214 (WebCore::BidiState::addRun):
3215 (WebCore::appendRunsForObject):
3216 (WebCore::BidiState::appendRun):
3217 (WebCore::RenderBlock::constructLine):
3218 (WebCore::RenderBlock::computeHorizontalPositionsForLine):
3219 (WebCore::RenderBlock::computeVerticalPositionsForLine):
3220 (WebCore::RenderBlock::bidiReorderLine):
3221 (WebCore::buildCompactRuns):
3222 (WebCore::RenderBlock::layoutInlineChildren):
3223 (WebCore::RenderBlock::determineStartPosition):
3224 (WebCore::RenderBlock::determineEndPosition):
3225 (WebCore::RenderBlock::matchedEndLine):
3226 (WebCore::RenderBlock::skipWhitespace):
3228 (WebCore::BidiRun::BidiRun):
3229 (WebCore::BidiRun::next):
3231 2007-07-20 Darin Adler <darin@apple.com>
3233 Reviewed by John Sullivan.
3235 - fix for <rdar://problem/5331723> <rdar://problem/5331723> Safari gives error
3236 103 for URLs that Adobe Lightroom's Preview feature produces, with ":1" in the hostname
3238 Test: fast/loader/file-URL-with-port-number.html
3240 * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::portAllowed):
3241 Don't do any port blocking for file URLs.
3243 2007-07-20 Mitz Pettel <mitz@webkit.org>
3247 - fix http://bugs.webkit.org/show_bug.cgi?id=14689
3248 REGRESSION (3.0.2-TOT): <select> menu items have incorrect background color
3250 * manual-tests/item-background.html: Added.
3251 * platform/PopupMenuClient.h:
3252 * platform/graphics/Color.cpp:
3253 (WebCore::blendComponent): Renamed the static method blend() to this.
3254 (WebCore::Color::blend): Added. Compositing (in "normal" or "source over"
3255 blend mode) B.blend(C) over A is equivalent to compositing C over the
3256 result of compositing B over A.
3257 (WebCore::Color::blendWithWhite): Changed for the above rename.
3258 * platform/graphics/Color.h:
3259 * platform/win/PopupMenuWin.cpp:
3260 (WebCore::PopupMenu::paint): Changed to use itemBackgroundColor().
3261 * rendering/RenderMenuList.cpp:
3262 (WebCore::RenderMenuList::itemBackgroundColor): Added. Returns the color
3263 that would result from overlaying the item's background color over the
3264 menu's background color over solid white. Note that clientStyle() cannot
3265 be used for the menu's background color, since background color is not
3266 inherited by the inner block (the regression resulted from changing
3267 clientStyle() to return the inner block's style), and that the color
3268 returned from this method is guaranteed to be opaque.
3269 * rendering/RenderMenuList.h:
3270 * rendering/RenderTextControl.cpp:
3271 (WebCore::RenderTextControl::itemBackgroundColor): Added.
3272 * rendering/RenderTextControl.h:
3274 2007-07-20 Rob Buis <buis@kde.org>
3278 http://bugs.webkit.org/show_bug.cgi?id=14642
3279 REGRESSION(r24064-24096): Reflection type effect in canvas tag broke
3281 Do not stop the fill/stroke operation when encountering an empty path.
3283 * html/CanvasRenderingContext2D.cpp:
3284 (WebCore::CanvasRenderingContext2D::fill):
3285 (WebCore::CanvasRenderingContext2D::stroke):
3287 2007-07-20 Lars Knoll <lars@trolltech.com>
3291 Remove some files that are not used anymore.
3293 * platform/qt/FontCacheQt.cpp: Removed.
3294 * platform/qt/FontDataQt.cpp: Removed.
3295 * platform/qt/FontPlatformData.h: Removed.
3296 * platform/qt/FontPlatformDataQt.cpp: Removed.
3297 * platform/qt/GlyphPageTreeNodeQt.cpp: Removed.
3299 2007-07-20 Lars Knoll <lars@trolltech.com>
3303 use the correct font for spaces.
3305 * platform/qt/FontQt.cpp:
3306 (WebCore::generateComponents):
3308 2007-07-20 Lars Knoll <lars@trolltech.com>
3312 spaces where not correctly taken into account for both offsetForPosition and selectionRectForText. Because of that selections sort of worked in LTR text, but completely failed in RTL.
3314 * platform/qt/FontQt.cpp:
3315 (WebCore::TextRunComponent::isSpace):
3316 (WebCore::TextRunComponent::TextRunComponent):
3317 (WebCore::generateComponents):
3318 (WebCore::Font::drawText):
3319 (WebCore::Font::offsetForPosition):
3320 (WebCore::Font::selectionRectForText):
3322 2007-07-20 Lars Knoll <lars@trolltech.com>
3326 fix up some smaller issues in selection handling. It's still not perfect and selections in mixed rtl/ltr text are still broken, but it's getting there.
3328 * platform/qt/FontQt.cpp:
3329 (WebCore::Font::offsetForPosition):
3330 (WebCore::cursorToX):
3331 (WebCore::Font::selectionRectForText):
3333 2007-07-20 Lars Knoll <lars@trolltech.com>
3337 make offsetForPosition and selectionRectForText work correctly with small caps.
3339 * platform/qt/FontQt.cpp:
3340 (WebCore::Font::offsetForPosition):
3341 (WebCore::cursorToX):
3342 (WebCore::Font::selectionRectForText):
3344 2007-07-20 Lars Knoll <lars@trolltech.com>
3348 clip the drawn text correctly when needed.
3350 * platform/qt/FontQt.cpp:
3351 (WebCore::Font::drawText):
3353 2007-07-20 Lars Knoll <lars@trolltech.com>
3357 Fix offsetForPosition and selectionRectForText methods.
3359 * platform/qt/FontQt.cpp:
3360 (WebCore::Font::offsetForPosition):
3361 (WebCore::cursorToX):
3362 (WebCore::Font::selectionRectForText):
3364 2007-07-20 Lars Knoll <lars@trolltech.com>
3368 fix BiDi text rendering.
3370 * platform/qt/FontQt.cpp:
3371 (WebCore::TextRunComponent::TextRunComponent):
3372 (WebCore::generateComponents):
3373 (WebCore::Font::drawText):
3375 2007-07-20 Mark Rowe <mrowe@apple.com>
3379 Move FTPDirectoryTokenizer::m_templateDocumentData to be a function-scoped static
3380 to avoid creating a global initializer. This fixes the build for x86_64.
3382 * loader/FTPDirectoryDocument.cpp:
3383 (WebCore::FTPDirectoryTokenizer::loadDocumentTemplate):
3385 2007-07-19 Geoffrey Garen <ggaren@apple.com>
3387 Reviewed by Maciej Stachowiak.
3389 Fixed <rdar://problem/5347849> Cache eviction of live decoded data is
3392 The solution here is to evict live decoded data based on a strict LRU
3393 model. This should work well as a "scrolling window."
3395 With this patch, I see a substantial reduction in CPU while scrolling
3396 through a page with large images on a low memory system. Layout tests
3399 * loader/Cache.h: Changed from a size-based vector of LRU lists to a
3400 single LRU list in order to implement strict LRU.
3402 * loader/CachedResource.h: Removed tracking of access count, since that
3403 was the old cache eviction model.
3405 2007-07-19 Oliver Hunt <oliver@apple.com>
3409 <rdar://problem/5076807> REGRESSION: Can't undo conversion of inline text (by hitting ESC)
3410 <rdar://problem/5346167> DOM key events triggered during IME composition differ in webkit/mac vs all windows browsers
3412 We now basically match the behaviour of IE/Windows. This means that during composition keydown and autorepeat
3413 keys generate keydown events with a keyCode of 229, which correlates to the windows VK_PROCESSKEY message.
3414 keyup events are generated with the keyCode of the actual key that was pressed.
3416 The only difference is on the first keydown of a composition, in which IE will use keyCode == 229, and we will
3417 send an event with the keyCode for the actual key that was pressed.
3419 * page/EventHandler.cpp:
3420 (WebCore::EventHandler::keyEvent):
3421 * platform/PlatformKeyboardEvent.h:
3422 (WebCore::PlatformKeyboardEvent::setWindowsKeyCode):
3424 2007-07-19 Brady Eidson <beidson@apple.com>
3428 <rdar://problem/5134929> REGRESSION: Colon detected as delimiting an empty port is stripped
3430 The fix for this was in KURL::parse() which had a slightly changed rule that would strip the colon if there
3433 An additional canonicalization fix was made in window.location.host to match the expected behavior of leaving
3434 the colon in place - before this fix, if the colon was there but no port was there, we'd see the port as 0.
3436 * bindings/js/kjs_window.cpp:
3437 (KJS::Location::put): Call setHostAndPort instead of setHost and setPort seperately
3439 * manual-tests/location-host-canonicalization.html: Added.
3441 * platform/KURL.cpp:
3442 (WebCore::KURL::setHostAndPort): Set the host and port as one string component then reparse the URL
3443 (WebCore::KURL::parse): Change one line to consider the empty colon as part of the host name
3446 2007-07-19 Anders Carlsson <andersca@apple.com>
3450 <rdar://problem/5288617>
3451 Crash playing a very large QuickTime movie in Safari
3453 <rdar://problem/5271174>
3454 http://bugs.webkit.org/show_bug.cgi?id=14148
3455 LEAK: Serious memory consumption and leak when loading QT movies.
3457 Don't keep plugin stream data in memory since some plugin resources (like QT movies)
3458 can be really big. If a plug-in wants data in a file, create a file and write data to it
3459 as it's coming from the wire, instead of using a big buffer.
3461 * loader/ResourceLoader.cpp:
3462 (WebCore::ResourceLoader::ResourceLoader):
3463 (WebCore::ResourceLoader::addData):
3464 (WebCore::ResourceLoader::willStopBufferingData):
3465 * loader/ResourceLoader.h:
3466 (WebCore::ResourceLoader::setShouldBufferData):
3467 * plugins/win/PluginStreamWin.cpp:
3468 (WebCore::PluginStreamWin::PluginStreamWin):
3469 (WebCore::PluginStreamWin::start):
3470 (WebCore::PluginStreamWin::startStream):
3471 (WebCore::PluginStreamWin::destroyStream):
3472 (WebCore::PluginStreamWin::didReceiveData):
3473 (WebCore::PluginStreamWin::didFinishLoading):
3474 * plugins/win/PluginStreamWin.h:
3476 2007-07-19 Geoffrey Garen <ggaren@apple.com>
3478 Reviewed by Darin Adler.
3480 Fixed <rdar://problem/5348384> Restore old return value behavior of
3481 stringByEvaluatingJavaScriptFromString
3483 Return an empty string unless you have a string, boolean, or number
3486 * WebCore.xcodeproj/project.pbxproj:
3487 * page/mac/WebCoreFrameBridge.mm:
3488 (-[WebCoreFrameBridge stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
3490 2007-07-19 Darin Adler <darin@apple.com>
3494 - fix http://bugs.webkit.org/show_bug.cgi?id=14666
3495 remove unused xxx-encodings.txt for all platforms other than Mac
3497 * platform/gdk/gdk-encodings.txt: Removed.
3498 * platform/win/win-encodings.txt: Removed.
3499 * platform/wx/wx-encodings.txt: Removed.
3501 * platform/character-sets.txt: Moved into mac subdirectory since it's only used for Mac; at some
3502 point I hope to remove it completely.
3503 * platform/make-charset-table.pl: Ditto.
3504 * platform/mac/character-sets.txt: Copied from platform/character-sets.txt.
3505 * platform/mac/make-charset-table.pl: Copied from platform/make-charset-table.pl.
3507 * DerivedSources.make: Moved CharsetData.cpp into the MACOS section.
3508 Changed the build rule to use Mac-specific paths for everything and got rid of
3511 * WebCore.vcproj/build-generated-files.sh: Removed code to set ENCODINGS_FILE and ENCODINGS_PREFIX.
3512 * WebCore.xcodeproj/project.pbxproj: Ditto.
3513 * make-generated-sources.sh: Ditto.
3515 * Projects/gdk/webcore-gdk.bkl: Removed code to pass gdk-encodings.txt to make-generated-sources.sh.
3516 * Projects/wx/webcore-wx.bkl: Ditto, but for wx-encodings.txt.
3518 2007-07-19 Antti <antti@apple.com>
3522 Fix <rdar://problem/5257371>
3523 Dashcode Client crash when clicking on placemarks in Maps widget in WebCore::DeprecatedPtrListImpl::addIterator
3525 FlexibleBoxes should never have inline children. Don't move children out from last remaining anonymous block.
3527 * rendering/RenderBlock.cpp:
3528 (WebCore::RenderBlock::removeChild): real fix
3529 * rendering/RenderFlexibleBox.cpp:
3530 (WebCore::RenderFlexibleBox::layoutVerticalBox): just to be sure, this is checked elsewhere too
3532 2007-07-19 Anders Carlsson <andersca@apple.com>
3536 <rdar://problem/5322268>
3537 Safari Crash at http://www.exlibrisgroup.com/sfx_openurl.htm
3539 Add a real copy constructor and assignment operator for CollectionInfo
3540 so that the vectors in the cache maps will be copied correctly.
3542 * html/HTMLCollection.cpp:
3543 (WebCore::HTMLCollection::CollectionInfo::CollectionInfo):
3544 (WebCore::HTMLCollection::CollectionInfo::swap):
3545 * html/HTMLCollection.h:
3546 (WebCore::HTMLCollection::CollectionInfo::operator=):
3547 (WebCore::HTMLCollection::CollectionInfo::copyCacheMap):
3549 2007-07-19 David Hyatt <hyatt@apple.com>
3551 Fix for 5237574, Colloquy main view does not size correctly. Make
3552 sure to reset the baseilne when calculating a row's height/baseline, so
3553 that old values don't stick around.
3555 Reviewed by Tim Hatcher
3557 * rendering/RenderTableSection.cpp:
3558 (WebCore::RenderTableSection::calcRowHeight):
3560 2007-07-19 Antti <antti@apple.com>
3564 Fix <rdar://problem/5346697>
3565 REGRESSION(r23773): Visibile children on invisible layer are not painted (fast/layers/layer-visibility.html fails)