1 2007-05-25 Mitz Pettel <mitz@webkit.org>
5 - fix http://bugs.webkit.org/show_bug.cgi?id=13767
6 REGRESSION: Multipart image documents are garbled
8 Test: http/tests/multipart/invalid-image-data-standalone.html
10 * loader/DocumentLoader.cpp:
11 (WebCore::DocumentLoader::isLoadingMultipartContent): Added.
12 * loader/DocumentLoader.h:
13 * loader/ImageDocument.cpp:
14 (WebCore::ImageTokenizer::finish): If the image is multipart, make a copy
15 of the current part instead of using the resource data, which is going to be
16 overwritten by the next part.
17 * loader/MainResourceLoader.h:
18 (WebCore::MainResourceLoader::isLoadingMultipartContent): Added.
20 2007-05-25 Anders Carlsson <andersca@apple.com>
24 * bindings/js/kjs_html.cpp:
25 (KJS::HTMLElementFunction::callAsFunction):
27 2007-05-25 Anders Carlsson <andersca@apple.com>
31 <rdar://problem/5226788> After resizing the window larger than the image, hovering over the image still shows magnify glass
33 One part of the bug was already fixed by my previous commit. This fixes the case where the window is sized so the image fit
34 after it has been zoomed in.
36 * loader/ImageDocument.cpp:
37 (WebCore::ImageDocument::windowSizeChanged):
39 2007-05-25 John Sullivan <sullivan@apple.com>
41 Reviewed by Anders and Tim
44 <rdar://problem/5226000> REGRESSION: In Gmail and Mail, a hang occurs when attempting to grammar/spellcheck a word in a reply
47 (WebCore::findFirstBadGrammarInRange):
48 Use the more obvious way to check whether a range is empty. In this case the more obvious way
49 would also have caused no problem to occur. Also added an assertion. Though this change is
50 enough to fix the symptom of the bug, the real fix is in WebKit.
52 2007-05-25 Anders Carlsson <andersca@apple.com>
54 Reviewed by Darin (Sorta).
56 * loader/ImageDocument.cpp:
57 (WebCore::ImageDocument::restoreImageSize):
58 Use removeProperty here.
60 2007-05-25 Geoffrey Garen <ggaren@apple.com>
62 Reviewed by Darin Adler.
64 Some cleanup to Cache while Fixing <rdar://problem/5055182> The page cache
67 * loader/Cache.cpp: Removed destructor to help identify this class as a
70 * loader/Cache.h: Made constructor and destructor private to match the
71 singleton model of PageCache.
73 Put structs related to Cache inside its declaration to fix some namespace
74 conflicts I had while writing my patch. (They don't exist anymore, but
75 I figured this might help future development.)
77 2007-05-24 Geoffrey Garen <ggaren@apple.com>
79 Reviewed by Darin Adler.
81 Fixed a bug with Settings where a number of different objects held bare
82 Settings* data members, even though the Page owns the Settings object and
83 deletes it upon destruction.
85 Added NULL checks since the Page can be deleted before the frame/document.
87 * page/Settings.cpp: Removed reliance on setNeedsReapplyStylesForSettingsChange.
89 * css/cssstyleselector.cpp: CSSStyleSelector was the worst offender. It
90 held a number of back pointers that were not guaranteed. I removed the
91 Settings*, Frame*, and FrameView* back pointers, but others could probably
92 go, too. I replaced them with a single Document* pointer, which is guaranteed
93 because the Document owns the CSSStyleSelector.
95 * page/Page.cpp: Removed setNeedsReapplyStylesForSettingsChange -- the
96 Settings object is now a proper subcontroller of Page, so it doesn't need
97 to use a global table to find its page anymore. Also, this function
98 confusingly implied that the Frames in a page can have heterogeneous settings,
101 2007-05-25 David Hyatt <hyatt@apple.com>
103 Make sure -webkit-border-fit accounts for padding as well as border.
107 * rendering/RenderBlock.cpp:
108 (WebCore::RenderBlock::borderFitAdjust):
110 2007-05-25 David Hyatt <hyatt@apple.com>
112 Rework line numbering (again). This time I finally think I have
113 it right for all the document.write insanity that can occur.
117 * html/HTMLParser.cpp:
118 (WebCore::HTMLParser::reportErrorToConsole):
119 * html/HTMLParserErrorCodes.cpp:
120 (WebCore::htmlParserDocumentWriteMessage):
121 * html/HTMLParserErrorCodes.h:
122 * html/HTMLTokenizer.cpp:
123 (WebCore::HTMLTokenizer::write):
124 * html/HTMLTokenizer.h:
125 (WebCore::HTMLTokenizer::lineNumberPtr):
126 (WebCore::HTMLTokenizer::processingContentWrittenByScript):
127 * platform/SegementedSring.cpp
128 (WebCore::SegmentedString::setExcludeLineNumbers):
129 * platform/SegmentedString.h:
130 (WebCore::SegmentedSubstring::SegmentedSubstring):
131 (WebCore::SegmentedSubstring::clear):
132 (WebCore::SegmentedSubstring::excludeLineNumbers):
133 (WebCore::SegmentedSubstring::setExcludeLineNumbers):
134 (WebCore::SegmentedString::excludeLineNumbers):
135 (WebCore::SegmentedString::advance):
137 2007-05-24 Geoffrey Garen <ggaren@apple.com>
139 Reviewed by Adam Roben.
141 Added a debug-only CachedPage counter. This helped me track down an SVG
142 timer bug in my recent page cache work.
144 * history/CachedPage.cpp:
146 2007-05-24 David Hyatt <hyatt@apple.com>
148 Improve <form> error reporting to catch <form>s inside table parts.
149 Tweak the wording of some of the error messages to be a bit better.
153 * html/HTMLParser.cpp:
154 (WebCore::HTMLParser::insertNode):
155 (WebCore::HTMLParser::processCloseTag):
156 (WebCore::HTMLParser::popBlock):
157 * html/HTMLParserErrorCodes.cpp:
158 (WebCore::htmlParserErrorMessageTemplate):
159 * html/HTMLParserErrorCodes.h:
161 2007-05-24 Rob Buis <buis@kde.org>
165 http://bugs.webkit.org/show_bug.cgi?id=4104
166 first-letter not updating style with hover
167 http://bugs.webkit.org/show_bug.cgi?id=13169
168 css-formatted first letter won't hide dynamically
170 Update first letter when RenderBlock::setStyle is called.
172 * css/cssstyleselector.cpp:
173 (WebCore::CSSStyleSelector::checkOneSelector):
175 (WebCore::Document::Document):
176 (WebCore::Document::createElement):
178 (WebCore::Document::usesFirstLetterRules):
179 (WebCore::Document::setUsesFirstLetterRules):
180 * rendering/RenderBlock.cpp:
181 (WebCore::RenderBlock::setStyle):
182 (WebCore::RenderBlock::updateFirstLetter):
184 2007-05-24 Mitz Pettel <mitz@webkit.org>
188 - fix http://bugs.webkit.org/show_bug.cgi?id=13800
189 REGRESSION: Moving a slider moves another unrelated slider
191 Test: fast/forms/slider-thumb-shared-style.html
193 RenderSlider mutates the thumb's style, therefore it must not be shared
194 with another slider's thumb, a situation that could occur if the sliders
195 themselves shared style.
197 * rendering/RenderSlider.cpp:
198 (WebCore::RenderSlider::createThumbStyle): Always use a private copy for
201 2007-05-24 Adele Peterson <adele@apple.com>
205 Fix for <rdar://problem/5211921> Form values sometimes get transposed (iGoogle)
207 Test: fast/history/redirect-load-no-form-restoration.html
209 * history/HistoryItem.cpp:
210 (WebCore::HistoryItem::setURL): Clear the document state when the url changes for a HistoryItem.
211 (WebCore::HistoryItem::isCurrentDocument): Added. Compares the HistoryItem url to the document's url. This might not be the best way to do this, but it works for now.
212 * history/HistoryItem.h:
213 * loader/FrameLoader.cpp: (WebCore::FrameLoader::saveDocumentState): Only set the document (and form) state if the document is current for the history item.
215 2007-05-24 Mitz Pettel <mitz@webkit.org>
219 - fix http://bugs.webkit.org/show_bug.cgi?id=13857
220 REGRESSION: onChange function applied to select element executes twice when focus is set
222 Test: fast/forms/select-double-onchange.html
224 * html/HTMLSelectElement.cpp:
225 (WebCore::HTMLSelectElement::menuListOnChange): Changed to update m_lastOnChangeIndex
226 before dispatching the change event to avoid reentrancy.
228 2007-05-24 Darin Adler <darin@apple.com>
232 - fix <rdar://problem/5226451> REGRESSION (21618): Mail block quotes
233 are missing the lines on the side
235 This patch fixes three problems:
237 1) makes the "skip canLoad check" boolean also skip the check
238 that prevents any loads while the document is in provisional
239 state; this is the proximate cause of the bug
241 * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create):
242 Don't check the frame's state if skipCanLoadCheck is true.
244 2) moves the "skip canLoad check" boolean to the Request object;
245 the old implementation would cause that flag to affect the
246 new request we served, which might not be the resource with
249 3) fixes error-handling code path that would leak requests
251 * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::updateFromElement):
252 Pass false to the CachedImage constructor to indicate we are not making
253 this object for the cache.
256 (WebCore::createResource): Pass true to the CachedImage constructor to
257 indicate we are making this object for the cache.
258 (WebCore::Cache::requestResource): Add new code that assumes the object
259 will already have the inCache bit set, and that will delete the object
260 and return 0 if the cache is disabled and the load failed.
262 * loader/CachedImage.h:
263 * loader/CachedImage.cpp: (WebCore::CachedImage::CachedImage):
264 Added a forCache boolean parameter. Always false for the constructor
265 that's only used outside the cache code, and passed in as a boolean
266 for the constructor that's used both in cache and outside cache.
268 * loader/CachedResource.h:
269 * loader/CachedResource.cpp:
270 (WebCore::CachedResource::CachedResource): Added a forCache boolean
271 parameter that determines the initial state of the m_inCache flag.
272 This is needed to prevent a resource from being destroyed if an
273 error occurs during the initial load.
275 * loader/DocLoader.cpp:
276 (WebCore::DocLoader::requestCSSStyleSheet): Added FIXME.
277 (WebCore::DocLoader::setLoadInProgress): Added null check.
280 * loader/Request.cpp: (WebCore::Request::Request):
281 Added a shouldSkipCanLoadCheck boolean here, since we need to track
282 this for each request.
286 (WebCore::Loader::load): Pass the skipCanLoadCheck boolean to the
287 Request constructor rather than to the servePendingRequests function.
288 (WebCore::Loader::servePendingRequests): Add a loop so we can handle
289 cases where the request fails immediately without leaking the request
290 and thinking that we're loading forever.
292 2007-05-24 David Hyatt <hyatt@apple.com>
294 Add error reporting for residual style.
298 * html/HTMLParser.cpp:
299 (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
300 (WebCore::HTMLParser::reopenResidualStyleTags):
301 * html/HTMLParserErrorCodes.cpp:
302 (WebCore::htmlParserErrorMessageTemplate):
303 * html/HTMLParserErrorCodes.h:
305 2007-05-24 David Hyatt <hyatt@apple.com>
307 Report <script/> as a warning instead of an error for now, since we
308 actually do close it. (Sigh.)
312 * html/HTMLParser.cpp:
313 (WebCore::HTMLParser::parseToken):
314 (WebCore::HTMLParser::reportErrorToConsole):
315 * html/HTMLParserErrorCodes.cpp:
316 (WebCore::htmlParserErrorMessageTemplate):
317 (WebCore::isWarning):
318 * html/HTMLParserErrorCodes.h:
320 2007-05-24 David Hyatt <hyatt@apple.com>
322 Add error reporting for the </p> -> <p></p> quirk.
324 Add error reporting when a stray close tag is encountered with no
325 corresponding open tag.
329 * html/HTMLParser.cpp:
330 (WebCore::HTMLParser::HTMLParser):
331 (WebCore::HTMLParser::processCloseTag):
332 (WebCore::HTMLParser::popBlock):
334 (WebCore::HTMLParser::popBlock):
335 * html/HTMLParserErrorCodes.cpp:
336 (WebCore::htmlParserErrorMessageTemplate):
337 * html/HTMLParserErrorCodes.h:
339 2007-05-24 Kevin McCullough <kmccullough@apple.com>
343 - Rolling back change to fix the build until I have a good fix for data: urls.
346 * loader/FrameLoader.cpp:
347 (WebCore::FrameLoader::load):
348 (WebCore::FrameLoader::open):
349 * platform/String.cpp:
351 2007-05-24 David Hyatt <hyatt@apple.com>
353 Add two more error messages to the HTMLParser.
355 Report when the </br> -> <br> quirk is triggered.
357 Also report whenever the broken XML self-closing tag syntax is used on
358 tags that can actually have an end tag (either optional or required).
362 * html/HTMLParser.cpp:
363 (WebCore::HTMLParser::parseToken):
364 * html/HTMLParserErrorCodes.cpp:
365 (WebCore::htmlParserErrorMessageTemplate):
366 * html/HTMLParserErrorCodes.h:
368 * html/HTMLTokenizer.cpp:
369 (WebCore::HTMLTokenizer::parseTag):
370 * html/HTMLTokenizer.h:
371 (WebCore::Token::reset):
373 2007-05-24 Sam Weinig <sam@webkit.org>
377 Rename JSHTMLFrameSetCustom.cpp to JSHTMLFrameSetElementCustom.cpp
380 * WebCore.xcodeproj/project.pbxproj:
381 * bindings/js/JSHTMLFrameSetCustom.cpp: Removed.
382 * bindings/js/JSHTMLFrameSetElementCustom.cpp: Added.
384 2007-05-24 David Hyatt <hyatt@apple.com>
386 Fix for <rdar://problem/5208440> (13753)
388 REGRESSION: Raw text needs to be pulled outside of tables
392 * html/HTMLParser.cpp:
393 (WebCore::HTMLParser::handleError):
394 * html/HTMLTableColElement.cpp:
395 (WebCore::HTMLTableColElement::checkDTD):
396 * html/HTMLTableElement.cpp:
397 (WebCore::HTMLTableElement::checkDTD):
398 * html/HTMLTableRowElement.cpp:
399 (WebCore::HTMLTableRowElement::checkDTD):
400 * html/HTMLTableSectionElement.cpp:
401 (WebCore::HTMLTableSectionElement::checkDTD):
403 2007-05-24 Mitz Pettel <mitz@webkit.org>
407 - fix http://bugs.webkit.org/show_bug.cgi?id=13837
408 Separator in new <select> widget disappears when block element with border is in document.
410 Test: fast/forms/menulist-separator-painting.html
412 * platform/graphics/cg/GraphicsContextCG.cpp:
413 (WebCore::GraphicsContext::drawConvexPolygon): Changed this function to
414 actually do both filling and stroking when needed, even though all existing
415 callers set the stroke to none.
416 * rendering/RenderThemeMac.mm:
417 (WebCore::RenderThemeMac::paintMenuListButton): Added calls to set the stroke
418 style and thickness when painting the arrows and the separator.
420 2007-05-24 Timothy Hatcher <timothy@apple.com>
422 Reviewed by Sam Weinig.
424 Remove the OBJC_NEW_PROPERTIES #ifdef and only export the new @property syntax.
426 * bindings/objc/DOMObject.h:
427 * bindings/scripts/CodeGeneratorObjC.pm:
429 2007-05-24 Sam Weinig <sam@webkit.org>
433 Uncomment HTMLFramesSetElement constructor now that it exists.
435 * page/DOMWindow.idl:
437 2007-05-24 Anders Carlsson <andersca@apple.com>
439 Try fixing the buildbot build.
441 * loader/ImageDocument.cpp:
442 (WebCore::ImageDocument::resizeImageToFit):
443 (WebCore::ImageDocument::imageClicked):
445 2007-05-24 Sam Weinig <sam@webkit.org>
449 Patch for http://bugs.webkit.org/show_bug.cgi?id=13853
450 Autogenerate the JS bindings for the HTMLFrameSetElement
452 * DerivedSources.make:
454 * WebCore.xcodeproj/project.pbxproj:
455 * bindings/js/JSHTMLElementWrapperFactory.cpp:
456 * bindings/js/JSHTMLFrameSetCustom.cpp: Added.
457 (WebCore::JSHTMLFrameSetElement::canGetItemsForName):
458 (WebCore::JSHTMLFrameSetElement::nameGetter):
459 * bindings/js/kjs_html.cpp:
461 (KJS::JSHTMLElement::classInfo):
462 (KJS::JSHTMLElement::accessors):
463 (KJS::JSHTMLElement::getOwnPropertySlot):
464 * bindings/js/kjs_html.h:
465 (KJS::JSHTMLElement::):
466 * html/HTMLFrameSetElement.idl:
468 2007-05-24 Zack Rusin <zrusin@trolltech.com>
472 Fixing check for incorrent font size - it should
473 check fixed not normal.
476 (WebCore::Settings::setDefaultFixedFontSize):
478 2007-05-24 Mitz Pettel <mitz@webkit.org>
480 Speculative buildbot build fix.
482 * css/cssstyleselector.cpp:
483 (WebCore::CSSStyleSelector::applyProperty):
485 2007-05-24 Adam Roben <aroben@apple.com>
487 Made Chrome::addMessageToConsole more flexible
489 addMessageToConsole now takes two additional parameters to specify the
490 message source (HTML, JS, CSS, XML) and level (error, warning, log). To
491 maintain our old behavior, all current messages were given
492 JSMessageSource and ErrorMessageLevel parameters. Messages matching
493 these characteristics are passed up to the ChromeClient.
497 * bindings/js/JSCustomXPathNSResolver.cpp:
498 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
499 * bindings/js/kjs_events.cpp:
500 (KJS::JSAbstractEventListener::handleEvent):
501 * bindings/js/kjs_proxy.cpp:
502 (WebCore::KJSProxy::evaluate):
503 * bindings/js/kjs_window.cpp:
504 (KJS::Window::isSafeScript):
505 (KJS::ScheduledAction::execute):
506 * html/HTMLParser.cpp:
507 (WebCore::HTMLParser::reportErrorToConsole):
508 * ksvg2/misc/SVGDocumentExtensions.cpp:
509 (WebCore::SVGDocumentExtensions::reportWarning):
510 (WebCore::SVGDocumentExtensions::reportError):
511 * loader/FrameLoader.cpp:
512 (WebCore::FrameLoader::reportLocalLoadFailed):
514 (WebCore::Chrome::addMessageToConsole):
517 * xml/xmlhttprequest.cpp:
518 (WebCore::XMLHttpRequest::setRequestHeader):
520 2007-05-24 David Hyatt <hyatt@apple.com>
522 Rework how HTML handles line numbering so that it is not fooled by
523 \r without a following \n and so that document.write doesn't lead
524 to line numbering confusion.
528 * html/HTMLParser.cpp:
529 (WebCore::HTMLParser::reportErrorToConsole):
530 * html/HTMLTokenizer.cpp:
531 (WebCore::HTMLTokenizer::processListing):
532 (WebCore::HTMLTokenizer::parseSpecial):
533 (WebCore::HTMLTokenizer::parseComment):
534 (WebCore::HTMLTokenizer::parseServer):
535 (WebCore::HTMLTokenizer::parseProcessingInstruction):
536 (WebCore::HTMLTokenizer::parseText):
537 (WebCore::HTMLTokenizer::parseEntity):
538 (WebCore::HTMLTokenizer::parseTag):
539 (WebCore::HTMLTokenizer::write):
540 (WebCore::HTMLTokenizer::processToken):
541 (WebCore::HTMLTokenizer::setSrc):
542 * html/HTMLTokenizer.h:
543 (WebCore::HTMLTokenizer::lineNumberPtr):
544 * html/HTMLViewSourceDocument.cpp:
545 (WebCore::HTMLViewSourceDocument::addLine):
546 * loader/TextDocument.cpp:
547 (WebCore::TextTokenizer::write):
548 * platform/SegmentedString.cpp:
549 (WebCore::SegmentedString::SegmentedString):
550 (WebCore::SegmentedString::operator=):
551 (WebCore::SegmentedString::clear):
552 * platform/SegmentedString.h:
553 (WebCore::SegmentedString::SegmentedString):
554 (WebCore::SegmentedString::advance):
555 (WebCore::SegmentedString::escaped):
557 2007-05-23 David Hyatt <hyatt@apple.com>
559 Make the delete/InsertRows/Cells methods as well as the rowIndex method
560 able to work properly even when whitespace or comment nodes are present.
564 fast/table/rowindex-comment-nodes.html
566 * html/HTMLTableRowElement.cpp:
567 (WebCore::HTMLTableRowElement::rowIndex):
568 (WebCore::HTMLTableRowElement::insertCell):
569 (WebCore::HTMLTableRowElement::deleteCell):
570 * html/HTMLTableSectionElement.cpp:
571 (WebCore::HTMLTableSectionElement::insertRow):
572 (WebCore::HTMLTableSectionElement::deleteRow):
574 2007-05-23 David Hyatt <hyatt@apple.com>
576 <optgroup> should allow <script> and text nodes inside it, just like
581 fast/forms/stuff-on-my-optgroup.html
583 * html/HTMLOptGroupElement.cpp:
584 (WebCore::HTMLOptGroupElement::checkDTD):
585 * html/HTMLSelectElement.cpp:
586 (WebCore::HTMLSelectElement::checkDTD):
588 2007-05-23 David Hyatt <hyatt@apple.com>
590 Framesets should allow whitespace text nodes as children.
594 * html/HTMLFrameSetElement.cpp:
595 (WebCore::HTMLFrameSetElement::checkDTD):
597 2007-05-24 Mark Rowe <mrowe@apple.com>
599 Fix the Qt build after r21685.
601 * platform/qt/CursorQt.cpp:
602 (WebCore::notAllowedCursor):
603 (WebCore::zoomInCursor):
604 (WebCore::zoomOutCursor):
606 2007-05-23 Alp Toker <alp.toker@collabora.co.uk>
610 Fix the gdk build following changes in r21685.
612 * platform/gdk/CursorGdk.cpp:
613 (WebCore::zoomInCursor):
614 (WebCore::zoomOutCursor):
616 2007-05-23 David Hyatt <hyatt@apple.com>
618 Fix for <rdar://problem/5222611> REGRESSION: Paint ordering problems at
619 http://buymeasoda.com/dev/issues/image_onload/image_onload.html
621 Clamp z-index so that values that exceed maxint (or that are below minint)
622 are clamped to those values.
626 * css/cssstyleselector.cpp:
627 (WebCore::CSSStyleSelector::applyProperty):
629 2007-05-23 Mitz Pettel <mitz@webkit.org>
631 Reviewed by David Hyatt.
633 - fix http://bugs.webkit.org/show_bug.cgi?id=13563
634 REGRESSION: Crash loading message in Yahoo! Mail
636 Tests: fast/css/stale-style-selector-crash-1.html
637 fast/css/stale-style-selector-crash-2.html
640 (WebCore::Document::Document): Initialize the m_didCalculateStyleSelector
642 (WebCore::Document::updateStyleSelector): Do not bail out if we have ever
643 calculated a non-trivial style selector, even if at the moment we are
644 pending style sheets. We could have calculated a non-trivial selector
645 already either because at some point there were no pending style sheets
646 (so the currently pending ones were added dynamically) or because we were
647 forced to do a layout ignoring pending style sheets. Either way, once
648 there is a style selector, we need to keep it up to date, otherwise we can
649 crash under recalcStyle() during updateRendering() or simply not recalculate
650 style correctly for dynamic changes.
651 (WebCore::Document::recalcStyleSelector): Set m_didCalculateStyleSelector
652 to 'true' when creating a new style selector.
655 2007-05-23 Anders Carlsson <andersca@apple.com>
659 <rdar://problem/5224749> Show a zoom/unzoom cursor for resizable image documents
661 * WebCore.xcodeproj/project.pbxproj:
662 Install the zoom cursors.
664 * loader/ImageDocument.cpp:
665 (WebCore::ImageDocument::resizeImageToFit):
666 Set the cursor to the zoom in cursor.
668 (WebCore::ImageDocument::restoreImageSize):
669 If the image fits, reset the cursor. Otherwise, set it to the zoom in cursor.
671 2007-05-23 Darin Adler <darin@apple.com>
675 - fix problems where unrendered nodes were affecting on plain text serialization
677 * editing/TextIterator.cpp:
678 (WebCore::TextIterator::advance): Don't call handleXXX functions or exitNode for
679 nodes without renderers.
680 (WebCore::shouldEmitNewlineAfterNode): Only consider rendered nodes when deciding
681 if this is the last node in the document.
683 2007-05-23 Anders Carlsson <andersca@apple.com>
687 <rdar://problem/3663808> Resize large images to fit in the browser window
690 Add new settings method.
692 * loader/ImageDocument.cpp:
693 (WebCore::ImageEventListener::ImageEventListener):
694 New class that handles resize events and click events and forwards them to the image document.
696 (WebCore::ImageTokenizer::ImageTokenizer):
697 (WebCore::ImageTokenizer::writeRawData):
698 (WebCore::ImageTokenizer::finish):
699 (WebCore::ImageDocument::ImageDocument):
700 (WebCore::ImageDocument::createDocumentStructure):
701 (WebCore::ImageDocument::cachedImage):
702 Let the ImageDocument class keep track of its document structure.
704 (WebCore::ImageDocument::scale):
705 Returns the scale that should be used when resizing the image.
707 (WebCore::ImageDocument::resizeImage):
708 Update the image size.
710 (WebCore::ImageDocument::imageClicked):
711 Toggle between resized and not resized. When restoring the size, scroll the image so that the area under
712 the mouse stays the same.
714 (WebCore::ImageDocument::imageChanged):
715 When the image size is known, resize the image if needed.
717 (WebCore::ImageDocument::restoreImageSize):
718 Restore the image size.
720 (WebCore::ImageDocument::imageNeedsResizing):
721 Return whether the image is too big for its window or not.
723 (WebCore::ImageDocument::windowSizeChanged):
724 Called when the window's size changes. Determine if the window fits or not and resize it if it doesn't fit.
726 (WebCore::ImageEventListener::handleEvent):
727 Forward events to the image document.
730 (WebCore::Settings::Settings):
731 (WebCore::Settings::setEnableAutomaticImageResizing):
733 (WebCore::Settings::enableAutomaticImageResizing):
736 2007-05-23 Anders Carlsson <andersca@apple.com>
740 Add -webkit-zoom-in and -webkit-zoom-out cursors.
742 * Resources/zoomInCursor.png: Added.
743 * Resources/zoomOutCursor.png: Added.
744 * css/CSSComputedStyleDeclaration.cpp:
745 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
746 * css/CSSValueKeywords.in:
747 * page/EventHandler.cpp:
748 (WebCore::selectCursor):
750 * platform/mac/CursorMac.mm:
751 (WebCore::zoomInCursor):
752 (WebCore::zoomOutCursor):
753 * rendering/RenderStyle.h:
756 2007-05-23 Sam Weinig <sam@webkit.org>
760 Part one of patch for http://bugs.webkit.org/show_bug.cgi?id=13830
761 Auto-generate JS DOM bindings for HTMLDocument and most of the rest
764 - Just the HTMLElement part.
766 * bindings/js/kjs_html.cpp:
767 (KJS::JSHTMLElement::getValueProperty):
768 (KJS::JSHTMLElement::putValueProperty):
769 * bindings/js/kjs_html.h:
770 (KJS::JSHTMLElement::):
771 * html/HTMLElement.idl:
773 2007-05-22 Kevin McCullough <kmccullough@apple.com>
777 - rdar://problem/5183523
778 - We now check the document's URL to see if it can load a resource in the case of a URL click, instead of checking the referrer, which is blank for local files.
780 * loader/FrameLoader.cpp:
781 (WebCore::FrameLoader::load):
782 (WebCore::FrameLoader::open):
783 * platform/PlatformString.h:
784 (WebCore::debugPrintString):
786 2007-05-23 Sam Weinig <sam@webkit.org>
790 Part two of patch for http://bugs.webkit.org/show_bug.cgi?id=13830
791 Auto-generate JS DOM bindings for HTMLDocument and most of the rest
794 - Just the HTMLDocument part.
797 * WebCore.xcodeproj/project.pbxproj:
798 * bindings/js/JSHTMLDocumentCustom.cpp: Added.
799 (WebCore::JSHTMLDocument::canGetItemsForName):
800 (WebCore::JSHTMLDocument::nameGetter):
801 (WebCore::JSHTMLDocument::all):
802 (WebCore::JSHTMLDocument::setAll):
803 (WebCore::JSHTMLDocument::location):
804 (WebCore::JSHTMLDocument::setLocation):
805 (WebCore::JSHTMLDocument::open):
806 (WebCore::writeHelper):
807 (WebCore::JSHTMLDocument::write):
808 (WebCore::JSHTMLDocument::writeln):
809 (WebCore::JSHTMLDocument::clear):
810 * bindings/js/kjs_dom.cpp:
812 * bindings/js/kjs_dom.h:
813 * bindings/js/kjs_html.cpp:
814 * bindings/js/kjs_html.h:
815 * bindings/objc/DOMPrivate.h:
816 * bindings/scripts/CodeGeneratorJS.pm: Add [Deletable] property
817 for Document.all and fix HasOverridingNameGetter to allow correct
820 (WebCore::Document::plugins): adds alias to embeds() for bindings
822 * html/HTMLDocument.cpp:
823 (WebCore::HTMLDocument::width):
824 (WebCore::HTMLDocument::height):
825 (WebCore::HTMLDocument::dir):
826 (WebCore::HTMLDocument::setDir):
827 (WebCore::HTMLDocument::designMode):
828 (WebCore::HTMLDocument::setDesignMode):
829 (WebCore::HTMLDocument::bgColor):
830 (WebCore::HTMLDocument::setBgColor):
831 (WebCore::HTMLDocument::fgColor):
832 (WebCore::HTMLDocument::setFgColor):
833 (WebCore::HTMLDocument::alinkColor):
834 (WebCore::HTMLDocument::setAlinkColor):
835 (WebCore::HTMLDocument::linkColor):
836 (WebCore::HTMLDocument::setLinkColor):
837 (WebCore::HTMLDocument::vlinkColor):
838 (WebCore::HTMLDocument::setVlinkColor):
839 (WebCore::HTMLDocument::captureEvents):
840 (WebCore::HTMLDocument::releaseEvents):
841 * html/HTMLDocument.h:
842 * html/HTMLDocument.idl:
844 2007-05-23 David Hyatt <hyatt@apple.com>
846 Fix for <rdar://problem/5221838> REGRESSION (r21581): no content in idisk
849 Back out the change to make self-closed <script/> into a Dashboard quirk
854 * html/HTMLTokenizer.cpp:
855 (WebCore::HTMLTokenizer::parseTag):
857 2007-05-23 Patti <patti@apple.com>
859 Reviewed by David Harrison.
861 <rdar://problem/5078453> AXNext/PrevLineEndTextMarkerForTextMarker returns kAXErrorNoValue for attachment range
863 Floating objects, such as aligned images, are not included as part of any line. So when the given
864 text marker is on the floating object, the returned line edge cannot be found and asserts are fired.
865 In addition, this paints an inconsistent text layout (in the accessibility sense) of where the floating
866 object resides. Character/word methods report floating object at the beginning of the text line(s). Yet
867 line methods never present floating objects anywhere.
868 To fix this, the ax line methods will now do more checking to ensure floating object nodes are included
869 when determining the line range/position. That way, assistive apps won't get stuck using the line methods
872 * bridge/mac/WebCoreAXObject.mm:
873 (updateAXLineStartForVisiblePosition):
874 Added a helper method to adjust line start position to account for floating objects
875 (-[WebCoreAXObject doAXLeftLineTextMarkerRangeForTextMarker:]):
876 (-[WebCoreAXObject doAXRightLineTextMarkerRangeForTextMarker:]):
877 (-[WebCoreAXObject doAXNextLineEndTextMarkerForTextMarker:]):
878 (-[WebCoreAXObject doAXPreviousLineStartTextMarkerForTextMarker:]):
879 Fixed up line routines to include floating object nodes in line position calculation.
880 startOfLine/endOLine may return null for position next to a floating position. So now there's extra checks to prevent
881 returning null line position/ranges back to AX.
884 2007-05-23 Simon Hausmann <hausmann@kde.org>
886 Reviewed by Zack, discussed also with Lars.
888 Make it possible to have per-QWebPage network interface
891 * platform/network/qt/ResourceHandleQt.cpp:
892 (WebCore::ResourceHandle::start): Pass the page's network interface to
895 2007-05-23 Rob Buis <buis@kde.org>
897 Reviewed by Dave Hyatt.
899 http://bugs.webkit.org/show_bug.cgi?id=13174
900 line-height in font shorthand does not override a previously stated line-height property
902 Make sure line-height is calculated against definite font-size and
903 uses the last set line-height, ie. directly or through font shorthand.
905 * css/cssstyleselector.cpp:
906 (WebCore::CSSStyleSelector::styleForElement):
907 (WebCore::CSSStyleSelector::pseudoStyleForElement):
908 (WebCore::CSSStyleSelector::applyDeclarations):
909 (WebCore::CSSStyleSelector::applyProperty):
910 * css/cssstyleselector.h:
912 2007-05-23 Lars Knoll <lars@trolltech.com>
914 Reviewed by Zack and Valgrind
918 * platform/qt/PlatformMouseEventQt.cpp:
919 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
921 2007-05-23 Rob Buis <buis@kde.org>
925 http://bugs.webkit.org/show_bug.cgi?id=13784
926 REGRESSION (r13744-13750): Crash with empty gradient when drawing to canvas
928 Fix crash by testing for zero stops, and returning transparent black
931 * html/CanvasGradient.cpp:
932 (WebCore::CanvasGradient::getColor):
934 2007-05-23 Rob Buis <buis@kde.org>
938 http://bugs.webkit.org/show_bug.cgi?id=13801
939 Crash when loading nonexisting symbol
941 Check for referenced element and when not found just return.
943 * ksvg2/svg/SVGUseElement.cpp:
944 (WebCore::SVGUseElement::buildPendingResource):
946 2007-05-22 Sam Weinig <sam@webkit.org>
948 Rubber stamped by Adam.
952 * bindings/js/JSHTMLAnchorElementCustom.cpp:
954 2007-05-22 Sam Weinig <sam@webkit.org>
958 Patch for http://bugs.webkit.org/show_bug.cgi?id=13833
959 Add ObjC DOM binding for HTMLMarqeeElement
961 - Also adds missing DOMHTMLFramePrivate.
963 * DerivedSources.make:
964 * WebCore.xcodeproj/project.pbxproj:
965 * bindings/objc/DOM.mm:
966 (WebCore::createElementClassMap):
967 * bindings/objc/DOMHTML.h:
968 * bindings/objc/DOMInternal.h:
969 * bindings/objc/DOMPrivate.h:
970 * bindings/objc/PublicDOMInterfaces.h:
972 2007-05-22 Justin Garcia <justin.garcia@apple.com>
974 Reviewed by darin, who found the fix independently.
976 http://bugs.webkit.org/show_bug.cgi?id=13804
977 REGRESSION(r21611): Several new layout test pixel failures (misspelling markers)
979 r21611 exposed a bug in the way removeMarkers computes
980 the end of the range to remove markers from. It also
981 introduced a bug: removeMarkers expects a startOffset
982 and a length, not a startOffset and an endOffset (added
986 (WebCore::Document::removeMarkers): The other removeMarkers
987 expects a startOffset and a length, not a startOffset and
989 (WebCore::Document::removeMarkers): Fixed the endOffset
990 from length and startOffset calculation.
992 2007-05-22 David Hyatt <hyatt@apple.com>
994 Fix for bug 13802, background colors can't be reset to default
995 color. Fix the value cssText method to do the right thing for background
996 and background-position values.
1000 fast/dom/background-shorthand-csstext.html
1002 * css/CSSInitialValue.h:
1003 (WebCore::CSSInitialValue:::m_implicit):
1004 (WebCore::CSSInitialValue::isImplicitInitialValue):
1005 * css/CSSMutableStyleDeclaration.cpp:
1006 (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
1007 (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
1008 * css/CSSMutableStyleDeclaration.h:
1010 (WebCore::CSSValue::isImplicitInitialValue):
1011 * css/cssparser.cpp:
1012 (WebCore::CSSParser::parseValue):
1013 (WebCore::CSSParser::parseBackgroundShorthand):
1014 (WebCore::CSSParser::parseShorthand):
1016 2007-05-22 Darin Adler <darin@apple.com>
1020 - fix <rdar://problem/5215830> REGRESSION: ebay.com layout is wrong
1022 The code on ebay was looking for the "document" property on a iframe.
1023 We changed that to be the ownerDocument rather than the contentDocument,
1024 which was not what ebay was expecting. The best fix seems to be removing
1025 the document property altogether.
1027 Test: fast/dom/iframe-document.html
1029 * bindings/js/kjs_html.h: Remove ElementDocument.
1030 * bindings/js/kjs_html.cpp: (KJS::JSHTMLElement::getValueProperty): Ditto.
1032 2007-05-22 Adele Peterson <adele@apple.com>
1036 A little cleanup from my last checkin.
1038 * page/Chrome.h: Formatting change.
1039 * page/mac/ChromeMac.mm: Fixed copyright.
1041 2007-05-22 Adele Peterson <adele@apple.com>
1045 Fix for http://bugs.webkit.org/show_bug.cgi?id=13796
1046 Crash in [NSInputContext currentInputContext] when you click on this map
1048 This is another case of <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
1050 Test: fast/frames/frame-display-none-focus.html
1052 * WebCore.xcodeproj/project.pbxproj: Added ChromeMac.mm
1054 * page/mac/ChromeMac.mm: Added.
1055 (WebCore::Chrome::focusNSView): Moved code from Widget::setFocus so it can be used whenever we need to make a view the first responder.
1056 * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::focusDocumentView): Calls focusNSView.
1057 * platform/mac/WidgetMac.mm: (WebCore::Widget::setFocus): Calls focusNSView.
1059 2007-05-22 Justin Garcia <justin.garcia@apple.com>
1063 <rdar://problem/4875189>
1064 List is deleted when replacing contents with Chinese/Japanese characters
1066 * editing/htmlediting.cpp:
1067 (WebCore::isSpecialElement): Lists are no longer special.
1068 They can be removed by removing their content and then
1069 then hitting delete inside of the empty list item that's
1070 left over. Even when that list item is the first thing
1071 in the editable region.
1073 2007-05-22 Darin Adler <darin@apple.com>
1075 Reviewed by Tim Hatcher.
1077 - fix <rdar://problem/5206089> REGRESSION: hovering over amazon.com "product categories"
1078 tab makes page content disappear
1080 The contentWindow property was doing a cross-frame security check, but it shouldn't.
1081 Window objects are responsible for protecting themselves from cross-frame activity.
1082 Because contentWindow returned undefined, we then ended up setting visibility on the
1083 body of the main frame to "hidden".
1085 No layout test yet. When we make cross-domain tests, we should include this one.
1087 * html/HTMLFrameElement.idl: Removed CheckFrameSecurity attribute from contentWindow.
1088 * html/HTMLIFrameElement.idl: Ditto.
1090 2007-05-22 Justin Garcia <justin.garcia@apple.com>
1094 <rdar://problem/5213963>
1095 REGRESSION(r21467): Active selection remains in text field after clicking on a button
1097 * page/EventHandler.cpp:
1098 (WebCore::EventHandler::dispatchMouseEvent): Call
1099 FocusController::setFocusedNode, because Document::setFocusedNode
1100 no longer clears the selection.
1101 Begin passing the new focused frame to
1102 FocusController::setFocusedNode, because when the
1103 new focus node is null, the selection should only be
1104 cleared if the focused frame isn't changing.
1105 (WebCore::Element::focus): Begin passing the new focused
1107 (WebCore::Element::blur): Ditto.
1108 * html/HTMLInputElement.cpp:
1109 (WebCore::HTMLInputElement::focus): Ditto.
1110 * html/HTMLTextAreaElement.cpp:
1111 (WebCore::HTMLTextAreaElement::focus): Ditto.
1113 (WebCore::Frame::setFocusedNodeIfNeeded): Ditto.
1114 * page/FocusController.cpp:
1115 (WebCore::clearSelectionIfNeeded): Take in the new
1116 focused frame. If it's not changing, don't clear the
1118 (WebCore::FocusController::setFocusedNode): Take
1119 in the new focused frame.
1120 * page/FocusController.h:
1122 2007-05-22 Marius Bugge Monsen <mbm@trolltech.com>
1126 Implement some more functions in ClipboardQt.
1128 * platform/qt/ClipboardQt.cpp:
1129 (WebCore::ClipboardQt::ClipboardQt):
1130 (WebCore::ClipboardQt::getData):
1131 (WebCore::ClipboardQt::setData):
1132 (WebCore::ClipboardQt::types):
1134 2007-05-21 Oliver Hunt <oliver@apple.com>
1138 Fix for http://bugs.webkit.org/show_bug.cgi?id=13789
1139 -- SVGLocatable::getScreenCTM() faulty
1141 Needed to update SVGLength to handle the case where the SVGElement is
1142 not the root document element -- we do this by falling back on the
1143 renderer for the context.
1145 For <svg> elements embedded as mixed content in xhtml we consider the
1146 absolutePosition of the parent to be the origin for the <svg> element.
1148 * ksvg2/svg/SVGLength.cpp:
1149 (WebCore::SVGLength::PercentageOfViewport):
1150 * ksvg2/svg/SVGSVGElement.cpp:
1151 (WebCore::SVGSVGElement::getScreenCTM):
1153 2007-05-21 Timothy Hatcher <timothy@apple.com>
1157 <rdar://problem/5084400> -[DOMRange lineBoxRects] returns an empty array when the DOM nodes have just been created
1159 Do a updateLayoutIgnorePendingStylesheets before asking the Node or Range for it's box rects.
1161 * bindings/objc/DOM.mm:
1162 (-[DOMNode boundingBox]):
1163 (-[DOMNode lineBoxRects]):
1164 (-[DOMRange boundingBox]):
1165 (-[DOMRange lineBoxRects]):
1167 2007-05-21 Sam Weinig <sam@webkit.org>
1169 Reviewed by George Staikos.
1173 * WebCore.pro: add missing IDL files.
1175 2007-05-21 Sam Weinig <sam@webkit.org>
1179 Patch for http://bugs.webkit.org/show_bug.cgi?id=13803
1180 Autogenerate the JS bindings for the HTMLMarqueeElement.
1182 * DerivedSources.make:
1183 * WebCore.xcodeproj/project.pbxproj:
1184 * bindings/js/JSHTMLElementWrapperFactory.cpp:
1185 * bindings/js/kjs_css.cpp:
1186 (KJS::DOMCSSRule::getOwnPropertySlot): Fix possible null pointer issue.
1187 (KJS::DOMCSSRule::put): Fix possible null pointer issue.
1188 * bindings/js/kjs_html.cpp:
1190 (KJS::JSHTMLElement::classInfo):
1191 (KJS::JSHTMLElement::accessors):
1192 (KJS::JSHTMLElement::getOwnPropertySlot): Fix null pointer issue.
1193 (KJS::HTMLElementFunction::callAsFunction):
1194 (KJS::JSHTMLElement::put):
1195 * bindings/js/kjs_html.h:
1196 (KJS::JSHTMLElement::):
1197 * html/HTMLMarqueeElement.cpp:
1198 (WebCore::HTMLMarqueeElement::start):
1199 (WebCore::HTMLMarqueeElement::stop):
1200 * html/HTMLMarqueeElement.h: Add start() and stop() functions.
1201 * html/HTMLMarqueeElement.idl: Added.
1202 * page/DOMWindow.idl: Add marquee constructor.
1204 2007-05-21 Adele Peterson <adele@apple.com>
1206 Fix by Darin, reviewed by me.
1208 Fix for <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
1210 * platform/mac/WidgetMac.mm:
1211 (WebCore::safeRemoveFromSuperview): Added. If the view is the window's first responder, then
1212 set the window's first responder to nil so we don't leave the window pointing to a view that's no longer in it.
1213 (WebCore::Widget::setFocus): Don't attempt to focus the view if it has no window.
1214 (WebCore::Widget::removeFromSuperview): Call safeRemoveFromSuperview.
1215 (WebCore::Widget::afterMouseDown): ditto.
1217 2007-05-21 David Hyatt <hyatt@apple.com>
1219 Make a line gutter backdrop so that tiny view source docs don't look
1224 * css/view-source.css:
1225 * html/HTMLViewSourceDocument.cpp:
1226 (WebCore::HTMLViewSourceDocument::createContainingTable):
1228 2007-05-21 David Hyatt <hyatt@apple.com>
1230 Make sure to distinguish between links to internal resources and
1231 real links (anchors) in view source mode.
1235 * css/view-source.css:
1236 * html/HTMLViewSourceDocument.cpp:
1237 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1238 (WebCore::HTMLViewSourceDocument::addLink):
1239 * html/HTMLViewSourceDocument.h:
1241 2007-05-21 Sam Weinig <sam@webkit.org>
1243 Reviewed by Adam and Darin.
1245 Patch for http://bugs.webkit.org/show_bug.cgi?id=13791
1246 Autogenerate the JS bindings for the HTMLIFrameElement and HTMLFrameElement.
1248 * DerivedSources.make:
1249 * WebCore.xcodeproj/project.pbxproj:
1250 * bindings/js/JSHTMLAnchorElementCustom.cpp:
1251 * bindings/js/JSHTMLElementWrapperFactory.cpp:
1252 * bindings/js/kjs_html.cpp:
1254 (KJS::JSHTMLElement::classInfo):
1255 (KJS::JSHTMLElement::accessors):
1256 (KJS::HTMLElementFunction::callAsFunction):
1257 * bindings/js/kjs_html.h:
1258 (KJS::JSHTMLElement::):
1259 * bindings/scripts/CodeGeneratorJS.pm:
1260 * html/HTMLFrameElement.idl:
1261 * html/HTMLFrameElementBase.cpp:
1262 (WebCore::HTMLFrameElementBase::location):
1263 * html/HTMLFrameElementBase.h:
1264 * html/HTMLFrameOwnerElement.h:
1265 (WebCore::HTMLFrameOwnerElement::contentWindow):
1266 * html/HTMLIFrameElement.idl:
1267 * page/DOMWindow.idl:
1269 2007-05-21 Lars Knoll <lars@trolltech.com>
1273 Remove the ResourceHandleManager class, it is now part of
1274 QWebNetworkInterface. Adapt ResourceHandle to the new way
1278 * platform/network/ResourceHandleInternal.h:
1279 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1280 * platform/network/qt/ResourceHandleManagerKDE.cpp: Removed.
1281 * platform/network/qt/ResourceHandleManagerKDE.h: Removed.
1282 * platform/network/qt/ResourceHandleManagerQt.cpp: Removed.
1283 * platform/network/qt/ResourceHandleManagerQt.h: Removed.
1284 * platform/network/qt/ResourceHandleQt.cpp:
1285 (WebCore::ResourceHandle::~ResourceHandle):
1286 (WebCore::ResourceHandle::start):
1287 (WebCore::ResourceHandle::cancel):
1289 2007-05-21 David Hyatt <hyatt@apple.com>
1291 Second half of fix for 13793, make sure rules=groups works properly with
1294 Also make sure colgroups get an actual span of 1 (instead of incorrectly
1295 giving them a span of 0).
1299 fast/table/colgroup-spanning-groups-rules.html
1301 * html/HTMLTableColElement.cpp:
1302 (WebCore::HTMLTableColElement::HTMLTableColElement):
1303 * rendering/RenderTable.cpp:
1304 (WebCore::RenderTable::colElement):
1305 * rendering/RenderTable.h:
1306 * rendering/RenderTableCell.cpp:
1307 (WebCore::RenderTableCell::collapsedLeftBorder):
1308 (WebCore::RenderTableCell::collapsedRightBorder):
1310 2007-05-20 David Hyatt <hyatt@apple.com>
1312 Half of a fix for 13793, make sure rules=groups and border behave properly
1317 No tests added, two Mozilla table tests now pass that failed before.
1319 * html/HTMLTableElement.cpp:
1320 (WebCore::HTMLTableElement::getSharedCellDecl):
1322 2007-05-20 Brady Eidson <beidson@apple.com>
1324 Reviewed by Geoose Garen
1326 <rdar://problem/4758919> - Incorrect favicon shown for URL after going back
1328 When restoring a cached page, we'd try to kick off the icon load for it, which ended up causing
1329 shenanigans with the icon url -> page url mapping.
1331 * loader/FrameLoader.cpp:
1332 (WebCore::FrameLoader::endIfNotLoading): Only try an icon load if we're not restoring from the page cache
1333 (WebCore::FrameLoader::startIconLoader): Added helpful logging that helped me track this down
1334 (WebCore::FrameLoader::commitIconURLToIconDatabase): Ditto (and fixed a comment typo)
1336 * loader/icon/IconLoader.cpp:
1337 (WebCore::IconLoader::stopLoading): Don't null out the ResourceLoader here, as clearLoadingState() does that
1338 (WebCore::IconLoader::finishLoading): Added helpful logging that helped me track this down
1341 2007-05-20 Darin Adler <darin@apple.com>
1343 Reviewed by Oliver Hunt.
1345 - fix <rdar://problem/5193416> REGRESSION: Selection on large pages extremely slow
1347 * dom/Document.cpp: (WebCore::Document::removeMarkers): Added an early exit for the common
1348 case where there are no markers. Changed code to iterate over all the nodes in the range
1349 instead of using TextIterator, which is more efficient.
1351 * page/Frame.cpp: (WebCore::Frame::respondToChangedSelection): Added checks for editable,
1352 so we don't bother doing work related to spell checking and grammar checking when changing
1353 the selection in non-editable text. Also rearranged the code so we only compute the old
1354 word boundaries and sentence boundaries when actually needed, and don't do the sentence
1355 range checks unless grammar checking is enabled.
1357 * platform/TextBreakIteratorICU.cpp:
1358 (WebCore::setUpIterator): Don't take a locale parameter. Always pass in currentTextBreakLocaleID.
1359 (WebCore::characterBreakIterator): Removed local parameter.
1360 (WebCore::wordBreakIterator): Ditto.
1361 (WebCore::lineBreakIterator): Ditto.
1362 (WebCore::sentenceBreakIterator): Ditto.
1364 * platform/mac/TextBreakIteratorInternalICUMac.mm:
1365 (WebCore::getTextBreakLocale): Broke out the code to actually get the locale.
1366 (WebCore::currentTextBreakLocaleID): This function now handles only the caching and calls
1367 getTextBreakLocale to actually figure it out.
1369 * editing/visible_units.cpp: Added lots of FIXME comments, but no code change.
1371 2007-05-20 Adam Treat <adam@staikos.net>
1373 Add -f to cp to deal with some obscure build environments.
1375 Reviewed by George Staikos.
1377 * move-js-headers.sh:
1379 2007-05-20 Adam Treat <adam@staikos.net>
1381 Add missing include for auto_ptr
1383 Reviewed by George Staikos.
1385 * platform/graphics/ImageBuffer.h:
1387 2007-05-19 David Hyatt <hyatt@apple.com>
1389 Fix for bug 13785, O(n^2) counter creation.
1393 * rendering/RenderCounter.cpp:
1394 (WebCore::findPlaceForCounter):
1395 (WebCore::RenderCounter::originalText):
1397 2007-05-19 Mitz Pettel <mitz@webkit.org>
1399 Reviewed by Dave Hyatt.
1401 - fix http://bugs.webkit.org/show_bug.cgi?id=12729
1402 box-shadow disappears when scrolling a div that it falls on/under
1404 Tests: fast/repaint/box-shadow-dynamic.html
1405 fast/repaint/box-shadow-h.html
1406 fast/repaint/box-shadow-v.html
1408 * rendering/InlineFlowBox.cpp:
1409 (WebCore::InlineFlowBox::placeBoxesHorizontally): Factor in box shadow.
1410 (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
1411 (WebCore::InlineFlowBox::paint): Account for box shadow when checking if
1412 the damage rect intersects.
1413 * rendering/RenderBlock.cpp:
1414 (WebCore::RenderBlock::overflowHeight): For overflow areas, when asked
1415 for the "exterior" overflow, add box shadow overflow.
1416 (WebCore::RenderBlock::overflowWidth): Ditto.
1417 (WebCore::RenderBlock::overflowLeft): Ditto.
1418 (WebCore::RenderBlock::overflowTop): Ditto.
1419 (WebCore::RenderBlock::overflowRect): Ditto.
1420 (WebCore::RenderBlock::layoutBlock): Factor box shadow into visual overflow.
1421 * rendering/RenderFlexibleBox.cpp:
1422 (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
1423 * rendering/RenderFlow.cpp:
1424 (WebCore::RenderFlow::lowestPosition): For overflow areas, when asked for
1425 the "exterior" extreme position, add box shadow.
1426 (WebCore::RenderFlow::rightmostPosition): Ditto.
1427 (WebCore::RenderFlow::leftmostPosition): Ditto.
1428 * rendering/RenderLayer.cpp:
1429 (WebCore::RenderLayer::calculateRects): Avoid clipping out box shadow.
1430 * rendering/RenderObject.cpp:
1431 (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Make sure to paint
1432 the box shadow when an edge with a shadow moves.
1433 (WebCore::RenderObject::adjustRectForOutlineAndShadow): Helper function
1434 that expands a given rectangle to encompass outline and box shadow.
1435 (WebCore::RenderObject::absoluteOutlineBox): Changed to include box shadow.
1436 * rendering/RenderObject.h:
1438 2007-05-19 Mitz Pettel <mitz@webkit.org>
1440 Reviewed by Dave Hyatt.
1442 - fix http://bugs.webkit.org/show_bug.cgi?id=13783
1443 REGRESSION (r21120): Frame resizers not repainted properly when dragged
1445 * rendering/RenderFrameSet.cpp:
1446 (WebCore::RenderFrameSet::layout):
1448 2007-05-19 Mitz Pettel <mitz@webkit.org>
1452 - fix http://bugs.webkit.org/show_bug.cgi?id=13774
1453 REGRESSION: Crash emailing blog entry using Google Reader
1455 Test: fast/table/stale-grid-crash.html
1457 * rendering/RenderTable.cpp:
1458 (WebCore::RenderTable::recalcSections): Made const and replaced
1459 setNeedsLayout(true) with an assertion that the table is already
1461 (WebCore::RenderTable::sectionAbove): Added call to recalcSectionsIfNeeded().
1462 (WebCore::RenderTable::sectionBelow): Ditto.
1463 (WebCore::RenderTable::cellAbove): Ditto.
1464 (WebCore::RenderTable::cellBelow): Ditto.
1465 (WebCore::RenderTable::cellBefore): Ditto.
1466 (WebCore::RenderTable::cellAfter): Ditto.
1467 * rendering/RenderTable.h:
1468 Made some private member variables which are used in section recalc mutable.
1469 (WebCore::RenderTable::setNeedsSectionRecalc): Moved the call to
1470 setNeedsLayout() from recalcSections() into here, because I made
1471 recalcSections() const.
1472 (WebCore::RenderTable::recalcSectionsIfNeeded): Made const.
1474 2007-05-19 Mitz Pettel <mitz@webkit.org>
1478 - http://bugs.webkit.org/show_bug.cgi?id=13320
1479 rounded corners with drop shadows are really slow
1481 Test for a rendering bug fixed by this patch:
1482 fast/box-shadow/border-radius-big.html
1484 No test for the performance ingredient.
1486 * platform/graphics/GraphicsContext.cpp:
1487 (WebCore::GraphicsContext::addRoundedRectClip): Made cross-platform.
1488 Changed to use a single clipping path. If all the radii cannot be
1489 accommodated, clips to a rect.
1490 (WebCore::GraphicsContext::clipOutRoundedRect): Changed to use a single
1491 clipping path. If all the radii cannot be accommodated, clips out a rect.
1492 * platform/graphics/GraphicsContext.h: Added clipOut(const Path&).
1493 * platform/graphics/Path.cpp:
1494 (WebCore::Path::createRoundedRectangle): Added. Returns a rounded rectangle
1495 with the specified radii. If all the radii cannot be accommodated, returns
1497 * platform/graphics/Path.h:
1498 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1499 (WebCore::GraphicsContext::clipOut): Added.
1500 * platform/graphics/cg/GraphicsContextCG.cpp:
1501 (WebCore::GraphicsContext::fillRoundedRect): Changed to use a single path.
1502 (WebCore::GraphicsContext::clipOut): Added.
1503 * platform/graphics/qt/GraphicsContextQt.cpp:
1504 (WebCore::GraphicsContext::clipOut): Added.
1506 2007-05-19 Anders Carlsson <andersca@apple.com>
1510 Test: fast/frames/inline-object-inside-frameset.html
1512 http://bugs.webkit.org/show_bug.cgi?id=13771
1513 Assertion failure ASSERT(m_layer) when running Hamachi fuzz tester
1515 Don't paint inline objects.
1517 * rendering/RenderFrameSet.cpp:
1518 (WebCore::RenderFrameSet::paint):
1520 2007-05-19 David Hyatt <hyatt@apple.com>
1522 Add support for plain text MIME types (CSS/JS/TXT) to view source mode.
1523 CSS/JS will eventually tokenize via their own special tokenizers so that
1524 they can also be syntax-highlighted, but for now just treat them as
1529 * dom/DOMImplementation.cpp:
1530 (WebCore::DOMImplementation::createDocument):
1531 * html/HTMLViewSourceDocument.cpp:
1532 (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1533 (WebCore::HTMLViewSourceDocument::createTokenizer):
1534 (WebCore::HTMLViewSourceDocument::createContainingTable):
1535 (WebCore::HTMLViewSourceDocument::addViewSourceText):
1536 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1537 * html/HTMLViewSourceDocument.h:
1538 * loader/TextDocument.cpp:
1539 (WebCore::TextTokenizer::TextTokenizer):
1540 (WebCore::TextTokenizer::write):
1541 * loader/TextDocument.h:
1542 (WebCore::TextTokenizer::checkBuffer):
1544 2007-05-18 David Hyatt <hyatt@apple.com>
1546 Fix a glitch in view source mode attribute names.
1548 * html/HTMLViewSourceDocument.cpp:
1549 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1551 2007-05-18 David Hyatt <hyatt@apple.com>
1553 "Linkify" view source mode links.
1555 Reviewed by andersca
1557 * css/view-source.css:
1558 * html/HTMLViewSourceDocument.cpp:
1559 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1560 (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1561 (WebCore::HTMLViewSourceDocument::addLink):
1562 * html/HTMLViewSourceDocument.h:
1564 2007-05-18 Oliver Hunt <oliver@apple.com>
1568 No longer need to pass HTMLImageElement and HTMLImageLoader on to WebKit
1569 Need to expose CachedResourceClient constructor
1572 * WebCore.xcodeproj/project.pbxproj:
1574 2007-05-18 David Hyatt <hyatt@apple.com>
1576 Fix for <rdar://problem/5214338> REGRESSION: / mishandled in
1577 HTML tokenization (13780).
1581 * html/HTMLTokenizer.cpp:
1582 (WebCore::Token::addAttribute):
1583 (WebCore::HTMLTokenizer::parseTag):
1585 2007-05-18 Brady Eidson <beidson@apple.com>
1589 http://bugs.webkit.org/show_bug.cgi?id=12681 and
1590 <rdar://problem/5166149> - window.open() causes server to be hit twice
1592 This regressed in http://trac.webkit.org/projects/webkit/changeset/14637
1593 That patch was to fix broken behavior when opening an already existant window.
1594 The unfortunate side effect was to cause the server to be hit twice.
1595 Once during the call to frame->loader()->createWindow(), and again via a
1596 scheduled redirection.
1598 I decided to restore the original de-facto behavior by making the new window
1599 open via a scheduled redirection - there is a FIXME that was already here that
1600 explains the reason why we have to do it this way for now.
1602 Additionally, there were two distinct places that had their own logic to open
1603 a new window - the logic for window.open() and the logic for
1604 window.showModalDialog(). The logic was almost identical so I condensed them
1605 into one utility function that takes a flag to handle the slight difference.
1607 A layout test is not possible at this time since it would involve capturing
1608 server logs (the 1st connection does not exist long enough to result in any
1609 delegate callbacks). That task is documented in
1610 http://bugs.webkit.org/show_bug.cgi?id=13769
1612 * bindings/js/kjs_window.cpp:
1613 (KJS::createWindow): Merged the two slightly different versions of "creating a window"
1614 logic here. For the modal dialog case the load is an immediate call to changeLocation(),
1615 which is triggered by the "immediate" flag, and the other cases load via scheduleLocationChange()
1616 (KJS::showModalDialog): Call createWindow()
1617 (KJS::WindowFunc::callAsFunction): Handle frame targets of _top or _parent immediately and call
1618 createWindow() for all others
1620 2007-05-18 Sam Weinig <sam@webkit.org>
1624 Autogenerate the JS bindings for the HTMLTableElement, HTMLTableCaptionElement,
1625 HTMLTableCellElement, HTMLTableColElement, HTMLTableRowElement, HTMLTableSectionElement.
1627 * DerivedSources.make:
1629 * WebCore.xcodeproj/project.pbxproj:
1630 * bindings/js/JSHTMLElementWrapperFactory.cpp:
1631 (WebCore::createJSHTMLWrapper):
1632 * bindings/js/kjs_html.cpp:
1634 (KJS::JSHTMLElement::classInfo):
1635 (KJS::JSHTMLElement::accessors):
1636 (KJS::HTMLElementFunction::callAsFunction):
1637 * bindings/js/kjs_html.h:
1638 (KJS::JSHTMLElement::):
1639 * html/HTMLTableCaptionElement.idl:
1640 * html/HTMLTableCellElement.idl:
1641 * html/HTMLTableColElement.idl:
1642 * html/HTMLTableElement.idl:
1643 * html/HTMLTableRowElement.idl:
1644 * html/HTMLTableSectionElement.idl:
1645 * page/DOMWindow.idl:
1647 2007-05-18 Oliver Hunt <oliver@apple.com>
1651 Fix for <rdar://problem/5211122> DRT crash below
1652 SVGTimer::applyAnimations when page cache is enabled
1653 (SVG animation timers do not properly cancel themselves)
1655 There were still a few paths in the SVG Animation code
1656 that could cause timers to be created and used. This
1657 patch inserts addition SVG_EXPERIMENTAL blocks to prevent
1658 these timers from being used.
1660 * ksvg2/misc/SVGDocumentExtensions.cpp:
1661 (WebCore::SVGDocumentExtensions::startAnimations):
1662 * ksvg2/misc/SVGTimer.cpp:
1663 (WebCore::SVGTimer::animationsByElement):
1664 (WebCore::SVGTimer::applyAnimations):
1665 (WebCore::SVGTimer::notifyAll):
1666 (WebCore::SVGTimer::addNotify):
1667 (WebCore::SVGTimer::removeNotify):
1668 * ksvg2/misc/TimeScheduler.cpp:
1669 (WebCore::TimeScheduler::addTimer):
1670 (WebCore::TimeScheduler::connectIntervalTimer):
1671 (WebCore::TimeScheduler::disconnectIntervalTimer):
1672 (WebCore::TimeScheduler::startAnimations):
1673 (WebCore::TimeScheduler::toggleAnimations):
1674 (WebCore::TimeScheduler::timerFired):
1675 * ksvg2/svg/SVGAnimationElement.h:
1677 2007-05-18 Marius Bugge Monsen <mbm@trolltech.com>
1679 Reviewed by Zack Rusin.
1681 Return a valid pointer to a Clipboard object
1682 from newGeneralClipboard.
1684 * editing/qt/EditorQt.cpp:
1685 (WebCore::Editor::newGeneralClipboard):
1687 2007-05-18 Mark Rowe <mrowe@apple.com>
1689 Attempt to fix the Gdk build after r21562.
1691 * platform/gdk/TemporaryLinkStubs.cpp:
1692 (Widget::isEnabled):
1693 * platform/gdk/WidgetGdk.cpp:
1695 2007-05-18 Adam Treat <treat@kde.org>
1701 * platform/Widget.h:
1702 * platform/mac/WidgetMac.mm:
1703 * platform/qt/WidgetQt.cpp:
1705 2007-05-18 Holger Freyther <zecke@selfish.org>
1709 Return true to make loading of pages working again
1711 * loader/gdk/FrameLoaderClientGdk.cpp:
1712 (WebCore::FrameLoaderClientGdk::canHandleRequest):
1714 2007-05-18 Holger Freyther <zecke@selfish.org>
1718 Make WebCore::Widget use GtkWidget to fix focus handling.
1720 * WebCore.pro: Add PlatformScrollBar
1721 * platform/ScrollView.h: Gtk stuff
1722 * platform/Widget.h: Take a GtkWidget
1723 * platform/gdk/PlatformScrollBarGdk.cpp: Added.
1724 (PlatformScrollbar::PlatformScrollbar):
1725 (PlatformScrollbar::~PlatformScrollbar):
1726 (PlatformScrollbar::width):
1727 (PlatformScrollbar::height):
1728 (PlatformScrollbar::setEnabled):
1729 (PlatformScrollbar::paint):
1730 (PlatformScrollbar::updateThumbPosition):
1731 (PlatformScrollbar::updateThumbProportion):
1732 (PlatformScrollbar::setRect):
1733 * platform/gdk/ScreenGdk.cpp: Implement depth handling
1734 (WebCore::screenDepth):
1735 * platform/gdk/ScrollViewGdk.cpp: use setGtkWidget, not setDrawable
1736 (WebCore::ScrollView::setGtkWidget):
1737 * platform/gdk/TemporaryLinkStubs.cpp:
1738 * platform/gdk/WidgetGdk.cpp:
1739 (WebCore::Widget::Widget):
1740 (WebCore::Widget::gtkWidget):
1741 (WebCore::Widget::setGtkWidget):
1742 (WebCore::Widget::hasFocus):
1743 (WebCore::Widget::setFocus):
1745 2007-05-18 Lars Knoll <lars@trolltech.com>
1749 Correctly implement initialiseSupportedImageMIMETypes.
1751 * platform/MimeTypeRegistry.cpp:
1752 (WebCore::initialiseSupportedImageMIMETypes):
1753 * platform/qt/MimeTypeRegistryQt.cpp:
1756 2007-05-18 Holger Hans Peter Freyther <zecke@selfish.org>
1760 Build fix for non-Qt and non-Mac ports.
1762 * html/HTMLCanvasElement.h:
1764 2007-05-18 Holger Hans Peter Freyther <zecke@selfish.org>
1766 Reviewed by Mark Rowe.
1768 No test added as this is hard to time.
1770 * platform/gdk/FrameGdk.cpp: Use needsLayout() to decide if layout()
1773 (WebCore::FrameGdk::dumpRenderTree):
1774 (WebCore::FrameGdk::handleGdkEvent):
1776 2007-05-18 Simon Hausmann <hausmann@kde.org>
1780 * WebCore.pro: Create a pkg-config file to make it easier to locate
1783 2007-05-18 Lars Knoll <lars@trolltech.com>
1787 Remove unused handleMouseEvent methods in the Widget
1788 and derived classes.
1790 * page/EventHandler.cpp:
1791 (WebCore::EventHandler::handleMouseMoveEvent):
1792 * page/FrameView.cpp:
1794 * page/mac/EventHandlerMac.mm:
1795 (WebCore::EventHandler::mouseDragged):
1796 (WebCore::EventHandler::mouseMoved):
1797 * platform/ScrollBar.h:
1798 * platform/Widget.h:
1799 * platform/win/PlatformScrollBar.h:
1800 * platform/win/TemporaryLinkStubs.cpp:
1801 (WebCore::PlatformScrollbar::setRect):
1802 * platform/wx/PlatformScrollBar.h:
1804 2007-05-18 George Staikos <staikos@kde.org>
1808 Use the proper clipping algorithm. Might be a bit slow but we
1809 can optimize it later.
1811 * platform/graphics/qt/GraphicsContextQt.cpp:
1812 (WebCore::GraphicsContext::clip):
1814 2007-05-17 Sam Weinig <sam@webkit.org>
1816 Reviewed by George Staikos.
1818 Fix Qt build after adding JSHTMLAnchorElementCustom.cpp.
1822 2007-05-17 George Staikos <staikos@kde.org>
1826 Fix preprocessor logic for CG/QT
1828 * html/HTMLCanvasElement.cpp:
1829 (WebCore::HTMLCanvasElement::reset):
1831 2007-05-17 David Hyatt <hyatt@apple.com>
1833 Add a line gutter to view source mode. The gutter uses counters, and this exposed the fact
1834 that pseudoStyleForElement was not walking all UA rules properly.
1838 * css/cssstyleselector.cpp:
1839 (WebCore::CSSStyleSelector::pseudoStyleForElement):
1840 * css/view-source.css:
1841 * html/HTMLViewSourceDocument.cpp:
1842 (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1843 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1844 (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1845 (WebCore::HTMLViewSourceDocument::addLine):
1846 (WebCore::HTMLViewSourceDocument::addText):
1847 * html/HTMLViewSourceDocument.h:
1849 2007-05-17 Justin Garcia <justin.garcia@apple.com>
1853 <rdar://problem/5209984> REGRESSION: Crash on click after clearing Facebook status
1855 comparePositions() expects non-null positions. It's
1856 given a null position by contains() if the current
1857 selection is a range selection but contains only invisible
1858 content *and* visible positions cannot be created from its
1859 end points. This can happen when there is a range selection
1860 inside shadow content (like that inside text fields) that
1863 * editing/SelectionController.cpp:
1864 (WebCore::SelectionController::contains): Check for
1865 invisible end points.
1867 2007-05-17 Sam Weinig <sam@webkit.org>
1871 Fix for <rdar://problem/5201423> REGRESSION: Links in
1872 sidebar don't work on Honda website
1874 Anchor elements need to have the same behavior for implicit and
1875 explicit toString() calls.
1877 Test: fast/dom/anchor-toString.html
1879 * WebCore.xcodeproj/project.pbxproj:
1880 * bindings/js/JSHTMLAnchorElementCustom.cpp: Added.
1881 (WebCore::JSHTMLAnchorElement::toString):
1882 * html/HTMLAnchorElement.idl:
1884 2007-05-17 Geoffrey Garen <ggaren@apple.com>
1888 2007-05-17 Adele Peterson <adele@apple.com>
1892 Update RenderMenuList PopupClient methods to consider style of inner block.
1894 * rendering/RenderMenuList.cpp:
1895 (WebCore::RenderMenuList::itemStyle):
1896 (WebCore::RenderMenuList::clientStyle):
1898 2007-05-17 Maciej Stachowiak <mjs@apple.com>
1900 Not reviewed, emergency test fix.
1902 - avoid crash on layout tests.
1904 Patched up my last change so that widgets don't crash.
1906 * loader/FrameLoader.cpp:
1907 (WebCore::FrameLoader::mainReceivedCompleteError):
1909 2007-05-17 Antti Koivisto <antti@apple.com>
1913 Fix for http://bugs.webkit.org/show_bug.cgi?id=13727
1914 REGRESSION: Reproducible hang setting the selection's extent offset to -1
1915 <rdar://problem/5206890>
1917 Rise INDEX_SIZE_ERR if used selection index is negative. This matches HTML5 for
1918 getRangeAt() and collapse() which are part of the spec (FF throws NS_ERROR_FAILURE).
1920 Not throwing exceptions yet for too high offsets (except getRangeAt()) as it is
1921 unclear if WebCore's definition of offsets is the same as other browsers.
1923 * bindings/js/kjs_window.cpp:
1924 * WebCore/editing/SelectionController.cpp:
1925 * WebCore/editing/SelectionController.h:
1926 * WebCore/editing/VisiblePosition.cpp:
1928 2007-05-17 Adele Peterson <adele@apple.com>
1932 Fix for <rdar://problem/5096035> REGRESSION: rtl text should be left-aligned in <select>s
1934 Test: fast/text/international/bidi-menulist.html
1936 * rendering/RenderMenuList.cpp:
1937 (WebCore::RenderMenuList::adjustInnerStyle): Set the inner block style to direction: ltr, and text-align: left. This means that
1938 we will ignore those settings in the button to match the way the text is displayed in the popup menu.
1939 (WebCore::RenderMenuList::createInnerBlock): Call adjustInnerStyle.
1940 (WebCore::RenderMenuList::setStyle): ditto.
1941 * rendering/RenderMenuList.h: Added adjustInnerStyle.
1943 2007-05-17 Justin Garcia <justin.garcia@apple.com>
1945 Reviewed by harrison
1947 <rdar://problem/4924441> List becomes nested when changing its type
1948 <rdar://problem/5210032> Content before a list is placed at the end of the list when its made into a list item
1949 <rdar://problem/5207369> Crash when removing ordering from a nested list
1951 * editing/InsertListCommand.cpp:
1952 (WebCore::InsertListCommand::doApply):
1953 The outermostEnclosingList of the position before the start isn't
1954 the previousList if it contains the start.
1955 Ditto for the position after the end and the nextList.
1956 If we're putting the newly created list item into the next list,
1957 insert it at the start of that list, not the end (don't append).
1958 Avoid nesting newly created lists inside list items.
1960 2007-05-17 Patti Hoa <patti@apple.com>
1964 <rdar://problem/4775672> AXTextMarkerRangeForUnorderedTextMarkers returns incorrect order
1966 * bridge/mac/WebCoreAXObject.mm:
1967 (-[WebCoreAXObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
1968 A selection's m_start is not guranteed to equal m_base since m_start can actually be m_base's downstream().
1969 A more accurate way to determine the order from selection is to ask directly for isBaseFirst().
1970 In addition, if the two visible positions given are the same position but different affinity, we need to
1971 handle it here rather than depend on the selection. This is because selection does not retain the
1972 affinity of both selection start/end visible positions as part of the selection validation.
1974 2007-05-17 Mitz Pettel <mitz@webkit.org>
1978 - fix http://bugs.webkit.org/show_bug.cgi?id=13759
1979 REGRESSION (r20182-r20184): Incorrect rendering of multipart images
1981 Test: http/tests/multipart/invalid-image-data.html
1983 * loader/loader.cpp:
1984 (WebCore::Loader::didReceiveData): Make a copy of the current part's data
1985 instead of using the resource data, because the latter is going to be
1986 overwritten by the new part being received.
1988 2007-05-17 Oliver Hunt <oliver@apple.com>
1992 Fix for <rdar://problem/4244861> Safari fails to create image file
1993 after releasing dragged image that has changed on source page
1995 Tell xcode to copy HTMLImageElement.h and HTMLImageLoader.h headers
1996 across to WebKit as private headers.
1998 * WebCore.xcodeproj/project.pbxproj:
2000 2007-05-17 Justin Garcia <justin.garcia@apple.com>
2002 Reviewed by harrison
2004 <rdar://problem/5190926>
2005 Gmail Editor: Crash when removing list style from underlined, multi-item list
2007 The user underlined some text, then created a list.
2008 The list was placed inside the inline element carrying
2009 the underline style, so, that element surrounded the
2010 list instead of being at the lowest level (just above
2011 text nodes). This kind of markup is more difficult to
2012 edit. Filed 5192089 and added a workaround so that we
2013 don't produce this kind of markup.
2015 * editing/InsertListCommand.cpp:
2016 (WebCore::InsertListCommand::doApply): Avoid inline
2017 elements when inserting the new list.
2019 2007-05-17 David Hyatt <hyatt@apple.com>
2021 Allow redundant attributes with the same name in view source mode.
2025 * dom/NamedAttrMap.h:
2026 (WebCore::NamedAttrMap::insertAttribute):
2027 * html/HTMLTokenizer.cpp:
2028 (WebCore::Token::addAttribute):
2030 2007-05-17 George Staikos <staikos@kde.org>
2032 - Back out last patch based on discussion with Zack.
2034 * platform/qt/WidgetQt.cpp:
2035 (WebCore::Widget::paint):
2037 2007-05-16 Anders Carlsson <andersca@apple.com>
2041 <rdar://problem/5207156> Hamachi test tool causes assertion in FormCompletionController in Safari
2043 This happens because the form delegate gets passed the wrong source frame during the second submit().
2044 If a frame with the given name is found, FrameLoader::load is called with the same parameters on the found frame.
2045 This causes the found frame to be used as the source frame, which is wrong.
2047 The fix is to create the form state object before checking what frame to load the new request in.
2050 * loader/FrameLoader.cpp:
2051 (WebCore::FrameLoader::load):
2052 (WebCore::FrameLoader::checkNavigationPolicy):
2053 (WebCore::FrameLoader::continueAfterNavigationPolicy):
2054 * loader/FrameLoader.h:
2055 * manual-tests/submit-form-with-target-twice.html: Added.
2057 2007-05-16 Maciej Stachowiak <mjs@apple.com>
2061 <rdar://problem/5205914> REGRESSION: PLT stops after loading first page due to r21479
2063 * loader/FrameLoader.cpp:
2064 (WebCore::FrameLoader::frameHasLoaded):
2066 2007-05-16 David Hyatt <hyatt@apple.com>
2068 Improve the syntax-highlighted view source mode. It now preserves all whitespace properly
2069 and highlights doctypes and comments (in addition to all the stuff it could highlight before).
2073 * html/HTMLTokenizer.cpp:
2074 (WebCore::Token::addAttribute):
2075 (WebCore::HTMLTokenizer::parseTag):
2076 * html/HTMLTokenizer.h:
2077 (WebCore::Token::Token):
2078 (WebCore::Token::~Token):
2079 (WebCore::Token::reset):
2080 (WebCore::Token::addViewSourceChar):
2081 * html/HTMLViewSourceDocument.cpp:
2082 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2083 * html/HTMLViewSourceDocument.h:
2085 2007-05-16 Maciej Stachowiak <mjs@apple.com>
2089 <rdar://problem/5191024> Page never loads completely (emonome.vodpod.com)
2090 <rdar://problem/5205162> REGRESSION (r21367): In the Address URL field, typing a site name doesn't redirect to site after pressing return
2091 http://bugs.webkit.org/show_bug.cgi?id=13683
2092 <rdar://problem/5208951> REGRESSION: Progress bar never completes on link click that downloads (13694)
2093 http://bugs.webkit.org/show_bug.cgi?id=13694
2094 <rdar://problem/5201598> REGRESSION: After uploading file to iDisk at mac.com, "loading" status remains and file does not appear in the list
2096 * loader/FrameLoader.cpp:
2097 (WebCore::FrameLoader::mainReceivedCompleteError): Make sure to always check whether the overall
2098 load completed, even if we think the current frame load is already complete.
2100 2007-05-16 Beth Dakin <bdakin@apple.com>
2104 Fix for <rdar://problem/5204107> REGRESSION: CSS web forum site
2105 layout not displaying properly in latest WebKit
2107 Hyatt's http://trac.webkit.org/projects/webkit/changeset/21428
2108 exposed this bug. We were not handling error cases with <caption>
2109 correctly. This patch makes them do the same thing as colgroup.
2111 * html/HTMLParser.cpp:
2112 (WebCore::HTMLParser::handleError):
2113 * html/HTMLParserErrorCodes.cpp: No need any more for caption-
2115 (WebCore::htmlParserErrorMessageTemplate):
2116 * html/HTMLParserErrorCodes.h:
2119 2007-05-16 Kevin McCullough <kmccullough@apple.com>
2121 Reviewed by Darin and Geoff.
2123 - rdar://problem/4981886
2124 - Now windows opened by the DOM can be closed by JS.
2126 * bindings/js/kjs_window.cpp:
2127 (KJS::createNewWindow):
2128 (KJS::WindowFunc::callAsFunction):
2129 * loader/FrameLoader.cpp:
2130 (WebCore::FrameLoader::FrameLoader):
2131 (WebCore::FrameLoader::openedByDOM):
2132 (WebCore::FrameLoader::setOpenedByDOM):
2133 (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
2134 * loader/FrameLoader.h:
2136 2007-05-16 Darin Adler <darin@apple.com>
2140 - fix <rdar://problem/4928671> Crash due to runaway recursion when fieldset has display: table-row (12066)
2142 Test: fast/css/fieldset-display-row.html
2144 * rendering/RenderContainer.cpp: (WebCore::RenderContainer::addChild):
2145 Change all decision making about special handling for new children to use
2146 the class of the render object instead of the style, except for the cases
2147 where the style is the only way to tell (TABLE_COLUMN_GROUP and TABLE_CAPTION).
2148 Thus a RenderFieldset with table-row style won't get handled as if it was
2151 * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): Same thing.
2152 Except that here the styles that we ahave to look at are TABLE_CAPTION,
2153 TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, and TABLE_ROW_GROUP.
2155 2007-05-16 Zack Rusin <zrusin@trolltech.com>
2159 Implement bigger parts of the Canvas element in the
2160 Qt port. Gradients and patterns are missing.
2162 * WebCore/html/CanvasRenderingContext2D.cpp:
2163 * WebCore/html/CanvasStyle.cpp:
2164 * WebCore/html/HTMLCanvasElement.cpp:
2165 * WebCore/html/HTMLCanvasElement:
2167 2007-05-16 Zack Rusin <zrusin@trolltech.com>
2171 Fix shared timers, make them use miliseconds. Based
2172 on a patch from George.
2174 * WebCore/platform/qt/SharedTimerQt.cpp:
2175 (WebCore::setSharedTimerFireTime):
2177 2007-05-16 David Hyatt <hyatt@apple.com>
2179 Add rudimentary error reporting to the HTML parser. This is disabled
2180 for now until it gets beefed up a bit more (and until we work out how
2181 best to pass the messages up without hurting perf).
2183 Clean up and remove dead error handling code and incorrect error handling
2188 * WebCore.xcodeproj/project.pbxproj:
2189 * html/HTMLParser.cpp:
2190 (WebCore::HTMLParser::HTMLParser):
2191 (WebCore::HTMLParser::handleError):
2192 (WebCore::HTMLParser::headCreateErrorCheck):
2193 (WebCore::HTMLParser::reportErrorToConsole):
2194 * html/HTMLParser.h:
2195 (WebCore::HTMLParser::reportError):
2196 * html/HTMLParserErrorCodes.cpp: Added.
2197 (WebCore::htmlParserErrorMessageTemplate):
2198 * html/HTMLParserErrorCodes.h: Added.
2200 * html/HTMLTokenizer.h:
2201 (WebCore::HTMLTokenizer::tagStartLineNumber):
2203 2007-05-15 David Hyatt <hyatt@apple.com>
2205 Make FrameLoader write "<html><body>" instead of just "<body>".
2209 * loader/FrameLoader.cpp:
2210 (WebCore::FrameLoader::init):
2212 2007-05-15 George Staikos <staikos@kde.org>
2214 Reviewed by Adam Roben.
2216 - Pass cookies through from the loader.
2218 * platform/network/qt/ResourceHandleManagerQt.cpp:
2219 (WebCore::ResourceHandleManager::receivedResponse):
2221 2007-05-15 Adam Treat <adam@staikos.net>
2223 Reviewed by George Staikos.
2225 - Implement drawArc with proper units.
2227 * platform/graphics/qt/GraphicsContextQt.cpp:
2228 (WebCore::GraphicsContext::strokeArc):
2230 2007-05-15 Adam Treat <adam@staikos.net>
2232 Reviewed by George Staikos.
2234 - Add missing paint for nested subframes.
2236 * platform/qt/WidgetQt.cpp:
2237 (WebCore::Widget::paint):
2239 2007-05-15 Sam Weinig <sam@webkit.org>
2243 - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2244 Finish testing and fixing the setting of DOM attributes to JS null
2246 Convert JS null to null string for SVG attributes.
2248 Test: fast/dom/svg-element-attribute-js-null.xhtml
2250 * ksvg2/svg/SVGAngle.idl:
2251 * ksvg2/svg/SVGElement.idl:
2252 * ksvg2/svg/SVGLength.idl:
2253 * ksvg2/svg/SVGScriptElement.idl:
2255 2007-05-15 Sam Weinig <sam@webkit.org>
2259 - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2260 Finish testing and fixing the setting of DOM attributes to JS null
2262 Convert JS null to null string for CanvasRenderingContext2D attributes.
2264 Test: fast/dom/canvasContext2d-element-attribute-js-null.html
2266 * html/CanvasRenderingContext2D.idl:
2268 2007-05-15 Oliver Hunt <oliver@apple.com>
2270 Reviewed by Sam and Geoff.
2272 Removing dead code left behind from drag and drop refactoring.
2274 * page/mac/WebCoreFrameBridge.h:
2276 2007-05-15 Sam Weinig <sam@webkit.org>
2280 - Second Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2281 Finish testing and fixing the setting of DOM attributes to JS null
2283 Convert JS null to null string for remaining CSSOM attributes.
2285 Test: fast/dom/css-element-attribute-js-null.html
2287 * bindings/js/kjs_css.cpp:
2288 (KJS::DOMCSSStyleDeclaration::put):
2289 (KJS::DOMMediaList::put):
2290 (KJS::DOMCSSRule::putValueProperty):
2291 (KJS::DOMCSSValue::put):
2292 * css/CSSPageRule.idl:
2294 * css/CSSStyleDeclaration.idl:
2295 * css/CSSStyleRule.idl:
2297 * css/MediaList.idl:
2299 2007-05-15 Darin Adler <darin@apple.com>
2303 * css/html4.css: Remove wbr style rule -- not needed any more.
2305 2007-05-15 Mitz Pettel <mitz@webkit.org>
2309 - fix http://bugs.webkit.org/show_bug.cgi?id=13360
2310 REGRESSION: Crash closing live web cam viewer page
2312 Test: http/tests/misc/multipart.html
2314 * loader/ResourceLoader.cpp:
2315 (WebCore::ResourceLoader::didFail): Avoid calling didFailToLoad() if
2316 didFinishLoad() has already been called (when the first part of a
2317 multipart resource arrived).
2318 (WebCore::ResourceLoader::didCancel): Ditto.
2320 2007-05-15 Sam Weinig <sam@webkit.org>
2324 - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2325 Finish testing and fixing the setting of DOM attributes to JS null
2327 Convert JS null to null string for remaining Core DOM attributes.
2329 Test: fast/dom/coreDOM-element-attribute-js-null.xhtml
2332 (WebCore::Attr::setValue): Don't throw an expection for null values as this
2333 is not in the spec and Firefox does not do it either.
2335 * dom/CharacterData.idl:
2336 * dom/ProcessingInstruction.idl:
2338 2007-05-15 Mitz Pettel <mitz@webkit.org>
2342 - fix http://bugs.webkit.org/show_bug.cgi?id=13718
2343 REGRESSION (r21093): editing/execCommand/5136770.html failing pixel test
2345 * rendering/RenderContainer.cpp:
2346 (WebCore::RenderContainer::removeChildNode): Moved the code that clears the
2347 selection when moving a selection border into the fast path.
2349 2007-05-15 Rob Buis <buis@kde.org>
2353 http://bugs.webkit.org/show_bug.cgi?id=6487
2354 "Make Text Bigger/Smaller" affects SVGs when it probably shouldn't
2356 Ignore Make Text Bigger/Smaller for SVG text.
2360 2007-05-15 Anders Carlsson <andersca@apple.com>
2364 <rdar://problem/5183685>
2365 http://bugs.webkit.org/show_bug.cgi?id=13301
2366 ASSERT or null value when trying to use a getter defined on a window object
2368 Handle the case where the value returned is a getter/setter object.
2370 * bindings/js/kjs_window.cpp:
2371 (KJS::Window::getOverridePropertySlot):
2373 2007-05-14 Anders Carlsson <andersca@apple.com>
2377 <rdar://problem/5200816>
2378 REGRESSION: With Shiira 1.2.2 , I can't open embedded link in flash object by clicking (http:/www.adobe.com )
2380 Shiira under some circumstances passes nil as the request to -[WebFrame loadRequest:]. ToT WebKit doesn't call any policy
2381 delegate methods in this case, which means that the page is actually being loaded.
2383 This patch makes ToT WebKit behave in the same way as Tiger WebKit when the request is nil.
2385 * loader/FrameLoader.cpp:
2386 (WebCore::FrameLoader::checkNavigationPolicy):
2387 Don't continue without calling the navigation policy method if the request is null.
2389 (WebCore::FrameLoader::continueAfterNavigationPolicy):
2390 If the request can't be handled, don't continue the load.
2392 * platform/network/mac/ResourceRequestMac.mm:
2393 (WebCore::ResourceRequest::doUpdatePlatformRequest):
2394 Don't create an NSURLRequest object if the request is null.
2396 2007-05-15 Maciej Stachowiak <mjs@apple.com>
2398 Reviewed by Hyatt and Lars.
2400 - fixed <rdar://problem/5201758> REGRESSION: Stop button enabled and other problems caused by [WebView currentURL] returning non-nil for empty window
2402 * WebCore.exp: export new symbol
2403 * loader/FrameLoader.cpp:
2404 (WebCore::FrameLoader::begin): move marker that we committed a real doc load from here...
2405 (WebCore::FrameLoader::transitionToCommitted): ...to here
2406 (WebCore::FrameLoader::frameHasLoaded): check that we have at least started loading something
2407 besides the initial empty doc.
2408 * loader/FrameLoader.h:
2410 2007-05-14 Justin Garcia <justin.garcia@apple.com>
2414 <http://bugs.webkit.org/show_bug.cgi?id=13716>
2415 REGRESSION: Three new layout test failures
2417 Two failures are correct. Updated their expected results.
2419 In fast/events/frame-tab-focus.html, as we advance
2420 through focusable nodes, we descend into a subframe
2421 to focus a node and then ascend out of it into the
2422 main frame to focus the next. When we focus the main
2423 frame, the node in that frame that was previously
2424 focused and contains an inactive selection is focused
2425 momentarily because setCaretVisible tries to focus the
2426 node containing the caret.
2429 (WebCore::Frame::setCaretVisible): Don't focus the
2430 node containing the caret. FocusController will focus
2431 the previously focused node (which will contain the
2432 caret) if necessary when the frame gains focus.
2434 2007-05-14 Maciej Stachowiak <mjs@apple.com>
2438 - fixed <rdar://problem/5203036> REGRESSION: Assertion failure in WebCore::FrameLoader::restoreScrollPositionAndViewState() going back from fark.com Photoshop contest (13684)
2440 Test: http/tests/navigation/back-to-slow-frame.html
2442 * loader/FrameLoader.cpp:
2443 (WebCore::FrameLoader::restoreScrollPositionAndViewState): Add needed early return.
2445 2007-05-14 Mitz Pettel <mitz@webkit.org>
2447 Reviewed by Dave Hyatt.
2449 - fix http://bugs.webkit.org/show_bug.cgi?id=13603
2450 style leaks in washingtonpost.com
2451 also known as http://bugs.webkit.org/show_bug.cgi?id=8750
2452 w3c.org: incorrect recovery from unclosed <a> elements
2453 also known as http://bugs.webkit.org/show_bug.cgi?id=12808
2454 Handling of misnested tags results in entire page appearing as link
2455 also known as http://bugs.webkit.org/show_bug.cgi?id=12861
2456 Post text renders as link
2458 Test: fast/parser/residual-style-close-across-n-blocks.html
2460 * html/HTMLParser.cpp:
2461 (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Changed to
2462 deal with multiple block crossings instead of bailing out, by doing multiple
2463 reparenting passes, starting from the outermost block.
2465 2007-05-14 Mitz Pettel <mitz@webkit.org>
2469 - fix http://bugs.webkit.org/show_bug.cgi?id=13711
2470 REGRESSION - Bookmark Bar text rendering changed
2472 No test possible since this patch affects only Safari chrome.
2474 * platform/Font.cpp:
2475 (WebCore::Font::Font): Initialize m_isPlatformFont according to whether
2476 the Font object is derived from a FontPlatformData or not.
2478 (WebCore::Font::isPlatformFont): Added. Returns whether this Font was
2479 derived from a platform font.
2480 * platform/mac/FontCacheMac.mm:
2481 (WebCore::FontCache::getFontDataForCharacters): Changed to not enable
2482 synthetic bold and italic in the fallback fonts if the original font
2483 was derived from a platform font.
2485 2007-05-14 Sam Weinig <sam@webkit.org>
2489 - Patch for http://bugs.webkit.org/show_bug.cgi?id=13541
2490 REGRESSION: Setting a DOMString attribute to JS null in the
2491 JS bindings should default to converting to the empty string
2493 Convert JS null to the empty string when passing it to an attribute that takes
2496 Test: fast/dom/document-attribute-js-null.html
2497 Test: fast/dom/element-attribute-js-null.html
2499 * bindings/js/kjs_dom.cpp:
2500 (KJS::DOMNode::putValueProperty):
2501 * bindings/js/kjs_html.cpp:
2502 (KJS::JSHTMLDocument::putValueProperty):
2503 (KJS::JSHTMLElement::objectSetter):
2504 (KJS::JSHTMLElement::embedSetter):
2505 (KJS::JSHTMLElement::tableSetter):
2506 (KJS::JSHTMLElement::tableCaptionSetter):
2507 (KJS::JSHTMLElement::tableColSetter):
2508 (KJS::JSHTMLElement::tableSectionSetter):
2509 (KJS::JSHTMLElement::tableRowSetter):
2510 (KJS::JSHTMLElement::tableCellSetter):
2511 (KJS::JSHTMLElement::frameSetSetter):
2512 (KJS::JSHTMLElement::frameSetter):
2513 (KJS::JSHTMLElement::iFrameSetter):
2514 (KJS::JSHTMLElement::marqueeSetter):
2515 (KJS::JSHTMLElement::putValueProperty):
2516 * bindings/js/kjs_html.h:
2519 * html/HTMLAnchorElement.idl:
2520 * html/HTMLAppletElement.idl:
2521 * html/HTMLAreaElement.idl:
2522 * html/HTMLBRElement.idl:
2523 * html/HTMLBaseElement.idl:
2524 * html/HTMLBaseFontElement.idl:
2525 * html/HTMLBlockquoteElement.idl:
2526 * html/HTMLBodyElement.idl:
2527 * html/HTMLButtonElement.idl:
2528 * html/HTMLDivElement.idl:
2529 * html/HTMLDocument.idl:
2530 * html/HTMLElement.idl:
2531 * html/HTMLEmbedElement.idl:
2532 * html/HTMLFontElement.idl:
2533 * html/HTMLFormElement.idl:
2534 * html/HTMLFrameElement.idl:
2535 * html/HTMLFrameSetElement.idl:
2536 * html/HTMLHRElement.idl:
2537 * html/HTMLHeadElement.idl:
2538 * html/HTMLHeadingElement.idl:
2539 * html/HTMLHtmlElement.idl:
2540 * html/HTMLIFrameElement.idl:
2541 * html/HTMLImageElement.idl:
2542 * html/HTMLInputElement.idl:
2543 * html/HTMLIsIndexElement.idl:
2544 * html/HTMLLIElement.idl:
2545 * html/HTMLLabelElement.idl:
2546 * html/HTMLLegendElement.idl:
2547 * html/HTMLLinkElement.idl:
2548 * html/HTMLMapElement.idl:
2549 * html/HTMLMetaElement.idl:
2550 * html/HTMLModElement.idl:
2551 * html/HTMLOListElement.idl:
2552 * html/HTMLObjectElement.idl:
2553 * html/HTMLOptGroupElement.idl:
2554 * html/HTMLOptionElement.idl:
2555 * html/HTMLParagraphElement.idl:
2556 * html/HTMLParamElement.idl:
2557 * html/HTMLQuoteElement.idl:
2558 * html/HTMLScriptElement.idl:
2559 * html/HTMLSelectElement.idl:
2560 * html/HTMLStyleElement.idl:
2561 * html/HTMLTableCaptionElement.idl:
2562 * html/HTMLTableCellElement.idl:
2563 * html/HTMLTableColElement.idl:
2564 * html/HTMLTableElement.idl:
2565 * html/HTMLTableRowElement.idl:
2566 * html/HTMLTableSectionElement.idl:
2567 * html/HTMLTextAreaElement.idl:
2568 * html/HTMLTitleElement.idl:
2569 * html/HTMLUListElement.idl:
2571 2007-05-14 Geoffrey Garen <ggaren@apple.com>
2573 Trying to fix the Qt build.
2577 2007-05-14 Geoffrey Garen <ggaren@apple.com>
2579 Reviewed by Oliver Hunt.
2581 Some improvements on my last patch, suggested by Darin.
2583 * history/PageCache.cpp:
2584 (WebCore::PageCache::autoreleaseNow): Swap with an empty set instead of
2585 building up an array and then calling clear(). This is slightly more
2586 efficient and the code is cleaner.
2588 2007-05-14 Justin Garcia <justin.garcia@apple.com>
2592 <rdar://problem/5136696> Selection is removed when focusing a node in another frame
2593 <rdar://problem/5192388> WordPress: Can't insert links/images
2595 Don't clear a selection when changing focus if the new
2596 focus node is in a different frame than the old selection.
2599 (WebCore::Document::setFocusedNode): Moved code to clear
2600 selections to the FocusController, since it is Page level
2601 and will know about the frame/document that contained the
2602 old selection. Moved code to call shouldEndEditing to the
2603 FocusController because selections are now cleared before
2604 calling Document::setFocusedNode and shouldEndEditing must
2605 be called before selections are cleared.
2607 (WebCore::Element::blur): Call FocusController::setFocusNode
2608 instead of Document::setFocusNode, if possible.
2609 * page/EventHandler.cpp:
2610 (WebCore::EventHandler::dispatchMouseEvent): Ditto.
2611 * page/FocusController.cpp:
2612 (WebCore::relinquishesEditingFocus): Moved from Document.cpp.
2613 (WebCore::clearSelectionIfNeeded): Ditto. Don't clear if
2614 the old selection is in a frame that's different than the
2615 one that contains the new focus node.
2616 (WebCore::FocusController::setFocusedNode): Moved code
2617 here from Document::setFocusedNode.
2619 (WebCore::Frame::setFocusedNodeIfNeeded): Call
2620 FocusController::setFocusNode.
2622 2007-05-14 Geoffrey Garen <ggaren@apple.com>
2624 Reviewed by Darin Adler.
2626 Next step toward fixing <rdar://problem/5055182> The back cache has no
2629 Created a PageCache singleton. Right now, it only handles the timer-based
2630 deallocation of cached pages. I plan to add HistoryItem->CachedPage tracking
2631 and eviction logic in later patches.
2633 Updated for renames and file changes:
2636 * WebCore.xcodeproj/project.pbxproj:
2637 * history/BackForwardList.cpp:
2638 (WebCore::BackForwardList::setPageCacheSize):
2639 (WebCore::BackForwardList::clearPageCache):
2641 Removed global timed release code, moved into new PageCache class, since
2642 it's eventually going to be in charge of deciding when things are released:
2644 * history/HistoryItem.cpp:
2645 (WebCore::HistoryItem::setCachedPage):
2646 * history/HistoryItem.h:
2648 Folded into PageCache:
2650 * history/HistoryItemTimer.cpp: Removed.
2651 * history/HistoryItemTimer.h: Removed.
2653 New singleton. Right now, it just handles timed release of cached pages:
2655 * history/PageCache.cpp: Added.
2656 (WebCore::pageCache):
2657 (WebCore::PageCache::PageCache):
2658 (WebCore::PageCache::autoreleaseNowOrReschedule):
2659 (WebCore::PageCache::autoreleaseNow):
2660 (WebCore::PageCache::autorelease):
2661 * history/PageCache.h: Added.
2663 2007-05-14 Adele Peterson <adele@apple.com>
2667 Fix for <rdar://problem/5200081> Repro crash in PopupMenu::show clicking popup menu button after reload
2669 * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenu::show): Added call to dismissPopup so the cell gets unattached properly.
2671 2007-05-14 Adele Peterson <adele@apple.com>
2675 Remove incorrect assertion.
2677 * page/FrameView.cpp: (WebCore::FrameView::setContentsPos):
2679 2007-05-14 Anders Carlsson <andersca@apple.com>
2683 <rdar://problem/5172056> Regression: cannot open txt file, get broken image
2685 Never let plug-ins override text/plain.
2687 * dom/DOMImplementation.cpp:
2688 (WebCore::DOMImplementation::createDocument):
2690 2007-05-14 Zack Rusin <zrusin@trolltech.com>
2694 Do some magic to get better dependency tracking for header
2695 files in the qmake project files.
2699 2007-05-14 Lars Knoll <lars@trolltech.com>
2703 Required updates after Maciej's frame change.
2705 * loader/FrameLoader.cpp:
2706 (WebCore::FrameLoader::mainReceivedCompleteError):
2707 Call checkLoadCompleted() at the end of the method. Without it
2708 we never get the loadDone() signal on the Qt port.
2709 * platform/network/qt/ResourceHandleManagerQt.cpp:
2710 (WebCore::ResourceHandleManager::receivedFinished):
2711 Don't pass a null error to didFail().
2713 2007-05-14 Darin Adler <darin@apple.com>
2717 - fix <rdar://problem/3109180> VIP: after go back, page jumps after loading even if I scrolled while loading
2719 * history/CachedPage.cpp: (WebCore::CachedPage::clear): Call clearFrame rather than
2720 clearPart -- the "part" term was leftover prehistoric terminology.
2722 * loader/FrameLoader.cpp:
2723 (WebCore::FrameLoader::open): Call setWasScrolledByUser(false) on the page, so that we
2724 can detect any user scrolling that happens during the "go back" process.
2725 (WebCore::FrameLoader::restoreScrollPositionAndViewState): Don't scroll if the view's
2726 wasScrolledByUser flag is set.
2727 (WebCore::FrameLoader::loadItem): Call setWasScrolledByUser(false) false when we do
2728 a new "load" (actually just a scroll) using the same frame. Also moved the line of code that
2729 sets m_currentHistoryItem to make this code path mroe similar to recursiveGoToItem.
2730 (WebCore::FrameLoader::recursiveGoToItem): Ditto.
2733 (WebCore::Frame::~Frame): Call clearFrame rather than stting m_frame directly.
2734 (WebCore::Frame::sendScrollEvent): Call setWasScrolledByUser(true) on FrameView. The FrameView
2735 itself knows to ignore this if the scrolling is being done programmatically instead of by the user.
2737 * page/FrameView.h: Added wasScrolledByUser and setWasScrolledByUser. Also removed unneeded
2738 include and class forward declarations, renamed clearPart to clearFrame, removed uneeded function
2739 haveDelayedLayoutScheduled, and removed unneeded friend declarations.
2740 * page/FrameView.cpp:
2741 (WebCore::FrameViewPrivate::FrameViewPrivate): Added m_inProgrammaticScroll and m_wasScrolledByUser.
2742 (WebCore::FrameViewPrivate::reset): Set m_wasScrolledByUser to false.
2743 (WebCore::FrameView::clearFrame): Renamed from clearPart.
2744 (WebCore::FrameView::scrollRectIntoViewRecursively): Added code to set the m_inProgrammaticScroll flag.
2745 (WebCore::FrameView::setContentsPos): Ditto.
2746 (WebCore::FrameView::wasScrolledByUser): Added.
2747 (WebCore::FrameView::setWasScrolledByUser): Added. Does nothing if called when m_inProgrammaticScroll
2750 2007-05-14 Darin Adler <darin@apple.com>
2754 - <rdar://problem/4865655> REGRESSION: find function does not work for the character ß
2756 The trick was to fold case consistently in the CircularSearchBuffer class.
2758 The problem was that we were folding the search target string with full case folding and
2759 the characters of the text we were searching with simple case folding. We now use full
2760 case folding in both cases.
2762 * editing/TextIterator.cpp:
2763 (WebCore::CircularSearchBuffer::CircularSearchBuffer): Changed the buffer to be a
2764 Vector<UChar>. Added a Vector<bool> to record which characters were starts of characters
2765 in the text we are searching. Changed the cursor to be an int rather than a pointer.
2766 (WebCore::CircularSearchBuffer::append): New function that knows how to append multiple
2767 characters when folding case turns one character into many -- uses the full foldCase
2768 rather than the simplified single-character foldCase. Also removed the append function
2769 that did multiple characters at once; that was part of an optimization we don't need.
2770 (WebCore::CircularSearchBuffer::isMatch): Instead of asserting that the buffer is full,
2771 changed this to return false if it's not full, which lets us fill up the buffer with
2772 the normal loop. Also return false if the start of the buffer is half-way through a
2773 case-folded character and updated this since m_cursor is now an integer.
2774 (WebCore::CircularSearchBuffer::length): This returns the length in non-case-folded
2775 characters of the characters that were appended, which may not be the same as the length
2776 of the original target string. To do that we have to total up the character start
2777 booleans for the current state of the circular buffer.
2778 (WebCore::findPlainText): Streamlined the logic in a few ways: 1) Moved more of the
2779 return value setup to the top of the function so it could be shared with the early
2780 error exit. 2) Removed the separate "fill the buffer" logic, which allowed me to
2781 remove some of the functions from CircularSearchBuffer and eliminated the need for
2782 two nested loops. 3) Replaced the CharacterIterator and bool that were used to record
2783 the location we found with integers matchStart and matchLength. 4) Got rid of the use
2784 of goto since we don't have two nested loops any more.
2786 2007-05-14 Andrew Wellington <proton@wiretapped.net>
2790 Fix http://bugs.webkit.org/show_bug.cgi?id=13275
2791 Safari crashed when trying to login using the windows live contact control
2793 Check for cleared windowObj in JSAbstractEventListener::handleEvent
2795 * bindings/js/kjs_events.cpp:
2796 (KJS::JSAbstractEventListener::handleEvent):
2798 2007-05-13 Alexey Proskuryakov <ap@webkit.org>
2802 http://bugs.webkit.org/show_bug.cgi?id=13690
2803 JavaScript Form Validation issue on Banco do Brasil site
2805 Test: fast/forms/input-setvalue-selection.html
2807 * html/HTMLInputElement.cpp:
2808 (WebCore::HTMLInputElement::setValue): In other browsers, changing textInput.value
2809 always moves the insertion point past the text. In 10.4.9 WebKit, this only worked
2810 for inactive controls, and it never worked in ToT.
2812 2007-05-13 Brady Eidson <beidson@apple.com>
2816 http://bugs.webkit.org/show_bug.cgi?id=13701
2818 Since HTMLInputElements register themselves with their Document for special handling, if their document
2819 ever changes then bad things can happen.
2821 Unfortunately, with adoptNode, the document can change. This has been a long standing crasher with all
2822 input fields but was given recent high visibility by r21430
2824 The solution is to add functionality for a Node to react to its owner document changing via a pair of
2825 virtual callbacks. Then we can tap into those callbacks in HTMLInputElement.
2827 No layout test possible until http://bugs.webkit.org/show_bug.cgi?id=13672 is resolved
2830 (WebCore::Node::setDocument): Call willMoveToNewOwnerDocument and didMoveToNewOwnerDocument
2833 (WebCore::Node::willMoveToNewOwnerDocument): Virtual callback to a node for before an owner document change
2834 (WebCore::Node::didMoveToNewOwnerDocument): Virtual callback to a node for after an owner document change
2836 * html/HTMLInputElement.cpp:
2837 (WebCore::HTMLInputElement::~HTMLInputElement): Unconditionally unregister both for both form state
2838 and the cache restoration callback
2839 (WebCore::HTMLInputElement::setInputType): Change registration with the document only if we're in one
2840 (WebCore::HTMLInputElement::attach): Don't bother registering for the callback here - that will be
2841 handled by setInputType() or by a change in owner document
2842 (WebCore::HTMLInputElement::willMoveToNewOwnerDocument): Unregister with the old owner document
2843 (WebCore::HTMLInputElement::didMoveToNewOwnerDocument): Register with the new owner document
2844 * html/HTMLInputElement.h:
2846 2007-05-13 Darin Adler <darin@apple.com>
2848 * platform/mac/TextBreakIteratorInternalICUMac.mm: Fix comment typo.
2850 2007-05-13 Rob Buis <buis@kde.org>
2854 http://bugs.webkit.org/show_bug.cgi?id=13529
2855 DOM3 keyIdentifier text is incorrect
2857 Use 4 digits for the Unicode based key identifiers.
2859 * html/HTMLButtonElement.cpp:
2860 (WebCore::HTMLButtonElement::defaultEventHandler):
2861 * html/HTMLInputElement.cpp:
2862 (WebCore::HTMLInputElement::defaultEventHandler):
2863 * html/HTMLSelectElement.cpp:
2864 (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2865 * page/EventHandler.cpp:
2866 (WebCore::EventHandler::defaultKeyboardEventHandler):
2867 * page/gdk/EventHandlerGdk.cpp:
2868 (WebCore::isKeyboardOptionTab):
2869 * page/mac/EventHandlerMac.mm:
2870 (WebCore::isKeyboardOptionTab):
2871 * page/qt/EventHandlerQt.cpp:
2872 (WebCore::isKeyboardOptionTab):
2873 * platform/gdk/KeyEventGdk.cpp:
2874 (WebCore::keyIdentifierForGdkKeyCode):
2875 * platform/mac/KeyEventMac.mm:
2876 (WebCore::keyIdentifierForKeyEvent):
2877 * platform/qt/PlatformKeyboardEventQt.cpp:
2878 (WebCore::keyIdentifierForQtKeyCode):
2879 * platform/win/KeyEventWin.cpp:
2880 (WebCore::keyIdentifierForWindowsKeyCode):
2881 * platform/wx/KeyEventWin.cpp:
2882 (WebCore::keyIdentifierForWindowsKeyCode):
2883 * platform/wx/KeyboardEventWx.cpp:
2884 (WebCore::keyIdentifierForWxKeyCode):
2886 2007-05-12 Darin Adler <darin@apple.com>
2890 - fix <rdar://problem/5174903> Safari crashes opening the attached webarchive (made by OmniWeb)
2892 * loader/icon/IconLoader.cpp:
2893 (WebCore::IconLoader::didReceiveResponse): Check ResourceHandle for nil before calling url() on it.
2894 (WebCore::IconLoader::didFail): Ditto.
2895 (WebCore::IconLoader::didFinishLoading): Ditto.
2897 2007-05-12 Rob Buis <buis@kde.org>
2901 Cleanup, get rid of the SVGStyledElement::view() call.
2903 * ksvg2/svg/SVGClipPathElement.cpp:
2904 (WebCore::SVGClipPathElement::canvasResource):
2905 * ksvg2/svg/SVGFEFloodElement.cpp:
2906 (WebCore::SVGFEFloodElement::filterEffect):
2907 * ksvg2/svg/SVGGradientElement.cpp:
2908 (WebCore::SVGGradientElement::buildStops):
2909 * ksvg2/svg/SVGStyledElement.cpp:
2910 * ksvg2/svg/SVGStyledElement.h:
2912 2007-05-12 Mitz Pettel <mitz@webkit.org>
2916 - fix http://bugs.webkit.org/show_bug.cgi?id=13680
2917 Incomplete repaint of focus ring around continuation
2919 Test: fast/repaint/continuation-after-outline.html
2921 * rendering/RenderFlow.cpp:
2922 (WebCore::RenderFlow::absoluteClippedOverflowRect):
2924 2007-05-12 Oliver Hunt <oliver@apple.com>
2928 <rdar://problem/4728842> Can't drag-and-drop files onto <input type="file">
2930 This patch allows a file to be dropped on to a file input field. There
2931 are a few changes for data handling and a few to allow the data to be
2932 threaded to the appropriate places.
2934 * page/DragController.cpp:
2935 (WebCore::asFileInput):
2936 When dropping a file onto a file input we may mouse over either
2937 the element itself, or the contained button element. This method
2938 returns the base element for the file input in either of these
2940 (WebCore::DragController::tryDocumentDrag):
2941 Don't try to set the drag caret to a file input.
2942 (WebCore::DragController::concludeDrag):
2943 Handle dropping onto a file input element.
2944 (WebCore::DragController::canProcessDrag):
2945 We can now process a file being dragged onto a file input element.
2947 * platform/DragData.h:
2950 * platform/gdk/DragDataGdk.cpp:
2951 (WebCore::DragData::containsFiles):
2952 (WebCore::DragData::asFilenames):
2955 * platform/mac/DragDataMac.mm:
2956 (WebCore::DragData::containsFiles):
2957 (WebCore::DragData::asFilenames):
2958 Implement new accessors
2959 (WebCore::DragData::containsCompatibleContent):
2960 Update containsCompatibleContent to allow standalone files.
2962 * platform/qt/DragDataQt.cpp:
2963 (WebCore::DragData::containsFiles):
2964 (WebCore::DragData::asFilenames):
2967 * rendering/RenderFileUploadControl.cpp:
2968 (WebCore::RenderFileUploadControl::receiveDroppedFile):
2969 * rendering/RenderFileUploadControl.h:
2970 For security reasons we don't have an api to allow us to set
2971 a value directly on a file input -- attempts to do so are
2972 blocked. By adding a method to set the target through the
2973 render we bypass such restrictions, and ensure the renderer
2974 is updated correctly.
2976 2007-05-12 Mitz Pettel <mitz@webkit.org>
2980 - fix http://bugs.webkit.org/show_bug.cgi?id=13695
2981 REGRESSION (r21387): Replaced elements' highlight rects are wrongly positioned
2983 Test: fast/replaced/selection-rect.html
2985 Also fixes the same problem with list markers, covered by existing test
2986 fast/lists/markers-in-selection.html.
2988 * rendering/RenderListMarker.cpp:
2989 (WebCore::RenderListMarker::selectionRect):
2990 * rendering/RenderReplaced.cpp:
2991 (WebCore::RenderReplaced::selectionRect):
2993 2007-05-12 Mitz Pettel <mitz@webkit.org>
2997 - fix http://bugs.webkit.org/show_bug.cgi?id=13685
2998 REGRESSION (r21368-r21388): Highlighting text in scrolled textareas behaves oddly
3000 Test: fast/repaint/text-selection-rect-in-overflow.html
3002 * rendering/RenderText.cpp:
3003 (WebCore::RenderText::selectionRect):
3005 2007-05-12 Brady Eidson <beidson@apple.com>
3007 Rubber stamped by Mitz
3009 * html/HTMLInputElement.cpp:
3010 (WebCore::HTMLInputElement::attach): unregister->register - I screwed this one up in last minute renaming
3011 before committing :(
3013 2007-05-11 Brady Eidson <beidson@apple.com>
3015 Reviewed by Darin and Geoff
3017 Fix for http://bugs.webkit.org/show_bug.cgi?id=13630
3019 <rdar://problem/4873628>
3021 Back/Forward cache should work with pages with login fields.
3023 First change is to relocate the "useSecureKeyboardEntry" flag to the document. This lets
3024 it persist through page cache transitions and it is truly a per-document concept more than
3025 per-frame anyways since its the document that has a password field, not the frame.
3027 Second change is to introduce the concept of an Element getting a "didRestoreFromCache()" callback.
3028 The idea is for elements to register with the document if they need work to be done when the
3029 page comes out of the back/forward cache. Currently the only client of this service is
3030 HTMLInputElements that are input type == PASSWORD. Such an element's implementation for this
3031 method is to call reset()
3033 Finally, after a page is restored from the cache we have the document send the didRestoreFromCache()
3034 callback to its registered Elements. The whole design is to clear the password fields after
3035 restoring the page instead of when caching the page because we want to defer work for the common
3036 case - there shouldn't be extra work here just to navigate away from a page when the common case
3037 is that you'll never go back!
3039 No layout tests possible until http://bugs.webkit.org/show_bug.cgi?id=13672 is resolved
3042 (WebCore::Document::Document):
3043 (WebCore::Document::registerForDidRestoreFromCacheCallback): Add an Element to the special page-restoration callback list
3044 (WebCore::Document::unregisterForDidRestoreFromCacheCallback): Remove such an element
3045 (WebCore::Document::didRestoreFromCache): Called by FrameLoader - dispatch to all the registered elements
3046 (WebCore::Document::setUseSecureKeyboardEntryWhenActive): Set the local flag and call updateSecureKeyboardEntryIfActive
3048 (WebCore::Document::useSecureKeyboardEntryWhenActive): Return the flag
3051 (WebCore::Document::unregisterFormElementWithState): Renamed
3054 (WebCore::Element::didRestoreFromCache): Added virtual base method
3056 * html/HTMLInputElement.cpp:
3057 (WebCore::HTMLInputElement::~HTMLInputElement): Deregister from the document if inputType == PASSWORD
3058 (WebCore::HTMLInputElement::dispatchFocusEvent): Set the flag on the document, not the frame
3059 (WebCore::HTMLInputElement::dispatchBlurEvent): Ditto
3060 (WebCore::HTMLInputElement::setInputType): If changing to/from PASSWORD, register/deregister in the document accordingly
3061 (WebCore::HTMLInputElement::attach): Call registerForDidRestoreFromCacheCallback(this) instead of passwordFieldAdded()
3062 (WebCore::HTMLInputElement::didRestoreFromCache): Call reset();
3063 * html/HTMLInputElement.h:
3065 * html/HTMLSelectElement.cpp:
3066 (WebCore::HTMLSelectElement::~HTMLSelectElement): Renamed deregisterFormElementWithState to unregisterFormElementWithState
3067 * html/HTMLTextAreaElement.cpp:
3068 (WebCore::HTMLTextAreaElement::~HTMLTextAreaElement): Ditto
3070 * loader/FrameLoader.cpp:
3071 (WebCore::FrameLoader::canCachePage): Remove the check for password fields - they're allowed now!
3072 (WebCore::FrameLoader::opened): Tell the document to dispatch to the registered elements
3073 (WebCore::FrameLoader::saveDocumentState): Remove the check for password fields. Turns out that when we grab a copy a the
3074 form state we're only copying the state of form elements that are registered with the Document - and that set
3075 explicitly excludes Password elements
3078 (WebCore::Frame::setDocument): If the frame is active, set the setUseSecureKeyboardEntry based on the setting contained
3080 (WebCore::Frame::updateSecureKeyboardEntryIfActive): Notification for the secure entry flag changing - if the Frame is
3081 active, then update to the new setting from the document
3082 (WebCore::Frame::setIsActive): Grab the useSecureKeyboardEntry flag from the document instead of FramePrivate
3083 (WebCore::FramePrivate::FramePrivate):
3085 * page/FramePrivate.h:
3087 2007-05-12 David Hyatt <hyatt@apple.com>
3089 FIx for 13696. Rework residual style to be much more aggressive about reopening. Added
3090 a comprehensive test case of HTML tags to guarantee we match Firefox. We now have an exclusion
3091 set rather than an inclusion set, so unknown future tags will also participate in residual style.
3095 fast/invalid/residual-style.html
3097 2007-05-12 David Hyatt <hyatt@apple.com>
3099 Fix for bug 12740, bmw.com doesn't work. We were missing a rule that is covered by the HTML5
3100 parsing spec. A <table> encountered while inside stray table content should close up the
3101 table responsible for the stray content and start the new table as a sibling of the first.
3105 fast/invalid/table-inside-stray-table-content.html
3107 2007-05-12 Eric Seidel <eric@webkit.org>
3111 Crash starting Safari with JavaScript disabled.
3112 http://bugs.webkit.org/show_bug.cgi?id=13691
3114 Test: none possible.
3116 * page/mac/FrameMac.mm:
3117 (WebCore::Frame::cleanupPlatformScriptObjects): NULL check d->m_script
3119 2007-05-11 David Hyatt <hyatt@apple.com>
3121 Fix for http://bugs.webkit.org/show_bug.cgi?id=13688, Colloquy is broken!
3123 Make sure to adjust the baseline of a percentage height table cell's row if the
3124 cell flexes (and lowers the baseline).
3128 fast/tables/vertical-align-baseline-readjust.html
3130 (WebCore::RenderTableSection::calcRowHeight):
3131 (WebCore::RenderTableSection::layoutRows):
3132 * rendering/RenderTableSection.h:
3133 (WebCore::RenderTableSection::getBaseline):
3135 2007-05-11 David Hyatt <hyatt@apple.com>
3137 Make sure focus rings are always using the exterior style, regardless
3138 of what the OS default is.
3142 * rendering/RenderThemeMac.mm:
3143 (WebCore::RenderThemeMac::checkbox):
3144 (WebCore::RenderThemeMac::radio):
3145 (WebCore::RenderThemeMac::popupButton):
3146 (WebCore::RenderThemeMac::search):
3147 (WebCore::RenderThemeMac::sliderThumbHorizontal):
3148 (WebCore::RenderThemeMac::sliderThumbVertical):
3150 2007-05-11 Oliver Hunt <oliver@apple.com>
3154 <rdar://problem/5195473> REGRESSION: "Curly quote" fails to
3155 be displayed correctly even when META tag specifies charset=x-mac-roman
3158 * platform/TextCodecICU.cpp:
3159 (WebCore::TextCodecICU::registerExtendedEncodingNames):
3160 Register the xmacroman encoding
3162 2007-05-11 Maciej Stachowiak <mjs@apple.com>
3166 REGRESSION (r21367): Crash due to null document deref when closing bookmarks
3167 http://bugs.webkit.org/show_bug.cgi?id=13662
3169 * loader/FrameLoader.cpp:
3170 (WebCore::FrameLoader::provisionalLoadStarted): Remove some useless and now harmful
3171 code - there's no need to clear in this case.
3173 2007-05-11 Oliver Hunt <oliver@apple.com>
3179 (WebCore::Document::importNode):
3181 2007-05-11 Maciej Stachowiak <mjs@apple.com>
3185 - fixed <rdar://problem/5197621> closing second window crashed webkit (13660)
3186 http://bugs.webkit.org/show_bug.cgi?id=13660
3188 No test case; not testable.
3190 * page/mac/FrameMac.mm:
3191 (WebCore::Frame::cleanupPlatformScriptObjects): Check if the interpreter is null;
3192 if so, we don't want to do work that may lazily create it while the Frame is being
3195 2007-05-11 Oliver Hunt <oliver@apple.com>
3199 <rdar://problem/5017375> WebKit should disable SVG in Dashboard
3201 Prevents an SVG document or element from being created when in
3202 dashboard compatibility mode.
3204 Manually parsing, or using XHR to created a document removes our
3205 ability to detect Dashboard compatibility mode, so we also perform
3206 the check when importing nodes from one document into another.
3208 * dom/DOMImplementation.cpp:
3209 (WebCore::DOMImplementation::createDocument):
3210 Don't create an SVGDocument if we're in dashboard compatibility mode
3213 (WebCore::Document::importNode):
3214 Don't import SVG nodes if we're in dashboard compatibility mode
3216 * ksvg2/scripts/make_names.pl:
3217 Don't create SVG elements for documents that are in dashboard
3220 2007-05-11 Holger Hans Peter Freyther <zecke@selfish.org>
3224 Bug 13676: [cairo/gdk] Provide implementation for ImageBufferCairo
3225 http://bugs.webkit.org/show_bug.cgi?id=13676
3227 There are no test cases that explicitly cover platform/graphics at present.
3229 * platform/graphics/ImageBuffer.h: Add cairo bits
3230 * platform/graphics/cairo/ImageBufferCairo.cpp: Untested implementation of the ImagerBuffer using the image_surface
3231 (WebCore::ImageBuffer::create): Create a reasonable sized surface
3232 (WebCore::ImageBuffer::ImageBuffer): Use a cairo_surface and create a GraphicsContext. GraphicsContext takes the cairo_t ownership
3233 (WebCore::ImageBuffer::~ImageBuffer): Unref the surface
3234 (WebCore::ImageBuffer::context): simply return the GraphicsContext, it should be possible to directly draw on it.
3236 2007-05-11 Mitz Pettel <mitz@webkit.org>
3240 * platform/mac/ShapeArabic.c:
3243 2007-05-11 Geoffrey Garen <ggaren@apple.com>
3245 Reviewed by Darin Adler.
3247 Removed +[WebScriptObject scriptObjectForJSObject:frame:] because the
3248 WebScriptObject API has some serious limitations that make it not ready
3249 to be used everywhere the C API is used. Hopefully we can add a good
3250 ObjC API in the future that doesn't suffer from this problem.
3252 Preliminary notes about these limitations are in <rdar://problem/4876466>.
3254 * bindings/objc/WebScriptObject.mm:
3255 * bindings/objc/WebScriptObjectPendingPublic.h:
3257 2007-05-11 Mitz Pettel <mitz@webkit.org>
3261 - fix http://bugs.webkit.org/show_bug.cgi?id=13635
3262 REGRESSION: Cannot log in to webmail.co.za account
3264 Test: fast/dom/HTMLOptionElement/option-text.html
3266 Despite the specification that the 'text' attribute of HTMLOptionElement
3267 is "the text contained within the option element", other browsers return
3268 the text as displayed in the list box or popup, which is without leading,
3269 trailing and collapsible whitespace.
3271 * html/HTMLOptionElement.cpp:
3272 (WebCore::HTMLOptionElement::text): Moved the code to trim and collapse
3273 whitespace and replace backslashes with the currency symbol into this
3275 (WebCore::HTMLOptionElement::optionText): Left only the code that adds
3276 the leading spaces for grouped options. Removed code that, in quirks mode,
3277 displayed the label if the option element contained no text. That behavior
3278 did not match WinIE and the description of the expected behavior in
3279 fast/forms/HTMLOptionElement_label06.html.
3281 2007-05-11 Mitz Pettel <mitz@webkit.org>
3285 - fix http://bugs.webkit.org/show_bug.cgi?id=13572
3286 Arabic characters are not correctly joined when using Arial
3288 No tests added because standard fonts do not use the character-based shaping
3291 Added shapeArabic(), a private version of u_shapeArabic() from ICU,
3292 patched to shape Arabic characters used in Persian, Urdu, Sindhi, etc.
3293 (whose contextual forms belong to the Arabic Presentation Forms-A block).
3295 * WebCore.xcodeproj/project.pbxproj: Added ShapeArabic.{c,h}.
3296 * platform/mac/FontMac.mm:
3297 (WebCore::shapeArabic): Changed to call shapeArabic() instead of u_shapeArabic().
3298 * platform/mac/ShapeArabic.c: Added. Based on ushape.c from ICU, with
3299 additional shaping data and logic for Arabic Presentation Forms-A. Removed
3300 many options that are not used in WebKit and code that malloc()ed a temporary
3301 buffer and reversed the string.
3308 * platform/mac/ShapeArabic.h: Added.
3310 2007-05-11 Darin Adler <darin@apple.com>
3314 - fix http://bugs.webkit.org/show_bug.cgi?id=7452
3315 <rdar://problem/3211749> line breaks ignored after <wbr> in <pre> block (affects livejournal.com)
3317 - fix http://bugs.webkit.org/show_bug.cgi?id=10657
3318 <rdar://problem/4274588> <wbr> tags are ignored
3320 - fix http://bugs.webkit.org/show_bug.cgi?id=12689
3321 <wbr> :before/:after content causes line break
3323 - fix <rdar://problem/5127366> DOM tree isn't correct when parsing with <wbr>
3325 Test: fast/text/wbr-pre.html
3326 Test: fast/text/wbr.html
3327 Test: fast/css-generated-content/wbr-with-before-content.html
3328 Test: fast/parser/parse-wbr.html
3330 * html/HTMLElement.h:
3331 * html/HTMLElement.cpp:
3332 (WebCore::HTMLElement::endTagRequirement): Use the same end tag requirement for a <wbr>
3333 element as for a <br> element, TagStatusForbidden.
3334 (WebCore::HTMLElement::tagPriority): Use the same priority for a <wbr> element as for a
3336 (WebCore::HTMLElement::createRenderer): Added. Create a RenderWordBreak to trigger the
3337 new rendering code paths.
3339 * rendering/RenderFlow.h: Add a virtual isWordBreak so we can detect RenderWordBreak.
3341 * rendering/RenderWordBreak.h: Added.
3342 * rendering/RenderWordBreak.cpp: Added.
3344 * WebCore.pro: Added new files.
3345 * WebCore.xcodeproj/project.pbxproj: Added new files.
3346 * WebCoreSources.bkl: Added new files.
3348 * rendering/RenderBlock.cpp: (WebCore::RenderBlock::calcInlinePrefWidths): Reset the
3349 line when we hit a <wbr>.
3350 * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Add a line break when
3353 * dom/Node.cpp: (Node::createRendererIfNeeded): Fix a null check for the case where
3354 createRenderer returns 0 even though rendererIsNeeded returned true. I can't reproduce
3355 it on demand, but while running layout tests I hit this once. Since there was already
3356 a null check here, I rearranged it so it guards all the code that uses the renderer.
3357 Later we might want to figure out under exactly what circumstances rendererIsNeeded
3358 will return true but createRenderer return 0 and consider eliminating them.
3360 2007-05-11 David Hyatt <hyatt@apple.com>
3362 Fix for bug 13675, focus rings don't repaint properly on editable
3367 (WebCore::InlineFlowBox::paint):
3368 * rendering/RenderBlock.cpp:
3369 (WebCore::RenderBlock::paintObject):
3370 (WebCore::continuationOutlineTable):
3371 (WebCore::RenderBlock::addContinuationWithOutline):
3372 (WebCore::RenderBlock::paintContinuationOutlines):
3373 * rendering/RenderBlock.h:
3374 * rendering/RenderBox.cpp:
3375 (WebCore::RenderBox::absoluteClippedOverflowRect):
3376 * rendering/RenderObject.cpp:
3377 (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
3378 (WebCore::RenderObject::absoluteOutlineBox):
3380 2007-05-11 Rob Buis <buis@kde.org>
3384 Cleanups mostly inspired by Coverage results.
3386 * ksvg2/css/SVGCSSParser.cpp:
3387 (WebCore::CSSParser::parseSVGValue):
3388 (WebCore::CSSParser::parseSVGStrokeDasharray):
3389 * ksvg2/css/SVGRenderStyleDefs.cpp:
3390 (StyleFillData::operator==):
3391 * ksvg2/svg/SVGColor.cpp:
3392 (WebCore::SVGColor::colorFromRGBColorString):
3394 2007-05-11 Holger Freyther <freyther@kde.org>
3396 Reviewed by Mark Rowe.
3398 Move libcurl configuration into WebKit.pri so it will be used by GdkLauncher.
3402 2007-05-10 David Hyatt <hyatt@apple.com>
3404 <rdar://problem/5015522> Bounds rectangle of unloaded images is
3405 drawn briefly while loading
3407 When the image is null and has no size, don't draw the grey
3408 rectangles or alt text any more. Wait for an actual error to
3409 occur with the image before we start showing alt text and borders.
3411 (Images with no source set at all will continue to show alt text and
3412 borders immediately.)
3414 Reviewed by bradee-oh
3416 * rendering/RenderImage.cpp:
3417 (WebCore::RenderImage::paint):
3419 2007-05-10 Mitz Pettel <mitz@webkit.org>
3423 - fix http://bugs.webkit.org/show_bug.cgi?id=13655
3424 Incomplete repaint when text-shadow is used in a render layer with explicit height
3426 Test: fast/repaint/layer-full-repaint.html
3428 Removed custom repaint logic from RenderLayer. repaintAfterLayoutIfNeeded()
3429 knows how to do everything we need now. The only catch is that we cannot
3430 rely on its "do a full repaint if the object needs layout" behavior, since
3431 by the time we call it, the needs layout flag has been reset. The solution
3432 is to cache the need for a full repaint in the layer.
3434 * page/FrameView.cpp:
3435 (WebCore::FrameView::layout): Removed call to checkForRepaintOnResize().
3436 * rendering/RenderLayer.cpp:
3437 (WebCore::RenderLayer::checkForRepaintOnResize): Removed.
3438 (WebCore::RenderLayer::RenderLayer): Replaced the m_repaintOverflowOnResize
3439 flag with a m_needsFullRepaint flag, which indicates that the layer needs
3440 to do a full repaint in the next call to updateLayerPositions().
3441 (WebCore::RenderLayer::updateLayerPositions): Simplified the repaint logic.
3442 Either call repaintAfterLayoutIfNeeded() or do a full repaint, depending on
3444 * rendering/RenderLayer.h:
3445 (WebCore::RenderLayer::setNeedsFullRepaint):
3446 * rendering/RenderObject.cpp:
3447 (WebCore::RenderObject::setNeedsLayout): Mark the layer for full repaint.
3449 2007-05-10 Justin Garcia <justin.garcia@apple.com>
3453 <rdar://problem/5195166> Incorrect proposedRange DOMRange passed to WebViewEditing delegate
3455 In setModifyBias, we must cache the start and the end
3456 because the calls to setBase and setExtent can modify
3457 them (added a testcase).
3458 The temporary SelectionController that we use in modify() to
3459 produce the proposed range that will be passed to
3460 shouldChangeSelectedDOMRange must have the same m_modifyBias
3461 as the original SelectionController, or else when the
3462 modification is performed, setModifyBias can swap the base
3463 and the extent incorrectly (added a testcase).
3464 Renamed m_modifyBias to m_lastChangeWasHorizontalExtension.
3465 Renamed setModifyBias to willBeModified.
3467 * editing/SelectionController.cpp:
3468 (WebCore::SelectionController::SelectionController):
3469 (WebCore::SelectionController::setSelection):
3470 (WebCore::SelectionController::willBeModified):
3471 (WebCore::SelectionController::modify):
3472 * editing/SelectionController.h:
3473 (WebCore::SelectionController::setLastChangeWasHorizontalExtension):
3474 * page/EventHandler.cpp:
3475 (WebCore::EventHandler::handleMousePressEventSingleClick):
3476 (WebCore::EventHandler::updateSelectionForMouseDragOverPosition):
3478 2007-05-10 Geoffrey Garen <ggaren@apple.com>
3480 Reviewed by Darin Adler.
3482 "IconDatabase::sharedIconDatabase()" => "iconDatabase()" for terseness,
3483 in the style of WebCore::cache().
3486 * history/HistoryItem.cpp: Removed retainIconInDatabase because calling
3487 "retain" in order to release something is really confusing and, now that
3488 iconDatabase() is more terse, we don't need this helper to shorten the
3489 syntax. (The isEmpty() check is also done by the database, so we don't
3492 (WebCore::IconDatabase::~IconDatabase): ASSERT that our destructor isn't
3493 called. We're a singleton, so it's confusing to have tear-down code.
3495 2007-05-10 Adele Peterson <adele@apple.com>
3499 WebCore part of fix for <rdar://problem/4100616> Doing a "find" in RSS doesn't scroll to result
3501 Test: fast/overflow/scroll-nested-positioned-layer-in-overflow.html
3503 Merged visibleSelectionRect into selectionRect. selectionRect() now takes an argument to determine
3504 whether or not to return a rect that clips to the visible content. This change makes all of the implementations of selectionRect
3505 consistent by having them all consider the repaint rect when clipping to visible content.
3508 (WebCore::Frame::revealSelection): Call selectionRect with clipToVisibleContent = false, so we can get a rect that's not visible to reveal.
3509 (WebCore::Frame::selectionRect): Added clipToVisibleContent argument, and merged visibleSelectionRect into this method.
3510 (WebCore::Frame::setIsActive): Use selectionRect instead of visibleSelectionRect.
3512 * page/mac/FrameMac.mm: (WebCore::Frame::selectionImage): Update layout before creating the image. Use selectionRect instead of visibleSelectionRect.
3513 * page/DragController.cpp: (WebCore::dragLocForSelectionDrag): Use selectionRect instead of visibleSelectionRect.
3515 * rendering/RenderBR.h: (WebCore::RenderBR::selectionRect): Updated argument.
3516 * rendering/RenderBlock.h: (WebCore::RenderBlock::selectionRect): ditto.
3517 * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::selectionRect): ditto.
3518 * rendering/RenderSVGInlineText.h: ditto.
3519 * rendering/RenderObject.h:
3520 (WebCore::RenderObject::selectionRect): ditto.
3521 (WebCore::RenderObject::SelectionInfo::SelectionInfo): ditto.
3522 * rendering/RenderView.cpp:
3523 (WebCore::RenderView::selectionRect): ditto.
3524 (WebCore::RenderView::setSelection): ditto.
3525 * rendering/RenderView.h:
3527 * rendering/RenderText.h:
3528 * rendering/RenderText.cpp: (WebCore::RenderText::selectionRect): Only call computeAbsoluteRepaintRect when clipping to visible content.
3529 Otherwise, just adjust the rect to the correct position.
3530 * rendering/RenderListMarker.h:
3531 * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::selectionRect):
3532 To match what we do in RenderText, if we're trying to clip to visible content, just call computeAbsoluteRepaintRect.
3533 * rendering/RenderReplaced.h:
3534 * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::selectionRect): ditto.
3536 * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollRectToVisible): Check for a parent layer at the beginning, so we can try to scroll all of our parent layers
3537 first, before trying to scroll the top level view. Also, don't try to scroll overflow layers that have -webkit-line-clamp restricting the height.
3538 This will prevent us from revealing text hidden by the slider in Safari RSS.
3540 * WebCore.exp: Update symbols for WebKit.
3542 2007-05-10 David Hyatt <hyatt@apple.com>
3546 <rdar://problem/5195272> REGRESSION: broke outline rings for continuations
3547 with empty inline containers
3549 http://bugs.webkit.org/show_bug.cgi?id=13667
3551 Make sure to only include collapsed top/bottom margins of the block portion
3552 of the continuation if we know for sure that we have inline line boxes before
3553 and after that would prevent the collapse from going further.
3555 In plain English: the focus rings were too tall. :)
3559 * rendering/RenderFlow.cpp:
3560 (WebCore::RenderFlow::addFocusRingRects):
3562 2007-05-10 David Hyatt <hyatt@apple.com>
3566 <rdar://problem/5067235> REGRESSION: Excessively wide table, impossible to resize
3568 The table used white-space: pre-wrap, which is supported only by WebKit. There
3569 was a bug with the computation of min pref width for pre-wrap text.
3571 Reviewed by mitzpettel
3573 fast/text/white-space/pre-wrap-line-test.html
3575 * rendering/RenderText.cpp:
3576 (WebCore::RenderText::calcPrefWidths):
3578 2007-05-10 Brady Eidson <beidson@apple.com>
3582 Cleanup from my earlier Java Applet patch. We should keep a central location to query if
3583 a mime type counts as a Java Applet
3585 * html/HTMLObjectElement.cpp:
3586 (WebCore::HTMLObjectElement::containsJavaApplet): Query MimeTypeRegistry on the type
3588 * platform/MimeTypeRegistry.cpp:
3589 (WebCore::MimeTypeRegistry::isSupportedImageMIMEType): Update style
3590 (WebCore::MimeTypeRegistry::isSupportedImageResourceMIMEType): Ditto
3591 (WebCore::MimeTypeRegistry::isSupportedNonImageMIMEType): Ditto
3592 (WebCore::MimeTypeRegistry::isJavaAppletMIMEType): Perform the Java Applet check
3593 * platform/MimeTypeRegistry.h:
3595 * rendering/RenderPartObject.cpp:
3596 (WebCore::RenderPartObject::updateWidget): Query MimeTypeRegistry on the type