blob: f0d8649d23a848bae0464399f8fb92b372ecfcc5 [file] [log] [blame]
2006-01-07 Eric Seidel <eseidel@apple.com>
Reviewed by mjs
Removed old, unneeded code.
* WebCore+SVG/DrawCanvasItem.h: Removed.
* WebCore+SVG/DrawCanvasItem.mm: Removed.
* WebCore+SVG/DrawCanvasItemPrivate.h: Removed.
* WebCore+SVG/DrawDocument.h: Removed.
* WebCore+SVG/DrawDocument.mm: Removed.
* WebCore+SVG/DrawDocumentPrivate.h: Removed.
* WebCore+SVG/DrawView.h: Removed.
* WebCore+SVG/DrawView.mm: Removed.
* WebCore+SVG/DrawViewPrivate.h: Removed.
* WebCore+SVG/NSSVGImageRep.h: Removed.
* WebCore+SVG/NSSVGImageRep.m: Removed.
* WebCore.xcodeproj/project.pbxproj: remove files
2006-01-07 Maciej Stachowiak <mjs@apple.com>
Reviewed by Eric.
- fixed WebCore build
http://bugzilla.opendarwin.org/show_bug.cgi?id=6404
* khtml/rendering/render_canvasimage.h: Remove unneeded extern declarations.
2006-01-07 Anders Carlsson <andersca@mac.com>
Reviewed by Maciej.
- Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6373
REGRESSION: JavaScript hang when comparing large array to null
* khtml/ecma/kjs_html.cpp:
Remove toPrimitive.
* khtml/ecma/kjs_html.h:
(KJS::HTMLAllCollection::isEqualToNull):
Implement isEqualToNull and have it return true.
2006-01-06 Eric Seidel <eseidel@apple.com>
Reviewed by darin.
<rdar://problem/4386652> Crash: SVG filter crash at w3schools.com
* kcanvas/device/quartz/KCanvasFilterQuartz.mm:
(KCanvasFEDiffuseLightingQuartz::getCIFilter): nil check
(KCanvasFESpecularLightingQuartz::getCIFilter): nil check
2006-01-06 Geoffrey Garen <ggaren@apple.com>
Patch by Mitz, reviwed by Darin, layout tested and landed by me.
- Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6382
REGRESSION: Repro crash when clicking link with target="_blank"
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setName):
* manual-tests/empty-link-target.html: Added.
2006-01-06 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5291
FORM multipart/form-data with GET method issue
Test cases:
* fast/forms/form-get-multipart.html
* fast/forms/form-get-multipart2.html
* fast/forms/form-get-multipart3.html
* fast/forms/form-post-urlencoded.html
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::submit):
Reset m_multipart to false if not posting.
(DOM::HTMLFormElementImpl::parseEnctype):
multipart/form-data doesn't imply POST method.
2006-01-06 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5792
Crasher on rendering-shapes from SVG 1.0 testsuite
Test case: fast/parser/entity-ignorable-whitespace.xhtml
* khtml/xml/xml_tokenizer.cpp:
(khtml::XMLTokenizer::finish): install an ignorableWhitespace callback to
work around a libxml2 bug
(khtml::ignorableWhitespaceHandler): no-op
2006-01-06 Anders Carlsson <andersca@mac.com>
Reviewed by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5142
parseXMLDocumentFragment can't parse fragments correctly
* khtml/xml/xml_tokenizer.cpp:
(khtml::balancedStartElementNsHandler):
(khtml::balancedEndElementNsHandler):
(khtml::balancedCharactersHandler):
(khtml::balancedProcessingInstructionHandler):
(khtml::balancedCdataBlockHandler):
(khtml::balancedCommentHandler):
(khtml::balancedWarningHandler):
Add handlers.
(khtml::parseXMLDocumentFragment):
Change back into using xmlParseBalancedChunkMemory.
2006-01-06 Alexander Kellett <lypanov@kde.org>
Reviewed by eseidel.
Basic support for <mask> tag.
http://bugzilla.opendarwin.org/show_bug.cgi?id=5969
Still missing attribute support for: maskUnits, maskContentUnits.
Mask pixel tests do not work in DumpRenderTree due to:
http://bugzilla.opendarwin.org/show_bug.cgi?id=6327
Added test cases anyway.
This also tickles a (known) gradient update issue:
http://bugzilla.opendarwin.org/show_bug.cgi?id=6052
* WebCore.xcodeproj/project.pbxproj: added Mask files
* kcanvas/KCanvasResources.cpp:
(KCanvasMasker::KCanvasMasker): added.
(KCanvasMasker::~KCanvasMasker): added.
(KCanvasMasker::setMask): added.
(KCanvasMasker::externalRepresentation): added.
(getMaskerById): added.
* kcanvas/KCanvasResources.h:
(KCanvasResource::isMasker): added.
(KCanvasMasker::isMasker): added.
(KCanvasMasker::mask): added.
* kcanvas/device/quartz/KCanvasItemQuartz.mm:
(KCanvasItemQuartz::paint): added mask support
* kcanvas/device/quartz/KCanvasMaskerQuartz.h: Added.
(KCanvasMaskerQuartz::KCanvasMaskerQuartz): added.
* kcanvas/device/quartz/KCanvasMaskerQuartz.mm: Added.
(applyLuminanceToAlphaFilter): added.
(applyExpandAlphatoGrayscaleFilter): added.
(transformImageIntoGrayscaleMask): added.
(KCanvasMaskerQuartz::applyMask): added.
* kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
(KCanvasContainerQuartz::paint): added mask support.
* kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
(KRenderingDeviceQuartz::createResource): added mask support.
* kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
(KRenderingPaintServerRadialGradientQuartz::draw):
* kcanvas/device/quartz/QuartzSupport.h:
* kcanvas/device/quartz/QuartzSupport.mm:
(debugDumpCGImageToFile): added, debug only.
(debugDumpCGLayerToFile): added, debug only.
(debugDumpCIImageToFile): added, debug only.
* ksvg2/css/SVGCSSStyleSelector.cpp:
(KDOM::CSSStyleSelector::applySVGProperty): added mask support.
* ksvg2/css/SVGRenderStyle.cpp:
(SVGRenderStyle::SVGRenderStyle): added mask support.
(SVGRenderStyle::operator==): added mask support.
* ksvg2/css/SVGRenderStyle.h:
* ksvg2/css/SVGRenderStyleDefs.cpp:
(StyleMaskData::StyleMaskData): added mask support.
(StyleMaskData::operator==): added mask support.
* ksvg2/css/SVGRenderStyleDefs.h:
(KSVG::StyleMaskData::operator!=): added mask support.
* ksvg2/ecma/Ecma.cpp:
(Ecma::inheritedGetDOMNode): added mask support.
* ksvg2/svg/SVGMaskElementImpl.cpp: Added.
(KSVG::SVGMaskElementImpl::SVGMaskElementImpl): added.
(KSVG::SVGMaskElementImpl::~SVGMaskElementImpl): added.
(KSVG::SVGMaskElementImpl::x): added.
(KSVG::SVGMaskElementImpl::y): added.
(KSVG::SVGMaskElementImpl::width): added.
(KSVG::SVGMaskElementImpl::height): added.
(KSVG::SVGMaskElementImpl::attributeChanged): added.
(KSVG::SVGMaskElementImpl::childrenChanged): added.
(KSVG::SVGMaskElementImpl::parseMappedAttribute): added.
(KSVG::SVGMaskElementImpl::drawMaskerContent): added.
(KSVG::SVGMaskElementImpl::createRenderer): added.
(KSVG::SVGMaskElementImpl::canvasResource): added.
* ksvg2/svg/SVGMaskElementImpl.h: Added.
(KSVG::SVGMaskElementImpl::isValid): added.
(KSVG::SVGMaskElementImpl::rendererIsNeeded): added.
* ksvg2/svg/svgtags.in: added <mask> support.
2006-01-04 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- move frame management and finding code from WebKit to WebCore
http://bugzilla.opendarwin.org/show_bug.cgi?id=6368
* WebCore.exp: export WebCoreFrameNamespace
* WebCore.xcodeproj/project.pbxproj: add new files
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setName): Don't call to bridge any more, not needed
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(isCaseSensitiveEqual): helper function
(-[WebCoreBridge appendChild:]): remove excess braces
(-[WebCoreBridge childFrameNamed:]): moved here from WebFrame
(-[WebCoreBridge _deepLastChildFrame]): ditto
(-[WebCoreBridge nextFrameWithWrap:]): ditto
(-[WebCoreBridge previousFrameWithWrap:]): ditto
(-[WebCoreBridge setFrameNamespace:]): ditto
(-[WebCoreBridge frameNamespace]): ditto
(-[WebCoreBridge _shouldAllowAccessFrom:]): ditto
(-[WebCoreBridge _descendantFrameNamed:sourceFrame:]): ditto
(-[WebCoreBridge _frameInAnyWindowNamed:sourceFrame:]): ditto
(-[WebCoreBridge findFrameNamed:]): ditto
(-[WebCoreBridge setName:]): don't call KHTMLPart setName directly,
the kwq version is fine
(-[WebCoreBridge _addFramePathToString:]): moved from WebFrame
(-[WebCoreBridge generateFrameName]): ditto
2006-01-04 Anders Carlsson <andersca@mac.com>
Reviewed by Eric.
Based on a patch by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6180
"text" output in fragment produced by XSLTProccessor is wrong (has xhtml garbage)
* khtml/xsl/xslt_processorimpl.cpp:
(DOM::xsltParamArrayFromParameterMap):
(DOM::freeXsltParamArray):
Use fastMalloc/fastFree.
(DOM::createFragmentFromSource):
If the output is "text", just create a text node and add
it to the fragment.
2006-01-04 Geoffrey Garen <ggaren@apple.com>
Reviewed by darin.
- Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6311
document.plugins doesn't exist
* khtml/ecma/kjs_html.cpp: Added 'plugins' as synonym for 'embeds'
2006-01-04 Geoffrey Garen <ggaren@apple.com>
Reviewed by darin.
- Fixed <rdar://problem/4214080> document.embeds: embeds[0].Play()
undefined at languageguide.org prevents audio playing on mouseover
- Layout test: fast/dom/object-embed-plugin-scripting.html
A common idiom the kids like to use these days for plugins is to nest
an <embed> inside an <object>, and assume that IE will honor the first,
Mozilla the second. We happen to honor both, but the rules dictate that
only the outer <object> gets a plugin/renderer. (A plugin is a
renderer.) This is a problem because sites ID us as Mozilla and
therefore attempt to script their plugins through the <embed>, which
has no plugin/renderer. The fix here is to have an <embed> return its
parent node's plugin/renderer when queried, if and only if it has no
renderer of its own and its parent node is an <object>. We may decide
to restrict this further in the future.
One happy consequence of this patch is that all the apple.com Quicktime
websites we had previously broken with TOT are now fixed.
* khtml/html/html_objectimpl.cpp:
(DOM::HTMLEmbedElementImpl::getEmbedInstance): The "if (!r)" clause
implements the logic I just described. The code below it I changed
just for style, to match the style in getObjectInstance().
(DOM::HTMLEmbedElementImpl::rendererIsNeeded): Assert that an <object>
parent has a renderer because we're going to use it later.
(DOM::HTMLObjectElementImpl::rendererIsNeeded): Changed to match style
of HTMLEmbedElementImpl counterpart.
2006-01-04 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin, landed by ap.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6301
REGRESSION: Border repaint glitch
* khtml/rendering/render_object.cpp:
(RenderObject::repaintAfterLayoutIfNeeded): Repaint parts of the
border that moved.
* manual-tests/border-repaint-glitch.html: Added.
2005-12-30 Kimmo Kinnunen <kimmo.kinnunen@nokia.com>
Reviewed by eseidel.
Changed use of QRect to QRectF in the points where SVG can have
fractional numbers
http://bugzilla.opendarwin.org/show_bug.cgi?id=4462
Added test cases:
* svg/custom/fractional-rects.svg: copy of rounded-rects.svg with
fractional coordinates.
* WebCore.xcodeproj/project.pbxproj:
* kwq/KWQWMatrix.h:
* kwq/KWQWMatrix.mm:
(QWMatrix::mapRect): mapRect for QRectF
* kwq/KWQRectF.h:
* kwq/KWQRectF.mm: Added. QRectF impl
* kwq/KWQSizeF.h:
* kwq/KWQSizeF.mm: Added.QSizeF impl
* kwq/KWQPointF.h:
* kwq/KWQPointF.mm: Added. QPointF impl
* kcanvas/KCanvasContainer.cpp:
(KCanvasContainer::fillContains):
(KCanvasContainer::strokeContains):
(KCanvasContainer::relativeBBox):
(KCanvasContainer::getAspectRatio): QRect -> QRectF
* kcanvas/KCanvasContainer.h:
* kcanvas/KCanvasFilters.cpp:
(KCanvasFilterEffect::subRegion):
(KCanvasFilterEffect::setSubRegion): QRect -> QRectF
* kcanvas/KCanvasFilters.h:
(KCanvasFilter::filterRect):
(KCanvasFilter::setFilterRect): QRect -> QRectF
(KCanvasFEConvolveMatrix::kernelSize):
(KCanvasFEConvolveMatrix::setKernelSize):
(KCanvasFEConvolveMatrix::targetOffset):
(KCanvasFEConvolveMatrix::setTargetOffset): QSize -> QSizeF
* kcanvas/KCanvasItem.cpp:
(RenderPath::fillContains):
(RenderPath::strokeContains):
(RenderPath::relativeBBox): QRect -> QRectF
* kcanvas/KCanvasItem.h:
* kcanvas/KCanvasResources.cpp:
(KCanvasMarker::draw): QRect -> QRectF
* kcanvas/KCanvasResources.h:
* kcanvas/KCanvasTreeDebug.cpp:
(hasFractions): helper function
(operator<<): QSizeF operator, QRectF operator
* kcanvas/KCanvasTreeDebug.h:
* kcanvas/device/KRenderingPaintServerGradient.cpp:
(KRenderingPaintServerLinearGradient::gradientStart):
(KRenderingPaintServerLinearGradient::setGradientStart):
(KRenderingPaintServerLinearGradient::gradientEnd):
(KRenderingPaintServerLinearGradient::setGradientEnd):
(KRenderingPaintServerRadialGradient::gradientCenter):
(KRenderingPaintServerRadialGradient::setGradientCenter):
(KRenderingPaintServerRadialGradient::gradientFocal):
(KRenderingPaintServerRadialGradient::setGradientFocal): QPoint -> QPointF
* kcanvas/device/KRenderingPaintServerGradient.h:
* kcanvas/device/KRenderingPaintServerPattern.cpp:
(KRenderingPaintServerPattern::Private::Private): x, y, width, height -> QRectF
(KRenderingPaintServerPattern::setBbox): replaced get/set methods
(KRenderingPaintServerPattern::bbox): replaced get/set methods
(KRenderingPaintServerPattern::externalRepresentation):
* kcanvas/device/KRenderingPaintServerPattern.h:
* kcanvas/device/quartz/KCanvasFilterQuartz.h:
* kcanvas/device/quartz/KCanvasFilterQuartz.mm:
(KCanvasFilterQuartz::prepareFilter):
(KCanvasFilterQuartz::applyFilter): QRect -> QRectF
* kcanvas/device/quartz/KCanvasItemQuartz.h:
(KCanvasItemQuartz::getAbsoluteRepaintRect): QRect -> QRectF
* kcanvas/device/quartz/KCanvasItemQuartz.mm:
(drawMarkerWithData):
(KCanvasItemQuartz::drawMarkersIfNeeded):
(KCanvasItemQuartz::paint): QRect -> QRectF
(KCanvasItemQuartz::nodeAtPoint): QPoint -> QPointF
(KCanvasItemQuartz::bboxForPath) :QRect -> QRectF
(KCanvasItemQuartz::hitsPath):
* kcanvas/device/quartz/KCanvasResourcesQuartz.h:
(KCanvasContainerQuartz::getAbsoluteRepaintRect): QRect -> QRectF
* kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
(KRenderingPaintServerPatternQuartz::draw): QRect -> QRectF
* khtml/rendering/render_object.h:
(khtml::RenderObject::relativeBBox):QRect -> QRectF
* ksvg2/svg/SVGFilterElementImpl.cpp:
(SVGFilterElementImpl::canvasResource): QRect -> QRectF
* ksvg2/svg/SVGFilterPrimitiveStandardAttributesImpl.cpp:
(SVGFilterPrimitiveStandardAttributesImpl::setStandardAttributes):
* ksvg2/svg/SVGLengthImpl.cpp:
(SVGLengthImpl::value): QRect -> QRectF
* ksvg2/svg/SVGLinearGradientElementImpl.cpp:
(SVGLinearGradientElementImpl::buildGradient): QPoint -> QPointF, removed integer conversions
* ksvg2/svg/SVGLocatableImpl.cpp:
(SVGLocatableImpl::getBBox): Rect -> QRectF
* ksvg2/svg/SVGPatternElementImpl.cpp:
(SVGPatternElementImpl::drawPatternContentIntoTile): QRect -> QRectF
* ksvg2/svg/SVGRadialGradientElementImpl.cpp:
(SVGRadialGradientElementImpl::buildGradient): QPoint -> QPointF, removed integer conversions
* ksvg2/svg/SVGSVGElementImpl.cpp:
(SVGSVGElementImpl::checkIntersection): QRect -> QRectF, removed integer conversions
(SVGSVGElementImpl::checkEnclosure): QRect -> QRectF, removed integer conversions
2006-01-03 Maciej Stachowiak <mjs@apple.com>
Reviewed by Vicki.
- moved frame traversal code across from bridge, also dropped the children
array
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge firstChild]): Moved from WebBridge. Use new _firstChild
pointer.
(-[WebCoreBridge lastChild]): Moved from WebBridge. Use new _lastChild pointer.
(-[WebCoreBridge childCount]): Moved from WebBridge. Use _childCount variable.
(-[WebCoreBridge previousSibling]): Moved from WebBridge.
(-[WebCoreBridge nextSibling]): ditt
(-[WebCoreBridge isDescendantOfFrame:]): ditto
(-[WebCoreBridge traverseNextFrameStayWithin:]): ditto
(-[WebCoreBridge appendChild:]): Moved from WebBridge, maintain count and first/last
pointers.
(-[WebCoreBridge removeChild:]): Moved from WebBridge, maintain count and first/last
pointers.
2006-01-03 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
<http://bugzilla.opendarwin.org/show_bug.cgi?id=4609>
window.getSelection().toString() is undefined (range object
returned from window.getSelection() is useless)
toString was defined as a method on the JS Selection object,
but it didn't return anything.
Added layout test:
* editing/selection/toString.html
* khtml/ecma/kjs_window.cpp:
(KJS::SelectionFunc::callAsFunction):
2006-01-03 Geoffrey Garen <ggaren@apple.com>
Reviewed by timo.
- Fixed: http://bugzilla.opendarwin.org/show_bug.cgi?id=6318
REGRESSION: Repro crash in JS called from Flash on bdash.net.nz
Since we clear all the plugin data structures in setView, we need to
clear the windowScriptObject as well. I had already done this in my
previous patch, but I didn't realize there are two windowScriptObjects
-- one for Netscape PlugIns, and one for WebKit PlugIns.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setView): Clear the Netscape PlugIn windowScriptObject
as well.
2006-01-03 Anders Carlsson <andersca@mac.com>
Reviewed by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6358
JS objects missing "prototype" properties
* khtml/ecma/XSLTProcessor.cpp:
(KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp):
* khtml/ecma/XSLTProcessor.h:
* khtml/ecma/domparser.cpp:
(KJS::DOMParserConstructorImp::DOMParserConstructorImp):
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequestConstructorImp::XMLHttpRequestConstructorImp):
* khtml/ecma/xmlserializer.cpp:
(KJS::XMLSerializerConstructorImp::XMLSerializerConstructorImp):
Add "prototype" property in constructors.
2006-01-03 Eric Seidel <eseidel@apple.com>
Reviewed by darin.
REGRESSION: repro crash w/ invalid charset attribute on <script>
http://bugzilla.opendarwin.org/show_bug.cgi?id=6345
I also made some small spacing cleanup here.
I did *not* fix the usage in formData, as the move from KCharSet to
QTextCodec actually fixed a bug whereby if the first listed charset
in accept-charsets was invalid, we would assume latin1 instead of
checking for the next valid one before assuming system encoding.
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::formData): cleanup
* khtml/misc/loader.cpp:
(CachedCSSStyleSheet::CachedCSSStyleSheet): null check
(CachedScript::CachedScript): cleanup
(CachedXSLStyleSheet::CachedXSLStyleSheet): null check
(CachedXBLDocument::CachedXBLDocument): cleanup
2006-01-03 Justin Garcia <justin.garcia@apple.com>
<http://bugzilla.opendarwin.org/show_bug.cgi?id=4904>
Bug with baseOffset and extentOffset in selections (for writely.com)
<rdar://problem/4259818>
selection object incorrect after double-clicking a word
Reviewed by harrison
Changed the Selection object's anchor/focus properties to match
Mozilla's Selection object API, added getRangeAt and outlined the
rest of the API.
Cleaned up the JS Selection object (to do less work in the DOM binding).
Added an updateLayout call to VisiblePosition::init and removed some
updateLayout calls from other parts of the editing code.
Added layout tests:
* editing/selection/getRangeAt.html
* editing/selection/anchor-focus1.html
* editing/selection/anchor-focus2.html
* editing/selection/anchor-focus3.html
Updated expected results:
* editing/selection/unrendered-001-expected.txt
* khtml/ecma/kjs_window.cpp:
(KJS::Selection::getValueProperty):
(KJS::Selection::toString):
(KJS::SelectionFunc::callAsFunction):
* khtml/ecma/kjs_window.h:
(KJS::Selection::):
* khtml/editing/SelectionController.cpp:
(khtml::SelectionController::modify):
(khtml::SelectionController::type):
(khtml::SelectionController::toString):
(khtml::SelectionController::getRangeAt):
(khtml::SelectionController::setBaseAndExtent):
(khtml::SelectionController::setPosition):
(khtml::SelectionController::collapse):
(khtml::SelectionController::collapseToEnd):
(khtml::SelectionController::collapseToStart):
(khtml::SelectionController::empty):
(khtml::SelectionController::extend):
(khtml::SelectionController::validate):
* khtml/editing/SelectionController.h:
(khtml::SelectionController::part):
(khtml::SelectionController::baseNode):
(khtml::SelectionController::extentNode):
(khtml::SelectionController::baseOffset):
(khtml::SelectionController::extentOffset):
(khtml::SelectionController::anchorNode):
(khtml::SelectionController::anchorOffset):
(khtml::SelectionController::focusNode):
(khtml::SelectionController::focusOffset):
(khtml::SelectionController::isCollapsed):
* khtml/editing/visible_position.cpp:
(khtml::VisiblePosition::init):
(khtml::VisiblePosition::isCandidate):
* khtml/khtml_part.cpp:
(KHTMLPart::handleMousePressEventSingleClick):
2006-01-03 Anders Carlsson <andersca@mac.com>
Reviewed by Maciej.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5378
createDocument fails with DOM Exception 5 when passed empty qname
* khtml/ecma/kjs_dom.cpp:
(KJS::DOMDOMImplementationProtoFunc::callAsFunction):
When passing null to createDocument, pass a null DOMString, and not
a DOMString containing the text "null".
* khtml/xml/dom_docimpl.cpp:
(DOMImplementationImpl::createDocument):
Only validate the qualifiedName if it's not null or empty. Also, do not
create the document element if the qualifiedName is null or empty.
2006-01-03 Eric Seidel <eseidel@apple.com>
Reviewed by darin.
No functionality changes, no tests possible.
khtml/editing should use RefPtr instead of manual ref/deref
http://bugzilla.opendarwin.org/show_bug.cgi?id=6109
Results in a slight performance gain < 1% on the PLT.
* khtml/editing/SelectionController.cpp:
(khtml::SelectionController::toRange):
* khtml/editing/SelectionController.h:
* khtml/editing/append_node_command.cpp:
(khtml::AppendNodeCommand::AppendNodeCommand):
(khtml::AppendNodeCommand::doApply):
(khtml::AppendNodeCommand::doUnapply):
* khtml/editing/append_node_command.h:
(khtml::AppendNodeCommand::~AppendNodeCommand):
(khtml::AppendNodeCommand::appendChild):
(khtml::AppendNodeCommand::parentNode):
* khtml/editing/apply_style_command.cpp:
(khtml::StyleChange::init):
(khtml::ApplyStyleCommand::removeInlineStyle):
* khtml/editing/apply_style_command.h:
* khtml/editing/composite_edit_command.cpp:
(khtml::CompositeEditCommand::deleteInsignificantText):
* khtml/editing/delete_from_text_node_command.cpp:
(khtml::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
* khtml/editing/delete_from_text_node_command.h:
(khtml::DeleteFromTextNodeCommand::~DeleteFromTextNodeCommand):
(khtml::DeleteFromTextNodeCommand::node):
* khtml/editing/delete_selection_command.cpp:
(khtml::DeleteSelectionCommand::initializePositionData):
(khtml::DeleteSelectionCommand::saveTypingStyleState):
(khtml::DeleteSelectionCommand::handleGeneralDelete):
(khtml::DeleteSelectionCommand::calculateEndingPosition):
(khtml::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
(khtml::DeleteSelectionCommand::clearTransientState):
* khtml/editing/delete_selection_command.h:
* khtml/editing/edit_command.cpp:
(khtml::EditCommand::EditCommand):
(khtml::EditCommand::~EditCommand):
(khtml::EditCommand::setTypingStyle):
(khtml::EditCommand::styleAtPosition):
* khtml/editing/edit_command.h:
(khtml::EditCommand::document):
(khtml::EditCommand::typingStyle):
* khtml/editing/insert_into_text_node_command.cpp:
(khtml::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
* khtml/editing/insert_into_text_node_command.h:
(khtml::InsertIntoTextNodeCommand::~InsertIntoTextNodeCommand):
(khtml::InsertIntoTextNodeCommand::node):
* khtml/editing/insert_node_before_command.cpp:
(khtml::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
(khtml::InsertNodeBeforeCommand::doApply):
(khtml::InsertNodeBeforeCommand::doUnapply):
* khtml/editing/insert_node_before_command.h:
(khtml::InsertNodeBeforeCommand::~InsertNodeBeforeCommand):
(khtml::InsertNodeBeforeCommand::insertChild):
(khtml::InsertNodeBeforeCommand::refChild):
* khtml/editing/insert_paragraph_separator_command.cpp:
(khtml::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
(khtml::InsertParagraphSeparatorCommand::~InsertParagraphSeparatorCommand):
(khtml::InsertParagraphSeparatorCommand::calculateStyleBeforeInsertion):
(khtml::InsertParagraphSeparatorCommand::applyStyleAfterInsertion):
* khtml/editing/insert_paragraph_separator_command.h:
* khtml/editing/join_text_nodes_command.cpp:
(khtml::JoinTextNodesCommand::JoinTextNodesCommand):
(khtml::JoinTextNodesCommand::doApply):
(khtml::JoinTextNodesCommand::doUnapply):
* khtml/editing/join_text_nodes_command.h:
(khtml::JoinTextNodesCommand::~JoinTextNodesCommand):
(khtml::JoinTextNodesCommand::firstNode):
(khtml::JoinTextNodesCommand::secondNode):
* khtml/editing/jsediting.cpp:
* khtml/editing/markup.cpp:
(khtml::createMarkup):
(khtml::createFragmentFromMarkup):
(khtml::createFragmentFromText):
(khtml::createFragmentFromNodeList):
* khtml/editing/markup.h:
* khtml/editing/merge_identical_elements_command.cpp:
(khtml::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand):
(khtml::MergeIdenticalElementsCommand::doApply):
(khtml::MergeIdenticalElementsCommand::doUnapply):
* khtml/editing/merge_identical_elements_command.h:
(khtml::MergeIdenticalElementsCommand::~MergeIdenticalElementsCommand):
* khtml/editing/move_selection_command.cpp:
(khtml::MoveSelectionCommand::MoveSelectionCommand):
(khtml::MoveSelectionCommand::~MoveSelectionCommand):
(khtml::MoveSelectionCommand::doApply):
* khtml/editing/move_selection_command.h:
* khtml/editing/rebalance_whitespace_command.cpp:
* khtml/editing/rebalance_whitespace_command.h:
(khtml::RebalanceWhitespaceCommand::~RebalanceWhitespaceCommand):
* khtml/editing/remove_css_property_command.cpp:
(khtml::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand):
* khtml/editing/remove_css_property_command.h:
(khtml::RemoveCSSPropertyCommand::~RemoveCSSPropertyCommand):
(khtml::RemoveCSSPropertyCommand::styleDeclaration):
* khtml/editing/remove_node_attribute_command.cpp:
(khtml::RemoveNodeAttributeCommand::RemoveNodeAttributeCommand):
* khtml/editing/remove_node_attribute_command.h:
(khtml::RemoveNodeAttributeCommand::~RemoveNodeAttributeCommand):
(khtml::RemoveNodeAttributeCommand::element):
* khtml/editing/remove_node_command.cpp:
(khtml::RemoveNodeCommand::RemoveNodeCommand):
(khtml::RemoveNodeCommand::doApply):
(khtml::RemoveNodeCommand::doUnapply):
* khtml/editing/remove_node_command.h:
(khtml::RemoveNodeCommand::~RemoveNodeCommand):
(khtml::RemoveNodeCommand::node):
* khtml/editing/remove_node_preserving_children_command.cpp:
(khtml::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
* khtml/editing/remove_node_preserving_children_command.h:
(khtml::RemoveNodePreservingChildrenCommand::~RemoveNodePreservingChildrenCommand):
(khtml::RemoveNodePreservingChildrenCommand::node):
* khtml/editing/replace_selection_command.cpp:
(khtml::ReplacementFragment::ReplacementFragment):
(khtml::ReplacementFragment::~ReplacementFragment):
(khtml::ReplacementFragment::enclosingBlock):
(khtml::ReplacementFragment::removeNodePreservingChildren):
(khtml::ReplacementFragment::removeNode):
(khtml::ReplacementFragment::insertFragmentForTestRendering):
(khtml::ReplacementFragment::restoreTestRenderingNodesToFragment):
(khtml::ReplaceSelectionCommand::fixupNodeStyles):
(khtml::computeAndStoreNodeDesiredStyle):
(khtml::NodeDesiredStyle::NodeDesiredStyle):
(khtml::ReplaceSelectionCommand::ReplaceSelectionCommand):
(khtml::ReplaceSelectionCommand::~ReplaceSelectionCommand):
(khtml::ReplaceSelectionCommand::doApply):
(khtml::ReplaceSelectionCommand::completeHTMLReplacement):
(khtml::ReplaceSelectionCommand::updateNodesInserted):
* khtml/editing/replace_selection_command.h:
(khtml::NodeDesiredStyle::node):
(khtml::NodeDesiredStyle::style):
(khtml::ReplacementFragment::root):
* khtml/editing/set_node_attribute_command.cpp:
(khtml::SetNodeAttributeCommand::SetNodeAttributeCommand):
* khtml/editing/set_node_attribute_command.h:
(khtml::SetNodeAttributeCommand::~SetNodeAttributeCommand):
(khtml::SetNodeAttributeCommand::element):
* khtml/editing/split_element_command.cpp:
(khtml::SplitElementCommand::SplitElementCommand):
(khtml::SplitElementCommand::doApply):
(khtml::SplitElementCommand::doUnapply):
* khtml/editing/split_element_command.h:
(khtml::SplitElementCommand::~SplitElementCommand):
* khtml/editing/split_text_node_command.cpp:
(khtml::SplitTextNodeCommand::SplitTextNodeCommand):
(khtml::SplitTextNodeCommand::doApply):
(khtml::SplitTextNodeCommand::doUnapply):
* khtml/editing/split_text_node_command.h:
(khtml::SplitTextNodeCommand::~SplitTextNodeCommand):
(khtml::SplitTextNodeCommand::node):
* khtml/editing/split_text_node_containing_element.cpp:
(khtml::SplitTextNodeContainingElementCommand::SplitTextNodeContainingElementCommand):
(khtml::SplitTextNodeContainingElementCommand::doApply):
* khtml/editing/split_text_node_containing_element_command.h:
(khtml::SplitTextNodeContainingElementCommand::~SplitTextNodeContainingElementCommand):
* khtml/editing/visible_position.cpp:
(khtml::makeRange):
* khtml/editing/visible_position.h:
* khtml/editing/visible_text.cpp:
(khtml::TextIterator::range):
(khtml::SimplifiedBackwardsTextIterator::range):
(khtml::CharacterIterator::range):
(khtml::findPlainText):
* khtml/editing/visible_text.h:
(khtml::WordAwareIterator::range):
* khtml/editing/wrap_contents_in_dummy_span_command.cpp:
(khtml::WrapContentsInDummySpanCommand::WrapContentsInDummySpanCommand):
(khtml::WrapContentsInDummySpanCommand::doApply):
(khtml::WrapContentsInDummySpanCommand::doUnapply):
* khtml/editing/wrap_contents_in_dummy_span_command.h:
(khtml::WrapContentsInDummySpanCommand::~WrapContentsInDummySpanCommand):
* kwq/DOMHTML.mm:
(-[DOMHTMLDocument _createDocumentFragmentWithMarkupString:baseURLString:]):
(-[DOMHTMLDocument _createDocumentFragmentWithText:]):
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge documentFragmentWithMarkupString:baseURLString:]):
(-[WebCoreBridge documentFragmentWithText:]):
(-[WebCoreBridge documentFragmentWithNodesAsParagraphs:]):
2006-01-03 Anders Carlsson <andersca@mac.com>
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5177
Javascript cloneNode(deep) does not clone form elements correctly
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::cloneNode):
Call copyNonAttributeProperties on the new node.
* khtml/html/html_formimpl.cpp:
(DOM::HTMLInputElementImpl::copyNonAttributeProperties):
* khtml/html/html_formimpl.h:
Copy m_value, m_checked and m_indeterminate here.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::importNode):
Call copyNonAttributeProperties on the new node.
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::cloneNode):
Call copyNonAttributeProperties on the new node.
* khtml/xml/dom_elementimpl.h:
(DOM::ElementImpl::copyNonAttributeProperties):
Add function declaration.
2006-01-02 Maciej Stachowiak <mjs@apple.com>
Rubber stamped by Eric.
- remove the no longer used QIntDict
* kwq/KWQIntDict.h: Removed.
2006-01-03 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5609
XSLT document() doesn't handle relative paths
Test case: fast/xsl/xslt-relative-path.xml
* khtml/xsl/xslt_processorimpl.cpp:
(DOM::docLoaderFunc): Renamed from stylesheetLoadFunc. Use base URL when constructing URLs.
(DOM::XSLTProcessorImpl::transformToString):
2006-01-02 Vicki Murley <vicki@apple.com>
Reviewed by Maciej.
- fix for <rdar://problem/4389622> *Pan EU2* iframe swallows events for overlapping elements (part 2)
We originally added a call to passSubframeEventToSubframe here to fix the hand cursor updating problem
reported in <rdar://problem/4316201> REGRESSION: cursor and text in status bar is not updated when
mousing over links in a frame (5509). However, when we return early after passSubframeEventToSubframe,
we fail to fire onmouseout events. Since the call to passSubframeEventToSubframe was originally added
to fix the hand cursor updating problem, remove the early return and make cursor updating conditional
on passSubframeEventToSubframe.
* khtml/khtmlview.cpp:
(KHTMLView::viewportMouseMoveEvent):
2005-12-30 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=4557
rename unusual strcmp and strcasecmp for DOMString family
Added new functions named equal and equalIgnoringCase.
* khtml/xml/dom_stringimpl.h: Changed the type of the length parameter to computeHash to unsigned
to match the rest of the interface. Added equal and equalIgnoringCase functions. Added a
version of the hash function that works on char* to CaseInsensitiveHash as preparation for an
atomic string change.
* khtml/xml/dom_stringimpl.cpp: Moved the QT_ALLOC_QCHAR_VEC and QT_DELETE_QCHAR_VEC macros
here, and changed them into inline functions.
(DOM::equal): Implemented.
(DOM::equalIgnoringCase): Implemented.
(DOM::DOMStringImpl::computeHash): Changed parameter type to unsigned to match other similar
functions.
* khtml/dom/dom_string.h: Removed unnecessary friend declarations. Changed operator
overloads for == and != to call through inline to DOMStringImpl. Replaced strcasecmp
with equalIgnoringCase, overloaded for one more combination of parameters. Removed strcmp.
* khtml/dom/dom_string.cpp: Removed functions that are now implemented in DOMStringImpl*.
* khtml/xml/dom_atomicstring.h: Removed a redundant const. Removed unnecessary
friend declarations. Removed AtomicString::equal. Filled out a larger set of == and
!= operator implementations, mostly with inlines calling through to DOMStringImpl.
Renamed equalsIgnoreCase to equalIgnoringCase and filled out a larger set as above.
* khtml/xml/dom_atomicstring.cpp: Renamed AtomicString::equal to just ==.
Removed some implementation of == and equalsIgnoreCase that are replaced by inlines.
* khtml/html/html_listimpl.cpp:
(DOM::HTMLOListElementImpl::parseMappedAttribute):
(DOM::HTMLLIElementImpl::parseMappedAttribute):
Use the "==" operator instead of strcmp.
* khtml/css/cssstyleselector.cpp: (khtml::CSSStyleSelector::checkOneSelector):
Use equalIgnoringCase instead of equalsIgnoreCase.
* khtml/rendering/render_form.cpp:
(RenderSlider::updateFromElement): Fixed bug where a temporary DOMString was put into
a const DOMString&. Changed some DOMString to AtomicString as appropriate, and also
used equalIgnoringCase instead of strcasecmp.
(RenderSlider::slotSliderValueChanged): More of the same.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::processHttpEquiv): Replaced use of strcasecmp
with equalIgnoringCase. Added parentheses to fix incorrect operator precedence in one case
(&& binds tighter than ||) which fixes a crash when using a http-equiv pragma when there
is no part (not sure how to reproduce that).
* khtml/khtml_part.cpp:
(updateState):
(KHTMLPart::selectionStartHasStyle):
* khtml/ecma/kjs_html.cpp: (KJS::KJS::HTMLDocument::putValueProperty):
* khtml/editing/apply_style_command.cpp:
(khtml::StyleChange::checkForLegacyHTMLStyleChange):
(khtml::StyleChange::currentlyHasStyle):
(khtml::hasTextDecorationProperty):
(khtml::ApplyStyleCommand::extractTextDecorationStyle):
(khtml::ApplyStyleCommand::extractAndNegateTextDecorationStyle):
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::parseMappedAttribute):
(HTMLFrameElementImpl::parseMappedAttribute):
* khtml/html/html_blockimpl.cpp:
(HTMLDivElementImpl::parseMappedAttribute):
(HTMLHRElementImpl::parseMappedAttribute):
(HTMLParagraphElementImpl::parseMappedAttribute):
(HTMLMarqueeElementImpl::parseMappedAttribute):
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::parseMappedAttribute):
(HTMLElementImpl::addHTMLAlignment):
(HTMLElementImpl::setContentEditable):
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::parseMappedAttribute):
(DOM::HTMLButtonElementImpl::parseMappedAttribute):
(DOM::HTMLInputElementImpl::setInputType):
(DOM::HTMLInputElementImpl::parseMappedAttribute):
(DOM::HTMLKeygenElementImpl::appendFormData):
(DOM::HTMLTextAreaElementImpl::parseMappedAttribute):
* khtml/html/html_imageimpl.cpp: (DOM::HTMLAreaElementImpl::parseMappedAttribute):
* khtml/html/html_inlineimpl.cpp: (DOM::HTMLBRElementImpl::parseMappedAttribute):
* khtml/html/html_tableimpl.cpp: (DOM::HTMLTablePartElementImpl::parseMappedAttribute):
* khtml/html/htmlparser.cpp: (HTMLParser::handleError):
Use equalIgnoringCase instead of strcasecmp.
2005-12-30 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin, landed by ap.
Test: fast/text/justified-text-rect.html
- WebCore part of fix for
http://bugzilla.opendarwin.org/show_bug.cgi?id=5461
Text width measured incorrectly when text-align: justify
* khtml/rendering/font.h:
* khtml/rendering/font.cpp:
(khtml::Font::selectionRectForText): Added.
* khtml/rendering/render_text.cpp:
(kthml::InlineTextBox::selectionRect): Use selectionRectForText. This
works for justified text as well, and avoids intermediate rounding which
resulted in selection rects narrower than AppKit's.
(khtml::InlineTextBox::positionForOffset): Use selectionRectForText,
which works for justified text as well.
* kwq/KWQFontMetrics.h:
* kwq/KWQFontMetrics.mm:
(QFontMetrics::selectionRectForText): Added.
* kwq/WebCoreTextRenderer.h:
2005-12-30 Alexey Proskuryakov <ap@nypop.com>
- Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6289
REGRESSION: firstCharacterForRange(0, 0) returns a 0x0 rect
* khtml/editing/visible_text.cpp:
(khtml::TextIterator::rangeFromLocationAndLength):
Only special-case (0, 0) ranges for empty documents.
2005-12-30 Geoffrey Garen <ggaren@apple.com>
Added test case for <rdar://problem/4268278> Submitting a form in onUnload event
handler causes crash in -[WebDataSource(WebPrivate) _commitIfReady:]
* manual-tests/onunload-form-submit-crash.html: Added.
2005-12-30 Anders Carlsson <andersca@mac.com>
Reviewed by Eric.
- Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6297
XMLSerializer should use createMarkup.
* khtml/ecma/xmlserializer.cpp:
(KJS::XMLSerializerProtoFunc::callAsFunction):
Use createMarkup instead of NodeImpl::toString.
* khtml/editing/markup.cpp:
(khtml::startMarkup):
escape attribute values and ignore document fragment nodes.
2005-12-30 Eric Seidel <eseidel@apple.com>
Reviewed by mjs.
No functional changes, thus no layout test.
Just removes debug NSLog() calls from ksvg2/kcanvas.
http://bugzilla.opendarwin.org/show_bug.cgi?id=6299
* kcanvas/device/quartz/KCanvasFilterQuartz.mm:
(KCanvasFilterQuartz::prepareFilter):
(KCanvasFilterQuartz::applyFilter):
(KCanvasFilterQuartz::getCIFilterStack):
(KCanvasFilterQuartz::imageForName):
(KCanvasFEBlendQuartz::getCIFilter):
(KCanvasFEColorMatrixQuartz::getCIFilter):
(KCanvasFEGaussianBlurQuartz::getCIFilter):
* kcanvas/device/quartz/KCanvasResourcesQuartz.mm:
(KCanvasClipperQuartz::applyClip):
* kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
(KRenderingDeviceContextQuartz::mapFromVisual):
(KRenderingDeviceContextQuartz::mapToVisual):
(KRenderingDeviceQuartz::createResource):
(KRenderingDeviceQuartz::createFilterEffect):
* kcanvas/device/quartz/KRenderingPaintServerGradientQuartz.mm:
(drawShadingWithStyle):
(KRenderingPaintServerGradientQuartz::updateQuartzGradientCache):
* kcanvas/device/quartz/KRenderingPaintServerQuartz.mm:
(KRenderingPaintServerPatternQuartz::draw):
* ksvg2/svg/svgpathparser.cpp:
(SVGPathParser::parseSVG):
2005-12-29 Graham Dennis <Graham.Dennis@gmail.com>
Reviewed by Hyatt.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3579
In-place style-switching is leaving junk behind, messing up styles
* khtml/rendering/render_block.h: (khtml::RenderBlock::initMaxMarginValues):
Set all margin values in all cases.
2005-12-29 Eric Seidel <eseidel@apple.com>
Reviewed by mjs.
XML documents with "html" in dtd name use XHTML entities when they shouldn't
http://bugzilla.opendarwin.org/show_bug.cgi?id=6290
* khtml/xml/xml_tokenizer.cpp:
(khtml::externalSubsetHandler): check for exact xhtml types
2005-12-29 Eric Seidel <eseidel@apple.com>
Reviewed by mjs.
Close leak in CollectionInfo due to HashMap migration
http://bugzilla.opendarwin.org/show_bug.cgi?id=6295
* khtml/html/html_miscimpl.cpp:
(DOM::HTMLCollectionImpl::CollectionInfo::~CollectionInfo):
* khtml/html/html_miscimpl.h:
2005-12-29 Maciej Stachowiak <mjs@apple.com>
Reviewed by Eric.
- finished frame traversal cleanup
http://bugzilla.opendarwin.org/show_bug.cgi?id=6293
* kwq/WebCoreBridge.h: Removed childFrames method from WebCoreBridge protocol
since it is not actually used.
2005-12-29 Eric Seidel <eseidel@apple.com>
Reviewed by mjs.
Leaks in XSLTProcessorImpl due to early exit in failure case
http://bugzilla.opendarwin.org/show_bug.cgi?id=6101
* khtml/xsl/xslt_processorimpl.cpp:
(DOM::xmlDocPtrFromNode): add "shouldDelete" argument
(DOM::XSLTProcessorImpl::transformToString): delete new'd xmlDoc
2005-12-29 Eric Seidel <eseidel@apple.com>
File accidentally omitted from previous commit.
Remove QDict from khtml/html
http://bugzilla.opendarwin.org/show_bug.cgi?id=6230
* khtml/ecma/kjs_html.cpp:
(KJS::KJS::HTMLCollection::getNamedItems):
2005-12-29 Eric Seidel <eseidel@apple.com>
Reviewed by mjs.
Remove QDict from khtml/html
http://bugzilla.opendarwin.org/show_bug.cgi?id=6230
Uses HashMap instead.
* khtml/html/html_miscimpl.cpp:
(DOM::HTMLCollectionImpl::CollectionInfo::CollectionInfo):
(DOM::HTMLCollectionImpl::CollectionInfo::reset):
(DOM::HTMLCollectionImpl::namedItem):
(DOM::HTMLCollectionImpl::updateNameCache):
(DOM::HTMLCollectionImpl::namedItems):
(DOM::HTMLCollectionImpl::nextNamedItem):
(DOM::HTMLFormCollectionImpl::nextNamedItemInternal):
(DOM::HTMLFormCollectionImpl::updateNameCache):
* khtml/html/html_miscimpl.h:
2005-12-29 Eric Seidel <eseidel@apple.com>
Reviewed by mjs.
DOMString/DOMStringImpl/AtomicString need enhancements before replacing QString
http://bugzilla.opendarwin.org/show_bug.cgi?id=6228
Added find(), contains(), startsWith() and endsWith() to DOMString
Uses the above functions throughout the code.
Small performance boost.
* khtml/css/css_base.cpp:
(CSSSelector::print):
* khtml/css/css_ruleimpl.cpp:
(DOM::CSSImportRuleImpl::init):
* khtml/css/css_valueimpl.cpp:
(DOM::CSSStyleDeclarationImpl::setProperty):
* khtml/css/cssparser.cpp:
(CSSParser::parseValue):
(CSSParser::parseDeclaration):
(CSSParser::parseContent):
* khtml/css/cssstyleselector.cpp:
(khtml::CSSStyleSelector::CSSStyleSelector):
(khtml::CSSStyleSelector::setEncodedURL):
(khtml::parseUASheet):
(khtml::cleanpath):
(khtml::CSSStyleSelector::checkSelector):
(khtml::CSSStyleSelector::checkOneSelector):
(khtml::CSSRuleSet::addRulesFromSheet):
(khtml::CSSStyleSelector::applyProperty):
* khtml/dom/dom_string.cpp:
* khtml/dom/dom_string.h:
(DOM::DOMString::contains):
(DOM::DOMString::find):
(DOM::DOMString::startsWith):
(DOM::DOMString::endsWith):
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::parseEnctype):
* khtml/khtml_part.cpp:
(KHTMLPart::requestFrame):
(KHTMLPart::submitForm):
* khtml/misc/decoder.cpp:
(Decoder::decode):
* khtml/xml/dom_atomicstring.h:
(DOM::AtomicString::length):
(DOM::AtomicString::operator []):
(DOM::AtomicString::contains):
(DOM::AtomicString::find):
(DOM::AtomicString::startsWith):
(DOM::AtomicString::endsWith):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::processHttpEquiv):
* khtml/xml/dom_stringimpl.cpp:
(DOM::equal):
(DOM::equalCaseInsensitive):
(DOM::DOMStringImpl::find):
(DOM::DOMStringImpl::endsWith):
* khtml/xml/dom_stringimpl.h:
(DOM::DOMStringImpl::startsWith):
2005-12-29 Rob Buis <rwlbuis@xs4all.nl>
Reviewed by eseidel.
WebCore+SVG has some problems with rounded rectangles
http://bugzilla.opendarwin.org/show_bug.cgi?id=6157
* ksvg2/svg/SVGRectElementImpl.cpp:
(SVGRectElementImpl::toPathData): fixed round rect calculations
2005-12-29 Mark Rowe <opendarwin.org@bdash.net.nz>
Reviewed by eseidel, ggaren, darin.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=4301
Support HTML entities on pages parsed as XHTML
Added layout tests:
* fast/parser/entities-in-xhtml.xhtml
* khtml/xml/xml_tokenizer.cpp:
(khtml::XMLTokenizer::setIsXHTMLDocument): Track whether the XML document is XHTML.
(khtml::XMLTokenizer::isXHTMLDocument): Ditto.
(khtml::externalSubsetHandler): Ditto.
(khtml::XMLTokenizer::finish): Ditto.
(khtml::getXHTMLEntity): Look up the HTML entity.
(khtml::getEntityHandler): Look up the HTML entity if this is an XHTML document.
* khtml/html/kentities.h: Added.
* khtml/html/kentities.gperf: changed entity to Entity
2005-12-29 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by darin
- WebCore part of fix for
http://bugzilla.opendarwin.org/show_bug.cgi?id=3922
Variable word/letter spacing and full justification not supported for
ATSUI-rendered text
* khtml/rendering/font.h:
(khtml::Font::checkSelectionPoint): Make sure the complete run, used for
counting spaces and determining padding per space does not go beyond the
text box.
2005-12-28 Geoffrey Garen <ggaren@apple.com>
Reviewed by mjs.
- Fixed <rdar://problem/4325722> crash in KJS::Bindings::dispatchJNICall
due to liveconnect call from Java after Java PlugInView has been
deallocated @ www.binarybet.com
AKA
http://bugzilla.opendarwin.org/show_bug.cgi?id=5518
We had code that checked for whether a call came from a live PlugIn,
but the live PlugIn dictionary would only get cleared when the
KWQKHTMLPart was destroyed. Since a single part can service multiple
loads, the dictionary needs to clear after each one.
No layout test because this bug is difficult to reproduce.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::~KWQKHTMLPart):
(1) Unrelated cleanup: Removed manual clearing of form values,
replaced with call to clearRecordedFormValues().
(2) Replaced PlugIn dictionary cleanup code and view deref call
with call to setView(0), since much of this code was duplicated in
setView, and the stuff that wasn't duplicated needed to be.
(KWQKHTMLPart::setView):
(1) Removed some unnecessary braces.
(2) Added PlugIn dictionary cleanup code.
(3) New behavior: clear _bindingRoot and _windowScriptObject after
each view change. This is needed because after a call to
clenaupPluginRootObjects(), both objects have stale references.
(4) Changed a NULL to a 0.
(KWQKHTMLPart::cleanupPluginRootObjects): Removed extra space.
2005-12-28 Anders Carlsson <andersca@mac.com>
Reviewed by Maciej.
- Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6268
Add undetectable document.all
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocument::getValueProperty):
If "all" has been set to a new value, return the new value.
(KJS::KJS::HTMLDocument::putValueProperty):
Allow "all" to be set to a new value.
(KJS::HTMLAllCollection::toPrimitive):
Return jsNull() if the preferred type is NullType.
(KJS::getAllHTMLCollection):
* khtml/ecma/kjs_html.h:
(KJS::HTMLAllCollection::HTMLAllCollection):
Add HTMLAllCollection, a subclass of HTMLCollection which should
be undetectable.
(KJS::HTMLAllCollection::toBoolean):
Return false.
2005-12-28 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Eric, landed by ap.
Test: fast/block/basic/text-indent-rtl.html
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6214
text-indent in RTL block does the opposite
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::rightRelOffset): Subtract the indent instead of adding it.
2005-12-28 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin, landed by ap.
Test: fast/dom/HTMLScriptElement/script-load-events.html
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5812
Generate load events for <script> elements
* khtml/html/html_headimpl.cpp:
(HTMLScriptElementImpl::parseMappedAttribute): Parse the onload and onerror attributes.
(HTMLScriptElementImpl::closeRenderer): Call base class's implementation.
(HTMLScriptElementImpl::notifyFinished): Dispatch load and error events.
* khtml/html/htmlparser.h:
* khtml/html/htmlparser.cpp:
(HTMLParser::parseToken): Return the node that was inserted.
* khtml/html/htmltokenizer.h: Added scriptNode, a RefPtr to the node corresponding
to the current load request.
* khtml/html/htmltokenizer.cpp:
(HTMLTokenizer::scriptHandler): Reset scriptNode if a load request was not made.
(HTMLTokenizer::parseTag): Set scriptNode to the node created from the script tag.
(HTMLTokenizer::processToken): Return the node that was inserted.
(HTMLTokenizer::notifyFinished): Reset scriptNode and dispatch load and error events.
* khtml/misc/loader.h:
(CachedScript::errorOccurred): Added.
* khtml/misc/loader.cpp:
(CachedScript::CachedScript):
(CachedScript::error):
2005-12-28 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Maciej.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6246
TextIterator::rangeFromLocationAndLength() returns nil range for an
empty document
Test: editing/input/range-for-empty-document.html
* khtml/editing/visible_text.cpp:
(khtml::TextIterator::rangeFromLocationAndLength):
Handle the case of an empty document and (0, 0) requested range.
2005-12-28 Anders Carlsson <andersca@mac.com>
Reviewed and landed by Geoff.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6269
ToT memory corruption
* khtml/rendering/render_text.cpp:
(khtml::RenderText::setText):
Remove deref().
2005-12-27 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Hyatt, landed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5699
REGRESSION: incomplete repaint
* khtml/rendering/render_object.cpp:
(RenderObject::repaintAfterLayoutIfNeeded): Return false if only the
size changed and not everything was repainted.
* manual-tests/bugzilla-5699.html: Added.
2005-12-27 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Maciej, landed by Darin.
- fixed <http://bugzilla.opendarwin.org/show_bug.cgi?id=4101>
CSS Fibonacci spiral using 4 images doesn't render correctly
Added layout tests:
* fast/replaced/absolute-image-sizing.html
* khtml/rendering/render_box.cpp:
(RenderBox::calcAbsoluteHorizontalValues): Use calcReplacedWidth() instead of intrinsicWidth()
for replaced elements.
(RenderBox::calcAbsoluteVerticalValues): Same thing for height.
2005-12-27 Darin Adler <darin@apple.com>
Reviewed by Geoff and Eric.
- http://bugzilla.opendarwin.org/show_bug.cgi?id=6198
use RefPtr a few places in RenderText and related classes
* khtml/html/htmltokenizer.h: Use RefPtr for some data members in Token.
Also removed use of bitfields in Token, since there's no need to optimize storage here.
* khtml/html/htmlparser.cpp:
(HTMLParser::parseToken): Update for use of RefPtr in Token.
(HTMLParser::textCreateErrorCheck): Ditto.
(HTMLParser::commentCreateErrorCheck): Ditto.
(HTMLParser::handleIsindex): Ditto.
* khtml/html/htmltokenizer.cpp:
(khtml::Token::addAttribute): Ditto.
(khtml::HTMLTokenizer::processToken): Ditto.
* khtml/rendering/render_text.h: Reduce the number of includes, change
SOFT_HYPHEN from a macro into a constant. Change originalString function
to return a PassRefPtr instead of a RefPtr. Make str and m_generatedContentStr
member be a RefPtr.
* khtml/rendering/render_text.cpp:
(khtml::RenderText::previousOffset): Update for use of RefPtr for str.
(khtml::RenderText::nextOffset): Ditto.
(khtml::RenderText::RenderText): Ditto.
(khtml::RenderText::originalString): Change to return PassRefPtr, even though
it's not necessary at this level (since it's a virtual function).
(khtml::RenderText::posOfChar): Update for use of RefPtr for str.
(khtml::RenderText::setText): Ditto.
(khtml::RenderTextFragment::RenderTextFragment): Ditto.
(khtml::RenderTextFragment::originalString): Change to return PassRefPtr.
* khtml/html/html_inlineimpl.cpp: Re-sorted list of includes, added newly-needed ones.
* kwq/KWQRenderTreeDebug.cpp: Added new include needed since QPtrVector is no longer
included by render_text.h.
2005-12-27 Darin Adler <darin@apple.com>
Fix suggested by Mitz.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6240
REGRESSION: scrollbars in overflows don't work
* khtml/xml/dom2_eventsimpl.cpp: (DOM::MouseRelatedEventImpl::computePositions):
Remove the code to compute pageX/Y from clientX/Y, because clientX/Y are not passed
in correctly (in fact, what's passed in is pageX/Y)! I accidentally included part
of my fix for clientX/Y in the original patch.
2005-12-27 Maks Orlovich <maksim@kde.org>
Reviewed and landed by Maciej.
- fixed 4405: <button> not listed in form collections.
http://bugzilla.opendarwin.org/show_bug.cgi?id=4405
Test: fast/forms/button-in-forms-collection.html
* khtml/html/html_formimpl.h:
(DOM::HTMLButtonElementImpl::isEnumeratable): override to return true
2005-12-25 Maciej Stachowiak <mjs@apple.com>
Reviewed by Geoff.
- Remove WebFrame's parent frame pointer, instead rely on WebCore's parent concept
http://bugzilla.opendarwin.org/show_bug.cgi?id=6241
* kwq/WebCoreBridge.h:
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge parent]): New method, relies on the KHTMLPart's
parent pointer.
2005-12-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by eseidel.
Test: fast/forms/domstring-replace-crash.html
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6236
REGRESSION: Crash in DOMString::replace() in ToT (12/24/05)
* khtml/dom/dom_string.h:
(DOMString::replace): Added check for null m_impl.
2005-12-24 Maciej Stachowiak <mjs@apple.com>
Reviewed by Eric.
- replaced QPtrDict for Accessors structs with HashMap (also renamed some
stray getSetInfo methods)
http://bugzilla.opendarwin.org/show_bug.cgi?id=6223
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLElement::accessors):
(KJS::HTMLElement::getValueProperty):
(KJS::HTMLElement::putValueProperty):
* khtml/ecma/kjs_html.h:
2005-12-24 Geoffrey Garen <ggaren@apple.com>
Reviewed by eric.
http://bugzilla.opendarwin.org/show_bug.cgi?id=6231
- Fixed assertion failure in QString::mid caused by my last checkin.
parseWindowFeatures() sometimes called QString::mid() with a start
index past the end of the string but a length of 0. There were two
problems there. (1) parseWindowFeatures() shouldn't have gotten past
the end of the string. (2) QString had range truncating code that was
borked. So I fixed both.
* khtml/ecma/kjs_window.cpp:
(KJS::parseWindowFeatures): One of the "past the end" tests was >
instead of >=.
* kwq/KWQString.mm:
(QString::mid): Truncate length *before* deciding whether to return
early. Also, compare start and data._length before computing
data._length - start, because the error case we're trying to catch
will almost certainly cause unsigned overflow.
* manual-tests/window-open-features-parsing.html: Added trailing ','
to uber-test to catch this failure, too.
2005-12-24 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Maciej.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6221
REGRESSION: Password field is blank error for secure websites using
password field (ToT, 12/24/05)
* khtml/kwq/KWQSlot.mm:
(KWQSlot::KWQSlot): Changed the parameter type of slotTextChanged to const DOMString &
* khtml/rendering/render_form.h:
* khtml/rendering/render_form.cpp:
(RenderLineEdit::RenderLineEdit): ditto.
(RenderLineEdit::slotTextChanged): ditto.
(RenderFileButton::RenderFileButton): ditto.
(RenderFileButton::slotTextChanged): ditto.
2005-12-22 Geoffrey Garen <ggaren@apple.com>
Reviewed by vicki (yay!), eric.
- Fixed: <rdar://problem/4377597> parsing of window.open features strings needs to be more forgiving
Manual test case: WebCore/manual-tests/window-open-features-parsing.html
Also fixed: WebCore/manual-tests/window-open-features.html, which had an incorrect URL in it.
This patch is long. Luckily, it's also complicated.
The main thing I've done is to change our parsing of the window.open 'features' argument to match Win IE.
This is important because we now implement the correct defaults for window.open, and resizing and
scrolling are turned off by default. So, if we parse the 'features' string incorrectly, we'll end
up with an annoying, incorrectly sized window that can't resize or scroll.
To honor a long-standing request by Eric, I factored out the parsing into two new functions:
parseWindowFeatures and constrainToScreen. I also added support for "innerWidth" and "innerHeight,"
since they're just synonyms for "width" and "height."
* khtml/ecma/kjs_window.cpp: removed "emit" statements, since emit is #defined as ""
(KJS::parseDialogFeatures): renamed from parseFeatures, since we now have a 'parseWindowFeatures'.
(KJS::showModalDialog): ditto on parseFeatures. Also added some missing initializations for WindowArgs data members.
(KJS::parseWindowFeatures): new function, all new functionality.
(KJS::constrainToScreen): new function, no new functionality -- just cut and pasted code that used to run as
part of our parsing routine.
(KJS::WindowFunc::callAsFunction):
(1) Factored out previous parsing code.
(2) Factored 17 lines of custom popup-blocking code into 3 lines that use pre-existing 'allowPopUp' function.
Gratuitous, but it cried out to me.
(3) Changed URL parsing to substitute "" for undefined *and* null values (we already did this for undefined),
to avoid trying to navigate to 'http://null'.
(4) Factore a multiline if () { if () {}} into an if ( && )
(4) Removed the main body of code from a giant 'else' block by inserting early returns for the exceptional cases.
This caused some things to show up in the diff even though they're just whitespace changes.
I didn't actually change any code past the line "if (!str.isEmpty() && activePart)"
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow): Added code to set toolbars to visible if toolBarVisible is true *or*
locationBarVisible is true. The parser used to do this for us, but it's really the browser that's responsible for
saying that the toolbar and the locationbar are the same thing. Hopefully, we can add a setLocationBarVisible delegate
in the future so that other webkit clients can make their own UI decisions.
* kwq/KWQKPartsBrowserExtension.h: Added locationBarVisible data member to WindowArgs structure and renamed
toolBarsVisible to toolBarVisible (see above). Removed initialization code from WindowArgs structure because
this file is for platform-specific code, and what defaults to use for window arguments is purely engine stuff.
2005-12-23 Eric Seidel <eseidel@apple.com>
Reviewed by mjs.
Remove many use of .qstring()
Convert several instances of QStrings to DOMStrings
Add DOMString::replace(QChar, QChar)
Remove (unused) KWQLabel, KWQKGlobal
Slight performance improvement.
Also fixed ChangeLog line endings from previous commit.
http://bugzilla.opendarwin.org/show_bug.cgi?id=6138
No tests needed, no functionality changes.
* ChangeLog: Fixed line endings
* ForwardingHeaders/kglobal.h: Removed.
* ForwardingHeaders/qlabel.h: Removed.
* WebCore.xcodeproj/project.pbxproj: removed KWQLabel
* khtml/css/css_base.cpp:
(CSSSelector::selectorText):
* khtml/css/css_stylesheetimpl.cpp:
(MediaListImpl::setMediaText):
* khtml/css/cssstyleselector.cpp:
(khtml::checkPseudoState):
* khtml/dom/dom_string.h:
(DOM::DOMString::replace):
* khtml/ecma/kjs_css.cpp:
(KJS::DOMCSSStyleDeclaration::put):
* khtml/ecma/kjs_dom.cpp:
(KJS::DOMNode::put):
(KJS::DOMAttr::put):
(KJS::DOMDocument::put):
* khtml/ecma/kjs_events.cpp:
(KJS::JSAbstractEventListener::handleEvent):
* khtml/ecma/kjs_html.cpp:
(KJS::KJS::HTMLDocument::put):
(KJS::KJS::HTMLElementFunction::callAsFunction):
(KJS::KJS::HTMLElement::put):
(KJS::KJS::Context2DFunction::callAsFunction):
(KJS::Context2D::putValueProperty):
* khtml/ecma/kjs_proxy.cpp:
(KJSProxyImpl::evaluate):
* khtml/ecma/kjs_window.cpp:
(KJS::Window::isSafeScript):
(KJS::WindowFunc::callAsFunction):
(KJS::ScheduledAction::execute):
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::send):
(KJS::XMLHttpRequestProtoFunc::callAsFunction):
* khtml/ecma/xmlhttprequest.h:
* khtml/editing/jsediting.cpp:
(DOM::JSEditor::queryCommandSupported):
* khtml/editing/markup.cpp:
(khtml::stringValueForRange):
(khtml::startMarkup):
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::parseMappedAttribute):
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::addHTMLAlignment):
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::formData):
(DOM::HTMLInputElementImpl::appendFormData):
(DOM::HTMLTextAreaElementImpl::updateValue):
* khtml/html/html_headimpl.cpp:
(HTMLLinkElementImpl::parseMappedAttribute):
* khtml/html/html_imageimpl.cpp:
(DOM::HTMLImageElementImpl::parseMappedAttribute):
* khtml/html/html_objectimpl.cpp:
(DOM::HTMLObjectElementImpl::parseMappedAttribute):
(DOM::HTMLParamElementImpl::isURLAttribute):
* khtml/html/html_objectimpl.h:
* khtml/html/html_tableimpl.cpp:
(DOM::HTMLTableElementImpl::addChild):
(DOM::HTMLTableElementImpl::parseMappedAttribute):
(DOM::HTMLTablePartElementImpl::parseMappedAttribute):
(DOM::HTMLTableSectionElementImpl::addChild):
(DOM::HTMLTableRowElementImpl::addChild):
* khtml/html/htmltokenizer.cpp:
(khtml::HTMLTokenizer::parseTag):
* khtml/khtml_part.cpp:
(KHTMLPart::executeScript):
(KHTMLPart::checkEmitLoadEvent):
* khtml/misc/loader.cpp:
(CachedObject::finish):
(CachedCSSStyleSheet::checkNotify):
(CachedXSLStyleSheet::checkNotify):
(CachedXBLDocument::checkNotify):
(DocLoader::requestImage):
(DocLoader::requestStyleSheet):
(DocLoader::requestScript):
(Loader::servePendingRequests):
(Loader::cancelRequests):
* khtml/rendering/render_applet.cpp:
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::updateFirstLetter):
* khtml/rendering/render_box.cpp:
(RenderBox::~RenderBox):
* khtml/rendering/render_form.cpp:
(RenderFormElement::slotTextChanged):
(RenderLineEdit::updateFromElement):
(RenderTextArea::updateFromElement):
(RenderTextArea::text):
* khtml/rendering/render_form.h:
* khtml/rendering/render_frames.cpp:
(RenderPartObject::updateWidget):
* khtml/rendering/render_line.cpp:
(khtml::EllipsisBox::paint):
* khtml/rendering/render_list.cpp:
(RenderListItem::paint):
(RenderListMarker::paint):
* khtml/rendering/render_text.cpp:
(khtml::RenderText::RenderText):
(khtml::RenderText::position):
* khtml/xml/dom_docimpl.cpp:
(DOMImplementationImpl::hasFeature):
(DocumentImpl::getElementByAccessKey):
(DocumentImpl::recalcStyleSelector):
(DocumentImpl::defaultEventHandler):
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::recalcStyle):
* khtml/xml/dom_nodeimpl.cpp:
(DOM::NodeImpl::dump):
(DOM::appendAttributeDesc):
(DOM::NodeImpl::showNode):
* khtml/xml/dom_stringimpl.cpp:
(DOM::DOMStringImpl::lower):
* khtml/xml/xml_tokenizer.cpp:
(khtml::XMLTokenizer::executeScripts):
* khtml/xsl/xsl_stylesheetimpl.cpp:
(DOM::XSLStyleSheetImpl::loadChildSheets):
* kwq/KWQKHTMLPart.h:
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::documentViewForNode):
(KWQKHTMLPart::runJavaScriptAlert):
(KWQKHTMLPart::runJavaScriptConfirm):
(KWQKHTMLPart::runJavaScriptPrompt):
(KWQKHTMLPart::addMessageToConsole):
(KWQKHTMLPart::passWheelEventToChildWidget):
(KWQKHTMLPart::shouldDragAutoNode):
(KWQKHTMLPart::snapshotDragImage):
(convertAttributesToUnderlines):
(KWQKHTMLPart::setMarkedTextRange):
(KWQKHTMLPart::mousePressNode):
* kwq/KWQKGlobal.h: Removed.
* kwq/KWQKGlobal.mm: Removed.
* kwq/KWQLabel.h: Removed.
* kwq/KWQLabel.mm: Removed.
* kwq/KWQLineEdit.h:
* kwq/KWQLineEdit.mm:
(QLineEdit::setText):
(QLineEdit::text):
(QLineEdit::setAutoSaveName):
(QLineEdit::setPlaceholderString):
* kwq/KWQPainter.mm:
(QPainter::compositeOperatorFromString):
* kwq/KWQSignal.h:
* kwq/KWQSignal.mm:
(KWQSignal::call):
* kwq/KWQSlot.h:
* kwq/KWQSlot.mm:
(KWQSlot::call):
* kwq/KWQString.h:
* kwq/KWQString.mm:
* kwq/KWQTextEdit.h:
* kwq/KWQTextEdit.mm:
(QTextEdit::setText):
(QTextEdit::text):
(QTextEdit::textWithHardLineBreaks):
* ksvg2/scripts/cssmakeprops: removed kglobal.h
* ksvg2/scripts/cssmakevalues: removed kglobal.h
2005-12-23 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Eric Seidel.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5924
Zero-length responses to XMLHTTPRequest mishandled
* khtml/ecma/xmlhttprequest.cpp (KJS::XMLHttpRequest::slotFinished):
Make sure to fetch response headers and set the state to Loaded, if
this hasn't been done already.
2005-12-23 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Eric Seidel.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=3565
Posting data via XML HTTP Request doesnt work
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::send): Set application/xml as a default Content-Type;
use a proper codec for request body if a charset is specified.
(KJS::XMLHttpRequest::getRequestHeader): Use getSpecificHeader.
(KJS::XMLHttpRequest::getResponseHeader): Ditto.
(KJS::XMLHttpRequest::getSpecificHeader): Factored out code from getResponseHeader.
(KJS::XMLHttpRequestProtoFunc::callAsFunction): Removed a FIXME (this is done in send() now).
* khtml/ecma/xmlhttprequest.h:
2005-12-22 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin Adler.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6118
Investigate not using the frameset charset as a default for frames
* khtml/khtml_part.cpp (KHTMLPart::write):
Do not use the parent frame encoding as a default for sub-frames (revert
rdar://3100151).
2005-12-22 Maciej Stachowiak <mjs@apple.com>
Reviewed by Eric.
- made RefPtr<DOMStringImpl> usable as a hashtable key/value
- changed XSLTProcessorImpl to make use of this instead of a QDict.
- partially fixed broken param handling for xslt
See LayoutTests for updated test case.
* khtml/xml/dom_stringimpl.cpp:
* khtml/xml/dom_stringimpl.h:
(KXMLCore::): Set things up so you can use RefPtr<DOMStringImpl> as
a hashtable key (should already be usable as a value).
* khtml/xsl/xslt_processorimpl.cpp:
(DOM::xsltParamArrayFromParameterMap): Updated to use a HashMap of RefPtrs instead
of QDict. Also, fixed bugs that would have kept this from ever working at all.
(DOM::XSLTProcessorImpl::transformToString): ditto
(DOM::XSLTProcessorImpl::setParameter): ditto
(DOM::XSLTProcessorImpl::getParameter): ditto
(DOM::XSLTProcessorImpl::removeParameter): ditto
* khtml/xsl/xslt_processorimpl.h:
2005-12-21 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- update for new HashTranslator stuff
* khtml/xml/dom_atomicstring.cpp:
(DOM::CStringTranslator::hash):
(DOM::CStringTranslator::equal):
(DOM::CStringTranslator::translate):
(DOM::AtomicString::equal):
(DOM::AtomicString::add):
(DOM::QCharBufferTranslator::hash):
(DOM::QCharBufferTranslator::equal):
(DOM::QCharBufferTranslator::translate):
* khtml/xml/dom_qname.cpp:
(DOM::QNameComponentsTranslator::hash):
(DOM::QNameComponentsTranslator::equal):
(DOM::QNameComponentsTranslator::translate):
(DOM::QualifiedName::QualifiedName):
2005-12-22 Adele Peterson <adele@apple.com>
Reviewed by Darin.
Cleaned up a previous checkin by defining global const defaultForm.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::radioButtonChecked):
(DocumentImpl::checkedRadioButtonForGroup):
(DocumentImpl::removeRadioButtonGroup):
2005-12-22 Adele Peterson <adele@apple.com>
Reviewed by Tim Hatcher.
Fixed <rdar://problem/4387433> Seed: Radio buttons behave incorrectly in Gmail settings
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::registerFormElement): update radio button hash map when moving form elements around.
(DOM::HTMLGenericFormElementImpl::insertedIntoTree): ditto.
* khtml/html/html_formimpl.h:
(DOM::HTMLGenericFormElementImpl::isRadioButton): Added.
(DOM::HTMLInputElementImpl::isRadioButton): Added.
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::radioButtonChecked):
Added comment explaining that we use 1 for the default form. We can't use a null pointer as a key for the hash map.
(DocumentImpl::checkedRadioButtonForGroup): Added conversion of null form pointer to 1.
(DocumentImpl::removeRadioButtonGroup): ditto.
2005-12-22 Anders Carlsson <andersca@mac.com>
Reviewed by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6196
Would like to be able to define prototypes in headers
* khtml/ecma/XSLTProcessor.cpp:
* khtml/ecma/domparser.cpp:
* khtml/ecma/kjs_css.cpp:
* khtml/ecma/kjs_dom.cpp:
* khtml/ecma/kjs_events.cpp:
* khtml/ecma/kjs_html.cpp:
* khtml/ecma/kjs_range.cpp:
* khtml/ecma/kjs_traversal.cpp:
* khtml/ecma/kjs_views.cpp:
* khtml/ecma/xmlhttprequest.cpp:
* khtml/ecma/xmlserializer.cpp:
Update for changes to JSC.
2005-12-22 Darin Adler <darin@apple.com>
Reviewed by NOBODY (OOPS!).
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6198
use RefPtr a few places in RenderText and related classes
* khtml/html/htmlparser.cpp:
(HTMLParser::parseToken): Use get since text pointer is RefPtr now.
(HTMLParser::textCreateErrorCheck): Ditto.
(HTMLParser::commentCreateErrorCheck): Ditto.
(HTMLParser::handleIsindex): Get rid of explicit deref, no longer needed.
* khtml/html/htmltokenizer.h: Make attrs and text fields of Token use
RefPtr. Also stop using bit fields for the flags in Token -- there's no
evidence this makes things faster.
* khtml/html/htmltokenizer.cpp:
(khtml::Token::addAttribute): Get rid of explicit ref, no longer needed.
(khtml::HTMLTokenizer::processToken): Ditto.
* khtml/rendering/render_block.cpp: (khtml::RenderBlock::updateFirstLetter):
Use a PassRefPtr.
* khtml/rendering/render_text.cpp:
(khtml::RenderText::previousOffset): Use get since str pointer is RefPtr now.
(khtml::RenderText::nextOffset): Ditto.
(khtml::RenderText::RenderText): Get rid of explicit ref, no longer needed.
Change to use initializer syntax instead of assignment.
(khtml::RenderText::setStyle): Use PassRefPtr.
(khtml::RenderText::originalString): Ditto.
(khtml::RenderText::setText): Get rid of explicit ref, no longer needed.
(khtml::RenderTextFragment::RenderTextFragment): Get rid of explicit ref,
no longer needed.
(khtml::RenderTextFragment::originalString): Use PassRefPtr.
* khtml/rendering/render_text.h: Change SOFT_HYPEN to be a constant rather than
a preprocessor macro. Used PassRefPtr in a couple places. Made RenderText's str
and RenderTextFragment's m_generatedContentStr be RefPtr.
* khtml/html/html_inlineimpl.cpp: Add a newly-needed include, sort them.
* kwq/KWQRenderTreeDebug.cpp: Add a newly-needed include.
2005-12-22 Darin Adler <darin@apple.com>
Reviewed by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6193
remove some unused KWQ code
* kcanvas/KCanvasCreator.cpp: (KCanvasCreator::self): Don't use static deleter for
two reasons: (1) We don't want any globals with constructors in any of our frameworks
because they slow down framework load time. (2) There's no need to destroy this object at
process termination time -- it's extra work with no benefit. Because of both these
reasons, our KStaticDeleter implementation was basically a no-op.
* ksvg2/svg/SVGDOMImplementationImpl.cpp: (SVGDOMImplementationImpl::self): Ditto.
* khtml/xml/dom_docimpl.cpp: (DocumentImpl::setDocumentChanged): Ditto.
* khtml/html/html_canvasimpl.cpp: Removed include of kstringhandler.h.
* khtml/html/html_imageimpl.cpp: Ditto.
* khtml/khtmlpart_p.h: Removed something that was in an "APPLE_CANGES" ifdef.
* ForwardingHeaders/kstaticdeleter.h: Removed.
* ForwardingHeaders/kstringhandler.h: Removed.
* kwq/KWQKStaticDeleter.h: Removed.
* kwq/KWQKStringHandler.h: Removed.
* kwq/KWQKStringHandler.mm: Removed.
* WebCore.xcodeproj/project.pbxproj: Removed files.
2005-12-22 Darin Adler <darin@apple.com>
Reviewed by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6192
add support for non-standard &nsup; entity (implemented in other browsers)
* khtml/html/kentities.gperf: Add "nsup" to table.
* khtml/html/htmltokenizer.cpp: Removed old workaround for inlining issue that no
longer seems to be necessary; also touches the file which is important because
Xcode doesn't seem to understand the dependency on kentities.gperf and the need
to recompile.
2005-12-22 Darin Adler <darin@apple.com>
Reviewed by Eric.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6167
RenderStyle default constructor should initialize its members for speed
* khtml/rendering/DataRef.h: (khtml::DataRef::operator=): Eliminate an extra
branch by doing ref before deref instead of == check.
* khtml/rendering/render_style.cpp:
(khtml::initDefaultStyle): Added. Function to initialize the default style
for use in constructor.
(khtml::RenderStyle::RenderStyle): Changed constructor to initalize all the
members with constructor syntax instead of using assignment on all of them.
* khtml/rendering/render_style.h: Removed static data member _default --
it's now a file scope global instead.
2005-12-21 Darin Adler <darin@apple.com>
Reviewed by Justin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6142
intermittent failures in some paste tests
* khtml/editing/apply_style_command.cpp:
(khtml::ApplyStyleCommand::applyBlockStyle): Call new updateLayout member function.
(khtml::ApplyStyleCommand::applyInlineStyle): Ditto.
(khtml::ApplyStyleCommand::pushDownTextDecorationStyleAtBoundaries): Ditto.
* khtml/editing/composite_edit_command.cpp:
(khtml::CompositeEditCommand::addBlockPlaceholderIfNeeded): Ditto.
(khtml::CompositeEditCommand::findBlockPlaceholder): Ditto.
(khtml::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Ditto.
* khtml/editing/delete_selection_command.cpp:
(khtml::DeleteSelectionCommand::fixupWhitespace): Ditto.
(khtml::DeleteSelectionCommand::moveNodesAfterNode): Ditto.
* khtml/editing/edit_command.cpp:
(khtml::EditCommand::apply): Ditto.
(khtml::EditCommand::unapply): Ditto.
(khtml::EditCommand::reapply): Ditto.
(khtml::EditCommand::updateLayout): Added. Calls updateLayoutIgnorePendingStylesheets
on the document.
* khtml/editing/edit_command.h: Added updateLayout member function.
* khtml/editing/insert_line_break_command.cpp:
(khtml::InsertLineBreakCommand::doApply): Call new updateLayout member function.
* khtml/editing/insert_paragraph_separator_command.cpp:
(khtml::InsertParagraphSeparatorCommand::doApply): Ditto.
* khtml/editing/jsediting.cpp:
(DOM::JSEditor::execCommand): Call updateLayoutIgnorePendingStylesheets instead of updateLayout.
(DOM::JSEditor::queryCommandEnabled): Ditto.
(DOM::JSEditor::queryCommandIndeterm): Ditto.
(DOM::JSEditor::queryCommandState): Ditto.
(DOM::JSEditor::queryCommandValue): Ditto.
* khtml/editing/markup.cpp: (khtml::createMarkup): Ditto.
* khtml/editing/replace_selection_command.cpp:
(khtml::ReplacementFragment::insertFragmentForTestRendering): Ditto.
(khtml::ReplaceSelectionCommand::fixupNodeStyles): Call new updateLayout member function.
(khtml::ReplacementFragment::computeStylesUsingTestRendering): Call
updateLayoutIgnorePendingStylesheets instead of updateLayout.
(khtml::ReplaceSelectionCommand::doApply): Call new updateLayout member function.
(khtml::ReplaceSelectionCommand::removeLinePlaceholderIfNeeded): Ditto.
(khtml::ReplaceSelectionCommand::completeHTMLReplacement): Ditto.
* khtml/editing/visible_units.cpp:
(khtml::previousLinePosition): Call updateLayoutIgnorePendingStylesheets instead of updateLayout.
(khtml::nextLinePosition): Ditto.
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::innerText): Ditto.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge setSelectedDOMRange:affinity:closeTyping:]): Ditto.
(-[WebCoreBridge smartDeleteRangeForProposedRange:]): Ditto.
2005-12-21 Darin Adler <darin@apple.com>
Reviewed by Geoff.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6177
move event code from JavaScript binding into DOM implementation
* khtml/ecma/kjs_events.cpp:
(KJS::DOMMouseEvent::getValueProperty): Change everything to just call through instead of doing
the work here.
(KJS::DOMWheelEvent::getValueProperty): Ditto.
* khtml/xml/dom2_eventsimpl.h:
(DOM::MouseRelatedEventImpl::offsetX):
(DOM::MouseRelatedEventImpl::offsetY):
* khtml/xml/dom2_eventsimpl.cpp:
(DOM::MouseRelatedEventImpl::MouseRelatedEventImpl): Initialize new m_pageX, m_pageY, m_layerX,
m_layerY, m_offsetX, and m_offsetY.
(DOM::MouseRelatedEventImpl::computePositions): Renamed from computeLayerPos since it handles
page position andoffset position too now.
(DOM::MouseRelatedEventImpl::pageX): Added. Not in header since it's virtual.
(DOM::MouseRelatedEventImpl::pageY): Ditto.
(DOM::MouseRelatedEventImpl::x): Added, with FIXME since it should change eventually.
(DOM::MouseRelatedEventImpl::y): Ditto.
(DOM::MouseEventImpl::initMouseEvent): Call computePositions instead of computeLayerPos.
(DOM::MouseEventImpl::toElement): Added.
(DOM::MouseEventImpl::fromElement): Added.
2005-12-21 Timothy Hatcher <timothy@apple.com>
* WebCore.xcodeproj/project.pbxproj:
Set tab width to 8, indent width to 4 and uses tabs to false per file.
2005-12-21 John Sullivan <sullivan@apple.com>
Reviewed by Tim Omernick and Darin Adler.
- fixed HiDPI problem with forms auto-fill menu width
No test cases added; this code is used for "chrome" only.
* kwq/DOMHTML.mm:
(-[DOMHTMLInputElement _rectOnScreen]):
convert entire rect to window coordinates, not just origin
2005-12-21 David Harrison <harrison@apple.com>
Reviewed by Justin.
<rdar://problem/4039777> Pasting particular snippet of HTML containing list items and a link creates too many list items
- Fixed paste crash by making calling RenderBox::deleteLineBoxWrapper() from RenderObject::remove(),
so that the connection is broken before the InlineBox's parent gets deleted.
- Fixed overzealous style changes when setting the style on a specific range of elements. These specific
ranges are derived programmatically, e.g. as a part of pasting, so they must be respected exactly rather
than modified by converting the endpoints to VisiblePositions.
Test cases coming soon.
* khtml/editing/apply_style_command.cpp:
(khtml::ApplyStyleCommand::ApplyStyleCommand):
(khtml::ApplyStyleCommand::updateStartEnd):
(khtml::ApplyStyleCommand::startPosition):
(khtml::ApplyStyleCommand::endPosition):
(khtml::ApplyStyleCommand::applyBlockStyle):
(khtml::ApplyStyleCommand::applyRelativeFontStyleChange):
(khtml::ApplyStyleCommand::applyInlineStyle):
(khtml::ApplyStyleCommand::removeInlineStyle):
(khtml::ApplyStyleCommand::splitTextAtStartIfNeeded):
(khtml::ApplyStyleCommand::splitTextAtEndIfNeeded):
(khtml::ApplyStyleCommand::splitTextElementAtStartIfNeeded):
(khtml::ApplyStyleCommand::splitTextElementAtEndIfNeeded):
(khtml::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
(khtml::ApplyStyleCommand::mergeEndWithNextIfIdentical):
(khtml::ApplyStyleCommand::joinChildTextNodes):
* khtml/editing/apply_style_command.h:
* khtml/editing/composite_edit_command.cpp:
(khtml::CompositeEditCommand::applyStyle):
* khtml/editing/composite_edit_command.h:
* khtml/editing/insert_line_break_command.cpp:
(khtml::InsertLineBreakCommand::doApply):
* khtml/editing/replace_selection_command.cpp:
(khtml::ReplaceSelectionCommand::fixupNodeStyles):
(khtml::ReplaceSelectionCommand::completeHTMLReplacement):
* khtml/rendering/render_box.cpp:
(RenderBox::destroy):
(RenderBox::deleteLineBoxWrapper):
* khtml/rendering/render_box.h:
* khtml/rendering/render_list.cpp:
(RenderListMarker::~RenderListMarker):
(RenderListMarker::setStyle):
* khtml/rendering/render_object.cpp:
(RenderObject::remove):
* khtml/rendering/render_object.h:
* khtml/rendering/render_replaced.cpp:
(RenderWidget::destroy):
2005-12-20 Adele Peterson <adele@apple.com>
Reviewed by Darin.
Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5911
REGRESSION: Page scroll position jumps when clicking on word in editable div
I moved the scrolling code out of setFocusNode, and consolidated some of the focus code to scroll when necessary.
* khtml/html/html_formimpl.cpp: Removed HTMLButtonElementImpl::blur, HTMLButtonElementImpl::focus, HTMLInputElementImpl::blur, HTMLInputElementImpl::focus.
New code in ElementImpl::focus will now handle these cases. This allows tabbing through the elements to go through the same code path as calling focus() on an element.
Before, focus() would scroll to reveal for any form elements that had a RenderWidget, but wouldn't scroll for anchor elements, or any of the new form elements.
Now the behavior will be more consistent.
(DOM::HTMLLabelElementImpl::focus): calls ElementImpl::focus.
(DOM::HTMLLegendElementImpl::focus): ditto.
* khtml/html/html_formimpl.h:
* khtml/khtml_part.cpp:
(KHTMLPart::selectAll): calls new function selectContentsOfNode
(KHTMLPart::selectContentsOfNode): factored out code to selectAll for a particular node- which is useful for contenteditable elements.
* khtml/khtml_part.h: added selectContentsOfNode
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::setFocusNode): removed scrolling code.
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::focus): Calls updateLayout in case focus() is called before there's a renderer.
Makes a selection for editable elements (right now we select all, but this will change).
Doesn't scroll if the renderer is a RenderWidget, since that is handled when the view becomes first responder. This will go away when we convert the rest of our form elements.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::revealSelection): Made this more like centerSelectionInVisibleArea where we get the right rectangle if the selection is a caret.
(KWQKHTMLPart::nextKeyViewInFrame): call ElementImpl::focus() for the node. This will set the selection too, which used to be done here.
2005-12-20 Alexey Proskuryakov <ap@nypop.com>
Reviewed by justin
<http://bugzilla.opendarwin.org/show_bug.cgi?id=4682>
-[WebHTMLView firstRectForCharacterRange:] is using _selectedRange instead of the given range if no marked text
Added layout tests:
* editing/input/firstrectforcharacterrange-styled
* editing/input/firstrectforcharacterrange-plain
* khtml/editing/visible_text.cpp:
(khtml::TextIterator::rangeFromLocationAndLength):
Return null if the range isn't found, instead of a startless/endless
range. Set the end if the requested location+length is out of bounds.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge convertToDOMRange:]): Handle larged unsigned values
before calling rangeWithLocationAndLength, which expects signed ints.
2005-12-20 Adele Peterson <adele@apple.com>
Reviewed by Darin.
Fix for <rdar://problem/4387630> REGRESSION: <select> element's onClick event doesn't fire @ bugweb.apple.com
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::passSubframeEventToSubframe): only pass mouse down for khtmlviews.
2005-12-20 Justin Garcia <justin.garcia@apple.com>
Reviewed by eric, thatcher
<rdar://problem/4172984> KWQExceptions needs to use @try/@catch instead of relying on NSException.h internals
Needed to undef try/catch because of 4333439. Moved the
declarations of variables that are returned from within a @try
block outside the @try block (because of "might be clobbered by
a longjmp or vfork" warnings). Moved some return statements
inside the @try block to fix volatilization errors with gcc4.
* WebCore.xcodeproj/project.pbxproj:
* WebCorePrefix.h:
* kcanvas/device/quartz/KCanvasFilterQuartz.mm:
(KCanvasFEBlendQuartz::getCIFilter):
(KCanvasFEColorMatrixQuartz::getCIFilter):
(KCanvasFECompositeQuartz::getCIFilter):
(getPointLightVectors):
(getLightVectors):
(getNormalMap):
(KCanvasFEDiffuseLightingQuartz::getCIFilter):
(KCanvasFEFloodQuartz::getCIFilter):
(KCanvasFEImageQuartz::getCIFilter):
(KCanvasFEMergeQuartz::getCIFilter):
(KCanvasFESpecularLightingQuartz::getCIFilter):
* kwq/KWQExceptions.h:
* kwq/KWQExceptions.mm:
(KWQReportBlockedException):
* kwq/KWQFileButton.mm:
(KWQFileButton::sizeForCharacterWidth):
(KWQFileButton::frameGeometry):
* kwq/KWQKCursor.mm:
(+[NSCursor _WebCore_cursorWithName:hotSpot:_WebCore_cursorWithName:hotSpot:]):
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::createPart):
(KWQKHTMLPart::nextKeyView):
(KWQKHTMLPart::runJavaScriptPrompt):
(KWQKHTMLPart::keyEvent):
(KWQKHTMLPart::sendContextMenuEvent):
(KWQKHTMLPart::fileWrapperForElement):
(KWQKHTMLPart::attributedString):
(KWQKHTMLPart::imageFromRect):
* kwq/KWQKHTMLPartBrowserExtension.mm:
* kwq/KWQLineEdit.mm:
(QLineEdit::sizeForCharacterWidth):
* kwq/KWQListBox.mm:
(QListBox::sizeForNumberOfLines):
* kwq/KWQLoader.mm:
(KWQCheckCacheObjectStatus):
* kwq/KWQWidget.mm:
(QWidget::frameGeometry):
(QWidget::mapFromGlobal):
2005-12-20 David Harrison <harrison@apple.com>
<rdar://problem/4294417> Cannot un-italicize some text after triple clicking it
Reviewed by Justin.
* khtml/editing/apply_style_command.cpp:
(khtml::ApplyStyleCommand::addInlineStyleIfNeeded):
Removed check for tab span because ApplyStyleCommand::removeCSSStyle() already makes the same check.
2005-12-20 Justin Garcia <justin.garcia@apple.com>
<rdar://problem/4387270> editing/deleting/delete-3800834-fix failing
<http://bugzilla.opendarwin.org/show_bug.cgi?id=6160> REGRESSION: Crash when running editing/deleting/delete-3800834-fix.html
<http://bugzilla.opendarwin.org/show_bug.cgi?id=6161> REGRESSION: crash when pressing tab in editable WebHTMLView
Reviewed by darin
Some callers call setAttribute on a floating element. So, using
a RefPtr for the element inside addAttribute can destroy
it.
* khtml/xml/dom_elementimpl.cpp:
(NamedAttrMapImpl::addAttribute):
2005-12-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed leak in createAttributeMap
http://bugzilla.opendarwin.org/show_bug.cgi?id=6162
* khtml/xml/dom_elementimpl.cpp:
(StyledElementImpl::createAttributeMap): the new attribute map
is going in a RefPtr, don't also ref it manually.
2005-12-20 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- change an assignment to a contructor declaration to build with PassRefPtr
leak fix changes
* ksvg2/svg/SVGTransformableImpl.cpp:
(SVGTransformableImpl::parseTransformAttribute):
2005-12-20 Geoffrey Garen <ggaren@apple.com>
Reviewed by John.
Fixed <rdar://problem/4310363> JavaScript window.open: Height is 1
pixel short, and related bugs.
There were a few bugs here.
(1) Our code took size arguments and applied them to the window's
content rect. That's incorrect. The Rhino book says the arguments
should apply to the WebView. Other things that occupy the content
rect include the tab bar, the status bar, and the 1 pixel border
between brushed metal and document. All of these used to impinge
on the web page's display area.
The fix is to calculate sizing based on the WebView instead of
the content rect. This means that the webViewContentRect and
setContentRect delegate methods are obsolete and no longer called
by any of our code. (setContentRect was never called in the
first place.)
(2) None of our sizing accounted for scaled resolutions.
The fix is to ask the WebView to scale all coordintes for us.
(3) Our code assumed that all window accoutrements were on by default.
Safari works that way, but other WebKit clients might not.
The fix is always to explicitly set an on/off state.
(a) To facilitate scaling, I added a new bridge method, webView, to
access the webView.
(b) For internal consistency, I changed ___Bars to ___bars in bridge
methods, and ___bars to ___Bars in WinArgs data members. (Interestingly,
the different classes in our code are evenly divided on which format to
use.)
Added manual test:
* manual-tests/window-open-features.html: Added.
* manual-tests/resources/200x200.png: Added.
* manual-tests/resources/popup200x200.html: Added.
* khtml/ecma/kjs_window.cpp:
(KJS::showModalDialog): see (b)
(KJS::WindowFunc::callAsFunction): see (b)
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::statusbarVisible): see (b)
* kwq/KWQKHTMLPartBrowserExtension.mm:
(KHTMLPartBrowserExtension::createNewWindow):
At the top of this method, I just did some formatting cleanup and
moved the 'referrer' variable closer to where it's used.
The changes in the middle of the method are (3), the bottom, (2).
* kwq/KWQKPartsBrowserExtension.h:
(KParts::WindowArgs::WindowArgs): see (b)
* kwq/WebCoreBridge.h: see (a)
2005-12-20 Eric Seidel <eseidel@apple.com>
Reviewed by mjs.
Leaks when running SVG tests
http://bugzilla.opendarwin.org/show_bug.cgi?id=6156
No additional tests necessary, leaks already caught by other tests.
* kcanvas/KCanvasFilters.cpp:
(KCanvasFEDiffuseLighting::setLightSource): takes ownership
(KCanvasFESpecularLighting::setLightSource): takes ownership
* kcanvas/KCanvasFilters.h:
(KCanvasFEDiffuseLighting::KCanvasFEDiffuseLighting): added
(KCanvasFEDiffuseLighting::~KCanvasFEDiffuseLighting): added
(KCanvasFEDiffuseLighting::lightSource): fixed spacing
(KCanvasFESpecularLighting::KCanvasFESpecularLighting): added
(KCanvasFESpecularLighting::~KCanvasFESpecularLighting): added
(KCanvasFESpecularLighting::lightSource): fixed spacing
* kcanvas/device/quartz/KRenderingDeviceQuartz.mm:
(KRenderingDeviceQuartz::stringForPath): added missing CFRelease
2005-12-20 Eric Seidel <eseidel@apple.com>
Reviewed by darin.
Remove additional bit-rotted DEBUG* ifdefs from WebCore.
This removes PARSER_DEBUG, FORMS_DEBUG and CSS_STYLESHEET_DEBUG.
http://bugzilla.opendarwin.org/show_bug.cgi?id=5931
No tests possible, only removing dead code.
* khtml/css/css_stylesheetimpl.cpp:
(CSSStyleSheetImpl::parseString):
(CSSStyleSheetImpl::isLoading):
* khtml/html/html_formimpl.cpp:
(DOM::HTMLFormElementImpl::formData):
(DOM::HTMLFormElementImpl::submit):
(DOM::HTMLFormElementImpl::reset):
(DOM::HTMLGenericFormElementImpl::getForm):
* khtml/html/htmlparser.cpp:
(HTMLParser::processCloseTag):
(HTMLParser::createHead):
2005-12-20 Eric Seidel <eseidel@apple.com>
Reviewed by darin.
Move Decoder onto Shared<T> and clients onto RefPtr.
http://bugzilla.opendarwin.org/show_bug.cgi?id=6107
No test cases possible, no functional changes.
* khtml/ecma/XSLTProcessor.cpp:
(KJS::XSLTProcessorProtoFunc::callAsFunction):
* khtml/ecma/xmlhttprequest.cpp:
(KJS::XMLHttpRequest::XMLHttpRequest):
(KJS::XMLHttpRequest::~XMLHttpRequest):
(KJS::XMLHttpRequest::changeState):
(KJS::XMLHttpRequest::abort):
(KJS::XMLHttpRequest::slotFinished):
(KJS::XMLHttpRequest::slotData):
* khtml/ecma/xmlhttprequest.h:
* khtml/khtml_part.cpp:
(KHTMLPart::clear):
(KHTMLPart::begin):
(KHTMLPart::write):
* khtml/khtmlpart_p.h:
(KHTMLPartPrivate::KHTMLPartPrivate):
* khtml/misc/decoder.cpp:
(Decoder::Decoder):
(Decoder::~Decoder):
* khtml/misc/decoder.h:
* khtml/misc/loader.h:
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
(DocumentImpl::~DocumentImpl):
(DocumentImpl::prepareMouseEvent):
(DocumentImpl::setDecoder):
* khtml/xml/dom_docimpl.h:
(DOM::DocumentImpl::decoder):
* khtml/xsl/xslt_processorimpl.cpp:
(DOM::XSLTProcessorImpl::createDocumentFromSource):
2005-12-19 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6143
DOM::ElementImpl should use a RefPtr for the attribute map
* khtml/xml/dom_elementimpl.cpp:
(ElementImpl::ElementImpl): Remove code to initialize the pointer; not needed since
RefPtr gets initialized to 0.
(ElementImpl::~ElementImpl): Remove code to deref the pointer; RefPtr handles that.
(ElementImpl::attributes): Add get() call to get raw pointer.
(ElementImpl::setAttributeMap): Remove code to deref the old map and set the new map.
But added code to clear the element pointer from the old map (missing in the old
version). Also added a FIXME.
(ElementImpl::createAttributeMap): Remove ref(); RefPtr handles that.
(NamedAttrMapImpl::addAttribute): Use a RefPtr to guarantee the element does not go
away in the middle of dispatching DOM events.
(StyledElementImpl::attributeChanged): Clean up code by using the inline function
mappedAttributes() instead of doing type casts.
(StyledElementImpl::parseMappedAttribute): Ditto.
(StyledElementImpl::getClassList): Ditto.
* khtml/xml/dom_elementimpl.h: Make ElementImpl::namedAttrMap be a RefPtr instead
of raw pointer. Added an overload of StyledElementImpl::mappedAttributes for both
const and non-const.
* khtml/xml/dom_nodeimpl.cpp: (DOM::NodeImpl::addChild): Use a RefPtr to ref/deref
the child so that it doesn't leak.
* khtml/html/htmlparser.h: Changed isindex to use a RefPtr.
* khtml/html/htmlparser.cpp:
(HTMLParser::~HTMLParser): Removed now-unneeded ref.
(HTMLParser::isindexCreateErrorCheck): Remove now-unneeded deref/ref.
(HTMLParser::handleIsindex): Put isindex element into a RefPtr. This prevents a
crash that was otherwise happening during layout tests (caused indirectly by
the changes above).
(HTMLParser::startBody): Added call to get().
2005-12-19 Darin Adler <darin@apple.com>
Reviewed by Geoff Garen and Eric Seidel.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4923
stop using <ostream> in WebCore, eliminating the <cmath> troubles it causes
* ForwardingHeaders/kxmlcore/AlwaysInline.h: Added.
* WebCorePrefix.h: Removed the use of <ostream>.
* kwq/KWQDef.h: Removed now-unused Q_INT64, Q_INT16, Q_UINT16, qRound, and _KWQ_IOSTREAM_.
* kwq/KWQKHTMLPart.h: Removed some unneeded headers and added forward-declarations of classes
instead. Corrected some incorrect member function declarations.
* kwq/KWQKHTMLPart.mm: Added a now-needed header.
* khtml/ecma/kjs_window.cpp: Removed the <cmath> workaround.
* khtml/rendering/bidi.cpp: Added include of AlwaysInline.h and removed a
lot of unnecessary includes.
* khtml/rendering/render_canvasimage.cpp: Removed the <cmath> workaround.
* khtml/rendering/render_image.cpp: Removed the <cmath> workaround.
* khtml/rendering/render_text.cpp: Added include of AlwaysInline.h and removed a
lot of unnecessary includes.
* ksvg2/css/SVGCSSStyleSelector.cpp: (KDOM::CSSStyleSelector::applySVGProperty):
* ksvg2/svg/SVGAnimateColorElementImpl.cpp: (SVGAnimateColorElementImpl::calculateColor):
* ksvg2/svg/SVGAnimateTransformElementImpl.cpp: (SVGAnimateTransformElementImpl::handleTimerEvent):
* ksvg2/svg/SVGAnimationElementImpl.cpp: (SVGAnimationElementImpl::closeRenderer):
* ksvg2/svg/SVGLinearGradientElementImpl.cpp: (SVGLinearGradientElementImpl::buildGradient):
* ksvg2/svg/SVGPatternElementImpl.cpp: (SVGPatternElementImpl::notifyAttributeChange):
* ksvg2/svg/SVGRadialGradientElementImpl.cpp: (SVGRadialGradientElementImpl::buildGradient):
Replaced use of qRound with use of lroundf or lround as appropriate.
* kwq/KWQCString.h:
* kwq/KWQCString.mm:
* kwq/KWQDateTime.h:
* kwq/KWQDateTime.mm:
* kwq/KWQMap.h:
* kwq/KWQMemArray.h:
* kwq/KWQPoint.mm:
* kwq/KWQPointArray.h:
* kwq/KWQPtrList.h:
* kwq/KWQPtrStack.h:
* kwq/KWQPtrVector.h:
* kwq/KWQRect.h:
* kwq/KWQRect.mm:
* kwq/KWQSize.h:
* kwq/KWQSize.mm:
* kwq/KWQValueList.h:
Removed _KWQ_IOSTREAM_ code that was used at one time for unit tests, but is now unneeded,
and requires <ostream>.
2005-12-19 Darin Adler <darin@apple.com>
Reviewed by Geoff Garen and John Sullivan.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=4312
XMLHttpRequest headers that have two CRLF sequences lead to Obj-C exception
I found this by code inspection after examining a security report about
vulnerabilities in other browsers' XMLHttpRequest implementations.
* kwq/KWQLoader.mm:
(+[NSDictionary _webcore_dictionaryWithHeaderString:_webcore_dictionaryWithHeaderString:]):
Check length of string before calling characterAtIndex:0 since it will fail for an empty string.
2005-12-19 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Beth
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6149
REGRESSION (WebCore-417.5): horizontal scrollbar in overflow with top
border doesn't receive mouse events
* khtml/rendering/render_block.cpp:
(khtml::RenderBlock::isPointInScrollbar):
Removed borderTop() from horizontal scrollbar rect computation.
* manual-tests/scrollbar-hittest2.html: Added.
2005-12-19 Alexey Proskuryakov <ap@nypop.com>
Reviewed by Darin, committed by Adele.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=5744
XMLHttpRequest does not apply page encoding after assigning via innerHtml
* khtml/ecma/xmlhttprequest.cpp:
(getMIMEType): A helper function to get MIME type from a Content-Type string.
(getCharset): A helper function to get charset from a Content-Type string.
(KJS::XMLHttpRequest::getValueProperty): Factored out responseIsXML().
(KJS::XMLHttpRequest::getResponseHeader): Return QString instead of JSValue
(to get rid of unnecessary JSLocks).
(KJS::XMLHttpRequest::responseIsXML): A new method that analyses Content-Type.
(KJS::XMLHttpRequest::slotData): Use a correct charset for responses, see bug for details.
(KJS::XMLHttpRequestProtoFunc::callAsFunction): Update for getResponseHeader() changes
* khtml/ecma/xmlhttprequest.h:
== Rolled over to ChangeLog-2005-12-19 ==