blob: d683945bbf15a7fcac1c80c8ed08d66cc4b7fe78 [file] [log] [blame]
2004-01-10 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3525468: REGRESSION (114-115): HOMEPAGE: after hitting textarea limit, backspace key is ignored
* kwq/KWQEvent.mm:
(keyIdentifierForKeyEvent): Treat 7F as 08; matches other browsers.
(QKeyEvent::QKeyEvent): Ditto.
2004-01-09 David Hyatt <hyatt@apple.com>
Fixes for 3510669 and 3515442, blank frame problems caused by WebKit's use of a separate needsLayout boolean.
Reviewed by darin
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge setNeedsLayout]):
2004-01-08 David Hyatt <hyatt@apple.com>
Fix for 3524118, floats don't repaint when moved.
Reviewed by darin
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::positionNewFloats):
2004-01-08 David Hyatt <hyatt@apple.com>
Fix for 3519003, crash in mail because <dir> and <menu> don't allow the same children as <ul> and <ol>.
Reviewed by darin
* khtml/html/dtd.cpp:
(DOM::checkChild):
2004-01-08 John Sullivan <sullivan@apple.com>
- fixed <rdar://problem/3524359>: REGRESSSION (119-120):
Double click to select text in form broken
Reviewed by Dave and Darin.
* khtml/khtmlview.cpp:
(KHTMLView::dispatchMouseEvent):
Don't blur the focused node if that's the one you clicked on.
2004-01-07 Richard Williamson <rjw@apple.com>
Fixed 3517550. Named array lookup of applet failed, i.e.:
var appletobj = document.applets['myapplet']
Reviewed by Chris.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLCollection::getNamedItems):
=== Safari-120 ===
2004-01-06 David Hyatt <hyatt@apple.com>
Possible fix for table bugs 3510005 and 3492945, repainting glitches that occurred when table cells moved.
Fix for 33522497, empty AXElements appear in AXBrowser.
Reviewed by darin
* khtml/rendering/render_table.cpp:
(RenderTableSection::layoutRows):
(RenderTableCell::setWidth):
* khtml/rendering/render_table.h:
* kwq/KWQAccObject.mm:
(-[KWQAccObject accessibilityIsIgnored]):
2004-01-06 John Sullivan <sullivan@apple.com>
- fixed <rdar://problem/3484465>: REGRESSION (118): button click does
not take focus away from <textarea>; breaks Outlook Web Access
Reviewed by Dave.
* khtml/khtmlview.cpp:
(KHTMLView::dispatchMouseEvent):
Removed nodeimpl == nil test that was preventing button/link clicks
from blurring previously-focused text field.
2004-01-06 David Hyatt <hyatt@apple.com>
Fix for 3520636, infinite loop in page breaking code when printing.
Reviewed by darin
* khtml/rendering/render_text.cpp:
(RenderText::paintObject):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge computePageRectsWithPrintWidth:printHeight:]):
2004-01-05 David Hyatt <hyatt@apple.com>
Fix for 3521466, generated image content should not try to calcWidth/height when it isn't yet rooted in
the rendering tree.
Reviewed by john
* khtml/rendering/render_image.cpp:
(RenderImage::setPixmap):
2003-12-26 Darin Adler <darin@apple.com>
- one more small step to make -[KWQPageState dealloc] safer
* kwq/KWQPageState.mm: (-[KWQPageState dealloc]): Only do the real detach() if the
document is already in the detached state; we don't want to detach prematurely.
2003-12-23 John Sullivan <sullivan@apple.com>
- fixed <rdar://problem/3451306>: address book search fails at Airborne
Express Corporate site (Apple Shipping wants to use it)
Reviewed by Darin.
* khtml/ecma/kjs_html.cpp:
commented out definition of document.all; now sites like this one that
set document.all to a value will work.
* khtml/ecma/kjs_html.lut.h: regenerated this file
2003-12-23 Darin Adler <darin@apple.com>
Reviewed by John.
- another try at fixing the -[KWQPageState dealloc] bug, even though we don't fully understand it
This change saves the renderer inside the document rather than in the KWQPageState to
try to eliminate the possibility that multiple KWQPageState objects could restore the
same renderer multiple times, resulting in multiple detaches of the same renderer.
* khtml/xml/dom_docimpl.h: Add a m_savedRenderer field.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl): Initialize m_savedRenderer to 0.
(DocumentImpl::~DocumentImpl): Added some asserts to make sure we don't get destroyed
while we are in the page cache.
(DocumentImpl::attach): Added an assert.
(DocumentImpl::setInPageCache): Save the renderer when setting the flag, and restore
the renderer when clearing it.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURLFromPageCache): Instead of doing a restoreRenderer
call, just do setInPageCache(NO), which will restore the renderer as a side effect.
* kwq/KWQPageState.h: Removed the renderer method and field.
* kwq/KWQPageState.mm:
(-[KWQPageState initWithDocument:URL:windowProperties:locationProperties:interpreterBuiltins:]):
Don't store a pointer to the renderer.
(-[KWQPageState clear]): New method, shared by invalidate and dealloc.
(-[KWQPageState invalidate]): Removed code relating to "relinquishing object ownership";
just deallocate everything here without doing a detach().
(-[KWQPageState dealloc]): Removed restoreRenderer now that setInPageCache(NO) handles that.
Added some assertions. Share code with invalidate by calling clear.
2003-12-22 John Sullivan <sullivan@apple.com>
- fixed <rdar://problem/3508798>: ACCESSIBILITY: role/description/value strings not defined
Reviewed by Darin.
* kwq/KWQAccObject.mm:
(-[KWQAccObject roleDescription]):
provide not-yet-localized strings for all the role descriptions that this class uses.
(-[KWQAccObject value]):
return nil string rather than dummy string for the cases where we don't have a value attribute.
(-[KWQAccObject accessibilityActionDescription:]):
changed comment passed to UI_STRING bogus macro so it won't have to change if/when macro
loses its bogosity
2003-12-22 John Sullivan <sullivan@apple.com>
- WebCore part of fix for <rdar://problem/3515706>:
REGRESSION (100-118): Web Kit printing does not honor Page Setup scale factor
Reviewed by Darin.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge computePageRectsWithPrintWidth:printHeight:]):
renamed method for clarity; now iterates over pages horizontally as well
as vertically; assume x starts at 0 as we were already assuming that y
starts at 0; now returns autoreleased result
2003-12-22 Darin Adler <darin@apple.com>
Reviewed by John.
- follow-on to my fix for 3467919: handle collapsed spaces at the starts of runs too, not just at the
end, and make sure that a space inherits style from the run it was collapsed from rather than always
from the run it precedes
* khtml/khtml_part.cpp: (KHTMLPart::text): Add code to deal with collapsed spaces at the start of runs.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Change code to keep the style of a space that
was collapsed at the end of the run, and use that styled space if necessary. Also add the code to deal
with collapsed spaces at the start of runs. Also remove comment that refers to long-since-deleted code.
2003-12-21 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3467919: REGRESSION (91-92): space missing when copying text with link at start or end of line
* khtml/khtml_part.cpp: (KHTMLPart::text):
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString):
Changed both "turn HTML into text" code paths to generate spaces in a different way.
First, corrected the logic so it notices spaces left out at the end of a RenderText object.
Second, don't emit the space until we are emitting more text, to prevent emitting trailing
spaces. To get this completely right for the attributed string case, I had to add code to
adjust the offset used to mark links.
2003-12-21 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3477453: nowrap in a fixed-width TD is ignored on screen but not when printed (Williams-Sonoma)
* khtml/rendering/render_table.cpp: (RenderTableCell::setStyle):
Compute the proper whitespace mode before calling the base class setStyle,
since the base class setStyle may create styles that inherit from our style,
and we want them to inherit the computed whitespace mode.
* WebCore.pbproj/project.pbxproj: Let Xcode be 1.1, as it was meant to be.
2003-12-21 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed a storage leak
* khtml/rendering/render_style.h: Added a destructor and a private unimplemented assignment
operator to StyleCSS3InheritedData, since the textShadow field that needs to be allocated
and deallocated and the default destructor and assignment operator don't do that.
* khtml/rendering/render_style.cpp: (StyleCSS3InheritedData::~StyleCSS3InheritedData):
Added destructor that deletes the textShadow object.
- fixed locking for JavaScript debugging tools in Caches window
* kwq/WebCoreJavaScript.mm:
(+[WebCoreJavaScript rootObjectClasses]): Lock and unlock around call to JavaScriptCore.
(+[WebCoreJavaScript garbageCollect]): Ditto.
2003-12-19 David Hyatt <hyatt@apple.com>
Fix for 3483130, repaint doesn't occur when font is decreased dynamically when at the bottom of
amazon.com.
Reviewed by john
* khtml/khtml_part.cpp:
(KHTMLPart::setZoomFactor):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge setTextSizeMultiplier:]):
2003-12-19 Richard Williamson <rjw@apple.com>
Fixed 3515590. Return Undefined to JS for applet if
Java is disabled.
Reviewed by Chris.
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::getAppletInstance):
2003-12-19 Maciej Stachowiak <mjs@apple.com>
Reviewed by Chris.
<rdar://problem/3512545>: reproducible assertion failure in KWQKHTMLPart::addData scrolling to anchor while page loads
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::scrollToAnchor): Don't pretend we finished loading,
because we don't actually make anchor scrolling stop the current
page load.
=== Safari-119 ===
2003-12-18 Richard Williamson <rjw@apple.com>
Fixed 3511415. We have to un-visually order visually ordered text
before passing to ATSU.
Reviewed by John.
* khtml/rendering/font.cpp:
(Font::drawHighlightForText):
(Font::drawText):
* khtml/rendering/font.h:
* khtml/rendering/render_text.cpp:
(InlineTextBox::paintSelection):
(RenderText::paintObject):
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::drawText):
(QPainter::drawHighlightForText):
* kwq/WebCoreTextRenderer.h:
* kwq/WebCoreTextRendererFactory.m:
(WebCoreInitializeEmptyTextStyle):
2003-12-17 Richard Williamson <rjw@apple.com>
Reviewed by NOBODY (OOPS!).
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::getAppletInstance):
* khtml/html/html_objectimpl.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::getAppletInstanceForView):
(KWQKHTMLPart::addPluginRootObject):
(KWQKHTMLPart::cleanupPluginRootObjects):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge init]):
2003-12-17 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3469085: can't tab to all links on aintitcool.com
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::isFocusable): Re-implemented this to check width and height of
all continuations, not just the main render object. Also, check the absoluteRects after
checking all the render objects to catch things like floats.
(HTMLAnchorElementImpl::isMouseFocusable): Clean up the code here a bit.
* khtml/rendering/render_inline.h:
* khtml/rendering/render_inline.cpp: (RenderInline::absoluteRects):
* khtml/rendering/render_object.h:
* khtml/rendering/render_object.cpp: (RenderObject::absoluteRects):
* khtml/rendering/render_text.h:
* khtml/rendering/render_text.cpp: (RenderText::absoluteRects):
* kwq/KWQAccObject.mm: (boundingBoxRect):
Use QValueList instead of QPtrList for clarity and to fix storage leaks.
=== Safari-118 ===
2003-12-16 David Hyatt <hyatt@apple.com>
Fix for 3510956, crash on mezzoblue.com. Relax the float-list searching code that runs when
a float is removed.
Reviewed by darin
* khtml/rendering/render_object.cpp:
(checkFloats):
(RenderObject::removeFromObjectLists):
2003-12-16 John Sullivan <sullivan@apple.com>
fixed <rdar://problem/3482852>: oft-seen, non-repro, nil-deref in
HTMLTokenizer::notifyFinished (snapfish.com, etc.)
At least one of the dupes of this bug is a separate (still reproducible) issue;
I'll clone it back to life and test the others.
Reviewed by Darin.
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::notifyFinished):
Move check of cachedScript.isEmpty() until after scriptExecution()
call, because cachedScript.isEmpty() value can be changed by that call.
2003-12-15 David Hyatt <hyatt@apple.com>
Fix for 3508807, positions/sizes wrong for text elts and multi-line elts for accessibility.
Reviewed by john
* khtml/rendering/render_inline.cpp:
(RenderInline::absoluteRects):
* khtml/rendering/render_inline.h:
* khtml/rendering/render_object.cpp:
(RenderObject::absoluteRects):
* khtml/rendering/render_object.h:
* khtml/rendering/render_text.cpp:
(RenderText::absoluteRects):
* khtml/rendering/render_text.h:
* kwq/KWQAccObject.mm:
(boundingBoxRect):
(-[KWQAccObject position]):
(-[KWQAccObject size]):
2003-12-15 Richard Williamson <rjw@apple.com>
Return 0 if the view doesn't have a bridge.
Reviewed by John.
* kwq/WebCoreBridge.mm:
(rootForView):
2003-12-15 David Hyatt <hyatt@apple.com>
Fix for 3508792. Remove tables and cells as AxObjects.
Reviewed by john
* kwq/KWQAccObject.mm:
(-[KWQAccObject role]):
(-[KWQAccObject accessibilityIsIgnored]):
2003-12-15 John Sullivan <sullivan@apple.com>
- fixed <rdar://problem/3510459>: REGRESSION (100-113): Pressing button at google.com
removes focus from text field
Reviewed by Dave.
* khtml/khtmlview.cpp:
(KHTMLView::dispatchMouseEvent):
Don't clear the focused widget when a mousedown occurs on a widget that is focusable
in the abstract sense but is not mouse focusable or currently keyboard focusable. This
matches the behavior of older Safaris (clicking in background or page text will make the
webview itself be first responder, but clicking on a button won't).
2003-12-14 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3458937: nil-deref in timed layout
* khtml/khtmlview.cpp: (KHTMLView::layout): Add a nil check for m_part.
2003-12-14 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3311205: click() on a file input type form element does not work bring up the file chooser as it does in IE
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::click): Add a case for FILE that calls RenderFileButton's click() function.
Get rid of the default case and list more cases explicitly.
(HTMLInputElementImpl::accessKeyAction): Change FILE from just focus to focus/click.
* khtml/rendering/render_form.h: Added a click() function to RenderFileButton.
* khtml/rendering/render_form.cpp:
(RenderFileButton::slotTextChanged): Added call to onChange on the element to match text input
fields; helpful for the test case Adobe supplied.
(RenderFileButton::click): Added. Calls click() on KWQFileButton.
* kwq/KWQFileButton.h: Added a click function.
* kwq/KWQFileButton.mm: (KWQFileButton::click): Added. Calls performClick on the file button.
* kwq/WebCoreBridge.h: Add a performClick method to WebCoreFileButton.
2003-12-13 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
<rdar://problem/3269212>: FILEMAKER: can't use Option objects created in a different window
* khtml/ecma/kjs_binding.cpp:
(ScriptInterpreter::updateDOMObjectDocument): Update per-document
caching for the DOM object - let it be protected by both the old
and the new document.
* khtml/ecma/kjs_binding.h: Prototype new method.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::setDocument): New method to change a node's document pointer.
(NodeImpl::checkAddChild): If the new child node is owned by the
wrong document but not actually in it, change its document (using
the two aforementioned methods) instead of throwing an exception.
* khtml/xml/dom_nodeimpl.h: Prototype new method.
2003-12-14 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3332280: REGRESSION (74-85): setting src of iframe results in two GETs
* khtml/html/html_baseimpl.h: Added openURL virtual function.
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::updateForNewURL): Call openURL to do the meat of the work,
since it's different for frames and iframes.
(HTMLFrameElementImpl::openURL): Move the part that's different for frames in here.
(HTMLFrameElementImpl::parseAttribute): Call setLocation to share code.
(HTMLFrameElementImpl::setLocation): Do nothing if the location is not changing.
Not needed to fix this bug, but could eliminate other cases of extra GETs.
(HTMLIFrameElementImpl::parseAttribute): Remove special handling of SRC, because now
we will end up calling openURL, which will do the right thing for iframes.
(HTMLIFrameElementImpl::openURL): Instead of doing the change to the frame directly,
use updateWidget, since that's what we do for other changes to iframes. To trigger a
call to updateWidget(), set needWidgetUpdate and mark the node changed.
2003-12-13 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
<rdar://problem/3507885>: REGRESSION (100-116): frames missing due to cross-domain check (derstandard.at)
* khtml/ecma/kjs_window.cpp:
(Window::isSafeScript): Loosen the frame access rules a bit. We already allowed access to
a document loaded as empty from the parent or opener. Now also allow access from any document
in the same domain as the parent or opener, so that, for instance, a sibling frame can access it
so long as it is in the same domain as the parent.
2003-12-13 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3506204: homepage.mac slide show window is wrong size on 2nd monitor
* kwq/KWQApplication.mm: (QDesktopWidget::screenGeometry): Add code to flip the Y coordinate.
This has no effect on the main screen, but a big effect on others. I used the same code to
flip Y screen coordinates that is used KWQWindowWidget.mm and KWQKHTMLPartBrowserExtension.mm.
* kwq/KWQKWinModule.mm: (KWinModule::workArea): Replaced the incorrect code to flip the Y
coordinate here with correct code. The code flipped based on the frame of the main screen,
but it needs to flip based on the frame of screen 0.
2003-12-12 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3505208>: keys added to keychain from KEYGEN need better UI names
Reviewed by rjw.
* khtml/html/html_formimpl.cpp:
(HTMLKeygenElementImpl::encoding): pass the page URL to signedPublicKeyAndChallengeString
* kwq/KWQKSSLKeyGen.h:
* kwq/KWQKSSLKeyGen.mm:
(KSSLKeyGen::signedPublicKeyAndChallengeString): take a URL
* kwq/WebCoreKeyGenerator.h:
* kwq/WebCoreKeyGenerator.m:
(-[WebCoreKeyGenerator signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:pageURL:]): take a URL
2003-12-12 David Hyatt <hyatt@apple.com>
Fix for 3254534, CSS background-image style should be loaded lazily only when used.
Reviewed by rjw
* ChangeLog:
* khtml/css/css_valueimpl.cpp:
(CSSImageValueImpl::CSSImageValueImpl):
(CSSImageValueImpl::~CSSImageValueImpl):
(CSSImageValueImpl::image):
* khtml/css/css_valueimpl.h:
2003-12-11 David Hyatt <hyatt@apple.com>
WebCore part of 3453214. This ensures that all outline styles except for auto (which has a CG bug) will
be displayed properly during the PaintActionOutline phase.
Reviewed by john and darin
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::paint):
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::RenderCanvas):
* khtml/rendering/render_canvas.h:
(khtml::RenderCanvas::setMaximalOutlineSize):
(khtml::RenderCanvas::maximalOutlineSize):
* khtml/rendering/render_object.cpp:
(RenderObject::maximalOutlineSize):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::paint):
* khtml/rendering/render_table.cpp:
(RenderTable::paint):
(RenderTableSection::paint):
(RenderTableCell::paint):
2003-12-12 John Sullivan <sullivan@apple.com>
- fixed <rdar://problem/3508825>: REGRESSION (100-116): crash in
HTMLGenericFormElementImpl::attach at sonyericsson.com
Reviewed by Maciej.
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::attach):
Move a few lines inside an existing nil check to prevent nil dereference.
2003-12-12 John Sullivan <sullivan@apple.com>
- fixed <rdar://problem/3508760>: tabbing to out-of-sight link behaves
differently than tabbing to out-of-sight form control
Reviewed by Dave.
* kwq/KWQScrollView.h:
* kwq/KWQScrollView.mm:
(QScrollView::ensureVisible):
added comments and changed parameter names to reveal differences between
what we've implemented and what QScrollView was intended to do.
(QScrollView::ensureRectVisibleCentered):
New method that calls _KWQ_scrollRectToVisible, which is the method
we use when scrolling to reveal form controls.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::nextKeyViewInFrame):
call ensureRectVisibleCentered so tabbing to a link will use the
same scroll-to-reveal code as tabbing to a form control
2003-12-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
<rdar://problem/3507856>: XMLHttpRequest xhtml test displays but doesn't load
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequestProtoFunc::tryCall): complete the URL using the document,
not the htmlDocument.
2003-12-12 Richard Williamson <rjw@apple.com>
Replace call to global functions with static member functions.
Reviewed by Ken.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::cleanupPluginRootObjects):
* kwq/WebCoreBridge.mm:
(rootForView):
(-[WebCoreBridge init]):
2003-12-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
<rdar://problem/3464315>: createDocument creates document with initial child element, unlike other browsers
* khtml/xml/dom_docimpl.cpp:
(DOMImplementationImpl::createDocument): Don;t add initial element.
2003-12-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
<rdar://problem/3507863>: XMLHttpRequest should not parse response if HTML
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::getValueProperty):
2003-12-11 Richard Williamson <rjw@apple.com>
Cleaned up and verified reference counting scheme, and
dereferencing of vended JavaScript objects when applet is
destroyed (actually when part is destroyed).
Reviewed by Ken.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::~KWQKHTMLPart):
(KWQKHTMLPart::getAppletInstanceForView):
(KWQKHTMLPart::addPluginRootObject):
(KWQKHTMLPart::cleanupPluginRootObjects):
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(rootForView):
(-[WebCoreBridge init]):
2003-12-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
<rdar://problem/3507862>: XMLHttpRequest documents that reference external resources (e.g. stylesheets) cause crash
* khtml/html/html_headimpl.cpp:
(HTMLLinkElementImpl::process):
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::scriptHandler):
* khtml/xml/dom_xmlimpl.cpp:
(ProcessingInstructionImpl::checkStyleSheet):
* khtml/xml/xml_tokenizer.cpp:
(XMLHandler::processingInstruction):
(XMLTokenizer::executeScripts):
2003-12-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by Chris.
<rdar://problem/3507859>: Status text should only include "OK", not full "HTTP/1.0 200 OK" status line
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::getStatusText): Include only the status
text, not the full status line.
=== Safari-117 ===
2003-12-11 David Hyatt <hyatt@apple.com>
Fix for 3507164, scrolling really slow on hixie's web forms spec page. Hixie has 12 little transparent layers
at various points on this page, and beginning/ending transparency on only those 12 layers as you scroll
is enough to kill scrolling performance.
This patch works around the issue by lazily beginning transparency layers only when we determine that
we're actually painting a descendant layer of a transparent ancestor or a transparent layer.
Also fixing QColor's comparison operator. It was broken and not comparing the "valid" bit, so invalid and
valid colors were being assumed to be the same.
Also fixed the render dumper to not dump transparent and invalid background colors and fixed it do dump the
alpha for colors with an alpha < 0xFF.
Reviewed by mjs (opacity changes), darin (color changes) and john (render tree dumper changes)
* ChangeLog:
* khtml/rendering/render_layer.cpp:
(RenderLayer::RenderLayer):
(RenderLayer::beginTransparencyLayers):
(RenderLayer::paint):
(RenderLayer::paintLayer):
* khtml/rendering/render_layer.h:
* kwq/KWQColor.h:
(operator==):
(operator!=):
* kwq/KWQColor.mm:
(QColor::name):
* kwq/KWQRenderTreeDebug.cpp:
(operator<<):
2003-12-11 Ken Kocienda <kocienda@apple.com>
* kwq/KWQLoader.mm:
(KWQCacheObjectExpiresTime): Fixed deployment build bustage.
2003-12-09 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
<rdar://problem/3505444>: WebCore cache does not use expiration dates on cache items
* khtml/misc/loader.cpp:
(Loader::slotFinished): Don't reset expiration date. We set this once in
slotReceivedResponse.
(Loader::slotReceivedResponse): Call new KWQ function to get a cache object's
expiration date using its NSURLResponse data.
(Cache::requestImage): Don't reset expiration date. We set this once in
slotReceivedResponse, and we do not want the value from the DocLoader
anyway.
(Cache::requestStyleSheet): Ditto.
(Cache::requestScript): Ditto.
* kwq/KWQLoader.h:
* kwq/KWQLoader.mm:
(KWQCacheObjectExpiresTime): New function. Call over bridge to get access
to SPI in NSURLResponse to calculate expiration time.
* kwq/WebCoreBridge.h: Declare bridge method.
2003-12-10 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
<rdar://problem/3504156>: XMLHttpRequest reuse test fails
<rdar://problem/3505158>: XMLHttpRequest "abort with open" test fails
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::open):
(KJS::XMLHttpRequest::abort):
(KJS::XMLHttpRequestProtoFunc::tryCall):
2003-12-10 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
<rdar://problem/3507175>: Setting timeout function can allocate JS objects without lock
* khtml/ecma/kjs_window.cpp:
(ScheduledAction::execute): Lock interpreter around code that
might allocate JS objects.
2003-12-10 David Hyatt <hyatt@apple.com>
Fix for 3507097, overflow:auto should include the height of the horizontal scrollbar when the height
of the block is auto.
Reviewed by darin
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::layoutInlineChildren):
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::layoutBlock):
(khtml::RenderBlock::layoutBlockChildren):
2003-12-10 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3506739: nil-deref in DocumentImpl::setSelection triple clicking (generated content)
* khtml/khtml_part.cpp: (KHTMLPart::khtmlMousePressEvent): Check for the case where
m_selectionEnd is 0. This doesn't fix the behavior completely, but it does prevent a crash.
2003-12-10 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
<rdar://problem/3487160>: Implement synchronous loading for XMLHttpRequest
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::XMLHttpRequest):
(KJS::XMLHttpRequest::send):
(KJS::XMLHttpRequest::abort):
(KJS::XMLHttpRequest::processSyncLoadResults):
(KJS::XMLHttpRequest::slotRedirection):
(KJS::XMLHttpRequest::slotData):
* khtml/ecma/xmlhttprequest.h:
* kwq/KWQLoader.h:
* kwq/KWQLoader.mm:
(KWQHeaderStringFromDictionary):
(KWQServeSynchronousRequest):
(KWQResponseHeaderString):
* kwq/WebCoreBridge.h:
2003-12-10 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3506706: REGRESSION (100-115): onkeyup handlers called twice for active input fields
* kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyUp:]): Don't call super because we
don't want to pass the event down the responder chain.
* kwq/KWQTextField.mm: (-[KWQTextField textView:shouldHandleEvent:]): Return NO for
key up events because we don't want to pass the event down the responder chain.
2003-12-10 Richard Williamson <rjw@apple.com>
Added method to get to the bridge from a view. This is
used to ultimately get the part and KJS::Window for a
particular applet.
Reviewed by Hyatt.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(rootForView):
(-[WebCoreBridge init]):
* kwq/WebCoreViewFactory.h:
* kwq/WebCoreViewFactory.m:
2003-12-10 John Sullivan <sullivan@apple.com>
- WebCore part of fix for:
<rdar://problem/3505231>: REGRESSION (100-114): Some sites autoscroll to bottom of page when loading
Reviewed by Darin.
* kwq/KWQNSViewExtras.h:
* kwq/KWQNSViewExtras.m:
(-[NSView _KWQ_scrollPointRecursive:]):
(-[NSView _KWQ_scrollPointRecursive:inView:]):
new methods, similar to existing scrollRect methods
except that the preferred position for the point is
the top-left corner rather than centered in the visible area
* kwq/KWQScrollView.h:
* kwq/KWQScrollView.mm:
(QScrollView::setContentsPosRecursive):
new method, calls _KWQ_scrollPointRecursive:
* khtml/khtml_part.cpp:
(KHTMLPart::gotoAnchor):
call setContentsPosRecursive instead of setContentsPos; also remove
the 50 pixel offset that upset Hyatt so.
2003-12-10 Chris Blumenberg <cblu@apple.com>
* kwq/KWQKSSLKeyGen.mm:
(KSSLKeyGen::signedPublicKeyAndChallengeString): removed unnecessary includes
2003-12-10 David Hyatt <hyatt@apple.com>
Fix for 3505846, overflow:auto region doesn't update when scrolled. The child layers inside an overflow:auto
block were not updating their positions.
Reviewed by john
* khtml/khtmlview.cpp:
(KHTMLView::layout):
* khtml/rendering/render_layer.cpp:
(RenderLayer::updateLayerPositions):
(RenderLayer::scrollToOffset):
* khtml/rendering/render_layer.h:
2003-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
<rdar://problem/3505795>: loading invalid XML document crashes trying to create h1 element
<rdar://problem/3504158>: XMLHttpRequest xhtml test totally fails
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::isValidName): include "0123456789" instead of
"0-9", it's not a regexp it's just a list of characters.
2003-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
<rdar://problem/3504155>: Safari fails XMLHttpRequest abort test
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequestProtoFunc::tryCall): Avoid throwing an
exception after send().
2003-12-09 David Hyatt <hyatt@apple.com>
Rename -apple-aqua to auto for outline styles.
Reviewed by darin
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/css/html4.css:
* khtml/rendering/render_inline.cpp:
(RenderInline::paintObject):
* khtml/rendering/render_object.cpp:
(RenderObject::drawBorder):
(RenderObject::paintOutline):
* khtml/rendering/render_style.h:
(khtml::):
(khtml::OutlineValue::OutlineValue):
(khtml::RenderStyle::outlineStyleIsAuto):
(khtml::RenderStyle::outlineOffset):
(khtml::RenderStyle::setOutlineStyle):
(khtml::RenderStyle::setOutlineOffset):
* kwq/KWQRenderTreeDebug.cpp:
(printBorderStyle):
2003-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
<rdar://problem/3487195>: Implement responseXML property for XMLHttpRequest
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::getValueProperty): Implemented responseXML by parsing the
document and returning it.
(KJS::XMLHttpRequest::XMLHttpRequest): Initialize new field
* khtml/ecma/xmlhttprequest.h:
* khtml/ecma/kjs_window.cpp:
(Windw::get): Forgot this in last commit; add XMLSerializer
constructor.
* khtml/ecma/kjs_window.lut.h:
* khtml/ecma/Makefile.am: Forgot to include this in the last commit.
2003-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
<rdar://problem/3504049>: XMLSerializer object and serializeToString method needed for XMLHttpRequest testing
Also fixed some lasst-minute mistakes in the DOM serialization
code that was already there.
* WebCore.pbproj/project.pbxproj:
* khtml/dom/dom_doc.h:
* khtml/ecma/Makefile.am:
* khtml/ecma/kjs_window.cpp:
(Window::get):
* khtml/ecma/kjs_window.h:
(KJS::Window::):
* khtml/ecma/kjs_window.lut.h:
(KJS::):
* khtml/ecma/xmlserializer.cpp: Added.
(KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
(KJS::XMLSerializerConstructorImp::implementsConstruct):
(KJS::XMLSerializerConstructorImp::construct):
(KJS::):
(KJS::XMLSerializer::XMLSerializer):
(KJS::XMLSerializerProtoFunc::tryCall):
* khtml/ecma/xmlserializer.h: Added.
(KJS::XMLSerializer::toBoolean):
(KJS::XMLSerializer::classInfo):
(KJS::XMLSerializer::):
* khtml/ecma/xmlserializer.lut.h: Added.
(KJS::):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::toString):
(DocumentFragmentImpl::toString):
* khtml/xml/dom_elementimpl.cpp:
(AttrImpl::toString):
(ElementImpl::toString):
2003-12-09 David Hyatt <hyatt@apple.com>
Implement start() and stop() for marquees.
Reviewed by darin
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::classInfo):
(KJS::HTMLElementFunction::tryCall):
* khtml/ecma/kjs_html.h:
(KJS::HTMLElement::):
* khtml/ecma/kjs_html.lut.h:
(KJS::):
2003-12-09 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3505277: nil-deref in ownerElement after choosing item from menu at projectnissan.com
* khtml/xml/dom_nodeimpl.cpp: (NodeImpl::dispatchWindowEvent): Add check for nil.
2003-12-09 Darin Adler <darin@apple.com>
Reviewed by Maciej.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::saveLocationProperties): Add locking around the call to get the location
since it can allocate.
(KWQKHTMLPart::restoreLocationProperties): Ditto.
2003-12-09 David Hyatt <hyatt@apple.com>
Fix for mojibake bg painting problem on bofa.com. The bug # is 3487144. Transparent colors were not
being handled properly when specified on the body.
Reviewed by darin
* khtml/rendering/render_box.cpp:
(RenderBox::paintRootBoxDecorations):
(RenderBox::paintBackgroundExtended):
2003-12-09 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3505391: REGRESSION (100-116): pages that move cells around don't repaint correctly
* khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): Added code
similar to the code in RenderBlock::layoutBlock, but for table cells.
2003-12-09 Darin Adler <darin@apple.com>
Reviewed by Maciej.
* khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): Add locking around the call to
push event handler scope. Without this, we hit the "allocated without locking" assertion.
2003-12-09 David Hyatt <hyatt@apple.com>
Fix the dirty rect checks on various render_objects to be more accurate so that page-break properties don't
have mojibake when printing.
Reviewed by john
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::paint):
* khtml/rendering/render_flow.cpp:
(RenderFlow::paintLineBoxBackgroundBorder):
(RenderFlow::paintLineBoxDecorations):
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::paint):
* khtml/rendering/render_table.cpp:
(RenderTable::paint):
2003-12-09 Darin Adler <darin@apple.com>
Reviewed by Richard.
- fixed 3500408: Web Kit should pass the MAYSCRIPT attribute from the APPLET tag to the Java plug-in
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::parseAttribute): Allow the "mayscript" attribute.
(HTMLAppletElementImpl::createRenderer): Pass the value of the "mayscript" attribute
as an argument named "mayScript".
* khtml/misc/htmlattrs.in: Added "mayscript".
* khtml/misc/htmlattrs.c: Regenerated.
* khtml/misc/htmlattrs.h: Regenerated.
2003-12-09 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
<rdar://problem/3501030>: JavaScript sites crash when a PAC file is in place (WebCore,Safari 1.2)
* khtml/ecma/kjs_events.cpp:
(JSEventListener::handleEvent): Lock interpreter when needed.
(JSLazyEventListener::parseCode): Likewise.
(KJS::getDOMEvent): Likewise.
* khtml/ecma/kjs_proxy.cpp:
(KJSProxyImpl::evaluate): Likewise.
(KJSProxyImpl::initScript): Likewise.
2003-12-09 David Hyatt <hyatt@apple.com>
Fix for 3491235, really make <script src="..."/> work in HTML. My original attempt to fix this only made
the tag flat, but did not ensure that the script got processed.
Reviewed by john
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::parseTag):
2003-12-08 David Hyatt <hyatt@apple.com>
Fix for 3503652, news.com misrenders badly (footer is out of position). My fix to 3495748 caused this
regression. I made the tag priority of <nobr> too high. It needed to be the same as <div>, and I
accidentally made it higher. I intended for it to be the same as <div>.
I also had to make a fix (now that <nobr> has a higher priority) to ensure <nobr> can't be nested inside
other <nobr>.
Both fixes were required to make news.com render correctly again.
Reviewed by darin
* khtml/html/dtd.cpp:
* khtml/html/htmlparser.cpp:
(KHTMLParser::getElement):
2003-12-08 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3234676>: Support for KEYGEN tag (ie 509 email certificates from www.thawte.com)
Reviewed by mjs.
* WebCore-combined.exp:
* WebCore.exp:
* WebCore.pbproj/project.pbxproj:
* khtml/html/html_formimpl.cpp:
(HTMLKeygenElementImpl::parseAttribute): store the KEYTYPE attribute
(HTMLKeygenElementImpl::encoding): call KSSLKeyGen::signedPublicKeyAndChallengeString
* khtml/html/html_formimpl.h: remove 2 declared but unimplemented methods
* khtml/misc/htmlattrs.c: generated changes
(hash_attr):
(findAttr):
* khtml/misc/htmlattrs.h: generated change
* khtml/misc/htmlattrs.in: added KEYTYPE
* kwq/KWQKSSLKeyGen.h:
* kwq/KWQKSSLKeyGen.mm:
(KSSLKeyGen::supportedKeySizes): call renamed strengthMenuItemTitles
(KSSLKeyGen::signedPublicKeyAndChallengeString): new, calls [WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]
* kwq/WebCoreKeyGenerationFactory.h: Added.
* kwq/WebCoreKeyGenerationFactory.m: Added.
(+[WebCoreKeyGenerationFactory sharedFactory]):
(-[WebCoreKeyGenerationFactory init]):
(-[WebCoreKeyGenerationFactory strengthMenuItemTitles]):
(-[WebCoreKeyGenerationFactory signedPublicKeyAndChallengeStringWithStrengthIndex:challenge:]):
* kwq/WebCoreLocalizedStringFactory.h: Removed.
* kwq/WebCoreLocalizedStringFactory.m: Removed.
2003-12-08 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
<rdar://problem/3504047>: XMLHttpRequest object needs onload event
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::getValueProperty): Implemented onload property.
(KJS::XMLHttpRequest::putValue): Ditto.
(KJS::XMLHttpRequest::XMLHttpRequest): Ditto.
(KJS::XMLHttpRequest::changeState): Ditto.
* khtml/ecma/xmlhttprequest.h:
* khtml/ecma/xmlhttprequest.lut.h: Regenerated.
2003-12-08 David Hyatt <hyatt@apple.com>
Fix for 3503022, asahi.com is too wide. Bugs in line breaking of breakable Japanese characters caused
the breaks to be ignored.
Reviewed by john
* khtml/rendering/render_text.cpp:
(RenderText::calcMinMaxWidth):
2003-12-05 David Hyatt <hyatt@apple.com>
Fix the position method to return screen coords like it should and to use the lower left corner instead of
the upper left.
Reviewed by john
* kwq/KWQAccObject.h:
* kwq/KWQAccObject.mm:
(-[KWQAccObject position]):
(-[KWQAccObject size]):
2003-12-07 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3502347: REGRESSION (100-116): bottom of login window sometimes missing (TR background image)
* khtml/rendering/render_object.h: Added setPixmap.
* khtml/rendering/render_object.cpp: (RenderObject::setPixmap): Moved this
function here from RenderBox. This code is needed for the table row class and
similar classes that supply a background image that is drawn by the table cell,
and those are not RenderBox subclasses.
* khtml/rendering/render_box.cpp: Removed setPixmap.
* khtml/rendering/render_box.h: Removed setPixmap.
2003-12-06 John Sullivan <sullivan@apple.com>
- fixed <rdar://problem/3502655>: REGRESSION: Repro crash at espn.com
Reviewed by Darin.
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::getAppletInstance):
Check for nil RenderApplet before dereferencing rather than after.
2003-12-05 David Hyatt <hyatt@apple.com>
Add support for link clicking as an accessibility action.
Reviewed by john
* kwq/KWQAccObject.mm:
(-[KWQAccObject anchorElement]):
(-[KWQAccObject role]):
(-[KWQAccObject accessibilityAttributeNames]):
(-[KWQAccObject accessibilityActionNames]):
(-[KWQAccObject accessibilityActionDescription:]):
(-[KWQAccObject accessibilityPerformAction:]):
2003-12-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
<rdar://problem/3487222>: Add ability to create working fully standalone document object
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::CSSStyleSelector):
(khtml::CSSStyleSelector::addSheet):
(khtml::CSSStyleSelector::initForStyleResolve):
(khtml::CSSStyleSelector::applyRule):
* khtml/dom/dom_doc.cpp:
(DOM::Document::part):
* khtml/dom/dom_doc.h:
* khtml/ecma/kjs_dom.cpp:
(DOMDocument::getValueProperty):
(KJS::checkNodeSecurity):
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocFunction::tryCall):
(KJS::HTMLDocument::tryGet):
(KJS::HTMLDocument::putValue):
(KJS::HTMLElement::tryGet):
(Image::notifyFinished):
* khtml/ecma/kjs_traversal.cpp:
(JSNodeFilter::acceptNode):
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::changeState):
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::insertedIntoDocument):
(HTMLFrameElementImpl::isURLAllowed):
(HTMLFrameElementImpl::attach):
(HTMLFrameElementImpl::detach):
(HTMLFrameElementImpl::contentDocument):
(HTMLIFrameElementImpl::attach):
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::referrer):
(HTMLDocumentImpl::lastModified):
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::formData):
(HTMLFormElementImpl::prepareSubmit):
(HTMLFormElementImpl::submit):
(HTMLFormElementImpl::reset):
(HTMLGenericFormElementImpl::isKeyboardFocusable):
(HTMLGenericFormElementImpl::defaultEventHandler):
* khtml/html/html_headimpl.cpp:
(HTMLBaseElementImpl::process):
(HTMLLinkElementImpl::process):
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::isKeyboardFocusable):
(HTMLAnchorElementImpl::defaultEventHandler):
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::createRenderer):
(HTMLAppletElementImpl::getAppletInstance):
(HTMLEmbedElementImpl::rendererIsNeeded):
(HTMLObjectElementImpl::rendererIsNeeded):
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::scriptExecution):
(HTMLTokenizer::parseTag):
* khtml/rendering/render_applet.cpp:
(RenderApplet::RenderApplet):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::setTitle):
(DocumentImpl::part):
(DocumentImpl::close):
(DocumentImpl::processHttpEquiv):
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::dispatchEvent):
* kwq/KWQAccObject.mm:
(-[KWQAccObject textUnderElement]):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::partForNode):
(KWQKHTMLPart::attributedString):
2003-12-05 Richard Williamson <rjw@apple.com>
Fixed 3501885. Added null test to returned node from collection.
Reviewed by John.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLCollection::tryGet):
2003-12-04 Richard Williamson <rjw@apple.com>
Added support for named applet access from document node.
Factored creation of KJS::Values from RuntimeObjectImps.
Reviewed by Chris.
* khtml/ecma/kjs_dom.cpp:
(KJS::getDOMNamedNodeMap):
(KJS::getRuntimeObject):
* khtml/ecma/kjs_dom.h:
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::tryGet):
(KJS::HTMLElement::tryGet):
(KJS::HTMLCollection::tryGet):
2003-12-04 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3498712: REGRESSION (100-115): Safari aborts at http://www11.dht.dk/~blangstrup_org/
This was an uncaught exception thrown by DocumentImpl. But the design of KHTML DOM is that
"impl" classes return exception codes; they don't throw exceptions.
* khtml/dom/dom_doc.cpp:
(DOM::Document::createElement): Throw exception if necessary. The impl function now returns
an exception code.
(DOM::Document::createElementNS): Ditto.
* khtml/html/html_documentimpl.h: Add exception code parameter to createElement.
* khtml/html/html_documentimpl.cpp: (HTMLDocumentImpl::createElement): Pass along the
exception code from the lower level.
* khtml/xml/dom_docimpl.h: Add exception code parameters to createElement, createElementNS,
and createHTMLElement.
* khtml/xml/dom_docimpl.cpp:
(DOMImplementationImpl::createDocument): Handle exception code from createElementNS.
(DocumentImpl::createElement): Add exception code parameter, not set since there is
no exception.
(DocumentImpl::importNode): Handle exception code from createElementNS.
(DocumentImpl::createElementNS): Add exception code parameter. Propagate the exception
codes that we get from createHTMLElement and setPrefix.
(DocumentImpl::createHTMLElement): Add exception code parameter. Use an exception code
rather than a C++ exception for INVALID_CHARACTER_ERR.
* khtml/xml/dom_elementimpl.cpp: (ElementImpl::cloneNode): Pass exception code parameter to
createElement.
* khtml/xml/xml_tokenizer.cpp:
(XMLHandler::startElement): Pass exception code parameter to createElementNS, and return false
if it is not zero. This is where the bug happened. Before we would get an exception from
createElementNS, but "impl" functions are not supposed to throw in KHTML's DOM.
(XMLTokenizer::finish): Add various exception code parameters to compile, but we know we won't
get any exceptions.
* kwq/WebCoreDOMDocument.mm:
(-[WebCoreDOMDocument createElement:]): Pass an (ignored) exception code parameter.
(-[WebCoreDOMDocument createElementNS::]): Pass an (ignored) exception code parameter.
=== Safari-116 ===
2003-12-03 Richard Williamson <rjw@apple.com>
LiveConnect: Removed some debugging.
Reviewed by Chris.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLCollection::tryGet):
2003-12-03 David Hyatt <hyatt@apple.com>
Fix for 3475761, list bullets mislayout after text zooming.
Reviewed by kocienda
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::setStyle):
2003-12-03 David Hyatt <hyatt@apple.com>
Fix for 3493356, table cells didn't repaint properly.
Reviewed by kocienda
* khtml/rendering/render_object.cpp:
(RenderObject::repaintObjectsBeforeLayout):
* khtml/rendering/render_table.cpp:
(RenderTableCell::getAbsoluteRepaintRect):
* khtml/rendering/render_table.h:
2003-12-03 David Hyatt <hyatt@apple.com>
Fix for 3495748, hang in parser at ocelot.ca. <nobr> needs to have very high priority (equal to the
priority of blocks like h1-6, p, and div), so that unclosed <nobr>s will close divs and ps.
Reviewed by gramps
* khtml/html/dtd.cpp:
2003-12-03 David Hyatt <hyatt@apple.com>
Fix for 3475767, hang at saabnet.com. Fix h1-h6 to be more tolerant regarding allowed child elements, to avoid
deeply nested pages.
Reviewed by darin
* khtml/html/dtd.cpp:
(DOM::checkChild):
2003-12-03 John Sullivan <sullivan@apple.com>
- fixed these two design issues after Dave and I talked to HI:
<rdar://problem/3497072>: There shouldn't be a focus ring around clicked regions
<rdar://problem/3499315>: Focus ring should use aqua color always
Reviewed by Dave.
* khtml/css/html4.css:
2003-12-03 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
<rdar://problem/3395759>: results of parent.document.getElementsByTagName can't be added to string
* khtml/ecma/kjs_dom.cpp:
(DOMNodeList::toPrimitive): Always convert to string instead of trying to convert
to number and failing, as is done for DOMNode.
* khtml/ecma/kjs_dom.h: Prototype new method.
2003-12-02 Richard Williamson <rjw@apple.com>
Return a value that is backed by RuntimeObjectImpl, instead
of a DOM object for applet[0]. This is better than having
the DOM object redirect to the RuntimeObjectImpl.
Reviewed by Chris.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLCollection::tryGet):
2003-12-02 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
<rdar://problem/3488220>: namespaces test from David Faure causes Safari to crash in DOM::DocumentImpl::createElementNS
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::createElementNS): Check if new element is NULL
before messing with it, to avoid a crash.
2003-12-02 David Hyatt <hyatt@apple.com>
Fix for 3497999, null check the text() of RenderTexts to avoid a crash in current().
Reviewed by kocienda
* khtml/rendering/bidi.cpp:
(khtml::BidiIterator::current):
2003-12-02 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
Implemented a simple form of document serialization, enough to take care of:
<rdar://problem/3487190>: implement send of DOMDocument for XMLHttpRequest
* khtml/dom/dom_doc.cpp:
(DOM::Document::toString):
* khtml/dom/dom_doc.h:
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::urlMatchesDocumentDomain):
(KJS::XMLHttpRequestProtoFunc::tryCall):
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::toString):
* khtml/html/html_elementimpl.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::toString):
(DocumentFragmentImpl::toString):
(DocumentTypeImpl::copyFrom):
(DocumentTypeImpl::toString):
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_elementimpl.cpp:
(AttrImpl::toString):
(ElementImpl::openTagStartToString):
(ElementImpl::toString):
* khtml/xml/dom_elementimpl.h:
* khtml/xml/dom_nodeimpl.h:
* khtml/xml/dom_textimpl.cpp:
(CommentImpl::toString):
(TextImpl::toString):
(CDATASectionImpl::toString):
* khtml/xml/dom_textimpl.h:
* khtml/xml/dom_xmlimpl.cpp:
(EntityImpl::toString):
(EntityReferenceImpl::toString):
(ProcessingInstructionImpl::setStyleSheet):
(ProcessingInstructionImpl::toString):
* khtml/xml/dom_xmlimpl.h:
2003-12-02 David Hyatt <hyatt@apple.com>
Fix for 3493677, containingBlock() null because we tried to support position:relative on table rows. Fix
is to disallow this.
Reviewed by kocienda
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::adjustRenderStyle):
2003-12-02 David Hyatt <hyatt@apple.com>
Fix for 3493697, nil-deref in bidi code. Need to null-check strings with no length.
Reviewed by john
* khtml/rendering/bidi.cpp:
(khtml::addRun):
2003-12-02 David Hyatt <hyatt@apple.com>
Fix for 3495746, nil deref of containing block (frame inside frameset).
Reviewed by kocienda
* khtml/rendering/render_box.cpp:
(RenderBox::containingBlockWidth):
2003-12-02 Ken Kocienda <kocienda@apple.com>
Reviewed by John
* kwq/KWQRect.h:
* kwq/KWQRect.mm:
(QRect::bottomRight): Added helper.
2003-12-02 Maciej Stachowiak <mjs@apple.com>
Merged the following patch from David Faure to fix:
<rdar://problem/3497663>: Can't look up frames by number using windw[i] notation
2003-11-25 David Faure <faure@kde.org>
* ecma/kjs_window.cpp: Implement hasProperty and get for frames by number in Window,
to fix window[0] and parent[1] etc. (#56983)
2003-11-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Richard.
<rdar://problem/3487185>: implement security checks for XMLHttpRequest
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::open): Refuse to start if the URL is not one
this document is allowed to access.
(KJS::XMLHttpRequest::slotRedirection): Stop the job if we redirect
to a URL the home document is not allowed to access.
* kwq/KWQResourceLoader.mm:
(-[KWQResourceLoader redirectedToURL:]): emit the right signal
* kwq/WebCoreResourceLoader.h: Prototype new method
2003-12-01 Richard Williamson <rjw@apple.com>
Fixed parameter passing to applet. Child elements are NOT valid in setStyle(). So we now either create the widget before needed with createWidgetIfNecessary. This either happens when doing the first layout, or when JavaScript first references the applet element.
Fixed early delete of the the main applet instance. When the JS collector cleaned up the last JS object referring to the applet instance we were deleting the java instance. This caused the applet instance cached on the applet element to be invalid. The applet instance is the only Java object not to be cleaned up by the JS collector.
Added support for getting at Java object fields.
Reviewed by Chris.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::tryGet):
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::createRenderer):
(HTMLAppletElementImpl::getAppletInstance):
* khtml/html/html_objectimpl.h:
* khtml/rendering/render_applet.cpp:
(RenderApplet::createWidgetIfNecessary):
(RenderApplet::layout):
* khtml/rendering/render_applet.h:
(khtml::RenderApplet::renderName):
2003-12-01 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3496960: nil-deref in idFromNode inside elementDoesAutoComplete:
* kwq/WebCoreBridge.mm:
(inputElementFromDOMElement): Added nil check.
(formElementFromDOMElement): Added nil check.
2003-12-01 David Hyatt <hyatt@apple.com>
Fix for 3490959, collapsed border tables don't paint backgrounds.
Reviewed by darin
* khtml/rendering/render_table.cpp:
(RenderTable::setStyle):
(RenderTable::paint):
(RenderTable::paintBoxDecorations):
* khtml/rendering/render_table.h:
2003-12-01 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3493939: ordered lists with type="A" roll over to A' after X rather than after Z
* khtml/rendering/render_list.cpp: (toLetter): Change 24 to 26.
=== Safari-115 ===
2003-11-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
WebCore part of fix for:
<rdar://problem/3487134>: Implement http request/response status and headers for XMLHttpRequest
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::getValueProperty): Call appropriate methods for
status and statusText.
(KJS::XMLHttpRequest::send): Set request headers as "customHeaders"
metadata property.
(KJS::XMLHttpRequest::setRequestHeader): Simply append to header
string.
(KJS::XMLHttpRequest::getAllResponseHeaders): Return the header string
except for the first line.
(KJS::XMLHttpRequest::getResponseHeader): Scan the response header
string for the header field. Not sure if it's worth being more
efficient.
(KJS::XMLHttpRequest::getStatus): Try to pull a code out
of the status line.
(KJS::XMLHttpRequest::getStatusText): Pull the first line
off the headers (if any), otherwise return undefined.
(KJS::XMLHttpRequest::slotData): The first time through, save
the response headers, retrieved from "HTTP-Headers" metadata
property.
(KJS::XMLHttpRequestProtoFunc::tryCall): Make setRequestHeader,
getResponseHeader, getAllResponseHeaders call the right thing.
* khtml/ecma/xmlhttprequest.h:
* kwq/KWQKJobClasses.h:
* kwq/KWQKJobClasses.mm:
(KIO::TransferJobPrivate::TransferJobPrivate): Added header
support.
(KIO::TransferJobPrivate::~TransferJobPrivate):
(KIO::TransferJob::assembleResponseHeaders): Get a header string
out of the response if needed.
(KIO::TransferJob::queryMetaData): Special-case "HTTP-Headers".
(KIO::TransferJob::emitReceivedResponse): Save response.
* kwq/KWQLoader.h:
* kwq/KWQLoader.mm:
(-[NSDictionary _webcore_initWithHeaderString:]): Helper method to
turn a string of header fields into a dictionary.
(KWQServeRequest): Pass custom headers through.
(KWQResponseMIMEType): Admit it's an NSURLResponse *.
(KWQResponseHeaderString): Assembled status code and response
header fields into response header. Cheat a little on the status
line.
* kwq/KWQResourceLoader.mm:
(-[KWQResourceLoader receivedResponse:]): Admit it's an
NSURLResponse *.
* kwq/WebCoreResourceLoader.h: Ditto.
* kwq/WebCoreBridge.h: Add customHeader: arguments.
2003-11-21 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3491907>: When viewing applet, view hierarchy was an empty KWQView
Reviewed by rjw.
* WebCore.pbproj/project.pbxproj:
* khtml/html/html_objectimpl.cpp: removed setupApplet because that work is done when the applet widget is created
(HTMLAppletElementImpl::createRenderer): pass the PARAM args to the render object
(HTMLAppletElementImpl::getAppletInstance): don't call setupApplet
* khtml/rendering/render_applet.cpp:
(RenderApplet::RenderApplet): store args and context, don't call setQWidget here
(RenderApplet::setStyle): call setQWidget here
(RenderApplet::layout): don't parse args here, that is done in HTMLAppletElementImpl::createRenderer
* khtml/rendering/render_applet.h:
* kwq/KWQKJavaAppletWidget.h:
(KJavaApplet::KJavaApplet): turned into a stub, this work is no longer needed
(KJavaApplet::setAppletClass): ditto
(KJavaApplet::setAppletName): ditto
(KJavaApplet::setArchives): ditto
(KJavaApplet::setBaseURL): ditto
(KJavaApplet::setCodeBase): ditto
(KJavaApplet::setParameter): ditto
(KJavaAppletWidget::~KJavaAppletWidget): ditto
(KJavaAppletWidget::applet): ditto
(KJavaAppletWidget::setBaseURL): ditto
(KJavaAppletWidget::setParameter): ditto
(KJavaAppletWidget::showApplet): ditto
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::KJavaAppletWidget): create the java here instead of doing it later
2003-11-21 John Sullivan <sullivan@apple.com>
- WebCore part of fix for <rdar://problem/3333744>: Safari prints page with
very, very long line very, very small
Reviewed by Ken.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::forceLayoutWithPageWidthRange):
Changed method name from forceLayoutForPageWidth; now takes min and max
page width values. Use max page width value to limit how wide page will
get when there's a very long line.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
changed pageWidth parameter into min and max parameters; pass them along to KWQKHTMLPart.
2003-11-21 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3490260: allow &sup1 to be misspelled &supl (lowercase l instead of numeral 1) because WinIE does
* khtml/html/kentities.gperf: Added supl to the list. Maps to U+00B9, just as sup1 does.
* khtml/html/kentities.c: Regenerated.
2003-11-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3487201 - Implement abort for XMLHttpRequest async loads
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::abort): Kill and clear job.
(KJS::XMLHttpRequest::slotData): Avoid moving to state 3 on early abort.
(KJS::XMLHttpRequestProtoFunc::tryCall): Call abort when appropriate.
* khtml/ecma/xmlhttprequest.h:
2003-11-20 John Sullivan <sullivan@apple.com>
- WebCore part of <rdar://problem/3183124>: Support page-break-before/after with a value of "always"
Dave wrote this part and we reviewed it together.
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::paintObject):
if printing, check for CSS page break locations
(khtml::RenderBlock::inRootBlockContext):
new method, used to check whether we're in a context for which
CSS page breaks are legal.
* khtml/rendering/render_block.h:
prototype for inRootBlockContext; this might be useful for
other code later.
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::setBestTruncatedAt):
now takes a forcedBreak parameter which overrides others.
* khtml/rendering/render_canvas.h:
(khtml::RenderCanvas::setTruncatedAt):
set default value for m_forcedPageBreak
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge computePageRects:withPageHeight:]):
do the real work of pagination here
2003-11-20 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3491225>: Need UI and localized strings for <KEYGEN> support
Reviewed by john.
* WebCore-combined.exp:
* WebCore.exp:
* WebCore.pbproj/project.pbxproj:
* kwq/KWQKSSLKeyGen.h:
* kwq/KWQKSSLKeyGen.mm: Added.
(KSSLKeyGen::supportedKeySizes): implemented, calls [WebCoreLocalizedStringFactory keyGenerationMenuItemTitles]
* kwq/WebCoreLocalizedStringFactory.h: Added.
* kwq/WebCoreLocalizedStringFactory.m: Added.
(+[WebCoreLocalizedStringFactory sharedFactory]): new
(-[WebCoreLocalizedStringFactory init]): new
(-[WebCoreLocalizedStringFactory keyGenerationMenuItemTitles]): new
2003-11-19 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3490086 - support http post for XMLHttpRequest
* kwq/KWQKJobClasses.h:
* kwq/KWQKJobClasses.mm:
(KIO::TransferJobPrivate::TransferJobPrivate):
(KIO::TransferJob::TransferJob):
2003-11-20 Richard Williamson <rjw@apple.com>
Cleaned up synchronous applet lookup and initialization.
We need to further cleanup applet instantiation. It doesn't
need to be lazy with my modified Java Plugin.
Reviewed by Chris.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::tryGet):
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::setupApplet):
(HTMLAppletElementImpl::getAppletInstance):
* khtml/html/html_objectimpl.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::getAppletInstanceForView):
* kwq/KWQKJavaAppletWidget.h:
* kwq/KWQKJavaAppletWidget.mm:
(KJavaAppletWidget::showApplet):
2003-11-20 Ken Kocienda <kocienda@apple.com>
Reviewed by David
Fix for this bug:
<rdar://problem/3487421>: crash/exception when tabbing to a link without text
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::isFocusable): A link is also not focusable
if it has zero width or height, if it has no children, or if it is
is not a continuation.
* kwq/KWQPainter.mm:
(QPainter::drawFocusRing): Put in a guard against trying to draw a focus
ring with no control points. Log this as an error.
2003-11-19 David Hyatt <hyatt@apple.com>
Fix for 3486963, crash because generated content was referencing a deleted object. Fix is to update the
variable to a sane value after deleting old generated content.
Reviewed by darin
* khtml/rendering/render_container.cpp:
(RenderContainer::updatePseudoChild):
2003-11-19 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3486998 - Implement asynchronous http loading for XMLHttpRequest
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequestQObject::XMLHttpRequestQObject): New QObject to use to
connect to signals.
(KJS::XMLHttpRequestQObject::slotData): Call XMLHttpRequest.
(KJS::XMLHttpRequestQObject::slotFinished): Ditto.
(KJS::XMLHttpRequestQObject::slotRedirection): Ditto.
(KJS::XMLHttpRequest::getValueProperty): Implemented, onrequeststatechange,
readyState and responseText.
(KJS::XMLHttpRequest::putValue): Implemented onrequeststatechange.
(KJS::XMLHttpRequest::XMLHttpRequest): Initialize new fields.
(KJS::XMLHttpRequest::~XMLHttpRequest): Delete decoder.
(KJS::XMLHttpRequest::changeState): Update state, and send event if needed.
(KJS::XMLHttpRequest::open): Save the parameters.
(KJS::XMLHttpRequest::send): Fire up a post or get job.
(KJS::XMLHttpRequest::slotFinished): go to final state.
(KJS::XMLHttpRequest::slotRedirection): Just stub for now.
(KJS::XMLHttpRequest::slotData): Update state; decode & save data.
(KJS::XMLHttpRequestProtoFunc::tryCall): Implemented open and send.
* khtml/ecma/xmlhttprequest.h: Prototyped new stuff.
* khtml/xml/dom2_eventsimpl.cpp:
(EventImpl::typeToId): Added "readystatechange" event.
(EventImpl::idToType): Ditto.
* khtml/xml/dom2_eventsimpl.h: Ditto.
* kwq/KWQLoader.h:
* kwq/KWQLoader.mm:
(KWQServeRequest): New variant that doesn't need a Request.
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot): Handle XMLHttpRequestQObject's slots.
(KWQSlot::call): Ditto.
2003-11-19 Richard Williamson <rjw@apple.com>
More LiveConnect stuff. With that patch we make the applet
visible to JavaScript in an Bindings::Instance. Next step
it to flush out implementation of RuntimeObjectImp and
RuntimeFunctionImp.
Reviewed by Ken.
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::HTMLAppletElementImpl):
(HTMLAppletElementImpl::~HTMLAppletElementImpl):
(HTMLAppletElementImpl::getAppletInstance):
* khtml/html/html_objectimpl.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::getAppletInstanceForView):
* kwq/WebCoreBridge.h:
2003-11-19 David Hyatt <hyatt@apple.com>
Fix for 3488888, about:blank in iframes doesn't repaint properly. Fix for 3485478, refreshing a remote
page often causes a white flash. Fix for 3488827, XML/XHTML documents don't fire load events on bodies/framesets.
Reviewed by darin
* khtml/html/html_documentimpl.cpp:
(HTMLDocumentImpl::HTMLDocumentImpl):
* khtml/html/html_documentimpl.h:
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::RenderCanvas):
(RenderCanvas::layout):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
(DocumentImpl::body):
(DocumentImpl::close):
* khtml/xml/dom_docimpl.h:
2003-11-18 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3488883 - KIO::TransferJob needs to really use signals instead of calling loader directly
* khtml/khtml_part.cpp:
(KHTMLPart::openURL):
* khtml/misc/loader.cpp:
(Loader::servePendingRequests):
(Loader::slotReceivedResponse):
* khtml/misc/loader.h:
* kwq/KWQKJobClasses.h:
* kwq/KWQKJobClasses.mm:
(KIO::TransferJob::TransferJob):
(KIO::TransferJob::url):
(KIO::TransferJob::emitData):
(KIO::TransferJob::emitRedirection):
(KIO::TransferJob::emitResult):
(KIO::TransferJob::emitReceivedResponse):
* kwq/KWQLoader.mm:
(KWQServeRequest):
* kwq/KWQObject.mm:
(QObject::connect):
* kwq/KWQResourceLoader.h:
* kwq/KWQResourceLoader.mm:
(-[KWQResourceLoader receivedResponse:]):
(-[KWQResourceLoader addData:]):
(-[KWQResourceLoader finishJobAndHandle]):
* kwq/KWQSignal.h:
* kwq/KWQSignal.mm:
(KWQSignal::call):
* kwq/KWQSlot.h:
* kwq/KWQSlot.mm:
(KWQSlot::KWQSlot):
(KWQSlot::call):
2003-11-18 David Hyatt <hyatt@apple.com>
Fix for 3488244, marquee-increments with percentage values not handled correctly. Also added a tweak to ensure
that 1% of a small value ends up being at least an increment of 1. Also added an optimization to not even
bother kicking off the marquee timer if the increment's initial value is 0 (matches WinIE).
* khtml/rendering/render_layer.cpp:
(Marquee::start):
(Marquee::timerEvent):
2003-11-18 Richard Williamson <rjw@apple.com>
More live connect stuff. We're getting close.
Reviewed by Chris.
* WebCore.pbproj/project.pbxproj:
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::tryGet):
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::parseAttribute):
(HTMLAppletElementImpl::getAppletInstance):
* khtml/html/html_objectimpl.h:
2003-11-18 David Hyatt <hyatt@apple.com>
Fix for 3478122, crash using first-letter and zooming, and also the fix for 3478078, generated content
does not get removed properly on w3c site. The root cause of these two bugs was the same, namely my
change to meld the concept of generated anonymous content and anonymous blocks created by the layout
engine together. RenderBlock's setStyle method was incorrectly updating before/after/first-letter content
and wiping out its style in random (and bad) ways.
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::setStyle):
2003-11-18 David Hyatt <hyatt@apple.com>
Fix for 3487424, images not painting because of dropped layouts. When replaced elements dirtied
themselves during line layout, they only needed to do a local dirty and not walk up the parent chain.
Reviewed by mjs
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::layoutInlineChildren):
2003-11-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3486991 - Add XMLHttpRequest object and stub methods
* khtml/ecma/kjs_window.cpp:
(Window::get): Handle XMLHttpRequest constructor like Option and Image.
* khtml/ecma/kjs_window.h: Ditto.
* khtml/ecma/kjs_window.lut.h: Regenerated.
* khtml/ecma/xmlhttprequest.cpp: Added. Stub implementations of everything.
(KJS::XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp):
(KJS::XMLHttpRequestConstructorImp::implementsConstruct):
(KJS::XMLHttpRequestConstructorImp::construct):
(KJS::XMLHttpRequest::tryGet):
(KJS::XMLHttpRequest::getValueProperty):
(KJS::XMLHttpRequest::tryPut):
(KJS::XMLHttpRequest::putValue):
(KJS::XMLHttpRequest::notifyFinished):
(KJS::XMLHttpRequest::XMLHttpRequest):
(KJS::XMLHttpRequest::~XMLHttpRequest):
(KJS::XMLHttpRequestProtoFunc::tryCall):
* khtml/ecma/xmlhttprequest.h: Added. Stub implementations of everything.
(KJS::XMLHttpRequest::toBoolean):
(KJS::XMLHttpRequest::classInfo):
* khtml/ecma/xmlhttprequest.lut.h: Added.
* khtml/ecma/Makefile.am: Add new .lut.h file.
* WebCore.pbproj/project.pbxproj: Add new files.
2003-11-17 David Hyatt <hyatt@apple.com>
Fix for 3487136, marquees reset when you return to a page in the b/f cache. This patch makes
marquees suspend and resume properly, so they pick up animating where they left off.
Reviewed by mjs
* khtml/rendering/render_layer.cpp:
(RenderLayer::suspendMarquees):
(m_direction):
(Marquee::start):
(Marquee::suspend):
* khtml/rendering/render_layer.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::clearTimers):
2003-11-17 Maciej Stachowiak <mjs@apple.com>
Merged from khtml:
- fixed 3487324 - CSS url values should be wrapped in "url()" for cssText purposes
2003-11-07 Dirk Mueller <mueller@kde.org>
* css/css_valueimpl.cpp (cssText): wrap uri's into url().
Stephan Kulow noted that other browsers do that.
2003-11-17 David Hyatt <hyatt@apple.com>
Fix for 3472998, stop a crash on an insanely malformed page. I had to change the concept of
"inStrayTableContent" to be a counter, since you could be nested and need to push/pop, and
then I also had to stop from mistakenly popping when I didn't need to.
Reviewed by rjw
* khtml/html/htmlparser.cpp:
(KHTMLParser::reset):
(KHTMLParser::insertNode):
(KHTMLParser::reopenResidualStyleTags):
(KHTMLParser::popBlock):
(KHTMLParser::popOneBlock):
* khtml/html/htmlparser.h:
2003-11-17 Darin Adler <darin@apple.com>
Reviewed by Ken.
- did keyboard event cleanup to follow up on the keyCode work I did before
- fixed 3485558: key identifers use lowercase hex, but the W3C document shows uppercase
- fixed 3485564: key identifier for the Return key should be "Enter"
- fixed 3485579: letter keys generate different key identifiers depending on whether the shift key is down
- fixed 3485568: keyboard event modifier key bits are uninitialized; may have incorrect values
- fixed 3481514: which attribute for DOM events reports incorrect value
- fixed 3452569: charCode attribute for DOM events not supported
* khtml/dom/dom2_events.h: Added charCode.
* khtml/dom/dom2_events.cpp:
(UIEvent::keyCode): Call through to KeyboardEventImpl instead of doing the work here;
better factoring.
(UIEvent::charCode): Added. Calls through to KeyboardEventImpl.
(UIEvent::which): Call keyCode in KeyboardEventImpl to share code.
* khtml/ecma/kjs_events.h: Added charCode property for DOMUIEvent.
* khtml/ecma/kjs_events.cpp: (DOMUIEvent::getValueProperty): Added charCode.
* khtml/ecma/kjs_events.lut.h: Regenerated.
* khtml/html/html_formimpl.h:
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::defaultEventHandler): Remove checks for "U+00000d" since we now use "Enter"
for that key; also, we use capitalized hex, so it would have to change to "U+00000D" anyway.
(HTMLSelectElementImpl::defaultEventHandler): Ditto.
* khtml/html/html_inlineimpl.cpp: (HTMLAnchorElementImpl::defaultEventHandler): Ditto.
* khtml/khtmlview.cpp: (KHTMLView::keyPressEvent): Put !APPLE_CHANGES around code we are not
using. It was doing a switch based on Qt key codes, but the key value it was using to check
was a Macintosh virtual key code, which could yield strange results when the codes happen to
match. Safer and smaller code size not to do any of it at all.
* khtml/rendering/render_form.cpp:
(RenderLineEdit::RenderLineEdit): Use a KLineEdit instead of LineEditWidget for APPLE_CHANGES.
Allows us to put !APPLE_CHANGES around more Qt key code stuff.
(RenderLineEdit::select): Cast to KLineEdit instead of LineEditWidget.
(ComboBoxWidget::event): Put !APPLE_CHANGES around more unneeded Qt key code stuff.
(TextAreaWidget::event): Put !APPLE_CHANGES around more unneeded Qt key code stuff.
* khtml/xml/dom2_eventsimpl.h: Made id() const and added keyCode() and charCode().
* khtml/xml/dom2_eventsimpl.cpp:
(KeyboardEventImpl::KeyboardEventImpl): Initialize all fields in the empty constructor.
Initialize all the modifier bits in the main constructor; the old code assumed they started
off false, which is not a safe assumption. Also set m_altGraphKey false. Eliminated the
unneeded check of text() before calling identifier(). Also adapted for the name change from
identifier() to keyIdentifier().
(KeyboardEventImpl::keyCode): Added. Returns the Windows virtual key code for keydown and
keyup events, and the Unicode character for all other events.
(KeyboardEventImpl::charCode): Added. Returns the Unicode character.
* kwq/KWQEvent.h: Changed QCustomEvent to be a typedef for QEvent.
(QEvent::QEvent): Removed AccelAvailable, and added KParts, so I could remove some ugly
constants from the KParts code.
(QMouseEvent::button): Use a cast here since the field is now int.
(QMouseEvent::state): Use a cast here since the field is now int.
(QMouseEvent::stateAfter): Use a cast here since the field is now int, and use the new
_stateAfter field.
(QTimerEvent::QTimerEvent): Moved the constructor to be inline since it's so simple.
(QKeyEvent::QKeyEvent): Removed type and button state parameters, now unneeded.
Also removed now-unused _key, _ascii, and _count fields, and key(), ascii(),
and count() functions.
(QKeyEvent::state): Made inline.
(QKeyEvent::isAccepted): Made inline.
(QKeyEvent::text): Made inline.
(QKeyEvent::isAutoRepeat): Made inline.
(QKeyEvent::accept): Made inline.
(QKeyEvent::ignore): Made inline.
(QKeyEvent::unmodifiedText): Made inline.
(QKeyEvent::keyIdentifier): Made inline and chnaged name from identifier().
* kwq/KWQEvent.mm:
(keyIdentifierForKeyEvent): Renamed from identifierForKeyText and changed parameter
to be the event. Cleaned up the code a little bit, and wrote a comment or two.
Changed from lowercase hex to uppercase, and called toupper on the key so that
letter a-z would work properly. (A non-Unicode toupper is just the ticket here,
because I am only sure we want to do this for a-z, not other lowercase characters.)
(isKeypadEvent): Added. Uses virtual key codes to decide if a key event is a keypad
event, so we can set the state flag correctly.
(WindowsKeyCodeForKeyEvent): Added Clear key to the switch statement; it was missing.
Changed to no longe use the characterCode helper function since this was the only
place it was needed.
(mouseButtonForEvent): Added. Similar logic to what was in KWQKHTMLPart before; better
factoring to have it in here.
(nonMouseButtonsForEvent): Ditto.
(QMouseEvent::QMouseEvent): Rewrote constructors. One matches the one from Qt that's
used in some places in KHTML code. The other takes an NSEvent and uses the new functions
above to compute the button and state.
(QKeyEvent::QKeyEvent): Computer type based on the passed-in NSEvent. Compute the
auto-repeat flag based on the event and also the "forceAutoRepeat" parameter. Compute
the button state based on the event too.
* kwq/KWQKHTMLPart.h: Remove buttonForCurrentEvent and stateForCurrentEvent. Both
are now in KWQEvent.mm.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::keyEvent): Remove extra parameters in code that creates QKeyEvent, now
that QKeyEvent can handle everything itself.
(KWQKHTMLPart::mouseDown): Same thing as above, only for QMouseEvent.
(KWQKHTMLPart::mouseDragged): Ditto.
(KWQKHTMLPart::mouseUp): Ditto.
(KWQKHTMLPart::mouseMoved): Ditto.
(KWQKHTMLPart::sendContextMenuEvent): Ditto.
* kwq/KWQKPartsEvent.h: Tweaked the class around a little so it can work without
taking advantage of QCustomEvent's data pointer.
* kwq/KWQKPartsEvent.mm:
(KParts::Event::Event): Changed so it does a strdup on the event name and uses the
new event type pre-allocated in KWQEvent.h for us.
(KParts::Event::~Event): Free the event name.
(KParts::Event::test): Reimplemented this.
* kwq/KWQKPartsPart.h: (KParts::Part::event): Removed now-unnecessary cast to change
a QCustomEvent into a QEvent.
* kwq/KWQNamespace.h: Removed the Qt::Key enum. All the code that used it was already
broken because of the mixup between Qt and Macintosh key codes.
2003-11-17 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
<rdar://problem/3487079>: Some scheme checks in KURL do not verify
first char is a legal first char for a scheme
* kwq/KWQKURL.mm:
(KURL::KURL): Added some additional checks when looking through
strings looking for schemes. Now the first character is checked
for validity as a first character in a scheme.
2003-11-17 David Hyatt <hyatt@apple.com>
Fix for 3486441, don't use the visibleWidth when computing the containingBlockWidth(). No need to
query the view, since the canvas's width has been set to the proper size (when printing).
Reviewed by john
* khtml/rendering/render_box.cpp:
(RenderBox::containingBlockWidth):
2003-11-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3413713 - iframe forms posting fails without initial src attribute value
* khtml/rendering/render_frames.cpp:
(RenderPartObject::updateWidget): If the new part is for "about:blank",
set the document base URL to parent's base URL.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::createEmptyDocument): If this part is an
iframe, set the document base URL to the parent's base URL.
2003-11-17 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3485925: Safari does not correctly parse eight-digit hex character entities
* khtml/html/htmltokenizer.cpp: (HTMLTokenizer::parseEntity): Replaced puzzling variable limit
on number of hexadecimal characters to parse with an 8-character limit.
2003-11-17 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3485572 -- secure form check in KHTML uses case-sensitive comparison with "https"
* khtml/html/html_formimpl.h:
* khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::formWouldHaveSecureSubmission):
Changed to take a DOMString reference for slightly better efficiency, and to use startsWith
so the prefix check is not case sensitive and for slightly better efficiency and clarity
than calling latin1() and using strncmp.
2003-11-17 Maciej Stachowiak <mjs@apple.com>
- commit updated .lut.h file that I forgot to commit before
* khtml/ecma/kjs_window.lut.h:
2003-11-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3382829 - Safari won't load script src javascript if done by a document.write followed by document.close
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::closeInternal): Don't delete the tokenizer if it's
waiting for scripts. It will get destroyed later when the part
gets all subresources and closes the document.
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::isWaitingForScripts): Added.
* khtml/html/htmltokenizer.h: Prototyped.
* khtml/xml/xml_tokenizer.cpp:
(XMLTokenizer::isWaitingForScripts): Added.
* khtml/xml/xml_tokenizer.h: Prototyped.
2003-11-17 David Hyatt <hyatt@apple.com>
Fix for 3480108, crash because of the wrong malformedTableParent when stray content is placed inside
a <tr>.
Reviewed by john
* khtml/html/htmlparser.cpp:
(KHTMLParser::popBlock):
2003-11-17 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3397494 - FileMaker: Setting option object text fails if created without text
* khtml/html/html_formimpl.cpp:
(HTMLOptionElementImpl::childrenChanged): Update the select element.
This ends up getting called when you add a text node to an option that
didn't used to have one.
* khtml/html/html_formimpl.h: Prototype it.
2003-11-17 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
Fix for this bug:
<rdar://problem/3480023>: Links don't work if there's a colon in the URL
The colon in the URL was confusing KURL. I modified some checks in
KURL so that its search for schemes stops when a non-scheme
character is found rather than when a path end segment character
is found.
* kwq/KWQKURL.mm: Added a new Colon class to the table of characters.
(isSchemeCharOrColon): New helper.
(KURL::KURL): Call on new helper when looking for a scheme.
(KURL::findHostnameInHierarchicalURL): Ditto.
2003-11-17 David Hyatt <hyatt@apple.com>
Fix for 2931829, lines with hyphens should break on the hyphens. Match WinIE's behavior of
breaking on - and ?.
Reviewed by john
* khtml/rendering/break_lines.cpp:
(khtml::isBreakable):
2003-11-17 David Hyatt <hyatt@apple.com>
Fix for 3415771, Safari should use mini form controls when necessary. This patch adds heuristics for
swapping in mini form controls and also drops intrinsic margins when mini form controls are used.
Fix for 3486454, options/optgroups should strip leading/trailing space.
Together these two fixes solve 3486581, travelocity misrenders because form controls are too large.
Reviewed by Darin
Also fixing 3474994, alink needs to be restricted to actual links and not all <a> tags.
Reviewed by John
Finally, adding :active outlines around <input type=image> (covered by the old bug 3141767).
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::CSSStyleSelector):
(khtml::CSSStyleSelector::applyRule):
(khtml::CSSStyleSelector::checkForGenericFamilyChange):
(khtml::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
(khtml::):
(khtml::CSSStyleSelector::fontSizeForKeyword):
(khtml::CSSStyleSelector::largerFontSize):
(khtml::CSSStyleSelector::smallerFontSize):
* khtml/css/cssstyleselector.h:
* khtml/css/html4.css:
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::parseAttribute):
* khtml/khtml_part.cpp:
(KHTMLPart::setZoomFactor):
* khtml/rendering/render_form.cpp:
(RenderFormElement::addIntrinsicMarginsIfAllowed):
(RenderSelect::updateFromElement):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::recalcStyle):
(DocumentImpl::attach):
* kwq/KWQButton.mm:
(KWQNSControlSizeForFont):
2003-11-17 David Hyatt <hyatt@apple.com>
Back out my change to exclude text runs from getting a relayout on a style change. I totally forgot about
text zooming.
* khtml/rendering/render_object.cpp:
(RenderObject::setStyle):
2003-11-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
<rdar://problem/3131664>: add support for the window.print() command used for "print this page" buttons
* khtml/ecma/kjs_window.cpp:
(Window::get): add support for window.print (Apple-only)
(WindowFunc::tryCall): ditto
* khtml/ecma/kjs_window.h: Add Print to enum
* khtml/ecma/kjs_window.lut.h: Regenerated
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::print): Call bridge.
* kwq/KWQKHTMLPart.h: Declare above.
* kwq/WebCoreBridge.h: prototype print method for other side of bridge.
2003-11-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Check for the
returned part being NULL, not the out value pointer.
2003-11-16 David Hyatt <hyatt@apple.com>
Fix for 3485779, <input type=image> and <button> should not be mouse focusable.
Fix for 3485795, <input type=image> and <button> are being treated like links when they should not be.
Fix for 3485817, <input type=image> and <button> should obey full keyboard access mode.
Fix for 3485802, fieldset/legend/option/optgroup/label should not be focusable at all.
Reviewed by kocienda
* ChangeLog:
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::isKeyboardFocusable):
(HTMLGenericFormElementImpl::isMouseFocusable):
(HTMLFieldSetElementImpl::isFocusable):
(HTMLLabelElementImpl::isFocusable):
(HTMLLegendElementImpl::isFocusable):
(HTMLOptGroupElementImpl::isFocusable):
(HTMLOptionElementImpl::HTMLOptionElementImpl):
(HTMLOptionElementImpl::isFocusable):
* khtml/html/html_formimpl.h:
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::isMouseFocusable):
(HTMLAnchorElementImpl::isKeyboardFocusable):
* khtml/html/html_inlineimpl.h:
* khtml/khtml_part.cpp:
(KHTMLPart::tabsToLinks):
(KHTMLPart::tabsToAllControls):
* khtml/khtml_part.h:
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::nextKeyViewInFrame):
(KWQKHTMLPart::tabsToLinks):
(KWQKHTMLPart::tabsToAllControls):
2003-11-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3484723 - name property of window reference from window.open call is always empty
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Set the part name on the khtml side when
making a new window.
2003-11-16 David Hyatt <hyatt@apple.com>
Fix for 3485766.
Make sure DOM elements that are programmatically focused at a time when they have no render objects restore the
focus to their widgets when render objects get built.
Reviewed by darin
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::attach):
2003-11-16 David Hyatt <hyatt@apple.com>
Add border info to the render tree dumper.
* khtml/rendering/render_style.h:
(khtml::BorderValue::operator!=):
* kwq/KWQRenderTreeDebug.cpp:
(printBorderStyle):
(operator<<):
* layout-tests/apple-only/base/bugzilla.mozilla.org/index-expected.txt:
* layout-tests/apple-only/base/home.netscape.com/index-expected.txt:
* layout-tests/apple-only/base/lxr.mozilla.org/index-expected.txt:
* layout-tests/apple-only/base/my.netscape.com/index-expected.txt:
* layout-tests/apple-only/base/news.cnet.com/index-expected.txt:
* layout-tests/apple-only/base/web.icq.com/index-expected.txt:
* layout-tests/apple-only/base/www.altavista.com/index-expected.txt:
* layout-tests/apple-only/base/www.amazon.com/index-expected.txt:
* layout-tests/apple-only/base/www.cnn.com/index-expected.txt:
* layout-tests/apple-only/base/www.digitalcity.com/index-expected.txt:
* layout-tests/apple-only/base/www.ebay.com/index-expected.txt:
* layout-tests/apple-only/base/www.excite.com/index-expected.txt:
* layout-tests/apple-only/base/www.expedia.com/index-expected.txt:
* layout-tests/apple-only/base/www.iplanet.com/index-expected.txt:
* layout-tests/apple-only/base/www.mapquest.com/index-expected.txt:
* layout-tests/apple-only/base/www.microsoft.com/index-expected.txt:
* layout-tests/apple-only/base/www.moviefone.com/index-expected.txt:
* layout-tests/apple-only/base/www.msn.com/index-expected.txt:
* layout-tests/apple-only/base/www.msnbc.com/index-expected.txt:
* layout-tests/apple-only/base/www.nytimes.com/index-expected.txt:
* layout-tests/apple-only/base/www.nytimes.com_Table/index-expected.txt:
* layout-tests/apple-only/base/www.quicken.com/index-expected.txt:
* layout-tests/apple-only/base/www.sun.com/index-expected.txt:
* layout-tests/apple-only/base/www.time.com/index-expected.txt:
* layout-tests/apple-only/base/www.travelocity.com/index-expected.txt:
* layout-tests/apple-only/base/www.w3.org_DOML2Core/index-expected.txt:
* layout-tests/apple-only/base/www.yahoo.com/index-expected.txt:
* layout-tests/apple-only/base/www.zdnet.com/index-expected.txt:
* layout-tests/apple-only/base/www.zdnet.com_Gamespot.com/index-expected.txt:
* layout-tests/css1/basic/class_as_selector-expected.txt:
* layout-tests/css1/basic/comments-expected.txt:
* layout-tests/css1/basic/containment-expected.txt:
* layout-tests/css1/basic/contextual_selectors-expected.txt:
* layout-tests/css1/basic/grouping-expected.txt:
* layout-tests/css1/basic/id_as_selector-expected.txt:
* layout-tests/css1/basic/inheritance-expected.txt:
* layout-tests/css1/box_properties/acid_test-expected.txt:
* layout-tests/css1/box_properties/border-expected.txt:
* layout-tests/css1/box_properties/border_bottom-expected.txt:
* layout-tests/css1/box_properties/border_bottom_inline-expected.txt:
* layout-tests/css1/box_properties/border_bottom_width-expected.txt:
* layout-tests/css1/box_properties/border_bottom_width_inline-expected.txt:
* layout-tests/css1/box_properties/border_color-expected.txt:
* layout-tests/css1/box_properties/border_color_inline-expected.txt:
* layout-tests/css1/box_properties/border_inline-expected.txt:
* layout-tests/css1/box_properties/border_left-expected.txt:
* layout-tests/css1/box_properties/border_left_inline-expected.txt:
* layout-tests/css1/box_properties/border_left_width-expected.txt:
* layout-tests/css1/box_properties/border_left_width_inline-expected.txt:
* layout-tests/css1/box_properties/border_right-expected.txt:
* layout-tests/css1/box_properties/border_right_inline-expected.txt:
* layout-tests/css1/box_properties/border_right_width-expected.txt:
* layout-tests/css1/box_properties/border_right_width_inline-expected.txt:
* layout-tests/css1/box_properties/border_style-expected.txt:
* layout-tests/css1/box_properties/border_style_inline-expected.txt:
* layout-tests/css1/box_properties/border_top-expected.txt:
* layout-tests/css1/box_properties/border_top_inline-expected.txt:
* layout-tests/css1/box_properties/border_top_width-expected.txt:
* layout-tests/css1/box_properties/border_top_width_inline-expected.txt:
* layout-tests/css1/box_properties/border_width-expected.txt:
* layout-tests/css1/box_properties/border_width_inline-expected.txt:
* layout-tests/css1/box_properties/clear-expected.txt:
* layout-tests/css1/box_properties/clear_float-expected.txt:
* layout-tests/css1/box_properties/float-expected.txt:
* layout-tests/css1/box_properties/float_elements_in_series-expected.txt:
* layout-tests/css1/box_properties/float_margin-expected.txt:
* layout-tests/css1/box_properties/float_on_text_elements-expected.txt:
* layout-tests/css1/box_properties/height-expected.txt:
* layout-tests/css1/box_properties/margin-expected.txt:
* layout-tests/css1/box_properties/margin_bottom-expected.txt:
* layout-tests/css1/box_properties/margin_bottom_inline-expected.txt:
* layout-tests/css1/box_properties/margin_inline-expected.txt:
* layout-tests/css1/box_properties/margin_left-expected.txt:
* layout-tests/css1/box_properties/margin_left_inline-expected.txt:
* layout-tests/css1/box_properties/margin_right-expected.txt:
* layout-tests/css1/box_properties/margin_right_inline-expected.txt:
* layout-tests/css1/box_properties/margin_top-expected.txt:
* layout-tests/css1/box_properties/margin_top_inline-expected.txt:
* layout-tests/css1/box_properties/padding-expected.txt:
* layout-tests/css1/box_properties/padding_bottom-expected.txt:
* layout-tests/css1/box_properties/padding_bottom_inline-expected.txt:
* layout-tests/css1/box_properties/padding_inline-expected.txt:
* layout-tests/css1/box_properties/padding_left-expected.txt:
* layout-tests/css1/box_properties/padding_left_inline-expected.txt:
* layout-tests/css1/box_properties/padding_right-expected.txt:
* layout-tests/css1/box_properties/padding_right_inline-expected.txt:
* layout-tests/css1/box_properties/padding_top-expected.txt:
* layout-tests/css1/box_properties/padding_top_inline-expected.txt:
* layout-tests/css1/box_properties/width-expected.txt:
* layout-tests/css1/cascade/cascade_order-expected.txt:
* layout-tests/css1/cascade/important-expected.txt:
* layout-tests/css1/classification/display-expected.txt:
* layout-tests/css1/classification/list_style-expected.txt:
* layout-tests/css1/classification/list_style_image-expected.txt:
* layout-tests/css1/classification/list_style_position-expected.txt:
* layout-tests/css1/classification/list_style_type-expected.txt:
* layout-tests/css1/classification/white_space-expected.txt:
* layout-tests/css1/color_and_background/background-expected.txt:
* layout-tests/css1/color_and_background/background_attachment-expected.txt:
* layout-tests/css1/color_and_background/background_color-expected.txt:
* layout-tests/css1/color_and_background/background_image-expected.txt:
* layout-tests/css1/color_and_background/background_position-expected.txt:
* layout-tests/css1/color_and_background/background_repeat-expected.txt:
* layout-tests/css1/color_and_background/color-expected.txt:
* layout-tests/css1/conformance/forward_compatible_parsing-expected.txt:
* layout-tests/css1/font_properties/font-expected.txt:
* layout-tests/css1/font_properties/font_family-expected.txt:
* layout-tests/css1/font_properties/font_size-expected.txt:
* layout-tests/css1/font_properties/font_style-expected.txt:
* layout-tests/css1/font_properties/font_variant-expected.txt:
* layout-tests/css1/font_properties/font_weight-expected.txt:
* layout-tests/css1/formatting_model/canvas-expected.txt:
* layout-tests/css1/formatting_model/floating_elements-expected.txt:
* layout-tests/css1/formatting_model/height_of_lines-expected.txt:
* layout-tests/css1/formatting_model/inline_elements-expected.txt:
* layout-tests/css1/formatting_model/replaced_elements-expected.txt:
* layout-tests/css1/formatting_model/vertical_formatting-expected.txt:
* layout-tests/css1/pseudo/anchor-expected.txt:
* layout-tests/css1/pseudo/firstletter-expected.txt:
* layout-tests/css1/pseudo/firstline-expected.txt:
* layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt:
* layout-tests/css1/pseudo/pseudo_elements_in_selectors-expected.txt:
* layout-tests/css1/text_properties/letter_spacing-expected.txt:
* layout-tests/css1/text_properties/line_height-expected.txt:
* layout-tests/css1/text_properties/text-transform-expected.txt:
* layout-tests/css1/text_properties/text_align-expected.txt:
* layout-tests/css1/text_properties/text_decoration-expected.txt:
* layout-tests/css1/text_properties/text_indent-expected.txt:
* layout-tests/css1/text_properties/text_transform-expected.txt:
* layout-tests/css1/text_properties/vertical_align-expected.txt:
* layout-tests/css1/text_properties/word_spacing-expected.txt:
* layout-tests/css1/units/color_units-expected.txt:
* layout-tests/css1/units/length_units-expected.txt:
* layout-tests/css1/units/percentage_units-expected.txt:
* layout-tests/css1/units/urls-expected.txt:
* layout-tests/fast/block/basic/001-expected.txt:
* layout-tests/fast/block/basic/002-expected.txt:
* layout-tests/fast/block/basic/003-expected.txt:
* layout-tests/fast/block/basic/004-expected.txt:
* layout-tests/fast/block/basic/007-expected.txt:
* layout-tests/fast/block/basic/011-expected.txt:
* layout-tests/fast/block/basic/015-expected.txt:
* layout-tests/fast/block/basic/016-expected.txt:
* layout-tests/fast/block/basic/017-expected.txt:
* layout-tests/fast/block/basic/018-expected.txt:
* layout-tests/fast/block/basic/019-expected.txt:
* layout-tests/fast/block/float/004-expected.txt:
* layout-tests/fast/block/float/005-expected.txt:
* layout-tests/fast/block/float/006-expected.txt:
* layout-tests/fast/block/float/007-expected.txt:
* layout-tests/fast/block/float/012-expected.txt:
* layout-tests/fast/block/float/013-expected.txt:
* layout-tests/fast/block/float/015-expected.txt:
* layout-tests/fast/block/float/016-expected.txt:
* layout-tests/fast/block/float/017-expected.txt:
* layout-tests/fast/block/float/019-expected.txt:
* layout-tests/fast/block/float/021-expected.txt:
* layout-tests/fast/block/float/022-expected.txt:
* layout-tests/fast/block/float/024-expected.txt:
* layout-tests/fast/block/float/025-expected.txt:
* layout-tests/fast/block/float/026-expected.txt:
* layout-tests/fast/block/float/027-expected.txt:
* layout-tests/fast/block/float/028-expected.txt:
* layout-tests/fast/block/margin-collapse/001-expected.txt:
* layout-tests/fast/block/margin-collapse/005-expected.txt:
* layout-tests/fast/block/margin-collapse/006-expected.txt:
* layout-tests/fast/block/margin-collapse/010-expected.txt:
* layout-tests/fast/block/margin-collapse/011-expected.txt:
* layout-tests/fast/block/margin-collapse/012-expected.txt:
* layout-tests/fast/block/margin-collapse/015-expected.txt:
* layout-tests/fast/block/margin-collapse/016-expected.txt:
* layout-tests/fast/block/margin-collapse/017-expected.txt:
* layout-tests/fast/block/margin-collapse/018-expected.txt:
* layout-tests/fast/block/margin-collapse/019-expected.txt:
* layout-tests/fast/block/margin-collapse/020-expected.txt:
* layout-tests/fast/block/margin-collapse/021-expected.txt:
* layout-tests/fast/block/margin-collapse/022-expected.txt:
* layout-tests/fast/block/margin-collapse/024-expected.txt:
* layout-tests/fast/block/margin-collapse/025-expected.txt:
* layout-tests/fast/block/margin-collapse/026-expected.txt:
* layout-tests/fast/block/margin-collapse/027-expected.txt:
* layout-tests/fast/block/margin-collapse/028-expected.txt:
* layout-tests/fast/block/margin-collapse/029-expected.txt:
* layout-tests/fast/block/margin-collapse/030-expected.txt:
* layout-tests/fast/block/margin-collapse/032-expected.txt:
* layout-tests/fast/block/margin-collapse/033-expected.txt:
* layout-tests/fast/block/margin-collapse/034-expected.txt:
* layout-tests/fast/block/margin-collapse/035-expected.txt:
* layout-tests/fast/block/margin-collapse/041-expected.txt:
* layout-tests/fast/block/margin-collapse/042-expected.txt:
* layout-tests/fast/block/margin-collapse/043-expected.txt:
* layout-tests/fast/block/positioning/048-expected.txt:
* layout-tests/fast/block/positioning/049-expected.txt:
* layout-tests/fast/block/positioning/050-expected.txt:
* layout-tests/fast/block/positioning/051-expected.txt:
* layout-tests/fast/block/positioning/056-expected.txt:
* layout-tests/fast/block/positioning/057-expected.txt:
* layout-tests/fast/block/positioning/058-expected.txt:
* layout-tests/fast/block/positioning/auto/001-expected.txt:
* layout-tests/fast/block/positioning/auto/002-expected.txt:
* layout-tests/fast/block/positioning/auto/003-expected.txt:
* layout-tests/fast/block/positioning/auto/004-expected.txt:
* layout-tests/fast/block/positioning/auto/005-expected.txt:
* layout-tests/fast/block/positioning/auto/006-expected.txt:
* layout-tests/fast/clip/013-expected.txt:
* layout-tests/fast/clip/014-expected.txt:
* layout-tests/fast/css-generated-content/006-expected.txt:
* layout-tests/fast/css/003-expected.txt:
* layout-tests/fast/css/004-expected.txt:
* layout-tests/fast/css/005-expected.txt:
* layout-tests/fast/dynamic/002-expected.txt:
* layout-tests/fast/dynamic/004-expected.txt:
* layout-tests/fast/encoding/utf-16-big-endian-expected.txt:
* layout-tests/fast/encoding/utf-16-little-endian-expected.txt:
* layout-tests/fast/flexbox/007-expected.txt:
* layout-tests/fast/flexbox/008-expected.txt:
* layout-tests/fast/flexbox/009-expected.txt:
* layout-tests/fast/flexbox/011-expected.txt:
* layout-tests/fast/flexbox/016-expected.txt:
* layout-tests/fast/flexbox/017-expected.txt:
* layout-tests/fast/flexbox/018-expected.txt:
* layout-tests/fast/flexbox/019-expected.txt:
* layout-tests/fast/flexbox/022-expected.txt:
* layout-tests/fast/flexbox/025-expected.txt:
* layout-tests/fast/forms/001-expected.txt:
* layout-tests/fast/forms/002-expected.txt:
* layout-tests/fast/forms/006-expected.txt:
* layout-tests/fast/forms/007-expected.txt:
* layout-tests/fast/forms/form-element-geometry-expected.txt:
* layout-tests/fast/frames/001-expected.txt:
* layout-tests/fast/inline-block/001-expected.txt:
* layout-tests/fast/inline-block/002-expected.txt:
* layout-tests/fast/inline-block/003-expected.txt:
* layout-tests/fast/inline/001-expected.txt:
* layout-tests/fast/invalid/008-expected.txt:
* layout-tests/fast/invalid/014-expected.txt:
* layout-tests/fast/invalid/016-expected.txt:
* layout-tests/fast/lists/001-expected.txt:
* layout-tests/fast/lists/004-expected.txt:
* layout-tests/fast/lists/007-expected.txt:
* layout-tests/fast/overflow/001-expected.txt:
* layout-tests/fast/overflow/002-expected.txt:
* layout-tests/fast/overflow/004-expected.txt:
* layout-tests/fast/replaced/005-expected.txt:
* layout-tests/fast/replaced/006-expected.txt:
* layout-tests/fast/replaced/008-expected.txt:
* layout-tests/fast/selectors/009-expected.txt:
* layout-tests/fast/selectors/014-expected.txt:
* layout-tests/fast/selectors/032-expected.txt:
* layout-tests/fast/selectors/033-expected.txt:
* layout-tests/fast/selectors/039-expected.txt:
* layout-tests/fast/selectors/039b-expected.txt:
* layout-tests/fast/selectors/064-expected.txt:
* layout-tests/fast/selectors/077-expected.txt:
* layout-tests/fast/selectors/077b-expected.txt:
* layout-tests/fast/selectors/078-expected.txt:
* layout-tests/fast/selectors/078b-expected.txt:
* layout-tests/fast/selectors/166a-expected.txt:
* layout-tests/fast/table/003-expected.txt:
* layout-tests/fast/table/004-expected.txt:
* layout-tests/fast/table/005-expected.txt:
* layout-tests/fast/table/006-expected.txt:
* layout-tests/fast/table/007-expected.txt:
* layout-tests/fast/table/008-expected.txt:
* layout-tests/fast/table/009-expected.txt:
* layout-tests/fast/table/015-expected.txt:
* layout-tests/fast/table/017-expected.txt:
* layout-tests/fast/table/018-expected.txt:
* layout-tests/fast/table/020-expected.txt:
* layout-tests/fast/table/023-expected.txt:
* layout-tests/fast/table/025-expected.txt:
* layout-tests/fast/table/027-expected.txt:
* layout-tests/fast/table/028-expected.txt:
* layout-tests/fast/table/029-expected.txt:
* layout-tests/fast/table/030-expected.txt:
* layout-tests/fast/table/035-expected.txt:
* layout-tests/fast/table/036-expected.txt:
* layout-tests/fast/table/038-expected.txt:
* layout-tests/fast/table/border-collapsing/001-expected.txt:
* layout-tests/fast/table/border-collapsing/002-expected.txt:
* layout-tests/fast/table/border-collapsing/003-expected.txt:
* layout-tests/fast/table/border-collapsing/004-expected.txt:
* layout-tests/fast/table/large-width-expected.txt:
* layout-tests/fast/table/nobr-expected.txt:
* layout-tests/fast/text/basic/001-expected.txt:
* layout-tests/fast/text/basic/003-expected.txt:
* layout-tests/fast/text/basic/004-expected.txt:
* layout-tests/fast/text/basic/005-expected.txt:
* layout-tests/fast/text/basic/006-expected.txt:
* layout-tests/fast/text/basic/007-expected.txt:
* layout-tests/fast/text/basic/012-expected.txt:
* layout-tests/fast/text/firstline/002-expected.txt:
* layout-tests/fast/text/whitespace/002-expected.txt:
* layout-tests/fast/text/whitespace/003-expected.txt:
* layout-tests/fast/text/whitespace/020-expected.txt:
* layout-tests/fast/text/whitespace/023-expected.txt:
* layout-tests/fast/text/whitespace/024-expected.txt:
* layout-tests/fast/text/whitespace/025-expected.txt:
* layout-tests/fast/text/whitespace/027-expected.txt:
2003-11-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3362841 - javascript History Object length property is always 0
* kwq/KWQKPartsBrowserInterface.mm:
(KParts::BrowserInterface::property): For the historyLength property,
retturn a UInt variant, not Int, because that's what the kjs_window code
expects.
2003-11-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken and Dave.
- fixed 3471925 - getting and setting cssText not implemented
* khtml/css/css_valueimpl.cpp:
(CSSStyleDeclarationImpl::cssText): Implemented by gathering text of all
properties (that are not non-CSS hints), separated with semicolons.
(CSSStyleDeclarationImpl::setCssText): Implemented by clearing all existing
properties (that are not non-CSS hints) and invoking css parser.
(CSSValueListImpl::cssText): Implemented.
(FontValueImpl::cssText): Implemented.
(ShadowValueImpl::cssText): Implemented.
(CSSProperty::cssText): Implemented.
* khtml/css/css_valueimpl.h: Declared new methods; made
CSSValueImpl::cssText() pure virtual; removed CSSValueImpl::setCssText().
2003-11-16 David Hyatt <hyatt@apple.com>
3485717, Cleanup of the float code. Eliminated the -khtml-flow-mode style property in favor of two simple methods,
avoidsFloats() and usesLineWidth(). avoidsFloats can be called to tell whether an object does not want
floats to intrude into its space (and that it should also move to avoid floats). usesLineWidth is called
to find out if an object's containing block width is the line width or the content width, and has all the
right smarts to emulate WinIE's behaviors in both quirks and strict mode.
Also fixed a bug (3485718) where overflow:scroll blocks with auto height did not factor in the horizontal scrollbar's
height (thus causing it to paint on top of content).
Reviewed by darin
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/css/html4.css:
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::layoutInlineChildren):
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::layoutBlock):
(khtml::RenderBlock::layoutBlockChildren):
(khtml::RenderBlock::clearFloats):
* khtml/rendering/render_box.cpp:
(RenderBox::containingBlockWidth):
(RenderBox::calcWidth):
* khtml/rendering/render_object.cpp:
(RenderObject::isHR):
* khtml/rendering/render_object.h:
(khtml::RenderObject::avoidsFloats):
(khtml::RenderObject::usesLineWidth):
* khtml/rendering/render_style.h:
(khtml::RenderStyle::NonInheritedFlags::operator==):
(khtml::RenderStyle::setBitDefaults):
(khtml::RenderStyle::initialTextDecoration):
* khtml/rendering/render_table.cpp:
(RenderTable::calcWidth):
2003-11-14 David Hyatt <hyatt@apple.com>
Fix for 3485260, regression on Uniview site from incremental repainting. When appending/inserting child
nodes into the render tree, we need to always mark them as needing layout themselves (and not just as
having children needing layout). This ensures that the incremental repainting code will know to repaint the
enclosing container (even though that container's size may not change).
Fix for 3411960, block-level replaced elements should avoid floats.
Fix for 3463234, floats should not intrude into overflow blocks (even when siblings happen to get in
between the float and the overflow block).
Fix for 3485576, the containing block for text runs is incorrect.
Fix for 3485577, text runs should not trigger layout when style is re-resolved.
Reviewed by darin
* khtml/rendering/render_container.cpp:
(RenderContainer::appendChildNode):
(RenderContainer::insertChildNode):
* khtml/rendering/render_box.cpp
* khtml/rendering/render_object.cpp
2003-11-14 David Hyatt <hyatt@apple.com>
Fix for 3473707, 100% height positioned divs are too tall. The padding box wasn't being used like it was
supposed to be when calcing percentage heights.
Reviewed by kocienda
* khtml/rendering/render_box.cpp:
(RenderBox::calcAbsoluteVertical):
=== Safari-114 ===
2003-11-14 Maciej Stachowiak <mjs@apple.com>
- backed out changes unintentionally commited while the tree was closed
* khtml/css/css_valueimpl.cpp:
* khtml/css/css_valueimpl.h:
* kwq/KWQKPartsBrowserInterface.mm:
2003-11-14 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3471925 - getting and setting cssText not implemented
* khtml/css/css_valueimpl.cpp:
(CSSStyleDeclarationImpl::cssText): Implemented by gathering text of all
properties, separated with semicolons.
(CSSStyleDeclarationImpl::setCssText): Implemented by clearing all existing
properties and invoking css parser.
(CSSValueListImpl::cssText): Implemented.
(FontValueImpl::cssText): Implemented.
(ShadowValueImpl::cssText): Implemented.
(CSSProperty::cssText): Implemented.
* khtml/css/css_valueimpl.h: Declared new methods; made
CSSValueImpl::cssText() pure virtual; removed
CSSValueImpl::setCssText().
2003-11-14 Darin Adler <darin@apple.com>
Reviewed by John.
- first half of fix for 3457162 -- selecting text during a page load that blows the text field
away causes a crash
The WebCore part of this fix is to generalize the "defers loading" feature to all mouse clicks,
rather than just doing it for mouse clicks on the combo box.
* kwq/KWQComboBox.mm: (-[KWQPopUpButtonCell trackMouse:inRect:ofView:untilMouseUp:]):
Remove code to defer loading.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::passWidgetMouseDownEventToWidget): Put the code here
instead.
2003-11-14 John Sullivan <sullivan@apple.com>
- fixed <rdar://problem/3483585>: Option-tab in a text field inputs
a character rather than tabbing to the next widget
Reviewed by Ken.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::handleKeyboardOptionTabInView):
New method. If current event is option-tab or option-shift-tab, do
keyboard navigation and return YES.
* kwq/KWQTextArea.mm:
(-[KWQTextArea textDidChange:]):
Bail out if KWQKHTMLPart::handleKeyboardOptionTabInView returns YES.
* kwq/KWQTextField.mm:
(-[KWQTextField controlTextDidChange:]):
Bail out if KWQKHTMLPart::handleKeyboardOptionTabInView returns YES.
2003-11-13 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3472875 -- REGRESSION (109-110): insertion point does not blink in a nonempty textarea
- fixed 3484002 -- disabling, then enabling a read-only <textarea> will make it editable
* kwq/KWQTextArea.mm:
(-[KWQTextArea setText:]): Call updateTextColor after setting the text.
(-[KWQTextArea setEditable:]): Don't set the NSTextView editable property directly,
because we don't want to make a disabled text view editable right away, but we need
to later if it's enabled.
(-[KWQTextArea isEditable]): Don't get the NSTextView editable property directly,
because it can be appropriate to return YES even if the text view happens to be disabled.
(-[KWQTextAreaTextView initWithFrame:textContainer:]): Initialize editableIfEnabled to YES.
(-[KWQTextAreaTextView setEnabled:]): Don't set the editable state to true if
editableIfEnabled is NO. The old code would make a read-only field editable if you
changed it to be enabled. Also update the color of the text here.
(-[KWQTextAreaTextView setEditableIfEnabled:]): Store the editableIfEnabled state in a
field, and then alter the state of the editable flag to match if we're currently enabled.
(-[KWQTextAreaTextView isEditableIfEnabled]): Return the editableIfEnabled state.
(-[KWQTextAreaTextView updateTextColor]): Update the color of the text. This was done in
drawRect: before, which was the cause of the lack of insertion point.
2003-11-13 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3474330 -- tooltips do not work for <area> elements
* kwq/WebCoreBridge.mm: (-[WebCoreBridge elementAtPoint:]): When looking for a title, start
with innerNode (which can be an <area> inside a <map>). This matches what Mozilla does.
2003-11-13 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed - 3479285 - hang at www.saccourt.com
- fixed - 3477088 - (85-112) Safari frozen loading a page at Postal Service site of Taiwan
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLSelectCollection::tryPut): Use the range-checking
version of the number-conversion function to avoid negative
numbers and NaN.
2003-11-13 Ken Kocienda <kocienda@apple.com>
Reviewed by John
Fix for this bug:
<rdar://problem/3483284>: Tabbing to links needs to honor new
WebKit tab-to-links preference
In addition to fixing the bug, I also did a bit of cleanup
in the code which helps to determine tab order.
Biggest change is to modify the keyboard UI mode function so
that it is a set of flags, rather than a straight-up value.
I also tweaked the names on the keyboard UI mode constants
to make them read better.
* kwq/KWQButton.mm:
(QButton::focusPolicy): Tweaks to make more readable and use
new model for keyboard UI mode.
* kwq/KWQComboBox.mm:
(QComboBox::focusPolicy): Ditto. Plus, this function was not
blocking exceptions.
* kwq/KWQFileButton.mm:
(KWQFileButton::focusPolicy): Tweaks to make more readable and use
new model for keyboard UI mode.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::nextKeyViewInFrame): Now checks new tabsToLinks
function to determine if links can be tabbed to.
(KWQKHTMLPart::currentEventIsKeyboardOptionTab): New function
checks for option-tab keyboard event.
(KWQKHTMLPart::tabsToLinks): New helper to take keyboard UI mode
and option-tab into account.
(KWQKHTMLPart::keyboardUIMode): Name tweak.
* kwq/KWQListBox.mm: Tweaks to make more readable and use
new model for keyboard UI mode.
(QListBox::focusPolicy):
* kwq/WebCoreKeyboardAccess.h: Tweaked names. Added WebCoreKeyboardAccessTabsToLinks.
2003-11-13 David Hyatt <hyatt@apple.com>
Implement a custom unfurl marquee style.
Reviewed by john
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/rendering/render_box.cpp:
(RenderBox::calcHeight):
* khtml/rendering/render_layer.cpp:
(m_direction):
(Marquee::isUnfurlMarquee):
(Marquee::start):
(Marquee::updateMarqueePosition):
(Marquee::updateMarqueeStyle):
(Marquee::timerEvent):
* khtml/rendering/render_layer.h:
(khtml::):
* khtml/rendering/render_style.h:
(khtml::):
2003-11-13 Ken Kocienda <kocienda@apple.com>
Reviewed by John
Fix for this bug:
<rdar://problem/3480761>: event object type attribute returns
khtml_keypress instead of keypress
Fixed string so that it returns keypress instead of khtml_keypress.
While I was at it, I changed the constant used for this event from
KHTML_KEYPRESS_EVENT to KEYPRESS_EVENT.
* khtml/ecma/kjs_binding.cpp:
(ScriptInterpreter::wasRunByUserGesture): Constant name fixup.
* khtml/ecma/kjs_dom.cpp: Ditto.
(DOMNode::getValueProperty): Ditto.
(DOMNode::putValue): Ditto.
* khtml/ecma/kjs_window.cpp:
(Window::get): Ditto.
(Window::put): Ditto.
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::parseAttribute): Ditto.
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::defaultEventHandler): Ditto.
(HTMLSelectElementImpl::defaultEventHandler): Ditto.
* khtml/xml/dom2_eventsimpl.cpp:
(EventImpl::idToType): This is the change that fixes the bug.
(KeyboardEventImpl::KeyboardEventImpl): Constant name fixup.
* khtml/xml/dom2_eventsimpl.h:
(DOM::EventImpl::): Ditto.
2003-11-13 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3452554 -- keyCode attribute for DOM events reports incorrect value
* khtml/dom/dom2_events.cpp:
(UIEvent::keyCode): Return the Windows key code for keydown and keyup events.
But for other events, return the character code. This matches IE.
(UIEvent::which): Same behavior for now; may need further refinement.
* kwq/KWQEvent.h: Change QEvent to allow copying. The Qt version probably doesn't
allow it, but for us it's no big deal. Our event objects are just data holders.
(QKeyEvent::QKeyEvent): Change parameters; take an NSEvent and figure the rest out
here. Except for now get the type, button state, and auto repeat flag from the caller
because that's a smaller change from how things are done now. I'll take this the next
step later.
* kwq/KWQEvent.mm:
(characterCode): Added. Extracts the character code from the string if it's exactly
1 character long.
(WindowsKeyCode): Added. Given an event, figures out the Windows key code.
(QKeyEvent::QKeyEvent): Changed to get things from the NSEvent rather than having them
passed individually. One change is that _ascii is now the Unicode value of the first
character in the string. This causes us to return the Unicode value from keyCode for
keypress events. Another change is that we now compute the Windows key code.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::keyEvent): Change to use the new QKeyEvent
constructor, passing in the NSEvent.
* khtml/xml/dom2_eventsimpl.cpp: (KeyboardEventImpl::KeyboardEventImpl):
In APPLE_CHANGES, copy the QKeyEvent using the copy constructor rather than
listing the fields. This is easier to maintain when the list of fields changes.
* khtml/rendering/render_form.cpp: (ComboBoxWidget::eventFilter): Put #if
!APPLE_CHANGES around code that constructs a QKeyEvent. We don't ever run this
code, but now we can't compile it either so we need the #if.
2003-11-12 David Hyatt <hyatt@apple.com>
Fix for 3482132, incremental repainting for layout, i.e., only repaint areas that change when
doing a layout.
Reviewed by kocienda
* khtml/khtmlview.h:
* khtml/rendering/render_canvas.cpp:
(RenderCanvas::repaintViewRectangle):
* khtml/rendering/render_layer.h:
* khtml/rendering/render_object.cpp:
(RenderObject::setNeedsLayout):
(RenderObject::setChildNeedsLayout):
* khtml/rendering/render_object.h:
* khtml/rendering/render_table.cpp:
(RenderTableSection::layoutRows):
2003-11-12 Ken Kocienda <kocienda@apple.com>
I am an idiot for just assuming that these elements implement a focus()
function, without actually compiling and testing. I will have to add
this function to these elements so I can make this work.
* khtml/html/html_formimpl.cpp:
(HTMLButtonElementImpl::accessKeyAction): These elements do not implement focus().
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::accessKeyAction): Ditto.
2003-11-12 Ken Kocienda <kocienda@apple.com>
Reviewed by Richard
* khtml/html/html_formimpl.cpp:
(HTMLButtonElementImpl::click): Implemented. Missed this in my earlier patch.
(HTMLButtonElementImpl::accessKeyAction): Added. Focus and click.
(HTMLInputElementImpl::accessKeyAction): Added. Focus the element.
(HTMLSelectElementImpl::accessKeyAction): Added. Focus the element.
(HTMLTextAreaElementImpl::accessKeyAction): Added. Focus the element.
* khtml/html/html_formimpl.h:
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::accessKeyAction): Added. Focus and click.
* khtml/html/html_inlineimpl.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
(DocumentImpl::addElementById): Dirty the accesskey dictionary.
(DocumentImpl::removeElementById): Ditto.
(DocumentImpl::getElementByAccessKey): Function to look up an element
based on the key provided.
(DocumentImpl::setDocumentChanged): Dirty the accesskey dictionary.
(DocumentImpl::defaultEventHandler): Check the accesskey dictionary
to see if some element wants to handle a key event.
* khtml/xml/dom_docimpl.h:
* khtml/xml/dom_elementimpl.h:
(DOM::ElementImpl::accessKeyAction): Added. Send a click to the element.
2003-11-12 Ken Kocienda <kocienda@apple.com>
Reviewed by Richard
Fix for this bug:
<rdar://problem/3481600>: key event objects do not preserve unmodified keys
* khtml/xml/dom2_eventsimpl.cpp: Modified constructor call to include
unmodifiedText.
(KeyboardEventImpl::KeyboardEventImpl):
* kwq/KWQEvent.h: Added unmodifiedText accessor and variable to QKeyEvent.
* kwq/KWQEvent.mm:
(QKeyEvent::QKeyEvent): Modified constructor to include unmodifiedText.
(QKeyEvent::unmodifiedText): Added accessor.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::keyEvent): Modified constructor call to include
unmodifiedText.
2003-11-12 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::click): Implemented a programmatic click function for
elements.
* khtml/html/html_elementimpl.h:
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::submitClick): Implemented a programmatic click function for
elements.
(HTMLInputElementImpl::click): This implementation calls through
to Cocoa button programmatic click function to get user interface
feedback for button elements, and calls through to the superclass
for other elements.
* khtml/html/html_formimpl.h:
* khtml/html/html_inlineimpl.cpp: Removed click() function for anchors.
No longer needed.
* khtml/html/html_inlineimpl.h: Ditto.
2003-11-12 David Hyatt <hyatt@apple.com>
Fix build bustage in deployment builds.
* kwq/KWQLineEdit.mm:
(QLineEdit::hasMarkedText):
2003-11-11 David Hyatt <hyatt@apple.com>
Fix for 3481134, shorthand parsing in CSS does not fill in omitted values. The fix is to implement
the CSS3 'initial' value for all properties (covered by 3481323), and then to fill in the omitted
values with the 'initial' value.
This patch also fixes two bugs in the style system: 3481324, collapsed borders with border-style: none
should always return a width of 0, and 3481322, 'clip' not inheriting properly in CSS when explicit
inheritance is used.
Reviewed by mjs
* khtml/css/css_valueimpl.cpp:
(CSSInitialValueImpl::cssText):
* khtml/css/css_valueimpl.h:
(DOM::CSSInitialValueImpl::cssValueType):
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
(CSSParser::parseShortHand):
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/dom/css_value.h:
(DOM::CSSValue::):
* khtml/rendering/render_style.cpp:
(StyleBoxData::StyleBoxData):
(StyleVisualData::StyleVisualData):
(StyleBackgroundData::StyleBackgroundData):
(StyleMarqueeData::StyleMarqueeData):
(StyleFlexibleBoxData::StyleFlexibleBoxData):
(opacity):
(StyleInheritedData::StyleInheritedData):
(RenderStyle::diff):
* khtml/rendering/render_style.h:
(khtml::BorderValue::BorderValue):
(khtml::CollapsedBorderValue::width):
(khtml::RenderStyle::InheritedFlags::operator==):
(khtml::RenderStyle::setBitDefaults):
(khtml::RenderStyle::resetBorderTop):
(khtml::RenderStyle::resetBorderRight):
(khtml::RenderStyle::resetBorderBottom):
(khtml::RenderStyle::resetBorderLeft):
(khtml::RenderStyle::resetOutline):
(khtml::RenderStyle::setHasClip):
(khtml::RenderStyle::resetMargin):
(khtml::RenderStyle::resetPadding):
(khtml::RenderStyle::setCursor):
2003-11-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3479537 - reproducible crash in KJS::WindowFunc::tryCall
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall): Check part and doc impl for null.
2003-11-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3472330 - REGRESSION: onKeyPress handler not called when hitting keys in <input type=password> field
* kwq/KWQTextField.mm:
(-[KWQSecureTextField initWithQLineEdit:]): New initializer, so
the secure text field knows about the widget.
(-[KWQTextField setPasswordMode:]): Use new initializer for
KWQSecureTextField.
(-[KWQSecureTextField textView:shouldHandleEvent:]): New method,
do the same thing as the non-secure text field to pass the event on.
(-[KWQSecureTextField textView:didHandleEvent:]): Ditto.
2003-11-11 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
Fix for this bug:
<rdar://problem/3480173>: Too many names for programmatic click functions
Changed all instances of performClick() and simulateClick() to click().
Changed all instances of performSubmitClick() to submitClick().
Additionally, KWQButton had a simulateClick method, which was redundant
given that its superclass has a performClick: method.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::submitClick):
(HTMLInputElementImpl::defaultEventHandler):
(HTMLSelectElementImpl::defaultEventHandler):
* khtml/html/html_formimpl.h:
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::defaultEventHandler):
(HTMLAnchorElementImpl::click):
* khtml/html/html_inlineimpl.h:
* khtml/rendering/render_form.cpp:
(RenderLineEdit::slotReturnPressed):
* kwq/KWQButton.h:
* kwq/KWQButton.mm:
(QButton::click):
2003-11-11 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3475272 - custom property on CSSStyleObject won't hold a value
* khtml/ecma/kjs_css.cpp:
(DOMCSSStyleDeclaration::tryPut): If the property is not a css property,
save it as a custom object property in the normal way.
2003-11-11 John Sullivan <sullivan@apple.com>
- fixed <rdar://problem/3480421>: Focus rings around links are too thick,
should use 3 px instead of 5 px
Reviewed by Don and Ken.
* khtml/css/html4.css:
use 3px instead of 5 px for :active, :focus
2003-11-11 Ken Kocienda <kocienda@apple.com>
Reviewed by John
In the DOM Level 3 Events specification, keydown and keyup are
standard events. We can remove the KHTML component in the names
of these constants. Note that the keypress event is still
nonstandard and will retain the KHTML name component.
* khtml/ecma/kjs_binding.cpp:
(ScriptInterpreter::wasRunByUserGesture)
* khtml/ecma/kjs_dom.cpp:
(DOMNode::getValueProperty)
(DOMNode::putValue)
* khtml/ecma/kjs_window.cpp:
(Window::get)
(Window::put)
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::parseAttribute)
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::defaultEventHandler)
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::defaultEventHandler)
* khtml/xml/dom2_eventsimpl.cpp:
(EventImpl::typeToId)
(EventImpl::idToType)
(KeyboardEventImpl::KeyboardEventImpl)
* khtml/xml/dom2_eventsimpl.h:
(DOM::EventImpl::)
2003-11-11 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3480281>: drag image of selected text and images include broken images
Reviewed by dave.
* khtml/rendering/render_image.cpp:
(RenderImage::paintObject): when drawing the drag image, don't draw the broken image
2003-11-11 Vicki Murley <vicki@apple.com>
Reviewed by sullivan.
- rolled Merlot build fix onto the trunk
* WebCorePrefix.h: added #include <sys/types.h>
2003-11-10 David Hyatt <hyatt@apple.com>
Fix for 3473531, text nested in hr inside h3 did not get the h3's style.
Reviewed by darin
* khtml/html/dtd.cpp:
(DOM::checkChild):
2003-11-10 David Hyatt <hyatt@apple.com>
Fix for 3478435, <hr> tags should be centered by default. Ditched the 1px margin as well.
Fix for 3479441, <h1>-<h6> tags should *not* be centered by default. They should also use bold instead of
bolder.
Reviewed by darin
* khtml/css/html4.css:
* khtml/html/html_blockimpl.cpp:
(HTMLHRElementImpl::parseAttribute):
* layout-tests/apple-only/base/bugzilla.mozilla.org/index-expected.txt:
* layout-tests/apple-only/base/home.netscape.com/index-expected.txt:
* layout-tests/apple-only/base/www.altavista.com/index-expected.txt:
* layout-tests/apple-only/base/www.cnn.com/index-expected.txt:
* layout-tests/apple-only/base/www.digitalcity.com/index-expected.txt:
* layout-tests/apple-only/base/www.ebay.com/index-expected.txt:
* layout-tests/apple-only/base/www.excite.com/index-expected.txt:
* layout-tests/apple-only/base/www.mapquest.com/index-expected.txt:
* layout-tests/apple-only/base/www.microsoft.com/index-expected.txt:
* layout-tests/apple-only/base/www.msnbc.com/index-expected.txt:
* layout-tests/apple-only/base/www.nytimes.com/index-expected.txt:
* layout-tests/apple-only/base/www.nytimes.com_Table/index-expected.txt:
* layout-tests/apple-only/base/www.quicken.com/index-expected.txt:
* layout-tests/apple-only/base/www.w3.org_DOML2Core/index-expected.txt:
* layout-tests/css1/basic/class_as_selector-expected.txt:
* layout-tests/css1/basic/comments-expected.txt:
* layout-tests/css1/basic/containment-expected.txt:
* layout-tests/css1/basic/contextual_selectors-expected.txt:
* layout-tests/css1/basic/grouping-expected.txt:
* layout-tests/css1/basic/id_as_selector-expected.txt:
* layout-tests/css1/basic/inheritance-expected.txt:
* layout-tests/css1/box_properties/border-expected.txt:
* layout-tests/css1/box_properties/border_bottom-expected.txt:
* layout-tests/css1/box_properties/border_bottom_inline-expected.txt:
* layout-tests/css1/box_properties/border_bottom_width-expected.txt:
* layout-tests/css1/box_properties/border_bottom_width_inline-expected.txt:
* layout-tests/css1/box_properties/border_color-expected.txt:
* layout-tests/css1/box_properties/border_color_inline-expected.txt:
* layout-tests/css1/box_properties/border_inline-expected.txt:
* layout-tests/css1/box_properties/border_left-expected.txt:
* layout-tests/css1/box_properties/border_left_inline-expected.txt:
* layout-tests/css1/box_properties/border_left_width-expected.txt:
* layout-tests/css1/box_properties/border_left_width_inline-expected.txt:
* layout-tests/css1/box_properties/border_right-expected.txt:
* layout-tests/css1/box_properties/border_right_inline-expected.txt:
* layout-tests/css1/box_properties/border_right_width-expected.txt:
* layout-tests/css1/box_properties/border_right_width_inline-expected.txt:
* layout-tests/css1/box_properties/border_style-expected.txt:
* layout-tests/css1/box_properties/border_style_inline-expected.txt:
* layout-tests/css1/box_properties/border_top-expected.txt:
* layout-tests/css1/box_properties/border_top_inline-expected.txt:
* layout-tests/css1/box_properties/border_top_width-expected.txt:
* layout-tests/css1/box_properties/border_top_width_inline-expected.txt:
* layout-tests/css1/box_properties/border_width-expected.txt:
* layout-tests/css1/box_properties/border_width_inline-expected.txt:
* layout-tests/css1/box_properties/clear-expected.txt:
* layout-tests/css1/box_properties/clear_float-expected.txt:
* layout-tests/css1/box_properties/float-expected.txt:
* layout-tests/css1/box_properties/float_elements_in_series-expected.txt:
* layout-tests/css1/box_properties/float_margin-expected.txt:
* layout-tests/css1/box_properties/float_on_text_elements-expected.txt:
* layout-tests/css1/box_properties/height-expected.txt:
* layout-tests/css1/box_properties/margin-expected.txt:
* layout-tests/css1/box_properties/margin_bottom-expected.txt:
* layout-tests/css1/box_properties/margin_bottom_inline-expected.txt:
* layout-tests/css1/box_properties/margin_inline-expected.txt:
* layout-tests/css1/box_properties/margin_left-expected.txt:
* layout-tests/css1/box_properties/margin_left_inline-expected.txt:
* layout-tests/css1/box_properties/margin_right-expected.txt:
* layout-tests/css1/box_properties/margin_right_inline-expected.txt:
* layout-tests/css1/box_properties/margin_top-expected.txt:
* layout-tests/css1/box_properties/margin_top_inline-expected.txt:
* layout-tests/css1/box_properties/padding-expected.txt:
* layout-tests/css1/box_properties/padding_bottom-expected.txt:
* layout-tests/css1/box_properties/padding_bottom_inline-expected.txt:
* layout-tests/css1/box_properties/padding_inline-expected.txt:
* layout-tests/css1/box_properties/padding_left-expected.txt:
* layout-tests/css1/box_properties/padding_left_inline-expected.txt:
* layout-tests/css1/box_properties/padding_right-expected.txt:
* layout-tests/css1/box_properties/padding_right_inline-expected.txt:
* layout-tests/css1/box_properties/padding_top-expected.txt:
* layout-tests/css1/box_properties/padding_top_inline-expected.txt:
* layout-tests/css1/box_properties/width-expected.txt:
* layout-tests/css1/cascade/cascade_order-expected.txt:
* layout-tests/css1/cascade/important-expected.txt:
* layout-tests/css1/classification/display-expected.txt:
* layout-tests/css1/classification/list_style-expected.txt:
* layout-tests/css1/classification/list_style_image-expected.txt:
* layout-tests/css1/classification/list_style_position-expected.txt:
* layout-tests/css1/classification/list_style_type-expected.txt:
* layout-tests/css1/classification/white_space-expected.txt:
* layout-tests/css1/color_and_background/background-expected.txt:
* layout-tests/css1/color_and_background/background_attachment-expected.txt:
* layout-tests/css1/color_and_background/background_color-expected.txt:
* layout-tests/css1/color_and_background/background_image-expected.txt:
* layout-tests/css1/color_and_background/background_position-expected.txt:
* layout-tests/css1/color_and_background/background_repeat-expected.txt:
* layout-tests/css1/color_and_background/color-expected.txt:
* layout-tests/css1/conformance/forward_compatible_parsing-expected.txt:
* layout-tests/css1/font_properties/font-expected.txt:
* layout-tests/css1/font_properties/font_family-expected.txt:
* layout-tests/css1/font_properties/font_size-expected.txt:
* layout-tests/css1/font_properties/font_style-expected.txt:
* layout-tests/css1/font_properties/font_variant-expected.txt:
* layout-tests/css1/font_properties/font_weight-expected.txt:
* layout-tests/css1/formatting_model/canvas-expected.txt:
* layout-tests/css1/formatting_model/floating_elements-expected.txt:
* layout-tests/css1/formatting_model/height_of_lines-expected.txt:
* layout-tests/css1/formatting_model/inline_elements-expected.txt:
* layout-tests/css1/formatting_model/replaced_elements-expected.txt:
* layout-tests/css1/formatting_model/vertical_formatting-expected.txt:
* layout-tests/css1/pseudo/anchor-expected.txt:
* layout-tests/css1/pseudo/firstletter-expected.txt:
* layout-tests/css1/pseudo/firstline-expected.txt:
* layout-tests/css1/pseudo/multiple_pseudo_elements-expected.txt:
* layout-tests/css1/pseudo/pseudo_elements_in_selectors-expected.txt:
* layout-tests/css1/text_properties/letter_spacing-expected.txt:
* layout-tests/css1/text_properties/line_height-expected.txt:
* layout-tests/css1/text_properties/text-transform-expected.txt:
* layout-tests/css1/text_properties/text_align-expected.txt:
* layout-tests/css1/text_properties/text_decoration-expected.txt:
* layout-tests/css1/text_properties/text_indent-expected.txt:
* layout-tests/css1/text_properties/text_transform-expected.txt:
* layout-tests/css1/text_properties/vertical_align-expected.txt:
* layout-tests/css1/text_properties/word_spacing-expected.txt:
* layout-tests/css1/units/color_units-expected.txt:
* layout-tests/css1/units/length_units-expected.txt:
* layout-tests/css1/units/percentage_units-expected.txt:
* layout-tests/css1/units/urls-expected.txt:
* layout-tests/fast/encoding/utf-16-big-endian-expected.txt:
* layout-tests/fast/encoding/utf-16-little-endian-expected.txt:
2003-11-10 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3479266>: selected images don't obey CSS3 selection background-color attribute
Reviewed by dave.
* khtml/rendering/render_image.cpp:
(RenderImage::selectionTintColor): new, takes style into account
(RenderImage::paintObject): use selectionTintColor
* khtml/rendering/render_image.h:
* kwq/KWQPainter.h: removed selectedImageTintColor
* kwq/KWQPainter.mm:
2003-11-10 David Hyatt <hyatt@apple.com>
Fix for 3479287, macro-ize the handling of the CSS 'inherit' value. This patch is preparation for
adding support for the 'initial' value, which will be used to fix the CSS parser's shorthand parsing
bugs.
Reviewed by kocienda
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssproperties.c:
(hash_prop):
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/khtmlview.cpp:
(KHTMLView::layout):
2003-11-10 Chris Blumenberg <cblu@apple.com>
Fixed:
<rdar://problem/3478883>: REGRESSION (113-114u): drag image for selected text includes unselected images
<rdar://problem/3479204>: selected images don't look selected
Reviewed by dave.
* khtml/rendering/render_image.cpp:
(RenderImage::RenderImage): init m_selectionState
(RenderImage::paintObject): draw a tint over the image if selected, don't draw anything if not selected and the action is PaintActionSelection
* khtml/rendering/render_image.h:
(khtml::RenderImage::selectionState): new
(khtml::RenderImage::setSelectionState): new
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainter::selectedImageTintColor): new
2003-11-10 Ken Kocienda <kocienda@apple.com>
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/3477795>: REGRESSION: can't submit form without
submit button by hitting return (cocoadev.com)
When I changed submitting forms using the return key in a text field
to go through a search for the correct submit or image input
element to use when submitting, I neglected to cover the case of
forms which have neither a submit or image input element. When
I encounter a form such as this now, I submit it anyway after
performing the submit or image input element and failing to find one.
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::performSubmitClick)
2003-11-10 Richard Williamson <rjw@apple.com>
Fixed 3478765. Use ICU to access unicode properties.
Fixed 3478831. Unicode property/conversion functions should be 32 bit savvy.
Reviewed by Darin.
* WebCore-combined.exp:
* WebCore.exp:
* kwq/KWQChar.mm:
(QChar::lower):
(QChar::upper):
(QChar::mirroredChar):
* kwq/KWQString.h:
(QChar::direction):
* kwq/WebCoreUnicode.cpp:
* kwq/WebCoreUnicode.h:
2003-11-10 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3478781>: drag image of selected text and images doesn't include images
Reviewed by rjw.
* khtml/rendering/render_image.cpp:
(RenderImage::paintObject): paint when the paint action is PaintActionSelection
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::paint): ditto
2003-11-10 Ken Kocienda <kocienda@apple.com>
Reviewed by John
Fix for this bug:
<rdar://problem/3477624>: REGRESSION (113): Using input method to
enter non-ascii text submits the form
This regression has been in the tree for a couple of versions now,
since we improved the way key events are processed. The solution
is to ask the text input manager if it has any marked text when
the return key (or enter key) is pressed, because if it does, the key
needs to work in the "accept" role for the input manager. Fixing
in this way has the pleasant effect of making return/enter key
behavior "do the right thing" based on context.
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::defaultEventHandler): Add check to see
if text input manager has marked text before submitting text
and password fields. Broke out key handling for checkboxes and
radios, since the old code for these widgets worked fine.
* kwq/KWQLineEdit.h: Added hasMarkedText function.
* kwq/KWQLineEdit.mm:
(QLineEdit::hasMarkedText): Returns whether the current input
manager has marked text or not.
2003-11-09 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3478173 -- REGRESSION (112-113): getElementById is failing for many types of elements
The problem was that ElementImpl::attach was being skipped for many objects with classes
derived from ElementImpl. By changing them all to call up to their base classes instead of
skipping levels, the bug went away. This was possible (and easy to do) because of the
rendererIsNeeded() change I made a while back.
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::attach): Call base class's attach() instead of creating renderer explicitly
and then calling NodeBaseImpl::attach(). This was a remnant of the old way of changing the logic
about when to create the renderer, not needed now that we have rendererIsNeeded().
(HTMLFrameSetElementImpl::attach): Ditto.
(HTMLIFrameElementImpl::attach): Ditto.
* khtml/html/html_formimpl.h: Removed many unused attach() overrides.
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::attach): Ditto.
(HTMLButtonElementImpl::attach): Removed, because now the base class's attach does the right thing.
(HTMLFieldSetElementImpl::attach): Ditto.
(HTMLInputElementImpl::attach): Removed explicit createRendererIfNeeded call, not needed now that
HTMLGenericFormElementImpl calls through to its base class.
(HTMLLegendElementImpl::attach): Removed, because now the base class's attach does the right thing.
(HTMLSelectElementImpl::attach): Ditto.
(HTMLTextAreaElementImpl::attach): Ditto.
* khtml/html/html_imageimpl.cpp:
(HTMLImageElementImpl::attach): Call base class's attach() instead of creating renderer explicitly
and then calling NodeBaseImpl::attach().
(HTMLImageElementImpl::detach): Call base class's detach() instead of NodeBaseImpl::detach(). No
need to skip the ElementImpl::detach() function, and important not to for the new "id" optimization.
* khtml/html/html_inlineimpl.h: Removed HTMLBRElementImpl::attach override.
* khtml/html/html_inlineimpl.cpp: (HTMLBRElementImpl::attach): Call base class's attach() instead
of creating renderer explicitly and then calling NodeBaseImpl::attach().
* khtml/html/html_objectimpl.h: Removed HTMLAppletElementImpl::attach override.
* khtml/html/html_objectimpl.cpp:
(HTMLAppletElementImpl::attach): Removed, because the base class's attach does the right thing.
(HTMLEmbedElementImpl::attach): Call base class's attach() instead of creating renderer explicitly
and then calling NodeBaseImpl::attach().
(HTMLObjectElementImpl::attach): Ditto.
2003-11-09 David Hyatt <hyatt@apple.com>
Fix for 3478317, letter/word-spacing don't inherit properly through italic/bold elements.
Reviewed by darin
* khtml/rendering/font.h:
(khtml::Font::Font):
* khtml/rendering/render_style.h:
(khtml::RenderStyle::setFontDef):
2003-11-09 David Hyatt <hyatt@apple.com>
Fix for 3478309, make sure backgrounds paint in the border box and not just in the padding box.
Reviewed by darin
Also making sure that <frame>s aren't transparent, since other browsers seem to only make <iframe>s/<object>s
be transparent.
* khtml/rendering/render_box.cpp:
(RenderBox::paintRootBoxDecorations):
(RenderBox::paintBackgroundExtended):
2003-11-08 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3478025 -- links with non-Latin-1 characters in the hostname are not getting IDN-encoded
* kwq/KWQKURL.mm:
(KURL::parse): Changed existing code to take advantage of the fact that a NUL character
is classified as a path segment end character.
(KURL::findHostnameInHierarchicalURL): Don't treat NUL characters as terminating characters
for hostnames, because QChar::latin1() turns all non-Latin-1 characters into NUL characters.
2003-11-08 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3477509 -- REGRESSION (112-113): crash in KHTMLPart::processObjectRequest at espn.com, chosun.com
* khtml/khtml_part.cpp: (KHTMLPart::processObjectRequest): Use a dynamic_cast to check the type of the
part rather than assuming it's always a KHTMLPart. The crash was caused by casting a KWQPluginPart to
KHTMLPart.
2003-11-08 Darin Adler <darin@apple.com>
Reviewed by Richard.
- event cleanup motivated by questions on khtml-devel
* khtml/dom/dom2_events.h: Removed eventModuleName.
* khtml/dom/dom2_events.cpp: Removed eventModuleName.
* khtml/xml/dom2_eventsimpl.h: Removed eventModuleName, made many trivially simple
functions inline, made virtual functions no longer inline. Also made some functions const.
(DOM::EventImpl::propagationStopped): Made this non-virtual; there was no reason for
it to be virtual I could see.
(DOM::EventImpl::defaultPrevented): Ditto.
(DOM::EventImpl::setDefaultHandled): Ditto.
(DOM::UIEventImpl::view): Made this inline.
(DOM::UIEventImpl::detail): Ditto.
(DOM::MouseEventImpl::screenX): Ditto.
(DOM::MouseEventImpl::screenY): Ditto.
(DOM::MouseEventImpl::clientX): Ditto.
(DOM::MouseEventImpl::clientY): Ditto.
(DOM::MouseEventImpl::layerX): Ditto.
(DOM::MouseEventImpl::layerY): Ditto.
(DOM::MouseEventImpl::ctrlKey): Ditto.
(DOM::MouseEventImpl::shiftKey): Ditto.
(DOM::MouseEventImpl::altKey): Ditto.
(DOM::MouseEventImpl::metaKey): Ditto.
(DOM::MouseEventImpl::button): Ditto.
(DOM::MouseEventImpl::relatedTarget): Ditto.
(DOM::MutationEventImpl::relatedNode): Ditto.
(DOM::MutationEventImpl::prevValue): Ditto.
(DOM::MutationEventImpl::newValue): Ditto.
(DOM::MutationEventImpl::attrName): Ditto.
(DOM::MutationEventImpl::attrChange): Ditto.
* khtml/ecma/kjs_events.cpp: (KJS::getDOMEvent): Changed implementation to no longer
require eventModuleName(), and removed some unneeded casts.
* khtml/xml/dom2_eventsimpl.cpp: Made lots of functions inline.
(EventImpl::isUIEvent): Since this is virtual, make it no longer inline.
(EventImpl::isMouseEvent): Ditto.
(EventImpl::isMutationEvent): Ditto.
(EventImpl::isKeyboardEvent): Ditto.
(UIEventImpl::isUIEvent): Ditto.
(MouseEventImpl::isMouseEvent): Ditto.
(KeyboardEventImpl::isKeyboardEvent): Ditto.
(MutationEventImpl::isMutationEvent): Ditto.
2003-11-07 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3020196>: links with href="" don't show hand cursor when you mouse over them
Reviewed by darin.
* khtml/khtmlview.cpp:
(KHTMLView::viewportMouseMoveEvent): check if the URL on the event is non-NULL, not if it is non-empty
2003-11-07 Richard Williamson <rjw@apple.com>
Fixed 3477067. Use our case unicode conversion routines.
Reviewed by Ken.
* kwq/KWQChar.mm:
(QChar::lower):
(QChar::upper):
2003-11-06 David Hyatt <hyatt@apple.com>
Fixes for 3476717, inline blocks should expand to encompass floats; 3476718, inline blocks should not
collapse margins with children; and 3476721, run-ins and compacts can flow into anonymous blocks, even
ones that they caused to be created by failing to run in/compact in the first place.
Reviewed by darin (inline block fixes only).
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::layoutBlock):
(khtml::RenderBlock::layoutBlockChildren):
2003-11-06 Richard Williamson <rjw@apple.com>
Fixed 3476563. Remove unnecessary call to set view position after load completes.
Reviewed by Gramps.
* khtml/khtml_part.cpp:
(KHTMLPart::checkCompleted):
2003-11-06 Chris Blumenberg <cblu@apple.com>
* khtml/rendering/render_image.h:
(khtml::RenderImage::isDisplayingError): forgot to remove the "virtual" part of the declaration
2003-11-06 Chris Blumenberg <cblu@apple.com>
Fixed:
<rdar://problem/3275118>: Dragging from missing-image link stretches missing-image icon to size of missing image
<rdar://problem/3476225>: assert dragging non-existant images
Reviewed by rjw.
* khtml/rendering/render_image.h:
(khtml::RenderImage::isDisplayingError): new method, returns true for the broken image
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]): only provide info if there is an image and the image is not broken
2003-11-06 Ken Kocienda <kocienda@apple.com>
Reviewed by Richard
Fixes for these bugs:
<rdar://problem/3476006>: Form file input widgets do not scroll
to view when focused
<rdar://problem/3476007>: Form file input widgets should only
focus when full keyboard access is on
* kwq/KWQFileButton.h: Added focusPolicy declaration.
* kwq/KWQFileButton.mm:
(KWQFileButton::focusPolicy): Added. Now works like other buttons.
Fixes 3476007.
(KWQFileButton::focusChanged): Added. Code similar to text area
widgets. Fixes 3476006.
2003-11-06 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3308609>: 6L60 Safari URL links with line-endings converted to hex by contextual menu
Reviewed by rjw.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge elementAtPoint:]): use parseURL to go from an attribute string to a URL string
=== Safari-113 ===
2003-11-06 John Sullivan <sullivan@apple.com>
- fixed broken build
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::completeURL):
removed stray character
2003-11-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3475366 - 4.5% of time spent making html event listeners on slow intel page.
6% speedup on intel page, 1% speedup on cvs-base PLT.
* khtml/ecma/kjs_events.cpp:
(JSEventListener::JSEventListener): Don't add self to hashtable if imp is null (which
can now happen in the lazy listener case).
(JSEventListener::~JSEventListener): Ditto on removing.
(JSEventListener::listenerObj): Made this virtual.
(JSLazyEventListener::JSLazyEventListener): New constructor.
(JSLazyEventListener::handleEvent): call parseCode, then
superclass if it appeared to succeed.
(JSLazyEventListener::listenerObj): call parseCode, then superclass.
(JSLazyEventListener::parseCode):
(KJS::getNodeEventListener): Check for null listenerObjImp in case of
lazy listener that failed to parse.
* khtml/ecma/kjs_dom.cpp:
(DOMNode::getListener): Ditto.
* khtml/ecma/kjs_html.cpp:
(Image::getValueProperty): Ditto.
* khtml/ecma/kjs_events.h:
(KJS::JSEventListener::listenerObjImp): call listenerObj() virtual
method and get imp from the result.
* khtml/ecma/kjs_proxy.cpp:
(KJSProxyImpl::createHTMLEventHandler): Don't parse the code here, make a lazy
listener.
* khtml/ecma/kjs_window.cpp:
(Window::getJSLazyEventListener): make a new JSLazyEventListener - no need
to check the listeners hashtable cause a brand new lazy listener won't have
a function anyway.
* khtml/ecma/kjs_window.h: Prototype new method.
2003-11-06 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3475397 - REGRESSION: relative URLs on page load test sometimes contain garbage, leading to missing images
* kwq/KWQKURL.mm:
(KURL::KURL): When constructing from NSURL, null-terminate the raw
bytes since KURL::parse expects a null-terminated C string. It
might be even better to pass a length to parse, but this fix is
simple and does the job.
2003-11-05 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3475109 -- support keyboard event object properties of altkey, ctrlKey, shiftKey
We had the DOM Level 3 KeyboardEvent class already; I just had to add JavaScript bindings.
* khtml/ecma/kjs_events.h: Added DOMKeyboardEvent class.
* khtml/ecma/kjs_events.cpp:
(KJS::getDOMEvent): Added code to make a DOMKeyboardEvent if the event is a DOM::KeyboardEvent.
(DOMKeyboardEvent::~DOMKeyboardEvent): Added.
(DOMKeyboardEvent::classInfo): Added.
(DOMKeyboardEvent::tryGet): Added.
(DOMKeyboardEvent::getValueProperty): Added.
(DOMKeyboardEventProtoFunc::tryCall): Added.
* khtml/dom/dom2_events.cpp:
(KeyboardEvent::keyIdentifier): Added.
(KeyboardEvent::keyLocation): Added.
* khtml/ecma/kjs_events.lut.h: Regenerated.
2003-11-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3475092 - Notifying the bridge about duplicate images takes 13% of time on intel page
Another 15% speedup on the intel page.
This also results in a 3% speedup on cvs-base PLT! (or maybe that was my last change)
* kwq/KWQLoader.mm:
(KWQServeRequest): Note that we told the bridge about the load.
(KWQCheckCacheObjectStatus): Don't tell the bridge about the load
if we have alrady; if we do tell it, then note it down.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::didTellBridgeAboutLoad): Helper method for the above.
(KWQKHTMLPart::haveToldBridgeAboutLoad): Ditto.
(KWQKHTMLPart::clear): Clear our idea of what URLs we told the bridge about.
* khtml/khtml_part.h: make clear() virtual.
2003-11-05 Darin Adler <darin@apple.com>
* WebCore-combined.exp: Checked in generated file.
2003-11-05 Richard Williamson <rjw@apple.com>
Fixed 3474957. Changed name of image rendering method to better reflect it's actual function.
- (void)beginAnimationInRect:(NSRect)ir fromRect:(NSRect)fr;
renamed to
- (void)drawImageInRect:(NSRect)ir fromRect:(NSRect)fr;
Reviewed by Chris.
* kwq/KWQPainter.mm:
(QPainter::drawPixmap):
* kwq/WebCoreImageRenderer.h:
2003-11-05 Darin Adler <darin@apple.com>
* WebCore-tests.exp: Added missing symbol so tests will link.
2003-11-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
- fixed 3474756 - Creating HTML event listeners takes 5% of time on particular slow intel page
* khtml/ecma/kjs_window.h: Make jsEventListeners a hashtable keyed
by listener object, not a list.
* khtml/ecma/kjs_window.cpp:
(Window::getJSEventListener): Do hashtable lookup for existing listener instead of
walking list.
* khtml/ecma/kjs_events.cpp:
(JSEventListener::JSEventListener): Use hashtable insert instead of list append.
(JSEventListener::~JSEventListener): Use hashtable remove instead of list removeRef.
2003-11-05 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3473872 -- encode domain names for IDN when creating URLs inside WebCore
* kwq/KWQKURL.h: Added KWQIntegerPair type, a number of private functions.
* kwq/KWQKURL.mm:
(isSchemeFirstChar): Make inline function from macro.
(isSchemeChar): Make inline function from macro.
(isUserInfoChar): Make inline function from macro.
(isHostnameChar): Make inline function from macro.
(isIPv6Char): Make inline function from macro.
(isPathSegmentEndChar): Make inline function from macro.
(isBadChar): Make inline function from macro.
(isHexDigit): Make inline function from macro.
(KURL::KURL): Remove unneeded initializations of m_isValid, since parse sets it.
Use CFURLGetBytes in one place a FIXME asked for it. Changed non-ASCII case to use
a separate function instead of code in line.
(KURL::encodeHostnames): Added. Finds host names and encodes them.
(KURL::findHostnameInHierarchicalURL): Added. Finds host name in a hierarchical URL.
(KURL::encodeHostname): Added. Encodes one host name.
(KURL::findHostnamesInMailToURL): Added. Finds host names in a mailto URL.
* kwq/KWQString.h: Added new overloads for startsWith.
* kwq/KWQString.mm:
(compareIgnoringCaseForASCIIOnly): Moved these functions up in the file so they can be
used by more methods of QString.
(QString::startsWith): Added new overloads.
* WebCore.pbproj/project.pbxproj: Add libicucore.A.dylib library.
2003-11-05 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3473906 - getElementById takes about 44% of time on particular slow intel page
I fixed this by adding a per-document id --> element hash
table. This speeds up my local copy of the intel page by 60% (50
sec to 20 sec!) and does not cause any PLT slowdown.
* khtml/xml/dom_docimpl.h: New QDict field for id to element hash table.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::getElementById): Just look it up in the newly
added hash table.
(DocumentImpl::addElementById): New method. Add to hash table if
no other element is set for that key (this lets the first element
of several with matching ids win).
(DocumentImpl::removeElementById): New method. Remove from hash
table only if the key and value both match.
These Element changes to keep the id --> element hashtable working
seem needlessly tricky, due to lack of bottlenecks in attribute
changing.
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::updateId): New method that removes element from
hash table for old it
(ElementImpl::setAttribute): If setting id, call updateId.
(ElementImpl::setAttributeMap): If either the old or the new map
includes id, call updateId.
(ElementImpl::attach): If we have an id, call updateId to set it
after attaching.
(ElementImpl::detach): Newly added. If we have an id, call
updateId to clear it before detaching.
(NamedAttrMapImpl::setNamedItem): If the name is id, call updateId on
our element.
(NamedAttrMapImpl::removeNamedItem): If the name is id, call updateId on
our element.
(NamedAttrMapImpl::operator=): If old or new contents include id attribute,
call updateId on our element.
* khtml/xml/dom_elementimpl.h: Prototype new methods.
2003-11-05 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
Fix for these bugs:
<rdar://problem/3467558>: Cannot tab to form file input widgets
<rdar://problem/3473631>: WebFileButton sends notifications to communicate with WebCore
Tabbing now works for these widgets. While I was in the neighborhood,
I improved the communication mechanism between the WebKit and WebCore
sides of the file button implementation, replacing notifications
with a callback object.
* WebCore-combined.exp: Remove no-longer used WebCoreFileButtonClicked
and WebCoreFileButtonFilenameChanged notofication strings.
* WebCore.exp: Ditto.
* kwq/KWQFileButton.h: Changed declarations to match changes in
callback functions.
* kwq/KWQFileButton.mm:
(KWQFileButton::KWQFileButton): Now sets the view after creating
the delegate object.
(KWQFileButton::filenameChanged): Now takes a QString argument
which indicates the filename.
(KWQFileButton::focusChanged): New function. Sends DOM focus and
blur events.
(-[KWQFileButtonAdapter initWithKWQFileButton:]): No longer needs
to register for notifications.
(-[KWQFileButtonAdapter dealloc]): No longer needs to remove itself
from the notification center.
(-[KWQFileButtonAdapter filenameChanged:]): No longer a notification
callback. Now a WebCoreFileButtonCallback callback.
(-[KWQFileButtonAdapter focusChanged:]): New WebCoreFileButtonCallback
callback.
(-[KWQFileButtonAdapter clicked]): No longer a notification
callback. Now a WebCoreFileButtonCallback callback.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::nextKeyViewInFrame): Unrelated cleanup.
* kwq/WebCoreBridge.h: Declared new WebCoreFileButtonDelegate protocol.
2003-11-05 Maciej Stachowiak <mjs@apple.com>
- fixed deployment build
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::fileWrapperForElement):
2003-11-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by Ken.
* khtml/ecma/kjs_window.cpp: Don't make event read-only, some
sites want to set their own top-level function named "event" and
will hang if they can't.
* khtml/ecma/kjs_window.lut.h: Regenerated.
2003-11-03 David Hyatt <hyatt@apple.com>
Fix for 3472167, for shrink-to-fit style printing, grow the width of the initial containing block
to be as large as the rightmost position after doing a layout to the page width.
Reviewed by john
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::forceLayoutForPageWidth):
2003-11-04 Chris Blumenberg <cblu@apple.com>
Fixed:
<rdar://problem/3472403>: RTFD of copied text and images should use original image data not tiffs
Reviewed by john.
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::fileWrapperForElement): call [_bridge _fileWrapperForURL:] to get cached data
* kwq/WebCoreBridge.h: added _fileWrapperForURL: to the bridge protocol
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge selectedAttributedString]): call the instance method attributedString
(-[WebCoreBridge attributedStringFrom:startOffset:to:endOffset:]): call the instance method attributedString
2003-11-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by Chris.
- fixed 3472893 - Slow intel page takes 20% of its time in CachedObject::ref
Speeds up loading of
http://www.intel.com/cd/ids/developer/asmo-na/eng/index.htm by
19%, no slowdown on PLT.
* khtml/misc/loader.h: Use QPtrDict for m_clients instead of QPtrList.
* khtml/misc/loader.cpp:
(CachedObjectClientWalker::CachedObjectClientWalker): Ditto.
(CachedObject::ref): Ditto.
* kwq/KWQPtrDict.h:
(QPtrDict::isEmpty): Implemented.
2003-11-03 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3370085 - new frames with javascript: URLs should be populated with the result of the JavaScript code
* ChangeLog:
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::updateForNewURL): Skip special filtering of
javascript:.
(HTMLFrameElementImpl::attach): Ditto.
* khtml/khtml_part.cpp:
(KHTMLPart::replaceContentsWithScriptResult): New method to execute
script and if the result is a string, set it as the new document contents.
(KHTMLPart::requestFrame): Removed APPLE_CHANGES around
javascript: handling. Use new
replaceContentsWithScriptResult method. This executes the
JS in the new child frame, not the parent frame, as in other
browsers.
* khtml/khtml_part.h: Prototype new method.
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::openURLRequest): Use new part method.
2003-11-03 Vicki Murley <vicki@apple.com>
Reviewed by kocienda.
- fixed <rdar://problem/3471096>: non-B&I builds should not use order files, because they cause false "regressions" in perf.
* WebCore.pbproj/project.pbxproj: added empty SECTORDER_FLAGS variables to the Development and Deployment build styles
2003-11-03 Ken Kocienda <kocienda@apple.com>
Reviewed by Maciej
Fix for this bug:
<rdar://problem/3470338>: onclick is not executing when you hit enter on focused links
Now when we trap return or enter when a link is focused, we send
a click event to the node.
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::defaultEventHandler): Swallow key event when
return or enter and send a mouse event.
(HTMLAnchorElementImpl::performClick): New function to send simulated
click.
* khtml/html/html_inlineimpl.h: Declare performClick function.
2003-11-03 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3392543 -- incorrect base writing direction in RTL form controls
- fixed baseline for list box <select> elements
- moved style code from updateFromElement to setStyle
* khtml/rendering/render_form.h: Added setStyle function to RenderFormElement, RenderLineEdit,
RenderSelect, and RenderTextArea. Removed some unused stuff.
* khtml/rendering/render_form.cpp:
(RenderFormElement::setStyle): Set the font based on the style.
(RenderFormElement::updateFromElement): Remove font setting code; moved to setStyle.
Also ifdef'd out the color-setting code, which belongs in setStyle and is irrelevant
for KWQ anyway.
(RenderSubmitButton::setStyle): Set the writing direction based on the style.
(RenderSubmitButton::updateFromElement): Tiny code cleanup, using a local variable.
(RenderLineEdit::setStyle): Set the alignment and writing direction based on the style.
(RenderLineEdit::updateFromElement): Remove alignment setting code; moved to setStyle.
(RenderFileButton::RenderFileButton): Remove code to set m_focus, a data member that was
never used.
(RenderSelect::setWidgetWritingDirection): Added. Helper function.
(RenderSelect::setStyle): Call setWidgetWritingDirection.
(RenderSelect::updateFromElement): Call setWidgetWritingDirection if a new widget is created.
(RenderSelect::baselinePosition): Added a FIXME comment.
(RenderTextArea::setStyle): Set the alignment and writing direction based on the style.
(RenderTextArea::updateFromElement): Remove alignment setting code; moved to setStyle.
* kwq/KWQButton.h: Added setWritingDirection function.
* kwq/KWQButton.mm:
(+[KWQButton cellClass]): Use KWQButtonCell.
(-[KWQButtonCell baseWritingDirection:]): Return base writing direction.
(-[KWQButtonCell setBaseWritingDirection:]): Store base writing direction.
(-[KWQButtonCell _textAttributes]): Set the base writing direction in the paragraph
style if it's not already right.
(QButton::setWritingDirection): Call setBaseWritingDirection: on the cell and do
setNeedsDisplay: as needed.
* kwq/KWQComboBox.h: Added setWritingDirection function.
* kwq/KWQComboBox.mm:
(QComboBox::setWritingDirection): Call setBaseWritingDirection: on the cell and do
setNeedsDisplay: as needed.
(-[KWQPopUpButtonCell setBaseWritingDirection:]): Store base writing direction.
(-[KWQPopUpButtonCell baseWritingDirection:]): Return base writing direction.
(-[KWQPopUpButtonCell _textAttributes]): Set the base writing direction in the
paragraph style if it's not already right.
* kwq/KWQLineEdit.h: Added setWritingDirection function.
* kwq/KWQLineEdit.mm:
(QLineEdit::setAlignment): Tweaked to match new setWritingDirection in style.
(QLineEdit::setWritingDirection): Call setBaseWritingDirection: on the KWQTextField.
* kwq/KWQTextField.h: Added setBaseWritingDirection method.
* kwq/KWQTextField.mm:
(-[KWQTextField setPasswordMode:]): Set the base writing direction of the secure field's
cell based on the base writing direction of the parent field's cell, when creating the
secure field.
(-[KWQTextField setBaseWritingDirection:]): Added. Sets the base writing direction of
the field's cell and the secure field's cell, if it exists, and does setNeedsDisplay
as needed.
(-[KWQTextFieldCell setBaseWritingDirection:]): Added. Stores the base writing direction.
(-[KWQTextFieldCell baseWritingDirection]): Added. Returns the base writing direction.
(-[KWQTextFieldCell _textAttributes]): Set the base writing direction in the paragraph
style if it's not already right.
(-[KWQSecureTextFieldCell setBaseWritingDirection:]): Added. Stores the base writing
direction.
(-[KWQSecureTextFieldCell _textAttributes]): Set the base writing direction in the
paragraph style if it's not already right.
* kwq/KWQListBox.h: Added itemIsGroupLabel and setWritingDirection functions, and made
the private insertItem function take a QString instead of an NSObject.
(QListBox::insertItem): Changed parameter from unsigned to int to match Qt, and made it
use an inlne to call the private insertItem function shared with insertGroupLabel.
(QListBox::insertGroupLabel): Changed parameter from unsigned to int and made it use an
inline to call the private insertItem function.
* kwq/KWQListBox.mm:
(itemFont): Added. Returns a suitable font for individual items.
(groupLabelFont): Added. Returns a suitable font for group labels.
(paragraphStyle): Added. Returns a suitable paragraph style for a given writing direction.
(stringAttributes): Added. Returns a string attributes dictionary for a given writing direction for
either individual items or group labels.
(QListBox::insertItem): Use an attributed string to give the item the appropriate font and
writing direction, calling stringAttributes to get the attributes dictionary, and getting
the writing direction from the table view.
(QListBox::endBatchInsert): Tweak for consistency with other nearby methods.
(QListBox::setSelected): Add an assertion and tweak a bit.
(QListBox::isSelected): Add an assertion and tweak a bit.
(QListBox::setWritingDirection): Update the styles for all the attributed strings and call
reloadData if the writing direction changes. Also store the direction in the table view.
(QListBox::itemIsGroupLabel): Added. Returns true if a given item is a group label; works
by checking the font in the attributed string.
(-[KWQTableView initWithListBox:items:]): Use itemFont() instead of computing the font.
(-[KWQTableView tableView:shouldSelectRow:]): Use itemIsGroupLabel function instead of
checking for NSString vs. NSttributedString in the items array; we now use attributed
strings for all the items.
(-[KWQTableView setBaseWritingDirection:]): Added. Stores a base writing direction.
(-[KWQTableView baseWritingDirection]): Added. Returns the stored base writing direction.
* kwq/KWQTextEdit.h: Added setWritingDirection function.
* kwq/KWQTextEdit.mm:
(QTextEdit::setAlignment): Removed code to set base writing direction.
(QTextEdit::setWritingDirection): Added. Sets base writing direction.
* kwq/KWQTextArea.mm: (-[KWQTextArea setBaseWritingDirection:]): Call setNeedsDisplay:YES.
2003-11-03 David Hyatt <hyatt@apple.com>
Fix 3472200, media tests fail to parse correctly. Merging a patch to handle exotic media types
from the KHTML trunk.
* khtml/css/parser.cpp:
* khtml/css/parser.y:
2003-11-03 David Hyatt <hyatt@apple.com>
Fix for 3471314, make sure to check the outline phase before painting backgrounds of iframes.
Reviewed by mjs
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::paint):
2003-11-03 David Hyatt <hyatt@apple.com>
Fix for 3470855, links with script action stay focused when clicking.
Fix for 3470858, clicking and dragging a link and then releasing doesn't clear the glow ring.
Fix for 3472090, link should not be mouse focusable.
Reviewed by mjs
* khtml/css/html4.css:
* khtml/html/html_inlineimpl.h:
(DOM::HTMLAnchorElementImpl::isMouseFocusable):
2003-11-03 David Hyatt <hyatt@apple.com>
Fix for 3472030, line-height not properly reset in all cases when the font shorthand is used.
Reviewed by mjs
* khtml/css/cssparser.cpp:
(CSSParser::parseFont):
2003-11-03 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3472023 - REGRESSION: assertion on layout tests
* kwq/KWQTextCodec.mm:
(KWQTextDecoder::convertUTF16): Remove assert that length is not
0, since we can get zero length now when flushing.
2003-11-03 Ken Kocienda <kocienda@apple.com>
Reviewed by John
Fix for this bug:
<rdar://problem/3260780>: hitting return in a text field submits
form without running onclick handler for submit button
* khtml/html/html_formimpl.cpp:
(HTMLFormElementImpl::performSubmitClick): Refactored this function to
be more generic, so that text fields can use it, too.
(HTMLInputElementImpl::defaultEventHandler): Removed code to check
for a submit button, and merged this code into new performSubmitClick.
(HTMLSelectElementImpl::defaultEventHandler): Ditto.
* khtml/html/html_formimpl.h: Removed declaration for simulateButtonClickForEvent.
Added declaration for performSubmitClick.
* khtml/rendering/render_form.cpp:
(RenderLineEdit::slotReturnPressed): Now calls performSubmitClick rather
than prepareSubmit on the form. This is the key piece for the bug fix.
2003-11-03 Ken Kocienda <kocienda@apple.com>
Reviewed by John
Fix for this bug:
<rdar://problem/3470342>: focus rings are shown for links in
web pages even in non-frontmost windows
* kwq/KWQKHTMLPart.h: Add setShowsFirstResponder, showsFirstResponder functions and
_showsFirstResponder member variable.
(KWQKHTMLPart::showsFirstResponder): Added.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): Initialize _showsFirstResponder to true
(KWQKHTMLPart::setShowsFirstResponder): Sets whether the painter draws focus rings.
* kwq/KWQPainter.h: Add _drawsFocusRing member variable.
(QPainter::setDrawsFocusRing): Sets whether the painter draws focus rings.
* kwq/KWQPainter.mm:
(QPainter::QPainter): Initialize _drawsFocusRing to true.
(QPainter::initFocusRing): Check _drawsFocusRing flag. Return if set to false.
(QPainter::addFocusRingRect): Ditto.
(QPainter::drawFocusRing): Ditto.
* kwq/WebCoreBridge.h: Add setShowsFirstResponder method.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge drawRect:]): Sets the value for _drawsFocusRing on the
painter using _showsFirstResponder value from the part.
(-[WebCoreBridge setShowsFirstResponder:]): Set passed in value on the part.
Redraw the focus ring if flag has changed.
2003-11-03 David Hyatt <hyatt@apple.com>
Remove unneeded style property additions for form controls. In the KHTML trunk these moved into the UA
sheet, but we don't even need them there, since we don't honor any of them.
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::attach):
(HTMLSelectElementImpl::attach):
(HTMLTextAreaElementImpl::attach):
2003-11-03 David Hyatt <hyatt@apple.com>
Patch from KHTML trunk. Move frameset positioning reset into adjustRenderStyle so as not to
pollute the render tree.
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::adjustRenderStyle):
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
2003-11-03 David Hyatt <hyatt@apple.com>
Fix for 3471609, 'transparent' should be an acceptable named color value instead of a special
keyword used only by background/border.
Reviewed by kocienda
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssstyleselector.cpp:
(khtml::):
(khtml::CSSStyleSelector::applyRule):
* khtml/css/cssvalues.c:
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/rendering/render_box.cpp:
(RenderBox::paintBackgroundExtended):
* khtml/rendering/render_object.cpp:
(RenderObject::setStyle):
* khtml/rendering/render_style.h:
(khtml::BorderValue::BorderValue):
(khtml::BorderValue::isTransparent):
(khtml::BorderValue::operator==):
(khtml::CollapsedBorderValue::isTransparent):
(khtml::RenderStyle::setBorderLeftColor):
(khtml::RenderStyle::setBorderRightColor):
(khtml::RenderStyle::setBorderTopColor):
(khtml::RenderStyle::setBorderBottomColor):
2003-11-02 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3471226 - HTML document that's less than 16 bytes comes out blank
* kwq/KWQTextCodec.mm:
(KWQTextDecoder::toUnicode): When flushing, don't bail out early
if there are no new characters!
2003-11-02 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- don't resolve Null href or src attributes, since the distinction
between empty and absent attribute is important.
* khtml/dom/html_base.cpp:
(HTMLIFrameElement::src):
* khtml/dom/html_form.cpp:
(HTMLInputElement::src):
* khtml/dom/html_head.cpp:
(HTMLBaseElement::href):
(HTMLLinkElement::href):
(HTMLScriptElement::src):
* khtml/dom/html_image.cpp:
(HTMLAreaElement::href):
(HTMLImageElement::src):
* khtml/dom/html_inline.cpp:
(HTMLAnchorElement::href):
2003-11-01 David Hyatt <hyatt@apple.com>
Fix for 3468924, an implementation of outline-offset. We also give :focus links a built-in offset of
outline-width/2 by default for the Apple Aqua style.
Fix for 3470660, input type=image excluded from tab order.
Reviewed by darin
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssproperties.c:
(hash_prop):
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/css/html4.css:
* khtml/rendering/render_box.cpp:
(RenderBox::getAbsoluteRepaintRect):
(RenderBox::computeAbsoluteRepaintRect):
* khtml/rendering/render_flow.cpp:
(RenderFlow::getAbsoluteRepaintRect):
* khtml/rendering/render_inline.cpp:
(RenderInline::paintFocusRing):
(RenderInline::paintOutlines):
(RenderInline::paintOutline):
* khtml/rendering/render_object.cpp:
(RenderObject::paintOutline):
* khtml/rendering/render_style.h:
(khtml::OutlineValue::OutlineValue):
(khtml::RenderStyle::outlineSize):
(khtml::RenderStyle::outlineOffset):
(khtml::RenderStyle::setOutlineOffset):
* khtml/rendering/render_text.cpp:
(RenderText::paintObject):
* kwq/KWQPainter.h:
* kwq/KWQPainter.mm:
(QPainterPrivate::QPainterPrivate):
(QPainter::initFocusRing):
(QPainter::addFocusRingRect):
2003-11-01 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3469262 - REGRESSION (110-112): logitech page is very slow to load (due to style sheet updates?)
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::dispatchGenericEvent): Don't do default handling for
events that don't bubble. Not 100% sure why this caused the big
slowdown but it was a somewhat arbitrary change in my earlier
patch.
2003-11-01 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3468870 -- REGRESSION (108-109): cannot upload files (<input type=file> is broken)
* kwq/KWQFileButton.mm: (KWQFileButton::filenameChanged): Pass the filename to
the textChanged signal. The one without a parameter is a different signal.
2003-11-01 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3466714 -- page with <object> tag with text subtype and no URL causes hang
* khtml/khtml_part.cpp: (KHTMLPart::requestObject): Added a check so that an empty
URL string doesn't get completed, and results in an empty KURL object. Also made the
change to allow empty URLs unconditional, because I don't think it's a WebCore-specific
thing on further reflection.
2003-10-31 David Hyatt <hyatt@apple.com>
Fix for 3470489, I just forgot to commit a piece of my patch. This has actually even
been reviewed by ken already.
Reviewed by kocienda
* khtml/rendering/render_replaced.cpp:
(RenderWidget::eventFilter):
2003-10-31 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3457875 -- text disappears from fields in forms upon certain types of scrolling
* kwq/KWQTextField.mm: (-[KWQTextField control:textShouldBeginEditing:]):
Call releaseGState on the field editor and its clip view to prevent undesirable caching.
2003-10-31 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
Fix for this bug:
<rdar://problem/3440719>: Read-only text field form controls
do not keyboard focus and do not take part in tabbing
* kwq/KWQTextField.mm:
(-[KWQTextField acceptsFirstResponder]): We want our text fields
to accept first responder even if not editable.
Once this is fixed, this one comes along for free:
<rdar://problem/3440710>: Read-only textarea form controls should select all text when focused
2003-10-31 Darin Adler <darin@apple.com>
Reviewed by Ken.
- fixed 3469383 -- REGRESSION (100-111): if one line is selected on this page, too much gets copied (plain text)
* khtml/khtml_part.cpp: (KHTMLPart::text): Range check the child node indices before using them
to get at a child node. We don't want to set startNode or endNode to nil in any case. If the end
node is set to nil, we end up copying the entire remainder of the page.
2003-10-31 David Hyatt <hyatt@apple.com>
Fix for 3470007, links don't get focus on mouse down. Fix the focus check on mouse down to actually
crawl up the content tree in order to find the nearest enclosing focusable node. Also clean up and
fix checks that improperly blurred the link after it got focused.
Fix for 3450335, AppKit widgets not obeying their desired focus policies. I renamed isSelectable to
isFocusable and then also added isMouseFocusable and isKeyboardFocusable methods.
Reviewed by kocienda
* khtml/css/html4.css:
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::isFocusable):
* khtml/html/html_baseimpl.h:
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::isFocusable):
(HTMLGenericFormElementImpl::isKeyboardFocusable):
(HTMLGenericFormElementImpl::isMouseFocusable):
* khtml/html/html_formimpl.h:
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::isFocusable):
* khtml/html/html_inlineimpl.h:
* khtml/khtmlview.cpp:
(KHTMLView::dispatchMouseEvent):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::nextFocusNode):
(DocumentImpl::previousFocusNode):
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::isFocusable):
(NodeImpl::isKeyboardFocusable):
(NodeImpl::isMouseFocusable):
* khtml/xml/dom_nodeimpl.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::khtmlMousePressEvent):
2003-10-31 Ken Kocienda <kocienda@apple.com>
Reviewed by David
Fix for this bug:
<rdar://problem/3470233>: solid outlines drawing incorrectly
The problem was that when I collected the array of line boxes for
render inlines, I put a QRect() at the start and the end of the list.
However, the border calculation code expected "invalid" rectangles
(rects with 0 for all four dimentions) in the first and last
positions, and the default constructor for QRect makes rects with 1,1
for width/height.
* khtml/rendering/render_inline.cpp:
(RenderInline::paintOutlines)
2003-10-31 Darin Adler <darin@apple.com>
Reviewed by Dave.
- fixed 3464759 -- REGRESSION (100-107): Pressing on link loses mouse-down feedback almost instantly
* khtml/khtmlview.cpp: (KHTMLView::viewportMouseMoveEvent): Pass true for the "read-only"
flag in prepareMoveEvent to prevent us from updating :hover and :active while the mouse is down.
2003-10-31 Ken Kocienda <kocienda@apple.com>
Reviewed by David
<rdar://problem/3468910>: REGRESSION: other than focus rings, outlines styles are broken
Outlines now draw like they used to.
* khtml/rendering/render_inline.cpp:
(RenderInline::paintObject): Now branches to call focus ring or "regular" outlines.
(RenderInline::paintFocusRing): Broke out drawing aqua focus rings into its
own function.
(RenderInline::paintOutlines): New function to draw "regular outlines.
(RenderInline::paintOutline): Removed code which special-cased aqua outlines.
* khtml/rendering/render_inline.h: Added paintOutlines declaration.
2003-10-31 David Hyatt <hyatt@apple.com>
Fix for 3467419, highlighted text in "search in books" Amazon feature is obscured. The
site is using the CSS3 opacity property. The CSS3 Color module is far enough along now
that opacity can safely be used without the "-khtml-" in front of it.
Fix for 3466542, the minimum font size bug. I am introducing a new minimum font size pref that
really is a hard override.
Reviewed by gramps (opacity) and john (min font size)
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
* khtml/css/cssproperties.c:
(hash_prop):
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
2003-10-31 Ken Kocienda <kocienda@apple.com>
Reviewed by Darin
Fix for this bug:
<rdar://problem/3469088>: focus not removed from text link
when user hits cmd-L or clicks in window chrome
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge deselectAll]): Now clears the focus ring as well.
(-[WebCoreBridge deselectText]): Just clears text selection.
2003-10-31 David Hyatt <hyatt@apple.com>
Three simple fixes:
(1) Fix for 3463777, crash on CSS3 box model draft. This was just a situation where a simple null-check
was needed for generated content.
(2) Added a != check when the old and new hover obj are the same to avoid a little bit of extra work.
(3) Removed the m_pressed member from DOM nodes and removed the calls to setPressed, since this code
is dead and not used by anyone.
* khtml/khtmlview.cpp:
* khtml/rendering/render_layer.cpp:
(RenderLayer::addChild):
(RenderLayer::updateHoverActiveState):
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::NodeImpl):
* khtml/xml/dom_nodeimpl.h:
(DOM::NodeImpl::hasStyle):
(DOM::NodeImpl::setHasStyle):
2003-10-30 David Hyatt <hyatt@apple.com>
Fix for 3469330, the Marquee data in RenderStyle needs a copy constructor hack like all the other
objects do.
* khtml/rendering/render_style.cpp:
(direction):
* khtml/rendering/render_style.h:
2003-10-30 David Hyatt <hyatt@apple.com>
Fix for 3469206, images didn't paint outlines any more. They were bailing early because I forgot to
add a check for my new PaintAction.
Reviewed by darin
* khtml/rendering/render_replaced.cpp:
(RenderReplaced::paint):
2003-10-30 David Hyatt <hyatt@apple.com>
Fixes for 3469057, outlines not drawn on aintitcool.com and also for 3469178, objects with width/height of 0
incorrectly excluded from tabbing.
Reviewed by darin
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::isSelectable):
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::isSelectable):
* khtml/rendering/render_flow.cpp:
(RenderFlow::getAbsoluteRepaintRect):
* khtml/rendering/render_inline.cpp:
(RenderInline::addFocusRingRects):
(RenderInline::paintOutline):
* khtml/rendering/render_object.cpp:
(RenderObject::addFocusRingRects):
(RenderObject::getAbsoluteRepaintRectWithOutline):
2003-10-30 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3426081 - empty cells HTMLCollection for <tr>
- fixed 3367598 - "length" attribute for table row "cells" always returns 0
* khtml/dom/html_table.cpp:
(HTMLTableRowElement::cells): TR_CELLS, not TABLE_ROWS.
2003-10-30 David Hyatt <hyatt@apple.com>
Fix for 3468916, outline needs its own paint action so that focus rings don't draw under other content.
Reviewed by kocienda
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::paintObject):
(khtml::RenderBlock::paintFloats):
* khtml/rendering/render_image.cpp:
(RenderImage::paintObject):
* khtml/rendering/render_inline.cpp:
(RenderInline::paintObject):
* khtml/rendering/render_layer.cpp:
(RenderLayer::paintLayer):
* khtml/rendering/render_object.h:
2003-10-30 Maciej Stachowiak <mjs@apple.com>
Fixed Dave's fix to my fix to my fix:
* khtml/html/html_imageimpl.cpp:
(HTMLImageElementImpl::width): Put back m_render check, consider
the case of image with no width/height attributes and display:none
set. We don't want to crash on that.
(HTMLImageElementImpl::height): Ditto.
2003-10-30 Ken Kocienda <kocienda@apple.com>
Reviewed by Hyatt
Support for tabbing to links.
Fixes these bugs
<rdar://problem/3468395>: fix full keyboard access loop for buttons
<rdar://problem/3468397>: paint aqua focus rings around text links
<rdar://problem/3468406>: focused links do not activate by hitting
return key
<rdar://problem/3468410>: paintTextOutline in RenderText objects
should be done at a higher level
<rdar://problem/3468424>: improve function to determine if a node is
tab selectable
<rdar://problem/3468427>: add bridge function to access active
document view for a node
<rdar://problem/3468429>: links do not scroll into view when focusing
<rdar://problem/3468435>: when tabbing out of a frame, last focused
node is not cleared if it is a text link
<rdar://problem/3468436>: focus on text link does not clear when
clicking mouse in document body
<rdar://problem/3468440>: add setRect convenience to QRect
<rdar://problem/3468444>: elements paint their outlines even if they
are not visible
<rdar://problem/3468448>: setting focus on a node sets focus on all
its siblings
<rdar://problem/3468456>: cannot tab to form image input elements
<rdar://problem/3468461>: tab focus can seem to disappear from view on
pages with dhtml menus
<rdar://problem/3469021>: webcore bridge nextKeyView always starts
from the beginning of the document
* WebCore-combined.exp: Export WebCoreGraphicsBridge class
* WebCore.exp: Ditto
* WebCore.pbproj/project.pbxproj: Add WebCoreGraphicsBridge class
* khtml/css/cssparser.cpp:
(CSSParser::parseValue): border style check now take apple aqua
style into account
* khtml/css/cssvalues.in: Add -apple-aqua border value
* khtml/css/html4.css: Change focus, a:link:active, and a:visited:active
to use new -apple-aqua focus rings.
* khtml/html/html_formimpl.cpp:
(HTMLGenericFormElementImpl::isSelectable): Improve function so
that invisible elements are no longer considered selectable
* khtml/html/html_inlineimpl.cpp:
(HTMLAnchorElementImpl::isSelectable): Ditto.
(HTMLAnchorElementImpl::defaultEventHandler): Make return key
activate links as well as Enter.
* khtml/html/html_inlineimpl.h: Move isSelectable function into
implementation file.
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::paintObject): Do not paint outlines if
content is invisible.
* khtml/rendering/render_flow.cpp:
(RenderFlow::getAbsoluteRepaintRect): Improve function to correctly
calculate repaint rects including outlines.
* khtml/rendering/render_image.cpp:
(RenderImage::paintObject): Do not paint outlines if
content is invisible.
* khtml/rendering/render_inline.cpp:
(RenderInline::paintObject): Ditto.
(RenderInline::addFocusRingRects): New function to gather up rects
to use for painting outlines.
(RenderInline::paintOutline): Added code to paint aqua focus rings.
* khtml/rendering/render_inline.h:
* khtml/rendering/render_object.cpp:
(RenderObject::drawBorder): Add case for apple aqua border style.
(RenderObject::addFocusRingRects): New function to gather up rects
to use for painting outlines.
(RenderObject::paintOutline): Added code to paint aqua focus rings.
(RenderObject::getAbsoluteRepaintRectWithOutline): Helper function
to calculate rectangle to use for repainting when an object has an
outline.
* khtml/rendering/render_object.h: Add addFocusRingRects declaration.
* khtml/rendering/render_style.h: Add APPLEAQUA to border enum
* khtml/rendering/render_text.cpp:
(RenderText::paintObject): Removed code to draw outlines.
* khtml/rendering/render_text.h: Ditto.
* khtml/xml/dom_elementimpl.cpp: Removed redundant isSelectable check.
* khtml/xml/dom_elementimpl.h: Ditto.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::isSelectable): Added.
(NodeBaseImpl::setFocus): Do not set focus on siblings.
* khtml/xml/dom_nodeimpl.h: Moved implementation to .cpp file.
* kwq/KWQButton.mm:
(-[KWQButton nextKeyView]): Send a blur before going to next
key view. This prevents focus from being lost altogether.
(-[KWQButton previousKeyView]): Ditto.
* kwq/KWQKHTMLPart.h: Added documentViewForNode function.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::nextKeyViewInFrame): Add check for other focusables,
like text links.
(KWQKHTMLPart::nextKeyViewInFrameHierarchy): Remove focus when leaving
a view.
(KWQKHTMLPart::documentViewForNode): Added.
(KWQKHTMLPart::khtmlMousePressEvent): Remove focus when you click in
a non-focusable area, like the document body.
* kwq/KWQPainter.h: Added declarations.
* kwq/KWQPainter.mm:
(QPainterPrivate::QPainterPrivate): Modified constructor for new fields.
(QPainter::initFocusRing): Added.
(QPainter::addFocusRingRect): Added.
(QPainter::drawFocusRing): Added.
(QPainter::clearFocusRing): Added.
* kwq/KWQRect.h:
(QRect::setRect): Added.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge nextKeyView]): Start from the currently-focused node,
if there is one, not unconditionally from the start of the document.
(-[WebCoreBridge previousKeyView]): Ditto
* kwq/WebCoreGraphicsBridge.h: Added.
* kwq/WebCoreGraphicsBridge.m: Added.
(+[WebCoreGraphicsBridge sharedBridge]): Added.
(-[WebCoreGraphicsBridge init]): Added.
(-[WebCoreGraphicsBridge setFocusRingStyle:radius:color:]): Added.
2003-10-30 Maciej Stachowiak <mjs@apple.com>
Fix mistake in my last change that I did not mean to commit.
* khtml/html/html_imageimpl.cpp:
(HTMLImageElementImpl::width): Remove extraneous second attempt to
lay out.
2003-10-30 David Hyatt <hyatt@apple.com>
Put paged-media changes back without the wrongful removal of the style data copy constructors (which
were necessary after all).
* ChangeLog:
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/rendering/render_style.cpp:
(StyleInheritedData::StyleInheritedData):
(StyleInheritedData::operator==):
* khtml/rendering/render_style.h:
(khtml::):
(khtml::RenderStyle::NonInheritedFlags::operator==):
(khtml::RenderStyle::setBitDefaults):
(khtml::RenderStyle::widows):
(khtml::RenderStyle::orphans):
(khtml::RenderStyle::pageBreakInside):
(khtml::RenderStyle::pageBreakBefore):
(khtml::RenderStyle::pageBreakAfter):
(khtml::RenderStyle::setWidows):
(khtml::RenderStyle::setOrphans):
(khtml::RenderStyle::setPageBreakInside):
(khtml::RenderStyle::setPageBreakBefore):
(khtml::RenderStyle::setPageBreakAfter):
2003-10-30 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3468129 - REGRESSION: FOUC occurs on Surfin' Safari
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::getValueProperty): Don't force layout for image
width/height if you can determine it statically from the attribute.
* khtml/html/html_image.cpp:
(HTMLImageElementImpl::width):
(HTMLImageElementImpl::height):
=== Safari-112 ===
2003-10-30 Ken Kocienda <kocienda@apple.com>
Rolling out this code since it caused a big performance
regression.
2003-10-29 David Hyatt <hyatt@apple.com>
Add the paged media properties to RenderStyle.
They aren't used yet, but they should now be
parsed and interpreted correctly.
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/rendering/render_style.cpp:
(StyleSurroundData::StyleSurroundData):
(StyleBoxData::StyleBoxData):
(StyleBoxData::operator==):
(StyleVisualData::~StyleVisualData):
(StyleVisualData::StyleVisualData):
(StyleBackgroundData::StyleBackgroundData):
(StyleFlexibleBoxData::StyleFlexibleBoxData):
(opacity):
(textShadow):
(StyleInheritedData::StyleInheritedData):
(StyleInheritedData::~StyleInheritedData):
(StyleInheritedData::operator==):
* khtml/rendering/render_style.h:
(khtml::StyleBackgroundData::~StyleBackgroundData):
(khtml::StyleFlexibleBoxData::~StyleFlexibleBoxData):
(khtml::RenderStyle::NonInheritedFlags::operator==):
(khtml::RenderStyle::setBitDefaults):
2003-10-29 David Hyatt <hyatt@apple.com>
Fix for 3466628, widgets in overflow blocks don't move when the overflow block is scrolled. This
was a regression caused by my change to move widgets only during layout and not at paint time. The
problem with this is that scrolling an overflow block doesn't do a layout, just a repaint. I patched
the layer code to update widget positions on an overflow block scroll.
This then exposed a bug in absolutePosition, namely that the scroll offset was never factored in when
computing absolutePosition. This bug also explains why text selection and cursor display were wrong
inside scrolled overflow blocks.
Reviewed by mjs
* khtml/rendering/render_box.cpp:
(RenderBox::absolutePosition):
* khtml/rendering/render_layer.cpp:
(RenderLayer::scrollToOffset):
* khtml/rendering/render_object.cpp:
(RenderObject::absolutePosition):
* khtml/rendering/render_text.cpp:
(RenderText::cursorPos):
(RenderText::posOfChar):
* khtml/rendering/render_text.h:
2003-10-29 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave.
- fixed 3467499 - REGRESSION: onClick handlers on links don't work (bubbling broken)
* khtml/xml/dom2_eventsimpl.cpp:
(EventImpl::EventImpl): Initialize m_cancelBubble (duh).
2003-10-29 David Hyatt <hyatt@apple.com>
Fix for 3466802. When breaking on a newline, "pre" is determined by checking the actual object that
the line broke on, and not by simply checking the "pre" status of the containing block.
Reviewed by mjs
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::layoutInlineChildren):
2003-10-29 David Hyatt <hyatt@apple.com>
Add the paged media properties to RenderStyle. They aren't used yet, but they should now be
parsed and interpreted correctly.
Reviewed by kocienda
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/rendering/render_style.cpp:
(StyleBoxData::operator==):
(StyleFlexibleBoxData::StyleFlexibleBoxData):
(:opacity):
(:textShadow):
(StyleInheritedData::StyleInheritedData):
(StyleInheritedData::operator==):
* khtml/rendering/render_style.h:
(khtml::):
(khtml::RenderStyle::NonInheritedFlags::operator==):
(khtml::RenderStyle::setBitDefaults):
(khtml::RenderStyle::widows):
(khtml::RenderStyle::orphans):
(khtml::RenderStyle::pageBreakInside):
(khtml::RenderStyle::pageBreakBefore):
(khtml::RenderStyle::pageBreakAfter):
(khtml::RenderStyle::setWidows):
(khtml::RenderStyle::setOrphans):
(khtml::RenderStyle::setPageBreakInside):
(khtml::RenderStyle::setPageBreakBefore):
(khtml::RenderStyle::setPageBreakAfter):
2003-10-29 David Hyatt <hyatt@apple.com>
Reviewed by NOBODY (OOPS!).
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::applyRule):
* khtml/rendering/render_style.cpp:
(StyleBoxData::operator==):
(StyleFlexibleBoxData::StyleFlexibleBoxData):
(:opacity):
(:textShadow):
(StyleInheritedData::StyleInheritedData):
(StyleInheritedData::operator==):
* khtml/rendering/render_style.h:
(khtml::):
(khtml::RenderStyle::NonInheritedFlags::operator==):
(khtml::RenderStyle::setBitDefaults):
(khtml::RenderStyle::widows):
(khtml::RenderStyle::orphans):
(khtml::RenderStyle::pageBreakInside):
(khtml::RenderStyle::pageBreakBefore):
(khtml::RenderStyle::pageBreakAfter):
(khtml::RenderStyle::setWidows):
(khtml::RenderStyle::setOrphans):
(khtml::RenderStyle::setPageBreakInside):
(khtml::RenderStyle::setPageBreakBefore):
(khtml::RenderStyle::setPageBreakAfter):
2003-10-29 David Hyatt <hyatt@apple.com>
Refine the fix to updateLayout.
updateStyleSelector would get called over and over again when you queried for layout properties from
JS. If no stylesheets are pending, this isn't necessary (and is quite expensive, since updateStyleSelector
is a slow function).
Reviewed by darin
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::updateLayout):
2003-10-29 David Hyatt <hyatt@apple.com>
Fix crasher in border collapsing code.
Reviewed by kocienda
* khtml/rendering/render_table.cpp:
(RenderTable::cellRight):
2003-10-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3163842 - Citibank cardmember central DHTML menus not working right in Safari
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::getValueProperty): update layout before fetching image properties
that need it.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl): Initialize m_ignorePendingStylesheets to false.
(DocumentImpl::updateLayout): Ignore pending stylesheets - when JS demands a
layout, it wants a real one now.
(DocumentImpl::updateStyleSelector): Go ahead with the update if we're ignoring
pending stylesheets.
* khtml/xml/dom_docimpl.h:
(DOM::DocumentImpl::haveStylesheetsLoaded): Pretend stylesheets have loaded if
we're temporarily ignoring pending stylesheets.
2003-10-29 David Hyatt <hyatt@apple.com>
Implement support for <marquee>. This includes support for the CSS3 specification (although modified a fair
bit to actually be compatible with WinIE's version and to correct obvious errors in the draft). All of the
marquee behaviors (slide, scroll, and alternate) are supported.
This patch also fixes the following bugs that were discovered while testing marquee:
(1) An error in the computation of scrollWidth and scrollHeight.
(2) The ability to ask for the leftmostPosition as well as the rightmostPosition of content and to
be able to ask for the positions of children (via left/right/lowest) without including the parent in the
computation.
(3) An optimization to RenderFlow's rightmost/lowestPosition functions to avoid examining text elements since
they are always fully accounted for by either overflow or by inline flow boxes.
(4) A fix for RTL rendering. A block with direction:RTL was being placed on the right, when in reality only
its children should be placed on the right.
(5) A fix to prevent inline blocks and tables from computing auto margins (making them just like floats in this
regard).
Reviewed by darin
* khtml/css/cssparser.cpp:
(validUnit):
(CSSParser::parseValue):
* khtml/css/cssproperties.c:
(hash_prop):
(findProp):
* khtml/css/cssproperties.h:
* khtml/css/cssproperties.in:
* khtml/css/cssstyleselector.cpp:
(khtml::convertToLength):
(khtml::CSSStyleSelector::applyRule):
* khtml/css/cssvalues.c:
(hash_val):
(findValue):
* khtml/css/cssvalues.h:
* khtml/css/cssvalues.in:
* khtml/css/html4.css:
* khtml/html/html_blockimpl.cpp:
(HTMLMarqueeElementImpl::HTMLMarqueeElementImpl):
(HTMLMarqueeElementImpl::id):
(HTMLMarqueeElementImpl::parseAttribute):
* khtml/html/html_blockimpl.h:
(DOM::HTMLMarqueeElementImpl::minimumDelay):
* khtml/html/htmlparser.cpp:
(KHTMLParser::getElement):
* khtml/misc/htmlattrs.c:
(hash_attr):
(findAttr):
* khtml/misc/htmlattrs.h:
* khtml/misc/htmlattrs.in:
* khtml/rendering/bidi.cpp:
(khtml::RenderBlock::findNextLineBreak):
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::lowestPosition):
(khtml::RenderBlock::rightmostPosition):
(khtml::RenderBlock::leftmostPosition):
* khtml/rendering/render_block.h:
* khtml/rendering/render_box.cpp:
(RenderBox::setStyle):
(RenderBox::calcWidth):
(RenderBox::calcHorizontalMargins):
(RenderBox::lowestPosition):
(RenderBox::rightmostPosition):
(RenderBox::leftmostPosition):
* khtml/rendering/render_box.h:
* khtml/rendering/render_flow.cpp:
(RenderFlow::lowestPosition):
(RenderFlow::rightmostPosition):
(RenderFlow::leftmostPosition):
* khtml/rendering/render_flow.h:
* khtml/rendering/render_layer.cpp:
(RenderLayer::RenderLayer):
(RenderLayer::~RenderLayer):
(RenderLayer::updateLayerPositions):
(RenderLayer::scrollToOffset):
(RenderLayer::computeScrollDimensions):
(RenderLayer::styleChanged):
(RenderLayer::stopMarquees):
(m_whiteSpace):
(Marquee::marqueeSpeed):
(Marquee::direction):
(Marquee::isHorizontal):
(Marquee::computePosition):
(Marquee::start):
(Marquee::stop):
(Marquee::updateMarqueePosition):
(Marquee::updateMarqueeStyle):
(Marquee::timerEvent):
* khtml/rendering/render_layer.h:
(khtml::):
(khtml::RenderLayer::marquee):
* khtml/rendering/render_object.cpp:
(RenderObject::isHTMLMarquee):
(RenderObject::sizesToMaxWidth):
* khtml/rendering/render_object.h:
(khtml::RenderObject::lowestPosition):
(khtml::RenderObject::rightmostPosition):
(khtml::RenderObject::leftmostPosition):
* khtml/rendering/render_style.cpp:
(StyleMarqueeData::StyleMarqueeData):
(StyleMarqueeData::operator==):
(opacity):
(marquee):
(StyleCSS3NonInheritedData::operator==):
(RenderStyle::RenderStyle):
* khtml/rendering/render_style.h:
(khtml::):
(khtml::StyleMarqueeData::operator!=):
(khtml::RenderStyle::marqueeIncrement):
(khtml::RenderStyle::marqueeSpeed):
(khtml::RenderStyle::marqueeLoopCount):
(khtml::RenderStyle::marqueeBehavior):
(khtml::RenderStyle::marqueeDirection):
(khtml::RenderStyle::setMarqueeIncrement):
(khtml::RenderStyle::setMarqueeSpeed):
(khtml::RenderStyle::setMarqueeDirection):
(khtml::RenderStyle::setMarqueeBehavior):
(khtml::RenderStyle::setMarqueeLoopCount):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::createHTMLElement):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::clearTimers):
2003-10-29 David Hyatt <hyatt@apple.com>
Make <button> be an inline-block.
* khtml/css/html4.css:
2003-10-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3465547 - REGRESSION (100-111)?: window.prompt does not work
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::runJavaScriptPrompt): Return the result properly
instead of always returning false.
2003-10-28 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3465504 -- REGRESSION (100-111): text areas with Chinese text in them are wider than ones without
* kwq/KWQTextArea.h: Add _font field.
* kwq/KWQTextArea.mm:
(-[KWQTextArea dealloc]): Release _font.
(-[KWQTextArea setFont:]): Store font in _font as well as setting it in the text view.
(-[KWQTextArea sizeWithColumns:rows:]): Use _font rather than asking the text view for the font.
2003-10-28 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3464702 -- node.item(x) is not implemented (dynamic menus not filled out at techcu.com)
* khtml/ecma/kjs_dom.cpp: (DOMNodeProtoFunc::tryCall): Add implementation of item function.
* khtml/ecma/kjs_dom.h: Added Item to the enum.
* khtml/ecma/kjs_dom.lut.h: Regenerated.
2003-10-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by Dave,
- fixed 3379725 - for <a> elements with both onclick and href, Web Kit's behavior does not match other browsers
The fix for this was to make cancelBubble only prevent bubbling,
but not stop propagation or prevent default. While I was at it, I
made returnValue work right too.
* khtml/ecma/kjs_events.cpp:
(DOMEvent::getValueProperty): Implement cancelBubble and returnValue properties properly.
(DOMEvent::putValue): Ditto.
* khtml/dom/dom2_events.cpp:
(Event::setCancelBubble): Call impl.
(Event::setDefaultPrevented): Ditto.
(Event::getCancelBubble): Ditto.
(Event::defaultPrevented): Ditto.
* khtml/dom/dom2_events.h:
* khtml/xml/dom2_eventsimpl.h:
(DOM::EventImpl::propagationStopped): Made this a const method.
(DOM::EventImpl::defaultPrevented): Ditto.
(DOM::EventImpl::setCancelBubble): Implemented by setting a new field.
(DOM::EventImpl::getCancelBubble): Corresponding getter.
(DOM::EventImpl::setDefaultPrevented): Set the already existing field for this.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::dispatchGenericEvent): Check getCancelBubble() when bubbling. Do not
check bubbles() before default handling.
2003-10-28 Chris Blumenberg <cblu@apple.com>
Fixed: <rdar://problem/3464472>: REGRESSION: New CSS cursor support breaks style="cursor:default
Reviewed by dave.
* kwq/KWQWidget.mm:
(QWidget::cursor): break after we hit a view that responds to documentCursor as we do in setCursor. Without breaking we were returning the cursor of the most super HTML view which is not what we want.
2003-10-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3421393 - window.open does not handle non-integral height/width (small window at saabusa.com)
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall): Parse width, height, top and left as
floating point and then cast to int instead of parsing as int to
match other browsers and avoid rejecting floating point numbers.
2003-10-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3464528 - addEventListener does not work for buttons, text areas, or inputs
* khtml/rendering/render_form.cpp:
(RenderFormElement::slotClicked): Send CLICK_EVENT as well as one
of KHTML_CLICK_EVENT or KHTML_DOUBLE_CLICK_EVENT.
2003-10-28 Maciej Stachowiak <mjs@apple.com>
Fixed broken build.
* kwq/KWQKPartsPart.mm:
(KParts::ReadOnlyPart::setName): It's a ReadOnlyPart method, not a Part method.
2003-10-28 Maciej Stachowiak <mjs@apple.com>
Reviewed by John.
- fixed 3427046 - href and src attributes don't always give resolved URL
It turns out that all href and src attributes should be resolved
against the base, except for frame elements.
* khtml/dom/html_base.cpp:
(HTMLIFrameElement::src): Resolve against base URL.
* khtml/dom/html_form.cpp:
(HTMLInputElement::src): Resolve URL even when empty. Remove
comment questioning resolution against base - it's definitely
right.
* khtml/dom/html_head.cpp:
(HTMLBaseElement::href): Resolve against base URL.
(HTMLLinkElement::href): Ditto.
(HTMLScriptElement::src): Ditto.
* khtml/dom/html_image.cpp:
(HTMLAreaElement::href): Ditto.
(HTMLImageElement::src): Resolve URL even when empty. Remove
comment questioning resolution against base - it's definitely
right.
* khtml/dom/html_inline.cpp:
(HTMLAnchorElement::href): Resolve against base URL.
2003-10-27 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3083264 - frame names changed by JavaScript are not reflected in WebFrame at the WebKit level
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setName): Make sure the name is unique. Then tell
the bridge and the superclass about it.
* kwq/KWQKPartsPart.h:
(KParts::ReadOnlyPart::setName): Made this method virtual.
* kwq/KWQKPartsPart.m: Added. Moved implementations of virtual methods here.
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge setName:]): Call the superclass method to avid
sending the name pointlessly back across the bridge.
2003-10-28 Darin Adler <darin@apple.com>
Reviewed by John.
- fixed 3465063 -- REGRESSION (107-108): hang when fetching a page with an ad in a subframe (theage.com.au)
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::openURL): Follow the parent chain properly rather
than repeatedly getting the part's own parent!
2003-10-27 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
Improved exception blocking in the following ways:
- use C++ constructors and destructors so returning or breaking out of an exception block works
- Remove use of volatile
- Collapse the caught exception case into a single function call to reduce code size.
* WebCore.pbproj/project.pbxproj:
* kwq/KWQButton.mm:
* kwq/KWQCheckBox.mm:
* kwq/KWQComboBox.mm:
* kwq/KWQExceptions.h:
* kwq/KWQExceptions.mm: Added.
* kwq/KWQFileButton.mm:
* kwq/KWQFont.mm:
* kwq/KWQFrame.mm:
* kwq/KWQKConfigBase.mm:
* kwq/KWQKCookieJar.mm:
* kwq/KWQKCursor.mm:
* kwq/KWQKHTMLPart.mm:
* kwq/KWQKHTMLPartBrowserExtension.mm:
* kwq/KWQKHistoryProvider.mm:
* kwq/KWQKJavaAppletWidget.mm:
* kwq/KWQKJobClasses.mm:
* kwq/KWQKLocale.mm:
* kwq/KWQKPartsBrowserInterface.mm:
* kwq/KWQLineEdit.mm:
* kwq/KWQListBox.mm:
* kwq/KWQLoader.mm:
* kwq/KWQPainter.mm:
* kwq/KWQPushButton.mm:
* kwq/KWQRadioButton.mm:
* kwq/KWQScrollBar.mm:
* kwq/KWQScrollView.mm:
* kwq/KWQTextEdit.mm:
* kwq/KWQWidget.mm:
2003-10-26 Darin Adler <darin@apple.com>
* khtml/khtml_part.cpp: (findWordBoundary): Fix small mistake from NULL check-in earlier.
2003-10-26 Darin Adler <darin@apple.com>
* kwq/KWQLoader.mm: (KWQResponseMIMEType): Removed an excess volatile.
2003-10-26 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3463624 -- page at cinemakorea.com shows up blank due to kTECBufferBelowMinimumSizeErr from TEC
* kwq/KWQTextCodec.mm: (KWQTextDecoder::convertOneChunkUsingTEC): To work around the bug
I found in the decoder (Radar 3351093), change kTECBufferBelowMinimumSizeErr to
kTECOutputBufferFullStatus in cases where bytes were actually converted.
2003-10-26 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3463586 -- WebCore does not compile with new definition of NULL
* khtml/khtml_part.cpp: (findWordBoundary): Changed NULL to 0 and did a little code
cleanup of the surrounding code.
* khtml/rendering/break_lines.cpp: (khtml::isBreakable): Changed NULL to 0 and did
a tiny bit of cleanup.
* WebCorePrefix.h: Add a definition of NULL here that takes advantage of the GNU
__null feature even if the system C library doesn't.
2003-10-26 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3457831 -- REGRESSION: copying particular text and pasting (plain) produces lots of extra text
* khtml/khtml_part.cpp: (KHTMLPart::text): Check for the end node when following a
link to the parent node, not just when following a link to the next child node.
* kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::attributedString): Ditto.
== Rolled over to ChangeLog-2003-10-25 ==