1. 29 Sep, 2006 3 commits
  2. 23 Sep, 2006 1 commit
    • ap's avatar
      Reviewed by Eric. · 37b0558e
      ap authored
              http://bugzilla.opendarwin.org/show_bug.cgi?id=4872
              XMLHttpRequest fails to throw an exception when there is a security violation
              (mismatching domains)
      
              Raise an exception if there is a security violation, and also in cases required by
              the current draft of XHR specification.
      
      WebCore:
              * bindings/js/JSXMLHttpRequest.cpp:
              (KJS::JSXMLHttpRequest::getValueProperty): Raise an exception if a DOM method reports one.
              (KJS::JSXMLHttpRequestProtoFunc::callAsFunction): Raise an exception if a DOM method
              reports one, and also if there were too few arguments passed. 
      
              * bindings/js/kjs_binding.cpp:
              (KJS::setDOMException): Added support for custom XHR exceptions.
      
              * xml/xmlhttprequest.h: Changed state names to match the current spec. Defined an
              exception code range for XHR exceptions.
      
              * xml/xmlhttprequest.cpp:
              (WebCore::XMLHttpRequest::open): Removed a check for m_aborted that could never succeed.
              (WebCore::XMLHttpRequest::send):
              (WebCore::XMLHttpRequest::setRequestHeader):
              (WebCore::XMLHttpRequest::getStatus):
              (WebCore::XMLHttpRequest::getStatusText):
              (WebCore::XMLHttpRequest::processSyncLoadResults):
              (WebCore::XMLHttpRequest::receivedAllData):
              (WebCore::XMLHttpRequest::receivedData):
      
      LayoutTests:
              * http/tests/xmlhttprequest/exceptions-expected.txt: Added.
              * http/tests/xmlhttprequest/exceptions.html: Added.
      
              * http/tests/xmlhttprequest/extra-parameters-expected.txt: Added.
              * http/tests/xmlhttprequest/extra-parameters.html: Added.
              * http/tests/xmlhttprequest/resources/post-echo.cgi: Added.
              Test that passing too many parameters is OK (Firefox behavior; WinIE raises an exception).
      
              * fast/dom/xmlhttprequest-get-expected.txt: Updated results. 
      
              * http/tests/xmlhttprequest/zero-length-response-expected.txt:
              * http/tests/xmlhttprequest/zero-length-response-sync-expected.txt:
              * http/tests/xmlhttprequest/zero-length-response-sync.html:
              * http/tests/xmlhttprequest/zero-length-response.html:
              Updated results and changed state names to match the current spec.
      
              * http/tests/xmlhttprequest/resources/zero-length.xml: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      37b0558e
  3. 15 Sep, 2006 2 commits
  4. 12 Sep, 2006 1 commit
    • kmccullo's avatar
      LayoutTests: · b4b0826c
      kmccullo authored
              Reviewed by Andersca, Maciej, Brady.
      
              * fast/dom/Range/range-intersectsNode-expected.txt: Added.
              * fast/dom/Range/range-intersectsNode.html: Added.
              * fast/dom/Range/resources/intersectsNode.js: Added.
      
      WebCore:
      
              Reviewed by Andersca, Maciej, Brady.
      
              - Implemented intersectsNode in the Range Class
                to be compliant with Mozilla standard
      
              * dom/Range.cpp:
              (WebCore::Range::intersectsNode):
              * dom/Range.h:
              * dom/Range.idl:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b4b0826c
  5. 11 Sep, 2006 2 commits
    • kmccullo's avatar
      LayoutTests: · 3acf4dc9
      kmccullo authored
              Reviewed by Darin.
      
              * ChangeLog:
              * fast/dom/Range/range-compareNode-expected.txt: Added.
              * fast/dom/Range/range-compareNode.html: Added.
              * fast/dom/Range/range-comparePoint.html:
      
      WebCore:
      
              Reviewed by Darin. 
      
              - Implements comparePoint on the Range class
      
              - Exposes RangeExceptions in JavaScript
      
              * DerivedSources.make:
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/kjs_binding.cpp:
              * bindings/objc/DOMInternal.mm:
              * dom/Range.cpp:
              (WebCore::Range::comparePoint):
              (WebCore::Range::compareNode):
              * dom/Range.h:
              (WebCore::Range::):
              * dom/Range.idl:
              * dom/RangeException.h: Added.
              (WebCore::):
              * dom/RangeException.idl: Added.
              * page/DOMWindow.idl:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3acf4dc9
    • darin's avatar
      LayoutTests: · 55f19628
      darin authored
              Reviewed by Darin.
      
              - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=10323
                REGRESSION: javascript: URL containing '\\' gets passed as '//'
      
              * fast/dom/javascript-backslash-expected.txt: Added.
              * fast/dom/javascript-backslash.html: Added.
      
      WebCore:
      
              Reviewed by Darin.
      
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=10323
                REGRESSION: javascript: URL containing '\\' gets passed as '//'
      
              Test: fast/dom/javascript-backslash.html
      
              * platform/KURL.cpp: (WebCore::KURL::init): Don't do backslash
              substitution in JavaScript URLs.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      55f19628
  6. 03 Sep, 2006 1 commit
    • ap's avatar
      Reviewed by Tim H. · 48657268
      ap authored
              http://bugzilla.opendarwin.org/show_bug.cgi?id=4508
              Layout tests access an external server
      
              * fast/backgrounds/repeat/noRepeatCorrectClip.html: Use a local resource (it was already present,
              but the test still pointed to a remote one).
              * fast/dom/HTMLImageElement/image-src-absolute-url-expected.txt:
              * fast/dom/HTMLImageElement/image-src-absolute-url.html: Use a non-existent file URL instead of 
              a non-existent http one.
              * fast/loader/docLoaderFrame-expected.checksum: Removed.
              * fast/loader/docLoaderFrame-expected.png: Removed.
              * fast/loader/docLoaderFrame-expected.txt: Removed.
              * fast/loader/docLoaderFrame.html: Removed.
              * http/tests/xmlhttprequest/docLoaderFrame-expected.txt: Added.
              * http/tests/xmlhttprequest/docLoaderFrame.html: Added.
              * http/tests/xmlhttprequest/resources/docLoaderFrame-data.html: Added.
              Use a local resource. Also, turned the test into a text one, and used waitUntilDone to make it 
              actually work.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      48657268
  7. 31 Aug, 2006 1 commit
    • aliceli1's avatar
      LayoutTests: · edb55a55
      aliceli1 authored
              Reviewed by Darin.
      
              Revised expected results for an isindex element because of 
              <rdar://problem/4463870> Switch to use new text field implementation for <isindex>
              Now the field is rendered as a textfield
      
              * fast/dom/isindex-002-expected.checksum:
              * fast/dom/isindex-002-expected.png:
              * fast/dom/isindex-002-expected.txt:
      
      WebCore:
      
              Reviewed by Darin.
      
              Fixed <rdar://problem/4463870> Switch to use new text field implementation for <isindex>
      
              * bindings/objc/DOMHTML.mm:
              (-[DOMHTMLInputElement _isTextField]):
              moved isindex from the list of nonTextInputTypes to the list of textInputTypes
              * css/html4.css:
              added isindex to certain rules that applied to input fields
              * html/HTMLInputElement.cpp:
              (WebCore::HTMLInputElement::canHaveSelection):
              (WebCore::HTMLInputElement::selectionStart):
              (WebCore::HTMLInputElement::selectionEnd):
              (WebCore::HTMLInputElement::setSelectionStart):
              (WebCore::HTMLInputElement::setSelectionEnd):
              (WebCore::HTMLInputElement::select):
              (WebCore::HTMLInputElement::setSelectionRange):
              (WebCore::HTMLInputElement::createRenderer):
              for the 8 methods above, moved the case for isindex to the same case as text
              * html/HTMLInputElement.h:
              (WebCore::HTMLInputElement::isNonWidgetTextField):
              added isindex to this test
              * html/HTMLIsIndexElement.idl:
              HTMLIsIndexElement inherits from HTMLInputElement
              * rendering/RenderLineEdit.cpp:
              (WebCore::RenderLineEdit::RenderLineEdit):
              removed the case for isindex since we changed the renderer type from a RenderLineEdit
              to a RenderTextControl in WebCore::HTMLInputElement::createRenderer()
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      edb55a55
  8. 24 Aug, 2006 1 commit
    • harrison's avatar
      LayoutTests: · b26652e4
      harrison authored
              Updated expected results for this change:
              
              <rdar://problem/4522205> Represent controls in AXAttributedStringForTextMarkerRange
      
              * editing/selection/anchor-focus1-expected.txt:
              * editing/selection/anchor-focus2-expected.txt:
              * editing/selection/anchor-focus3-expected.txt:
              * editing/selection/move-begin-end-expected.txt:
              * fast/dom/Element/onclick-case-expected.txt:
              * fast/dom/HTMLInputElement/size-as-number-expected.txt:
              * fast/dom/document-all-input-expected.txt:
              * fast/dom/option-properties-expected.txt:
              * fast/events/objc-keyboard-event-creation-expected.txt:
              * fast/events/onsubmit-bubbling-expected.txt:
              * fast/forms/access-key-expected.txt:
              * fast/forms/activate-and-disabled-elements-expected.txt:
              * fast/forms/button-in-forms-collection-expected.txt:
              * fast/forms/check-box-enter-key-expected.txt:
              * fast/forms/cursor-position-expected.txt:
              * fast/forms/display-none-in-onchange-keyboard-expected.txt:
              * fast/forms/domstring-replace-crash-expected.txt:
              * fast/forms/double-focus-expected.txt:
              * fast/forms/element-by-name-expected.txt:
              * fast/forms/empty-get-expected.txt:
              * fast/forms/focus-expected.txt:
              * fast/forms/form-get-multipart-expected.txt:
              * fast/forms/form-get-multipart2-expected.txt:
              * fast/forms/form-get-multipart3-expected.txt:
              * fast/forms/form-post-urlencoded-expected.txt:
              * fast/forms/input-appearance-elementFromPoint-expected.txt:
              * fast/forms/input-appearance-maxlength-expected.txt:
              * fast/forms/input-changing-value-expected.txt:
              * fast/forms/input-delete-expected.txt:
              * fast/forms/input-selection-hidden-expected.txt:
              * fast/forms/input-selection-restore-expected.txt:
              * fast/forms/input-text-enter-expected.txt:
              * fast/forms/input-truncate-newline-expected.txt:
              * fast/forms/legend-access-key-expected.txt:
              * fast/forms/onchange-enter-submit-expected.txt:
              * fast/forms/onselect-textarea-expected.txt:
              * fast/forms/onselect-textfield-expected.txt:
              * fast/forms/paste-into-textarea-expected.txt:
              * fast/forms/plaintext-mode-1-expected.txt:
              * fast/forms/select-remove-option-expected.txt:
              * fast/forms/select-replace-option-expected.txt:
              * fast/forms/select-reset-expected.txt:
              * fast/forms/selection-functions-expected.txt:
              * fast/forms/text-field-setvalue-crash-expected.txt:
              * fast/forms/textarea-crlf-expected.txt:
              * fast/forms/textarea-scrolled-endline-caret-expected.txt:
              * fast/forms/textarea-setvalue-submit-expected.txt:
              * fast/forms/textfield-focus-out-expected.txt:
      
      WebCore:
      
              Reinstate r15966 because layout test changes are correct.
      
              <rdar://problem/4522205> Represent controls in AXAttributedStringForTextMarkerRange
      
              * editing/TextIterator.cpp:
              (WebCore::TextIterator::advance):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16011 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b26652e4
  9. 29 Jul, 2006 2 commits
  10. 27 Jul, 2006 1 commit
  11. 26 Jul, 2006 1 commit
    • eseidel's avatar
      2006-07-27 Eric Seidel <eric@eseidel.com> · 3764f870
      eseidel authored
              Reviewed by ap.
      
              Enables getSVGDocument() support for HTMLObjectElement and HTMLEmbedElement
              This patch does not try to autogenerate anything, but enables the SVG functionality.
              Also fix HTMLObjectElement vspace and hspace to be numbers instead of strings to match IE & Firefox.
      
              * bindings/js/kjs_dom.cpp:
              (KJS::toJS):
              * bindings/js/kjs_html.cpp:
              (KJS::JSHTMLElement::objectGetter):
              (KJS::HTMLElementFunction::callAsFunction):
              (KJS::JSHTMLElement::objectSetter):
              * bindings/js/kjs_html.h:
              (KJS::JSHTMLElement::):
              * dom/Document.h:
              (WebCore::Document::isSVGDocument):
              * html/HTMLEmbedElement.cpp:
              (WebCore::HTMLEmbedElement::contentDocument):
              (WebCore::HTMLEmbedElement::getSVGDocument):
              * html/HTMLEmbedElement.h:
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::HTMLObjectElement):
              (WebCore::HTMLObjectElement::getInstance):
              (WebCore::HTMLObjectElement::parseMappedAttribute):
              (WebCore::HTMLObjectElement::contentDocument):
              (WebCore::HTMLObjectElement::rendererIsNeeded):
              (WebCore::HTMLObjectElement::createRenderer):
              (WebCore::HTMLObjectElement::setCode):
              (WebCore::HTMLObjectElement::setArchive):
              (WebCore::HTMLObjectElement::setBorder):
              (WebCore::HTMLObjectElement::setCodeBase):
              (WebCore::HTMLObjectElement::setCodeType):
              (WebCore::HTMLObjectElement::setData):
              (WebCore::HTMLObjectElement::hspace):
              (WebCore::HTMLObjectElement::setHspace):
              (WebCore::HTMLObjectElement::setStandby):
              (WebCore::HTMLObjectElement::setType):
              (WebCore::HTMLObjectElement::setUseMap):
              (WebCore::HTMLObjectElement::vspace):
              (WebCore::HTMLObjectElement::setVspace):
              (WebCore::HTMLObjectElement::getSVGDocument):
              * html/HTMLObjectElement.h:
              * ksvg2/svg/SVGDocument.h:
              (WebCore::SVGDocument::isSVGDocument):
              * rendering/RenderWidget.h:
              (WebCore::RenderWidget::frameView):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3764f870
  12. 21 Jul, 2006 1 commit
    • ggaren's avatar
      JavaScriptCore: · b7d19066
      ggaren authored
              Reviewed by Darin.
      
              - Added support for strings that masquerade as undefined. Currently used
              by WebCore to implement undetectable style.filter.
              
              The name is a little long, but it's only used in one line of code, so I
              thought clarity should win over brevity.
      
              * JavaScriptCore.exp:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * kjs/object.h:
              * kjs/string_object.h:
              (KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined):
              (KJS::StringInstanceThatMasqueradesAsUndefined::masqueradeAsUndefined):
              (KJS::StringInstanceThatMasqueradesAsUndefined::toBoolean):
      
      LayoutTests:
      
              Test for undetectable style.filter property.
      
              * fast/dom/undetectable-style-filter-expected.txt: Added.
              * fast/dom/undetectable-style-filter.html: Added.
      
      WebCore:
      
              Reviewed by Darin.
              
              - Fixed <rdar://problem/4507265> REGRESSION: overlays don't work on 
              HousingMaps.com (Google Maps-based site)
              
              - Made style.filter undetectable, like document.all.
              
              Unfortunately, the SVG spec-makers invented a CSS attribute named 'filter',
              which conflicts with IE's custom CSS attribute by the same name. Web programs 
              like the Google maps API test for style.filter, and assume it's the IE 
              style.filter if they find it, so we need to make style.filter undetectable 
              to avoid breaking them.
              
              An alternative solution would be to hotwire a delorean, go back in time,
              and beg the web standards makers to make standards that work on the web.
      
              * bindings/js/kjs_css.cpp:
              (KJS::DOMCSSStyleDeclaration::cssPropertyGetter):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b7d19066
  13. 18 Jul, 2006 1 commit
    • darin's avatar
      Reviewed by Alice. · 10327299
      darin authored
              - convert a couple of tests to "dump as text" tests
      
              * fast/dom/css-selectorText-expected.checksum: Removed.
              * fast/dom/css-selectorText-expected.png: Removed.
              * fast/dom/css-selectorText-expected.txt: Replaced render tree results with text results.
              * fast/dom/css-selectorText.html: Added a call to layoutTestController.dumpAsText.
      
              * fast/dom/css-shortHands-expected.checksum: Removed.
              * fast/dom/css-shortHands-expected.png: Removed.
              * fast/dom/css-shortHands-expected.txt: Replaced render tree results with text results.
              * fast/dom/css-shortHands.html: Added a call to layoutTestController.dumpAsText.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      10327299
  14. 16 Jul, 2006 1 commit
  15. 15 Jul, 2006 1 commit
    • ggaren's avatar
      LayoutTests: · 7993ac79
      ggaren authored
              Reviewed by Maciej.
              
              Layout test for crash when setting the dir property on a document with no body.
      
              * fast/dom/dir-no-body-expected.txt: Added.
              * fast/dom/dir-no-body.html: Added.
      
      WebCore:
      
              Reviewed by Maciej, tweaked to match Darin's patch.
              
              - Fixed <rdar://problem/4631837> REGRESSION: Reproducible crash on 
              FCKeditor demo (9911)
              
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/kjs_html.cpp:
              (KJS::JSHTMLDocument::putValueProperty): Check for a null body element before
              forwarding the put request to it. I confirmed that no other parts of the 
              file use 'body' or 'bodyElement' without checking for null. 
              
              Also, use 'body' rather than 'bodyElement' because dir can bet set on 
              any element, not just HTMLBodyElement.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7993ac79
  16. 13 Jul, 2006 1 commit
    • ddkilzer's avatar
      JavaScriptCore: · 9764998e
      ddkilzer authored
              Reviewed by Geoffrey.  Patch by Mark Rowe.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=9742
              Bug 9742: REGRESSION: WebKit hangs when loading <http://www.vtbook.com>
      
              * kjs/value.h:
              (KJS::JSValue::getUInt32): Only types tagged as numeric can be converted to UInt32.
      
      LayoutTests:
      
              Reviewed by Geoffrey.  Patch by Mark Rowe.
      
              http://bugzilla.opendarwin.org/show_bug.cgi?id=9742
              Bug 9742: REGRESSION: WebKit hangs when loading <http://www.vtbook.com>
      
              This includes tests for indexing an array with immediate types, and for
              setting selectField.options.length to immediate types.
      
              * fast/dom/select-selectedIndex-expected.txt:
              * fast/dom/select-selectedIndex-multiple-expected.txt:
              * fast/dom/select-selectedIndex-multiple.html: Update to test setting length to true and false.
              * fast/dom/select-selectedIndex.html: Ditto.
              * fast/js/array-index-immediate-types-expected.txt: Added.
              * fast/js/array-index-immediate-types.html: Added.
              * fast/js/resources/array-index-immediate-types.js: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9764998e
  17. 10 Jul, 2006 3 commits
    • ddkilzer's avatar
      JavaScriptCore: · 20e0d1b4
      ddkilzer authored
              Reviewed by Darin.
      
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
                Implement select.options.add() method
      
              * JavaScriptCore.exp: Added overloaded KJS::JSValue::toInt32() method.
              * JavaScriptCore.xcodeproj/project.pbxproj: Altered attributes metadata for
              kjs/value.h to make it available as a forwarded header.
              * kjs/lookup.h:
              (KJS::lookupPut): Extracted a lookupPut() method from the existing lookupPut() method.
              The new method returns a boolean value if no entry is found in the lookup table.
              * kjs/value.cpp:
              (KJS::JSValue::toInt32): Overloaded toInt32() method with boolean "Ok" argument.
              * kjs/value.h: Ditto.
      
      LayoutTests:
      
              Reviewed by Darin.
      
              - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
                Implement select.options.add() method
      
              * fast/dom/select-selectedIndex-multiple-expected.txt: Updated test results.
              * fast/dom/select-selectedIndex-multiple.html: Updated to print comments between
              tests to make failures easier to track down.
              * fast/dom/select-selectedIndex-expected.txt: Mirrored updates from select-selectedIndex-multiple.html
              * fast/dom/select-selectedIndex.html: Ditto.
              * fast/js/resources/select-options-add.js: Added.
              * fast/js/select-options-add-expected.txt: Added.
              * fast/js/select-options-add.html: Added.
      
      WebCore:
      
              Reviewed by Darin.
      
              - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
                Implement select.options.add() method
      
              Tests:
              - fast/dom/select-selectedIndex-multiple.html
              - fast/dom/select-selectedIndex.html
              - fast/js/select-options-add.html
      
              * DerivedSources.make: Added JSHTMLOptionsCollection.h.
              * ForwardingHeaders/kjs/operations.h: Added.
              * WebCore.xcodeproj/project.pbxproj: Added new source files.
              * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Added.
              (WebCore::JSHTMLOptionsCollection::length):
              (WebCore::JSHTMLOptionsCollection::setLength):
              (WebCore::JSHTMLOptionsCollection::indexSetter):
              * bindings/js/kjs_html.cpp: Removed JSHTMLOptionsCollection implementation.
              Renamed classes and methods for consistency.
              (KJS::JSHTMLElement::selectGetter):
              (KJS::JSHTMLElement::put):
              (KJS::JSHTMLElement::selectSetter):
              (KJS::JSHTMLCollection::JSHTMLCollection):
              (KJS::JSHTMLCollectionProtoFunc::callAsFunction):
              (KJS::getHTMLOptionsCollection):
              * bindings/js/kjs_html.h: Ditto.
              * bindings/scripts/CodeGeneratorJS.pm: Added support for HasCustomIndexSetter class attribute.
              Added support for Optional parameter attribute, which makes generated code assume overloaded
              implementation methods are available for a JavaScript function with optional arguments.  Changed
              local 'impl' variables to 'imp' so that impl() methods could be called without class designation.
              * html/HTMLOptionElement.idl: Added GenerateNativeConverter attribute.
              * html/HTMLOptionsCollection.cpp: Added methods used by generated JSHTMLOptionsCollection class.
              (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
              (WebCore::HTMLOptionsCollection::add):
              (WebCore::HTMLOptionsCollection::selectedIndex):
              (WebCore::HTMLOptionsCollection::setSelectedIndex):
              (WebCore::HTMLOptionsCollection::setLength):
              * html/HTMLOptionsCollection.h: Ditto.
              * html/HTMLOptionsCollection.idl: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      20e0d1b4
    • bdakin's avatar
      Reviewed by Darin. · c99e4804
      bdakin authored
              Fix for <rdar://problem/4621095> The should be a way to 
              access the user interface scale factor through the DOM
      
              window.devicePixelRatio returns the user interface scale factor.
      
              * page/DOMWindow.cpp:
              (WebCore::DOMWindow::devicePixelRatio):
              * page/DOMWindow.h:
              * page/DOMWindow.idl:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c99e4804
    • adele's avatar
      Reviewed by Maciej. · 263ee227
      adele authored
              Fix for <rdar://problem/4463835> Switch to use new popup menu implementation for <select>
      
              * css/html4.css: Added style for new selects, and for list boxes.
              * html/HTMLSelectElement.h: (WebCore::HTMLSelectElement::shouldUseMenuList): Removed check for appearance so new popups can be styled.
         
              * rendering/RenderMenuList.cpp:
              (WebCore::RenderMenuList::setStyle): Removed padding.  This is now set by the theme.
              (WebCore::RenderMenuList::calcMinMaxWidth): Now takes minimum text size into account.
              * rendering/RenderMenuList.h: Removed baselinePosition since we're letting the theme calculate that.
      
              * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isControlContainer): Added menuList as a ControlContainer, 
              so RenderThemeMac will compute its baseline.
              * rendering/RenderTheme.h: (WebCore::RenderTheme::minimumTextSize): Added.
              * rendering/RenderThemeMac.h: Added minimumTextSize, setPopupPaddingFromControlSize, popupButtonSizes, popupButtonMargins, popupButtonPadding.
              Removed sizeOfArrowControl. 
              * rendering/RenderThemeMac.mm:
              (WebCore::): Added enum for padding.
              (WebCore::RenderThemeMac::adjustRepaintRect): Now inflates rect to account for control shadow.
              (WebCore::RenderThemeMac::baselinePosition): Now calculates baseline for menulist.
              (WebCore::RenderThemeMac::popupButtonMargins): Tweaked values.
              (WebCore::RenderThemeMac::popupButtonSizes): Added.
              (WebCore::RenderThemeMac::popupButtonPadding): Added, so different padding can be set for different control sizes.
              (WebCore::RenderThemeMac::setPopupPaddingFromControlSize): Added.
              (WebCore::RenderThemeMac::paintMenuList): Now inflates rect to account for control shadow.
              (WebCore::RenderThemeMac::adjustMenuListStyle): Resets border, sets padding, sets control size.
              (WebCore::RenderThemeMac::setPopupButtonCellState): Removed unnecessary class name.
              (WebCore::RenderThemeMac::minimumTextSize): Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      263ee227
  18. 09 Jul, 2006 4 commits
    • ggaren's avatar
      LayoutTests: · 7e95087c
      ggaren authored
              Reviewed by Beth.
              
              Now that we garbage collect after reinitalizing the global object, not
              before, we have more free memory, so a custom property that used to
              get collected during the initialization phase of this test now avoids
              getting collected until the collection phase.
      
              * fast/dom/gc-9-expected.txt:
              * fast/dom/gc-9.html:
      
      WebCore:
      
              Reviewed by Beth.
      
              * bindings/js/kjs_window.cpp:
              (KJS::Window::clear): Garbage collect after reinitalizing the global
              object, not before, since the reinitialization tends to create garbage.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e95087c
    • darin's avatar
      * fast/dom/delete-contents-expected.txt: Updated results that changed · b7922967
      darin authored
              because we now keep comment nodes in the DOM.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b7922967
    • harrison's avatar
      LayoutTests: · 7f4659e6
      harrison authored
              Reviewed by John Sullivan.
      
              <rdar://problem/4598149> Deleting the contents of a DOMRange and then inserting a node into it crashes in WebCore::Font::canUseGlyphCache
      
              * fast/dom/delete-contents-expected.checksum: Added.
              * fast/dom/delete-contents-expected.png: Added.
              * fast/dom/delete-contents-expected.txt: Added.
              * fast/dom/delete-contents.html: Added.
      
      WebCore:
      
              Reviewed by John Sullivan.
      
              <rdar://problem/4598149> Deleting the contents of a DOMRange and then inserting a node into it crashes in WebCore::Font::canUseGlyphCache
      
              Test: fast/dom/delete-contents.html
              
              * dom/Range.cpp:
              (WebCore::Range::processContents):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f4659e6
    • thatcher's avatar
      LayoutTests: · e6e3e565
      thatcher authored
              Reviewed by Maciej.
      
              Bug 5312: comments aren't available via DOM
              http://bugzilla.opendarwin.org/show_bug.cgi?id=5312
      
              New tests for DOM comment nodes. Updated results to account for new
              nodes in the DOM (editing offsets changed.)
      
              * editing/deleting/delete-line-013-expected.txt:
              * editing/deleting/delete-line-014-expected.txt:
              * editing/inserting/insert-3907422-fix-expected.txt:
              * editing/inserting/insert-div-009-expected.txt:
              * editing/inserting/insert-div-010-expected.txt:
              * editing/selection/extend-by-character-006-expected.txt:
              * editing/selection/move-between-blocks-no-001-expected.txt:
              * editing/selection/move-between-blocks-yes-001-expected.txt:
              * fast/dom/HTMLDocument/object-by-name-or-id-expected.txt:
              * fast/dom/HTMLDocument/object-by-name-or-id.html:
              * fast/dom/comment-document-fragment-expected.txt: Added.
              * fast/dom/comment-document-fragment.html: Added.
              * fast/dom/comment-dom-node-expected.txt: Added.
              * fast/dom/comment-dom-node.html: Added.
              * fast/dom/comment-not-documentElement-expected.checksum: Added.
              * fast/dom/comment-not-documentElement-expected.png: Added.
              * fast/dom/comment-not-documentElement-expected.txt: Added.
              * fast/dom/comment-not-documentElement.html: Added.
              * fast/text/atsui-pointtooffset-calls-cg-expected.txt:
              * fast/text/atsui-rtl-override-selection-expected.txt:
      
      WebCore:
      
              Reviewed by Maciej.
      
              Bug 5312: comments aren't available via DOM
              http://bugzilla.opendarwin.org/show_bug.cgi?id=5312
      
              <rdar://problem/4564414> getting comments via DOM isn't working (5312)
              <rdar://problem/4545691> DOM_COMMENT node masking out real DOM elements
      
              * dom/Document.cpp:
              (WebCore::Document::removedLastRef): set m_documentElement to 0
              (WebCore::Document::childrenChanged): invalidate the document element we have cached in case it was replaced
              (WebCore::Document::documentElement): cache the first element as the document node if m_documentElement is 0
              * dom/Document.h: added m_documentElement
              * html/HTMLDocument.cpp: removed documentElement(), HTML documents just use Document's documentElement()
              * html/HTMLDocument.h: ditto
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::handleError): make a new HTML node is the document's firstChild is NULL or
              the firstChild is not a HTML element (like a comment)
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::parseComment): removed the #ifdef to include comment nodes
      
      WebKit:
      
              Reviewed by Maciej.
      
              Bug 5312: comments aren't available via DOM
              http://bugzilla.opendarwin.org/show_bug.cgi?id=5312
      
              Makes the Web Inspector show comment node contents.
      
              * WebInspector/WebInspector.m:
              (-[DOMNode _displayName]): return the contents of the comment
              * WebInspector/webInspector/inspector.js: check for comment nodes
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6e3e565
  19. 08 Jul, 2006 1 commit
    • darin's avatar
      - clear up a few minor housekeeping problems · 4714c0a6
      darin authored
              * fast/css/xml-stylesheet-pi-not-in-prolog-expected.checksum: Added.
              * fast/css/xml-stylesheet-pi-not-in-prolog-expected.png: Added.
              * fast/forms/input-appearance-height-expected.checksum: Added.
              Added missing test results.
      
              * fast/block/float/nopaint-after-layer-destruction-expected.checksum:
              * fast/block/positioning/absolute-positioned-overconstrained.html:
              * fast/css/ZeroOpacityLayers.html:
              * fast/css/ZeroOpacityLayers2.html:
              * fast/css/font-shorthand-weight-only-expected.checksum:
              * fast/css/hsl-color-expected.checksum:
              * fast/css/hsla-color-expected.checksum:
              * fast/css/resize-corner-tracking-expected.checksum:
              * fast/dom/HTMLLinkElement/pending-stylesheet-count-expected.checksum:
              * fast/dynamic/selection-highlight-adjust-expected.checksum:
              * fast/forms/button-generated-content-expected.checksum:
              * fast/frames/calculate-fixed.html:
              * fast/frames/calculate-order.html:
              * fast/frames/calculate-percentage.html:
              * fast/frames/calculate-relative.html:
              * fast/frames/calculate-round.html:
              * fast/history/clicked-link-is-visited-expected.checksum:
              * fast/layers/opacity-outline-expected.checksum:
              * fast/media/import-p-red.css:
              * fast/parser/broken-comments-vs-parsing-mode-expected.checksum:
              * fast/repaint/clipped-relative-expected.checksum:
              * fast/repaint/float-move-during-layout-expected.checksum:
              * fast/repaint/layer-child-outline-expected.checksum:
              * fast/repaint/outline-shrinking-expected.checksum:
              * fast/repaint/static-to-positioned-expected.checksum:
              * fast/repaint/table-collapsed-border-expected.checksum:
              * fast/table/absolute-table-at-bottom-expected.checksum:
              * fast/table/border-collapsing/border-collapsing-head-foot-expected.checksum:
              * fast/table/empty-section-crash-expected.checksum:
              * fast/table/rtl-cell-display-none-assert-expected.checksum:
              * fast/table/text-field-baseline-expected.checksum:
              * fast/text/capitalize-empty-generated-string-expected.checksum:
              * svg/custom/gradient-stroke-width-expected.checksum:
              * traversal/stay-within-root-expected.checksum:
              Removed "No newline at end of file" that snuck in as part of the "apply patch" process.
      
              * fast/block/positioning/absolute-positioned-overconstrained-expected.txt:
              * fast/css/ZeroOpacityLayers-expected.checksum:
              * fast/css/ZeroOpacityLayers-expected.png:
              * fast/css/ZeroOpacityLayers-expected.txt:
              * fast/css/ZeroOpacityLayers2-expected.checksum:
              * fast/css/ZeroOpacityLayers2-expected.png:
              * fast/css/ZeroOpacityLayers2-expected.txt:
              Updated tests results that changed due to the above.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4714c0a6
  20. 06 Jul, 2006 1 commit
    • 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
  21. 28 Jun, 2006 1 commit
  22. 27 Jun, 2006 1 commit
  23. 25 Jun, 2006 1 commit
    • ddkilzer's avatar
      WebCore: · 32149159
      ddkilzer authored
              Reviewed by Darin.
      
              Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707:
              event.clientX and event.clientY should be relative to the viewport, not the canvas
      
              Make sure clientX and clientY take into account the scroll offsets
              of the view.
      
              * dom/EventTargetNode.cpp:
              (WebCore::EventTargetNode::dispatchMouseEvent):
              * dom/MouseEvent.cpp:
              (WebCore::MouseEvent::MouseEvent):
              * dom/MouseEvent.h:
              * dom/MouseRelatedEvent.cpp:
              (WebCore::MouseRelatedEvent::MouseRelatedEvent):
              (WebCore::MouseRelatedEvent::initCoordinates):
              * dom/MouseRelatedEvent.h:
              * dom/WheelEvent.cpp:
              (WebCore::WheelEvent::WheelEvent):
              * page/FrameView.cpp:
              (WebCore::FrameView::dispatchDragEvent):
      
      LayoutTests:
      
              Reviewed by Darin.
      
              Test cases for
              <http://bugzilla.opendarwin.org/show_bug.cgi?id=8707>
              event.clientX and event.clientY should be relative to the viewport, not the canvas
      
              * fast/dom/window-xy-properties-expected.txt: Added.
              * fast/dom/window-xy-properties.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      32149159
  24. 24 Jun, 2006 2 commits
    • ddkilzer's avatar
      WebCore: · e730f672
      ddkilzer authored
              Build fix.  Reviewed by NOBODY.
      
              - Backed out patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707
                event.clientX and event.clientY should be relative to the viewport, not the canvas
      
              * dom/EventTargetNode.cpp:
              (WebCore::EventTargetNode::dispatchMouseEvent):
              * dom/MouseEvent.cpp:
              (WebCore::MouseEvent::MouseEvent):
              * dom/MouseEvent.h:
              * dom/MouseRelatedEvent.cpp:
              (WebCore::MouseRelatedEvent::MouseRelatedEvent):
              (WebCore::MouseRelatedEvent::initCoordinates):
              * dom/MouseRelatedEvent.h:
              * dom/WheelEvent.cpp:
              (WebCore::WheelEvent::WheelEvent):
      
      LayoutTests:
      
              Build fix.  Reviewed by NOBODY.
      
              - Backed out patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707
                event.clientX and event.clientY should be relative to the viewport, not the canvas
      
              * fast/dom/window-xy-properties-expected.txt: Removed.
              * fast/dom/window-xy-properties.html: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e730f672
    • ddkilzer's avatar
      WebCore: · 9c37765c
      ddkilzer authored
              Reviewed by Darin.  Patch by Rob Buis.
      
              Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8707:
              event.clientX and event.clientY should be relative to the viewport, not the canvas
      
              Make sure clientX and clientY take into account the scroll offsets
              of the view.
      
              Test: fast/dom/window-xy-properties.html
      
              * dom/EventTargetNode.cpp:
              (WebCore::EventTargetNode::dispatchMouseEvent):
              * dom/MouseEvent.cpp:
              (WebCore::MouseEvent::MouseEvent):
              * dom/MouseEvent.h:
              * dom/MouseRelatedEvent.cpp:
              (WebCore::MouseRelatedEvent::MouseRelatedEvent):
              (WebCore::MouseRelatedEvent::initCoordinates):
              * dom/MouseRelatedEvent.h:
              * dom/WheelEvent.cpp:
              (WebCore::WheelEvent::WheelEvent):
      
      LayoutTests:
      
              Reviewed by Darin.  Patch by Rob Buis.
      
              Test cases for
              <http://bugzilla.opendarwin.org/show_bug.cgi?id=8707>
              event.clientX and event.clientY should be relative to the viewport, not the canvas
      
              * fast/dom/window-xy-properties-expected.txt: Added.
              * fast/dom/window-xy-properties.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@15023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c37765c
  25. 22 Jun, 2006 2 commits
    • andersca's avatar
      WebCore: · dcdbf9da
      andersca authored
      2006-06-22  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by John.
      
              <rdar://problem/4529334> REGRESSION: Can't configure RadarInMotion widget for U.S. locations on Leopard (Javascript errors)
              
              * dom/Document.cpp:
              (WebCore::Document::completeURL):
              Check if both the URL and base URL are empty instead of using URL() which returns "about:blank" if the URL is empty.
      
      LayoutTests:
      
      2006-06-22  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by John.
      
              <rdar://problem/4529334> REGRESSION: Can't configure RadarInMotion widget for U.S. locations on Leopard (Javascript errors)
              
              * dom/Document.cpp:
              (WebCore::Document::completeURL):
              Check if both the URL and base URL are empty instead of using URL() which returns "about:blank" if the URL is empty.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dcdbf9da
    • andersca's avatar
      WebCore: · de52aa9d
      andersca authored
      2006-06-22  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Maciej.
      
              <rdar://problem/4499675> Package Tracker widget always crashes in WebCore::Frame::jScriptEnabled() const + 0
      
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::noscriptCreateErrorCheck):
              (WebCore::HTMLParser::canvasCreateErrorCheck):
              (WebCore::HTMLParser::isInline):
              Add null-checks for document->frame() since it can be 0 for documents created using createHTMLDocument.
      
      LayoutTests:
      
      2006-06-22  Anders Carlsson  <acarlsson@apple.com>
      
              Reviewed by Maciej.
      
              <rdar://problem/4499675> Package Tracker widget always crashes in WebCore::Frame::jScriptEnabled() const + 0
              
              * fast/dom/noscript-canvas-in-created-html-document-expected.txt: Added.
              * fast/dom/noscript-canvas-in-created-html-document.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      de52aa9d
  26. 18 Jun, 2006 1 commit
  27. 17 Jun, 2006 1 commit
    • adele's avatar
      LayoutTests: · c164c7af
      adele authored
              Reviewed by Darin.
      
              Test cases for
              <http://bugzilla.opendarwin.org/show_bug.cgi?id=6282>
      
              * fast/dom/select-selectedIndex-multiple.html: Added.
              * fast/dom/select-selectedIndex.html: Added.
      
      WebCore:
      
              Reviewed by Darin.
      
              Fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=6282:
              Adding new Option with new Option(text, value, defaultSelected, selected) fails to update selectedIndex
      
              Update selectedIndex when a new option is added using javascript.
      
              * bindings/js/kjs_html.cpp:
              (KJS::JSHTMLSelectCollection::put):
              * html/HTMLSelectElement.cpp:
              (WebCore::HTMLSelectElement::setSelectedIndex):
              (WebCore::HTMLSelectElement::setOption):
              (WebCore::HTMLSelectElement::setLength):
              * html/HTMLSelectElement.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c164c7af
  28. 13 Jun, 2006 1 commit
    • ggaren's avatar
      LayoutTests: · 5711f09c
      ggaren authored
              Test for createHTMLDocument.
      
              * fast/dom/implementation-createHTMLDocument-expected.txt: Added.
              * fast/dom/implementation-createHTMLDocument.html: Added.
      
      WebCore:
      
              Reviewed by Maciej.
              
              - Fixed <rdar://problem/4562192> Creating a new DOMHTMLDocument 
              appears challenging.
              
              - Added createHTMLDocument to Objc bindings, fixed up implementation
              to comply with the DOM 2 Candidate Recommendation in which is was defined.
              (It never made the final spec.) Also removed use of deprecatedString,
              to avoid unnecessary killing of puppies.
      
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/objc/DOM.mm:
              (-[DOMImplementation createHTMLDocument:]):
              * bindings/objc/DOMPrivate.h:
              * dom/DOMImplementation.cpp:
              (WebCore::DOMImplementation::createDocument):
              (WebCore::DOMImplementation::createHTMLDocument):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5711f09c