1. 07 Jul, 2006 15 commits
    • darin's avatar
      Reviewed by Maciej. · f6420c4e
      darin authored
              - fixed a storage leak noticed by the buildbot
      
              * dom/Document.cpp: (WebCore::Document::removedLastRef):
              Call delete on the markers before clearing the map containing them.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f6420c4e
    • andersca's avatar
      2006-07-08 Anders Carlsson <acarlsson@apple.com> · ee9cb8ce
      andersca authored
              Reviewed by Brady.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=9777
              Reproducible crash in Loading/Frames in ToT.
              
              The problem was that the renderpart destructor resets the frame's 
              owner element. For iframes, this should only be done when the element is 
              going to be removed from the document.
              
              * html/HTMLIFrameElement.cpp:
              (WebCore::HTMLIFrameElement::~HTMLIFrameElement):
              (WebCore::HTMLIFrameElement::willRemove):
              (WebCore::HTMLIFrameElement::removedFromDocument):
              (WebCore::HTMLIFrameElement::detach):        
              * html/HTMLIFrameElement.h:
              Remove the frame in willRemove instead.
              
              * rendering/RenderPart.cpp:
              (WebCore::RenderPart::RenderPart):
              (WebCore::RenderPart::~RenderPart):
              * rendering/RenderPart.h:
              Don't call setFrame(0) in the destructor when the element is an iframe element.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee9cb8ce
    • darin's avatar
      Reviewed by Anders. · ffcfdbfc
      darin authored
              - fixed a storage leak noticed by the buildbot
      
              * page/FrameView.cpp: (WebCore::FrameViewPrivate::~FrameViewPrivate):
              Delete m_scheduledEvents.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ffcfdbfc
    • sullivan's avatar
      Added a bug number to an existing entry. · 022d8cc6
      sullivan authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      022d8cc6
    • darin's avatar
      Reviewed by Adele. · 3e71c118
      darin authored
              - fixed a couple of storage leaks noticed by the buildbot
      
              * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::attach):
              Call deref on the style after calling setRenderStyle, since styleForRenderer
              returns us a "ref'd" RenderStyle object.
              * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::attach): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e71c118
    • darin's avatar
      Reviewed by Adele. · 22a690e4
      darin authored
              - fix some license mistakes
      
              * LICENSE-APPLE: Added more years of publication to the copyright here.
      
              * html/CanvasGradient.idl: Corrected license on this file. It had the wrong one.
              * html/CanvasPattern.idl: Ditto.
              * html/CanvasRenderingContext2D.idl: Ditto.
              * html/HTMLCanvasElement.idl: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22a690e4
    • beidson's avatar
      Reviewed by John · cc1903cb
      beidson authored
              Changed an ASSERT to a LOG_ERROR for an error that could be handled gracefully, but
              whose assertion was reproducibly causing a build bot failure
      
              * Misc/WebIconDatabase.m:
              (-[WebIconDatabase _releaseIconForIconURLString:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cc1903cb
    • ggaren's avatar
      Reviewed by John. · a7735565
      ggaren authored
              
              - Fixed a few crashes resulting from NULL parameters to JSClassCreate.
      
              * API/JSClassRef.cpp:
              (JSClassCreate):
              (JSClassRelease):
              * API/testapi.c: Added test for NULL parameters.
              (main):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a7735565
    • ggaren's avatar
      Reviewed by John, mocked by Darin. · 80b420ae
      ggaren authored
              
              - Changed JSEvaluate to take a JSObjectRef instead of a JSValueRef as
              "this," since "this" must be an object.
      
              * API/JSContextRef.cpp:
              (JSEvaluate):
              * API/JSContextRef.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      80b420ae
    • ggaren's avatar
      Reviewed by John. · ab28d0b7
      ggaren authored
              
              - More headerdoc
      
              * API/JSBase.h:
              * JavaScriptCore.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ab28d0b7
    • lweintraub's avatar
      LayoutTests: · 6d377800
      lweintraub authored
              Reviewed by justin
      
              Improved table editing
      
              * editing/deleting/delete-to-select-table-expected.checksum: Added.
              * editing/deleting/delete-to-select-table-expected.png: Added.
              * editing/deleting/delete-to-select-table-expected.txt: Added.
              * editing/deleting/delete-to-select-table.html: Added.
              * editing/input/text-input-controller-expected.txt:
      
      WebCore:
      
              Reviewed by justin
      
              Improved table editing: pressing delete directly before or after a table will now select
              the table first, then delete it, instead of just deleting it. Useful for when the table's
              existence is non-obvious.
      
              * bridge/mac/FrameMac.h: Added shouldDeleteSelection, which allows WebCore to trigger
              deletion editing deligates
              * bridge/mac/FrameMac.mm: ditto
              (WebCore::FrameMac::shouldDeleteSelection):
              * bridge/mac/WebCoreFrameBridge.h: ditto
              * editing/TypingCommand.cpp: Implemented check for a caret position next to a table, and
              subsequent selection (as opposed to removal)
              (WebCore::TypingCommand::deleteKeyPressed):
              (WebCore::TypingCommand::forwardDeleteKeyPressed):
              * page/Frame.cpp: shouldDeleteSelection added
              (WebCore::Frame::shouldDeleteSelection):
              * page/Frame.h: ditto
      
      WebKit:
      
              Reviewed by justin
      
              Improved table editing
      
              * WebCoreSupport/WebFrameBridge.m: Added method to allow WebCore to trigger
              deletion editing delegate
              (-[WebFrameBridge shouldDeleteSelectedDOMRange:]):
              * WebView/WebHTMLView.m: Moved code that expanded a selection when the delete
              key is pressed over to WebCore so we can be more intelligent about how to handle it
              (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]):
              (-[NSArray _deleteWithDirection:granularity:killRing:isTypingAction:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d377800
    • weinig's avatar
      Reviewed by Eric. · 22601712
      weinig authored
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9768
                Split XSLImportRule out of XSLStyleSheet.* into separate 
                files (one class per file).
      
              * WebCore.xcodeproj/project.pbxproj:
              * xml/XSLImportRule.cpp: Added.
              (WebCore::XSLImportRule::XSLImportRule):
              (WebCore::XSLImportRule::parentStyleSheet):
              (WebCore::XSLImportRule::loadSheet):
              * xml/XSLImportRule.h: Added.
              * xml/XSLStyleSheet.cpp:
              * xml/XSLStyleSheet.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22601712
    • andersca's avatar
      WebCore: · 10c1e341
      andersca authored
      2006-07-07  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Darin.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=8300
              REGRESSION: First mouse click is randomly ignored when clicking on checkbox and radio buttons
              
              * css/html4.css:
              Set "-webkit-user-select: ignore" on radio buttons and check boxes .
              
      LayoutTests:
      
      2006-07-07  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Darin.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=8300
              REGRESSION: First mouse click is randomly ignored when clicking on checkbox and radio buttons
      
              * fast/forms/radio-check-click-and-drag-expected.txt: Added.
              * fast/forms/radio-check-click-and-drag.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      10c1e341
    • sullivan's avatar
      Reviewed by Tim Hatcher · dc734562
      sullivan authored
              * WebKit.exp:
              added surprisingly missing _WebPreferencesChangedNotification, defined in
              WebPreferences.h
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dc734562
    • mjs's avatar
      Reviewed by Tim Hatcher. · 1e8c96ae
      mjs authored
              - fix 20 Node leaks on fast/events tests - these should be the last ones
      
              * bindings/objc/DOMEvents.mm:
              (-[DOMEvent dealloc]): implement - deref the event!
              (-[DOMEvent finalize]): ditto
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1e8c96ae
  2. 06 Jul, 2006 16 commits
    • mjs's avatar
      Reviewed by Tim Hatcher. · e2d9abc1
      mjs authored
              - fix 26 Node leaks on fast/dom tests
      
              * dom/Document.cpp:
              (WebCore::Document::removedLastRef): delete tokenizer - if we are still parsing at this point, we don't
              want nodes held by the parser to keep the document alive.
              * html/HTMLParser.cpp:
              (WebCore::RefNonDocNodePtr::RefNonDocNodePtr): Smart pointer that acts like RefPtr for Node,
              but avoids refing document nodes to avoid cycles.
              (WebCore::RefNonDocNodePtr::~RefNonDocNodePtr):
              (WebCore::RefNonDocNodePtr::get):
              (WebCore::RefNonDocNodePtr::operator*):
              (WebCore::RefNonDocNodePtr::operator->):
              (WebCore::RefNonDocNodePtr::operator!):
              (WebCore::RefNonDocNodePtr::operator UnspecifiedBoolType):
              (WebCore::RefNonDocNodePtr::operator=):
              (WebCore::operator==):
              (WebCore::operator!=):
              (WebCore::HTMLStackElem): Use a RefNonDocNodePtr instead of RefPtr<Node>
              (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): Use a RefPtr here to avoid crashing
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e2d9abc1
    • adele's avatar
      Reviewed by Maciej. · c1577332
      adele authored
              Fixed new popup control to open up when the spacebar and the up and down arrows are pressed.
      
              - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=9762
              [Native pop up] Highlighted item text is black instead of white
      
              * html/HTMLSelectElement.cpp:
              (WebCore::HTMLSelectElement::isKeyboardFocusable): Added.
              (WebCore::HTMLSelectElement::isMouseFocusable): Added.
              (WebCore::HTMLSelectElement::defaultEventHandler): Updated to showPopup for up and down arrow keys and spacebar.
              * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList): Made this const.
              * rendering/RenderPopupMenu.cpp: (WebCore::RenderPopupMenu::populate): Added FIXME.
              * rendering/RenderPopupMenuMac.mm:
              (WebCore::RenderPopupMenuMac::showPopup): Updated to save the NSEvent that triggers the popup, so we can send
              fake mouseUp and keyUp events when the NSMenu returns.
              (WebCore::RenderPopupMenuMac::addGroupLabel): Only set the NSForegroundColorAttributeName attribute if the text isn't black.
              Follow-up bug about other colors: http://bugzilla.opendarwin.org/show_bug.cgi?id=9769
              (WebCore::RenderPopupMenuMac::addOption): ditto.
              * bridge/mac/FrameMac.h: (WebCore::FrameMac::currentEvent): Returns the current NSEvent.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c1577332
    • justing's avatar
      LayoutTests: · 61525d3d
      justing authored
              Reviewed by levi
              
              <rdar://problem/4609184>
              Mail crashes at WebCore::Selection::adjustForEditableContent
              <rdar://problem/4609140>
              Crash at WebCore::Range::compareBoundaryPoints
      
              * editing/selection/mixed-editability-1-expected.checksum: Added.
              * editing/selection/mixed-editability-1-expected.png: Added.
              * editing/selection/mixed-editability-1-expected.txt: Added.
              * editing/selection/mixed-editability-1.html: Added.
              * editing/selection/mixed-editability-2-expected.checksum: Added.
              * editing/selection/mixed-editability-2-expected.png: Added.
              * editing/selection/mixed-editability-2-expected.txt: Added.
              * editing/selection/mixed-editability-2.html: Added.
      
      WebCore:
      
              Reviewed by levi
              
              <rdar://problem/4609184>
              Mail crashes at WebCore::Selection::adjustForEditableContent
              <rdar://problem/4609140>
              Crash at WebCore::Range::compareBoundaryPoints
              
              * editing/Selection.cpp:
              (WebCore::Selection::adjustForEditableContent):
              * editing/VisiblePosition.cpp:
              (WebCore::VisiblePosition::next): Moved code into a helper function.
              (WebCore::VisiblePosition::previous): Ditto.
              * editing/htmlediting.cpp:
              (WebCore::comparePositions): Moved from Selection.cpp.
              (WebCore::lowestEditableAncestor): Added.  Returns rootEditableElement
              for a node in editable content and the rootEditableElement for the first
              ancestor that's editable for a node in non-editable content.
              (WebCore::firstEditablePositionAfterPositionInRoot): 
              (WebCore::lastEditablePositionBeforePositionInRoot):
              * editing/htmlediting.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      61525d3d
    • andersca's avatar
      WebCore: · c1c14c9b
      andersca authored
      2006-07-06  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Adele.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=9528
              REGRESSION: arrow key skips '>' in Bugzilla replies due to '\n' in text nodes
              
              Patch by Darin, tweaked by Anders.
              
              * html/HTMLElement.cpp:
              (WebCore::HTMLElement::setInnerText):
              Convert newline characters to <br> elements. I've verified that what's done here is what WinIE does when setting innerText.
              
              (WebCore::HTMLElement::setOuterText):
              Fix comment.
      
              * rendering/RenderTextField.cpp:
              (WebCore::RenderTextField::textWithHardLineBreaks):
              Remove assert. m_div->firstChild() can be null now because setInnerText doesn't create
              text nodes for empty strings anymore.
      
      LayoutTests:
      
      2006-07-06  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Adele.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=9528
              REGRESSION: arrow key skips '>' in Bugzilla replies due to '\n' in text nodes
      
              * fast/dom/css-selectorText-expected.txt:
              * fast/dom/css-shortHands-expected.txt:
              Update tests.
              
              * fast/dom/set-inner-text-newlines-expected.txt: Added.
              * fast/dom/set-inner-text-newlines.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c1c14c9b
    • adele's avatar
      Reviewed by Tim Hatcher. · 0c114c5c
      adele authored
              - Speculative fix for <rdar://problem/4605532> unrepro crash at cnn.com after upgrading to 10.4.7 (but happening with 10.4.6 too)
      
              * page/FrameView.cpp: (WebCore::FrameView::layout): Ref's the view during layout, since a recalcStyle could cause the view to be deleted.
              If we get back from recalcStyle, and there's only one ref, return early since the the view will be deleted when we exit layout.
              * page/FrameView.h: (WebCore::FrameView::hasOneRef): Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c114c5c
    • andersca's avatar
      WebCore: · 0afc15f0
      andersca authored
      2006-07-06  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Maciej.
      
              <rdar://problem/4610891> Support overflow events
              
              * DerivedSources.make:
              Add generated sources.
              
              * WebCore.xcodeproj/project.pbxproj:
              Add new files.
              
              * bindings/js/kjs_events.cpp:
              (KJS::toJS):
              Support creating wrappers for overflow events..
              
              * bindings/objc/DOMEvents.h:
              * bindings/objc/DOMEvents.mm:
              (+[DOMEvent _eventWith:]):
              (-[DOMOverflowEvent _overflowEvent]):
              (-[DOMOverflowEvent orient]):
              (-[DOMOverflowEvent horizontalOverflow]):
              (-[DOMOverflowEvent verticalOverflow]):
              Add Objective-C wrapper for overflow events.
              
              * dom/Event.cpp:
              (WebCore::Event::isOverflowEvent):        
              * dom/Event.h:
              * dom/EventNames.h:
              * dom/OverflowEvent.cpp: Added.
              (WebCore::OverflowEvent::OverflowEvent):
              (WebCore::OverflowEvent::isOverflowEvent):
              * dom/OverflowEvent.h: Added.
              (WebCore::OverflowEvent::):
              (WebCore::OverflowEvent::orient):
              (WebCore::OverflowEvent::horizontalOverflow):
              (WebCore::OverflowEvent::verticalOverflow):
              * dom/OverflowEvent.idl: Added.
              Add overflow events.
              
              * page/FrameView.cpp:
              (WebCore::FrameViewPrivate::FrameViewPrivate):
              (WebCore::FrameView::applyOverflowToViewport):        
              (WebCore::FrameView::layout):
              Dispatch any scheduled events when layout is done.
              
              (WebCore::FrameView::scheduleEvent):
              New function which schedules an event.
              
              (WebCore::FrameView::updateOverflowStatus):
              Update overflow status for the viewport.
              
              (WebCore::FrameView::dispatchScheduledEvents):
              New function which dispatches all scheduled events.
              
              * page/FrameView.h:
              Add declarations.
              
              * rendering/RenderLayer.cpp:
              (WebCore::RenderLayer::RenderLayer):
              (WebCore::RenderLayer::updateOverflowStatus):
              (WebCore::RenderLayer::updateScrollInfoAfterLayout):
              * rendering/RenderLayer.h:
              Schedule overflow events when overflow status changes.
      
      LayoutTests:
      
      2006-07-06  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Maciej.
      
              <rdar://problem/4610891> Support overflow events
              
              * fast/events/overflow-events-expected.txt: Added.
              * fast/events/overflow-events.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0afc15f0
    • thatcher's avatar
      Reviewed by Geoff. · ee502950
      thatcher authored
              <rdar://problem/4610881> Expose scroll-related JS properties to ObjC DOM interface
              <rdar://problem/4519675> offsetLeft, offsetTop, offsetHeight, and offsetWidth
              properties are not exposed to ObjC
      
              * bindings/objc/DOMPrivate.h:
              * bindings/objc/DOMHTML.mm:
              (-[DOMHTMLElement offsetLeft]):
              (-[DOMHTMLElement offsetTop]):
              (-[DOMHTMLElement offsetWidth]):
              (-[DOMHTMLElement offsetHeight]):
              (-[DOMHTMLElement offsetParent]):
              (-[DOMHTMLElement clientWidth]):
              (-[DOMHTMLElement clientHeight]):
              (-[DOMHTMLElement scrollLeft]):
              (-[DOMHTMLElement setScrollLeft:]):
              (-[DOMHTMLElement scrollTop]):
              (-[DOMHTMLElement setScrollTop:]):
              (-[DOMHTMLElement scrollWidth]):
              (-[DOMHTMLElement scrollHeight]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee502950
    • mjs's avatar
      Reviewed by Adele. · c3a451d1
      mjs authored
              - fix 435 more layout tests Node leaks
      
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::moveParagraphs): fix more instances of leaked DOM ranges
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3a451d1
    • beidson's avatar
      Reviewed by John. · 1ab88e8e
      beidson authored
              Small fix to my previous small fix that only lets the ASSERT off the hook if the DB
              is closing
      
              * Misc/WebIconDatabase.m:
              (-[WebIconDatabase _releaseIconForIconURLString:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1ab88e8e
    • harrison's avatar
      LayoutTests: · 31177985
      harrison authored
              Reviewed by Geoff.
      
              <rdar://problem/4565031> innerHTML of XMP tag returns special characters like '&gt;' instead of '>'
      
              * fast/innerHTML/006-expected.checksum: Added.
              * fast/innerHTML/006-expected.png: Added.
              * fast/innerHTML/006-expected.txt: Added.
              * fast/innerHTML/006.html: Added.
      
      WebCore:
      
              Reviewed by Geoff
      
              <rdar://problem/4565031> innerHTML of XMP tag returns special characters like '&gt;' instead of '>'
       
              Test: fast/innerHTML/006.html
             
              * editing/markup.cpp:
              (WebCore::startMarkup):
              (WebCore::createMarkup):
              Do not special quote content of XMP nodes.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      31177985
    • mjs's avatar
      Not reviewed - build fix. · 248135c8
      mjs authored
              - back out earlier leak fix, as it caused a crash on one of the fast/invalid layout tests
      
              * dom/Document.cpp:
              (WebCore::Document::removedLastRef):
              * html/HTMLParser.cpp:
              (WebCore::HTMLStackElem::HTMLStackElem):
              (WebCore::HTMLParser::popNestedHeaderTag):
              (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks):
              (WebCore::HTMLParser::reopenResidualStyleTags):
              (WebCore::HTMLParser::popBlock):
              (WebCore::HTMLParser::popOneBlock):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      248135c8
    • mjs's avatar
      Reviewed by Anders. · da96fc70
      mjs authored
              - fix ~3000 Node leaks on the editing tests
      
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::moveParagraphs): put a newly created Range in a RefPtr
              to avoid leaking it, as this leaks the whole document.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      da96fc70
    • mjs's avatar
      Reviewed by Anders. · 3c261ee7
      mjs authored
              - fix 26 Node leaks on various fast/dom tests
      
              * dom/Document.cpp:
              (WebCore::Document::removedLastRef): Delete the tokenizer here, since if we are in mid-parse,
              the parser might hold refs on some of our children that have self-only refs.
              * html/HTMLParser.cpp:
              (WebCore::HTMLStackElem::HTMLStackElem): don't ref the node if it is a document to avoid ref cycles
              (WebCore::HTMLStackElem::~HTMLStackElem): ditto
              (WebCore::HTMLStackElem::node): changed interface a bit to support the above
              (WebCore::HTMLStackElem::setNode): ditto
              (WebCore::HTMLParser::popNestedHeaderTag): use new interface to HTMLStackElem
              (WebCore::HTMLParser::handleResidualStyleCloseTagAcrossBlocks): ditto
              (WebCore::HTMLParser::reopenResidualStyleTags): ditto
              (WebCore::HTMLParser::popBlock): ditto
              (WebCore::HTMLParser::popOneBlock): ditto
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3c261ee7
    • adele's avatar
      Reviewed by Adele. · ce4689da
      adele authored
              
              * rendering/RenderMenuList.h:
              (WebCore::RenderMenuList::createsAnonymousWrapper): This method replaces
              allowsReusingAnonymousChild() and has the opposite meaning.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ce4689da
    • beidson's avatar
      Reviewed by Maciej · f116337c
      beidson authored
              Small fix that prevents an assertion from triggering if the DB is being cleaned up 
              (ie, the app being shut down)
      
              * Misc/WebIconDatabase.h:
              * Misc/WebIconDatabase.m:
              (-[NSMutableDictionary init]):
              (-[WebIconDatabase _applicationWillTerminate:]):
              (-[WebIconDatabase _releaseIconForIconURLString:]):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f116337c
    • adele's avatar
      Build fixes. · 33811526
      adele authored
              * WebCore.vcproj/WebCore/WebCore.vcproj:
              * platform/win/TemporaryLinkStubs.cpp:
              * rendering/RenderMenuList.cpp:
              (WebCore::RenderMenuList::calcMinMaxWidth):
              * rendering/RenderPopupMenuWin.h:
              (WebCore::RenderPopupMenuWin::RenderPopupMenuWin):
              * rendering/RenderThemeWin.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33811526
  3. 05 Jul, 2006 9 commits
    • mjs's avatar
      Reviewed by Adele. · 288b0935
      mjs authored
              - fix 308 Node leaks on the editing layout tests
      
              * dom/Document.cpp: (WebCore::Document::removedLastRef): Clear the markers once there
              are no real refs on the document, otherwise a self-only reference cycle w/ the document
              can occur.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      288b0935
    • adele's avatar
      WebCore: · e0a75033
      adele authored
              Reviewed by Maciej and Hyatt.
      
              Initial implementation of popup menu control.  This can be turned on by setting -webkit-appearance: menulist on a select element.
      
              * WebCore.xcodeproj/project.pbxproj: Added RenderMenuList.h, RenderMenuList.cpp, RenderPopupMenu.h, RenderPopupMenu.cpp, 
              RenderPopupMenuWin.h, RenderPopupMenuMac.h, RenderPopupMenuMac.mm, 
          
              * dom/Node.cpp:
              (WebCore::Node::renderStyle): Added. Returns the renderer's style.  If there's no renderer, returns's a RenderStyle that's kept by the node.
              This is important for HTMLOptGroupElement and HTMLOptionElement, which don't have renderers.
              (WebCore::Node::setRenderStyle): Added.
              * dom/Node.h:
              * dom/Element.cpp: (WebCore::Element::recalcStyle): Updated to use renderStyle so recalcStyle will work for HTMLOptionElements and HTMLOptGroupElements.
                 
              * css/cssstyleselector.cpp: Updated to call renderStyle method on the node, so resolving style works on elements w/o renderers that cache style. 
              (WebCore::CSSStyleSelector::initForStyleResolve):
              (WebCore::CSSStyleSelector::locateCousinList):
              (WebCore::CSSStyleSelector::canShareStyleWithElement):
              (WebCore::CSSStyleSelector::locateSharedStyle):
              (WebCore::CSSStyleSelector::checkOneSelector):
      
              * css/html4.css: Removed display:none from options and optgroups, since we're now caching style for these elements.
              Added font-weight styles for option and optgroup.
              
              * html/HTMLOptGroupElement.h: Added m_style to keep track of a RenderStyle for the element, even though we aren't creating a renderer.
              This will allow us to honor style for optgroups and options for popup menus (and eventually list boxes too).
              (WebCore::HTMLOptGroupElement::rendererIsNeeded): Added.
              (WebCore::HTMLOptGroupElement::renderStyle): Added.
              * html/HTMLOptionElement.h: ditto.
              (WebCore::HTMLOptionElement::rendererIsNeeded): Added.
              (WebCore::HTMLOptionElement::renderStyle): Added.
              
              * html/HTMLOptGroupElement.cpp:
              (WebCore::HTMLOptGroupElement::HTMLOptGroupElement): Initialize m_style.
              (WebCore::HTMLOptGroupElement::attach): Set the renderStyle.
              (WebCore::HTMLOptGroupElement::detach): Clear m_style.
              (WebCore::HTMLOptGroupElement::setRenderStyle): Added.
              (WebCore::HTMLOptGroupElement::groupLabelText): Added.
              * html/HTMLOptionElement.cpp: ditto.
              (WebCore::HTMLOptionElement::HTMLOptionElement):
              (WebCore::HTMLOptionElement::attach):
              (WebCore::HTMLOptionElement::detach):
              (WebCore::HTMLOptionElement::setRenderStyle):
              (WebCore::HTMLOptionElement::optionText):
      
              * html/HTMLSelectElement.cpp: Added code to use the new RenderMenuList if the appearance is set to MenuListAppearance, 
              and if we're not creating a list box renderer.
              (WebCore::HTMLSelectElement::recalcStyle):
              (WebCore::HTMLSelectElement::createRenderer):
              (WebCore::HTMLSelectElement::setRecalcListItems):
              (WebCore::HTMLSelectElement::reset):
              (WebCore::HTMLSelectElement::notifyOptionSelected):
              (WebCore::HTMLSelectElement::defaultEventHandler):
              * html/HTMLSelectElement.h:
      
              * WebCore.exp: Added _wkPopupMenu.
              * platform/mac/WebCoreSystemInterface.h: Added wkPopupMenu to get the NSMenu to pop up.
              * platform/mac/WebCoreSystemInterface.mm:
      
              * platform/win/TemporaryLinkStubs.cpp: Added stubs for RenderPopupMenuWin.
              (RenderPopupMenuWin::RenderPopupMenuWin):
              (RenderPopupMenuWin::~RenderPopupMenuWin):
              (RenderPopupMenuWin::clear):
              (RenderPopupMenuWin::populate):
              (RenderPopupMenuWin::showPopup):
              (RenderPopupMenuWin::addSeparator):
              (RenderPopupMenuWin::addGroupLabel):
              (RenderPopupMenuWin::addOption):
              * rendering/RenderPopupMenuWin.h: Added.
      
              * rendering/RenderPopupMenu.cpp: Added.
              (WebCore::RenderPopupMenu::RenderPopupMenu):
              (WebCore::RenderPopupMenu::~RenderPopupMenu):
              (WebCore::RenderPopupMenu::clear):
              (WebCore::RenderPopupMenu::populate): Walks the DOM tree, and adds separators, options, and group labels to the RenderPopupMenu.
              (WebCore::RenderPopupMenu::showPopup):
              (WebCore::RenderPopupMenu::addSeparator):
              (WebCore::RenderPopupMenu::addGroupLabel):
              (WebCore::RenderPopupMenu::addOption):
              * rendering/RenderPopupMenu.h: Added.
              (WebCore::RenderPopupMenu::renderName):
              (WebCore::RenderPopupMenu::getRenderMenuList):
              * rendering/RenderPopupMenuMac.h: Added.
              * rendering/RenderPopupMenuMac.mm: Added.
              (WebCore::RenderPopupMenuMac::RenderPopupMenuMac):
              (WebCore::RenderPopupMenuMac::~RenderPopupMenuMac):
              (WebCore::RenderPopupMenuMac::clear): Removes all items from the menu.
              (WebCore::RenderPopupMenuMac::populate): Disables menuChangedMessages before populating the menu.
              (WebCore::RenderPopupMenuMac::showPopup): Calculates the right position, and calls wkPopupMenu.
              (WebCore::RenderPopupMenuMac::addSeparator):
              (WebCore::RenderPopupMenuMac::addGroupLabel):
              (WebCore::RenderPopupMenuMac::addOption):
              
              * rendering/RenderMenuList.cpp: Added.
              (WebCore::RenderMenuList::RenderMenuList):
              (WebCore::RenderMenuList::addChild):
              (WebCore::RenderMenuList::removeChild):
              (WebCore::RenderMenuList::setStyle):
              (WebCore::RenderMenuList::updateFromElement): If the options have changed, iterate through the children to find the menu item with the widest text.
              Set the button text to the selected item's text.
              (WebCore::RenderMenuList::setText):
              (WebCore::RenderMenuList::paintObject):
              (WebCore::RenderMenuList::baselinePosition):
              (WebCore::RenderMenuList::calcMinMaxWidth):
              (WebCore::RenderMenuList::showPopup):
              (WebCore::RenderMenuList::layout):
              (WebCore::RenderMenuList::updateSelection):
              (WebCore::RenderMenuList::valueChanged):
              * rendering/RenderMenuList.h: Added.
              (WebCore::RenderMenuList::removeLeftoverAnonymousBoxes):
              (WebCore::RenderMenuList::allowsReusingAnonymousChild):
              (WebCore::RenderMenuList::canHaveChildren):
              (WebCore::RenderMenuList::renderName):
              (WebCore::RenderMenuList::setOptionsChanged):
              (WebCore::RenderMenuList::selectionChanged):
              (WebCore::RenderMenuList::setSelectionChanged):
              (WebCore::RenderMenuList::hasPopupMenu):
      
              * rendering/RenderTheme.cpp: Added cases for MenuListAppearance.
              (WebCore::RenderTheme::adjustStyle):
              (WebCore::RenderTheme::paint):
              (WebCore::RenderTheme::paintBorderOnly):
              (WebCore::RenderTheme::isControlStyled):
              (WebCore::RenderTheme::adjustMenuListStyle):
              (WebCore::RenderTheme::createPopupMenu): creates platform-specific RenderPopupMenu.
              * rendering/RenderTheme.h:
              (WebCore::RenderTheme::sizeOfArrowControl): Added. 
              (WebCore::RenderTheme::paintMenuList): Added.
              * rendering/RenderThemeMac.h:
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::adjustRepaintRect):
              (WebCore::RenderThemeMac::paintMenuList):
              (WebCore::RenderThemeMac::adjustMenuListStyle):
              (WebCore::RenderThemeMac::setPopupButtonCellState):
              (WebCore::RenderThemeMac::createPopupMenu):
              (WebCore::RenderThemeMac::sizeOfArrowControl):
              * rendering/RenderThemeWin.cpp: (WebCore::RenderThemeWin::createPopupMenu):
              * rendering/RenderThemeWin.h:
      
      WebKit:
      
              Reviewed by Maciej and Hyatt.
      
              WebKit part of initial popup menu implementation.
      
              * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
              Initialize WKPopupMenu.
      
      WebKitLibraries:
      
              Reviewed by Maciej and Hyatt.
      
              * WebKitSystemInterface.h: Updated.
              * libWebKitSystemInterface.a: Updated.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e0a75033
    • beidson's avatar
      Reviewed by Tim Omernick. · 624981d9
      beidson authored
              IconDatabase now respects private browsing via the use of in memory, temporary tables
      
              * bridge/mac/WebCoreIconDatabaseBridge.mm:
              (-[WebCoreIconDatabaseBridge iconForPageURL:withSize:]):
              (-[WebCoreIconDatabaseBridge iconURLForPageURL:]): Renamed WebCore::IconDatabase methods, changes reflected here
      
              * icon/IconDatabase.cpp:
              (WebCore::IconDatabase::clearDatabase):
              (WebCore::IconDatabase::deletePrivateTables):
              (WebCore::IconDatabase::imageDataForIconID):
              (WebCore::IconDatabase::imageDataForIconURL):
              (WebCore::IconDatabase::imageDataForPageURL):
              (WebCore::IconDatabase::setPrivateBrowsingEnabled):
              (WebCore::IconDatabase::iconForPageURL):
              (WebCore::IconDatabase::iconURLForPageURL):
              (WebCore::IconDatabase::setIconDataForIconURL):
              (WebCore::IconDatabase::performSetIconDataForIconID):
              (WebCore::IconDatabase::establishTemporaryIconIDForEscapedIconURL):
              (WebCore::IconDatabase::establishIconIDForEscapedIconURL):
              (WebCore::IconDatabase::setHaveNoIconForIconURL):
              (WebCore::IconDatabase::setIconURLForPageURL):
              (WebCore::IconDatabase::performSetIconURLForPageURL):
              (WebCore::IconDatabase::hasIconForIconURL):
              -Some style/comment cleanups, but mainly putting private browsing handling in place
      
              * icon/IconDatabase.h:  Some methods added, others renamed, some comments added
      
              * icon/SQLStatement.cpp:
              (WebCore::SQLStatement::getColumnName):
              (WebCore::SQLStatement::getColumnName16):
              (WebCore::SQLStatement::getColumnText):
              (WebCore::SQLStatement::getColumnText16):
              -The above 4 had changes to return String() for empty results instead of "" as it's less expensive;
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      624981d9
    • sullivan's avatar
      Reviewed by Adele. · 44f693e6
      sullivan authored
              
              - layout test for <rdar://problem/4609162> REGRESSION: When tabbing between links on a page, 
              the window doesn't scroll to link that's not in view
              
              The test verifies that focusing a link will scroll the link into view.
      
              * fast/events/reveal-link-when-focused-expected.checksum: Added.
              * fast/events/reveal-link-when-focused-expected.png: Added.
              * fast/events/reveal-link-when-focused-expected.txt: Added.
              * fast/events/reveal-link-when-focused.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      44f693e6
    • sullivan's avatar
      Reviewed by Darin and Adele. · 4be88f2f
      sullivan authored
              
              - fixed <rdar://problem/4609162> REGRESSION: When tabbing between links on a page, 
              the window doesn't scroll to link that's not in view
      
              * html/HTMLAnchorElement.cpp:
              * html/HTMLAnchorElement.h:
              removed HTMLAnchorElement::focus and HTMLAnchorElement::blur. 
              
              HTMLAnchorElement::focus just called document()->setFocusNode(). The scroll-to-reveal
              code used to be inside document()->setFocusNode(), but now it's in Element::focus, and this override
              was preventing that code from running.
              
              HTMLAnchorElement::blur was exactly the same implementation as Element::blur (and there aren't any
              other implementations of ::blur in the class hierarchy in between). This change has no practical
              effect, other than removing duplicate code.
              
              Adele and I think that it was an oversight not to remove these two methods on 12/20/05
              these methods were removed from HTMLButtonElementImpl and HTMLInputElementImpl.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4be88f2f
    • andersca's avatar
      2006-07-05 Anders Carlsson <acarlsson@apple.com> · a6970db6
      andersca authored
              * bridge/win/FrameWin.cpp:
              (WebCore::FrameWin::FrameWin):
              * bridge/win/FrameWin.h:
              * platform/win/TemporaryLinkStubs.cpp:
              (FrameWin::createFrame):
              Fix Win32 build.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6970db6
    • andersca's avatar
      2006-07-05 Anders Carlsson <acarlsson@apple.com> · 809e98fd
      andersca authored
              * WebCore.xcodeproj/project.pbxproj:
              Revert accidental change of debug format to DWARF.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      809e98fd
    • andersca's avatar
      WebCore: · 3a434621
      andersca authored
      2006-07-05  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Maciej.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=3581
              iFrames set to display:none are Missing from frames array
      
              * bridge/mac/FrameMac.h:
              * bridge/mac/FrameMac.mm:
              (WebCore::FrameMac::FrameMac):
              (WebCore::FrameMac::createFrame):
              * bridge/mac/WebCoreFrameBridge.h:
              * bridge/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge initSubframeWithOwnerElement:]):
              (-[WebCoreFrameBridge installInFrame:]):
              Modify to pass the owner element instead of the owner renderer.        
      
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::insertBefore):
              (WebCore::ContainerNode::replaceChild):
              (WebCore::ContainerNode::appendChild):
              Dispatch the node inserted events before attaching the nodes. This is what the
              tokenizer does.
              
              * html/HTMLFrameElement.cpp:
              (WebCore::HTMLFrameElement::openURL):
              (WebCore::HTMLFrameElement::attach):
              Pass the element to requestFrame.
              
              (WebCore::HTMLFrameElement::setLocation):
              Don't call attach/detach on an iframe.
      
              * html/HTMLIFrameElement.cpp:
              (WebCore::HTMLIFrameElement::insertedIntoDocument):
              Load the frame here (using openURL).
              
              (WebCore::HTMLIFrameElement::removedFromDocument):
              Call frameDetached.
              
              (WebCore::HTMLIFrameElement::attach):
              If there's a renderer, attach the content frame to it.
              
              (WebCore::HTMLIFrameElement::detach):
              Reset the renderer's frame.
              
              (WebCore::HTMLIFrameElement::openURL):
              Modify to request the frame.
              
              * html/HTMLIFrameElement.h:
              Add detach.
              
              * page/Frame.cpp:
              (WebCore::parentFromOwnerElement):
              (WebCore::Frame::Frame):
              (WebCore::Frame::~Frame):
              (WebCore::Frame::requestFrame):
              (WebCore::Frame::requestObject):
              (WebCore::Frame::loadSubframe):
              (WebCore::Frame::ownerElement):
              (WebCore::Frame::ownerRenderer):
              (WebCore::Frame::disconnectOwnerElement):
              * page/Frame.h:
              * page/FramePrivate.h:
              (WebCore::FramePrivate::FramePrivate):        
              * rendering/RenderPart.cpp:
              (WebCore::RenderPart::setFrame):
              Modify to keep an owner element around instead of the renderer. 
              
              * rendering/RenderPartObject.cpp:
              (WebCore::RenderPartObject::updateWidget):
              Don't do anything for iframes.
      
      WebKit:
      
      2006-07-05  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Maciej.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=3581
              iFrames set to display:none are Missing from frames array
              
              * WebCoreSupport/WebFrameBridge.m:
              (-[WebFrameBridge initSubframeWithOwnerElement:frameName:view:]):
              (-[WebFrameBridge createChildFrameNamed:withURL:referrer:ownerElement:allowsScrolling:marginWidth:marginHeight:]):
              Modify to pass the owner element instead of the owner renderer.
              
              * WebView/WebHTMLView.m:
              (-[WebHTMLView _topHTMLView]):
              Remove assertion, it's not valid anymore.
      
      LayoutTests:
      
      2006-07-05  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Maciej.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=3581
              iFrames set to display:none are Missing from frames array
      
              * fast/events/mouseover-mouseout2-expected.txt:
              * fast/events/mouseover-mouseout2.html:
              Update expected result. Since we now keep the frame around, the mouseout event is 
              now dispatched to the element in the frame.
      
              * fast/events/onloadFrameCrash-expected.checksum:
              * fast/events/onloadFrameCrash-expected.png:
              * fast/events/onloadFrameCrash-expected.txt:
              This does hide the frame now.
              
              * fast/frames/iframe-display-none-expected.txt: Added.
              * fast/frames/iframe-display-none.html: Added.
              * fast/frames/resources/iframe-display-none-child.html: Added.
              New test that tests JS interaction with frames.
              
              * fast/frames/iframe-double-attach-expected.txt: Added.
              * fast/frames/iframe-double-attach.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a434621
    • thatcher's avatar
      Reviewed by Harrison. · d7e7b079
      thatcher authored
              <rdar://problem/4608423> HIViewAdapter used but not defined
              Adds a new export file to fix the build.
      
              * WebKit.LP64.exp: Added.
              * WebKit.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d7e7b079