1 2007-05-25 Anders Carlsson <andersca@apple.com>
5 * bindings/js/kjs_html.cpp:
6 (KJS::HTMLElementFunction::callAsFunction):
8 2007-05-25 Anders Carlsson <andersca@apple.com>
12 <rdar://problem/5226788> After resizing the window larger than the image, hovering over the image still shows magnify glass
14 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
15 after it has been zoomed in.
17 * loader/ImageDocument.cpp:
18 (WebCore::ImageDocument::windowSizeChanged):
20 2007-05-25 John Sullivan <sullivan@apple.com>
22 Reviewed by Anders and Tim
25 <rdar://problem/5226000> REGRESSION: In Gmail and Mail, a hang occurs when attempting to grammar/spellcheck a word in a reply
28 (WebCore::findFirstBadGrammarInRange):
29 Use the more obvious way to check whether a range is empty. In this case the more obvious way
30 would also have caused no problem to occur. Also added an assertion. Though this change is
31 enough to fix the symptom of the bug, the real fix is in WebKit.
33 2007-05-25 Anders Carlsson <andersca@apple.com>
35 Reviewed by Darin (Sorta).
37 * loader/ImageDocument.cpp:
38 (WebCore::ImageDocument::restoreImageSize):
39 Use removeProperty here.
41 2007-05-25 Geoffrey Garen <ggaren@apple.com>
43 Reviewed by Darin Adler.
45 Some cleanup to Cache while Fixing <rdar://problem/5055182> The page cache
48 * loader/Cache.cpp: Removed destructor to help identify this class as a
51 * loader/Cache.h: Made constructor and destructor private to match the
52 singleton model of PageCache.
54 Put structs related to Cache inside its declaration to fix some namespace
55 conflicts I had while writing my patch. (They don't exist anymore, but
56 I figured this might help future development.)
58 2007-05-24 Geoffrey Garen <ggaren@apple.com>
60 Reviewed by Darin Adler.
62 Fixed a bug with Settings where a number of different objects held bare
63 Settings* data members, even though the Page owns the Settings object and
64 deletes it upon destruction.
66 Added NULL checks since the Page can be deleted before the frame/document.
68 * page/Settings.cpp: Removed reliance on setNeedsReapplyStylesForSettingsChange.
70 * css/cssstyleselector.cpp: CSSStyleSelector was the worst offender. It
71 held a number of back pointers that were not guaranteed. I removed the
72 Settings*, Frame*, and FrameView* back pointers, but others could probably
73 go, too. I replaced them with a single Document* pointer, which is guaranteed
74 because the Document owns the CSSStyleSelector.
76 * page/Page.cpp: Removed setNeedsReapplyStylesForSettingsChange -- the
77 Settings object is now a proper subcontroller of Page, so it doesn't need
78 to use a global table to find its page anymore. Also, this function
79 confusingly implied that the Frames in a page can have heterogeneous settings,
82 2007-05-25 David Hyatt <hyatt@apple.com>
84 Make sure -webkit-border-fit accounts for padding as well as border.
88 * rendering/RenderBlock.cpp:
89 (WebCore::RenderBlock::borderFitAdjust):
91 2007-05-25 David Hyatt <hyatt@apple.com>
93 Rework line numbering (again). This time I finally think I have
94 it right for all the document.write insanity that can occur.
98 * html/HTMLParser.cpp:
99 (WebCore::HTMLParser::reportErrorToConsole):
100 * html/HTMLParserErrorCodes.cpp:
101 (WebCore::htmlParserDocumentWriteMessage):
102 * html/HTMLParserErrorCodes.h:
103 * html/HTMLTokenizer.cpp:
104 (WebCore::HTMLTokenizer::write):
105 * html/HTMLTokenizer.h:
106 (WebCore::HTMLTokenizer::lineNumberPtr):
107 (WebCore::HTMLTokenizer::processingContentWrittenByScript):
108 * platform/SegementedSring.cpp
109 (WebCore::SegmentedString::setExcludeLineNumbers):
110 * platform/SegmentedString.h:
111 (WebCore::SegmentedSubstring::SegmentedSubstring):
112 (WebCore::SegmentedSubstring::clear):
113 (WebCore::SegmentedSubstring::excludeLineNumbers):
114 (WebCore::SegmentedSubstring::setExcludeLineNumbers):
115 (WebCore::SegmentedString::excludeLineNumbers):
116 (WebCore::SegmentedString::advance):
118 2007-05-24 Geoffrey Garen <ggaren@apple.com>
120 Reviewed by Adam Roben.
122 Added a debug-only CachedPage counter. This helped me track down an SVG
123 timer bug in my recent page cache work.
125 * history/CachedPage.cpp:
127 2007-05-24 David Hyatt <hyatt@apple.com>
129 Improve <form> error reporting to catch <form>s inside table parts.
130 Tweak the wording of some of the error messages to be a bit better.
134 * html/HTMLParser.cpp:
135 (WebCore::HTMLParser::insertNode):
136 (WebCore::HTMLParser::processCloseTag):
137 (WebCore::HTMLParser::popBlock):
138 * html/HTMLParserErrorCodes.cpp:
139 (WebCore::htmlParserErrorMessageTemplate):
140 * html/HTMLParserErrorCodes.h:
142 2007-05-24 Rob Buis <buis@kde.org>
146 http://bugs.webkit.org/show_bug.cgi?id=4104
147 first-letter not updating style with hover
148 http://bugs.webkit.org/show_bug.cgi?id=13169
149 css-formatted first letter won't hide dynamically
151 Update first letter when RenderBlock::setStyle is called.
153 * css/cssstyleselector.cpp:
154 (WebCore::CSSStyleSelector::checkOneSelector):
156 (WebCore::Document::Document):
157 (WebCore::Document::createElement):
159 (WebCore::Document::usesFirstLetterRules):
160 (WebCore::Document::setUsesFirstLetterRules):
161 * rendering/RenderBlock.cpp:
162 (WebCore::RenderBlock::setStyle):
163 (WebCore::RenderBlock::updateFirstLetter):
165 2007-05-24 Mitz Pettel <mitz@webkit.org>
169 - fix http://bugs.webkit.org/show_bug.cgi?id=13800
170 REGRESSION: Moving a slider moves another unrelated slider
172 Test: fast/forms/slider-thumb-shared-style.html
174 RenderSlider mutates the thumb's style, therefore it must not be shared
175 with another slider's thumb, a situation that could occur if the sliders
176 themselves shared style.
178 * rendering/RenderSlider.cpp:
179 (WebCore::RenderSlider::createThumbStyle): Always use a private copy for
182 2007-05-24 Adele Peterson <adele@apple.com>
186 Fix for <rdar://problem/5211921> Form values sometimes get transposed (iGoogle)
188 Test: fast/history/redirect-load-no-form-restoration.html
190 * history/HistoryItem.cpp:
191 (WebCore::HistoryItem::setURL): Clear the document state when the url changes for a HistoryItem.
192 (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.
193 * history/HistoryItem.h:
194 * loader/FrameLoader.cpp: (WebCore::FrameLoader::saveDocumentState): Only set the document (and form) state if the document is current for the history item.
196 2007-05-24 Mitz Pettel <mitz@webkit.org>
200 - fix http://bugs.webkit.org/show_bug.cgi?id=13857
201 REGRESSION: onChange function applied to select element executes twice when focus is set
203 Test: fast/forms/select-double-onchange.html
205 * html/HTMLSelectElement.cpp:
206 (WebCore::HTMLSelectElement::menuListOnChange): Changed to update m_lastOnChangeIndex
207 before dispatching the change event to avoid reentrancy.
209 2007-05-24 Darin Adler <darin@apple.com>
213 - fix <rdar://problem/5226451> REGRESSION (21618): Mail block quotes
214 are missing the lines on the side
216 This patch fixes three problems:
218 1) makes the "skip canLoad check" boolean also skip the check
219 that prevents any loads while the document is in provisional
220 state; this is the proximate cause of the bug
222 * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::create):
223 Don't check the frame's state if skipCanLoadCheck is true.
225 2) moves the "skip canLoad check" boolean to the Request object;
226 the old implementation would cause that flag to affect the
227 new request we served, which might not be the resource with
230 3) fixes error-handling code path that would leak requests
232 * html/HTMLImageLoader.cpp: (WebCore::HTMLImageLoader::updateFromElement):
233 Pass false to the CachedImage constructor to indicate we are not making
234 this object for the cache.
237 (WebCore::createResource): Pass true to the CachedImage constructor to
238 indicate we are making this object for the cache.
239 (WebCore::Cache::requestResource): Add new code that assumes the object
240 will already have the inCache bit set, and that will delete the object
241 and return 0 if the cache is disabled and the load failed.
243 * loader/CachedImage.h:
244 * loader/CachedImage.cpp: (WebCore::CachedImage::CachedImage):
245 Added a forCache boolean parameter. Always false for the constructor
246 that's only used outside the cache code, and passed in as a boolean
247 for the constructor that's used both in cache and outside cache.
249 * loader/CachedResource.h:
250 * loader/CachedResource.cpp:
251 (WebCore::CachedResource::CachedResource): Added a forCache boolean
252 parameter that determines the initial state of the m_inCache flag.
253 This is needed to prevent a resource from being destroyed if an
254 error occurs during the initial load.
256 * loader/DocLoader.cpp:
257 (WebCore::DocLoader::requestCSSStyleSheet): Added FIXME.
258 (WebCore::DocLoader::setLoadInProgress): Added null check.
261 * loader/Request.cpp: (WebCore::Request::Request):
262 Added a shouldSkipCanLoadCheck boolean here, since we need to track
263 this for each request.
267 (WebCore::Loader::load): Pass the skipCanLoadCheck boolean to the
268 Request constructor rather than to the servePendingRequests function.
269 (WebCore::Loader::servePendingRequests): Add a loop so we can handle
270 cases where the request fails immediately without leaking the request
271 and thinking that we're loading forever.
273 2007-05-24 David Hyatt <hyatt@apple.com>
275 Add error reporting for residual style.
279 * html/HTMLParser.cpp:
280 (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
281 (WebCore::HTMLParser::reopenResidualStyleTags):
282 * html/HTMLParserErrorCodes.cpp:
283 (WebCore::htmlParserErrorMessageTemplate):
284 * html/HTMLParserErrorCodes.h:
286 2007-05-24 David Hyatt <hyatt@apple.com>
288 Report <script/> as a warning instead of an error for now, since we
289 actually do close it. (Sigh.)
293 * html/HTMLParser.cpp:
294 (WebCore::HTMLParser::parseToken):
295 (WebCore::HTMLParser::reportErrorToConsole):
296 * html/HTMLParserErrorCodes.cpp:
297 (WebCore::htmlParserErrorMessageTemplate):
298 (WebCore::isWarning):
299 * html/HTMLParserErrorCodes.h:
301 2007-05-24 David Hyatt <hyatt@apple.com>
303 Add error reporting for the </p> -> <p></p> quirk.
305 Add error reporting when a stray close tag is encountered with no
306 corresponding open tag.
310 * html/HTMLParser.cpp:
311 (WebCore::HTMLParser::HTMLParser):
312 (WebCore::HTMLParser::processCloseTag):
313 (WebCore::HTMLParser::popBlock):
315 (WebCore::HTMLParser::popBlock):
316 * html/HTMLParserErrorCodes.cpp:
317 (WebCore::htmlParserErrorMessageTemplate):
318 * html/HTMLParserErrorCodes.h:
320 2007-05-24 Kevin McCullough <kmccullough@apple.com>
324 - Rolling back change to fix the build until I have a good fix for data: urls.
327 * loader/FrameLoader.cpp:
328 (WebCore::FrameLoader::load):
329 (WebCore::FrameLoader::open):
330 * platform/String.cpp:
332 2007-05-24 David Hyatt <hyatt@apple.com>
334 Add two more error messages to the HTMLParser.
336 Report when the </br> -> <br> quirk is triggered.
338 Also report whenever the broken XML self-closing tag syntax is used on
339 tags that can actually have an end tag (either optional or required).
343 * html/HTMLParser.cpp:
344 (WebCore::HTMLParser::parseToken):
345 * html/HTMLParserErrorCodes.cpp:
346 (WebCore::htmlParserErrorMessageTemplate):
347 * html/HTMLParserErrorCodes.h:
349 * html/HTMLTokenizer.cpp:
350 (WebCore::HTMLTokenizer::parseTag):
351 * html/HTMLTokenizer.h:
352 (WebCore::Token::reset):
354 2007-05-24 Sam Weinig <sam@webkit.org>
358 Rename JSHTMLFrameSetCustom.cpp to JSHTMLFrameSetElementCustom.cpp
361 * WebCore.xcodeproj/project.pbxproj:
362 * bindings/js/JSHTMLFrameSetCustom.cpp: Removed.
363 * bindings/js/JSHTMLFrameSetElementCustom.cpp: Added.
365 2007-05-24 David Hyatt <hyatt@apple.com>
367 Fix for <rdar://problem/5208440> (13753)
369 REGRESSION: Raw text needs to be pulled outside of tables
373 * html/HTMLParser.cpp:
374 (WebCore::HTMLParser::handleError):
375 * html/HTMLTableColElement.cpp:
376 (WebCore::HTMLTableColElement::checkDTD):
377 * html/HTMLTableElement.cpp:
378 (WebCore::HTMLTableElement::checkDTD):
379 * html/HTMLTableRowElement.cpp:
380 (WebCore::HTMLTableRowElement::checkDTD):
381 * html/HTMLTableSectionElement.cpp:
382 (WebCore::HTMLTableSectionElement::checkDTD):
384 2007-05-24 Mitz Pettel <mitz@webkit.org>
388 - fix http://bugs.webkit.org/show_bug.cgi?id=13837
389 Separator in new <select> widget disappears when block element with border is in document.
391 Test: fast/forms/menulist-separator-painting.html
393 * platform/graphics/cg/GraphicsContextCG.cpp:
394 (WebCore::GraphicsContext::drawConvexPolygon): Changed this function to
395 actually do both filling and stroking when needed, even though all existing
396 callers set the stroke to none.
397 * rendering/RenderThemeMac.mm:
398 (WebCore::RenderThemeMac::paintMenuListButton): Added calls to set the stroke
399 style and thickness when painting the arrows and the separator.
401 2007-05-24 Timothy Hatcher <timothy@apple.com>
403 Reviewed by Sam Weinig.
405 Remove the OBJC_NEW_PROPERTIES #ifdef and only export the new @property syntax.
407 * bindings/objc/DOMObject.h:
408 * bindings/scripts/CodeGeneratorObjC.pm:
410 2007-05-24 Sam Weinig <sam@webkit.org>
414 Uncomment HTMLFramesSetElement constructor now that it exists.
416 * page/DOMWindow.idl:
418 2007-05-24 Anders Carlsson <andersca@apple.com>
420 Try fixing the buildbot build.
422 * loader/ImageDocument.cpp:
423 (WebCore::ImageDocument::resizeImageToFit):
424 (WebCore::ImageDocument::imageClicked):
426 2007-05-24 Sam Weinig <sam@webkit.org>
430 Patch for http://bugs.webkit.org/show_bug.cgi?id=13853
431 Autogenerate the JS bindings for the HTMLFrameSetElement
433 * DerivedSources.make:
435 * WebCore.xcodeproj/project.pbxproj:
436 * bindings/js/JSHTMLElementWrapperFactory.cpp:
437 * bindings/js/JSHTMLFrameSetCustom.cpp: Added.
438 (WebCore::JSHTMLFrameSetElement::canGetItemsForName):
439 (WebCore::JSHTMLFrameSetElement::nameGetter):
440 * bindings/js/kjs_html.cpp:
442 (KJS::JSHTMLElement::classInfo):
443 (KJS::JSHTMLElement::accessors):
444 (KJS::JSHTMLElement::getOwnPropertySlot):
445 * bindings/js/kjs_html.h:
446 (KJS::JSHTMLElement::):
447 * html/HTMLFrameSetElement.idl:
449 2007-05-24 Zack Rusin <zrusin@trolltech.com>
453 Fixing check for incorrent font size - it should
454 check fixed not normal.
457 (WebCore::Settings::setDefaultFixedFontSize):
459 2007-05-24 Mitz Pettel <mitz@webkit.org>
461 Speculative buildbot build fix.
463 * css/cssstyleselector.cpp:
464 (WebCore::CSSStyleSelector::applyProperty):
466 2007-05-24 Adam Roben <aroben@apple.com>
468 Made Chrome::addMessageToConsole more flexible
470 addMessageToConsole now takes two additional parameters to specify the
471 message source (HTML, JS, CSS, XML) and level (error, warning, log). To
472 maintain our old behavior, all current messages were given
473 JSMessageSource and ErrorMessageLevel parameters. Messages matching
474 these characteristics are passed up to the ChromeClient.
478 * bindings/js/JSCustomXPathNSResolver.cpp:
479 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
480 * bindings/js/kjs_events.cpp:
481 (KJS::JSAbstractEventListener::handleEvent):
482 * bindings/js/kjs_proxy.cpp:
483 (WebCore::KJSProxy::evaluate):
484 * bindings/js/kjs_window.cpp:
485 (KJS::Window::isSafeScript):
486 (KJS::ScheduledAction::execute):
487 * html/HTMLParser.cpp:
488 (WebCore::HTMLParser::reportErrorToConsole):
489 * ksvg2/misc/SVGDocumentExtensions.cpp:
490 (WebCore::SVGDocumentExtensions::reportWarning):
491 (WebCore::SVGDocumentExtensions::reportError):
492 * loader/FrameLoader.cpp:
493 (WebCore::FrameLoader::reportLocalLoadFailed):
495 (WebCore::Chrome::addMessageToConsole):
498 * xml/xmlhttprequest.cpp:
499 (WebCore::XMLHttpRequest::setRequestHeader):
501 2007-05-24 David Hyatt <hyatt@apple.com>
503 Rework how HTML handles line numbering so that it is not fooled by
504 \r without a following \n and so that document.write doesn't lead
505 to line numbering confusion.
509 * html/HTMLParser.cpp:
510 (WebCore::HTMLParser::reportErrorToConsole):
511 * html/HTMLTokenizer.cpp:
512 (WebCore::HTMLTokenizer::processListing):
513 (WebCore::HTMLTokenizer::parseSpecial):
514 (WebCore::HTMLTokenizer::parseComment):
515 (WebCore::HTMLTokenizer::parseServer):
516 (WebCore::HTMLTokenizer::parseProcessingInstruction):
517 (WebCore::HTMLTokenizer::parseText):
518 (WebCore::HTMLTokenizer::parseEntity):
519 (WebCore::HTMLTokenizer::parseTag):
520 (WebCore::HTMLTokenizer::write):
521 (WebCore::HTMLTokenizer::processToken):
522 (WebCore::HTMLTokenizer::setSrc):
523 * html/HTMLTokenizer.h:
524 (WebCore::HTMLTokenizer::lineNumberPtr):
525 * html/HTMLViewSourceDocument.cpp:
526 (WebCore::HTMLViewSourceDocument::addLine):
527 * loader/TextDocument.cpp:
528 (WebCore::TextTokenizer::write):
529 * platform/SegmentedString.cpp:
530 (WebCore::SegmentedString::SegmentedString):
531 (WebCore::SegmentedString::operator=):
532 (WebCore::SegmentedString::clear):
533 * platform/SegmentedString.h:
534 (WebCore::SegmentedString::SegmentedString):
535 (WebCore::SegmentedString::advance):
536 (WebCore::SegmentedString::escaped):
538 2007-05-23 David Hyatt <hyatt@apple.com>
540 Make the delete/InsertRows/Cells methods as well as the rowIndex method
541 able to work properly even when whitespace or comment nodes are present.
545 fast/table/rowindex-comment-nodes.html
547 * html/HTMLTableRowElement.cpp:
548 (WebCore::HTMLTableRowElement::rowIndex):
549 (WebCore::HTMLTableRowElement::insertCell):
550 (WebCore::HTMLTableRowElement::deleteCell):
551 * html/HTMLTableSectionElement.cpp:
552 (WebCore::HTMLTableSectionElement::insertRow):
553 (WebCore::HTMLTableSectionElement::deleteRow):
555 2007-05-23 David Hyatt <hyatt@apple.com>
557 <optgroup> should allow <script> and text nodes inside it, just like
562 fast/forms/stuff-on-my-optgroup.html
564 * html/HTMLOptGroupElement.cpp:
565 (WebCore::HTMLOptGroupElement::checkDTD):
566 * html/HTMLSelectElement.cpp:
567 (WebCore::HTMLSelectElement::checkDTD):
569 2007-05-23 David Hyatt <hyatt@apple.com>
571 Framesets should allow whitespace text nodes as children.
575 * html/HTMLFrameSetElement.cpp:
576 (WebCore::HTMLFrameSetElement::checkDTD):
578 2007-05-24 Mark Rowe <mrowe@apple.com>
580 Fix the Qt build after r21685.
582 * platform/qt/CursorQt.cpp:
583 (WebCore::notAllowedCursor):
584 (WebCore::zoomInCursor):
585 (WebCore::zoomOutCursor):
587 2007-05-23 Alp Toker <alp.toker@collabora.co.uk>
591 Fix the gdk build following changes in r21685.
593 * platform/gdk/CursorGdk.cpp:
594 (WebCore::zoomInCursor):
595 (WebCore::zoomOutCursor):
597 2007-05-23 David Hyatt <hyatt@apple.com>
599 Fix for <rdar://problem/5222611> REGRESSION: Paint ordering problems at
600 http://buymeasoda.com/dev/issues/image_onload/image_onload.html
602 Clamp z-index so that values that exceed maxint (or that are below minint)
603 are clamped to those values.
607 * css/cssstyleselector.cpp:
608 (WebCore::CSSStyleSelector::applyProperty):
610 2007-05-23 Mitz Pettel <mitz@webkit.org>
612 Reviewed by David Hyatt.
614 - fix http://bugs.webkit.org/show_bug.cgi?id=13563
615 REGRESSION: Crash loading message in Yahoo! Mail
617 Tests: fast/css/stale-style-selector-crash-1.html
618 fast/css/stale-style-selector-crash-2.html
621 (WebCore::Document::Document): Initialize the m_didCalculateStyleSelector
623 (WebCore::Document::updateStyleSelector): Do not bail out if we have ever
624 calculated a non-trivial style selector, even if at the moment we are
625 pending style sheets. We could have calculated a non-trivial selector
626 already either because at some point there were no pending style sheets
627 (so the currently pending ones were added dynamically) or because we were
628 forced to do a layout ignoring pending style sheets. Either way, once
629 there is a style selector, we need to keep it up to date, otherwise we can
630 crash under recalcStyle() during updateRendering() or simply not recalculate
631 style correctly for dynamic changes.
632 (WebCore::Document::recalcStyleSelector): Set m_didCalculateStyleSelector
633 to 'true' when creating a new style selector.
636 2007-05-23 Anders Carlsson <andersca@apple.com>
640 <rdar://problem/5224749> Show a zoom/unzoom cursor for resizable image documents
642 * WebCore.xcodeproj/project.pbxproj:
643 Install the zoom cursors.
645 * loader/ImageDocument.cpp:
646 (WebCore::ImageDocument::resizeImageToFit):
647 Set the cursor to the zoom in cursor.
649 (WebCore::ImageDocument::restoreImageSize):
650 If the image fits, reset the cursor. Otherwise, set it to the zoom in cursor.
652 2007-05-23 Darin Adler <darin@apple.com>
656 - fix problems where unrendered nodes were affecting on plain text serialization
658 * editing/TextIterator.cpp:
659 (WebCore::TextIterator::advance): Don't call handleXXX functions or exitNode for
660 nodes without renderers.
661 (WebCore::shouldEmitNewlineAfterNode): Only consider rendered nodes when deciding
662 if this is the last node in the document.
664 2007-05-23 Anders Carlsson <andersca@apple.com>
668 <rdar://problem/3663808> Resize large images to fit in the browser window
671 Add new settings method.
673 * loader/ImageDocument.cpp:
674 (WebCore::ImageEventListener::ImageEventListener):
675 New class that handles resize events and click events and forwards them to the image document.
677 (WebCore::ImageTokenizer::ImageTokenizer):
678 (WebCore::ImageTokenizer::writeRawData):
679 (WebCore::ImageTokenizer::finish):
680 (WebCore::ImageDocument::ImageDocument):
681 (WebCore::ImageDocument::createDocumentStructure):
682 (WebCore::ImageDocument::cachedImage):
683 Let the ImageDocument class keep track of its document structure.
685 (WebCore::ImageDocument::scale):
686 Returns the scale that should be used when resizing the image.
688 (WebCore::ImageDocument::resizeImage):
689 Update the image size.
691 (WebCore::ImageDocument::imageClicked):
692 Toggle between resized and not resized. When restoring the size, scroll the image so that the area under
693 the mouse stays the same.
695 (WebCore::ImageDocument::imageChanged):
696 When the image size is known, resize the image if needed.
698 (WebCore::ImageDocument::restoreImageSize):
699 Restore the image size.
701 (WebCore::ImageDocument::imageNeedsResizing):
702 Return whether the image is too big for its window or not.
704 (WebCore::ImageDocument::windowSizeChanged):
705 Called when the window's size changes. Determine if the window fits or not and resize it if it doesn't fit.
707 (WebCore::ImageEventListener::handleEvent):
708 Forward events to the image document.
711 (WebCore::Settings::Settings):
712 (WebCore::Settings::setEnableAutomaticImageResizing):
714 (WebCore::Settings::enableAutomaticImageResizing):
717 2007-05-23 Anders Carlsson <andersca@apple.com>
721 Add -webkit-zoom-in and -webkit-zoom-out cursors.
723 * Resources/zoomInCursor.png: Added.
724 * Resources/zoomOutCursor.png: Added.
725 * css/CSSComputedStyleDeclaration.cpp:
726 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
727 * css/CSSValueKeywords.in:
728 * page/EventHandler.cpp:
729 (WebCore::selectCursor):
731 * platform/mac/CursorMac.mm:
732 (WebCore::zoomInCursor):
733 (WebCore::zoomOutCursor):
734 * rendering/RenderStyle.h:
737 2007-05-23 Sam Weinig <sam@webkit.org>
741 Part one of patch for http://bugs.webkit.org/show_bug.cgi?id=13830
742 Auto-generate JS DOM bindings for HTMLDocument and most of the rest
745 - Just the HTMLElement part.
747 * bindings/js/kjs_html.cpp:
748 (KJS::JSHTMLElement::getValueProperty):
749 (KJS::JSHTMLElement::putValueProperty):
750 * bindings/js/kjs_html.h:
751 (KJS::JSHTMLElement::):
752 * html/HTMLElement.idl:
754 2007-05-22 Kevin McCullough <kmccullough@apple.com>
758 - rdar://problem/5183523
759 - 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.
761 * loader/FrameLoader.cpp:
762 (WebCore::FrameLoader::load):
763 (WebCore::FrameLoader::open):
764 * platform/PlatformString.h:
765 (WebCore::debugPrintString):
767 2007-05-23 Sam Weinig <sam@webkit.org>
771 Part two of patch for http://bugs.webkit.org/show_bug.cgi?id=13830
772 Auto-generate JS DOM bindings for HTMLDocument and most of the rest
775 - Just the HTMLDocument part.
778 * WebCore.xcodeproj/project.pbxproj:
779 * bindings/js/JSHTMLDocumentCustom.cpp: Added.
780 (WebCore::JSHTMLDocument::canGetItemsForName):
781 (WebCore::JSHTMLDocument::nameGetter):
782 (WebCore::JSHTMLDocument::all):
783 (WebCore::JSHTMLDocument::setAll):
784 (WebCore::JSHTMLDocument::location):
785 (WebCore::JSHTMLDocument::setLocation):
786 (WebCore::JSHTMLDocument::open):
787 (WebCore::writeHelper):
788 (WebCore::JSHTMLDocument::write):
789 (WebCore::JSHTMLDocument::writeln):
790 (WebCore::JSHTMLDocument::clear):
791 * bindings/js/kjs_dom.cpp:
793 * bindings/js/kjs_dom.h:
794 * bindings/js/kjs_html.cpp:
795 * bindings/js/kjs_html.h:
796 * bindings/objc/DOMPrivate.h:
797 * bindings/scripts/CodeGeneratorJS.pm: Add [Deletable] property
798 for Document.all and fix HasOverridingNameGetter to allow correct
801 (WebCore::Document::plugins): adds alias to embeds() for bindings
803 * html/HTMLDocument.cpp:
804 (WebCore::HTMLDocument::width):
805 (WebCore::HTMLDocument::height):
806 (WebCore::HTMLDocument::dir):
807 (WebCore::HTMLDocument::setDir):
808 (WebCore::HTMLDocument::designMode):
809 (WebCore::HTMLDocument::setDesignMode):
810 (WebCore::HTMLDocument::bgColor):
811 (WebCore::HTMLDocument::setBgColor):
812 (WebCore::HTMLDocument::fgColor):
813 (WebCore::HTMLDocument::setFgColor):
814 (WebCore::HTMLDocument::alinkColor):
815 (WebCore::HTMLDocument::setAlinkColor):
816 (WebCore::HTMLDocument::linkColor):
817 (WebCore::HTMLDocument::setLinkColor):
818 (WebCore::HTMLDocument::vlinkColor):
819 (WebCore::HTMLDocument::setVlinkColor):
820 (WebCore::HTMLDocument::captureEvents):
821 (WebCore::HTMLDocument::releaseEvents):
822 * html/HTMLDocument.h:
823 * html/HTMLDocument.idl:
825 2007-05-23 David Hyatt <hyatt@apple.com>
827 Fix for <rdar://problem/5221838> REGRESSION (r21581): no content in idisk
830 Back out the change to make self-closed <script/> into a Dashboard quirk
835 * html/HTMLTokenizer.cpp:
836 (WebCore::HTMLTokenizer::parseTag):
838 2007-05-23 Patti <patti@apple.com>
840 Reviewed by David Harrison.
842 <rdar://problem/5078453> AXNext/PrevLineEndTextMarkerForTextMarker returns kAXErrorNoValue for attachment range
844 Floating objects, such as aligned images, are not included as part of any line. So when the given
845 text marker is on the floating object, the returned line edge cannot be found and asserts are fired.
846 In addition, this paints an inconsistent text layout (in the accessibility sense) of where the floating
847 object resides. Character/word methods report floating object at the beginning of the text line(s). Yet
848 line methods never present floating objects anywhere.
849 To fix this, the ax line methods will now do more checking to ensure floating object nodes are included
850 when determining the line range/position. That way, assistive apps won't get stuck using the line methods
853 * bridge/mac/WebCoreAXObject.mm:
854 (updateAXLineStartForVisiblePosition):
855 Added a helper method to adjust line start position to account for floating objects
856 (-[WebCoreAXObject doAXLeftLineTextMarkerRangeForTextMarker:]):
857 (-[WebCoreAXObject doAXRightLineTextMarkerRangeForTextMarker:]):
858 (-[WebCoreAXObject doAXNextLineEndTextMarkerForTextMarker:]):
859 (-[WebCoreAXObject doAXPreviousLineStartTextMarkerForTextMarker:]):
860 Fixed up line routines to include floating object nodes in line position calculation.
861 startOfLine/endOLine may return null for position next to a floating position. So now there's extra checks to prevent
862 returning null line position/ranges back to AX.
865 2007-05-23 Simon Hausmann <hausmann@kde.org>
867 Reviewed by Zack, discussed also with Lars.
869 Make it possible to have per-QWebPage network interface
872 * platform/network/qt/ResourceHandleQt.cpp:
873 (WebCore::ResourceHandle::start): Pass the page's network interface to
876 2007-05-23 Rob Buis <buis@kde.org>
878 Reviewed by Dave Hyatt.
880 http://bugs.webkit.org/show_bug.cgi?id=13174
881 line-height in font shorthand does not override a previously stated line-height property
883 Make sure line-height is calculated against definite font-size and
884 uses the last set line-height, ie. directly or through font shorthand.
886 * css/cssstyleselector.cpp:
887 (WebCore::CSSStyleSelector::styleForElement):
888 (WebCore::CSSStyleSelector::pseudoStyleForElement):
889 (WebCore::CSSStyleSelector::applyDeclarations):
890 (WebCore::CSSStyleSelector::applyProperty):
891 * css/cssstyleselector.h:
893 2007-05-23 Lars Knoll <lars@trolltech.com>
895 Reviewed by Zack and Valgrind
899 * platform/qt/PlatformMouseEventQt.cpp:
900 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
902 2007-05-23 Rob Buis <buis@kde.org>
906 http://bugs.webkit.org/show_bug.cgi?id=13784
907 REGRESSION (r13744-13750): Crash with empty gradient when drawing to canvas
909 Fix crash by testing for zero stops, and returning transparent black
912 * html/CanvasGradient.cpp:
913 (WebCore::CanvasGradient::getColor):
915 2007-05-23 Rob Buis <buis@kde.org>
919 http://bugs.webkit.org/show_bug.cgi?id=13801
920 Crash when loading nonexisting symbol
922 Check for referenced element and when not found just return.
924 * ksvg2/svg/SVGUseElement.cpp:
925 (WebCore::SVGUseElement::buildPendingResource):
927 2007-05-22 Sam Weinig <sam@webkit.org>
929 Rubber stamped by Adam.
933 * bindings/js/JSHTMLAnchorElementCustom.cpp:
935 2007-05-22 Sam Weinig <sam@webkit.org>
939 Patch for http://bugs.webkit.org/show_bug.cgi?id=13833
940 Add ObjC DOM binding for HTMLMarqeeElement
942 - Also adds missing DOMHTMLFramePrivate.
944 * DerivedSources.make:
945 * WebCore.xcodeproj/project.pbxproj:
946 * bindings/objc/DOM.mm:
947 (WebCore::createElementClassMap):
948 * bindings/objc/DOMHTML.h:
949 * bindings/objc/DOMInternal.h:
950 * bindings/objc/DOMPrivate.h:
951 * bindings/objc/PublicDOMInterfaces.h:
953 2007-05-22 Justin Garcia <justin.garcia@apple.com>
955 Reviewed by darin, who found the fix independently.
957 http://bugs.webkit.org/show_bug.cgi?id=13804
958 REGRESSION(r21611): Several new layout test pixel failures (misspelling markers)
960 r21611 exposed a bug in the way removeMarkers computes
961 the end of the range to remove markers from. It also
962 introduced a bug: removeMarkers expects a startOffset
963 and a length, not a startOffset and an endOffset (added
967 (WebCore::Document::removeMarkers): The other removeMarkers
968 expects a startOffset and a length, not a startOffset and
970 (WebCore::Document::removeMarkers): Fixed the endOffset
971 from length and startOffset calculation.
973 2007-05-22 David Hyatt <hyatt@apple.com>
975 Fix for bug 13802, background colors can't be reset to default
976 color. Fix the value cssText method to do the right thing for background
977 and background-position values.
981 fast/dom/background-shorthand-csstext.html
983 * css/CSSInitialValue.h:
984 (WebCore::CSSInitialValue:::m_implicit):
985 (WebCore::CSSInitialValue::isImplicitInitialValue):
986 * css/CSSMutableStyleDeclaration.cpp:
987 (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
988 (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue):
989 * css/CSSMutableStyleDeclaration.h:
991 (WebCore::CSSValue::isImplicitInitialValue):
993 (WebCore::CSSParser::parseValue):
994 (WebCore::CSSParser::parseBackgroundShorthand):
995 (WebCore::CSSParser::parseShorthand):
997 2007-05-22 Darin Adler <darin@apple.com>
1001 - fix <rdar://problem/5215830> REGRESSION: ebay.com layout is wrong
1003 The code on ebay was looking for the "document" property on a iframe.
1004 We changed that to be the ownerDocument rather than the contentDocument,
1005 which was not what ebay was expecting. The best fix seems to be removing
1006 the document property altogether.
1008 Test: fast/dom/iframe-document.html
1010 * bindings/js/kjs_html.h: Remove ElementDocument.
1011 * bindings/js/kjs_html.cpp: (KJS::JSHTMLElement::getValueProperty): Ditto.
1013 2007-05-22 Adele Peterson <adele@apple.com>
1017 A little cleanup from my last checkin.
1019 * page/Chrome.h: Formatting change.
1020 * page/mac/ChromeMac.mm: Fixed copyright.
1022 2007-05-22 Adele Peterson <adele@apple.com>
1026 Fix for http://bugs.webkit.org/show_bug.cgi?id=13796
1027 Crash in [NSInputContext currentInputContext] when you click on this map
1029 This is another case of <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
1031 Test: fast/frames/frame-display-none-focus.html
1033 * WebCore.xcodeproj/project.pbxproj: Added ChromeMac.mm
1035 * page/mac/ChromeMac.mm: Added.
1036 (WebCore::Chrome::focusNSView): Moved code from Widget::setFocus so it can be used whenever we need to make a view the first responder.
1037 * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::focusDocumentView): Calls focusNSView.
1038 * platform/mac/WidgetMac.mm: (WebCore::Widget::setFocus): Calls focusNSView.
1040 2007-05-22 Justin Garcia <justin.garcia@apple.com>
1044 <rdar://problem/4875189>
1045 List is deleted when replacing contents with Chinese/Japanese characters
1047 * editing/htmlediting.cpp:
1048 (WebCore::isSpecialElement): Lists are no longer special.
1049 They can be removed by removing their content and then
1050 then hitting delete inside of the empty list item that's
1051 left over. Even when that list item is the first thing
1052 in the editable region.
1054 2007-05-22 Darin Adler <darin@apple.com>
1056 Reviewed by Tim Hatcher.
1058 - fix <rdar://problem/5206089> REGRESSION: hovering over amazon.com "product categories"
1059 tab makes page content disappear
1061 The contentWindow property was doing a cross-frame security check, but it shouldn't.
1062 Window objects are responsible for protecting themselves from cross-frame activity.
1063 Because contentWindow returned undefined, we then ended up setting visibility on the
1064 body of the main frame to "hidden".
1066 No layout test yet. When we make cross-domain tests, we should include this one.
1068 * html/HTMLFrameElement.idl: Removed CheckFrameSecurity attribute from contentWindow.
1069 * html/HTMLIFrameElement.idl: Ditto.
1071 2007-05-22 Justin Garcia <justin.garcia@apple.com>
1075 <rdar://problem/5213963>
1076 REGRESSION(r21467): Active selection remains in text field after clicking on a button
1078 * page/EventHandler.cpp:
1079 (WebCore::EventHandler::dispatchMouseEvent): Call
1080 FocusController::setFocusedNode, because Document::setFocusedNode
1081 no longer clears the selection.
1082 Begin passing the new focused frame to
1083 FocusController::setFocusedNode, because when the
1084 new focus node is null, the selection should only be
1085 cleared if the focused frame isn't changing.
1086 (WebCore::Element::focus): Begin passing the new focused
1088 (WebCore::Element::blur): Ditto.
1089 * html/HTMLInputElement.cpp:
1090 (WebCore::HTMLInputElement::focus): Ditto.
1091 * html/HTMLTextAreaElement.cpp:
1092 (WebCore::HTMLTextAreaElement::focus): Ditto.
1094 (WebCore::Frame::setFocusedNodeIfNeeded): Ditto.
1095 * page/FocusController.cpp:
1096 (WebCore::clearSelectionIfNeeded): Take in the new
1097 focused frame. If it's not changing, don't clear the
1099 (WebCore::FocusController::setFocusedNode): Take
1100 in the new focused frame.
1101 * page/FocusController.h:
1103 2007-05-22 Marius Bugge Monsen <mbm@trolltech.com>
1107 Implement some more functions in ClipboardQt.
1109 * platform/qt/ClipboardQt.cpp:
1110 (WebCore::ClipboardQt::ClipboardQt):
1111 (WebCore::ClipboardQt::getData):
1112 (WebCore::ClipboardQt::setData):
1113 (WebCore::ClipboardQt::types):
1115 2007-05-21 Oliver Hunt <oliver@apple.com>
1119 Fix for http://bugs.webkit.org/show_bug.cgi?id=13789
1120 -- SVGLocatable::getScreenCTM() faulty
1122 Needed to update SVGLength to handle the case where the SVGElement is
1123 not the root document element -- we do this by falling back on the
1124 renderer for the context.
1126 For <svg> elements embedded as mixed content in xhtml we consider the
1127 absolutePosition of the parent to be the origin for the <svg> element.
1129 * ksvg2/svg/SVGLength.cpp:
1130 (WebCore::SVGLength::PercentageOfViewport):
1131 * ksvg2/svg/SVGSVGElement.cpp:
1132 (WebCore::SVGSVGElement::getScreenCTM):
1134 2007-05-21 Timothy Hatcher <timothy@apple.com>
1138 <rdar://problem/5084400> -[DOMRange lineBoxRects] returns an empty array when the DOM nodes have just been created
1140 Do a updateLayoutIgnorePendingStylesheets before asking the Node or Range for it's box rects.
1142 * bindings/objc/DOM.mm:
1143 (-[DOMNode boundingBox]):
1144 (-[DOMNode lineBoxRects]):
1145 (-[DOMRange boundingBox]):
1146 (-[DOMRange lineBoxRects]):
1148 2007-05-21 Sam Weinig <sam@webkit.org>
1150 Reviewed by George Staikos.
1154 * WebCore.pro: add missing IDL files.
1156 2007-05-21 Sam Weinig <sam@webkit.org>
1160 Patch for http://bugs.webkit.org/show_bug.cgi?id=13803
1161 Autogenerate the JS bindings for the HTMLMarqueeElement.
1163 * DerivedSources.make:
1164 * WebCore.xcodeproj/project.pbxproj:
1165 * bindings/js/JSHTMLElementWrapperFactory.cpp:
1166 * bindings/js/kjs_css.cpp:
1167 (KJS::DOMCSSRule::getOwnPropertySlot): Fix possible null pointer issue.
1168 (KJS::DOMCSSRule::put): Fix possible null pointer issue.
1169 * bindings/js/kjs_html.cpp:
1171 (KJS::JSHTMLElement::classInfo):
1172 (KJS::JSHTMLElement::accessors):
1173 (KJS::JSHTMLElement::getOwnPropertySlot): Fix null pointer issue.
1174 (KJS::HTMLElementFunction::callAsFunction):
1175 (KJS::JSHTMLElement::put):
1176 * bindings/js/kjs_html.h:
1177 (KJS::JSHTMLElement::):
1178 * html/HTMLMarqueeElement.cpp:
1179 (WebCore::HTMLMarqueeElement::start):
1180 (WebCore::HTMLMarqueeElement::stop):
1181 * html/HTMLMarqueeElement.h: Add start() and stop() functions.
1182 * html/HTMLMarqueeElement.idl: Added.
1183 * page/DOMWindow.idl: Add marquee constructor.
1185 2007-05-21 Adele Peterson <adele@apple.com>
1187 Fix by Darin, reviewed by me.
1189 Fix for <rdar://problem/5171145> Safari crashed closing tab in NSInputContext updateInputContexts
1191 * platform/mac/WidgetMac.mm:
1192 (WebCore::safeRemoveFromSuperview): Added. If the view is the window's first responder, then
1193 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.
1194 (WebCore::Widget::setFocus): Don't attempt to focus the view if it has no window.
1195 (WebCore::Widget::removeFromSuperview): Call safeRemoveFromSuperview.
1196 (WebCore::Widget::afterMouseDown): ditto.
1198 2007-05-21 David Hyatt <hyatt@apple.com>
1200 Make a line gutter backdrop so that tiny view source docs don't look
1205 * css/view-source.css:
1206 * html/HTMLViewSourceDocument.cpp:
1207 (WebCore::HTMLViewSourceDocument::createContainingTable):
1209 2007-05-21 David Hyatt <hyatt@apple.com>
1211 Make sure to distinguish between links to internal resources and
1212 real links (anchors) in view source mode.
1216 * css/view-source.css:
1217 * html/HTMLViewSourceDocument.cpp:
1218 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1219 (WebCore::HTMLViewSourceDocument::addLink):
1220 * html/HTMLViewSourceDocument.h:
1222 2007-05-21 Sam Weinig <sam@webkit.org>
1224 Reviewed by Adam and Darin.
1226 Patch for http://bugs.webkit.org/show_bug.cgi?id=13791
1227 Autogenerate the JS bindings for the HTMLIFrameElement and HTMLFrameElement.
1229 * DerivedSources.make:
1230 * WebCore.xcodeproj/project.pbxproj:
1231 * bindings/js/JSHTMLAnchorElementCustom.cpp:
1232 * bindings/js/JSHTMLElementWrapperFactory.cpp:
1233 * bindings/js/kjs_html.cpp:
1235 (KJS::JSHTMLElement::classInfo):
1236 (KJS::JSHTMLElement::accessors):
1237 (KJS::HTMLElementFunction::callAsFunction):
1238 * bindings/js/kjs_html.h:
1239 (KJS::JSHTMLElement::):
1240 * bindings/scripts/CodeGeneratorJS.pm:
1241 * html/HTMLFrameElement.idl:
1242 * html/HTMLFrameElementBase.cpp:
1243 (WebCore::HTMLFrameElementBase::location):
1244 * html/HTMLFrameElementBase.h:
1245 * html/HTMLFrameOwnerElement.h:
1246 (WebCore::HTMLFrameOwnerElement::contentWindow):
1247 * html/HTMLIFrameElement.idl:
1248 * page/DOMWindow.idl:
1250 2007-05-21 Lars Knoll <lars@trolltech.com>
1254 Remove the ResourceHandleManager class, it is now part of
1255 QWebNetworkInterface. Adapt ResourceHandle to the new way
1259 * platform/network/ResourceHandleInternal.h:
1260 (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1261 * platform/network/qt/ResourceHandleManagerKDE.cpp: Removed.
1262 * platform/network/qt/ResourceHandleManagerKDE.h: Removed.
1263 * platform/network/qt/ResourceHandleManagerQt.cpp: Removed.
1264 * platform/network/qt/ResourceHandleManagerQt.h: Removed.
1265 * platform/network/qt/ResourceHandleQt.cpp:
1266 (WebCore::ResourceHandle::~ResourceHandle):
1267 (WebCore::ResourceHandle::start):
1268 (WebCore::ResourceHandle::cancel):
1270 2007-05-21 David Hyatt <hyatt@apple.com>
1272 Second half of fix for 13793, make sure rules=groups works properly with
1275 Also make sure colgroups get an actual span of 1 (instead of incorrectly
1276 giving them a span of 0).
1280 fast/table/colgroup-spanning-groups-rules.html
1282 * html/HTMLTableColElement.cpp:
1283 (WebCore::HTMLTableColElement::HTMLTableColElement):
1284 * rendering/RenderTable.cpp:
1285 (WebCore::RenderTable::colElement):
1286 * rendering/RenderTable.h:
1287 * rendering/RenderTableCell.cpp:
1288 (WebCore::RenderTableCell::collapsedLeftBorder):
1289 (WebCore::RenderTableCell::collapsedRightBorder):
1291 2007-05-20 David Hyatt <hyatt@apple.com>
1293 Half of a fix for 13793, make sure rules=groups and border behave properly
1298 No tests added, two Mozilla table tests now pass that failed before.
1300 * html/HTMLTableElement.cpp:
1301 (WebCore::HTMLTableElement::getSharedCellDecl):
1303 2007-05-20 Brady Eidson <beidson@apple.com>
1305 Reviewed by Geoose Garen
1307 <rdar://problem/4758919> - Incorrect favicon shown for URL after going back
1309 When restoring a cached page, we'd try to kick off the icon load for it, which ended up causing
1310 shenanigans with the icon url -> page url mapping.
1312 * loader/FrameLoader.cpp:
1313 (WebCore::FrameLoader::endIfNotLoading): Only try an icon load if we're not restoring from the page cache
1314 (WebCore::FrameLoader::startIconLoader): Added helpful logging that helped me track this down
1315 (WebCore::FrameLoader::commitIconURLToIconDatabase): Ditto (and fixed a comment typo)
1317 * loader/icon/IconLoader.cpp:
1318 (WebCore::IconLoader::stopLoading): Don't null out the ResourceLoader here, as clearLoadingState() does that
1319 (WebCore::IconLoader::finishLoading): Added helpful logging that helped me track this down
1322 2007-05-20 Darin Adler <darin@apple.com>
1324 Reviewed by Oliver Hunt.
1326 - fix <rdar://problem/5193416> REGRESSION: Selection on large pages extremely slow
1328 * dom/Document.cpp: (WebCore::Document::removeMarkers): Added an early exit for the common
1329 case where there are no markers. Changed code to iterate over all the nodes in the range
1330 instead of using TextIterator, which is more efficient.
1332 * page/Frame.cpp: (WebCore::Frame::respondToChangedSelection): Added checks for editable,
1333 so we don't bother doing work related to spell checking and grammar checking when changing
1334 the selection in non-editable text. Also rearranged the code so we only compute the old
1335 word boundaries and sentence boundaries when actually needed, and don't do the sentence
1336 range checks unless grammar checking is enabled.
1338 * platform/TextBreakIteratorICU.cpp:
1339 (WebCore::setUpIterator): Don't take a locale parameter. Always pass in currentTextBreakLocaleID.
1340 (WebCore::characterBreakIterator): Removed local parameter.
1341 (WebCore::wordBreakIterator): Ditto.
1342 (WebCore::lineBreakIterator): Ditto.
1343 (WebCore::sentenceBreakIterator): Ditto.
1345 * platform/mac/TextBreakIteratorInternalICUMac.mm:
1346 (WebCore::getTextBreakLocale): Broke out the code to actually get the locale.
1347 (WebCore::currentTextBreakLocaleID): This function now handles only the caching and calls
1348 getTextBreakLocale to actually figure it out.
1350 * editing/visible_units.cpp: Added lots of FIXME comments, but no code change.
1352 2007-05-20 Adam Treat <adam@staikos.net>
1354 Add -f to cp to deal with some obscure build environments.
1356 Reviewed by George Staikos.
1358 * move-js-headers.sh:
1360 2007-05-20 Adam Treat <adam@staikos.net>
1362 Add missing include for auto_ptr
1364 Reviewed by George Staikos.
1366 * platform/graphics/ImageBuffer.h:
1368 2007-05-19 David Hyatt <hyatt@apple.com>
1370 Fix for bug 13785, O(n^2) counter creation.
1374 * rendering/RenderCounter.cpp:
1375 (WebCore::findPlaceForCounter):
1376 (WebCore::RenderCounter::originalText):
1378 2007-05-19 Mitz Pettel <mitz@webkit.org>
1380 Reviewed by Dave Hyatt.
1382 - fix http://bugs.webkit.org/show_bug.cgi?id=12729
1383 box-shadow disappears when scrolling a div that it falls on/under
1385 Tests: fast/repaint/box-shadow-dynamic.html
1386 fast/repaint/box-shadow-h.html
1387 fast/repaint/box-shadow-v.html
1389 * rendering/InlineFlowBox.cpp:
1390 (WebCore::InlineFlowBox::placeBoxesHorizontally): Factor in box shadow.
1391 (WebCore::InlineFlowBox::placeBoxesVertically): Ditto.
1392 (WebCore::InlineFlowBox::paint): Account for box shadow when checking if
1393 the damage rect intersects.
1394 * rendering/RenderBlock.cpp:
1395 (WebCore::RenderBlock::overflowHeight): For overflow areas, when asked
1396 for the "exterior" overflow, add box shadow overflow.
1397 (WebCore::RenderBlock::overflowWidth): Ditto.
1398 (WebCore::RenderBlock::overflowLeft): Ditto.
1399 (WebCore::RenderBlock::overflowTop): Ditto.
1400 (WebCore::RenderBlock::overflowRect): Ditto.
1401 (WebCore::RenderBlock::layoutBlock): Factor box shadow into visual overflow.
1402 * rendering/RenderFlexibleBox.cpp:
1403 (WebCore::RenderFlexibleBox::layoutBlock): Ditto.
1404 * rendering/RenderFlow.cpp:
1405 (WebCore::RenderFlow::lowestPosition): For overflow areas, when asked for
1406 the "exterior" extreme position, add box shadow.
1407 (WebCore::RenderFlow::rightmostPosition): Ditto.
1408 (WebCore::RenderFlow::leftmostPosition): Ditto.
1409 * rendering/RenderLayer.cpp:
1410 (WebCore::RenderLayer::calculateRects): Avoid clipping out box shadow.
1411 * rendering/RenderObject.cpp:
1412 (WebCore::RenderObject::repaintAfterLayoutIfNeeded): Make sure to paint
1413 the box shadow when an edge with a shadow moves.
1414 (WebCore::RenderObject::adjustRectForOutlineAndShadow): Helper function
1415 that expands a given rectangle to encompass outline and box shadow.
1416 (WebCore::RenderObject::absoluteOutlineBox): Changed to include box shadow.
1417 * rendering/RenderObject.h:
1419 2007-05-19 Mitz Pettel <mitz@webkit.org>
1421 Reviewed by Dave Hyatt.
1423 - fix http://bugs.webkit.org/show_bug.cgi?id=13783
1424 REGRESSION (r21120): Frame resizers not repainted properly when dragged
1426 * rendering/RenderFrameSet.cpp:
1427 (WebCore::RenderFrameSet::layout):
1429 2007-05-19 Mitz Pettel <mitz@webkit.org>
1433 - fix http://bugs.webkit.org/show_bug.cgi?id=13774
1434 REGRESSION: Crash emailing blog entry using Google Reader
1436 Test: fast/table/stale-grid-crash.html
1438 * rendering/RenderTable.cpp:
1439 (WebCore::RenderTable::recalcSections): Made const and replaced
1440 setNeedsLayout(true) with an assertion that the table is already
1442 (WebCore::RenderTable::sectionAbove): Added call to recalcSectionsIfNeeded().
1443 (WebCore::RenderTable::sectionBelow): Ditto.
1444 (WebCore::RenderTable::cellAbove): Ditto.
1445 (WebCore::RenderTable::cellBelow): Ditto.
1446 (WebCore::RenderTable::cellBefore): Ditto.
1447 (WebCore::RenderTable::cellAfter): Ditto.
1448 * rendering/RenderTable.h:
1449 Made some private member variables which are used in section recalc mutable.
1450 (WebCore::RenderTable::setNeedsSectionRecalc): Moved the call to
1451 setNeedsLayout() from recalcSections() into here, because I made
1452 recalcSections() const.
1453 (WebCore::RenderTable::recalcSectionsIfNeeded): Made const.
1455 2007-05-19 Mitz Pettel <mitz@webkit.org>
1459 - http://bugs.webkit.org/show_bug.cgi?id=13320
1460 rounded corners with drop shadows are really slow
1462 Test for a rendering bug fixed by this patch:
1463 fast/box-shadow/border-radius-big.html
1465 No test for the performance ingredient.
1467 * platform/graphics/GraphicsContext.cpp:
1468 (WebCore::GraphicsContext::addRoundedRectClip): Made cross-platform.
1469 Changed to use a single clipping path. If all the radii cannot be
1470 accommodated, clips to a rect.
1471 (WebCore::GraphicsContext::clipOutRoundedRect): Changed to use a single
1472 clipping path. If all the radii cannot be accommodated, clips out a rect.
1473 * platform/graphics/GraphicsContext.h: Added clipOut(const Path&).
1474 * platform/graphics/Path.cpp:
1475 (WebCore::Path::createRoundedRectangle): Added. Returns a rounded rectangle
1476 with the specified radii. If all the radii cannot be accommodated, returns
1478 * platform/graphics/Path.h:
1479 * platform/graphics/cairo/GraphicsContextCairo.cpp:
1480 (WebCore::GraphicsContext::clipOut): Added.
1481 * platform/graphics/cg/GraphicsContextCG.cpp:
1482 (WebCore::GraphicsContext::fillRoundedRect): Changed to use a single path.
1483 (WebCore::GraphicsContext::clipOut): Added.
1484 * platform/graphics/qt/GraphicsContextQt.cpp:
1485 (WebCore::GraphicsContext::clipOut): Added.
1487 2007-05-19 Anders Carlsson <andersca@apple.com>
1491 Test: fast/frames/inline-object-inside-frameset.html
1493 http://bugs.webkit.org/show_bug.cgi?id=13771
1494 Assertion failure ASSERT(m_layer) when running Hamachi fuzz tester
1496 Don't paint inline objects.
1498 * rendering/RenderFrameSet.cpp:
1499 (WebCore::RenderFrameSet::paint):
1501 2007-05-19 David Hyatt <hyatt@apple.com>
1503 Add support for plain text MIME types (CSS/JS/TXT) to view source mode.
1504 CSS/JS will eventually tokenize via their own special tokenizers so that
1505 they can also be syntax-highlighted, but for now just treat them as
1510 * dom/DOMImplementation.cpp:
1511 (WebCore::DOMImplementation::createDocument):
1512 * html/HTMLViewSourceDocument.cpp:
1513 (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1514 (WebCore::HTMLViewSourceDocument::createTokenizer):
1515 (WebCore::HTMLViewSourceDocument::createContainingTable):
1516 (WebCore::HTMLViewSourceDocument::addViewSourceText):
1517 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1518 * html/HTMLViewSourceDocument.h:
1519 * loader/TextDocument.cpp:
1520 (WebCore::TextTokenizer::TextTokenizer):
1521 (WebCore::TextTokenizer::write):
1522 * loader/TextDocument.h:
1523 (WebCore::TextTokenizer::checkBuffer):
1525 2007-05-18 David Hyatt <hyatt@apple.com>
1527 Fix a glitch in view source mode attribute names.
1529 * html/HTMLViewSourceDocument.cpp:
1530 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1532 2007-05-18 David Hyatt <hyatt@apple.com>
1534 "Linkify" view source mode links.
1536 Reviewed by andersca
1538 * css/view-source.css:
1539 * html/HTMLViewSourceDocument.cpp:
1540 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1541 (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1542 (WebCore::HTMLViewSourceDocument::addLink):
1543 * html/HTMLViewSourceDocument.h:
1545 2007-05-18 Oliver Hunt <oliver@apple.com>
1549 No longer need to pass HTMLImageElement and HTMLImageLoader on to WebKit
1550 Need to expose CachedResourceClient constructor
1553 * WebCore.xcodeproj/project.pbxproj:
1555 2007-05-18 David Hyatt <hyatt@apple.com>
1557 Fix for <rdar://problem/5214338> REGRESSION: / mishandled in
1558 HTML tokenization (13780).
1562 * html/HTMLTokenizer.cpp:
1563 (WebCore::Token::addAttribute):
1564 (WebCore::HTMLTokenizer::parseTag):
1566 2007-05-18 Brady Eidson <beidson@apple.com>
1570 http://bugs.webkit.org/show_bug.cgi?id=12681 and
1571 <rdar://problem/5166149> - window.open() causes server to be hit twice
1573 This regressed in http://trac.webkit.org/projects/webkit/changeset/14637
1574 That patch was to fix broken behavior when opening an already existant window.
1575 The unfortunate side effect was to cause the server to be hit twice.
1576 Once during the call to frame->loader()->createWindow(), and again via a
1577 scheduled redirection.
1579 I decided to restore the original de-facto behavior by making the new window
1580 open via a scheduled redirection - there is a FIXME that was already here that
1581 explains the reason why we have to do it this way for now.
1583 Additionally, there were two distinct places that had their own logic to open
1584 a new window - the logic for window.open() and the logic for
1585 window.showModalDialog(). The logic was almost identical so I condensed them
1586 into one utility function that takes a flag to handle the slight difference.
1588 A layout test is not possible at this time since it would involve capturing
1589 server logs (the 1st connection does not exist long enough to result in any
1590 delegate callbacks). That task is documented in
1591 http://bugs.webkit.org/show_bug.cgi?id=13769
1593 * bindings/js/kjs_window.cpp:
1594 (KJS::createWindow): Merged the two slightly different versions of "creating a window"
1595 logic here. For the modal dialog case the load is an immediate call to changeLocation(),
1596 which is triggered by the "immediate" flag, and the other cases load via scheduleLocationChange()
1597 (KJS::showModalDialog): Call createWindow()
1598 (KJS::WindowFunc::callAsFunction): Handle frame targets of _top or _parent immediately and call
1599 createWindow() for all others
1601 2007-05-18 Sam Weinig <sam@webkit.org>
1605 Autogenerate the JS bindings for the HTMLTableElement, HTMLTableCaptionElement,
1606 HTMLTableCellElement, HTMLTableColElement, HTMLTableRowElement, HTMLTableSectionElement.
1608 * DerivedSources.make:
1610 * WebCore.xcodeproj/project.pbxproj:
1611 * bindings/js/JSHTMLElementWrapperFactory.cpp:
1612 (WebCore::createJSHTMLWrapper):
1613 * bindings/js/kjs_html.cpp:
1615 (KJS::JSHTMLElement::classInfo):
1616 (KJS::JSHTMLElement::accessors):
1617 (KJS::HTMLElementFunction::callAsFunction):
1618 * bindings/js/kjs_html.h:
1619 (KJS::JSHTMLElement::):
1620 * html/HTMLTableCaptionElement.idl:
1621 * html/HTMLTableCellElement.idl:
1622 * html/HTMLTableColElement.idl:
1623 * html/HTMLTableElement.idl:
1624 * html/HTMLTableRowElement.idl:
1625 * html/HTMLTableSectionElement.idl:
1626 * page/DOMWindow.idl:
1628 2007-05-18 Oliver Hunt <oliver@apple.com>
1632 Fix for <rdar://problem/5211122> DRT crash below
1633 SVGTimer::applyAnimations when page cache is enabled
1634 (SVG animation timers do not properly cancel themselves)
1636 There were still a few paths in the SVG Animation code
1637 that could cause timers to be created and used. This
1638 patch inserts addition SVG_EXPERIMENTAL blocks to prevent
1639 these timers from being used.
1641 * ksvg2/misc/SVGDocumentExtensions.cpp:
1642 (WebCore::SVGDocumentExtensions::startAnimations):
1643 * ksvg2/misc/SVGTimer.cpp:
1644 (WebCore::SVGTimer::animationsByElement):
1645 (WebCore::SVGTimer::applyAnimations):
1646 (WebCore::SVGTimer::notifyAll):
1647 (WebCore::SVGTimer::addNotify):
1648 (WebCore::SVGTimer::removeNotify):
1649 * ksvg2/misc/TimeScheduler.cpp:
1650 (WebCore::TimeScheduler::addTimer):
1651 (WebCore::TimeScheduler::connectIntervalTimer):
1652 (WebCore::TimeScheduler::disconnectIntervalTimer):
1653 (WebCore::TimeScheduler::startAnimations):
1654 (WebCore::TimeScheduler::toggleAnimations):
1655 (WebCore::TimeScheduler::timerFired):
1656 * ksvg2/svg/SVGAnimationElement.h:
1658 2007-05-18 Marius Bugge Monsen <mbm@trolltech.com>
1660 Reviewed by Zack Rusin.
1662 Return a valid pointer to a Clipboard object
1663 from newGeneralClipboard.
1665 * editing/qt/EditorQt.cpp:
1666 (WebCore::Editor::newGeneralClipboard):
1668 2007-05-18 Mark Rowe <mrowe@apple.com>
1670 Attempt to fix the Gdk build after r21562.
1672 * platform/gdk/TemporaryLinkStubs.cpp:
1673 (Widget::isEnabled):
1674 * platform/gdk/WidgetGdk.cpp:
1676 2007-05-18 Adam Treat <treat@kde.org>
1682 * platform/Widget.h:
1683 * platform/mac/WidgetMac.mm:
1684 * platform/qt/WidgetQt.cpp:
1686 2007-05-18 Holger Freyther <zecke@selfish.org>
1690 Return true to make loading of pages working again
1692 * loader/gdk/FrameLoaderClientGdk.cpp:
1693 (WebCore::FrameLoaderClientGdk::canHandleRequest):
1695 2007-05-18 Holger Freyther <zecke@selfish.org>
1699 Make WebCore::Widget use GtkWidget to fix focus handling.
1701 * WebCore.pro: Add PlatformScrollBar
1702 * platform/ScrollView.h: Gtk stuff
1703 * platform/Widget.h: Take a GtkWidget
1704 * platform/gdk/PlatformScrollBarGdk.cpp: Added.
1705 (PlatformScrollbar::PlatformScrollbar):
1706 (PlatformScrollbar::~PlatformScrollbar):
1707 (PlatformScrollbar::width):
1708 (PlatformScrollbar::height):
1709 (PlatformScrollbar::setEnabled):
1710 (PlatformScrollbar::paint):
1711 (PlatformScrollbar::updateThumbPosition):
1712 (PlatformScrollbar::updateThumbProportion):
1713 (PlatformScrollbar::setRect):
1714 * platform/gdk/ScreenGdk.cpp: Implement depth handling
1715 (WebCore::screenDepth):
1716 * platform/gdk/ScrollViewGdk.cpp: use setGtkWidget, not setDrawable
1717 (WebCore::ScrollView::setGtkWidget):
1718 * platform/gdk/TemporaryLinkStubs.cpp:
1719 * platform/gdk/WidgetGdk.cpp:
1720 (WebCore::Widget::Widget):
1721 (WebCore::Widget::gtkWidget):
1722 (WebCore::Widget::setGtkWidget):
1723 (WebCore::Widget::hasFocus):
1724 (WebCore::Widget::setFocus):
1726 2007-05-18 Lars Knoll <lars@trolltech.com>
1730 Correctly implement initialiseSupportedImageMIMETypes.
1732 * platform/MimeTypeRegistry.cpp:
1733 (WebCore::initialiseSupportedImageMIMETypes):
1734 * platform/qt/MimeTypeRegistryQt.cpp:
1737 2007-05-18 Holger Hans Peter Freyther <zecke@selfish.org>
1741 Build fix for non-Qt and non-Mac ports.
1743 * html/HTMLCanvasElement.h:
1745 2007-05-18 Holger Hans Peter Freyther <zecke@selfish.org>
1747 Reviewed by Mark Rowe.
1749 No test added as this is hard to time.
1751 * platform/gdk/FrameGdk.cpp: Use needsLayout() to decide if layout()
1754 (WebCore::FrameGdk::dumpRenderTree):
1755 (WebCore::FrameGdk::handleGdkEvent):
1757 2007-05-18 Simon Hausmann <hausmann@kde.org>
1761 * WebCore.pro: Create a pkg-config file to make it easier to locate
1764 2007-05-18 Lars Knoll <lars@trolltech.com>
1768 Remove unused handleMouseEvent methods in the Widget
1769 and derived classes.
1771 * page/EventHandler.cpp:
1772 (WebCore::EventHandler::handleMouseMoveEvent):
1773 * page/FrameView.cpp:
1775 * page/mac/EventHandlerMac.mm:
1776 (WebCore::EventHandler::mouseDragged):
1777 (WebCore::EventHandler::mouseMoved):
1778 * platform/ScrollBar.h:
1779 * platform/Widget.h:
1780 * platform/win/PlatformScrollBar.h:
1781 * platform/win/TemporaryLinkStubs.cpp:
1782 (WebCore::PlatformScrollbar::setRect):
1783 * platform/wx/PlatformScrollBar.h:
1785 2007-05-18 George Staikos <staikos@kde.org>
1789 Use the proper clipping algorithm. Might be a bit slow but we
1790 can optimize it later.
1792 * platform/graphics/qt/GraphicsContextQt.cpp:
1793 (WebCore::GraphicsContext::clip):
1795 2007-05-17 Sam Weinig <sam@webkit.org>
1797 Reviewed by George Staikos.
1799 Fix Qt build after adding JSHTMLAnchorElementCustom.cpp.
1803 2007-05-17 George Staikos <staikos@kde.org>
1807 Fix preprocessor logic for CG/QT
1809 * html/HTMLCanvasElement.cpp:
1810 (WebCore::HTMLCanvasElement::reset):
1812 2007-05-17 David Hyatt <hyatt@apple.com>
1814 Add a line gutter to view source mode. The gutter uses counters, and this exposed the fact
1815 that pseudoStyleForElement was not walking all UA rules properly.
1819 * css/cssstyleselector.cpp:
1820 (WebCore::CSSStyleSelector::pseudoStyleForElement):
1821 * css/view-source.css:
1822 * html/HTMLViewSourceDocument.cpp:
1823 (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1824 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
1825 (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
1826 (WebCore::HTMLViewSourceDocument::addLine):
1827 (WebCore::HTMLViewSourceDocument::addText):
1828 * html/HTMLViewSourceDocument.h:
1830 2007-05-17 Justin Garcia <justin.garcia@apple.com>
1834 <rdar://problem/5209984> REGRESSION: Crash on click after clearing Facebook status
1836 comparePositions() expects non-null positions. It's
1837 given a null position by contains() if the current
1838 selection is a range selection but contains only invisible
1839 content *and* visible positions cannot be created from its
1840 end points. This can happen when there is a range selection
1841 inside shadow content (like that inside text fields) that
1844 * editing/SelectionController.cpp:
1845 (WebCore::SelectionController::contains): Check for
1846 invisible end points.
1848 2007-05-17 Sam Weinig <sam@webkit.org>
1852 Fix for <rdar://problem/5201423> REGRESSION: Links in
1853 sidebar don't work on Honda website
1855 Anchor elements need to have the same behavior for implicit and
1856 explicit toString() calls.
1858 Test: fast/dom/anchor-toString.html
1860 * WebCore.xcodeproj/project.pbxproj:
1861 * bindings/js/JSHTMLAnchorElementCustom.cpp: Added.
1862 (WebCore::JSHTMLAnchorElement::toString):
1863 * html/HTMLAnchorElement.idl:
1865 2007-05-17 Geoffrey Garen <ggaren@apple.com>
1869 2007-05-17 Adele Peterson <adele@apple.com>
1873 Update RenderMenuList PopupClient methods to consider style of inner block.
1875 * rendering/RenderMenuList.cpp:
1876 (WebCore::RenderMenuList::itemStyle):
1877 (WebCore::RenderMenuList::clientStyle):
1879 2007-05-17 Maciej Stachowiak <mjs@apple.com>
1881 Not reviewed, emergency test fix.
1883 - avoid crash on layout tests.
1885 Patched up my last change so that widgets don't crash.
1887 * loader/FrameLoader.cpp:
1888 (WebCore::FrameLoader::mainReceivedCompleteError):
1890 2007-05-17 Antti Koivisto <antti@apple.com>
1894 Fix for http://bugs.webkit.org/show_bug.cgi?id=13727
1895 REGRESSION: Reproducible hang setting the selection's extent offset to -1
1896 <rdar://problem/5206890>
1898 Rise INDEX_SIZE_ERR if used selection index is negative. This matches HTML5 for
1899 getRangeAt() and collapse() which are part of the spec (FF throws NS_ERROR_FAILURE).
1901 Not throwing exceptions yet for too high offsets (except getRangeAt()) as it is
1902 unclear if WebCore's definition of offsets is the same as other browsers.
1904 * bindings/js/kjs_window.cpp:
1905 * WebCore/editing/SelectionController.cpp:
1906 * WebCore/editing/SelectionController.h:
1907 * WebCore/editing/VisiblePosition.cpp:
1909 2007-05-17 Adele Peterson <adele@apple.com>
1913 Fix for <rdar://problem/5096035> REGRESSION: rtl text should be left-aligned in <select>s
1915 Test: fast/text/international/bidi-menulist.html
1917 * rendering/RenderMenuList.cpp:
1918 (WebCore::RenderMenuList::adjustInnerStyle): Set the inner block style to direction: ltr, and text-align: left. This means that
1919 we will ignore those settings in the button to match the way the text is displayed in the popup menu.
1920 (WebCore::RenderMenuList::createInnerBlock): Call adjustInnerStyle.
1921 (WebCore::RenderMenuList::setStyle): ditto.
1922 * rendering/RenderMenuList.h: Added adjustInnerStyle.
1924 2007-05-17 Justin Garcia <justin.garcia@apple.com>
1926 Reviewed by harrison
1928 <rdar://problem/4924441> List becomes nested when changing its type
1929 <rdar://problem/5210032> Content before a list is placed at the end of the list when its made into a list item
1930 <rdar://problem/5207369> Crash when removing ordering from a nested list
1932 * editing/InsertListCommand.cpp:
1933 (WebCore::InsertListCommand::doApply):
1934 The outermostEnclosingList of the position before the start isn't
1935 the previousList if it contains the start.
1936 Ditto for the position after the end and the nextList.
1937 If we're putting the newly created list item into the next list,
1938 insert it at the start of that list, not the end (don't append).
1939 Avoid nesting newly created lists inside list items.
1941 2007-05-17 Patti Hoa <patti@apple.com>
1945 <rdar://problem/4775672> AXTextMarkerRangeForUnorderedTextMarkers returns incorrect order
1947 * bridge/mac/WebCoreAXObject.mm:
1948 (-[WebCoreAXObject doAXTextMarkerRangeForUnorderedTextMarkers:]):
1949 A selection's m_start is not guranteed to equal m_base since m_start can actually be m_base's downstream().
1950 A more accurate way to determine the order from selection is to ask directly for isBaseFirst().
1951 In addition, if the two visible positions given are the same position but different affinity, we need to
1952 handle it here rather than depend on the selection. This is because selection does not retain the
1953 affinity of both selection start/end visible positions as part of the selection validation.
1955 2007-05-17 Mitz Pettel <mitz@webkit.org>
1959 - fix http://bugs.webkit.org/show_bug.cgi?id=13759
1960 REGRESSION (r20182-r20184): Incorrect rendering of multipart images
1962 Test: http/tests/multipart/invalid-image-data.html
1964 * loader/loader.cpp:
1965 (WebCore::Loader::didReceiveData): Make a copy of the current part's data
1966 instead of using the resource data, because the latter is going to be
1967 overwritten by the new part being received.
1969 2007-05-17 Oliver Hunt <oliver@apple.com>
1973 Fix for <rdar://problem/4244861> Safari fails to create image file
1974 after releasing dragged image that has changed on source page
1976 Tell xcode to copy HTMLImageElement.h and HTMLImageLoader.h headers
1977 across to WebKit as private headers.
1979 * WebCore.xcodeproj/project.pbxproj:
1981 2007-05-17 Justin Garcia <justin.garcia@apple.com>
1983 Reviewed by harrison
1985 <rdar://problem/5190926>
1986 Gmail Editor: Crash when removing list style from underlined, multi-item list
1988 The user underlined some text, then created a list.
1989 The list was placed inside the inline element carrying
1990 the underline style, so, that element surrounded the
1991 list instead of being at the lowest level (just above
1992 text nodes). This kind of markup is more difficult to
1993 edit. Filed 5192089 and added a workaround so that we
1994 don't produce this kind of markup.
1996 * editing/InsertListCommand.cpp:
1997 (WebCore::InsertListCommand::doApply): Avoid inline
1998 elements when inserting the new list.
2000 2007-05-17 David Hyatt <hyatt@apple.com>
2002 Allow redundant attributes with the same name in view source mode.
2006 * dom/NamedAttrMap.h:
2007 (WebCore::NamedAttrMap::insertAttribute):
2008 * html/HTMLTokenizer.cpp:
2009 (WebCore::Token::addAttribute):
2011 2007-05-17 George Staikos <staikos@kde.org>
2013 - Back out last patch based on discussion with Zack.
2015 * platform/qt/WidgetQt.cpp:
2016 (WebCore::Widget::paint):
2018 2007-05-16 Anders Carlsson <andersca@apple.com>
2022 <rdar://problem/5207156> Hamachi test tool causes assertion in FormCompletionController in Safari
2024 This happens because the form delegate gets passed the wrong source frame during the second submit().
2025 If a frame with the given name is found, FrameLoader::load is called with the same parameters on the found frame.
2026 This causes the found frame to be used as the source frame, which is wrong.
2028 The fix is to create the form state object before checking what frame to load the new request in.
2031 * loader/FrameLoader.cpp:
2032 (WebCore::FrameLoader::load):
2033 (WebCore::FrameLoader::checkNavigationPolicy):
2034 (WebCore::FrameLoader::continueAfterNavigationPolicy):
2035 * loader/FrameLoader.h:
2036 * manual-tests/submit-form-with-target-twice.html: Added.
2038 2007-05-16 Maciej Stachowiak <mjs@apple.com>
2042 <rdar://problem/5205914> REGRESSION: PLT stops after loading first page due to r21479
2044 * loader/FrameLoader.cpp:
2045 (WebCore::FrameLoader::frameHasLoaded):
2047 2007-05-16 David Hyatt <hyatt@apple.com>
2049 Improve the syntax-highlighted view source mode. It now preserves all whitespace properly
2050 and highlights doctypes and comments (in addition to all the stuff it could highlight before).
2054 * html/HTMLTokenizer.cpp:
2055 (WebCore::Token::addAttribute):
2056 (WebCore::HTMLTokenizer::parseTag):
2057 * html/HTMLTokenizer.h:
2058 (WebCore::Token::Token):
2059 (WebCore::Token::~Token):
2060 (WebCore::Token::reset):
2061 (WebCore::Token::addViewSourceChar):
2062 * html/HTMLViewSourceDocument.cpp:
2063 (WebCore::HTMLViewSourceDocument::addViewSourceToken):
2064 * html/HTMLViewSourceDocument.h:
2066 2007-05-16 Maciej Stachowiak <mjs@apple.com>
2070 <rdar://problem/5191024> Page never loads completely (emonome.vodpod.com)
2071 <rdar://problem/5205162> REGRESSION (r21367): In the Address URL field, typing a site name doesn't redirect to site after pressing return
2072 http://bugs.webkit.org/show_bug.cgi?id=13683
2073 <rdar://problem/5208951> REGRESSION: Progress bar never completes on link click that downloads (13694)
2074 http://bugs.webkit.org/show_bug.cgi?id=13694
2075 <rdar://problem/5201598> REGRESSION: After uploading file to iDisk at mac.com, "loading" status remains and file does not appear in the list
2077 * loader/FrameLoader.cpp:
2078 (WebCore::FrameLoader::mainReceivedCompleteError): Make sure to always check whether the overall
2079 load completed, even if we think the current frame load is already complete.
2081 2007-05-16 Beth Dakin <bdakin@apple.com>
2085 Fix for <rdar://problem/5204107> REGRESSION: CSS web forum site
2086 layout not displaying properly in latest WebKit
2088 Hyatt's http://trac.webkit.org/projects/webkit/changeset/21428
2089 exposed this bug. We were not handling error cases with <caption>
2090 correctly. This patch makes them do the same thing as colgroup.
2092 * html/HTMLParser.cpp:
2093 (WebCore::HTMLParser::handleError):
2094 * html/HTMLParserErrorCodes.cpp: No need any more for caption-
2096 (WebCore::htmlParserErrorMessageTemplate):
2097 * html/HTMLParserErrorCodes.h:
2100 2007-05-16 Kevin McCullough <kmccullough@apple.com>
2102 Reviewed by Darin and Geoff.
2104 - rdar://problem/4981886
2105 - Now windows opened by the DOM can be closed by JS.
2107 * bindings/js/kjs_window.cpp:
2108 (KJS::createNewWindow):
2109 (KJS::WindowFunc::callAsFunction):
2110 * loader/FrameLoader.cpp:
2111 (WebCore::FrameLoader::FrameLoader):
2112 (WebCore::FrameLoader::openedByDOM):
2113 (WebCore::FrameLoader::setOpenedByDOM):
2114 (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
2115 * loader/FrameLoader.h:
2117 2007-05-16 Darin Adler <darin@apple.com>
2121 - fix <rdar://problem/4928671> Crash due to runaway recursion when fieldset has display: table-row (12066)
2123 Test: fast/css/fieldset-display-row.html
2125 * rendering/RenderContainer.cpp: (WebCore::RenderContainer::addChild):
2126 Change all decision making about special handling for new children to use
2127 the class of the render object instead of the style, except for the cases
2128 where the style is the only way to tell (TABLE_COLUMN_GROUP and TABLE_CAPTION).
2129 Thus a RenderFieldset with table-row style won't get handled as if it was
2132 * rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): Same thing.
2133 Except that here the styles that we ahave to look at are TABLE_CAPTION,
2134 TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, and TABLE_ROW_GROUP.
2136 2007-05-16 Zack Rusin <zrusin@trolltech.com>
2140 Implement bigger parts of the Canvas element in the
2141 Qt port. Gradients and patterns are missing.
2143 * WebCore/html/CanvasRenderingContext2D.cpp:
2144 * WebCore/html/CanvasStyle.cpp:
2145 * WebCore/html/HTMLCanvasElement.cpp:
2146 * WebCore/html/HTMLCanvasElement:
2148 2007-05-16 Zack Rusin <zrusin@trolltech.com>
2152 Fix shared timers, make them use miliseconds. Based
2153 on a patch from George.
2155 * WebCore/platform/qt/SharedTimerQt.cpp:
2156 (WebCore::setSharedTimerFireTime):
2158 2007-05-16 David Hyatt <hyatt@apple.com>
2160 Add rudimentary error reporting to the HTML parser. This is disabled
2161 for now until it gets beefed up a bit more (and until we work out how
2162 best to pass the messages up without hurting perf).
2164 Clean up and remove dead error handling code and incorrect error handling
2169 * WebCore.xcodeproj/project.pbxproj:
2170 * html/HTMLParser.cpp:
2171 (WebCore::HTMLParser::HTMLParser):
2172 (WebCore::HTMLParser::handleError):
2173 (WebCore::HTMLParser::headCreateErrorCheck):
2174 (WebCore::HTMLParser::reportErrorToConsole):
2175 * html/HTMLParser.h:
2176 (WebCore::HTMLParser::reportError):
2177 * html/HTMLParserErrorCodes.cpp: Added.
2178 (WebCore::htmlParserErrorMessageTemplate):
2179 * html/HTMLParserErrorCodes.h: Added.
2181 * html/HTMLTokenizer.h:
2182 (WebCore::HTMLTokenizer::tagStartLineNumber):
2184 2007-05-15 David Hyatt <hyatt@apple.com>
2186 Make FrameLoader write "<html><body>" instead of just "<body>".
2190 * loader/FrameLoader.cpp:
2191 (WebCore::FrameLoader::init):
2193 2007-05-15 George Staikos <staikos@kde.org>
2195 Reviewed by Adam Roben.
2197 - Pass cookies through from the loader.
2199 * platform/network/qt/ResourceHandleManagerQt.cpp:
2200 (WebCore::ResourceHandleManager::receivedResponse):
2202 2007-05-15 Adam Treat <adam@staikos.net>
2204 Reviewed by George Staikos.
2206 - Implement drawArc with proper units.
2208 * platform/graphics/qt/GraphicsContextQt.cpp:
2209 (WebCore::GraphicsContext::strokeArc):
2211 2007-05-15 Adam Treat <adam@staikos.net>
2213 Reviewed by George Staikos.
2215 - Add missing paint for nested subframes.
2217 * platform/qt/WidgetQt.cpp:
2218 (WebCore::Widget::paint):
2220 2007-05-15 Sam Weinig <sam@webkit.org>
2224 - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2225 Finish testing and fixing the setting of DOM attributes to JS null
2227 Convert JS null to null string for SVG attributes.
2229 Test: fast/dom/svg-element-attribute-js-null.xhtml
2231 * ksvg2/svg/SVGAngle.idl:
2232 * ksvg2/svg/SVGElement.idl:
2233 * ksvg2/svg/SVGLength.idl:
2234 * ksvg2/svg/SVGScriptElement.idl:
2236 2007-05-15 Sam Weinig <sam@webkit.org>
2240 - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2241 Finish testing and fixing the setting of DOM attributes to JS null
2243 Convert JS null to null string for CanvasRenderingContext2D attributes.
2245 Test: fast/dom/canvasContext2d-element-attribute-js-null.html
2247 * html/CanvasRenderingContext2D.idl:
2249 2007-05-15 Oliver Hunt <oliver@apple.com>
2251 Reviewed by Sam and Geoff.
2253 Removing dead code left behind from drag and drop refactoring.
2255 * page/mac/WebCoreFrameBridge.h:
2257 2007-05-15 Sam Weinig <sam@webkit.org>
2261 - Second Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2262 Finish testing and fixing the setting of DOM attributes to JS null
2264 Convert JS null to null string for remaining CSSOM attributes.
2266 Test: fast/dom/css-element-attribute-js-null.html
2268 * bindings/js/kjs_css.cpp:
2269 (KJS::DOMCSSStyleDeclaration::put):
2270 (KJS::DOMMediaList::put):
2271 (KJS::DOMCSSRule::putValueProperty):
2272 (KJS::DOMCSSValue::put):
2273 * css/CSSPageRule.idl:
2275 * css/CSSStyleDeclaration.idl:
2276 * css/CSSStyleRule.idl:
2278 * css/MediaList.idl:
2280 2007-05-15 Darin Adler <darin@apple.com>
2284 * css/html4.css: Remove wbr style rule -- not needed any more.
2286 2007-05-15 Mitz Pettel <mitz@webkit.org>
2290 - fix http://bugs.webkit.org/show_bug.cgi?id=13360
2291 REGRESSION: Crash closing live web cam viewer page
2293 Test: http/tests/misc/multipart.html
2295 * loader/ResourceLoader.cpp:
2296 (WebCore::ResourceLoader::didFail): Avoid calling didFailToLoad() if
2297 didFinishLoad() has already been called (when the first part of a
2298 multipart resource arrived).
2299 (WebCore::ResourceLoader::didCancel): Ditto.
2301 2007-05-15 Sam Weinig <sam@webkit.org>
2305 - Patch for http://bugs.webkit.org/show_bug.cgi?id=13722
2306 Finish testing and fixing the setting of DOM attributes to JS null
2308 Convert JS null to null string for remaining Core DOM attributes.
2310 Test: fast/dom/coreDOM-element-attribute-js-null.xhtml
2313 (WebCore::Attr::setValue): Don't throw an expection for null values as this
2314 is not in the spec and Firefox does not do it either.
2316 * dom/CharacterData.idl:
2317 * dom/ProcessingInstruction.idl:
2319 2007-05-15 Mitz Pettel <mitz@webkit.org>
2323 - fix http://bugs.webkit.org/show_bug.cgi?id=13718
2324 REGRESSION (r21093): editing/execCommand/5136770.html failing pixel test
2326 * rendering/RenderContainer.cpp:
2327 (WebCore::RenderContainer::removeChildNode): Moved the code that clears the
2328 selection when moving a selection border into the fast path.
2330 2007-05-15 Rob Buis <buis@kde.org>
2334 http://bugs.webkit.org/show_bug.cgi?id=6487
2335 "Make Text Bigger/Smaller" affects SVGs when it probably shouldn't
2337 Ignore Make Text Bigger/Smaller for SVG text.
2341 2007-05-15 Anders Carlsson <andersca@apple.com>
2345 <rdar://problem/5183685>
2346 http://bugs.webkit.org/show_bug.cgi?id=13301
2347 ASSERT or null value when trying to use a getter defined on a window object
2349 Handle the case where the value returned is a getter/setter object.
2351 * bindings/js/kjs_window.cpp:
2352 (KJS::Window::getOverridePropertySlot):
2354 2007-05-14 Anders Carlsson <andersca@apple.com>
2358 <rdar://problem/5200816>
2359 REGRESSION: With Shiira 1.2.2 , I can't open embedded link in flash object by clicking (http:/www.adobe.com )
2361 Shiira under some circumstances passes nil as the request to -[WebFrame loadRequest:]. ToT WebKit doesn't call any policy
2362 delegate methods in this case, which means that the page is actually being loaded.
2364 This patch makes ToT WebKit behave in the same way as Tiger WebKit when the request is nil.
2366 * loader/FrameLoader.cpp:
2367 (WebCore::FrameLoader::checkNavigationPolicy):
2368 Don't continue without calling the navigation policy method if the request is null.
2370 (WebCore::FrameLoader::continueAfterNavigationPolicy):
2371 If the request can't be handled, don't continue the load.
2373 * platform/network/mac/ResourceRequestMac.mm:
2374 (WebCore::ResourceRequest::doUpdatePlatformRequest):
2375 Don't create an NSURLRequest object if the request is null.
2377 2007-05-15 Maciej Stachowiak <mjs@apple.com>
2379 Reviewed by Hyatt and Lars.
2381 - fixed <rdar://problem/5201758> REGRESSION: Stop button enabled and other problems caused by [WebView currentURL] returning non-nil for empty window
2383 * WebCore.exp: export new symbol
2384 * loader/FrameLoader.cpp:
2385 (WebCore::FrameLoader::begin): move marker that we committed a real doc load from here...
2386 (WebCore::FrameLoader::transitionToCommitted): ...to here
2387 (WebCore::FrameLoader::frameHasLoaded): check that we have at least started loading something
2388 besides the initial empty doc.
2389 * loader/FrameLoader.h:
2391 2007-05-14 Justin Garcia <justin.garcia@apple.com>
2395 <http://bugs.webkit.org/show_bug.cgi?id=13716>
2396 REGRESSION: Three new layout test failures
2398 Two failures are correct. Updated their expected results.
2400 In fast/events/frame-tab-focus.html, as we advance
2401 through focusable nodes, we descend into a subframe
2402 to focus a node and then ascend out of it into the
2403 main frame to focus the next. When we focus the main
2404 frame, the node in that frame that was previously
2405 focused and contains an inactive selection is focused
2406 momentarily because setCaretVisible tries to focus the
2407 node containing the caret.
2410 (WebCore::Frame::setCaretVisible): Don't focus the
2411 node containing the caret. FocusController will focus
2412 the previously focused node (which will contain the
2413 caret) if necessary when the frame gains focus.
2415 2007-05-14 Maciej Stachowiak <mjs@apple.com>
2419 - fixed <rdar://problem/5203036> REGRESSION: Assertion failure in WebCore::FrameLoader::restoreScrollPositionAndViewState() going back from fark.com Photoshop contest (13684)
2421 Test: http/tests/navigation/back-to-slow-frame.html
2423 * loader/FrameLoader.cpp:
2424 (WebCore::FrameLoader::restoreScrollPositionAndViewState): Add needed early return.
2426 2007-05-14 Mitz Pettel <mitz@webkit.org>
2428 Reviewed by Dave Hyatt.
2430 - fix http://bugs.webkit.org/show_bug.cgi?id=13603
2431 style leaks in washingtonpost.com
2432 also known as http://bugs.webkit.org/show_bug.cgi?id=8750
2433 w3c.org: incorrect recovery from unclosed <a> elements
2434 also known as http://bugs.webkit.org/show_bug.cgi?id=12808
2435 Handling of misnested tags results in entire page appearing as link
2436 also known as http://bugs.webkit.org/show_bug.cgi?id=12861
2437 Post text renders as link
2439 Test: fast/parser/residual-style-close-across-n-blocks.html
2441 * html/HTMLParser.cpp:
2442 (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Changed to
2443 deal with multiple block crossings instead of bailing out, by doing multiple
2444 reparenting passes, starting from the outermost block.
2446 2007-05-14 Mitz Pettel <mitz@webkit.org>
2450 - fix http://bugs.webkit.org/show_bug.cgi?id=13711
2451 REGRESSION - Bookmark Bar text rendering changed
2453 No test possible since this patch affects only Safari chrome.
2455 * platform/Font.cpp:
2456 (WebCore::Font::Font): Initialize m_isPlatformFont according to whether
2457 the Font object is derived from a FontPlatformData or not.
2459 (WebCore::Font::isPlatformFont): Added. Returns whether this Font was
2460 derived from a platform font.
2461 * platform/mac/FontCacheMac.mm:
2462 (WebCore::FontCache::getFontDataForCharacters): Changed to not enable
2463 synthetic bold and italic in the fallback fonts if the original font
2464 was derived from a platform font.
2466 2007-05-14 Sam Weinig <sam@webkit.org>
2470 - Patch for http://bugs.webkit.org/show_bug.cgi?id=13541
2471 REGRESSION: Setting a DOMString attribute to JS null in the
2472 JS bindings should default to converting to the empty string
2474 Convert JS null to the empty string when passing it to an attribute that takes
2477 Test: fast/dom/document-attribute-js-null.html
2478 Test: fast/dom/element-attribute-js-null.html
2480 * bindings/js/kjs_dom.cpp:
2481 (KJS::DOMNode::putValueProperty):
2482 * bindings/js/kjs_html.cpp:
2483 (KJS::JSHTMLDocument::putValueProperty):
2484 (KJS::JSHTMLElement::objectSetter):
2485 (KJS::JSHTMLElement::embedSetter):
2486 (KJS::JSHTMLElement::tableSetter):
2487 (KJS::JSHTMLElement::tableCaptionSetter):
2488 (KJS::JSHTMLElement::tableColSetter):
2489 (KJS::JSHTMLElement::tableSectionSetter):
2490 (KJS::JSHTMLElement::tableRowSetter):
2491 (KJS::JSHTMLElement::tableCellSetter):
2492 (KJS::JSHTMLElement::frameSetSetter):
2493 (KJS::JSHTMLElement::frameSetter):
2494 (KJS::JSHTMLElement::iFrameSetter):
2495 (KJS::JSHTMLElement::marqueeSetter):
2496 (KJS::JSHTMLElement::putValueProperty):
2497 * bindings/js/kjs_html.h:
2500 * html/HTMLAnchorElement.idl:
2501 * html/HTMLAppletElement.idl:
2502 * html/HTMLAreaElement.idl:
2503 * html/HTMLBRElement.idl:
2504 * html/HTMLBaseElement.idl:
2505 * html/HTMLBaseFontElement.idl:
2506 * html/HTMLBlockquoteElement.idl:
2507 * html/HTMLBodyElement.idl:
2508 * html/HTMLButtonElement.idl:
2509 * html/HTMLDivElement.idl:
2510 * html/HTMLDocument.idl:
2511 * html/HTMLElement.idl:
2512 * html/HTMLEmbedElement.idl:
2513 * html/HTMLFontElement.idl:
2514 * html/HTMLFormElement.idl:
2515 * html/HTMLFrameElement.idl:
2516 * html/HTMLFrameSetElement.idl:
2517 * html/HTMLHRElement.idl:
2518 * html/HTMLHeadElement.idl:
2519 * html/HTMLHeadingElement.idl:
2520 * html/HTMLHtmlElement.idl:
2521 * html/HTMLIFrameElement.idl:
2522 * html/HTMLImageElement.idl:
2523 * html/HTMLInputElement.idl:
2524 * html/HTMLIsIndexElement.idl:
2525 * html/HTMLLIElement.idl:
2526 * html/HTMLLabelElement.idl:
2527 * html/HTMLLegendElement.idl:
2528 * html/HTMLLinkElement.idl:
2529 * html/HTMLMapElement.idl:
2530 * html/HTMLMetaElement.idl:
2531 * html/HTMLModElement.idl:
2532 * html/HTMLOListElement.idl:
2533 * html/HTMLObjectElement.idl:
2534 * html/HTMLOptGroupElement.idl:
2535 * html/HTMLOptionElement.idl:
2536 * html/HTMLParagraphElement.idl:
2537 * html/HTMLParamElement.idl:
2538 * html/HTMLQuoteElement.idl:
2539 * html/HTMLScriptElement.idl:
2540 * html/HTMLSelectElement.idl:
2541 * html/HTMLStyleElement.idl:
2542 * html/HTMLTableCaptionElement.idl:
2543 * html/HTMLTableCellElement.idl:
2544 * html/HTMLTableColElement.idl:
2545 * html/HTMLTableElement.idl:
2546 * html/HTMLTableRowElement.idl:
2547 * html/HTMLTableSectionElement.idl:
2548 * html/HTMLTextAreaElement.idl:
2549 * html/HTMLTitleElement.idl:
2550 * html/HTMLUListElement.idl:
2552 2007-05-14 Geoffrey Garen <ggaren@apple.com>
2554 Trying to fix the Qt build.
2558 2007-05-14 Geoffrey Garen <ggaren@apple.com>
2560 Reviewed by Oliver Hunt.
2562 Some improvements on my last patch, suggested by Darin.
2564 * history/PageCache.cpp:
2565 (WebCore::PageCache::autoreleaseNow): Swap with an empty set instead of
2566 building up an array and then calling clear(). This is slightly more
2567 efficient and the code is cleaner.
2569 2007-05-14 Justin Garcia <justin.garcia@apple.com>
2573 <rdar://problem/5136696> Selection is removed when focusing a node in another frame
2574 <rdar://problem/5192388> WordPress: Can't insert links/images
2576 Don't clear a selection when changing focus if the new
2577 focus node is in a different frame than the old selection.
2580 (WebCore::Document::setFocusedNode): Moved code to clear
2581 selections to the FocusController, since it is Page level
2582 and will know about the frame/document that contained the
2583 old selection. Moved code to call shouldEndEditing to the
2584 FocusController because selections are now cleared before
2585 calling Document::setFocusedNode and shouldEndEditing must
2586 be called before selections are cleared.
2588 (WebCore::Element::blur): Call FocusController::setFocusNode
2589 instead of Document::setFocusNode, if possible.
2590 * page/EventHandler.cpp:
2591 (WebCore::EventHandler::dispatchMouseEvent): Ditto.
2592 * page/FocusController.cpp:
2593 (WebCore::relinquishesEditingFocus): Moved from Document.cpp.
2594 (WebCore::clearSelectionIfNeeded): Ditto. Don't clear if
2595 the old selection is in a frame that's different than the
2596 one that contains the new focus node.
2597 (WebCore::FocusController::setFocusedNode): Moved code
2598 here from Document::setFocusedNode.
2600 (WebCore::Frame::setFocusedNodeIfNeeded): Call
2601 FocusController::setFocusNode.
2603 2007-05-14 Geoffrey Garen <ggaren@apple.com>
2605 Reviewed by Darin Adler.
2607 Next step toward fixing <rdar://problem/5055182> The back cache has no
2610 Created a PageCache singleton. Right now, it only handles the timer-based
2611 deallocation of cached pages. I plan to add HistoryItem->CachedPage tracking
2612 and eviction logic in later patches.
2614 Updated for renames and file changes:
2617 * WebCore.xcodeproj/project.pbxproj:
2618 * history/BackForwardList.cpp:
2619 (WebCore::BackForwardList::setPageCacheSize):
2620 (WebCore::BackForwardList::clearPageCache):
2622 Removed global timed release code, moved into new PageCache class, since
2623 it's eventually going to be in charge of deciding when things are released:
2625 * history/HistoryItem.cpp:
2626 (WebCore::HistoryItem::setCachedPage):
2627 * history/HistoryItem.h:
2629 Folded into PageCache:
2631 * history/HistoryItemTimer.cpp: Removed.
2632 * history/HistoryItemTimer.h: Removed.
2634 New singleton. Right now, it just handles timed release of cached pages:
2636 * history/PageCache.cpp: Added.
2637 (WebCore::pageCache):
2638 (WebCore::PageCache::PageCache):
2639 (WebCore::PageCache::autoreleaseNowOrReschedule):
2640 (WebCore::PageCache::autoreleaseNow):
2641 (WebCore::PageCache::autorelease):
2642 * history/PageCache.h: Added.
2644 2007-05-14 Adele Peterson <adele@apple.com>
2648 Fix for <rdar://problem/5200081> Repro crash in PopupMenu::show clicking popup menu button after reload
2650 * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenu::show): Added call to dismissPopup so the cell gets unattached properly.
2652 2007-05-14 Adele Peterson <adele@apple.com>
2656 Remove incorrect assertion.
2658 * page/FrameView.cpp: (WebCore::FrameView::setContentsPos):
2660 2007-05-14 Anders Carlsson <andersca@apple.com>
2664 <rdar://problem/5172056> Regression: cannot open txt file, get broken image
2666 Never let plug-ins override text/plain.
2668 * dom/DOMImplementation.cpp:
2669 (WebCore::DOMImplementation::createDocument):
2671 2007-05-14 Zack Rusin <zrusin@trolltech.com>
2675 Do some magic to get better dependency tracking for header
2676 files in the qmake project files.
2680 2007-05-14 Lars Knoll <lars@trolltech.com>
2684 Required updates after Maciej's frame change.
2686 * loader/FrameLoader.cpp:
2687 (WebCore::FrameLoader::mainReceivedCompleteError):
2688 Call checkLoadCompleted() at the end of the method. Without it
2689 we never get the loadDone() signal on the Qt port.
2690 * platform/network/qt/ResourceHandleManagerQt.cpp:
2691 (WebCore::ResourceHandleManager::receivedFinished):
2692 Don't pass a null error to didFail().
2694 2007-05-14 Darin Adler <darin@apple.com>
2698 - fix <rdar://problem/3109180> VIP: after go back, page jumps after loading even if I scrolled while loading
2700 * history/CachedPage.cpp: (WebCore::CachedPage::clear): Call clearFrame rather than
2701 clearPart -- the "part" term was leftover prehistoric terminology.
2703 * loader/FrameLoader.cpp:
2704 (WebCore::FrameLoader::open): Call setWasScrolledByUser(false) on the page, so that we
2705 can detect any user scrolling that happens during the "go back" process.
2706 (WebCore::FrameLoader::restoreScrollPositionAndViewState): Don't scroll if the view's
2707 wasScrolledByUser flag is set.
2708 (WebCore::FrameLoader::loadItem): Call setWasScrolledByUser(false) false when we do
2709 a new "load" (actually just a scroll) using the same frame. Also moved the line of code that
2710 sets m_currentHistoryItem to make this code path mroe similar to recursiveGoToItem.
2711 (WebCore::FrameLoader::recursiveGoToItem): Ditto.
2714 (WebCore::Frame::~Frame): Call clearFrame rather than stting m_frame directly.
2715 (WebCore::Frame::sendScrollEvent): Call setWasScrolledByUser(true) on FrameView. The FrameView
2716 itself knows to ignore this if the scrolling is being done programmatically instead of by the user.
2718 * page/FrameView.h: Added wasScrolledByUser and setWasScrolledByUser. Also removed unneeded
2719 include and class forward declarations, renamed clearPart to clearFrame, removed uneeded function
2720 haveDelayedLayoutScheduled, and removed unneeded friend declarations.
2721 * page/FrameView.cpp:
2722 (WebCore::FrameViewPrivate::FrameViewPrivate): Added m_inProgrammaticScroll and m_wasScrolledByUser.
2723 (WebCore::FrameViewPrivate::reset): Set m_wasScrolledByUser to false.
2724 (WebCore::FrameView::clearFrame): Renamed from clearPart.
2725 (WebCore::FrameView::scrollRectIntoViewRecursively): Added code to set the m_inProgrammaticScroll flag.
2726 (WebCore::FrameView::setContentsPos): Ditto.
2727 (WebCore::FrameView::wasScrolledByUser): Added.
2728 (WebCore::FrameView::setWasScrolledByUser): Added. Does nothing if called when m_inProgrammaticScroll
2731 2007-05-14 Darin Adler <darin@apple.com>
2735 - <rdar://problem/4865655> REGRESSION: find function does not work for the character ß
2737 The trick was to fold case consistently in the CircularSearchBuffer class.
2739 The problem was that we were folding the search target string with full case folding and
2740 the characters of the text we were searching with simple case folding. We now use full
2741 case folding in both cases.
2743 * editing/TextIterator.cpp:
2744 (WebCore::CircularSearchBuffer::CircularSearchBuffer): Changed the buffer to be a
2745 Vector<UChar>. Added a Vector<bool> to record which characters were starts of characters
2746 in the text we are searching. Changed the cursor to be an int rather than a pointer.
2747 (WebCore::CircularSearchBuffer::append): New function that knows how to append multiple
2748 characters when folding case turns one character into many -- uses the full foldCase
2749 rather than the simplified single-character foldCase. Also removed the append function
2750 that did multiple characters at once; that was part of an optimization we don't need.
2751 (WebCore::CircularSearchBuffer::isMatch): Instead of asserting that the buffer is full,
2752 changed this to return false if it's not full, which lets us fill up the buffer with
2753 the normal loop. Also return false if the start of the buffer is half-way through a
2754 case-folded character and updated this since m_cursor is now an integer.
2755 (WebCore::CircularSearchBuffer::length): This returns the length in non-case-folded
2756 characters of the characters that were appended, which may not be the same as the length
2757 of the original target string. To do that we have to total up the character start
2758 booleans for the current state of the circular buffer.
2759 (WebCore::findPlainText): Streamlined the logic in a few ways: 1) Moved more of the
2760 return value setup to the top of the function so it could be shared with the early
2761 error exit. 2) Removed the separate "fill the buffer" logic, which allowed me to
2762 remove some of the functions from CircularSearchBuffer and eliminated the need for
2763 two nested loops. 3) Replaced the CharacterIterator and bool that were used to record
2764 the location we found with integers matchStart and matchLength. 4) Got rid of the use
2765 of goto since we don't have two nested loops any more.
2767 2007-05-14 Andrew Wellington <proton@wiretapped.net>
2771 Fix http://bugs.webkit.org/show_bug.cgi?id=13275
2772 Safari crashed when trying to login using the windows live contact control
2774 Check for cleared windowObj in JSAbstractEventListener::handleEvent
2776 * bindings/js/kjs_events.cpp:
2777 (KJS::JSAbstractEventListener::handleEvent):
2779 2007-05-13 Alexey Proskuryakov <ap@webkit.org>
2783 http://bugs.webkit.org/show_bug.cgi?id=13690
2784 JavaScript Form Validation issue on Banco do Brasil site
2786 Test: fast/forms/input-setvalue-selection.html
2788 * html/HTMLInputElement.cpp:
2789 (WebCore::HTMLInputElement::setValue): In other browsers, changing textInput.value
2790 always moves the insertion point past the text. In 10.4.9 WebKit, this only worked
2791 for inactive controls, and it never worked in ToT.
2793 2007-05-13 Brady Eidson <beidson@apple.com>
2797 http://bugs.webkit.org/show_bug.cgi?id=13701
2799 Since HTMLInputElements register themselves with their Document for special handling, if their document
2800 ever changes then bad things can happen.
2802 Unfortunately, with adoptNode, the document can change. This has been a long standing crasher with all
2803 input fields but was given recent high visibility by r21430
2805 The solution is to add functionality for a Node to react to its owner document changing via a pair of
2806 virtual callbacks. Then we can tap into those callbacks in HTMLInputElement.
2808 No layout test possible until http://bugs.webkit.org/show_bug.cgi?id=13672 is resolved
2811 (WebCore::Node::setDocument): Call willMoveToNewOwnerDocument and didMoveToNewOwnerDocument
2814 (WebCore::Node::willMoveToNewOwnerDocument): Virtual callback to a node for before an owner document change
2815 (WebCore::Node::didMoveToNewOwnerDocument): Virtual callback to a node for after an owner document change
2817 * html/HTMLInputElement.cpp:
2818 (WebCore::HTMLInputElement::~HTMLInputElement): Unconditionally unregister both for both form state
2819 and the cache restoration callback
2820 (WebCore::HTMLInputElement::setInputType): Change registration with the document only if we're in one
2821 (WebCore::HTMLInputElement::attach): Don't bother registering for the callback here - that will be
2822 handled by setInputType() or by a change in owner document
2823 (WebCore::HTMLInputElement::willMoveToNewOwnerDocument): Unregister with the old owner document
2824 (WebCore::HTMLInputElement::didMoveToNewOwnerDocument): Register with the new owner document
2825 * html/HTMLInputElement.h:
2827 2007-05-13 Darin Adler <darin@apple.com>
2829 * platform/mac/TextBreakIteratorInternalICUMac.mm: Fix comment typo.
2831 2007-05-13 Rob Buis <buis@kde.org>
2835 http://bugs.webkit.org/show_bug.cgi?id=13529
2836 DOM3 keyIdentifier text is incorrect
2838 Use 4 digits for the Unicode based key identifiers.
2840 * html/HTMLButtonElement.cpp:
2841 (WebCore::HTMLButtonElement::defaultEventHandler):
2842 * html/HTMLInputElement.cpp:
2843 (WebCore::HTMLInputElement::defaultEventHandler):
2844 * html/HTMLSelectElement.cpp:
2845 (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
2846 * page/EventHandler.cpp:
2847 (WebCore::EventHandler::defaultKeyboardEventHandler):
2848 * page/gdk/EventHandlerGdk.cpp:
2849 (WebCore::isKeyboardOptionTab):
2850 * page/mac/EventHandlerMac.mm:
2851 (WebCore::isKeyboardOptionTab):
2852 * page/qt/EventHandlerQt.cpp:
2853 (WebCore::isKeyboardOptionTab):
2854 * platform/gdk/KeyEventGdk.cpp:
2855 (WebCore::keyIdentifierForGdkKeyCode):
2856 * platform/mac/KeyEventMac.mm:
2857 (WebCore::keyIdentifierForKeyEvent):
2858 * platform/qt/PlatformKeyboardEventQt.cpp:
2859 (WebCore::keyIdentifierForQtKeyCode):
2860 * platform/win/KeyEventWin.cpp:
2861 (WebCore::keyIdentifierForWindowsKeyCode):
2862 * platform/wx/KeyEventWin.cpp:
2863 (WebCore::keyIdentifierForWindowsKeyCode):
2864 * platform/wx/KeyboardEventWx.cpp:
2865 (WebCore::keyIdentifierForWxKeyCode):
2867 2007-05-12 Darin Adler <darin@apple.com>
2871 - fix <rdar://problem/5174903> Safari crashes opening the attached webarchive (made by OmniWeb)
2873 * loader/icon/IconLoader.cpp:
2874 (WebCore::IconLoader::didReceiveResponse): Check ResourceHandle for nil before calling url() on it.
2875 (WebCore::IconLoader::didFail): Ditto.
2876 (WebCore::IconLoader::didFinishLoading): Ditto.
2878 2007-05-12 Rob Buis <buis@kde.org>
2882 Cleanup, get rid of the SVGStyledElement::view() call.
2884 * ksvg2/svg/SVGClipPathElement.cpp:
2885 (WebCore::SVGClipPathElement::canvasResource):
2886 * ksvg2/svg/SVGFEFloodElement.cpp:
2887 (WebCore::SVGFEFloodElement::filterEffect):
2888 * ksvg2/svg/SVGGradientElement.cpp:
2889 (WebCore::SVGGradientElement::buildStops):
2890 * ksvg2/svg/SVGStyledElement.cpp:
2891 * ksvg2/svg/SVGStyledElement.h:
2893 2007-05-12 Mitz Pettel <mitz@webkit.org>
2897 - fix http://bugs.webkit.org/show_bug.cgi?id=13680
2898 Incomplete repaint of focus ring around continuation
2900 Test: fast/repaint/continuation-after-outline.html
2902 * rendering/RenderFlow.cpp:
2903 (WebCore::RenderFlow::absoluteClippedOverflowRect):
2905 2007-05-12 Oliver Hunt <oliver@apple.com>
2909 <rdar://problem/4728842> Can't drag-and-drop files onto <input type="file">
2911 This patch allows a file to be dropped on to a file input field. There
2912 are a few changes for data handling and a few to allow the data to be
2913 threaded to the appropriate places.
2915 * page/DragController.cpp:
2916 (WebCore::asFileInput):
2917 When dropping a file onto a file input we may mouse over either
2918 the element itself, or the contained button element. This method
2919 returns the base element for the file input in either of these
2921 (WebCore::DragController::tryDocumentDrag):
2922 Don't try to set the drag caret to a file input.
2923 (WebCore::DragController::concludeDrag):
2924 Handle dropping onto a file input element.
2925 (WebCore::DragController::canProcessDrag):
2926 We can now process a file being dragged onto a file input element.
2928 * platform/DragData.h:
2931 * platform/gdk/DragDataGdk.cpp:
2932 (WebCore::DragData::containsFiles):
2933 (WebCore::DragData::asFilenames):
2936 * platform/mac/DragDataMac.mm:
2937 (WebCore::DragData::containsFiles):
2938 (WebCore::DragData::asFilenames):
2939 Implement new accessors
2940 (WebCore::DragData::containsCompatibleContent):
2941 Update containsCompatibleContent to allow standalone files.
2943 * platform/qt/DragDataQt.cpp:
2944 (WebCore::DragData::containsFiles):
2945 (WebCore::DragData::asFilenames):
2948 * rendering/RenderFileUploadControl.cpp:
2949 (WebCore::RenderFileUploadControl::receiveDroppedFile):
2950 * rendering/RenderFileUploadControl.h:
2951 For security reasons we don't have an api to allow us to set
2952 a value directly on a file input -- attempts to do so are
2953 blocked. By adding a method to set the target through the
2954 render we bypass such restrictions, and ensure the renderer
2955 is updated correctly.
2957 2007-05-12 Mitz Pettel <mitz@webkit.org>
2961 - fix http://bugs.webkit.org/show_bug.cgi?id=13695
2962 REGRESSION (r21387): Replaced elements' highlight rects are wrongly positioned
2964 Test: fast/replaced/selection-rect.html
2966 Also fixes the same problem with list markers, covered by existing test
2967 fast/lists/markers-in-selection.html.
2969 * rendering/RenderListMarker.cpp:
2970 (WebCore::RenderListMarker::selectionRect):
2971 * rendering/RenderReplaced.cpp:
2972 (WebCore::RenderReplaced::selectionRect):
2974 2007-05-12 Mitz Pettel <mitz@webkit.org>
2978 - fix http://bugs.webkit.org/show_bug.cgi?id=13685
2979 REGRESSION (r21368-r21388): Highlighting text in scrolled textareas behaves oddly
2981 Test: fast/repaint/text-selection-rect-in-overflow.html
2983 * rendering/RenderText.cpp:
2984 (WebCore::RenderText::selectionRect):
2986 2007-05-12 Brady Eidson <beidson@apple.com>
2988 Rubber stamped by Mitz
2990 * html/HTMLInputElement.cpp:
2991 (WebCore::HTMLInputElement::attach): unregister->register - I screwed this one up in last minute renaming
2992 before committing :(
2994 2007-05-11 Brady Eidson <beidson@apple.com>
2996 Reviewed by Darin and Geoff
2998 Fix for http://bugs.webkit.org/show_bug.cgi?id=13630
3000 <rdar://problem/4873628>
3002 Back/Forward cache should work with pages with login fields.
3004 First change is to relocate the "useSecureKeyboardEntry" flag to the document. This lets
3005 it persist through page cache transitions and it is truly a per-document concept more than
3006 per-frame anyways since its the document that has a password field, not the frame.
3008 Second change is to introduce the concept of an Element getting a "didRestoreFromCache()" callback.
3009 The idea is for elements to register with the document if they need work to be done when the
3010 page comes out of the back/forward cache. Currently the only client of this service is
3011 HTMLInputElements that are input type == PASSWORD. Such an element's implementation for this
3012 method is to call reset()
3014 Finally, after a page is restored from the cache we have the document send the didRestoreFromCache()
3015 callback to its registered Elements. The whole design is to clear the password fields after
3016 restoring the page instead of when caching the page because we want to defer work for the common
3017 case - there shouldn't be extra work here just to navigate away from a page when the common case
3018 is that you'll never go back!
3020 No layout tests possible until http://bugs.webkit.org/show_bug.cgi?id=13672 is resolved
3023 (WebCore::Document::Document):
3024 (WebCore::Document::registerForDidRestoreFromCacheCallback): Add an Element to the special page-restoration callback list
3025 (WebCore::Document::unregisterForDidRestoreFromCacheCallback): Remove such an element
3026 (WebCore::Document::didRestoreFromCache): Called by FrameLoader - dispatch to all the registered elements
3027 (WebCore::Document::setUseSecureKeyboardEntryWhenActive): Set the local flag and call updateSecureKeyboardEntryIfActive
3029 (WebCore::Document::useSecureKeyboardEntryWhenActive): Return the flag
3032 (WebCore::Document::unregisterFormElementWithState): Renamed
3035 (WebCore::Element::didRestoreFromCache): Added virtual base method
3037 * html/HTMLInputElement.cpp:
3038 (WebCore::HTMLInputElement::~HTMLInputElement): Deregister from the document if inputType == PASSWORD
3039 (WebCore::HTMLInputElement::dispatchFocusEvent): Set the flag on the document, not the frame
3040 (WebCore::HTMLInputElement::dispatchBlurEvent): Ditto
3041 (WebCore::HTMLInputElement::setInputType): If changing to/from PASSWORD, register/deregister in the document accordingly
3042 (WebCore::HTMLInputElement::attach): Call registerForDidRestoreFromCacheCallback(this) instead of passwordFieldAdded()
3043 (WebCore::HTMLInputElement::didRestoreFromCache): Call reset();
3044 * html/HTMLInputElement.h:
3046 * html/HTMLSelectElement.cpp:
3047 (WebCore::HTMLSelectElement::~HTMLSelectElement): Renamed deregisterFormElementWithState to unregisterFormElementWithState
3048 * html/HTMLTextAreaElement.cpp:
3049 (WebCore::HTMLTextAreaElement::~HTMLTextAreaElement): Ditto
3051 * loader/FrameLoader.cpp:
3052 (WebCore::FrameLoader::canCachePage): Remove the check for password fields - they're allowed now!
3053 (WebCore::FrameLoader::opened): Tell the document to dispatch to the registered elements
3054 (WebCore::FrameLoader::saveDocumentState): Remove the check for password fields. Turns out that when we grab a copy a the
3055 form state we're only copying the state of form elements that are registered with the Document - and that set
3056 explicitly excludes Password elements
3059 (WebCore::Frame::setDocument): If the frame is active, set the setUseSecureKeyboardEntry based on the setting contained
3061 (WebCore::Frame::updateSecureKeyboardEntryIfActive): Notification for the secure entry flag changing - if the Frame is
3062 active, then update to the new setting from the document
3063 (WebCore::Frame::setIsActive): Grab the useSecureKeyboardEntry flag from the document instead of FramePrivate
3064 (WebCore::FramePrivate::FramePrivate):
3066 * page/FramePrivate.h:
3068 2007-05-12 David Hyatt <hyatt@apple.com>
3070 FIx for 13696. Rework residual style to be much more aggressive about reopening. Added
3071 a comprehensive test case of HTML tags to guarantee we match Firefox. We now have an exclusion
3072 set rather than an inclusion set, so unknown future tags will also participate in residual style.
3076 fast/invalid/residual-style.html
3078 2007-05-12 David Hyatt <hyatt@apple.com>
3080 Fix for bug 12740, bmw.com doesn't work. We were missing a rule that is covered by the HTML5
3081 parsing spec. A <table> encountered while inside stray table content should close up the
3082 table responsible for the stray content and start the new table as a sibling of the first.
3086 fast/invalid/table-inside-stray-table-content.html
3088 2007-05-12 Eric Seidel <eric@webkit.org>
3092 Crash starting Safari with JavaScript disabled.
3093 http://bugs.webkit.org/show_bug.cgi?id=13691
3095 Test: none possible.
3097 * page/mac/FrameMac.mm:
3098 (WebCore::Frame::cleanupPlatformScriptObjects): NULL check d->m_script
3100 2007-05-11 David Hyatt <hyatt@apple.com>
3102 Fix for http://bugs.webkit.org/show_bug.cgi?id=13688, Colloquy is broken!
3104 Make sure to adjust the baseline of a percentage height table cell's row if the
3105 cell flexes (and lowers the baseline).
3109 fast/tables/vertical-align-baseline-readjust.html
3111 (WebCore::RenderTableSection::calcRowHeight):
3112 (WebCore::RenderTableSection::layoutRows):
3113 * rendering/RenderTableSection.h:
3114 (WebCore::RenderTableSection::getBaseline):
3116 2007-05-11 David Hyatt <hyatt@apple.com>
3118 Make sure focus rings are always using the exterior style, regardless
3119 of what the OS default is.
3123 * rendering/RenderThemeMac.mm:
3124 (WebCore::RenderThemeMac::checkbox):
3125 (WebCore::RenderThemeMac::radio):
3126 (WebCore::RenderThemeMac::popupButton):
3127 (WebCore::RenderThemeMac::search):
3128 (WebCore::RenderThemeMac::sliderThumbHorizontal):
3129 (WebCore::RenderThemeMac::sliderThumbVertical):
3131 2007-05-11 Oliver Hunt <oliver@apple.com>
3135 <rdar://problem/5195473> REGRESSION: "Curly quote" fails to
3136 be displayed correctly even when META tag specifies charset=x-mac-roman
3139 * platform/TextCodecICU.cpp:
3140 (WebCore::TextCodecICU::registerExtendedEncodingNames):
3141 Register the xmacroman encoding
3143 2007-05-11 Maciej Stachowiak <mjs@apple.com>
3147 REGRESSION (r21367): Crash due to null document deref when closing bookmarks
3148 http://bugs.webkit.org/show_bug.cgi?id=13662
3150 * loader/FrameLoader.cpp:
3151 (WebCore::FrameLoader::provisionalLoadStarted): Remove some useless and now harmful
3152 code - there's no need to clear in this case.
3154 2007-05-11 Oliver Hunt <oliver@apple.com>
3160 (WebCore::Document::importNode):
3162 2007-05-11 Maciej Stachowiak <mjs@apple.com>
3166 - fixed <rdar://problem/5197621> closing second window crashed webkit (13660)
3167 http://bugs.webkit.org/show_bug.cgi?id=13660
3169 No test case; not testable.
3171 * page/mac/FrameMac.mm:
3172 (WebCore::Frame::cleanupPlatformScriptObjects): Check if the interpreter is null;
3173 if so, we don't want to do work that may lazily create it while the Frame is being
3176 2007-05-11 Oliver Hunt <oliver@apple.com>
3180 <rdar://problem/5017375> WebKit should disable SVG in Dashboard
3182 Prevents an SVG document or element from being created when in
3183 dashboard compatibility mode.
3185 Manually parsing, or using XHR to created a document removes our
3186 ability to detect Dashboard compatibility mode, so we also perform
3187 the check when importing nodes from one document into another.
3189 * dom/DOMImplementation.cpp:
3190 (WebCore::DOMImplementation::createDocument):
3191 Don't create an SVGDocument if we're in dashboard compatibility mode
3194 (WebCore::Document::importNode):
3195 Don't import SVG nodes if we're in dashboard compatibility mode
3197 * ksvg2/scripts/make_names.pl:
3198 Don't create SVG elements for documents that are in dashboard
3201 2007-05-11 Holger Hans Peter Freyther <zecke@selfish.org>
3205 Bug 13676: [cairo/gdk] Provide implementation for ImageBufferCairo
3206 http://bugs.webkit.org/show_bug.cgi?id=13676
3208 There are no test cases that explicitly cover platform/graphics at present.
3210 * platform/graphics/ImageBuffer.h: Add cairo bits
3211 * platform/graphics/cairo/ImageBufferCairo.cpp: Untested implementation of the ImagerBuffer using the image_surface
3212 (WebCore::ImageBuffer::create): Create a reasonable sized surface
3213 (WebCore::ImageBuffer::ImageBuffer): Use a cairo_surface and create a GraphicsContext. GraphicsContext takes the cairo_t ownership
3214 (WebCore::ImageBuffer::~ImageBuffer): Unref the surface
3215 (WebCore::ImageBuffer::context): simply return the GraphicsContext, it should be possible to directly draw on it.
3217 2007-05-11 Mitz Pettel <mitz@webkit.org>
3221 * platform/mac/ShapeArabic.c:
3224 2007-05-11 Geoffrey Garen <ggaren@apple.com>
3226 Reviewed by Darin Adler.
3228 Removed +[WebScriptObject scriptObjectForJSObject:frame:] because the
3229 WebScriptObject API has some serious limitations that make it not ready
3230 to be used everywhere the C API is used. Hopefully we can add a good
3231 ObjC API in the future that doesn't suffer from this problem.
3233 Preliminary notes about these limitations are in <rdar://problem/4876466>.
3235 * bindings/objc/WebScriptObject.mm:
3236 * bindings/objc/WebScriptObjectPendingPublic.h:
3238 2007-05-11 Mitz Pettel <mitz@webkit.org>
3242 - fix http://bugs.webkit.org/show_bug.cgi?id=13635
3243 REGRESSION: Cannot log in to webmail.co.za account
3245 Test: fast/dom/HTMLOptionElement/option-text.html
3247 Despite the specification that the 'text' attribute of HTMLOptionElement
3248 is "the text contained within the option element", other browsers return
3249 the text as displayed in the list box or popup, which is without leading,
3250 trailing and collapsible whitespace.
3252 * html/HTMLOptionElement.cpp:
3253 (WebCore::HTMLOptionElement::text): Moved the code to trim and collapse
3254 whitespace and replace backslashes with the currency symbol into this
3256 (WebCore::HTMLOptionElement::optionText): Left only the code that adds
3257 the leading spaces for grouped options. Removed code that, in quirks mode,
3258 displayed the label if the option element contained no text. That behavior
3259 did not match WinIE and the description of the expected behavior in
3260 fast/forms/HTMLOptionElement_label06.html.
3262 2007-05-11 Mitz Pettel <mitz@webkit.org>
3266 - fix http://bugs.webkit.org/show_bug.cgi?id=13572
3267 Arabic characters are not correctly joined when using Arial
3269 No tests added because standard fonts do not use the character-based shaping
3272 Added shapeArabic(), a private version of u_shapeArabic() from ICU,
3273 patched to shape Arabic characters used in Persian, Urdu, Sindhi, etc.
3274 (whose contextual forms belong to the Arabic Presentation Forms-A block).
3276 * WebCore.xcodeproj/project.pbxproj: Added ShapeArabic.{c,h}.
3277 * platform/mac/FontMac.mm:
3278 (WebCore::shapeArabic): Changed to call shapeArabic() instead of u_shapeArabic().
3279 * platform/mac/ShapeArabic.c: Added. Based on ushape.c from ICU, with
3280 additional shaping data and logic for Arabic Presentation Forms-A. Removed
3281 many options that are not used in WebKit and code that malloc()ed a temporary
3282 buffer and reversed the string.
3289 * platform/mac/ShapeArabic.h: Added.
3291 2007-05-11 Darin Adler <darin@apple.com>
3295 - fix http://bugs.webkit.org/show_bug.cgi?id=7452
3296 <rdar://problem/3211749> line breaks ignored after <wbr> in <pre> block (affects livejournal.com)
3298 - fix http://bugs.webkit.org/show_bug.cgi?id=10657
3299 <rdar://problem/4274588> <wbr> tags are ignored
3301 - fix http://bugs.webkit.org/show_bug.cgi?id=12689
3302 <wbr> :before/:after content causes line break
3304 - fix <rdar://problem/5127366> DOM tree isn't correct when parsing with <wbr>
3306 Test: fast/text/wbr-pre.html
3307 Test: fast/text/wbr.html
3308 Test: fast/css-generated-content/wbr-with-before-content.html
3309 Test: fast/parser/parse-wbr.html
3311 * html/HTMLElement.h:
3312 * html/HTMLElement.cpp:
3313 (WebCore::HTMLElement::endTagRequirement): Use the same end tag requirement for a <wbr>
3314 element as for a <br> element, TagStatusForbidden.
3315 (WebCore::HTMLElement::tagPriority): Use the same priority for a <wbr> element as for a
3317 (WebCore::HTMLElement::createRenderer): Added. Create a RenderWordBreak to trigger the
3318 new rendering code paths.
3320 * rendering/RenderFlow.h: Add a virtual isWordBreak so we can detect RenderWordBreak.
3322 * rendering/RenderWordBreak.h: Added.
3323 * rendering/RenderWordBreak.cpp: Added.
3325 * WebCore.pro: Added new files.
3326 * WebCore.xcodeproj/project.pbxproj: Added new files.
3327 * WebCoreSources.bkl: Added new files.
3329 * rendering/RenderBlock.cpp: (WebCore::RenderBlock::calcInlinePrefWidths): Reset the
3330 line when we hit a <wbr>.
3331 * rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Add a line break when
3334 * dom/Node.cpp: (Node::createRendererIfNeeded): Fix a null check for the case where
3335 createRenderer returns 0 even though rendererIsNeeded returned true. I can't reproduce
3336 it on demand, but while running layout tests I hit this once. Since there was already
3337 a null check here, I rearranged it so it guards all the code that uses the renderer.
3338 Later we might want to figure out under exactly what circumstances rendererIsNeeded
3339 will return true but createRenderer return 0 and consider eliminating them.
3341 2007-05-11 David Hyatt <hyatt@apple.com>
3343 Fix for bug 13675, focus rings don't repaint properly on editable
3348 (WebCore::InlineFlowBox::paint):
3349 * rendering/RenderBlock.cpp:
3350 (WebCore::RenderBlock::paintObject):
3351 (WebCore::continuationOutlineTable):
3352 (WebCore::RenderBlock::addContinuationWithOutline):
3353 (WebCore::RenderBlock::paintContinuationOutlines):
3354 * rendering/RenderBlock.h:
3355 * rendering/RenderBox.cpp:
3356 (WebCore::RenderBox::absoluteClippedOverflowRect):
3357 * rendering/RenderObject.cpp:
3358 (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
3359 (WebCore::RenderObject::absoluteOutlineBox):
3361 2007-05-11 Rob Buis <buis@kde.org>
3365 Cleanups mostly inspired by Coverage results.
3367 * ksvg2/css/SVGCSSParser.cpp:
3368 (WebCore::CSSParser::parseSVGValue):
3369 (WebCore::CSSParser::parseSVGStrokeDasharray):
3370 * ksvg2/css/SVGRenderStyleDefs.cpp:
3371 (StyleFillData::operator==):
3372 * ksvg2/svg/SVGColor.cpp:
3373 (WebCore::SVGColor::colorFromRGBColorString):
3375 2007-05-11 Holger Freyther <freyther@kde.org>
3377 Reviewed by Mark Rowe.
3379 Move libcurl configuration into WebKit.pri so it will be used by GdkLauncher.
3383 2007-05-10 David Hyatt <hyatt@apple.com>
3385 <rdar://problem/5015522> Bounds rectangle of unloaded images is
3386 drawn briefly while loading
3388 When the image is null and has no size, don't draw the grey
3389 rectangles or alt text any more. Wait for an actual error to
3390 occur with the image before we start showing alt text and borders.
3392 (Images with no source set at all will continue to show alt text and
3393 borders immediately.)
3395 Reviewed by bradee-oh
3397 * rendering/RenderImage.cpp:
3398 (WebCore::RenderImage::paint):
3400 2007-05-10 Mitz Pettel <mitz@webkit.org>
3404 - fix http://bugs.webkit.org/show_bug.cgi?id=13655
3405 Incomplete repaint when text-shadow is used in a render layer with explicit height
3407 Test: fast/repaint/layer-full-repaint.html
3409 Removed custom repaint logic from RenderLayer. repaintAfterLayoutIfNeeded()
3410 knows how to do everything we need now. The only catch is that we cannot
3411 rely on its "do a full repaint if the object needs layout" behavior, since
3412 by the time we call it, the needs layout flag has been reset. The solution
3413 is to cache the need for a full repaint in the layer.
3415 * page/FrameView.cpp:
3416 (WebCore::FrameView::layout): Removed call to checkForRepaintOnResize().
3417 * rendering/RenderLayer.cpp:
3418 (WebCore::RenderLayer::checkForRepaintOnResize): Removed.
3419 (WebCore::RenderLayer::RenderLayer): Replaced the m_repaintOverflowOnResize
3420 flag with a m_needsFullRepaint flag, which indicates that the layer needs
3421 to do a full repaint in the next call to updateLayerPositions().
3422 (WebCore::RenderLayer::updateLayerPositions): Simplified the repaint logic.
3423 Either call repaintAfterLayoutIfNeeded() or do a full repaint, depending on
3425 * rendering/RenderLayer.h:
3426 (WebCore::RenderLayer::setNeedsFullRepaint):
3427 * rendering/RenderObject.cpp:
3428 (WebCore::RenderObject::setNeedsLayout): Mark the layer for full repaint.
3430 2007-05-10 Justin Garcia <justin.garcia@apple.com>
3434 <rdar://problem/5195166> Incorrect proposedRange DOMRange passed to WebViewEditing delegate
3436 In setModifyBias, we must cache the start and the end
3437 because the calls to setBase and setExtent can modify
3438 them (added a testcase).
3439 The temporary SelectionController that we use in modify() to
3440 produce the proposed range that will be passed to
3441 shouldChangeSelectedDOMRange must have the same m_modifyBias
3442 as the original SelectionController, or else when the
3443 modification is performed, setModifyBias can swap the base
3444 and the extent incorrectly (added a testcase).
3445 Renamed m_modifyBias to m_lastChangeWasHorizontalExtension.
3446 Renamed setModifyBias to willBeModified.
3448 * editing/SelectionController.cpp:
3449 (WebCore::SelectionController::SelectionController):
3450 (WebCore::SelectionController::setSelection):
3451 (WebCore::SelectionController::willBeModified):
3452 (WebCore::SelectionController::modify):
3453 * editing/SelectionController.h:
3454 (WebCore::SelectionController::setLastChangeWasHorizontalExtension):
3455 * page/EventHandler.cpp:
3456 (WebCore::EventHandler::handleMousePressEventSingleClick):
3457 (WebCore::EventHandler::updateSelectionForMouseDragOverPosition):
3459 2007-05-10 Geoffrey Garen <ggaren@apple.com>
3461 Reviewed by Darin Adler.
3463 "IconDatabase::sharedIconDatabase()" => "iconDatabase()" for terseness,
3464 in the style of WebCore::cache().
3467 * history/HistoryItem.cpp: Removed retainIconInDatabase because calling
3468 "retain" in order to release something is really confusing and, now that
3469 iconDatabase() is more terse, we don't need this helper to shorten the
3470 syntax. (The isEmpty() check is also done by the database, so we don't
3473 (WebCore::IconDatabase::~IconDatabase): ASSERT that our destructor isn't
3474 called. We're a singleton, so it's confusing to have tear-down code.
3476 2007-05-10 Adele Peterson <adele@apple.com>
3480 WebCore part of fix for <rdar://problem/4100616> Doing a "find" in RSS doesn't scroll to result
3482 Test: fast/overflow/scroll-nested-positioned-layer-in-overflow.html
3484 Merged visibleSelectionRect into selectionRect. selectionRect() now takes an argument to determine
3485 whether or not to return a rect that clips to the visible content. This change makes all of the implementations of selectionRect
3486 consistent by having them all consider the repaint rect when clipping to visible content.
3489 (WebCore::Frame::revealSelection): Call selectionRect with clipToVisibleContent = false, so we can get a rect that's not visible to reveal.
3490 (WebCore::Frame::selectionRect): Added clipToVisibleContent argument, and merged visibleSelectionRect into this method.
3491 (WebCore::Frame::setIsActive): Use selectionRect instead of visibleSelectionRect.
3493 * page/mac/FrameMac.mm: (WebCore::Frame::selectionImage): Update layout before creating the image. Use selectionRect instead of visibleSelectionRect.
3494 * page/DragController.cpp: (WebCore::dragLocForSelectionDrag): Use selectionRect instead of visibleSelectionRect.
3496 * rendering/RenderBR.h: (WebCore::RenderBR::selectionRect): Updated argument.
3497 * rendering/RenderBlock.h: (WebCore::RenderBlock::selectionRect): ditto.
3498 * rendering/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::selectionRect): ditto.
3499 * rendering/RenderSVGInlineText.h: ditto.
3500 * rendering/RenderObject.h:
3501 (WebCore::RenderObject::selectionRect): ditto.
3502 (WebCore::RenderObject::SelectionInfo::SelectionInfo): ditto.
3503 * rendering/RenderView.cpp:
3504 (WebCore::RenderView::selectionRect): ditto.
3505 (WebCore::RenderView::setSelection): ditto.
3506 * rendering/RenderView.h:
3508 * rendering/RenderText.h:
3509 * rendering/RenderText.cpp: (WebCore::RenderText::selectionRect): Only call computeAbsoluteRepaintRect when clipping to visible content.
3510 Otherwise, just adjust the rect to the correct position.
3511 * rendering/RenderListMarker.h:
3512 * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::selectionRect):
3513 To match what we do in RenderText, if we're trying to clip to visible content, just call computeAbsoluteRepaintRect.
3514 * rendering/RenderReplaced.h:
3515 * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::selectionRect): ditto.
3517 * 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
3518 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.
3519 This will prevent us from revealing text hidden by the slider in Safari RSS.
3521 * WebCore.exp: Update symbols for WebKit.
3523 2007-05-10 David Hyatt <hyatt@apple.com>
3527 <rdar://problem/5195272> REGRESSION: broke outline rings for continuations
3528 with empty inline containers
3530 http://bugs.webkit.org/show_bug.cgi?id=13667
3532 Make sure to only include collapsed top/bottom margins of the block portion
3533 of the continuation if we know for sure that we have inline line boxes before
3534 and after that would prevent the collapse from going further.
3536 In plain English: the focus rings were too tall. :)
3540 * rendering/RenderFlow.cpp:
3541 (WebCore::RenderFlow::addFocusRingRects):
3543 2007-05-10 David Hyatt <hyatt@apple.com>
3547 <rdar://problem/5067235> REGRESSION: Excessively wide table, impossible to resize
3549 The table used white-space: pre-wrap, which is supported only by WebKit. There
3550 was a bug with the computation of min pref width for pre-wrap text.
3552 Reviewed by mitzpettel
3554 fast/text/white-space/pre-wrap-line-test.html
3556 * rendering/RenderText.cpp:
3557 (WebCore::RenderText::calcPrefWidths):
3559 2007-05-10 Brady Eidson <beidson@apple.com>
3563 Cleanup from my earlier Java Applet patch. We should keep a central location to query if
3564 a mime type counts as a Java Applet
3566 * html/HTMLObjectElement.cpp:
3567 (WebCore::HTMLObjectElement::containsJavaApplet): Query MimeTypeRegistry on the type
3569 * platform/MimeTypeRegistry.cpp:
3570 (WebCore::MimeTypeRegistry::isSupportedImageMIMEType): Update style
3571 (WebCore::MimeTypeRegistry::isSupportedImageResourceMIMEType): Ditto
3572 (WebCore::MimeTypeRegistry::isSupportedNonImageMIMEType): Ditto
3573 (WebCore::MimeTypeRegistry::isJavaAppletMIMEType): Perform the Java Applet check
3574 * platform/MimeTypeRegistry.h:
3576 * rendering/RenderPartObject.cpp:
3577 (WebCore::RenderPartObject::updateWidget): Query MimeTypeRegistry on the type
3579 2007-05-10 Patti Hoa <patti@apple.com>
3583 <rdar://problem/4720109> Sentence textMarker methods do not work well with empty lines
3585 * bridge/mac/WebCoreAXObject.mm:
3586 (-[WebCoreAXObject doAXNextSentenceEndTextMarkerForTextMarker:]):
3587 (-[WebCoreAXObject doAXPreviousSentenceStartTextMarkerForTextMarker:]):
3588 When a marker position is given, the sentence ax methods automatically shift position by one to make sure
3589 not to ask for the current sentence again. This is generally fine except when the position
3590 shift over an empty line break, which is should be considered a separate sentence. In this case,
3591 if we used the shifted position to ask for sentence boundary, ICU parser is not given the text data
3592 containing the newline to correctly determine the sentence boundary. Since the ax sentence method is
3593 explicitly shifting the position to ask for sentence boundary, it should make sure not to skip over important