1. 03 Jan, 2006 2 commits
    • eseidel's avatar
      Bug #: 6109 · ef508986
      eseidel authored
      Submitted by: eseidel
      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:]):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11854 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ef508986
    • andersca's avatar
      2006-01-03 Anders Carlsson <andersca@mac.com> · c70d1c6a
      andersca authored
              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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11852 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c70d1c6a
  2. 02 Jan, 2006 2 commits
    • ap's avatar
      Reviewed by Eric. · 658b4df8
      ap authored
              - 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):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      658b4df8
    • vicki's avatar
      Reviewed by Maciej. · 07d08035
      vicki authored
      	- 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):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07d08035
  3. 30 Dec, 2005 4 commits
    • darin's avatar
      Reviewed by Maciej. · 7baeccde
      darin authored
              - 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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7baeccde
    • ap's avatar
      Reviewed by Darin, landed by ap. · 2734996c
      ap authored
              - fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=5461
                Text width measured incorrectly when text-align: justify
      
      WebCore:
              * 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:
      
      WebKit:
              * WebCoreSupport.subproj/WebTextRenderer.m:
              (-[WebTextRenderer selectionRectForRun:style:geometry:]): Added.
              (CG_drawHighlight): Use new function CG_selectionRect.
              (CG_selectionRect): New function to compute the selection rect.
              Eliminated rounding hackery that was required for keeping the highlight
              rect within the selection rect computed by
              InlineTextBox::selectionRect, since the latter uses this function now.
              The new selection rect is wider and matches AppKit more closely,
              although the right hand side is roundf()ed instead of cielf()ed for
              optimal caret positioning.
              (ATSU_drawHighlight): Use new function ATSU_selectionRect.
              (ATSU_selectionRect): New function to compute the selection rect.
              Much like CG_selectionRect.
      LayoutTests:
              * fast/text/justified-text-rect-expected.checksum: Added.
              * fast/text/justified-text-rect-expected.png: Added.
              * fast/text/justified-text-rect-expected.txt: Added.
              * fast/text/justified-text-rect.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2734996c
    • ap's avatar
      - Fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6289 · 9bbc4e38
      ap authored
              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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9bbc4e38
    • andersca's avatar
      2005-12-30 Anders Carlsson <andersca@mac.com> · e1be1a16
      andersca authored
              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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11839 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e1be1a16
  4. 29 Dec, 2005 10 commits
    • darin's avatar
      LayoutTests: · c230576d
      darin authored
              Reviewed and refined by Darin.
      
              - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=3579
                In-place style-switching is leaving junk behind, messing up styles
      
              * fast/css/margin-top-bottom-dynamic-expected.checksum: Added.
              * fast/css/margin-top-bottom-dynamic-expected.png: Added.
              * fast/css/margin-top-bottom-dynamic-expected.txt: Added.
              * fast/css/margin-top-bottom-dynamic.html: Added.
      
      WebCore:
      
              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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11826 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c230576d
    • eseidel's avatar
      Bug #: 6290 · 1fda09d0
      eseidel authored
      Submitted by: eseidel
      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
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1fda09d0
    • eseidel's avatar
      Bug #: 6295 · ab66b6b1
      eseidel authored
      Submitted by: eseidel
      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:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ab66b6b1
    • eseidel's avatar
      Bug #: 6101 · bf437b45
      eseidel authored
      Submitted by: eseidel
      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
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf437b45
    • eseidel's avatar
      Bug #: 6230 · 07480eea
      eseidel authored
      Submitted by: eseidel
      Reviewed by: build fix only.
              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):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07480eea
    • eseidel's avatar
      Bug #: 6230 · 31504afb
      eseidel authored
      Submitted by: eseidel
      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:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31504afb
    • eseidel's avatar
      Bug #: 6228 · ccbf3d76
      eseidel authored
      Submitted by: eseidel
      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):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ccbf3d76
    • eseidel's avatar
      Bug #: 4301 · c5f7f219
      eseidel authored
      Submitted by: mark rowe
      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
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c5f7f219
    • ggaren's avatar
      WebCore: · 633ffe2a
      ggaren authored
              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.
      
      WebKit:
      
              Reviewed by darin
      
              Test: fast/text/atsui-spacing-features.html
      
              - WebKit 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
      
              * WebCoreSupport.subproj/WebTextRenderer.m:
              (overrideLayoutOperation): Add letter- and word-spacing and padding for
              justification.
              (createATSULayoutParameters): Compute padding per space.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11803 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      633ffe2a
    • andersca's avatar
      2005-12-28 Anders Carlsson <andersca@mac.com> · eb283f2c
      andersca authored
              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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eb283f2c
  5. 28 Dec, 2005 4 commits
  6. 27 Dec, 2005 5 commits
    • darin's avatar
      Reviewed by Hyatt, landed by Darin. · da54727b
      darin authored
              - 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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da54727b
    • darin's avatar
      LayoutTests: · 73178835
      darin authored
              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
      
              * fast/replaced/absolute-image-sizing-expected.checksum: Added.
              * fast/replaced/absolute-image-sizing-expected.png: Added.
              * fast/replaced/absolute-image-sizing-expected.txt: Added.
              * fast/replaced/absolute-image-sizing.html: Added.
      
      WebCore:
      
              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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      73178835
    • darin's avatar
      Reviewed by Geoff and Eric. · 2a4c3747
      darin authored
              - 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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2a4c3747
    • darin's avatar
      Fix suggested by Mitz. · c4190e9f
      darin authored
              - 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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4190e9f
    • mjs's avatar
      LayoutTests: · 9c780ce0
      mjs authored
              Reviewed, tweaked and landed by Maciej.
      
      	- test case for 4405: <button> not listed in form collections.
      	http://bugzilla.opendarwin.org/show_bug.cgi?id=4405
      
              * fast/forms/button-in-forms-collection-expected.txt: Added.
              * fast/forms/button-in-forms-collection.html: Added.
      
      WebCore:
      
              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
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c780ce0
  7. 24 Dec, 2005 4 commits
    • eseidel's avatar
      Bug #: 6326 · 29ee4e21
      eseidel authored
      Submitted by: mitz
      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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29ee4e21
    • mjs's avatar
      Reviewed by Eric. · c307dcb3
      mjs authored
              - 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:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c307dcb3
    • ggaren's avatar
      Reviewed by eric. · d259de26
      ggaren authored
              http://bugzilla.opendarwin.org/show_bug.cgi?id=6231
      
              - Fixed assertion failure in QString::mid caused by my last checkin.
              parseWindowFeatuers() 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) parseWindowString() 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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d259de26
    • ap's avatar
      Reviewed by Maciej. · 5c8c5ed7
      ap authored
              - 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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5c8c5ed7
  8. 23 Dec, 2005 5 commits
    • ggaren's avatar
      Reviewed by vicki (yay!), eric. · 8a9b5aa9
      ggaren authored
              - 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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a9b5aa9
    • eseidel's avatar
      Bug #: 6138 · c644a61a
      eseidel authored
      Submitted by: eseidel
      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
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c644a61a
    • ap's avatar
      Reviewed by Eric Seidel. · 50391e06
      ap authored
              - 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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      50391e06
    • ap's avatar
      Reviewed by Eric Seidel. · 4aed2a23
      ap authored
              - 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:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4aed2a23
    • ap's avatar
      Reviewed by Darin Adler. · 5638dee2
      ap authored
              - 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).
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5638dee2
  9. 22 Dec, 2005 4 commits
    • mjs's avatar
      Reviewed by Eric. · 4ad61f15
      mjs authored
              - 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:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4ad61f15
    • mjs's avatar
      JavaScriptCore: · ed5d76d4
      mjs authored
              Reviewed by Darin.
      
              - Make HashMap/HashSet support non-POD types
              http://bugzilla.opendarwin.org/show_bug.cgi?id=5332
      
              The changes for support are relatively simple, but I also made extensive changes to
              avoid copying, so that there isn't refcount thrash when you put RefPtrs into a HashMap.
      
              * kxmlcore/HashTable.h:
              (KXMLCore::swap): specialize swap for pairs, to swap elements individually,
      	so that excess copies can be avoided.
              (KXMLCore::Mover::move): Template function to either copy or swap, used
      	when transferring elements from old table to new.
              (KXMLCore::IdentityHashTranslator::hash): The old "converting lookup" templates
      	that took two or three function parameters now take a class parameter, this is
      	the class used to do a normal lookup.
              (KXMLCore::IdentityHashTranslator::equal): Ditto.
              (KXMLCore::IdentityHashTranslator::translate): Ditto. Translate now takes a reference
      	to write into instead of returning a value to avoid redundant copies.
              (KXMLCore::HashTable::~HashTable): Use deallocateTable instead of freeing directly.
              (KXMLCore::HashTable::insert): Based on HashTranslator now instead of separate
      	functions. Added a FIXME about a remaining rare excess copy.
              (KXMLCore::HashTable::isEmptyBucket): Use KeyTraits directly instead of unwrapping
      	the key from Traits, to avoid creating and destroying pair, which copies.
              (KXMLCore::HashTable::isDeletedBucket): ditto
              (KXMLCore::HashTable::lookup): Use HashTranslator now instead of separate functions.
              (KXMLCore::HashTable::initializeBucket): Renamed from emptyBucket. Use placement new to
      	work right for non-POD types.
              (KXMLCore::HashTable::deleteBucket): Use assignDeleted to avoid excess copies.
              (KXMLCore::HashTable::reinsert): use Mover template to copy or swap as appropriate
              (KXMLCore::HashTable::allocateTable): Initialize every bucket if calloc won't do.
              (KXMLCore::HashTable::deallocateTable): Destruct every bucket if needed.
              (KXMLCore::HashTable::rehash): Avoid copy before reinserting, so that swap can do its magic.
              (KXMLCore::HashTable::clear): use deallocateTable instead of freeing directly.
              (KXMLCore::HashTable::HashTable): be more dumb when copying to ensure that non-POD types
      	work right
              * kxmlcore/HashFunctions.h:
              (KXMLCore::PointerHash): Specialize PointerHash for RefPtr
              * kxmlcore/HashMap.h:
              (KXMLCore::extractFirst): Return a reference not a full object to avoid
      	copies.
              (KXMLCore::HashMapTranslator::hash): Use a special translator for insertion
      	to defer making the pair as long as possible, thus avoiding needless copies.
              (KXMLCore::HashMapTranslator::equal): ditto
              (KXMLCore::HashMapTranslator::translate): ditto
              (KXMLCore::::inlineAdd): Shared by set and add to insert using HashMapTranslator
              (KXMLCore::::set): Use inlineAdd
              (KXMLCore::::add): Use inlineAdd
              * kxmlcore/HashMapPtrSpec.h:
              (KXMLCore::): Pass KeyTraits along
              * kxmlcore/HashSet.h:
              (KXMLCore::identityExtract): Return a reference not a full object to avoid copies.
              (KXMLCore::HashSetTranslatorAdapter::hash): Redo adapter stuff to work with
      	the new HashTranslator approach.
              (KXMLCore::HashSetTranslatorAdapter::equal): ditto
              (KXMLCore::HashSetTranslatorAdapter::translate): ditto
              (KXMLCore::::insert): ditto
              * kxmlcore/HashTraits.h:
              (KXMLCore::GenericHashTraits): This is intended be used as a base class for
      	customized traits: sensible defaults.
              (KXMLCore::): Use it a bunch
              (KXMLCore::assignDeleted): template function to allow pairs to be assigned the
      	deleted value w/o excess copies.
              (KXMLCore::PairHashTraits::emptyValue): Updated
              (KXMLCore::PairHashTraits::deletedValue): Updated
              (KXMLCore::PairHashTraits::assignDeletedValue): part of assignDeleted hack
              (KXMLCore::DeletedValueAssigner::assignDeletedValue): Use template magic
      	to either use use deletedValue or assignDeletedValue for the cases where we care.
              * kxmlcore/RefPtr.h:
              (KXMLCore::RefPtr::swap): Added swap method.
              (KXMLCore::swap): Added swap free function.
              * kjs/identifier.cpp:
              (KJS::CStringTranslator::hash): Use new HashTranslator class approach to
      	alternate type based insertion.
              (KJS::CStringTranslator::equal): ditto
              (KJS::CStringTranslator::translate): ditto
              (KJS::Identifier::add): ditto
              (KJS::UCharBufferTranslator::hash): ditto
              (KJS::UCharBufferTranslator::equal): ditto
              (KJS::UCharBufferTranslator::translate): ditto
      
      	- irrelevant change:
      
              * kjs/array_object.cpp:
              (ArrayProtoFunc::callAsFunction): Removed a stray space.
      
      WebCore:
      
              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):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ed5d76d4
    • adele's avatar
      Reviewed by Darin. · f3ed2fb3
      adele authored
              Cleaned up a previous checkin by defining global const defaultForm.
      
              * khtml/xml/dom_docimpl.cpp:
              (DocumentImpl::radioButtonChecked):
              (DocumentImpl::checkedRadioButtonForGroup):
              (DocumentImpl::removeRadioButtonGroup):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11738 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3ed2fb3
    • adele's avatar
      LayoutTests: · 0b02b671
      adele authored
              Reviewed by Tim Hatcher.
      
              Tests for <rdar://problem/4387433> Seed: Radio buttons behave incorrectly in Gmail settings
      
              * fast/forms/radio_checked_dynamic-expected.checksum: Added.
              * fast/forms/radio_checked_dynamic-expected.png: Added.
              * fast/forms/radio_checked_dynamic-expected.txt: Added.
              * fast/forms/radio_checked_dynamic.html: Added.
      
      WebCore:
      
              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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b02b671