ap [Sat, 29 Jul 2006 14:56:42 +0000 (14:56 +0000)]
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10147
REGRESSION: custom attribute values set via javascript are not persistent
Test: fast/dom/Element/setAttribute-case-insensitivity.html
* dom/Element.cpp:
(WebCore::Element::setAttribute): Use the lowercased localName for retrieving the old value, too.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15686
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 29 Jul 2006 14:53:40 +0000 (14:53 +0000)]
- rolled out the test for bug 9753, since we rolled out the fix
we'll bring back the test when we bring back the fix
* svg/custom/width-full-percentage-expected.checksum: Removed.
* svg/custom/width-full-percentage-expected.png: Removed.
* svg/custom/width-full-percentage-expected.txt: Removed.
* svg/custom/width-full-percentage.svg: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15685
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Sat, 29 Jul 2006 00:25:56 +0000 (00:25 +0000)]
Suggested by Darin.
Moving the implementation of isContentEditable to the
the WebPrivate category.
* bindings/objc/DOM.mm:
(-[DOMNode isContentEditable]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15684
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
justing [Sat, 29 Jul 2006 00:24:21 +0000 (00:24 +0000)]
LayoutTests:
Reviewed by levi
<rdar://problem/
4515463>
REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page
Removed incorrect nesting:
* editing/pasteboard/paste-table-001-expected.checksum:
* editing/pasteboard/paste-table-001-expected.png:
* editing/pasteboard/paste-table-001-expected.txt:
* editing/pasteboard/paste-table-003-expected.txt:
WebCore:
Reviewed by levi
First part of:
<rdar://problem/
4515463>
REGRESSION: Blot and Mail both do a very poor job of pasting the main www.apple.com page
Migrate to isBlock and enclosingBlock.
Changed RendereringInfo::isBlock and ReplacementFragment::isBlock
to wasBlock so that they don't conflict with isBlock and because
it's more descriptive.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::mergeStartNode):
(WebCore::ReplacementFragment::wasBlock):
(WebCore::ReplacementFragment::saveRenderingInfo):
(WebCore::ReplacementFragment::renderedBlocks):
(WebCore::RenderingInfo::RenderingInfo):
(WebCore::ReplaceSelectionCommand::shouldMergeStart):
(WebCore::ReplaceSelectionCommand::doApply):
* editing/ReplaceSelectionCommand.h:
(WebCore::RenderingInfo::wasBlock):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15683
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
justing [Fri, 28 Jul 2006 22:01:54 +0000 (22:01 +0000)]
LayoutTests:
Reviewed by levi
<rdar://problem/
4242293>
Poor paste fidelity of http://www.google.com/
Removed one of the two extraneous newlines that are introduced on paste:
* editing/pasteboard/paste-table-003-expected.checksum:
* editing/pasteboard/paste-table-003-expected.png:
* editing/pasteboard/paste-table-003-expected.txt:
Fewer pastes remove nodes containing the selection b/c of
the changes to interchange newlines:
* editing/pasteboard/paste-line-endings-007-expected.txt:
* editing/pasteboard/paste-line-endings-008-expected.txt:
* editing/pasteboard/paste-line-endings-009-expected.txt:
Added:
* editing/pasteboard/
4242293-1-expected.checksum: Added.
* editing/pasteboard/
4242293-1-expected.png: Added.
* editing/pasteboard/
4242293-1-expected.txt: Added.
* editing/pasteboard/
4242293-1.html: Added.
* editing/pasteboard/
4242293-expected.checksum: Added.
* editing/pasteboard/
4242293-expected.png: Added.
* editing/pasteboard/
4242293-expected.txt: Added.
* editing/pasteboard/
4242293.html: Added.
WebCore:
Reviewed by levi
More changes for:
<rdar://problem/
4242293>
Poor paste fidelity of http://www.google.com/
* editing/markup.cpp:
(WebCore::needInterchangeNewlineAfter): Added.
(WebCore::createMarkup):
Only add an interchangeNewline if we're annotating for interchange. Can't test
this until we expose createMarkup in non-annotate mode (I'd expose Range::toHTML).
Remove the FIXME about prepending the interchangeNewline before creating the rest
of the markup. Its correct to surround the interchangeNewline in ancestors of the
adjusted startNode.
Fixed the check to see if an interchangeNewline is needed (!inSameBlock). This would
add an interchangeNewline for a selection that started before a table.
Removed the workaround for the bug where markup for a table was not included when
selecting the contents of a table, since this change fixes the general problem of
markup for ancestors of the startNode being left out.
Don't leave out ancestors of the startNode as we leave their subtrees. Execute the
code to include them even if we closed ancestors in the ancestorsToClose list.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15673
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Fri, 28 Jul 2006 19:59:37 +0000 (19:59 +0000)]
Reviewed by John.
<rdar://problem/
4657473> REGRESSION: Spell check not available from contextual menu in Mail
The context menu code should be checking isContentEditable
on DOMNode not just DOMElement. This is needed because DOMText
will be the node class of any text that is clicked.
* DefaultDelegates/WebDefaultContextMenuDelegate.m:
(-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15671
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Fri, 28 Jul 2006 19:58:30 +0000 (19:58 +0000)]
WebCore:
Reviewed by John.
Adding isContentEditable to DOMNode's private category.
* bindings/objc/DOMPrivate.h:
WebKit:
Reviewed by John.
The context menu code should be checking isContentEditable
on DOMNode not just DOMElement. This is needed because DOMText
will be the node class of any text that is clicked.
* DefaultDelegates/WebDefaultContextMenuDelegate.m:
(-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15670
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Fri, 28 Jul 2006 19:19:07 +0000 (19:19 +0000)]
Rolling out bugzilla.opendarwin.org/show_bug.cgi?id=6010 because of failing layout tests.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15669
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Fri, 28 Jul 2006 19:01:18 +0000 (19:01 +0000)]
Rolling out bugzilla.opendarwin.org/show_bug.cgi?id=9753 because of failing layout tests.
SVG with width and height 100% leaves room for scrollbar on the right.
* kcanvas/RenderPath.cpp:
* kcanvas/RenderPath.h:
* kcanvas/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::layout):
* ksvg2/svg/SVGCircleElement.cpp:
* ksvg2/svg/SVGCircleElement.h:
* ksvg2/svg/SVGEllipseElement.cpp:
* ksvg2/svg/SVGEllipseElement.h:
* ksvg2/svg/SVGLineElement.cpp:
* ksvg2/svg/SVGLineElement.h:
* ksvg2/svg/SVGRectElement.cpp:
* ksvg2/svg/SVGRectElement.h:
* ksvg2/svg/SVGStyledElement.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15668
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eseidel [Fri, 28 Jul 2006 18:07:35 +0000 (18:07 +0000)]
2006-07-27 Eric Seidel <eric@eseidel.com>
Reviewed by darin.
Add better SVGLoad event support.
http://bugzilla.opendarwin.org/show_bug.cgi?id=6010
There will still need to be additional support added for <link> and <script> elements.
Not all of the error -> loaded -> error transition cases work yet.
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::dispatchGenericEvent):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::dispatchLoadEvent):
* html/HTMLImageLoader.h:
(WebCore::HTMLImageLoader::haveFiredLoadEvent):
(WebCore::HTMLImageLoader::setHaveFiredLoadEvent):
* ksvg2/misc/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::SVGImageLoader):
(WebCore::SVGImageLoader::dispatchLoadEvent):
* ksvg2/misc/SVGImageLoader.h:
* ksvg2/svg/SVGAElement.cpp:
(WebCore::SVGAElement::parseMappedAttribute):
* ksvg2/svg/SVGAnimatedBoolean.h:
* ksvg2/svg/SVGElement.cpp:
(WebCore::SVGElement::SVGElement):
(WebCore::SVGElement::parseMappedAttribute):
(WebCore::SVGElement::haveLoadedRequiredResources):
(WebCore::SVGElement::sendSVGLoadEventIfPossible):
(WebCore::SVGElement::closeRenderer):
* ksvg2/svg/SVGElement.h:
(WebCore::SVGElement::rendererIsNeeded):
(WebCore::svg_dynamic_cast):
* ksvg2/svg/SVGExternalResourcesRequired.h:
* ksvg2/svg/SVGImageElement.cpp:
(SVGImageElement::SVGImageElement):
(SVGImageElement::haveLoadedRequiredResources):
* ksvg2/svg/SVGImageElement.h:
* ksvg2/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::parseMappedAttribute):
* ksvg2/svg/SVGScriptElement.cpp:
(WebCore::SVGScriptElement::SVGScriptElement):
(WebCore::SVGScriptElement::parseMappedAttribute):
(WebCore::SVGScriptElement::executeScript):
* xml/xmlhttprequest.cpp:
(WebCore::XMLHttpRequest::callReadyStateChangeListener): use new Event() instead of createEvent
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15667
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Fri, 28 Jul 2006 05:13:24 +0000 (05:13 +0000)]
Reviewed by Anders.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=10135
Cleanup: remove useless parameters from RenderObject::position()
No test possible (no functionality change)
* rendering/RenderBox.cpp:
(WebCore::RenderBox::position):
* rendering/RenderBox.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::position):
* rendering/RenderTableRow.h:
(WebCore::RenderTableRow::position):
* rendering/RenderTableSection.h:
(WebCore::RenderTableSection::position):
* rendering/RenderText.cpp:
(WebCore::RenderText::position):
* rendering/RenderText.h:
* rendering/bidi.cpp:
(WebCore::RenderBlock::constructLine):
(WebCore::RenderBlock::computeVerticalPositionsForLine):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15666
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Fri, 28 Jul 2006 04:53:11 +0000 (04:53 +0000)]
LayoutTests:
Reviewed by Maciej.
Test case for
<http://bugzilla.opendarwin.org/show_bug.cgi?id=9753>
SVG with width and height 100% leaves room for scrollbar on the right.
* svg/custom/width-full-percentage-expected.txt: Added.
* svg/custom/width-full-percentage-expected.checksum: Added.
* svg/custom/width-full-percentage-expected.png: Added.
* svg/custom/width-full-percentage.svg: Added.
WebCore:
Reviewed by Maciej.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9753
SVG with width and height 100% leaves room for scrollbar on the right.
Relayout children of svg containers, except svg shapes that do not depend on percentages.
* kcanvas/RenderPath.cpp: (WebCore::RenderPath::hasPercentageValues):
* kcanvas/RenderPath.h:
* kcanvas/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::layout):
* ksvg2/svg/SVGCircleElement.cpp: (SVGCircleElement::hasPercentageValues):
* ksvg2/svg/SVGCircleElement.h:
* ksvg2/svg/SVGEllipseElement.cpp: (WebCore::SVGEllipseElement::hasPercentageValues):
* ksvg2/svg/SVGEllipseElement.h:
* ksvg2/svg/SVGLineElement.cpp: (SVGLineElement::hasPercentageValues):
* ksvg2/svg/SVGLineElement.h:
* ksvg2/svg/SVGRectElement.cpp: (WebCore::SVGRectElement::hasPercentageValues):
* ksvg2/svg/SVGRectElement.h:
* ksvg2/svg/SVGStyledElement.h: (WebCore::SVGStyledElement::hasPercentageValues):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15665
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
justing [Thu, 27 Jul 2006 23:50:51 +0000 (23:50 +0000)]
LayoutTests:
Reviewed by levi
<rdar://problem/
4242293>
Poor paste fidelity of http://www.google.com/
* editing/pasteboard/styled-element-markup-expected.checksum: Added.
* editing/pasteboard/styled-element-markup-expected.png: Added.
* editing/pasteboard/styled-element-markup-expected.txt: Added.
* editing/pasteboard/styled-element-markup.html: Added.
WebCore:
Reviewed by levi
<rdar://problem/
4242293>
Poor paste fidelity of http://www.google.com/
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyle): Fixed crasher with nil-check.
* editing/markup.cpp:
(WebCore::startMarkup): Style information wasn't added to an element if it had
attributes but no style attribute.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15656
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
lypanov [Thu, 27 Jul 2006 21:06:13 +0000 (21:06 +0000)]
2006-07-27 Alexander Kellett <lypanov@kde.org>
Reviewed by Darin.
- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=9867
REGRESSION: code that modifies form element in Firefox modifies form attribute in WebKit
* bindings/scripts/CodeGeneratorJS.pm: add new attribute - HasOverridingNameGetter
* html/HTMLFormElement.idl:
2006-07-27 Alexander Kellett <lypanov@kde.org>
Reviewed by Darin.
Test for: http://bugzilla.opendarwin.org/show_bug.cgi?id=9867
REGRESSION: code that modifies form element in Firefox modifies form attribute in WebKit
* fast/forms/input-named-action-overrides-action-attribute-expected.txt: Added.
* fast/forms/input-named-action-overrides-action-attribute.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15654
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rwlbuis [Thu, 27 Jul 2006 20:18:49 +0000 (20:18 +0000)]
Reviewed by Anders.
http://bugzilla.opendarwin.org/show_bug.cgi?id=8992
Some HTML DOM attributes have incorrect types
Adjust idl and dom source code for HTMLImageElement and
HTMLBaseFontElement to choose correct type for
HTMLImageElement::border and HTMLBaseFontElement::size
attributes.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15653
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
justing [Thu, 27 Jul 2006 20:01:56 +0000 (20:01 +0000)]
LayoutTests:
Reviewed by levi
<rdar://problem/
4628409>
Safari crashes in CompositeEditCommand::removeBlockPlaceholder entering text in a web page form
* fast/forms/
4628409-expected.txt: Added.
* fast/forms/
4628409.html: Added.
WebCore:
Reviewed by levi
<rdar://problem/
4628409>
Safari crashes in CompositeEditCommand::removeBlockPlaceholder entering text in a web page form
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::removeBlockPlaceholder):
A script on the page shrinks the textarea down to zero rows just
before insertion. That gives the shadow div a zero height, removing
[div, 0] as a candidate for a VisiblePosition. Then
InsertTextCommand::input() tries to create a VisiblePosition from
[div, 0] and fails. A nil check is a quick fix. Another might
be to make positions where there is a caret selection candidates.
Another might be to make any [div, 0] where div is a shadow div inside
a form element a candidate.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15652
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Thu, 27 Jul 2006 18:58:16 +0000 (18:58 +0000)]
Fix by Graham Dennis, reviewed by Darin.
- fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=10094
Japanese characters improperly rendering in TOT
Test: fast/encoding/denormalised-voiced-japanese-chars.html
* platform/Font.cpp:
(WebCore::WidthIterator::advance): pass currentCharacter to normalizeVoicingMarks
(WebCore::WidthIterator::normalizeVoicingMarks): turn the currentCharacter variable
into an argument as WidthIterator::advance doesn't update m_currentCharacter while
looping
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15651
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eseidel [Thu, 27 Jul 2006 09:22:16 +0000 (09:22 +0000)]
2006-07-27 Eric Seidel <eric@eseidel.com>
Reviewed by ap.
Complex entities seem to fail on TOT
http://bugzilla.opendarwin.org/show_bug.cgi?id=6390
Use an alternative work-around to an XML Entity parsing bug.
* dom/XMLTokenizer.cpp:
(WebCore::XMLTokenizer::write):
(WebCore::hackAroundLibXMLEntityBug): added.
(WebCore::startElementNsHandler):
(WebCore::endElementNsHandler):
(WebCore::charactersHandler):
(WebCore::processingInstructionHandler):
(WebCore::cdataBlockHandler):
(WebCore::commentHandler):
(WebCore::getEntityHandler):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15648
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rwlbuis [Thu, 27 Jul 2006 07:46:00 +0000 (07:46 +0000)]
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=9938
Fix viewBox issues in Hixie's test
Do a more accurate and quicker job of parsing the viewBox
attribute. Handle properly on negative width/height and
invalid syntax in general.
* ksvg2/svg/SVGFitToViewBox.cpp:
(SVGFitToViewBox::parseViewBox):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15647
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eseidel [Thu, 27 Jul 2006 05:26:00 +0000 (05:26 +0000)]
2006-07-27 Eric Seidel <eric@eseidel.com>
Reviewed by ap.
Enables getSVGDocument() support for HTMLObjectElement and HTMLEmbedElement
This patch does not try to autogenerate anything, but enables the SVG functionality.
Also fix HTMLObjectElement vspace and hspace to be numbers instead of strings to match IE & Firefox.
* bindings/js/kjs_dom.cpp:
(KJS::toJS):
* bindings/js/kjs_html.cpp:
(KJS::JSHTMLElement::objectGetter):
(KJS::HTMLElementFunction::callAsFunction):
(KJS::JSHTMLElement::objectSetter):
* bindings/js/kjs_html.h:
(KJS::JSHTMLElement::):
* dom/Document.h:
(WebCore::Document::isSVGDocument):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::contentDocument):
(WebCore::HTMLEmbedElement::getSVGDocument):
* html/HTMLEmbedElement.h:
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::HTMLObjectElement):
(WebCore::HTMLObjectElement::getInstance):
(WebCore::HTMLObjectElement::parseMappedAttribute):
(WebCore::HTMLObjectElement::contentDocument):
(WebCore::HTMLObjectElement::rendererIsNeeded):
(WebCore::HTMLObjectElement::createRenderer):
(WebCore::HTMLObjectElement::setCode):
(WebCore::HTMLObjectElement::setArchive):
(WebCore::HTMLObjectElement::setBorder):
(WebCore::HTMLObjectElement::setCodeBase):
(WebCore::HTMLObjectElement::setCodeType):
(WebCore::HTMLObjectElement::setData):
(WebCore::HTMLObjectElement::hspace):
(WebCore::HTMLObjectElement::setHspace):
(WebCore::HTMLObjectElement::setStandby):
(WebCore::HTMLObjectElement::setType):
(WebCore::HTMLObjectElement::setUseMap):
(WebCore::HTMLObjectElement::vspace):
(WebCore::HTMLObjectElement::setVspace):
(WebCore::HTMLObjectElement::getSVGDocument):
* html/HTMLObjectElement.h:
* ksvg2/svg/SVGDocument.h:
(WebCore::SVGDocument::isSVGDocument):
* rendering/RenderWidget.h:
(WebCore::RenderWidget::frameView):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15646
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Thu, 27 Jul 2006 04:31:29 +0000 (04:31 +0000)]
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9901
XSLTProcessor cannot parse text nodes for INPUT ELEMENTS in an XSLT stylesheet
Test: fast/js/xhtml-serialize.html
* editing/markup.cpp:
(WebCore::endMarkup): If the element has child nodes, write a closing tag even if it
is not permitted in HTML, to make it valid XML.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15645
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aliceli1 [Thu, 27 Jul 2006 01:43:55 +0000 (01:43 +0000)]
Reviewed by John Sullivan (and Kevin and Timo).
landing this patch for John et al.
Fixed <rdar://problem/
4651380> REGRESSION (9A232->9A234): existing web clips don't render if you restart Dashboard
* page/FrameView.cpp:
(WebCore::FrameView::layout):
moved the call to didFirstLayout to above the check for needsLayout
because we need to call didFirstLayout for every webview, not just
ones we think need layout.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15644
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
justing [Thu, 27 Jul 2006 00:42:44 +0000 (00:42 +0000)]
LayoutTests:
Reviewed by darin
<rdar://problem/
4652788>
REGRESSION: Can't change size or style of any text in message body
* editing/style/designmode-expected.checksum: Added.
* editing/style/designmode-expected.png: Added.
* editing/style/designmode-expected.txt: Added.
* editing/style/designmode.html: Added.
WebCore:
Reviewed by darin
<rdar://problem/
4652788>
REGRESSION: Can't change size or style of any text in message body
* dom/Node.cpp:
(WebCore::Node::isContentRichlyEditable): Mimic Node::isContentEditable.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::isContentRichlyEditable): First check
the frame for editability, then userModify, like what
HTMLElement::isContentEditable() does.
* html/HTMLElement.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15643
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Wed, 26 Jul 2006 19:33:46 +0000 (19:33 +0000)]
Fix by Mitz Pettel, reviewed by ap.
- fix debug-only information() string for table cells
* rendering/RenderObject.cpp:
(WebCore::RenderObject::information):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15639
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren [Wed, 26 Jul 2006 03:04:51 +0000 (03:04 +0000)]
Reviewed by Maciej, inspired by John.
- Fixed <rdar://problem/
4651931> 1% REGRESSION on iBench HTML due to
repeated requests for non-existent favicon
An optimization to avoid serializing favicon data for missing icons had stomped an
optimization to avoid GETing a missing favicon more than once. The solution
is a happy marriage of optimizations, ensuring that we *retain* the missing
favicon's "i am missing" data without posting a notification or saving it to disk.
* Misc/WebIconDatabase.m:
(-[WebIconDatabase _setIconURL:forURL:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15636
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Wed, 26 Jul 2006 00:30:06 +0000 (00:30 +0000)]
WebCore:
Reviewed by timo and Darin.
<rdar://problem/
4618584> "Paste and Match Style" is not working in Mail (add SPI)
* WebCore.xcodeproj/project.pbxproj:
* bridge/mac/WebCoreFrameBridge.h:
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]):
Add matchStyle parameter for use by WebKit.
WebKit:
Reviewed by timo and Darin.
<rdar://problem/
4618584> "Paste and Match Style" is not working in Mail (add SPI)
* WebKit.xcodeproj/project.pbxproj:
* WebView/WebView.m:
(-[WebView replaceSelectionWithNode:]):
(-[WebView _replaceSelectionWithNode:matchStyle:]):
* WebView/WebViewPrivate.h:
(-[WebView _replaceSelectionWithNode:matchStyle::]):
New SPI that is same as replaceSelectionWithNode: with added parameter whether to match existing style.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15633
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
justing [Tue, 25 Jul 2006 23:13:20 +0000 (23:13 +0000)]
LayoutTests:
Reviewed by adele
<rdar://problem/
4649560>
REGRESSION: Can't Select All when the body is contentEditable="true"
* editing/selection/select-all-005-expected.checksum: Added.
* editing/selection/select-all-005-expected.png: Added.
* editing/selection/select-all-005-expected.txt: Added.
* editing/selection/select-all-005.html: Added.
* editing/selection/select-all-006-expected.checksum: Added.
* editing/selection/select-all-006-expected.png: Added.
* editing/selection/select-all-006-expected.txt: Added.
* editing/selection/select-all-006.html: Added.
WebCore:
Reviewed by adele
<rdar://problem/
4649560>
REGRESSION: Can't Select All when the body is contentEditable="true"
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::canonicalPosition): Allow descent from a non-editable html
element into an editable body as a convenience.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15627
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
justing [Tue, 25 Jul 2006 21:06:25 +0000 (21:06 +0000)]
Reviewed by darin
<rdar://problem/
4468458> Incoming HTML message is editable <body contenteditable="true">
* dom/Document.cpp:
(WebCore::Document::inDesignMode): Removed some spaces.
* page/Frame.cpp:
(WebCore::Frame::applyEditingStyleToElement): Just add CSS properties needed for editing.
(WebCore::Frame::removeEditingStyleFromElement): Made this a no-op, we'll remove
it eventually.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15624
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer [Tue, 25 Jul 2006 15:35:24 +0000 (15:35 +0000)]
WebCore:
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9717
Replace IDL ConvertUndefinedToTrue parameter attribute with Optional attribute
No test added because there is no change in functionality.
* bindings/js/kjs_binding.cpp: Removed valueToBooleanTreatUndefinedAsTrue() method.
* bindings/js/kjs_binding.h: Ditto.
* bindings/scripts/CodeGeneratorJS.pm: Removed support for ConvertUndefinedToTrue parameter attribute.
* dom/Element.h: Set default value to true for scrollIntoView() and scrollIntoViewIfNeeded() arguments.
* dom/Element.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
Fixed name of scrollIntoViewIfNeeded() argument to match implementation.
* page/DOMWindow.idl: Replaced ConvertUndefinedToTrue attribute with Optional attribute.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15619
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 25 Jul 2006 05:05:09 +0000 (05:05 +0000)]
JavaScriptCore:
Reviewed and tweaked a bit by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9902
jsNull and NSNull not properly converted between JS and ObjC
* bindings/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue):
Added case for converting NSNull to jsNull.
LayoutTests:
Reviewed and tweaked a bit by Darin.
- added some new tests that use "echo" including one for JavaScript null
* plugins/bindings-test-expected.txt: Added results.
* plugins/bindings-test.html: Added tests.
WebCore:
Reviewed and tweaked a bunch by Darin.
Test: plugins/bindings-test.html
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9902
jsNull and NSNull not properly converted between JS and ObjC
* bindings/objc/WebScriptObject.mm:
(+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:]):
Added case that converts jsNull to NSNull.
WebKitTools:
Reviewed and tweaked a bit by Darin.
* DumpRenderTree/ObjCPlugin.m:
(+[ObjCPlugin isSelectorExcludedFromWebScript:]): Added "echo:".
(+[ObjCPlugin webScriptNameForSelector:]): Use the name "echo" for
"echo:" so it's nice to call from JavaScript.
(-[ObjCPlugin echo:]): Just returns the same object -- can be used
to test a round trip through Objective-C types.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15618
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 25 Jul 2006 04:39:25 +0000 (04:39 +0000)]
LayoutTests:
Reviewed by Adele and Justin.
- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9630
REGRESSION: some spaces typed in <textarea> are posted as non-breaking spaces
* fast/forms/textarea-type-spaces-expected.txt: Added.
* fast/forms/textarea-type-spaces.html: Added.
- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9939
REGRESSION: Pasting text into native text area with newline at end does not preserve newline
* fast/forms/textarea-paste-newline-expected.txt: Added.
* fast/forms/textarea-paste-newline.html: Added.
- updated tests affected by above changes, results are equivalent or better
* editing/pasteboard/
4641033-expected.checksum:
* editing/pasteboard/
4641033-expected.png:
* editing/pasteboard/
4641033-expected.txt:
* editing/pasteboard/paste-table-003-expected.checksum:
* editing/pasteboard/paste-table-003-expected.png:
* editing/pasteboard/paste-table-003-expected.txt:
* editing/pasteboard/paste-text-016-expected.txt:
* editing/pasteboard/quirks-mode-br-1-expected.txt:
* editing/pasteboard/quirks-mode-br-2-expected.txt:
* fast/forms/textarea-scrolled-type-expected.checksum:
* fast/forms/textarea-scrolled-type-expected.png:
* fast/forms/textarea-scrolled-type-expected.txt:
- changed a test to be a "dump as text" test
* fast/forms/paste-into-textarea-expected.txt:
* fast/forms/paste-into-textarea.html:
* fast/forms/paste-into-textarea-expected.checksum: Removed.
* fast/forms/paste-into-textarea-expected.png: Removed.
- changed a test to be a "dump as text" test, improved test a bit and also checked in new results
* fast/forms/textarea-scrolled-endline-caret-expected.txt:
* fast/forms/textarea-scrolled-endline-caret.html:
- fixed a test that was raising an exception every time it ran
* fast/forms/attributed-strings-expected.txt:
* fast/forms/attributed-strings.html:
- corrected checksums on a bunch of tests (pngs were right, but checksums wrong, apparently)
* editing/deleting/delete-to-select-table-expected.checksum:
* editing/selection/
3690719-expected.checksum:
* editing/selection/clear-selection-expected.checksum:
* editing/undo/undo-misspellings-expected.checksum:
- added some missing pixel test results
* editing/pasteboard/nested-blocks-with-text-area-expected.checksum: Added.
* editing/pasteboard/nested-blocks-with-text-area-expected.png: Added.
* editing/pasteboard/nested-blocks-with-text-field-expected.checksum: Added.
* editing/pasteboard/nested-blocks-with-text-field-expected.png: Added.
WebCore:
Reviewed by Adele and Justin.
- fix <rdar://problem/
4613616> REGRESSION: some spaces typed in <textarea> are posted as non-breaking spaces (9630)
http://bugzilla.opendarwin.org/show_bug.cgi?id=9630
- also fixes http://bugzilla.opendarwin.org/show_bug.cgi?id=9939
REGRESSION: Pasting text into native text area with newline at end does not preserve newline
- removed some uses of DeprecatedPtrList in the markup code
Test: fast/forms/textarea-type-spaces.html
Test: fast/forms/textarea-paste-newline.html
* bindings/objc/DOMHTML.mm: (-[DOMHTMLDocument createDocumentFragmentWithText:]):
Updated call to pass a range -- in this case it is the range of the entire document,
so this will not handle the whitespace properly.
* bridge/mac/WebCoreFrameBridge.h: Added range context parameter to the
documentFragmentWithText: method, so we can handle whitespace properly.
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge nodesFromList:]): Changed from DeprecatedPtrList to Vector.
(-[WebCoreFrameBridge markupStringFromNode:nodes:]): Ditto.
(-[WebCoreFrameBridge markupStringFromRange:nodes:]): Ditto.
(-[WebCoreFrameBridge documentFragmentWithText:inContext:]): Added range context
parameter -- pass it on to createFragmentFromText.
(-[WebCoreFrameBridge documentFragmentWithNodesAsParagraphs:]): Changed from
DeprecatedPtrList to Vector.
(-[WebCoreFrameBridge replaceSelectionWithText:selectReplacement:smartReplace:]):
Pass the range of the current selection as context when creating the fragment.
* dom/Position.cpp: (WebCore::Position::inRenderedText): Replace range check with
a call to the new containsCaretOffset function -- helps make the caret work right when
it is past the end of the last line in a textarea.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Don't do anything if the
style does not call for collapsing whitespace.
(WebCore::CompositeEditCommand::rebalanceWhitespace): Call replaceWhitespaceAt
to share code, including the new logic mentioned above.
* editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply):
Use a text node instead of a break element when inserting and the style is preserveNewline.
* editing/JSEditor.cpp: (WebCore::execRemoveFormat): Pass the selection range
to createFragmentFromText.
* editing/RebalanceWhitespaceCommand.cpp: (WebCore::RebalanceWhitespaceCommand::doApply):
Assert that we're in a style that collapses whitespace. It's the caller's responsibility
not to call otherwise.
* editing/ReplaceSelectionCommand.h: Removed unused destructor, type, isSingleTextNode,
isTreeFragment, m_type, and added a context parameter to inertFragmentForTestRendering.
Also changed the constructor to take a selection rather than a pointer to the root
editable element, replaced removeEndBRIfNeeded with shouldRemoveEndBR and removed an
unused parameter from shouldMergeEnd.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplacementFragment::ReplacementFragment): Removed code to set up m_type.
Compute root editable element from passed-in selection. Used the start of the selection
as a base node for style purposes for the test rendering. Removed the special case
"single text node" alternative to createFragmentFromText in the plain text case, since
createFragmentFromText now handles that correctly.
(WebCore::ReplacementFragment::insertFragmentForTestRendering): Copy the whitespace
property from the source location when creating a temporary element for test rendering.
(WebCore::ReplacementFragment::shouldMergeEnd): Removed unneeded boolean
parameter fragmentHadInterchangeNewlineAtEnd, which is always false.
(WebCore::ReplaceSelectionCommand::doApply): Update for ReplacementFragment changes,
change code to not remove end BR when it can be re-used instead, don't call the
paragraph separator insertion when the position is at the start of a paragraph already,
removed redundant computation of identical "next" value, removed unneeded boolean
parameter to shouldMergeEnd, add case for merging when all we need to do is to delete
a newline character, removed unneeded code to set insertionPos after all code that uses
it, and use spaces instead of non-breaking spaces when doing smart paste if the
context is one where we do not collapse white space.
(WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): Renamed and changed to return
a boolean instead of doing the removal.
* editing/markup.h: Use Vector instead of DeprecatedPtrList. Change the
createFragmentFromText function to take a range for context instead of a document.
* editing/markup.cpp:
(WebCore::markup): Use Vector instead of DeprecatedPtrList.
(WebCore::createMarkup): Ditto.
(WebCore::createParagraphContentsFromString): Remove unneeded document parameter
and changed a couple places to use isEmpty instead of comparing with "".
(WebCore::createFragmentFromText): Given the new context parameter, if the context
is one that preserves newlines, then use "\n" instead of <br> elements.
(WebCore::createFragmentFromNodes): Use Vector instead of DeprecatedPtrList.
* html/HTMLElement.cpp: (WebCore::HTMLElement::setInnerText): Do not use <br>
elements if the context of this node is one where we preserve newlines.
* rendering/InlineTextBox.h:
* rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::containsCaretOffset):
Added. Implements the appropriate rule for determining if a caret position is
in this line or not. Returns true for both one line and the next in cases where
affinity must be considered to determine which line the caret is on.
* rendering/RenderText.h: Make atLineWrap no longer be a member function.
* rendering/RenderText.cpp:
(WebCore::atLineWrap): Remove special rule about preserveNewline and isLineBreak,
which will no longer apply due to the new containsCaretOffset function logic.
(WebCore::RenderText::caretRect): Use containsCaretOffset.
(WebCore::RenderText::inlineBox): Ditto.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::updateFromElement): Make a placeholder <br> element
after calling setInnerText so that the last newline in the string has the effect
we expect outside the HTML world (an additional line).
(WebCore::RenderTextControl::setSelectionRange): Set granularity of the selection
too. The layout tests caught this problem, which needs a better solution long term.
(WebCore::RenderTextControl::text): Call textContent with the parameter false
so it will not include newlines for <br> elements. Now the only <br> element
that will ever be in the shadow DOM tree is the one to prevent collapsing, and
that one should not show up in the text value.
* rendering/bidi.cpp: (WebCore::RenderBlock::findNextLineBreak): Took a rule
that specifically called out the pre whitespace mode and made it work for all
the modes that preserve newlines. This makes sure we get a last line box for
text after the last "\n" even in cases where there is no <br> afterward.
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::fixupWhitespace):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
Added assertions to make sure we don't do anything when we're not collapsing
whitespace.
* html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setDefaultValue):
Changed to use Vector instead of DeprecatedPtrList.
* editing/HTMLInterchange.cpp: Removed obsolete comment.
* loader/Cache.h: Removed a stray include.
WebKit:
Reviewed by Adele and Justin.
- update for change to require context when creating fragments from text
(needed to handle whitespace properly)
* WebView/WebHTMLView.m:
(-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:chosePlainText:]):
Added context parameter, pass through to bridge.
(-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Pass selection range as context
when calling above method.
(-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Pass drag caret as context when
calling above method.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15617
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Tue, 25 Jul 2006 03:40:28 +0000 (03:40 +0000)]
LayoutTests:
Reviewed by Justin.
- Test for <rdar://problem/
4632132> Changing style of content with mixed editability fails
* editing/style/apple-style-editable-mix-expected.checksum: Added.
* editing/style/apple-style-editable-mix-expected.png: Added.
* editing/style/apple-style-editable-mix-expected.txt: Added.
* editing/style/apple-style-editable-mix.html: Added.
WebCore:
Reviewed by Justin.
- Fix for <rdar://problem/
4632132> Changing style of content with mixed editability fails
Test: * editing/style/apple-style-editable-mix.html
* dom/Node.cpp: (WebCore::Node::isContentRichlyEditable): Doesn't need to check the editable root. It now just
checks the user modify property of its own renderer, since that is inherited.
* editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyInlineStyle): If the end position is in a table,
Adjust the end node to the last descendant of the table, so we don't skip over any runs.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15616
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Tue, 25 Jul 2006 03:37:14 +0000 (03:37 +0000)]
Reviewed by Geoff.
- fix <rdar://problem/
4609195> Help Viewer loads empty window (not getting didFailLoadingWithError: callback)
(without re-introducing http://bugzilla.opendarwin.org/show_bug.cgi?id=10062 )
* WebView/WebLoader.h:
* WebView/WebMainResourceLoader.m:
(-[WebMainResourceLoader receivedError:]): Copy in some code from the base class to do it in the proper
order, surrounding the call to [ds _receivedMainResourceError:error complete:YES].
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15615
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Tue, 25 Jul 2006 01:11:12 +0000 (01:11 +0000)]
Reviewed by Hyatt.
- implement String::createCFString
* WebCore.xcodeproj/project.pbxproj: Added StringImplMac.mm and StringMac.mm.
* bindings/objc/DOMInternal.mm: Moved NSString conversion functions out of here.
* platform/mac/StringImplMac.mm: Added. Moved NSString conversion members here
and added the CFStringRef ones.
* platform/mac/StringMac.mm: Added. Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15614
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Mon, 24 Jul 2006 23:16:15 +0000 (23:16 +0000)]
Two bug fixes.
(1) Make sure to mark positioned objects that depend on line position to
mark themselves as needing layout when their line box placeholder gets
repositioned.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::position):
(2) Improve highlighting to factor the inflation into overflow so that
invalidation and repainting will work properly.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::addHighlightOverflow):
* rendering/RootInlineBox.h:
* rendering/bidi.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15612
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca [Mon, 24 Jul 2006 22:50:32 +0000 (22:50 +0000)]
2006-07-24 Anders Carlsson <acarlsson@apple.com>
Reviewed by Tim O.
* Misc/WebIconDatabase.m:
(-[WebIconDatabase removeAllIcons]):
Make an array of the keys and iterate through it to avoid modifying the
dictionary while enumerating it.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15610
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca [Mon, 24 Jul 2006 20:55:41 +0000 (20:55 +0000)]
Add a newline
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15608
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca [Mon, 24 Jul 2006 20:48:28 +0000 (20:48 +0000)]
2006-07-24 Anders Carlsson <acarlsson@apple.com>
Reviewed by Adele.
<rdar://problem/
4641824> REGRESSION: Wikipedia widget fails to complete a search after pressing return key
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::defaultEventHandler):
Don't eat enter events for search fields that have no enclosing form; they need to be passed to AppKit so
that onsearch can be invoked.
* manual-tests/onsearch-enter.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15607
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Mon, 24 Jul 2006 19:12:56 +0000 (19:12 +0000)]
Reviewed by John and Darin.
<rdar://problem/
4634290> Cannot selectively install a custom
scroller that differs from the default Aqua frame size.
Adds two new private methods to WebFrameView that allows
an application to set a custom scroll view class. This is needed
if the application wants to install a custom scroller that is wider
than the typical scroller, because NSScrollView does the content
rect calculations in a class method (ignoring custom scrollers.)
The _setScrollViewClass method requires the class to be a subclass
of WebDynamicScrollBarView, or nil can be passed to reset to the default class.
A new scroll view of the specified class will then replace the previous
one without the need to reload content of the frame.
* WebView/WebFrameView.m:
(-[WebFrameView _customScrollViewClass]):
(-[WebFrameView _setCustomScrollViewClass:]):
* WebView/WebFrameViewPrivate.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15605
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Mon, 24 Jul 2006 17:26:52 +0000 (17:26 +0000)]
Fix by Dave MacLachlan, reviewed by Darin and Alexey.
Fix for: <http://bugzilla.opendarwin.org/show_bug.cgi?id=8425>
and <http://bugzilla.opendarwin.org/show_bug.cgi?id=6947>
Test: svg/custom/non-opaque-filters.svg
* kcanvas/device/quartz/KCanvasFilterQuartz.mm:
(WebCore::KCanvasFilterQuartz::prepareFilter):
We create an autorelease pool so we can control the deallocation of the
CIContext that we're creating. The CIContext retains the CGContext that
you pass it internally so when the CIContext is released, the
CGContext is released as well.
This is all fine and dandy unless you wrap the creation of the CIFilter
with a pair of CGBegin/EndTransparencyLayer calls which swap the context
out from underneath you. So if you start with context A,
CGBeginTransparencyLayer swaps it out and gives you B. You create a CIFilter
with it and add a reference to B. CGEndTransparencyLayer swaps out B and
gives you back A. Autorelease pool comes and cleans up the Filter, and calls
release on A, but A never got the refcount in the first place. B did. BOOM!
So we create a pool, then do a retain, then release the pool so that we
don't have to worry about the pool releasing it at a later time.
See <rdar://problem/
4647735> for reduction of CGEndTransparencyLayer case
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15603
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Mon, 24 Jul 2006 16:55:02 +0000 (16:55 +0000)]
Fix by Mitz Pettel, reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9669
Incomplete repaint when changing an inline's border
Test: fast/repaint/line-overflow.html
* rendering/RenderBlock.h:
* rendering/bidi.cpp:
(WebCore::RenderBlock::layoutInlineChildren): Added repaintTop and repaintBottom
variables to track the vertical edges of the area that changed, accounting for
lines that were deleted, inserted or moved. Removed unnecessary updating of
m_overflowHeight.
(WebCore::RenderBlock::determineStartPosition): Removed unnecessary updating of
m_overflowHeight.
(WebCore::RenderBlock::determineEndPosition):
(WebCore::RenderBlock::matchedEndLine): Added repaintTop and repaintBottom
arguments, which this method updates to account for deleted lines.
(WebCore::RenderBlock::checkLinesForOverflow): Removed outdated FIXME.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15602
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Mon, 24 Jul 2006 16:36:26 +0000 (16:36 +0000)]
Land the ChangeLogs, too.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15601
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Mon, 24 Jul 2006 16:21:36 +0000 (16:21 +0000)]
Fix by Mitz Pettel, reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10075
REGRESSION: Reversed pop-up text in visually-ordered Hebrew pages
Test: fast/forms/select-visual-hebrew.html
* css/html4.css: Set "-webkit-rtl-ordering: logical" on select elements.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15600
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Mon, 24 Jul 2006 16:03:57 +0000 (16:03 +0000)]
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10060
Improve iExploder results parsing
* Scripts/run-iexploder-tests: Fix Apach logs parsing to produce a correct results
in random mode, too.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15599
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Mon, 24 Jul 2006 15:58:48 +0000 (15:58 +0000)]
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10009
REGRESSION: Schubert-IT PDF Plug-in not working for full page (works in frames)
No test case possible.
WebCore:
* page/Frame.cpp:
(WebCore::Frame::begin): Give PDF plugins a chance to handle frame content, before ImageDocument
claims it.
WebKit:
* WebView/WebView.m:
(+[WebView _viewClass:andRepresentationClass:forMIMEType:]): If we've got a type supported by WebPDFView,
make sure to initialize the plugin database, in case a plugin wants to handle it.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15598
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Mon, 24 Jul 2006 15:44:46 +0000 (15:44 +0000)]
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10083
REGRESSION (r15584): editing/selection/select-from-textfield-outwards failing
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForCoordinates): Added back change from the fix
for bug 9312: For coordinates outside a replaced object, return the position
just before (after) the element if the coordinates are above or to the left (below
or to the right).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15597
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rwlbuis [Mon, 24 Jul 2006 13:13:42 +0000 (13:13 +0000)]
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=4258
Date().toString() only includes GMT offset, not timezone string
Use the info in tm_zone to append timezone abbreviation
to Date().toString().
* kjs/date_object.cpp:
(KJS::formatTime):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15595
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rwlbuis [Mon, 24 Jul 2006 11:45:34 +0000 (11:45 +0000)]
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=5257
setYear() does not match FireFox/IE behavior
Make sure the right values end up in tm_year.
* kjs/date_object.cpp:
(KJS::formatTime):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15594
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Mon, 24 Jul 2006 06:06:30 +0000 (06:06 +0000)]
JavaScriptCore:
Reviewed by Maciej.
Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
http://bugzilla.opendarwin.org/show_bug.cgi?id=9686
JavaScriptCore portion of the fix.
* JavaScriptCore.exp: Update symbol for change in argument type.
* kjs/debugger.cpp:
(Debugger::detach): Clear map of recent exceptions.
(Debugger::hasHandledException): Track the most recent exception
thrown by an interpreter.
(Debugger::exception): Change exception argument to a JSValue.
* kjs/debugger.h:
* kjs/nodes.cpp:
(Node::debugExceptionIfNeeded): Notify the debugger of an exception
if it hasn't seen it before.
(ThrowNode::execute): Notify the debugger that an exception is being thrown.
* kjs/nodes.h:
2006-07-23 Geoffrey Garen <ggaren@apple.com>
Patch by Eric Albert, reviewed by Darin and me.
- Fixed <rdar://problem/
4645931> JavaScriptCore stack-scanning code
crashes (Collector::markStackObjectsConservatively)
* bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an
int.
(JavaJSObject::getSlot):
(JavaJSObject::setSlot):
* kjs/collector.cpp:
(KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of
an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned,
and we want to scan the stack for pointers.
* JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the
XCode war has started up again!
WebCore:
Reviewed by maciej.
Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
http://bugzilla.opendarwin.org/show_bug.cgi?id=9686
WebCore portion of the fix.
* bridge/mac/WebCoreScriptDebugger.h:
(-[WebScriptDebugger exceptionRaised:sourceId:line::]): Add delegate method.
* bridge/mac/WebCoreScriptDebugger.mm:
(WebCoreScriptDebuggerImp::exception): Call delegate method when an exception is raised.
WebKit:
Reviewed by Maciej.
Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
http://bugzilla.opendarwin.org/show_bug.cgi?id=9686
WebKit portion of the fix.
* DefaultDelegates/WebDefaultScriptDebugDelegate.m:
(-[WebDefaultScriptDebugDelegate webView:exceptionWasRaised:sourceId:line:forWebFrame:]):
* DefaultDelegates/WebScriptDebugServer.h:
* DefaultDelegates/WebScriptDebugServer.m:
(-[WebScriptDebugServer webView:exceptionWasRaised:sourceId:line:forWebFrame:]): Notify
listeners that an exception has been raised.
* WebView/WebScriptDebugDelegate.h:
* WebView/WebScriptDebugDelegate.m:
(-[WebScriptCallFrame exceptionRaised:sourceId:line:]): Dispatch through to delegate and
WebScriptDebugServer.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15593
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aliceli1 [Mon, 24 Jul 2006 02:53:03 +0000 (02:53 +0000)]
Reviewed by Adele.
Actually Adele figured out how to fix the layout test failures. Landing this patch for her. Layout test failures exposed but not caused by r15584 (my patch earlier today).
* editing/visible_units.cpp:
(WebCore::previousLinePosition):
When setting selection endpoints, don't traverse down into nodes where editing would ignore its contents. Use the parent node instead.
(WebCore::nextLinePosition):
same as above
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15591
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aliceli1 [Mon, 24 Jul 2006 02:51:04 +0000 (02:51 +0000)]
Reviewed by Adele.
Actually Adele figured out how to fix the layout test failures. Landing this patch for her.
* editing/visible_units.cpp:
(WebCore::previousLinePosition):
When setting selection endpoints, don't traverse down into nodes where editing would ignore its contents. Use the parent node instead.
(WebCore::nextLinePosition):
same as above
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15590
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
harrison [Mon, 24 Jul 2006 00:16:37 +0000 (00:16 +0000)]
LayoutTests:
Reviewed by timo.
<rdar://problem/
4646759> Mail crash editing To Do - WebCore::InsertTextCommand::prepareForTextInsertion
* editing/deleting/delete-mixed-editable-content-001-expected.checksum: Added.
* editing/deleting/delete-mixed-editable-content-001-expected.png: Added.
* editing/deleting/delete-mixed-editable-content-001-expected.txt: Added.
* editing/deleting/delete-mixed-editable-content-001.html: Added.
WebCore:
Reviewed by timo.
<rdar://problem/
4646759> Mail crash editing To Do - WebCore::InsertTextCommand::prepareForTextInsertion
* Test: editing/deleting/delete-mixed-editable-content-001.html
* editing/visible_units.cpp:
(WebCore::startOfParagraph):
Respect editable boundary the same way endOfParagraph does.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15587
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Sun, 23 Jul 2006 23:40:19 +0000 (23:40 +0000)]
Reviewed by Darin.
- Fix for <rdar://problem/
4646276> CrashTracer: 7 crashes in Safari at com.apple.WebCore: WebCore::RenderTableSection::paint + 155
* WebView/WebHTMLView.m: (-[WebHTMLView _web_layoutIfNeededRecursive:testDirtyRect:]):
needsDisplay was returning NO even though the view has a dirty rect (see <rdar://problem/
4647062>). Since we know about
the dirty rect, we don't actually need to check needsDisplay.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15586
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bdakin [Sun, 23 Jul 2006 23:36:45 +0000 (23:36 +0000)]
Reviewed by Maciej. (Patch by me, Maciej, and Harrison.)
Fix for <rdar://problem/
4529398> WebCore crashes when pasting rich
text - WebCore::InlineBox::root()
The initial rendering crash was due to a render object having a
stale reference to an inline box that had already been deleted and
then recreated in the exact same location in memory. (Crazy, I
know.) The situation seemed pretty specific to list markers
according to Hyatt according to Maciej, so that is what I patched
specifically. Fixing this crash unearthed a separate editing crash
where we were trying to insert a block into itself. I worked on
that with Maciej and Harrison, and Harrison came up with a fix.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): This is the fix for the editing crash. If paragraphStart is an atomic
node, insert the new block into the parent instead.
* rendering/InlineBox.cpp:
(WebCore::InlineBox::isChildOfParent): This function is for
posterity. It will help keep the linebox tree in check.
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine): Added assert.
(WebCore::InlineFlowBox::deleteLine): Added assert.
* rendering/ListMarkerBox.cpp:
(WebCore::ListMarkerBox::destroy): If this has a parent, call
removeChild on this.
(WebCore::ListMarkerBox::operator delete):
* rendering/ListMarkerBox.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15585
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aliceli1 [Sun, 23 Jul 2006 23:17:38 +0000 (23:17 +0000)]
Reviewed by Darin.
fixed <rdar://problem/
4617841> REGRESSION (NativeTextField): You can move keyboard focus to a field without getting insertion point
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForCoordinates):
removed some unnecessary vertical position checks and added a fudge factor to be more forgiving for clicks near lines.
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::nodeAtPoint):
added implementation
* rendering/RenderTextControl.h:
added function protocol
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15584
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren [Sun, 23 Jul 2006 21:59:00 +0000 (21:59 +0000)]
2006-07-23 Geoffrey Garen <ggaren@apple.com>
Patch by Eric Albert, reviewed by Darin and me.
- Fixed <rdar://problem/
4645931> JavaScriptCore stack-scanning code
crashes (Collector::markStackObjectsConservatively)
* bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an
int.
(JavaJSObject::getSlot):
(JavaJSObject::setSlot):
* kjs/collector.cpp:
(KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of
an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned,
and we want to scan the stack for pointers.
* JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the
XCode war has started up again!
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15583
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Sun, 23 Jul 2006 17:28:23 +0000 (17:28 +0000)]
Reviewed by Darin.
Updating fix from last checkin.
* rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutVerticalBox):
Only tell the view about this flexbox if there isn't another flexbox already cached.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15582
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Sun, 23 Jul 2006 08:52:48 +0000 (08:52 +0000)]
LayoutTests:
Reviewed by Maciej.
Test for: <rdar://problem/
4644614> REGRESSION: Typing, pasting or dragging in new text areas causes unnecessary scrolling
* fast/forms/textarea-scrolled-type-expected.checksum: Added.
* fast/forms/textarea-scrolled-type-expected.png: Added.
* fast/forms/textarea-scrolled-type-expected.txt: Added.
* fast/forms/textarea-scrolled-type.html: Added.
WebCore:
Reviewed by Maciej.
- Fix for <rdar://problem/
4644614> REGRESSION: Typing, pasting or dragging in new text areas causes unnecessary scrolling
* rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): Don't updateScrollInfoAfterLayout if an ancestor flexible box is just on
its first layout.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock): ditto.
(WebCore::RenderFlexibleBox::layoutVerticalBox): Let the view know if this flex box is doing its first pass at layout.
* rendering/RenderView.cpp: (WebCore::RenderView::RenderView): Caches a flexible box that's doing its first layout.
* rendering/RenderView.h:
(WebCore::RenderView::setFlexBoxInFirstLayout):
(WebCore::RenderView::flexBoxInFirstLayout):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15581
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Sun, 23 Jul 2006 01:37:40 +0000 (01:37 +0000)]
Rolling out r15572.
Bug 10062: REGRESSION: dom/xhtml/level2/html/HTMLIFrameElement11.xhtml asserts/crashes
http://bugzilla.opendarwin.org/show_bug.cgi?id=10062
2006-07-21 Timothy Hatcher <timothy@apple.com>
Reviewed by Maciej.
<rdar://problem/
4609195> Help Viewer loads empty window
(not getting didFailLoadingWithError: callback)
Call super's didFailWithError before _receivedMainResourceError
because _receivedMainResourceError will cause the datasource's
frame to be set to nil before the didFailLoadingWithError delegate
callback is sent. (This order is needed now that WebDataSource does
not hold on to the WebView; it uses the WebFrame to get to the WebView.
If the WebFrame is nil we can't get to the WebView's resource load delegate.)
* WebView/WebMainResourceLoader.m:
(-[WebMainResourceLoader receivedError:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15580
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Sat, 22 Jul 2006 22:56:34 +0000 (22:56 +0000)]
Reviewed by Adele.
<rdar://problem/
4646318> REGRESSION: Ctrl-clicking on a selection containing a word doesn't display a complete contextual menu
Show the editing context menu if the WebView is editible.
The original change only checked if the DOM element was editable,
and isContentEditable returns NO if entire WebView is editable.
* DefaultDelegates/WebDefaultContextMenuDelegate.m:
(-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15578
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Sat, 22 Jul 2006 17:41:59 +0000 (17:41 +0000)]
Build fix.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15574
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Sat, 22 Jul 2006 07:39:49 +0000 (07:39 +0000)]
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10038
REGRESSION: Length of navigator.mimeTypes collection returns number of installed plugins, not number
of registered mime types
Test: fast/js/navigator-mimeTypes-length.html
* bindings/js/kjs_navigator.cpp:
(KJS::MimeTypes::getValueProperty): Return the length of the mime types vector, not the plugins one.
(KJS::MimeTypes::getOwnPropertySlot): Fixed another typo, which prevented MimeTypes::getValueProperty()
from even being called.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15573
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Sat, 22 Jul 2006 06:34:15 +0000 (06:34 +0000)]
Reviewed by Maciej.
<rdar://problem/
4609195> Help Viewer loads empty window
(not getting didFailLoadingWithError: callback)
Call super's didFailWithError before _receivedMainResourceError
because _receivedMainResourceError will cause the datasource's
frame to be set to nil before the didFailLoadingWithError delegate
callback is sent. (This order is needed now that WebDataSource does
not hold on to the WebView; it uses the WebFrame to get to the WebView.
If the WebFrame is nil we can't get to the WebView's resource load delegate.)
* WebView/WebMainResourceLoader.m:
(-[WebMainResourceLoader receivedError:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15572
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Sat, 22 Jul 2006 05:31:07 +0000 (05:31 +0000)]
Reviewed by Adele and Tim Omernick.
<rdar://problem/
4641004> 9A224: Safari crashes in WebCore::RenderMenuList::showPopup when changing a input select field to input text field
Couldn't figure out how to make layout test, here's a manual test:
* manual-tests/remove-select-onchange.html: Added.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::showPopup): Don't add the RenderPopupMenu to the render
tree so it doesn't get destroyed if we do.
The remaining changes are to let the RenderPopupMenu know its menu list w/o having
to be in the render tree:
* rendering/RenderPopupMenu.cpp:
(WebCore::RenderPopupMenu::RenderPopupMenu):
* rendering/RenderPopupMenu.h:
(WebCore::RenderPopupMenu::menuList):
* rendering/RenderPopupMenuMac.h:
* rendering/RenderPopupMenuMac.mm:
(WebCore::RenderPopupMenuMac::RenderPopupMenuMac):
* rendering/RenderPopupMenuWin.h:
(WebCore::RenderPopupMenuWin::RenderPopupMenuWin):
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::createPopupMenu):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::createPopupMenu):
* rendering/RenderThemeWin.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15571
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin [Sat, 22 Jul 2006 03:05:24 +0000 (03:05 +0000)]
Removed a stray conflict marker.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15570
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Sat, 22 Jul 2006 02:24:06 +0000 (02:24 +0000)]
LayoutTests:
Reviewed by Darin.
Test for: <rdar://problem/
4643238> REGRESSION: Can't set insertion point at the end of a line of text
* fast/forms/textarea-scrolled-endline-caret-expected.txt: Added.
* fast/forms/textarea-scrolled-endline-caret.html: Added.
WebCore:
Reviewed by Darin.
Fix for: <rdar://problem/
4643238> REGRESSION: Can't set insertion point at the end of a line of text
Test: fast/forms/textarea-scrolled-endline-caret.html
* rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionForCoordinates):
When looking for the closest line box, take the scroll offset into account.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15569
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren [Sat, 22 Jul 2006 02:17:22 +0000 (02:17 +0000)]
RS by Adele.
Test for whether focusing and/or blurring a frame before its content has loaded causes
a crash. <rdar://problem/
4632505> REGRESSION: Crash at
WebCore::Widget::getView() const + 6
* http/tests/incremental/frame-focus-before-load-expected.txt: Added.
* http/tests/incremental/frame-focus-before-load.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15568
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren [Sat, 22 Jul 2006 02:14:11 +0000 (02:14 +0000)]
minor comment fixup
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15567
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
tomernic [Sat, 22 Jul 2006 01:48:56 +0000 (01:48 +0000)]
Reviewed by Geoff & Maciej.
<rdar://problem/
4632505> REGRESSION: Crash at WebCore::Widget::getView() const + 6
Geoff is working on a layout test for this.
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::focusWindow):
(WebCore::FrameMac::unfocusWindow):
Check for a NULL view. The view can be NULL if the frame has not yet loaded any data. This fixes the crash, but the behavior is still
wrong -- we should focus the frame once it gets a view. I've filed <rdar://problem/
4645685> to track that. It's not as urgent as this
crasher.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15566
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Sat, 22 Jul 2006 00:45:37 +0000 (00:45 +0000)]
LayoutTests:
Reviewed by Darin.
<rdar://problem/
4523976> REGRESSION (NativeTextField): Crash occurs when choosing "Undo Typing" after typing and setting the value
* fast/forms/text-field-setvalue-crash-expected.txt: Added.
* fast/forms/text-field-setvalue-crash.html: Added.
WebCore:
Reviewed by Darin.
<rdar://problem/
4523976> REGRESSION (NativeTextField): Crash occurs when choosing "Undo Typing" after typing and setting the value
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::updateFromElement): Clear the undo
chain when the text control contents have been set
programmatically.
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::clearUndoRedoOperations): Before clearing undo
stack, close all open undo groups and then open an equal number,
since otherwise NSUndoManager ends up in an inconsistent state
leading to uncaught ObjC exceptions.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15565
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bdakin [Fri, 21 Jul 2006 23:47:57 +0000 (23:47 +0000)]
Reviewed by Darin.
Just moving this assertion down a couple of lines. It was hitting
every time you try to print a page because we put it too early in
the function.
* bridge/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge drawRect:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15564
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
justing [Fri, 21 Jul 2006 23:38:26 +0000 (23:38 +0000)]
LayoutTests:
Reviewed by levi
<rdar://problem/
4548238>
REGRESSION: Can't remove the first OL/UL list item in a Mail's compose window
* editing/deleting/delete-first-list-item-expected.checksum: Added.
* editing/deleting/delete-first-list-item-expected.png: Added.
* editing/deleting/delete-first-list-item-expected.txt: Added.
* editing/deleting/delete-first-list-item.html: Added.
WebCore:
Reviewed by levi
<rdar://problem/
4548238>
REGRESSION: Can't remove the first OL/UL list item in a Mail's compose window
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
Moved from InsertParagraphSeparator. Does its own typing style restoration.
* editing/CompositeEditCommand.h:
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply): Call breakOutOfEmptyListItem.
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::deleteKeyPressed): Call breakOutOfEmptyListItem if
the endingSelection is at the start of an editable region.
* editing/htmlediting.cpp:
(WebCore::embeddedSublist): Moved from InsertParagraphSeparator.
(WebCore::appendedSublist): Ditto.
(WebCore::enclosingEmptyListItem): Ditto.
* editing/htmlediting.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15563
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Fri, 21 Jul 2006 22:55:54 +0000 (22:55 +0000)]
Versioning
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15561
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
thatcher [Fri, 21 Jul 2006 21:36:39 +0000 (21:36 +0000)]
Reviewed by John.
<rdar://problem/
4607572> REGRESSION (521.10.1 - 521.13): most context menu items missing when a form field is focused (common on google.com) (9680)
Do not use _isEditable call since that only checks if the current
selection or frame is editible. We now check if the currently clicked element
is a content editible area, a textarea, an isindex or an input element that
return YES to _isTextField.
* DefaultDelegates/WebDefaultContextMenuDelegate.m:
(-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15560
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
tomernic [Fri, 21 Jul 2006 20:16:46 +0000 (20:16 +0000)]
Reviewed by Beth Dakin & John Sullivan.
<rdar://problem/
4633717> 9A218: Reproducible crash in -[NSScroller mouseDown:]
Beth is in the middle of making a layout test for this; she will land it soon.
* platform/mac/ScrollBarMac.mm:
(ScrollBar::~ScrollBar):
Call Widget::removeFromSuperview() rather than -removeFromSuperview directly on the scroll bar view.
Widget::removeFromSuperview() obeys the "mustStayInWindow" flag, which is set while tracking the mouse
in view-based widgets to prevent their destruction while the tracking is in progress.
I searched around WebCore and this is the only Widget subclass that directly removes its view rather
than using removeFromSuperview().
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15559
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Fri, 21 Jul 2006 20:01:16 +0000 (20:01 +0000)]
LayoutTests:
Reviewed by Darin.
* editing/selection/select-all-iframe-expected.txt:
* editing/selection/select-from-textfield-outwards-expected.checksum: Added.
* editing/selection/select-from-textfield-outwards-expected.png: Added.
* editing/selection/select-from-textfield-outwards-expected.txt: Added.
* editing/selection/select-from-textfield-outwards.html: Added.
* fast/events/drag-outside-window-expected.txt:
WebCore:
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9312
REGRESSION: Selection bug in new text fields when selecting past the first letter
Test: editing/selection/select-from-textfield-outwards.html
* editing/Selection.cpp:
(WebCore::Selection::adjustForEditableContent): Added code to handle the case
where the selection starts (resp. ends) in the last (resp. first) visual position
inside an editable root.
* editing/htmlediting.cpp:
(WebCore::comparePositions): Fixed the case of comparing a position inside a shadow
tree with a position in the shadow ancestor.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForCoordinates): For coordinates outside a replaced
object, return the position just before (after) the element if the coordinates are above or
to the left (below or to the right).
* rendering/RenderObject.cpp:
(WebCore::RenderObject::caretMaxOffset): Changed to return 1 for replaced objects.
* rendering/RenderText.cpp:
(WebCore::RenderText::positionForCoordinates): Changed to return the last position
in the lowest text box if the y coordinate is below all text boxes.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15558
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren [Fri, 21 Jul 2006 18:50:24 +0000 (18:50 +0000)]
JavaScriptCore:
Reviewed by Darin.
- Added support for strings that masquerade as undefined. Currently used
by WebCore to implement undetectable style.filter.
The name is a little long, but it's only used in one line of code, so I
thought clarity should win over brevity.
* JavaScriptCore.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
* kjs/object.h:
* kjs/string_object.h:
(KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined):
(KJS::StringInstanceThatMasqueradesAsUndefined::masqueradeAsUndefined):
(KJS::StringInstanceThatMasqueradesAsUndefined::toBoolean):
LayoutTests:
Test for undetectable style.filter property.
* fast/dom/undetectable-style-filter-expected.txt: Added.
* fast/dom/undetectable-style-filter.html: Added.
WebCore:
Reviewed by Darin.
- Fixed <rdar://problem/
4507265> REGRESSION: overlays don't work on
HousingMaps.com (Google Maps-based site)
- Made style.filter undetectable, like document.all.
Unfortunately, the SVG spec-makers invented a CSS attribute named 'filter',
which conflicts with IE's custom CSS attribute by the same name. Web programs
like the Google maps API test for style.filter, and assume it's the IE
style.filter if they find it, so we need to make style.filter undetectable
to avoid breaking them.
An alternative solution would be to hotwire a delorean, go back in time,
and beg the web standards makers to make standards that work on the web.
* bindings/js/kjs_css.cpp:
(KJS::DOMCSSStyleDeclaration::cssPropertyGetter):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15557
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
justing [Fri, 21 Jul 2006 18:39:55 +0000 (18:39 +0000)]
LayoutTests:
Reviewed by john
<rdar://problem/
4641033>
REGRESSION: Pasting from web pages into Mail (or Blot) often loses most of the content
* editing/pasteboard/
4641033-expected.checksum: Added.
* editing/pasteboard/
4641033-expected.png: Added.
* editing/pasteboard/
4641033-expected.txt: Added.
* editing/pasteboard/
4641033.html: Added.
WebCore:
Reviewed by john
<rdar://problem/
4641033>
REGRESSION: Pasting from web pages into Mail (or Blot) often loses most of the content
* editing/markup.cpp:
(WebCore::createMarkup): We surround the currently accumulated markup with markup
for ancestors of the startNode when the pre-order traversal leaves the trees rooted
at those ancestors. We assumed that any ancestors of the current node not in the
ancestorsToClose list were those kind of ancestors. But we don't add renderer-less
containers to the ancestorsToClose list. So, we were incorrectly surrounding the
currently accumulated markup with markup for render-less containers. Most of the
content at apple.com was being put inside an <optgroup> inside a <select> element.
Then on Paste createContextualFragment would drop it.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15556
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca [Fri, 21 Jul 2006 07:56:32 +0000 (07:56 +0000)]
2006-07-21 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
* dom/Document.h:
(WebCore::Document::):
* dom/EventTargetNode.cpp:
(WebCore::EventTargetNode::addEventListener):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollInfoAfterLayout):
Only dispatch overflowchanged events if overflowchanged event listeners have been registered on the document.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15553
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca [Fri, 21 Jul 2006 07:52:10 +0000 (07:52 +0000)]
WebCore:
2006-07-20 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
<rdar://problem/
4637807> REGRESSION: "Features & Options" page at volvocars.us fails
* xml/XSLTProcessor.cpp:
(WebCore::xsltParamArrayFromParameterMap):
Turns out parameters never worked. String parameters need to be escaped so we create a transform context,
add the parameters to it quoted and then use xsltApplyStylesheetUser which lets us pass the transform context to it.
This also works around a bug in libxslt where a hash table isn't allocated.
LayoutTests:
2006-07-20 Anders Carlsson <acarlsson@apple.com>
Reviewed by Geoff.
<rdar://problem/
4637807> REGRESSION: "Features & Options" page at volvocars.us fails
* fast/xsl/xslt-processer-expected.txt:
This passes now.
* fast/xsl/xslt-string-parameters-expected.txt: Added.
* fast/xsl/xslt-string-parameters.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15552
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aliceli1 [Fri, 21 Jul 2006 05:30:14 +0000 (05:30 +0000)]
Reviewed by Tim Omernick.
Fixed <rdar://problem/
4621649> repro crash: Upload link causes crash on pages.google.com in Frame::nodeForWidget
added manual test because there is no way to change the value of an <input type=file> via the DOM. It's not supported because it's a security risk.
* manual-tests/remove-input-file-onchange.html: Added.
* platform/mac/FileButtonMac.mm:
(-[WebFileChooserButton chooseFilename:]):
swapped the calls to changeFilename and bridgeForWidget because changeFilename will destroy the widget that is accessed in bridgeForWidget
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15551
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aliceli1 [Fri, 21 Jul 2006 05:18:42 +0000 (05:18 +0000)]
Reviewed by Adele.
Fixed <rdar://problem/
4532113> REGRESSION (NativeTextField): Crash occurs after modifying field then reloading page -[FormDelegate frameLayoutHasChanged:]
added a manual test because of the need to use AutoFill.
* dom/Node.h:
(WebCore::Node::aboutToUnload):
added virtual function prototype
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::aboutToUnload):
added implementation that sends textFieldDidEndEditing notification
* html/HTMLInputElement.h:
added virtual function prototype
* manual-tests/input-type-file-autocomplete-frame-1.html: Added.
* manual-tests/input-type-file-autocomplete-frame-2.html: Added.
* manual-tests/input-type-file-autocomplete-refresh.html: Added.
* page/Frame.cpp:
(WebCore::Frame::stopLoading):
before unloading, call aboutToUnload on the current focused node
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15550
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Fri, 21 Jul 2006 03:11:34 +0000 (03:11 +0000)]
Reviewed by Beth and John.
- fix recently broken layout tests that need updated results or test changes:
For these three, the selection ranges changed (for the better) due to my input
editing fix.
* editing/selection/
3690703-2-expected.txt:
* editing/selection/
3690703-expected.txt:
* fast/text/textIteratorNilRenderer-expected.txt:
For this one, DumpRenderTree no longer shows resize corners by default, so turned
it on via style.
* fast/css/resize-corner-tracking.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15549
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson [Fri, 21 Jul 2006 01:16:21 +0000 (01:16 +0000)]
Reviewed by Maciej
fixed <rdar://problem/
4611303> REGRESSION: repro crash in WebCore::EventTargetNode::dispatchWindowEvent at aeropostale.com
There was an attempt to deref an EventListener that got cleaned up in GC. Changing Document's EventListener list from
vanilla ptrs to refptrs to prevent GC, following EventTargetNode's proven example.
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::clear):
(WebCore::Document::handleWindowEvent):
(WebCore::Document::getHTMLWindowEventListener):
(WebCore::Document::removeHTMLWindowEventListener):
(WebCore::Document::removeWindowEventListener):
(WebCore::Document::hasWindowEventListener):
Changed all of the list iterators to work with RefPtrs instead of vanilla ptrs
* dom/Document.h:
Changed the EventListener list to be a vanilla pointer list to a refptr list
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15548
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sullivan [Fri, 21 Jul 2006 01:07:47 +0000 (01:07 +0000)]
WebCore:
Reviewed by Maciej
- WebCore part of fix for:
<rdar://problem/
4557386> REGRESSION (419.3-521.19): repro Safari world leak involving
closing tabs after clicking in a web page
* bridge/mac/WebCoreFrameBridge.h:
(-[WebCoreFrameBridge textViewWasFirstResponderAtMouseDownTime:])
renamed to be more specific (formerly wasFirstResponderAtMouseDownTime:)
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::passMouseDownEventToWidget):
updated for name change
WebKit:
Reviewed by Maciej
- WebKit part of fix for:
<rdar://problem/
4557386> REGRESSION (419.3-521.19): repro Safari world leak involving
closing tabs after clicking in a web page
* WebCoreSupport/WebFrameBridge.m:
(-[WebFrameBridge textViewWasFirstResponderAtMouseDownTime:]):
renamed to be more specific (formerly wasFirstResponderAtMouseDownTime:)
* WebView/WebHTMLViewInternal.h:
* WebView/WebHTMLView.m:
(-[WebTextCompleteController dealloc]):
updated for name change
(-[NSArray _setMouseDownEvent:]):
Now only retains the first responder if it's a textView, since that's the only case that the only client
actually cares about. This avoids a reference cycle caused by retaining self. This is the only substantive
part of the patch; all the rest is just renaming for clarity, and comments.
(-[NSArray mouseDown:]):
updated for name change
(-[WebHTMLView _textViewWasFirstResponderAtMouseDownTime:]):
renamed to be more specific (formerly _wasFirstResponderAtMouseDownTime:)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15547
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
sfalken [Thu, 20 Jul 2006 21:52:37 +0000 (21:52 +0000)]
2006-07-20 Steve Falkenburg <sfalken@apple.com>
Fix the build
* kjs/function.cpp:
(KJS::escapeStringForPrettyPrinting):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15546
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca [Thu, 20 Jul 2006 21:23:50 +0000 (21:23 +0000)]
Fix an old typo
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15545
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap [Thu, 20 Jul 2006 19:20:55 +0000 (19:20 +0000)]
Reviewed by Darin.
Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8272
Use of window.open & window.close can cause crash
* platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
* platform/mac/PlatformMouseEventMac.mm:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
The default constructor now creates a "zero" event, and a new one was added to create the "current" one.
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::handleMouseMoveEvent):
* rendering/RenderFormElement.cpp:
(WebCore::RenderFormElement::clicked):
Updated for the above changes.
* platform/gdk/MouseEventGdk.cpp:
* platform/gdk/TemporaryLinkStubs.cpp:
(PlatformMouseEvent::PlatformMouseEvent):
* platform/win/MouseEventWin.cpp:
* platform/win/TemporaryLinkStubs.cpp:
(PlatformMouseEvent::PlatformMouseEvent):
Trying not to break other platforms.
* manual-tests/invalid-mouse-event.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15544
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Thu, 20 Jul 2006 09:03:56 +0000 (09:03 +0000)]
Reviewed by Anders.
- delete line that I only commented in the last patch - meant to do this before landing
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::close):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15543
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Thu, 20 Jul 2006 08:47:52 +0000 (08:47 +0000)]
Reviewed by Geoff.
- fixed <rdar://problem/
4634484> REGRESSION: Project Change Request form should have vertical scroll bar, but doesn't
I couldn't figure out how to make an automated test case for this,
or even a manual one. It seems to be timing-related in some way.
* html/HTMLFrameElement.cpp:
(WebCore::HTMLFrameElement::close): detach the child frame from
its element, not the frame containing this element.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15542
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca [Thu, 20 Jul 2006 07:49:59 +0000 (07:49 +0000)]
2006-07-20 Anders Carlsson <acarlsson@apple.com>
Reviewed by Darin.
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::nextKeyViewInFrame):
Hold a ref to the node in case it gets destroyed by an event handler.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15541
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mjs [Thu, 20 Jul 2006 04:15:25 +0000 (04:15 +0000)]
Reviewed by Adele.
- fixed layout test results that were affected by editing input
paste patch -- new results are actually more correct, handling
text fields properly as a replaced element.
* editing/selection/
3690703-2-expected.txt:
* editing/selection/
3690703-expected.txt:
* fast/events/div-focus-expected.txt:
* fast/text/textIteratorNilRenderer-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15537
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bdakin [Thu, 20 Jul 2006 02:01:16 +0000 (02:01 +0000)]
Reviewed by Darin.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10021
Bug 10021: REGRESSION: Stack overflow due to infinite recursion in
Image::checkForSolidColor
* platform/Image.cpp:
(WebCore::Image::cacheFrame): Don't call checkForSolidColor unless
the frame was decoded successfully.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15536
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
tomernic [Thu, 20 Jul 2006 00:47:22 +0000 (00:47 +0000)]
Reviewed by Darin.
<rdar://problem/
4523432> safari crashed right after disabling "block pop up windows" (or other WebPreferences changes)
* Plugins/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView viewWillMoveToSuperview:]):
Stop the plug-in when it is removed from its superview. It is not sufficient to do this in -viewWillMoveToWindow:nil, because
the WebView might still has a hostWindow at that point, which prevents the plug-in from being destroyed.
There is no need to start the plug-in when moving into a superview. -viewDidMoveToWindow takes care of that.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15534
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ggaren [Wed, 19 Jul 2006 23:56:05 +0000 (23:56 +0000)]
Fixed by Darin & Maciej, reviewed by me.
- Fixed <rdar://problem/
4638934> Leopard 9A227: Installer crashes right
after LCA and while preparing Installation
Compile release/production with NDEBUG set, to ensure binary compatibility
between JavaScriptGlue and JavaScriptCore. In debug builds, JavaScriptCore
includes an extra debug data member in HashSet.
* JavaScriptGlue.xcodeproj/project.pbxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15533
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
adele [Wed, 19 Jul 2006 23:54:49 +0000 (23:54 +0000)]
Reviewed by Maciej.
- Fix for:
<rdar://problem/
4422657> REGRESSION: member name field or password field should have focus after loading webmail.mac.com (7405)
http://bugzilla.opendarwin.org/show_bug.cgi?id=7405
<rdar://problem/
4614181> REGRESSION: Crash in WebCore::RenderTextField::text() when quoting post at the Ars Technica forum (9707)
http://bugzilla.opendarwin.org/show_bug.cgi?id=9707
Needs an http test. (http://bugzilla.opendarwin.org/show_bug.cgi?id=10020)
These bugs were both cases where focus() was called on an element which didn't have a renderer yet because stylesheets hadn't finished loading yet.
Now, we detect this case and let setFocusNode be called. And when the stylesheet finishes loading, and the element attaches, a timer will fire,
which will cause the correct selection & scrolling behavior to occur.
This fix removes selection and scrolling behavior from the focus method. This code is now in a new method, updateFocusAppearance.
updateFocusAppearance can now be called directly from focus(), but it can also be called when a timer fires. This timer gets set
up when an element attaches, and its already been focused by the focus method. We have to use a timer, because updateFocusAppearance can cause
a layout to happen, and we don't want that to happen in the middle of attach().
* bindings/objc/DOM.mm: (-[DOMElement isFocused]): Added SPI for autofill.
* bindings/objc/DOMPrivate.h:
* dom/Element.cpp:
(WebCore::Element::Element): Initializes timer and needFocusAppearanceUpdate bool.
(WebCore::Element::attach): Checks needsFocusAppearanceUpdate, and if the node is focused, then starts the timer.
(WebCore::Element::focus): Updated to check supportsFocus before calling setFocusNode,
and only requiring the element to be focusable now before updating focus appearance.
(WebCore::Element::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
(WebCore::Element::updateFocusAppearanceTimerFired): Stops the timer, and if the element is focusable, calls updateFocusAppearance.
(WebCore::Element::stopUpdateFocusAppearanceTimer): Cancels timer, and setsNeedsFocusAppearanceUpdate(false).
(WebCore::Element::detach): Calls stopUpdateFocusAppearanceTimer.
(WebCore::Element::blur): ditto.
* dom/Element.h:
(WebCore::Element::needsFocusAppearanceUpdate): Added so the timer only fires when focus() methods have caused an element to be focused.
(WebCore::Element::setNeedsFocusAppearanceUpdate): Added so focus methods can set this flag.
* dom/Node.h: (WebCore::Node::supportsFocus): Added. Base class just calls isFocusable.
* html/HTMLAnchorElement.h: Added supportsFocus.
* html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::supportsFocus): Added. Checks for the case where stylesheets haven't loaded yet,
so we can still focus the node without a renderer, and when it gets a renderer, we'll update the focus appearance.
* html/HTMLGenericFormElement.h: (WebCore::HTMLGenericFormElement::supportsFocus): ditto.
* html/HTMLGenericFormElement.cpp: Removed include of Document.h since this is now in the header.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::focus): Updated to check supportsFocus before calling setFocusNode,
and only requiring the element to be focusable now before updating focus appearance.
(WebCore::HTMLInputElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
* html/HTMLInputElement.h:
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::focus): Updated to check supportsFocus before calling setFocusNode,
and only requiring the element to be focusable now before updating focus appearance.
(WebCore::HTMLTextAreaElement::updateFocusAppearance): Added. Separates the selection, and the scrolling from focusing the node.
* html/HTMLTextAreaElement.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15532
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
justing [Wed, 19 Jul 2006 22:55:10 +0000 (22:55 +0000)]
LayoutTests:
Reviewed by levi
<rdar://problem/
4631972>
REGRESSION: Mail crashes when pasting entire contents of http://www.apple.com/support/ into a new mail message
* editing/pasteboard/
4631972-expected.checksum: Added.
* editing/pasteboard/
4631972-expected.png: Added.
* editing/pasteboard/
4631972-expected.txt: Added.
* editing/pasteboard/
4631972.html: Added.
* editing/selection/drag-to-contenteditable-iframe-expected.txt:
* editing/selection/replaced-boundaries-3-expected.checksum:
* editing/selection/replaced-boundaries-3-expected.txt:
* editing/selection/select-box-expected.txt:
WebCore:
Reviewed by levi
<rdar://problem/
4631972>
REGRESSION: Mail crashes when pasting entire contents of http://www.apple.com/support/ into a new mail message
* dom/Position.cpp:
(WebCore::Position::upstream): Deployed isBlock and enclosingBlock.
(WebCore::Position::downstream): Ditto.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Ditto.
* editing/htmlediting.cpp:
(WebCore::canHaveChildrenForEditing): Added !iframe.
(WebCore::isBlock): Added, returns !node->renderer()->isInline()
(WebCore::enclosingBlock): Added.
* editing/htmlediting.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15531
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca [Wed, 19 Jul 2006 22:32:39 +0000 (22:32 +0000)]
WebCore:
2006-07-19 Anders Carlsson <acarlsson@apple.com>
Reviewed by Adele.
<rdar://problem/
4631272> REGRESSION: Crash tabbing out of hostname field at autorestore.apple.com
* bridge/mac/FrameMac.mm:
(WebCore::FrameMac::nextKeyViewInFrame):
Take into account that focus handlers can cause a node to be destroyed.
LayoutTests:
2006-07-19 Anders Carlsson <acarlsson@apple.com>
Reviewed by Adele.
<rdar://problem/
4631272> REGRESSION: Crash tabbing out of hostname field at autorestore.apple.com
* fast/forms/display-none-in-onchange-keyboard-expected.txt: Added.
* fast/forms/display-none-in-onchange-keyboard.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15530
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
hyatt [Wed, 19 Jul 2006 21:49:25 +0000 (21:49 +0000)]
Fix for
4638376. The 1x1 solid color image optimization was broken when
I re-architected image. This patch restores the optimization for CG. Cairo
will still need the optimization.
Reviewed by darin
WARNING: NO TEST CASES ADDED OR CHANGED (need test cases still)
* platform/Image.cpp:
(WebCore::Image::Image):
(WebCore::Image::invalidateData):
(WebCore::Image::cacheFrame):
* platform/Image.h:
(WebCore::Image::setIsPDF):
* platform/cairo/ImageCairo.cpp:
(WebCore::Image::checkForSolidColor):
* platform/mac/ImageMac.mm:
(WebCore::Image::initNativeData):
(WebCore::Image::invalidateNativeData):
(WebCore::Image::checkForSolidColor):
(WebCore::Image::draw):
(WebCore::Image::drawTiled):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15529
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
justing [Wed, 19 Jul 2006 19:01:26 +0000 (19:01 +0000)]
LayoutTests:
Reviewed by levi
<rdar://problem/
4613519>
REGRESSION: Pasting text in native text area inserts text one character before it should (9527)
* fast/forms/paste-into-textarea-expected.checksum: Added.
* fast/forms/paste-into-textarea-expected.png: Added.
* fast/forms/paste-into-textarea-expected.txt: Added.
* fast/forms/paste-into-textarea.html: Added.
WebCore:
Reviewed by levi
<rdar://problem/
4613519>
REGRESSION: Pasting text in native text area inserts text one character before it should (9527)
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply): Turn into an InsertLineBreakCommand instead of bailing
if the enclosingBlockFlowElement doesn't have a parent.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15528
268f45cc-cd09-0410-ab3c-
d52691b4dbfc