1. 20 Mar, 2008 1 commit
    • aroben@apple.com's avatar
      Allow blocking of JS event handlers/javascript: URIs per-Frame · 4d69cd1f
      aroben@apple.com authored
              Part of Bug 17133: Should support pausing JavaScript execution without
              hanging the process
      
              <http://bugs.webkit.org/show_bug.cgi?id=17133>
              <rdar://problem/5719551>
      
              Two new methods are added to KJSProxy: setPaused and isPaused. When
              setPaused(true) is called, JS event handlers are blocked and
              javascript: URIs will not be evaluated.
      
              Reviewed by Tim Hatcher.
      
              * bindings/js/kjs_events.cpp:
              (WebCore::JSAbstractEventListener::handleEvent):
                - Removed some old KJS_DEBUGGER code
                - Don't run the handler if the KJSProxy is paused.
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::KJSProxy): Initialize new member.
              * bindings/js/kjs_proxy.h: Added new methods.
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::executeScript): Don't execute the script if the
              KJSProxy is paused.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4d69cd1f
  2. 19 Mar, 2008 1 commit
    • weinig@apple.com's avatar
      JavaScriptCore: · ccbb2d03
      weinig@apple.com authored
      2008-03-19  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Anders Carlsson.
      
              Fix for <rdar://problem/5785694>
              Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file
      
              Make the activeExecStates stack per JSGlobalObject instead of static to ensure
              thread safety.
      
              * JavaScriptCore.exp:
              * kjs/ExecState.cpp:
              (KJS::InterpreterExecState::InterpreterExecState):
              (KJS::InterpreterExecState::~InterpreterExecState):
              (KJS::EvalExecState::EvalExecState):
              (KJS::EvalExecState::~EvalExecState):
              (KJS::FunctionExecState::FunctionExecState):
              (KJS::FunctionExecState::~FunctionExecState):
              * kjs/ExecState.h:
              (KJS::):
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::mark):
              * kjs/JSGlobalObject.h:
              (KJS::JSGlobalObject::activeExecStates):
              * kjs/collector.cpp:
              (KJS::Collector::collect):
              (KJS::Collector::reportOutOfMemoryToAllExecStates): Iterate all JSGlobalObjects and report
              the OutOfMemory condition to all the ExecStates in each.
      
      WebCore:
      
      2008-03-19  Sam Weinig  <sam@webkit.org>
      
              Reviewed by Anders Carlsson.
      
              Fix for <rdar://problem/5785694>
              Crash occurs at KJS::Collector::collect() when loading web clip widgets with a PAC file
      
              Make the activeExecStates stack per JSGlobalObject instead of static to ensure
              thread safety.
      
              * bindings/objc/WebScriptObject.mm:
              (+[WebScriptObject throwException:]): Change to throw an exception on the current
              GlobalObject instead of the top of the static activeExecStates stack.
              (-[WebScriptObject setException:]): Change to use the top of the rootObjects GlobalObject
              instead of the top of the static activeExecStates stack.
      
              * bridge/c/c_instance.cpp:
              * bridge/c/c_instance.h:
              * bridge/jni/jni_instance.cpp:
              (JavaInstance::virtualBegin):
              (JavaInstance::virtualEnd):
              * bridge/jni/jni_instance.h:
              * bridge/objc/objc_instance.h:
              * bridge/objc/objc_instance.mm:
              (ObjcInstance::~ObjcInstance):
              (ObjcInstance::virtualBegin):
              (ObjcInstance::virtualEnd):
              * bridge/runtime.cpp:
              (KJS::Bindings::Instance::setDidExecuteFunction):
              (KJS::Bindings::Instance::didExecuteFunction):
              (KJS::Bindings::Instance::setCurrentGlobalObject): Added.
              (KJS::Bindings::Instance::currentGlobalObject): Added.
              (KJS::Bindings::Instance::begin):
              (KJS::Bindings::Instance::end):
              * bridge/runtime.h:
              (KJS::Bindings::Instance::virtualBegin): Renamed from begin().
              (KJS::Bindings::Instance::virtualEnd): Renamed from end().
              We now store the currently active globalObject everytime we cross the runtime
              object boundary.  To do this, we take advantage of the existing begin/end
              methods that are called when crossing this boundary, making begin set the current
              globalObject and then call the old begin, now called virtualBegin.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ccbb2d03
  3. 18 Mar, 2008 3 commits
    • darin@apple.com's avatar
      JavaScriptCore: · 8a1c16ec
      darin@apple.com authored
      2008-03-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - Speed up JavaScript built-in properties by changing the
                hash table to take advantage of the identifier objects
      
              5% speedup for Acid3 test 26
      
              * JavaScriptCore.exp: Updated.
              * kjs/create_hash_table: Compute size of hash table large enough so that there
              are no collisions, but don't generate the hash table.
              * kjs/identifier.h: Made the add function that returns a PassRefPtr public.
              * kjs/lexer.cpp:
              (KJS::Lexer::lex): Updated for change to HashTable interface.
              * kjs/lookup.cpp:
              (KJS::HashTable::changeKeysToIdentifiers): Added. Finds the identifier for
              each property so the equality comparision can be done with pointer comparision.
              * kjs/lookup.h: Made the key be a union of char* with UString::Rep* so it can
              hold identifiers. Added a keysAreIdentifiers flag to the HashTable. Changed
              the Lookup functions to be member functions of HashTable instead.
              * kjs/object.cpp:
              (KJS::JSObject::deleteProperty): Update for change to HashTable.
              (KJS::JSObject::findPropertyHashEntry): Ditto.
              (KJS::JSObject::getPropertyAttributes): Ditto.
              (KJS::JSObject::getPropertyNames): Ditto.
      
      WebCore:
      
      2008-03-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - Speed up JavaScript built-in properties by changing the
                hash table to take advantage of the identifier objects
      
              5% speedup for Acid3 test 26
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::getOwnPropertySlot): Update for change to HashTable.
              (WebCore::JSDOMWindowBase::put): Ditto.
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::customGetOwnPropertySlot): Ditto.
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::JSHTMLInputElementBase::getOwnPropertySlot): Ditto.
              * bindings/js/JSHistoryCustom.cpp:
              (WebCore::JSHistory::customGetOwnPropertySlot): Ditto.
              * bindings/js/JSLocation.cpp:
              (WebCore::JSLocation::customGetOwnPropertySlot): Ditto.
              (WebCore::JSLocation::put): Ditto.
              * bindings/js/kjs_binding.cpp:
              (WebCore::nonCachingStaticFunctionGetter): Ditto.
      
              * bindings/scripts/CodeGeneratorJS.pm: Same changes as in the
              create_hash_table script.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a1c16ec
    • weinig@apple.com's avatar
      2008-03-18 Sam Weinig <sam@webkit.org> · e491b567
      weinig@apple.com authored
              Reviewed by Darin Adler.
      
              - Speed up JavaScript prototype and constructor object creation
                using a static Identifier in the self() methods to avoid the
                cost of creating one from a c-string each time.
      
              5% speedup for Acid3 test 26
      
              * bindings/scripts/CodeGeneratorJS.pm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e491b567
    • darin@apple.com's avatar
      JavaScriptCore: · a3c493e3
      darin@apple.com authored
      2008-03-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              JavaScriptCore changes to support a WebCore speedup.
      
              * JavaScriptCore.exp: Export the UString::Rep::computeHash function.
              * wtf/HashSet.h: Added a find and contains function that take a translator,
              like the add function.
      
      WebCore:
      
      2008-03-17  Darin Adler  <darin@apple.com>
      
              Reviewed by Maciej.
      
              - speed up document property fetching (eliminate the AtomicString
                objects made during document property lookup)
      
              3% speedup for Acid3 test 26
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::getOwnPropertySlot): Use AtomicString::find to
              locate the AtomicString, only if already present. Also call the new faster
              versions of the hasNamedItem and hasElementWithId functions that don't
              ref/deref the AtomicStringImpl, get inlined, etc.
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::canGetItemsForName): Ditto.
              (WebCore::writeHelper): Use a Vector instead of a String to build up
              the string to avoid the bad performance of string append.
      
              * dom/Document.cpp: Tweaked code and comments a bit. Nothing substantive.
              * dom/Document.h: Added new hasElementWithId function that's faster than
              getElementById because it doesn't ref/deref the AtomicStringImpl*, gets
              inlined, doesn't have to handle the 0 case, and doesn't try to return the
              element pointer (just a boolean).
      
              * html/HTMLAppletElement.cpp:
              (WebCore::HTMLAppletElement::parseMappedAttribute): Use AtomicString
              consistently. Also renamed the data member for clarity.
              (WebCore::HTMLAppletElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLAppletElement::removedFromDocument): Ditto.
              * html/HTMLAppletElement.h: Ditto.
      
              * html/HTMLDocument.cpp:
              (WebCore::addItemToMap): Use AtomicString instead of String.
              (WebCore::removeItemFromMap): Ditto.
              (WebCore::HTMLDocument::addNamedItem): Updated for member name change.
              (WebCore::HTMLDocument::removeNamedItem): Ditto.
              (WebCore::HTMLDocument::addExtraNamedItem): Ditto.
              (WebCore::HTMLDocument::removeExtraNamedItem): Ditto.
              (WebCore::HTMLDocument::clear): Added. Moved code here from the JavaScript
              bindings. If we're going to have an empty placeholder function, there's no
              reason to have it in the bindings instead of here.
              * html/HTMLDocument.h: Added clear. Changed the named item function
              arguments to AtomicString insted of String. Changed the NameCountMap to
              use AtomicStringImpl* instead of StringImpl*. Renamed the data members
              to add a m_ prefix and remove the needless doc prefix. Added hasNamedItem
              and hasExtraNamedItem functions that are inlined and faster than the old
              idiom because they doesn't ref/deref the AtomicStringImpl*, get inlined,
              and don't have to handle the 0 case.
              * html/HTMLDocument.idl: Removed the [Custom] attribute on clear and took
              it out of the JavaScript-specific section.
      
              * html/HTMLEmbedElement.cpp:
              (WebCore::HTMLEmbedElement::parseMappedAttribute): Use AtomicString
              consistently. Also renamed the data member for clarity.
              (WebCore::HTMLEmbedElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLEmbedElement::removedFromDocument): Ditto.
              * html/HTMLFormElement.cpp:
              (WebCore::HTMLFormElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLFormElement::removedFromDocument): Ditto.
              (WebCore::HTMLFormElement::parseMappedAttribute): Ditto.
              * html/HTMLFormElement.h: Ditto.
      
              * html/HTMLFrameElementBase.cpp:
              (WebCore::HTMLFrameElementBase::openURL): Renamed m_name to m_frameName for
              clarity, since the frame name is not the same as the name attribute.
              (WebCore::HTMLFrameElementBase::parseMappedAttribute): Ditto.
              (WebCore::HTMLFrameElementBase::setNameAndOpenURL): Ditto.
              * html/HTMLFrameElementBase.h: Ditto.
      
              * html/HTMLIFrameElement.cpp:
              (WebCore::HTMLIFrameElement::parseMappedAttribute): Use AtomicString
              consistently. Also renamed the data member for clarity.
              (WebCore::HTMLIFrameElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLIFrameElement::removedFromDocument): Ditto.
              * html/HTMLIFrameElement.h: Ditto.
              * html/HTMLImageElement.cpp:
              (WebCore::HTMLImageElement::parseMappedAttribute): Ditto.
              (WebCore::HTMLImageElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLImageElement::removedFromDocument): Ditto.
              * html/HTMLImageElement.h: Ditto.
              * html/HTMLObjectElement.cpp:
              (WebCore::HTMLObjectElement::parseMappedAttribute): Ditto.
              (WebCore::HTMLObjectElement::insertedIntoDocument): Ditto.
              (WebCore::HTMLObjectElement::removedFromDocument): Ditto.
              (WebCore::HTMLObjectElement::updateDocNamedItem): Ditto.
              * html/HTMLObjectElement.h: Ditto.
      
              * html/HTMLParamElement.cpp:
              (WebCore::HTMLParamElement::isURLAttribute): Use equalIgnoringCase instead
              of callling lower().
      
              * html/HTMLPlugInElement.h: Changed the type of m_name. The code that
              uses this is in HTMLAppletElement, HTMLEmbedElement, and HTMLObjectElement.
      
              * platform/text/AtomicString.cpp:
              (WebCore::equal): Moved to an inline so we can share this code between a
              few different functions. It could move to a header too if we want to use
              it elsewhere.
              (WebCore::UCharBufferTranslator::equal): Change to use inline.
              (WebCore::HashAndCharactersTranslator::hash): Added.
              (WebCore::HashAndCharactersTranslator::equal): Added.
              (WebCore::HashAndCharactersTranslator::translate): Added.
              (WebCore::AtomicString::add): Improved the Identifier and UString overloads
              to use the already-computed hash code instead of rehashing the string.
              (WebCore::AtomicString::find): Added.
              * platform/text/AtomicString.h: Added a find function so we can avoid
              allocating memory just to look up a string in an atomic string set or map.
      
              * platform/text/StringImpl.h: Added declarations needed for the
              AtomicString changes.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a3c493e3
  4. 14 Mar, 2008 1 commit
    • andersca@apple.com's avatar
      WebCore: · 74fb13b3
      andersca@apple.com authored
              Reviewed by Sam.
      
              <rdar://problem/5794989>
              https://bugs.webkit.org/show_bug.cgi?id=17792
              REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
      
              Pass the frame loader that should be used for looking up the frame name to FrameLoader::createWindow
              so that somewindow.open calls where the active window and 'somewindow' differ return the correct frame.
              
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::createWindow):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::createWindow):
              * loader/FrameLoader.h:
      
      LayoutTests:
      
              Reviewed by Sam.
      
              <rdar://problem/5794989>
              https://bugs.webkit.org/show_bug.cgi?id=17792
              REGRESSION (Safari 3.0.4-3.1): Ordering tickets from Sweden's biggest train operator doesn't work
              
              Add tests.
              
              * fast/dom/Window/window-open-self-from-other-frame-expected.txt: Added.
              * fast/dom/Window/window-open-self-from-other-frame.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      74fb13b3
  5. 11 Mar, 2008 1 commit
    • darin@apple.com's avatar
      WebCore: · 8ae505a0
      darin@apple.com authored
              Reviewed by Anders.
      
              - simplify Mac code for ScrollView, since it's used only for FrameView
                and not in two different modes like it was historically
              - remove code depending on the bridge to get from an NSView to a WebCore::Frame
      
              * bindings/objc/DOMHTML.mm:
              (-[DOMHTMLInputElement _rectOnScreen]): getDocumentView -> documentView.
      
              * bridge/jni/jni_jsobject.cpp:
              (createRootObject): Instead of using WebCoreViewFactory to find the frame given
              and NSView, use the WebCoreFrameView interface to do it.
      
              * editing/mac/EditorMac.mm:
              (WebCore::Editor::paste): getDocumentView -> documentView.
              * editing/mac/SelectionControllerMac.mm:
              (WebCore::SelectionController::notifyAccessibilityForSelectionChange): Ditto.
      
              * page/FrameView.h: Fixed comment.
      
              * page/InspectorController.cpp:
              (WebCore::InspectorController::drawNodeHighlight): Removed uneeded typecasts
              to ScrollView* since FrameView is derived from ScrollView.
      
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::focusDocumentView): getDocumentView -> documentView.
              * page/mac/FrameMac.mm:
              (WebCore::Frame::imageFromRect): Ditto.
              * page/mac/WebCoreAXObject.mm:
              (-[WebCoreAXObject position]): Ditto.
              (-[WebCoreAXObject doAXTextMarkerForPosition:]): Ditto.
              (-[WebCoreAXObject rendererForView:]): Updated code that used to use
              WebCoreBridgeHolder to use WebCoreFrameView instead.
      
              * page/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge computePageRectsWithPrintWidthScaleFactor:printHeight:]):
              getDocumentView -> documentView.
      
              * page/mac/WebCoreFrameView.h: Removed the WebCoreScrollbarMode type; we just
              use WebCore::ScrollbarMode directly. Renamed the WebCoreFrameView protocol to
              WebCoreFrameScrollView, since it's a protocol for the scroll view, not the
              frame view itself. Replaced WebCoreBridgeHolder protocol with WebCoreFrameView
              protocol, which returns a WebCore::Frame directly rather than a bridge.
      
              * page/mac/WebCoreViewFactory.h: Eliminated the bridgeForView method.
      
              * platform/ScrollView.h: Moved the constructor and destructor out of the
              class-specific #if blocks. Renamed Mac-specific function that gets the
              NSView for from getDocumentView to documentView and a scrollView function
              that returns an appropriately classed NSScrollView.
      
              * platform/graphics/MediaPlayer.h: Changed type of parentWidget to FrameView
              instead of Widget.
              * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
              (WebCore::MediaPlayerPrivate::createQTMovieView): Removed unnecessary cast.
      
              * platform/mac/PopupMenuMac.mm:
              (WebCore::PopupMenu::show): getDocumentView -> documentView.
              * platform/mac/ScrollViewMac.mm:
              (WebCore::ScrollView::ScrollView): Added.
              (WebCore::ScrollView::~ScrollView): Added.
              (WebCore::ScrollView::scrollView): Added.
              (WebCore::ScrollView::visibleWidth): Removed unused non-NSScrollView case.
              (WebCore::ScrollView::visibleHeight): Ditto.
              (WebCore::ScrollView::visibleContentRect): Ditto.
              (WebCore::ScrollView::visibleContentRectConsideringExternalScrollers): Ditto.
              (WebCore::ScrollView::contentsWidth): Ditto.
              (WebCore::ScrollView::contentsHeight): Ditto.
              (WebCore::ScrollView::contentsX): Ditto.
              (WebCore::ScrollView::contentsY): Ditto.
              (WebCore::ScrollView::scrollOffset): Ditto.
              (WebCore::ScrollView::scrollRectIntoViewRecursively): Ditto.
              (WebCore::ScrollView::setContentsPos): Ditto.
              (WebCore::ScrollView::setVScrollbarMode): Ditto.
              (WebCore::ScrollView::setHScrollbarMode): Ditto.
              (WebCore::ScrollView::setScrollbarsMode): Ditto.
              (WebCore::ScrollView::vScrollbarMode): Ditto.
              (WebCore::ScrollView::hScrollbarMode): Ditto.
              (WebCore::ScrollView::suppressScrollbars): Ditto.
              (WebCore::ScrollView::addChild): Ditto.
              (WebCore::ScrollView::resizeContents): Ditto.
              (WebCore::ScrollView::updateContents): Ditto.
              (WebCore::ScrollView::contentsToWindow): Ditto.
              (WebCore::ScrollView::windowToContents): Ditto.
              (WebCore::ScrollView::setStaticBackground): Ditto.
              (WebCore::ScrollView::documentView): Renamed and removed unused case.
              (WebCore::ScrollView::scrollbarUnderMouse): Removed incorrect comment.
      
              * platform/mac/WidgetMac.mm:
              (WebCore::Widget::getOuterView): Update for protocol name change.
      
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::paintCheckbox): getDocumentView -> documentView.
              (WebCore::RenderThemeMac::paintRadio): Ditto.
              (WebCore::RenderThemeMac::paintButton): Ditto.
              (WebCore::RenderThemeMac::paintMenuList): Ditto.
              (WebCore::RenderThemeMac::paintSliderThumb): Ditto.
              (WebCore::RenderThemeMac::paintSearchField): Ditto.
              (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Ditto.
              (WebCore::RenderThemeMac::paintSearchFieldResultsDecoration): Ditto.
              (WebCore::RenderThemeMac::paintSearchFieldResultsButton): Ditto.
      
      WebKit:
      
              Reviewed by Anders.
      
              * WebKit.xcodeproj/project.pbxproj: Change WebDynamicScrollBarsView.m to be Obj-C++.
              We can rename the file later.
      
      WebKit/mac:
      
              Reviewed by Anders.
      
              - remove code depending on the bridge to get from an NSView to a WebCore::Frame
      
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::transitionToCommittedForNewPage): Remove incorrect call
              to setView. A couple lines later, there is a call to _install, which sets the
              view to the scroll view.
      
              * WebCoreSupport/WebViewFactory.mm: Removed bridgeForView method.
      
              * WebView/WebDynamicScrollBarsView.h: Moved most of the declarations out of
              this file, since it's used by Safari.
              * WebView/WebDynamicScrollBarsViewInternal.h: Added.
              * WebView/WebDynamicScrollBarsView.m:
              (-[WebDynamicScrollBarsView updateScrollers]): Ditto.
              (-[WebDynamicScrollBarsView setAllowsScrolling:]): Ditto.
              (-[WebDynamicScrollBarsView allowsScrolling]): Ditto.
              (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]): Ditto.
              (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]): Ditto.
              (-[WebDynamicScrollBarsView allowsHorizontalScrolling]): Ditto.
              (-[WebDynamicScrollBarsView allowsVerticalScrolling]): Ditto.
              (-[WebDynamicScrollBarsView horizontalScrollingMode]): Ditto.
              (-[WebDynamicScrollBarsView verticalScrollingMode]): Ditto.
              (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]): Ditto.
              (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]): Ditto.
              (-[WebDynamicScrollBarsView setVerticalScrollingMode:]): Ditto.
              (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]): Ditto.
              (-[WebDynamicScrollBarsView setScrollingMode:]): Ditto.
              (-[WebDynamicScrollBarsView setScrollingMode:andLock:]): Ditto.
      
              * WebView/WebFrameView.mm:
              (-[WebFrameView _web_frame]): Added. Replaces the webCoreBridge method.
      
              * WebView/WebView.mm:
              (-[WebView setAlwaysShowVerticalScroller:]): Updated for changes to WebCoreFrameView.h.
              (-[WebView alwaysShowVerticalScroller]): Ditto.
              (-[WebView setAlwaysShowHorizontalScroller:]): Ditto.
              (-[WebView alwaysShowHorizontalScroller]): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8ae505a0
  6. 10 Mar, 2008 6 commits
    • justin.garcia@apple.com's avatar
      WebCore: · c727eb25
      justin.garcia@apple.com authored
              Reviewed by Sam.
      
              <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog
      
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              (WebCore::hasCSSPropertyNamePrefix): Fixed a typo.  The code was only
              comparing the first character of the prefix to the first character
              of the property name.
      
      LayoutTests:
      
              Reviewed by Sam.
              
              <rdar://problem/5779984> REGRESSION (r30391): GMail: Safari won't display the Edit Link dialog
      
              * editing/pasteboard/5780697-2-expected.txt: Added.
              * editing/pasteboard/5780697-2.html: Added.
              * editing/selection/5779984-1-expected.txt: Added.
              * editing/selection/5779984-1.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c727eb25
    • eric@webkit.org's avatar
      Reviewed by Darin. · 87d855b8
      eric@webkit.org authored
              Remove KJS::UChar, use ::UChar instead
              http://bugs.webkit.org/show_bug.cgi?id=17017
      
              To functional changes, thus no tests.
      
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              (WebCore::hasCSSPropertyNamePrefix):
              (WebCore::cssPropertyName):
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::windowProtoFuncAToB):
              (WebCore::windowProtoFuncBToA):
              * bindings/js/JSSVGPODTypeWrapper.h:
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::evaluate):
              * bridge/objc/objc_utility.mm:
              (KJS::Bindings::throwError):
              * dom/Document.cpp:
              (WebCore::Document::parseQualifiedName):
              * platform/text/AtomicString.cpp:
              (WebCore::AtomicString::add):
              * platform/text/String.cpp:
              (WebCore::String::String):
              (WebCore::String::operator Identifier):
              (WebCore::String::operator UString):
              * platform/text/TextCodecICU.cpp:
              (WebCore::TextCodecICU::decode):
              * svg/SVGAnimatedTemplate.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87d855b8
    • darin@apple.com's avatar
      - oops, forgot to save last couple changes from the editor · 85aeecbb
      darin@apple.com authored
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::markDOMObjectWrapper): Tweaked a tiny bit.
              (WebCore::JSDOMWindow::mark): Sorted alphabetically.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      85aeecbb
    • darin@apple.com's avatar
      Reviewed by Geoff. · efa8a8a8
      darin@apple.com authored
              - fix failing regression test (window.navigator is getting garbage
                collected and thus losing its custom properties)
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::markDOMObject): Added helper function.
              (WebCore::JSDOMWindow::mark): Added. Marks the wrappers for all the objects that hang
              off the window object.
      
              * page/DOMWindow.h:
              (WebCore::DOMWindow::optionalScreen): Added so we can get the Screen object without
              creating it if it's already there.
              (WebCore::DOMWindow::optionalSelection): Ditto.
              (WebCore::DOMWindow::optionalHistory): Ditto.
              (WebCore::DOMWindow::optionalLocationbar): Ditto.
              (WebCore::DOMWindow::optionalMenubar): Ditto.
              (WebCore::DOMWindow::optionalPersonalbar): Ditto.
              (WebCore::DOMWindow::optionalScrollbars): Ditto.
              (WebCore::DOMWindow::optionalStatusbar): Ditto.
              (WebCore::DOMWindow::optionalToolbar): Ditto.
              (WebCore::DOMWindow::optionalConsole): Ditto.
              (WebCore::DOMWindow::optionalNavigator): Ditto.
      
              * page/DOMWindow.idl: Added the CustomMarkFunction flag. Sorted the flags in
              alphabetical order since there are a lot of them.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      efa8a8a8
    • darin@apple.com's avatar
      WebCore: · 1bab162f
      darin@apple.com authored
              Reviewed and landed by Darin.
      
              bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations
      
              Removed reference to PERMISSION_DENIED (previous non standard exception) and replaced it
              by DOM exception SECURITY_ERR. Updated XMLHttpRequest::open to raise SECURITY_ERR.
      
              * bindings/js/kjs_binding.cpp:
              (WebCore::setDOMException): Removed PERMISSION_DENIED code.
              * dom/ExceptionCode.cpp: Added SECURITY_ERR exception.
              * dom/ExceptionCode.h: Ditto.
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::open): Returns SECURITY_ERR now.
              * xml/XMLHttpRequestException.h: Removed PERMISSION_DENIED.
      
      LayoutTests:
      
              Reviewed and landed by Darin.
      
              bug 12182 : XMLHttpRequest should raise SECURITY_ERR for same-origin policy violations
      
              * http/tests/xmlhttprequest/exceptions-expected.txt: Updated results
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1bab162f
    • hausmann@webkit.org's avatar
      2008-03-07 Simon Hausmann <hausmann@webkit.org> · 9999bb88
      hausmann@webkit.org authored
              http://bugs.webkit.org/show_bug.cgi?id=16815
      
              Reviewed by Darin.
      
              Done with Lars.
      
      WebCore:
      
              Ported the manually written JS bindings of window.navigator,
              window.navigator.plugins and window.navigator.mimeTypes to
              auto-generated bindings.
      
              Moved the globally cached plugin and mimetype information to a
              per WebCore::Page shared PluginData structure.
      
              Implemented window.navigator.plugins.refresh() in a
              platform-independent way.
      
      LayoutTests:
      
              Added a testcase for http://bugs.webkit.org/show_bug.cgi?id=16815
      
      WebKit/qt:
      
              Replaced the QWebObjectPlugin interfaces with QWebPluginFactory.
      
      WebKit/mac:
      
              Simplified WebViewFactory's refreshPlugins method to only refresh the
              plugins and not reload the frames anymore since that's now done in a
              platform independent manner by WebCore::Page.
      
              Also removed the now unused pluginNameForMIMEType and
              pluginSupportsMIMEType methods.
      
      WebKitTools/DumpRenderTree/qt:
      
              Ported the netscape test plugin to QWebPluginFactory.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9999bb88
  7. 09 Mar, 2008 1 commit
  8. 08 Mar, 2008 3 commits
    • oliver@apple.com's avatar
      Bug 17728: Canvas.createPattern with null repeat argument throws an exception · 9ec5ede9
      oliver@apple.com authored
      Reviewed by Mitz
      
      Trivial fix, we were calling toString on null which produces the string "null",
      we just needed to switch to using valueToStringWithNullCheck rather than
      JSValue::toString directly
      
      Test: fast/canvas/canvas-pattern-behaviour.html
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ec5ede9
    • mrowe@apple.com's avatar
      2008-03-08 Mark Rowe <mrowe@apple.com> · 0918b72a
      mrowe@apple.com authored
              Reviewed by Darin Adler.
      
              Fix 64-bit build with GCC 4.2.
      
              * bindings/objc/WebScriptObject.mm: Use NSUInteger in place of unsigned where required.
              * platform/mac/SharedBufferMac.mm: Ditto.
      
      2008-03-08  Mark Rowe  <mrowe@apple.com>
      
              Reviewed by Darin Adler.
      
              Fix 64-bit build with GCC 4.2.
      
              * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Use NSUInteger in place of unsigned where required.
              * DefaultDelegates/WebDefaultUIDelegate.m: Ditto.
              * History/WebHistoryItem.mm: Ditto.
              * Misc/WebElementDictionary.mm: Ditto.
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::objectContentType): Move variable declaration outside of if to avoid warning about the
              variable being unused in 64-bit.
              * WebCoreSupport/WebInspectorClient.mm: Use NSUInteger in place of unsigned where required.
              * WebView/WebHTMLView.mm:
              (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Use CGFloat in place of float where required.
              (-[WebTextCompleteController numberOfRowsInTableView:]): Use NSInteger in place of int where required.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0918b72a
    • ddkilzer@apple.com's avatar
      JavaScriptCore: · 13321fec
      ddkilzer@apple.com authored
              Unify concept of enabling Netscape Plug-in API (NPAPI).
      
              Reviewed by Darin.
      
              * wtf/Platform.h: Define ENABLE_NETSCAPE_PLUGIN_API here.
      
      WebCore:
      
              Unify concept of enabling Netscape Plug-in API (NPAPI).
      
              Reviewed by Darin.
      
              No test cases since there is no change in functionality.
      
              * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro.
              If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES.
              * WebCore.NPAPI.exp: Added.
              * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp.
              * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except
              comments) since we now handle exported NPAPI methods via DerivedSources.make.
      
              * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as
              defined in Platform.h.
      
              * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
              (-[DOMElement _NPObject]):
      
              * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with
              ENABLE(NETSCAPE_PLUGIN_API).
              * bridge/NP_jsobject.h: Ditto.
              * bridge/c/c_class.cpp: Ditto.
              * bridge/c/c_class.h: Ditto.
              * bridge/c/c_instance.cpp: Ditto.
              * bridge/c/c_instance.h: Ditto.
              * bridge/c/c_runtime.cpp: Ditto.
              * bridge/c/c_runtime.h: Ditto.
              * bridge/c/c_utility.cpp: Ditto.
              * bridge/c/c_utility.h: Ditto.
              * bridge/npruntime.cpp: Ditto.
              * bridge/npruntime_impl.h: Ditto.
              * bridge/npruntime_priv.h: Ditto.
              * bridge/runtime.cpp: Ditto.
              (KJS::Bindings::Instance::createBindingForLanguageInstance):
      
              * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
              (WebCore::HTMLPlugInElement::HTMLPlugInElement):
              (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
              * html/HTMLPlugInElement.h: Ditto.
      
              * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
              (WebCore::Frame::clearScriptObjects):
              (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API)
              guard around m_windowScriptNPObject.
              * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
              * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around
              m_windowScriptNPObject.
              * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
              (WebCore::Frame::createScriptInstanceForWidget):
      
      WebKit/mac:
      
              Unify concept of enabling Netscape Plug-in API (NPAPI).
      
              Reviewed by Darin.
      
              * WebKit.exp: Removed unused class export for WebBaseNetscapePluginView.
      
              * WebKitPrefix.h: Removed WTF_USE_NPOBJECT since we now use
              ENABLE(NETSCAPE_PLUGIN_API) as defined in Platform.h.
      
              * Plugins/WebBaseNetscapePluginStream.h: Replaced #ifndef __LP64__ with
              #if ENABLE(NETSCAPE_PLUGIN_API).
              * Plugins/WebBaseNetscapePluginStream.mm: Ditto.
              * Plugins/WebBaseNetscapePluginView.h: Ditto.
              * Plugins/WebBaseNetscapePluginView.mm: Ditto.
              * Plugins/WebBaseNetscapePluginViewInternal.h: Ditto.
              * Plugins/WebBaseNetscapePluginViewPrivate.h: Ditto.
              * Plugins/WebBasePluginPackage.h: Ditto.
              * Plugins/WebBasePluginPackage.m: Ditto.
              (+[WebBasePluginPackage pluginWithPath:]):
              * Plugins/WebNetscapeDeprecatedFunctions.c: Ditto.
              * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
              * Plugins/WebNetscapePluginEmbeddedView.h: Ditto.
              * Plugins/WebNetscapePluginEmbeddedView.mm: Ditto.
              * Plugins/WebNetscapePluginPackage.h: Ditto.
              * Plugins/WebNetscapePluginPackage.m: Ditto.
              * Plugins/WebNetscapePluginStream.h: Ditto.
              * Plugins/WebNetscapePluginStream.mm: Ditto.
              * Plugins/WebPluginDatabase.m: Ditto.
              (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
              * Plugins/npapi.m: Ditto.
              * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
              (WebFrameLoaderClient::objectContentType):
              (WebFrameLoaderClient::createPlugin):
              * WebView/WebHTMLView.mm: Ditto.
              (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
              * WebView/WebHTMLViewInternal.h: Ditto.
      
              * WebView/WebFrame.mm: Replaced #ifndef __LP64__ with
              #if ENABLE(NETSCAPE_PLUGIN_API). Moved methods below from (WebPrivate)
              category to (WebInternal) category so we don't expose the ENABLE() macro
              from the private header.
              (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
              (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
              * WebView/WebFrameInternal.h: Ditto.
              * WebView/WebFramePrivate.h: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13321fec
  9. 06 Mar, 2008 1 commit
  10. 05 Mar, 2008 3 commits
    • andersca@apple.com's avatar
      JavaScriptCore: · 74d51542
      andersca@apple.com authored
              Reviewed by Geoff.
      
              Don't build JavaScriptCore/bindings.
              
              * JavaScriptCore.exp:
              Export a couple of new functions. 
              
              * JavaScriptCore.xcodeproj/project.pbxproj:
              Remove bindings/
              
              * kjs/config.h:
              No need to define HAVE_JNI anymore.
              
              * kjs/interpreter.cpp:
              Remove unnecessary include.
      
      WebCore:
      
              Reviewed by Geoff.
      
              * WebCore.base.exp:
              Add the NPN and KJS methods.
              
              * WebCore.xcodeproj/project.pbxproj:
              Bring in bridge/
      
              * config.h:
              Add HAVE_JNI define.
              
              * bindings/js/kjs_html.cpp:
              * bindings/objc/DOMInternal.mm:
              * bindings/objc/DOMUtility.mm:
              * bindings/objc/WebScriptObject.mm:
              * html/HTMLAppletElement.cpp:
              * html/HTMLEmbedElement.cpp:
              * html/HTMLObjectElement.cpp:
              * html/HTMLPlugInElement.cpp:
              * page/Frame.cpp:
              * page/mac/FrameMac.mm:
              * page/mac/WebCoreFrameBridge.mm:
              * page/mac/WebCoreScriptDebugger.mm:
              * plugins/win/PluginViewWin.cpp:
              Include file changes.
      
      WebKit/mac:
      
              Reviewed by Geoff.
      
              Include file changes.
              
              * Plugins/WebBaseNetscapePluginView.mm:
              * Plugins/WebNetscapePluginPackage.m:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      74d51542
    • weinig@apple.com's avatar
      Reviewed by Adele. · 2141e21d
      weinig@apple.com authored
              * bindings/js/JSXMLHttpRequest.h: Remove unnecessary override of toBoolean.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2141e21d
    • mjs@apple.com's avatar
      WebCore: · 2a58f429
      mjs@apple.com authored
              Reviewed by Sam and Oliver.
      
              - fixed http://bugs.webkit.org/show_bug.cgi?id=16289
              - fixed Acid3 tests 26 and 27 (not exactly the same issue but related)
      
              * bindings/js/JSNodeCustom.cpp:
              (WebCore::JSNode::mark): When marking a node that's in-document,
              mark the owner document if it hasn't been already. This means holding on
              to a single node from an unreferenced document now keeps the whole document alive.
              
              We are now at 90/100 on Acid3.
      
      LayoutTests:
      
              Reviewed by Sam and Oliver.
      
              - test for http://bugs.webkit.org/show_bug.cgi?id=16289
              - test for Acid3 tests 26 and 27 (not exactly the same issue but related)
      
              * fast/dom/gc-11-expected.txt: Added. Test case from bug 16289.
              * fast/dom/gc-11.html: Added.
              * fast/dom/gc-acid3.html: Added. DOM garbage collection part of Acid3.
              * fast/dom/gc-acid3-expected.txt: Added.
              * fast/dom/gc-6-expected.txt: Updated results. The old assumptions of this test
              were in conflict with the requirements of Acid3.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30790 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2a58f429
  11. 04 Mar, 2008 11 commits
    • weinig@apple.com's avatar
      WebCore: · 730d0a9c
      weinig@apple.com authored
              Reviewed by Mark Rowe.
      
              Rename kjs_window to JSDOMWindowBase.
      
              - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
                JSDOMWindow.h
      
              * ChangeLog:
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSCustomVoidCallback.cpp:
              * bindings/js/JSCustomXPathNSResolver.cpp:
              * bindings/js/JSDOMWindowBase.cpp: Copied from bindings/js/kjs_window.cpp.
              * bindings/js/JSDOMWindowBase.h: Copied from bindings/js/kjs_window.h.
              * bindings/js/JSDOMWindowCustom.cpp:
              * bindings/js/JSDatabaseCustom.cpp:
              * bindings/js/JSEventTargetBase.cpp:
              * bindings/js/JSEventTargetBase.h:
              * bindings/js/JSEventTargetNode.cpp:
              * bindings/js/JSHTMLDocumentCustom.cpp:
              * bindings/js/JSHTMLFrameSetElementCustom.cpp:
              * bindings/js/JSHistoryCustom.cpp:
              * bindings/js/JSLocation.cpp:
              * bindings/js/JSSQLTransactionCustom.cpp:
              * bindings/js/JSXMLHttpRequest.cpp:
              * bindings/js/ScheduledAction.cpp:
              * bindings/js/kjs_binding.cpp:
              * bindings/js/kjs_events.cpp:
              * bindings/js/kjs_navigator.cpp:
              * bindings/js/kjs_proxy.cpp:
              * bindings/js/kjs_window.cpp: Removed.
              * bindings/js/kjs_window.h: Removed.
              * bindings/scripts/CodeGeneratorJS.pm:
              * history/CachedPage.cpp:
              * loader/FrameLoader.cpp:
              * page/Chrome.cpp:
              * page/InspectorController.cpp:
              * page/mac/FrameMac.mm:
              * page/mac/WebCoreFrameBridge.mm:
              * page/qt/FrameQt.cpp:
              * page/win/FrameWin.cpp:
              * plugins/win/PluginViewWin.cpp:
      
      WebKit/gtk:
      
              Reviewed by Mark Rowe.
      
              - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
                JSDOMWindow.h
      
              * WebCoreSupport/FrameLoaderClientGtk.cpp:
              * webkit/webkitwebframe.cpp:
      
      WebKit/qt:
      
              Reviewed by Mark Rowe.
      
              - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
                JSDOMWindow.h
      
              * Api/qwebframe.cpp:
              (QWebFrame::addToJSWindowObject):
      
      WebKit/win:
      
              Reviewed by Mark Rowe.
      
              - Remove all unnecessary includes of JSDOMWindowBase.h, we prefer including
                JSDOMWindow.h
      
              * WebFrame.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      730d0a9c
    • weinig@apple.com's avatar
      Reviewed by Dan Bernstein. · b0b10404
      weinig@apple.com authored
              Use JSDOMWindow exclusively instead of JSDOMWindowBase.
      
              * bindings/js/ScheduledAction.cpp:
              (WebCore::ScheduledAction::execute):
              * bindings/js/ScheduledAction.h:
              * bindings/js/kjs_window.cpp:
              (WebCore::JSDOMWindowBase::timerFired):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b0b10404
    • weinig@apple.com's avatar
      Reviewed by Darin Adler. · fa5f53b1
      weinig@apple.com authored
              Rename kjs_css to JSRGBColor.
      
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSRGBColor.cpp: Copied from bindings/js/kjs_css.cpp.
              * bindings/js/JSRGBColor.h: Copied from bindings/js/kjs_css.h.
              * bindings/js/kjs_css.cpp: Removed.
              * bindings/js/kjs_css.h: Removed.
              * bindings/js/kjs_window.cpp:
              * bindings/objc/DOMUtility.mm:
              * bindings/scripts/CodeGeneratorJS.pm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fa5f53b1
    • andersca@apple.com's avatar
      Mac build fix. Neither me, Sam nor Adam know why we need to do this though :( · ec142ca9
      andersca@apple.com authored
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::attachDebugger):
              * page/Page.cpp:
              (WebCore::Page::setDebuggerForAllPages):
              (WebCore::Page::setDebugger):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec142ca9
    • aroben@apple.com's avatar
      Move debugger-attaching code from WebKit/win to WebCore · 0f4d0b26
      aroben@apple.com authored
       WebCore:
      
               Make it possible to set a KJS::Debugger on all Frames in a Page and
               all Pages in the process
      
               Reviewed by Kevin M.
      
               * ForwardingHeaders/kjs/debugger.h: Added.
               * bindings/js/kjs_proxy.cpp:
               (WebCore::KJSProxy::initScript): Attach the Page's debugger if there
               is one.
               (WebCore::KJSProxy::attachDebugger): Attach the passed-in debugger, or
               detach any existing debugger if none was passed in.
               * bindings/js/kjs_proxy.h:
               * page/Page.cpp:
               (WebCore::Page::Page): Initialize new member.
               (WebCore::Page::setDebuggerForAllPages): Call setDebugger on each Page
               in the process.
               (WebCore::Page::setDebugger): Store the debugger and pass it off to
               all our Frames.
               * page/Page.h:
      
       WebKit/win:
      
               Use WebCore's new debugger-attaching code
      
               Reviewed by Kevin M.
      
               * WebCoreSupport/WebFrameLoaderClient.cpp: Moved a kit() function to
               WebView.{cpp,h} so that other files can call it.
               * WebFrame.cpp:
               (WebFrame::WebFrame): Removed m_scriptDebugger member.
               (WebFrame::windowObjectCleared): Removed attach/detach calls. This is
               no longer needed because WebScriptDebugger no longer stores any
               per-WebFrame state.
               * WebFrame.h:
               * WebScriptDebugServer.cpp:
               (WebScriptDebugServer::pageCreated): Added. Attaches our shared
               debugger to the Page if we have any listeners.
               (WebScriptDebugServer::addListener): Sets our shared debugger for all
               Pages when we get our first listener.
               (WebScriptDebugServer::removeListener): Removes our shared debugger
               from all Pages when we lose our last listener.
               * WebScriptDebugServer.h:
               * WebScriptDebugger.cpp:
               (WebScriptDebugger::shared): Added.
               (WebScriptDebugger::WebScriptDebugger): Removed m_frame member.
               (WebScriptDebugger::~WebScriptDebugger): Added.
               (frame): Gets a Frame from an ExecState.
               (webFrame): Gets a WebFrame from an ExecState.
               (webView): Gets a WebView from an ExecState.
               (WebScriptDebugger::sourceParsed): Changed to call webFrame() and
               webView() instead of using m_frame and m_webView members.
               (WebScriptDebugger::callEvent): Ditto.
               (WebScriptDebugger::atStatement): Ditto.
               (WebScriptDebugger::returnEvent): Ditto.
               (WebScriptDebugger::exception): Ditto.
               * WebScriptDebugger.h:
               * WebView.cpp:
               (kit): Moved here from WebFrameLoaderClient.cpp.
               (WebView::initWithFrame): Tell the WebScriptDebugServer about the new
               Page so it can attach a debugger if needed.
               * WebView.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0f4d0b26
    • weinig@apple.com's avatar
      WebCore: · a37bbd4d
      weinig@apple.com authored
              Reviewed by Darin Adler.
      
              Add ClassInfo to custom constructors so that they toString properly
      
              - Take this chance to remove the "Imp" from the end of JSXMLHttpRequestConstructorImp,
                and XSLTProcessorConstructorImp and prefix all the classes with JS. 
      
              * bindings/js/JSAudioConstructor.cpp:
              (WebCore::): Added ClassInfo definition.
              (WebCore::JSAudioConstructor::JSAudioConstructor):
              (WebCore::JSAudioConstructor::construct): Cleanup.
              * bindings/js/JSAudioConstructor.h: Rename m_doc to m_document.
              (WebCore::JSAudioConstructor::classInfo): Added.
      
              * bindings/js/JSHTMLInputElementBase.cpp: Rename HTMLInputElementBasePrototype 
              to JSHTMLInputElementBasePrototype as seen if toString'ed.
              (WebCore::):
      
              * bindings/js/JSHTMLOptionElementConstructor.cpp:
              (WebCore::): Added ClassInfo definition.
              * bindings/js/JSHTMLOptionElementConstructor.h:
              (WebCore::JSHTMLOptionElementConstructor::classInfo): Added.
      
              * bindings/js/JSImageConstructor.cpp:
              (WebCore::): Added ClassInfo definition.
              (WebCore::JSImageConstructor::implementsConstruct): Moved here from header.
              * bindings/js/JSImageConstructor.h:
              (WebCore::JSImageConstructor::classInfo): Added.
      
              * bindings/js/JSXMLHttpRequest.cpp:
              (WebCore::): Rename XMLHttpRequestPrototype  to JSXMLHttpRequestPrototype 
              as seen if toString'ed.
              (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
              (WebCore::JSXMLHttpRequestConstructor::implementsConstruct):
              (WebCore::JSXMLHttpRequestConstructor::construct):
              * bindings/js/JSXMLHttpRequest.h: Renamed JSXMLHttpRequestConstructorImp to
              JSXMLHttpRequestConstructor and doc to m_document and 
              (WebCore::JSXMLHttpRequestConstructor::classInfo): Added.
      
              * bindings/js/JSXSLTProcessor.cpp:
              (WebCore::): Renamed XSLTProcessorPrototype to JSXSLTProcessorPrototype and 
              XSLTProcessorConstructorImp to JSXSLTProcessorConstructor.
              (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
              (WebCore::JSXSLTProcessorConstructor::implementsConstruct):
              (WebCore::JSXSLTProcessorConstructor::construct):
              * bindings/js/JSXSLTProcessor.h:
              (WebCore::JSXSLTProcessorConstructor::classInfo): Added.
      
              * bindings/js/kjs_window.cpp:
              (WebCore::JSDOMWindowBase::getValueProperty): Fixed to work with the new class names.
      
      WebKitTools:
      
              Reviewed by Darin Adler.
      
              * Scripts/do-webcore-rename: Update renaming plan.
      
      LayoutTests:
      
              Reviewed by Darin Adler.
      
              Update results for fixed class names.
      
              * fast/dom/Window/window-properties-expected.txt:
              * fast/dom/xmlhttprequest-get-expected.txt:
              * http/tests/xmlhttprequest/event-target-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a37bbd4d
    • weinig@apple.com's avatar
      Reviewed by Darin Adler. · a27dbabc
      weinig@apple.com authored
              Remame ImageConstructorImp to JSImageConstructor and move it into its
              own file.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSImageConstructor.cpp: Copied from bindings/js/kjs_html.cpp.
              (WebCore::JSImageConstructor::JSImageConstructor):
              (WebCore::JSImageConstructor::construct):
              * bindings/js/JSImageConstructor.h: Copied from bindings/js/kjs_html.h.
              * bindings/js/kjs_html.cpp:
              (WebCore::getRuntimeObject): Make this function static since it is only used
              in this file.
              * bindings/js/kjs_html.h:
              * bindings/js/kjs_window.cpp:
              (WebCore::JSDOMWindowBase::getValueProperty):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a27dbabc
    • aroben@apple.com's avatar
      Fix an uninitialized value warning in CodeGeneratorJS.pm · e3f5b373
      aroben@apple.com authored
              * bindings/scripts/CodeGeneratorJS.pm: Remove reference to
              non-existent $maybeOkParam (this was removed in r30753).
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3f5b373
    • weinig@apple.com's avatar
      Reviewed by Darin Adler. · 116c68e4
      weinig@apple.com authored
              Remove kjs_dom.{h,cpp}.
      
              - Removed custom toAttr, which took a boolean ok, and teach CodeGeneratorJS.pm
                to us a null return value as an indication of failure. (This new logic is used
                for toVoidCallback as well.)
              - Move getRuntimeObject to kjs_html where a bunch of other runtime object related
                functions currently live.
              - Move checkNodeSecurity to kjs_binding, where other frame security functions 
                currently live.
              - Remove getNodeConstructor.  It had no implementation.
      
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSAttrCustom.cpp:
              * bindings/js/JSCustomVoidCallback.cpp:
              (WebCore::toVoidCallback):
              * bindings/js/JSCustomVoidCallback.h:
              * bindings/js/JSDatabaseCustom.cpp:
              (WebCore::JSDatabase::changeVersion):
              (WebCore::JSDatabase::transaction):
              * bindings/js/JSElementCustom.cpp:
              (WebCore::JSElement::setAttributeNode):
              (WebCore::JSElement::setAttributeNodeNS):
              * bindings/js/JSEventTargetBase.cpp:
              (WebCore::toJS):
              * bindings/js/JSEventTargetBase.h:
              * bindings/js/JSHTMLAppletElementCustom.cpp:
              * bindings/js/JSHTMLElementCustom.cpp:
              * bindings/js/JSHTMLEmbedElementCustom.cpp:
              * bindings/js/JSHTMLFormElementCustom.cpp:
              * bindings/js/JSHTMLFrameElementCustom.cpp:
              * bindings/js/JSHTMLIFrameElementCustom.cpp:
              * bindings/js/JSHTMLObjectElementCustom.cpp:
              * bindings/js/JSNamedNodeMapCustom.cpp:
              * bindings/js/JSNamedNodesCollection.cpp:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSXSLTProcessor.cpp:
              * bindings/js/kjs_binding.cpp:
              (WebCore::checkNodeSecurity):
              * bindings/js/kjs_binding.h:
              * bindings/js/kjs_css.cpp:
              * bindings/js/kjs_dom.cpp: Removed.
              * bindings/js/kjs_dom.h: Removed.
              * bindings/js/kjs_events.cpp:
              * bindings/js/kjs_html.cpp:
              (WebCore::getRuntimeObject):
              * bindings/js/kjs_html.h:
              * bindings/js/kjs_window.cpp:
              * bindings/scripts/CodeGeneratorJS.pm:
              * dom/Attr.idl:
              * html/HTMLPlugInElement.cpp:
              * page/InspectorController.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      116c68e4
    • weinig@apple.com's avatar
      Build fix. · 09175807
      weinig@apple.com authored
              * bindings/js/kjs_events.cpp:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30736 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      09175807
    • weinig@apple.com's avatar
      WebCore: · 6d270f6f
      weinig@apple.com authored
              Reviewed by Mark Rowe.
      
              Move JSClipboard into its own file.
      
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * WebCoreSources.bkl:
              * bindings/js/JSAttrCustom.cpp:
              * bindings/js/JSClipboardCustom.cpp: Added.
              (WebCore::JSClipboard::types):
              (WebCore::JSClipboard::clearData):
              (WebCore::JSClipboard::getData):
              (WebCore::JSClipboard::setData):
              (WebCore::JSClipboard::setDragImage):
              * bindings/js/JSElementCustom.cpp:
              * bindings/js/JSEventCustom.cpp:
              * bindings/js/JSHTMLFrameElementCustom.cpp:
              * bindings/js/JSHTMLIFrameElementCustom.cpp:
              * bindings/js/kjs_events.cpp:
              * bindings/js/kjs_events.h:
              * bindings/js/kjs_window.cpp:
              * bindings/scripts/CodeGeneratorJS.pm:
              * dom/Clipboard.cpp:
              (WebCore::Clipboard::setDropEffect):
              (WebCore::Clipboard::setEffectAllowed):
              * dom/Clipboard.idl: Added.
      
      LayoutTests:
      
              Reviewed by Mark Rowe.
      
              Update test results.
      
              * fast/dom/Window/window-properties-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30735 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d270f6f
  12. 03 Mar, 2008 3 commits
    • weinig@apple.com's avatar
      Reviewed by Darin Adler. · 5f38e1a6
      weinig@apple.com authored
              Cleanup and plumbing in preparation for the great Window split.
      
              - Rename KJS::Window to WebCore::JSDOMWindowBase.
              - Remove KJS::Window::retrieve() and KJS::Window::retrieveWindow() and replace
                with the new toJSDOMWindow().
              - Remove KJS::Window::retrieveActive() and replace with explicit call to 
                exec->dynamicGlobalObject() and toJSDOMWindow().
      
              * bindings/js/JSCustomVoidCallback.cpp:
              (WebCore::toVoidCallback):.
              * bindings/js/JSCustomXPathNSResolver.cpp:
              (WebCore::JSCustomXPathNSResolver::create):
              * bindings/js/JSDatabaseCustom.cpp:
              (WebCore::JSDatabase::changeVersion):
              (WebCore::JSDatabase::transaction):
              * bindings/js/JSDocumentCustom.cpp:
              (WebCore::JSDocument::location):
              (WebCore::toJS):
              * bindings/js/JSEventTargetBase.cpp:
              (WebCore::jsEventTargetAddEventListener):
              (WebCore::jsEventTargetRemoveEventListener):
              * bindings/js/JSEventTargetNode.cpp:
              (WebCore::JSEventTargetNode::setListener):
              * bindings/js/JSHTMLDocumentCustom.cpp:
              (WebCore::JSHTMLDocument::nameGetter):
              (WebCore::JSHTMLDocument::open):
              * bindings/js/JSHTMLFrameSetElementCustom.cpp:
              (WebCore::JSHTMLFrameSetElement::nameGetter):
              * bindings/js/JSLocation.cpp:
              (WebCore::JSLocation::put):
              (WebCore::jsLocationProtoFuncReplace):
              (WebCore::jsLocationProtoFuncReload):
              (WebCore::jsLocationProtoFuncAssign):
              * bindings/js/JSLocation.h:
              * bindings/js/JSSQLTransactionCustom.cpp:
              (WebCore::JSSQLTransaction::executeSql):
              * bindings/js/JSSVGLazyEventListener.cpp:
              (WebCore::JSSVGLazyEventListener::JSSVGLazyEventListener):
              (WebCore::JSSVGLazyEventListener::eventParameterName):
              * bindings/js/JSSVGLazyEventListener.h:
              * bindings/js/JSXMLHttpRequest.cpp:
              (WebCore::JSXMLHttpRequest::putValueProperty):
              (WebCore::jsXMLHttpRequestPrototypeFunctionOpen):
              (WebCore::jsXMLHttpRequestPrototypeFunctionAddEventListener):
              (WebCore::jsXMLHttpRequestPrototypeFunctionRemoveEventListener):
              * bindings/js/ScheduledAction.cpp:
              (WebCore::ScheduledAction::execute):
              * bindings/js/ScheduledAction.h:
              * bindings/js/kjs_binding.cpp:
              (WebCore::allowsAccessFromFrame):
              (WebCore::printErrorMessageForFrame):
              * bindings/js/kjs_events.cpp:
              (WebCore::JSAbstractEventListener::handleEvent):
              (WebCore::JSUnprotectedEventListener::JSUnprotectedEventListener):
              (WebCore::JSUnprotectedEventListener::~JSUnprotectedEventListener):
              (WebCore::JSUnprotectedEventListener::windowObj):
              (WebCore::JSEventListener::JSEventListener):
              (WebCore::JSEventListener::~JSEventListener):
              (WebCore::JSEventListener::windowObj):
              (WebCore::JSLazyEventListener::JSLazyEventListener):
              (WebCore::JSLazyEventListener::parseCode):
              * bindings/js/kjs_events.h:
              * bindings/js/kjs_navigator.cpp:
              (WebCore::MimeType::getValueProperty):
              * bindings/js/kjs_proxy.cpp:
              (WebCore::KJSProxy::evaluate):
              (WebCore::KJSProxy::createHTMLEventHandler):
              (WebCore::KJSProxy::createSVGEventHandler):
              * bindings/js/kjs_window.cpp:
              (WebCore::JSDOMWindowBasePrivate::JSDOMWindowBasePrivate):
              (WebCore::DOMWindowTimer::DOMWindowTimer):
              (WebCore::DOMWindowTimer::action):
              (WebCore::DOMWindowTimer::takeAction):
              (WebCore::):
              (WebCore::JSDOMWindowBase::JSDOMWindowBase):
              (WebCore::JSDOMWindowBase::~JSDOMWindowBase):
              (WebCore::JSDOMWindowBase::location):
              (WebCore::JSDOMWindowBase::mark):
              (WebCore::allowPopUp):
              (WebCore::createWindow):
              (WebCore::showModalDialog):
              (WebCore::JSDOMWindowBase::getValueProperty):
              (WebCore::JSDOMWindowBase::childFrameGetter):
              (WebCore::JSDOMWindowBase::indexGetter):
              (WebCore::JSDOMWindowBase::namedItemGetter):
              (WebCore::JSDOMWindowBase::getOwnPropertySlot):
              (WebCore::JSDOMWindowBase::put):
              (WebCore::JSDOMWindowBase::allowsAccessFrom):
              (WebCore::JSDOMWindowBase::allowsAccessFromNoErrorMessage):
              (WebCore::JSDOMWindowBase::allowsAccessFromPrivate):
              (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
              (WebCore::JSDOMWindowBase::printErrorMessage):
              (WebCore::JSDOMWindowBase::globalExec):
              (WebCore::JSDOMWindowBase::shouldInterruptScript):
              (WebCore::JSDOMWindowBase::setListener):
              (WebCore::JSDOMWindowBase::getListener):
              (WebCore::JSDOMWindowBase::findJSEventListener):
              (WebCore::JSDOMWindowBase::findOrCreateJSEventListener):
              (WebCore::JSDOMWindowBase::findJSUnprotectedEventListener):
              (WebCore::JSDOMWindowBase::findOrCreateJSUnprotectedEventListener):
              (WebCore::JSDOMWindowBase::clearHelperObjectProperties):
              (WebCore::JSDOMWindowBase::clear):
              (WebCore::JSDOMWindowBase::setCurrentEvent):
              (WebCore::JSDOMWindowBase::currentEvent):
              (WebCore::windowProtoFuncAToB):
              (WebCore::windowProtoFuncBToA):
              (WebCore::windowProtoFuncOpen):
              (WebCore::windowProtoFuncSetTimeout):
              (WebCore::windowProtoFuncClearTimeout):
              (WebCore::windowProtoFuncSetInterval):
              (WebCore::windowProtoFuncAddEventListener):
              (WebCore::windowProtoFuncRemoveEventListener):
              (WebCore::windowProtoFuncShowModalDialog):
              (WebCore::windowProtoFuncNotImplemented):
              (WebCore::JSDOMWindowBase::setReturnValueSlot):
              (WebCore::JSDOMWindowBase::clearAllTimeouts):
              (WebCore::JSDOMWindowBase::installTimeout):
              (WebCore::JSDOMWindowBase::pauseTimeouts):
              (WebCore::JSDOMWindowBase::resumeTimeouts):
              (WebCore::JSDOMWindowBase::clearTimeout):
              (WebCore::JSDOMWindowBase::timerFired):
              (WebCore::JSDOMWindowBase::disconnectFrame):
              (WebCore::JSDOMWindowBase::jsEventListeners):
              (WebCore::JSDOMWindowBase::jsHTMLEventListeners):
              (WebCore::JSDOMWindowBase::jsUnprotectedEventListeners):
              (WebCore::JSDOMWindowBase::jsUnprotectedHTMLEventListeners):
              (WebCore::toJS):
              (WebCore::toJSDOMWindow):
              (WebCore::toJSDOMWindow):
              * bindings/js/kjs_window.h:
              (WebCore::JSDOMWindowBase::impl):
              (WebCore::JSDOMWindowBase::classInfo):
              (WebCore::JSDOMWindowBase::):
              * bindings/objc/DOMUtility.mm:
              (KJS::createDOMWrapper):
              * bindings/scripts/CodeGeneratorJS.pm:
              * history/CachedPage.cpp:
              (WebCore::CachedPage::CachedPage):
              (WebCore::CachedPage::restore):
              * page/Chrome.cpp:
              (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
              (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
              * page/DOMWindow.idl:
              * page/Frame.cpp:
              (WebCore::Frame::~Frame):
              (WebCore::Frame::windowScriptNPObject):
              (WebCore::Frame::pageDestroyed):
              * page/InspectorController.cpp:
              (WebCore::inspectedWindow):
              * page/mac/FrameMac.mm:
              (WebCore::Frame::windowScriptObject):
              * page/mac/WebCoreFrameBridge.mm:
              (updateRenderingForBindings):
              * platform/SecurityOrigin.cpp:
              (WebCore::SecurityOrigin::canAccess):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5f38e1a6
    • andersca@apple.com's avatar
      Reviewed by Darin and Sam. · ae3f8c23
      andersca@apple.com authored
              Include fixes, in preparation of using the headers in WebCore/bridge.
              
              * bindings/js/kjs_binding.h:
              * bindings/js/kjs_dom.cpp:
              * bindings/objc/DOMInternal.mm:
              * bindings/objc/DOMUtility.mm:
              * bindings/objc/WebScriptObject.mm:
              * bindings/objc/WebScriptObjectPrivate.h:
              * bridge/objc/objc_class.h:
              * bridge/objc/objc_instance.h:
              * bridge/objc/objc_runtime.h:
              * bridge/objc/objc_utility.h:
              * bridge/runtime.h:
              * bridge/runtime_object.h:
              * bridge/runtime_root.h:
              * html/HTMLAppletElement.cpp:
              * html/HTMLAppletElement.h:
              * html/HTMLEmbedElement.cpp:
              * html/HTMLEmbedElement.h:
              * html/HTMLObjectElement.cpp:
              * html/HTMLPlugInElement.cpp:
              * html/HTMLPlugInElement.h:
              * page/mac/FrameMac.mm:
              * page/mac/WebCoreFrameBridge.h:
              * page/mac/WebCoreFrameBridge.mm:
              * page/mac/WebCoreScriptDebugger.mm:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ae3f8c23
    • darin@apple.com's avatar
      WebCore: · 1b2dbf31
      darin@apple.com authored
              Reviewed by Adam.
      
              - some "cleanup" on the path to removing WebCoreFrameBridge
      
              * WebCore.base.exp: Exported some stuff we either already use or
              I am about to use in an upcoming patch.
      
              * WebCore.xcodeproj/project.pbxproj: Made FileChooser.h private rather
              than project, for future use in WebKit.
      
              * bindings/objc/WebScriptObject.mm: Removed some dead code.
      
              * dom/ContainerNode.cpp: Added a now-needed or soon-to-be-needed include.
              * editing/Editor.cpp: Ditto.
      
              * editing/Editor.h: Removed many unneeded declarations and includes.
              Removed the unused userVisibleString function.
      
              * editing/EditorCommand.cpp:
              (WebCore::executeYank): Added parameter for triggeringEvent, which no
              longer has a default value.
              (WebCore::executeYankAndSelect): Ditto.
      
              * editing/mac/EditorMac.mm: Removed userVisibleString.
      
              * page/mac/EventHandlerMac.mm:
              (WebCore::isKeyboardOptionTab): Tweaked formattin.
      
              * page/mac/WebCoreFrameBridge.mm:
              (-[WebCoreFrameBridge dragSourceMovedTo:]): Get window from -[NSView window]
              rather than from the bridge. There's no special value in the bridge's window
              method and we can use NSView directly.
              (-[WebCoreFrameBridge dragSourceEndedAt:operation:]): Ditto.
      
              * platform/graphics/mac/ImageMac.mm:
              (WebCore::Image::loadPlatformResource): Use a new WebCoreBundleFinder class to
              find the bundle rather than using WebCoreFrameBridge.
      
              * platform/mac/ClipboardMac.mm: Added a now-needed or soon-to-be-needed include.
              * platform/mac/PasteboardMac.mm: Ditto.
      
              * rendering/RenderObject.h:
              (WebCore::DashboardRegionValue::operator==): Fixed mistake where this wasn't
              comparing the clip rectangle.
              (WebCore::DashboardRegionValue::operator!=): Added. Needed by my future work.
      
      WebKit/mac:
      
              Reviewed by Adam.
      
              - some "cleanup" on the path to removing WebCoreFrameBridge
      
              * Storage/WebDatabaseManager.mm: Tweak includes.
              * Storage/WebDatabaseTrackerClient.mm: Ditto.
              * Storage/WebSecurityOrigin.mm: Ditto.
              * Storage/WebSecurityOriginInternal.h: Ditto.
      
              * WebView/WebFrame.mm:
              (core): Changed to get rid of the requirement that WebKitEditableLinkBehavior exactly
              match WebCore::EditableLinkBehavior.
              * WebView/WebFrameInternal.h: Removed unused kit function.
      
              * WebView/WebHTMLView.mm: Moved WebHTMLViewPrivate class in here.
              * WebView/WebHTMLViewInternal.h: Moved WebHTMLVewPrivate class out of here.
              * WebView/WebHTMLViewPrivate.h: Tweaked formatting and removed some unneeded declarations.
      
              * WebView/WebPreferencesPrivate.h: Removed a no-longer-needed comment.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1b2dbf31
  13. 01 Mar, 2008 2 commits
    • oliver@apple.com's avatar
      Bug 16954: Support putImageData · 18ed29dc
      oliver@apple.com authored
      Reviewed by Sam Weinig.
      
      Implement support for HTML5's putImageData for the CG port.  All other ports
      are currently just using stubs for the final blit.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      18ed29dc
    • weinig@apple.com's avatar
      WebCore: · 4ba897c4
      weinig@apple.com authored
              Reviewed by Darin Adler.
      
              Search the entire prototype chain when doing early prototype lookup in
              the Window's getOwnPropertySlot method.
      
              Makes fast/dom/Window/window-function-name-getter-precedence.html pass all tests.
      
              * bindings/js/kjs_window.cpp:
              (KJS::Window::getOwnPropertySlot):
      
      LayoutTests:
      
              Reviewed by Darin Adler.
      
              Update test result.
      
              * fast/dom/Window/window-function-name-getter-precedence-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4ba897c4
  14. 27 Feb, 2008 1 commit
    • weinig@apple.com's avatar
      WebCore: · 014c993b
      weinig@apple.com authored
              Reviewed by Darin.
      
              Fix for <rdar://problem/5768769>
      
              - Don't allow cross-origin calls using window.functionName.call(otherFrame)
                syntax.
      
              * bindings/js/JSLocation.cpp:
              (WebCore::jsLocationProtoFuncToString): Do same-origin check.
              * bindings/js/kjs_window.cpp:
              (KJS::windowProtoFuncAToB): Ditto.
              (KJS::windowProtoFuncBToA): Ditto.
              (KJS::windowProtoFuncOpen): Ditto.
              (KJS::windowProtoFuncClearTimeout): Ditto.
              * bindings/scripts/CodeGeneratorJS.pm: Ditto.
      
      LayoutTests:
      
              Reviewed by Darin.
      
              Updates tests for <rdar://problem/5768769>
      
              * http/tests/security/aboutBlank/xss-DENIED-set-opener-expected.txt:
              * http/tests/security/cross-frame-access-call-expected.txt:
              * http/tests/security/cross-frame-access-call.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      014c993b
  15. 26 Feb, 2008 1 commit
    • antti@apple.com's avatar
      Reviewed by Darin. · b5be6978
      antti@apple.com authored
              Fix <rdar://problem/5761326>
              REGRESSION: 1.5% -2% Sunspider regression from r30009 (ebay photo upload hang)
              
              Generate better code with VS:
              - Use ALWAYS_INLINE macro to guarantee versions of allowsAccessFrom() are reduced to single functions
              - Refactor error reporting so that there is no need to construct/destruct Strings in common cases
              - Add a separate version of the function for cases where error messages are not wanted
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::customGetOwnPropertySlot):
              * bindings/js/kjs_window.cpp:
              (KJS::Window::allowsAccessFrom):
              (KJS::Window::allowsAccessFromNoErrorMessage):
              (KJS::Window::allowsAccessFromPrivate):
              (KJS::Window::crossDomainAccessErrorMessage):
              * bindings/js/kjs_window.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5be6978
  16. 23 Feb, 2008 1 commit
    • darin@apple.com's avatar
      JavaScriptCore: · e25e04e3
      darin@apple.com authored
              Reviewed by Anders.
      
              - http://bugs.webkit.org/show_bug.cgi?id=17067
                eliminate attributes parameter from JSObject::put for speed/clarity
      
              * API/JSCallbackObject.h: Removed attribute arguments.
              * API/JSCallbackObjectFunctions.h:
              (KJS::JSCallbackObject<Base>::put): Ditto.
              * API/JSObjectRef.cpp:
              (JSObjectSetProperty): Use initializeVariable or putDirect when necessary
              to set attribute values.
              * JavaScriptCore.exp: Updated.
              * bindings/objc/objc_runtime.h: Removed attribute arguments.
              * bindings/objc/objc_runtime.mm:
              (ObjcFallbackObjectImp::put): Ditto.
              * bindings/runtime_array.cpp:
              (RuntimeArray::put): Ditto.
              * bindings/runtime_array.h: Ditto.
              * bindings/runtime_object.cpp:
              (RuntimeObjectImp::put): Ditto.
              * bindings/runtime_object.h: Ditto. Also removed canPut which was only
              called from one place in WebCore that can use hasProperty instead.
      
              * kjs/Activation.h: Removed attribute argument from put and added the new
              initializeVariable function that's used to put variables in variable objects.
              Also made isActivationObject a const member.
      
              * kjs/JSGlobalObject.cpp:
              (KJS::JSGlobalObject::put): Removed attribute argument.
              (KJS::JSGlobalObject::initializeVariable): Added. Used to give variables
              their initial values, which can include the read-only property.
              (KJS::JSGlobalObject::reset): Removed obsolete comments about flags.
              Removed Internal flag, which is no longer needed.
              * kjs/JSGlobalObject.h: More of the same.
      
              * kjs/JSVariableObject.h: Added pure virtual initializeVariable function.
              (KJS::JSVariableObject::symbolTablePut): Removed checkReadOnly flag; we always
              check read-only.
              (KJS::JSVariableObject::symbolTableInitializeVariable): Added.
      
              * kjs/array_instance.cpp:
              (KJS::ArrayInstance::put): Removed attribute argument.
              * kjs/array_instance.h: Ditto.
      
              * kjs/function.cpp:
              (KJS::FunctionImp::put): Ditto.
              (KJS::Arguments::put): Ditto.
              (KJS::ActivationImp::put): Ditto.
              (KJS::ActivationImp::initializeVariable): Added.
              * kjs/function.h: Removed attribute arguments.
      
              * kjs/function_object.cpp:
              (KJS::FunctionObjectImp::construct): Removed Internal flag.
      
              * kjs/lookup.h:
              (KJS::lookupPut): Removed attributes argument. Also changed to use putDirect
              instead of calling JSObject::put.
              (KJS::cacheGlobalObject): Ditto.
      
              * kjs/nodes.cpp:
              (KJS::ConstDeclNode::handleSlowCase): Call initializeVariable to initialize
              the constant.
              (KJS::ConstDeclNode::evaluateSingle): Ditto.
              (KJS::TryNode::execute): Use putDirect to set up the new object.
              (KJS::FunctionBodyNode::processDeclarations): Removed Internal.
              (KJS::ProgramNode::processDeclarations): Ditto.
              (KJS::EvalNode::processDeclarations): Call initializeVariable to initialize
              the variables and functions.
              (KJS::FuncDeclNode::makeFunction): Removed Internal.
              (KJS::FuncExprNode::evaluate): Ditto.
      
              * kjs/object.cpp: Removed canPut, which was only being used in one code path,
              not the normal high speed one.
              (KJS::JSObject::put): Removed attribute argument. Moved the logic from
              canPut here, in the one code ath that was still using it.
              * kjs/object.h: Removed Internal attribute, ad canPut function. Removed the
              attributes argument to the put function. Made isActivationObject const.
      
              * kjs/regexp_object.cpp:
              (KJS::RegExpImp::put): Removed attributes argument.
              (KJS::RegExpImp::putValueProperty): Ditto.
              (KJS::RegExpObjectImp::put): Ditto.
              (KJS::RegExpObjectImp::putValueProperty): Ditto.
              * kjs/regexp_object.h: Ditto.
      
              * kjs/string_object.cpp:
              (KJS::StringInstance::put): Removed attributes argument.
              * kjs/string_object.h: Ditto.
      
      WebCore:
      
              Reviewed by Anders.
      
              - http://bugs.webkit.org/show_bug.cgi?id=17067
                eliminate attributes parameter from JSObject::put for speed/clarity
      
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              (WebCore::JSCSSStyleDeclaration::customPut): Remove attributes argument.
      
              * bindings/js/JSCanvasPixelArrayCustom.cpp:
              (WebCore::JSCanvasPixelArray::indexGetter): Use early exit idiom.
              (WebCore::JSCanvasPixelArray::indexSetter): Moved length check into the
              CanvasPixelArray object, for consistency with the getter. Removed attributes
              argument.
      
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::customPut): Removed special case for variable
              initialization, which is not needed since that does use put any more.
              Removed attributes argument.
      
              * bindings/js/JSEventTargetBase.h:
              (WebCore::JSEventTargetBase::putValueProperty): Removed attributes argument.
              (WebCore::JSEventTargetBase::put): Ditto.
              (WebCore::JSEventTargetPrototype::self): Removed Internal flag.
              * bindings/js/JSEventTargetNode.cpp:
              (WebCore::JSEventTargetNode::put): Removed attributes argument.
              (WebCore::JSEventTargetNode::putValueProperty): Ditto.
              * bindings/js/JSEventTargetNode.h: Ditto.
              * bindings/js/JSHTMLAppletElementCustom.cpp:
              (WebCore::JSHTMLAppletElement::customPut): Ditto.
              * bindings/js/JSHTMLEmbedElementCustom.cpp:
              (WebCore::JSHTMLEmbedElement::customPut): Ditto.
              * bindings/js/JSHTMLInputElementBase.cpp:
              (WebCore::JSHTMLInputElementBase::put): Ditto.
              (WebCore::JSHTMLInputElementBase::putValueProperty): Ditto.
              * bindings/js/JSHTMLInputElementBase.h: Ditto.
              * bindings/js/JSHTMLObjectElementCustom.cpp:
              (WebCore::JSHTMLObjectElement::customPut): Ditto.
              * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
              (WebCore::JSHTMLOptionsCollection::indexSetter): Ditto.
              * bindings/js/JSHTMLSelectElementCustom.cpp:
              (WebCore::JSHTMLSelectElement::indexSetter): Ditto.
              * bindings/js/JSHistoryCustom.cpp:
              (WebCore::JSHistory::customPut): Ditto.
              * bindings/js/JSLocation.cpp:
              (WebCore::JSLocation::put): Ditto.
              * bindings/js/JSLocation.h: Ditto.
              * bindings/js/JSXMLHttpRequest.cpp:
              (WebCore::JSXMLHttpRequest::put): Ditto.
              (WebCore::JSXMLHttpRequest::putValueProperty): Ditto.
              * bindings/js/JSXMLHttpRequest.h: Ditto.
      
              * bindings/js/kjs_dom.cpp:
              (WebCore::getRuntimeObject): Changed return type to JSObject*.
              * bindings/js/kjs_dom.h: Ditto.
      
              * bindings/js/kjs_events.cpp:
              (WebCore::JSClipboard::put): Removed attributes argument.
              (WebCore::JSClipboard::putValueProperty): Ditto.
              * bindings/js/kjs_events.h: Ditto.
      
              * bindings/js/kjs_html.cpp:
              (WebCore::runtimeObjectGetter): Updated for change to getRuntimeObject to
              return a JSObject. Used early exit idiom.
              (WebCore::runtimeObjectPropertyGetter): Ditto.
              (WebCore::runtimeObjectCustomGetOwnPropertySlot): Ditto.
              (WebCore::runtimeObjectCustomPut): Use hasProperty to check for properties
              that we should put with the property syntax instead of canPut.
              (WebCore::runtimeObjectImplementsCall): Ditto.
              (WebCore::runtimeObjectCallAsFunction): Ditto.
              * bindings/js/kjs_html.h: Removed attributes argument to runtimeObjectCustomPut.
      
              * bindings/js/kjs_window.cpp:
              (KJS::Window::put): Removed attributes argument.
              * bindings/js/kjs_window.h: Ditto.
      
              * bindings/scripts/CodeGeneratorJS.pm: Removed attributes argument from put,
              putValueProperty, customPut, and indexSetter.
      
              * html/CanvasPixelArray.h:
              (WebCore::CanvasPixelArray::set): Added index checking here, as in the get
              function. Before, the checking was done in the JavaScript bindings for set.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30534 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e25e04e3