Timeline
Oct 11, 2004:
- 10:49 AM Changeset in webkit [7818] by
-
- 4 edits in trunk/WebCore
Reviewed by John
This is a partial fix to this bug:
<rdar://problem/3832886> increase quote level on new mail document leads to immediate
crash in caret painting code
To eliminate the bad behavior for good, I have done some investigations in Mail code,
and I have sent a suggested code change on to Grant. Basically, Mail can't add empty
blocks (like blockquote elements used for quoting) to documents without giving those
blocks some content (so they have a height).
I added some other crash protections below.
- khtml/editing/selection.cpp: (khtml::Selection::layout): Check for non-null position after calls to VisiblePosition, since the VisiblePosition constructors may fail to find a visible spot in the document. Also, add a couple position-has-renderer assertion checks.
- kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::styleForSelectionStart): Take out pos.isNotNull() assertion since VisiblePosition may not yield a position. This assertion is a holdover from before we had VisiblePosition. (KWQKHTMLPart::fontForSelection): Rearrange the code a little to deal with possible null results from calls to helpers.
- 10:34 AM Changeset in webkit [7817] by
-
- 2 edits in trunk/WebCore
Reviewed by John.
- fixed <rdar://problem/3834230> empty table can result in division by 0
- khtml/rendering/render_table.cpp: (RenderTableSection::layoutRows): Added 0 check; rolled in from KDE.
- 10:20 AM Changeset in webkit [7816] by
-
- 2 edits in trunk/WebKit
Fixed: <rdar://problem/3802039> 8A259: Can't use Grab services to grab selection from screen
Reviewed by john.
- WebView.subproj/WebHTMLView.m: (+[WebHTMLView initialize]): register service "return types" which are types that can be inserted into a WebView (-[WebHTMLView writeSelectionToPasteboard:types:]): service protocol method, be sure to only write specified types (-[WebHTMLView readSelectionFromPasteboard:]): new, service protocol method, insert types (-[WebHTMLView validRequestorForSendType:returnType:]): moved, handle return types
- 10:13 AM Changeset in webkit [7815] by
-
- 2 adds in trunk/LayoutTests/fast/forms
Added layout test for <input> value bug I just fixed.
- 10:10 AM Changeset in webkit [7814] by
-
- 3 edits in trunk/WebCore
Reviewed by John.
- fixed <rdar://problem/3818712> form checkbox value property is read only
The underlying problem was that we were storing two separate values for all
form elements; one for the value property (JavaScript) and the other for the
value attribute (DOM). This is a good idea for text input, but not for other types.
- khtml/html/html_formimpl.h: Changed setValue to take a const DOMString reference. Added private storesValueSeparateFromAttribute function.
- khtml/html/html_formimpl.cpp: (DOM::HTMLInputElementImpl::setType): Handle type changes, including detaching and re-attaching if type changed, and moving value from m_value to ATTR_VALUE and vice versa. (DOM::HTMLInputElementImpl::type): Added a case for ISINDEX and moved the default out of the switch so that we will get a warning if a type is left out. (DOM::HTMLInputElementImpl::parseHTMLAttribute): Tweaked comment format. (DOM::HTMLInputElementImpl::reset): Changed to only nuke the value if the value property is stored separately from the attribute. Otherwise, we just want to lave it alone (DOM::HTMLInputElementImpl::value): Changed to always use m_value if it's not null, then fall back on the attribute, and finally fall back to the "on" for the checkbox only if both are null. (DOM::HTMLInputElementImpl::setValue): Changed to set the attribute unless the value property is supposed to be stored separate from the attribute. (DOM::HTMLInputElementImpl::storesValueSeparateFromAttribute): Added. Returns true for text-type input elements, and false for the others.
- 9:38 AM Changeset in webkit [7813] by
-
- 2 edits in trunk/WebKit
Reviewed by John.
- fixed <rdar://problem/3834130> nil-object-in-dictionary exception seen in -[WebView _elementAtWindowPoint:]
- WebView.subproj/WebView.m: (-[WebView _elementAtWindowPoint:]): Added a check for nil frame.
- 9:34 AM Changeset in webkit [7812] by
-
- 2 edits in trunk/WebCore
Reviewed by John.
- fixed <rdar://problem/3296652> checkbox input type does not respond to onchange
- khtml/rendering/render_form.cpp: (RenderFormElement::updateFromElement): Some new code, commented out, for form element colors. (RenderCheckBox::slotStateChanged): Added call to onChange.
- 9:28 AM Changeset in webkit [7811] by
-
- 2 edits in trunk/WebKit
Reviewed by John.
- fixed <rdar://problem/3834166> <input type=file> sends onchange even when the same file is chosen twice
- WebCoreSupport.subproj/WebFileButton.m: (-[WebFileButton chooseFilename:]): Do nothing if filename is the same as before.
- 9:04 AM Changeset in webkit [7810] by
-
- 35 edits in trunk
WebCore:
Reviewed by Darin
Finish selection affinity implementation. This includes code to set the
affinity correctly when clicking with the mouse, and clearing the
affinity when altering the selection using any of the Selection object
mutation functions.
Each instance of the positionForCoordinates, inlineBox and caretRect
functions have been changed to include an EAffinity argument to give results
which take this bit into account.
- khtml/editing/selection.cpp: (khtml::Selection::init): Default affinity is now UPSTREAM, to match AppKit. (khtml::Selection::modifyAffinity): New function to compute affinity based on modification constants. (khtml::Selection::moveTo): Reset affinity to UPSTREAM. (khtml::Selection::modifyExtendingRightForward): Ditto. (khtml::Selection::modifyMovingRightForward): Ditto. (khtml::Selection::modifyExtendingLeftBackward): Ditto. (khtml::Selection::modifyMovingLeftBackward): Ditto. (khtml::Selection::modify): Support saving, restoring, and then calculating new affinity value as needed. (khtml::Selection::xPosForVerticalArrowNavigation): (khtml::Selection::clear): Reset affinity to UPSTREAM. (khtml::Selection::setBase): Ditto. (khtml::Selection::setExtent): Ditto. (khtml::Selection::setBaseAndExtent): Ditto. (khtml::Selection::layout): Pass affinity to caretRect(). (khtml::Selection::validate): Pass along affinity parameter to new functions that require it. (khtml::startOfFirstRunAt): Changed the way that the y-coordinate search is done, to keep this code working with changes made in selectionForLine(). (khtml::endOfLastRunAt): Ditto. (khtml::selectionForLine): Make this function work for all renderers, not just text renderers.
- khtml/editing/selection.h: (khtml::operator==): Consider affinity in equality check.
- khtml/editing/visible_units.cpp: (khtml::previousLinePosition): Pass affinity argument to function so it can take this information into account while processing. (khtml::nextLinePosition): Ditto. (khtml::previousParagraphPosition): Ditto. (khtml::nextParagraphPosition): Ditto.
- khtml/editing/visible_units.h: Ditto, for each of the functions listed.
- khtml/khtml_events.cpp: (khtml::MouseEvent::offset): Rework code to remove dependence on NodeImpl::positionForCoordinates, as this function is being removed.
- khtml/khtml_part.cpp: (KHTMLPart::isPointInsideSelection): Ditto. (KHTMLPart::selectClosestWordFromMouseEvent): Ditto. (KHTMLPart::handleMousePressEventTripleClick): Ditto. (KHTMLPart::handleMousePressEventSingleClick): Ditto. Plus, pass affinity argument in call to positionForCoordinates, and set resulting affinity on the selection. (KHTMLPart::handleMouseMoveEventSelection): Rework code to remove dependence on NodeImpl::positionForCoordinates, as this function is being removed. (KHTMLPart::khtmlMouseReleaseEvent): Ditto.
- khtml/rendering/render_block.cpp: (khtml::RenderBlock::positionForCoordinates): Now takes an affinity argument.
- khtml/rendering/render_block.h:
- khtml/rendering/render_box.cpp: (RenderBox::caretRect): Ditto.
- khtml/rendering/render_box.h:
- khtml/rendering/render_br.cpp: (RenderBR::positionForCoordinates): Ditto. (RenderBR::caretRect): Ditto. (RenderBR::inlineBox): Ditto.
- khtml/rendering/render_br.h:
- khtml/rendering/render_container.cpp: (RenderContainer::positionForCoordinates): Ditto.
- khtml/rendering/render_container.h:
- khtml/rendering/render_flow.cpp: (RenderFlow::caretRect): Ditto.
- khtml/rendering/render_flow.h:
- khtml/rendering/render_inline.cpp: (RenderInline::positionForCoordinates): Ditto.
- khtml/rendering/render_inline.h:
- khtml/rendering/render_object.cpp: (RenderObject::caretRect): Ditto. (RenderObject::positionForCoordinates): Ditto. (RenderObject::inlineBox): Ditto.
- khtml/rendering/render_object.h:
- khtml/rendering/render_replaced.cpp: (RenderReplaced::positionForCoordinates): Ditto.
- khtml/rendering/render_replaced.h:
- khtml/rendering/render_text.cpp: (RenderText::positionForCoordinates): Ditto. (firstRendererOnNextLine): New helper used by caretRect(). (RenderText::caretRect): Now takes an affinity argument. (RenderText::inlineBox): Ditto.
- khtml/rendering/render_text.h:
- khtml/xml/dom_nodeimpl.cpp: Remove positionForCoordinates helper.
- khtml/xml/dom_nodeimpl.h: Ditto.
- khtml/xml/dom_position.cpp: (DOM::Position::previousLinePosition): Now takes an affinity argument. (DOM::Position::nextLinePosition): Ditto.
- khtml/xml/dom_position.h:
- kwq/WebCoreBridge.h:
- kwq/WebCoreBridge.mm: (-[WebCoreBridge caretRectAtNode:offset:affinity:]): Ditto. (-[WebCoreBridge setSelectedDOMRange:affinity:]): Ditto. (-[WebCoreBridge _positionForPoint:]): Rework code to remove dependence on NodeImpl::positionForCoordinates, as this function is being removed.
WebKit:
Reviewed by Darin
- WebView.subproj/WebHTMLView.m: (-[WebTextCompleteController doCompletion]): bridge call to get caret rect at a node now takes an affinity: caretRectAtNode:offset:affinity:.
- 8:17 AM Changeset in webkit [7809] by
-
- 2 edits in trunk/WebCore
Reviewed by Ken.
- fixed <rdar://problem/3670280> scroll position on overflowed textareas resets when leaving the tab
- kwq/KWQTextArea.mm: (-[KWQTextAreaTextView becomeFirstResponder]): Scroll to reveal the text area, don't scroll to reveal the text view itself. Scrolling the text view ended up putting it at the top left, regardless of where the insertion point is.
- 8:08 AM Changeset in webkit [7808] by
-
- 2 edits in trunk/WebCore
Reviewed by Ken.
- fixed <rdar://problem/3831546> More text is copied than is visually selected
The bug here is that upstream was moving a position too far.
- khtml/xml/dom_position.cpp: (DOM::Position::upstream): Use the "deep equivalent" node rather than the original node passed in for various checks. Also use local variables a bit more for slightly more efficiency. (DOM::Position::downstream): Ditto.
- 7:58 AM Changeset in webkit [7807] by
-
- 1 edit in trunk/WebKit/ChangeLog
Removed stray conflict marker
- 7:57 AM Changeset in webkit [7806] by
-
- 2 edits in trunk/WebKit
Reviewed by Chris
Fix for this bug:
<rdar://problem/3814236> REGRESSION (Mail): Can't set the color of text in Mail compose window using drag/drag from color panel
- WebView.subproj/WebHTMLView.m: (+[WebHTMLView _insertablePasteboardTypes]): Add NSColorPboardType to list. (-[WebHTMLView _isNSColorDrag:]): New helper. Determines if drag is an NSColor drag. (-[WebHTMLView draggingUpdatedWithDraggingInfo:actionMask:]): Add a case for NSColor drags, else do what we did before. (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): Add a case for NSColor drags, which creates a CSS style containing color info and calls the bridge to apply the style. Otherwise, do what we did before.
- 7:55 AM Changeset in webkit [7805] by
-
- 3 edits in trunk/WebCore
Reviewed by Ken.
- fixed <rdar://problem/3833841> adding an event listener for keypress events does not work
- khtml/xml/dom2_eventsimpl.h: Added numEventIds and made typeToId take a const DOMString &.
- khtml/xml/dom2_eventsimpl.cpp: (EventImpl::typeToId): Changed to use table. Added "keypress", otherwise, the same as before. (EventImpl::idToType): Changed to use table.
- 7:51 AM Changeset in webkit [7804] by
-
- 2 edits in trunk/WebKit
Reviewed by Ken.
- fixed <rdar://problem/3833848> REGRESSION (133-134): each keydown event is getting sent multiple times
- WebView.subproj/WebHTMLView.m: (-[WebHTMLView performKeyEquivalent:]): Don't send an event through WebCore if it has already been through once.
Oct 10, 2004:
- 8:14 AM Changeset in webkit [7803] by
-
- 3 edits in trunk/WebKit
Reviewed by Ken.
- fixed <rdar://problem/3777253> Crash in redirect mechanism trying to display error page for bad scheme
- WebView.subproj/WebMainResourceClient.m: (-[WebMainResourceClient connection:willSendRequest:redirectResponse:]): add retain/autorelease to the request returned from call to super. In this case, the return value was being dealloc'ed before being returned.
- 8:13 AM Changeset in webkit [7802] by
-
- 2 edits in trunk/WebCore
- fixed <rdar://problem/3664375> repro crash in -[KWQAccObject accessibilityAttributeNames]
(-[KWQAccObject accessibilityActionNames]):
check for nil m_renderer