1. 12 Nov, 2009 1 commit
    • aroben@apple.com's avatar
      Replace worldIDs with world objects · f6cbb76a
      aroben@apple.com authored
      Part of <http://webkit.org/b/31414> Implement new SPI for dealing with
      user scripts/stylesheets and isolated worlds
      
      Reviewed by Sam Weinig.
      
      WebCore:
      
      Covered by existing tests.
      
      * WebCore.base.exp: Update exported symbols to match what now exists
      and is needed by WebKit.
      
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::execute): Updated for function rename.
      
      * bindings/js/ScriptController.cpp: Removed code that dealt with
      worldIDs.
      (WebCore::ScriptController::createWorld): Added. Returns a new world
      suitable for use on the main thread.
      (WebCore::ScriptController::executeScriptInWorld): Renamed from
      executeScriptInIsolatedWorld, since this works just fine with a
      "normal" world.
      
      * bindings/js/ScriptController.h: Added createWorld, removed functions
      that took worldIDs, renamed executeScriptInIsolatedWorld to
      executeScriptInWorld.
      
      * page/Frame.cpp:
      (WebCore::Frame::injectUserScripts):
      (WebCore::Frame::injectUserScriptsForWorld):
      Updated for changes to UserScriptMap and ScriptController.
      
      * page/Frame.h: Changed injectUserScriptsForWorld to take a
      DOMWrapperWorld* instead of a worldID.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserScriptToWorld):
      (WebCore::PageGroup::addUserStyleSheetToWorld):
      (WebCore::PageGroup::removeUserScriptFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetFromWorld):
      (WebCore::PageGroup::removeUserScriptsFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
      * page/PageGroup.h:
      Changed these functions to take a DOMWrapperWorld* instead of a
      worldID. Also updated for changes to UserScript and UserStyleSheet.
      
      * page/UserScript.h:
      * page/UserStyleSheet.h: Changed not to hold a worldID, since it was
      never used.
      
      * page/UserScriptTypes.h:
      * page/UserStyleSheetTypes.h: Changed UserScriptMap and
      UserStyleSheetMap to use a RefPtr<DOMWrapperWorld> instead of a
      worldID as their key type.
      
      WebKit:
      
      * WebKit.xcodeproj/project.pbxproj: Added WebScriptWorld to the project.
      
      WebKit/mac:
      
      WebScriptWorld is the new object that represents a world.  The only
      place worldID is still used is in -[WebFrame
      _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:],
      but that will change soon.
      
      * WebKit.exp: Export WebScriptWorld.
      
      * WebView/WebFrame.mm:
      (-[WebFrame _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:]):
      Moved the bizarre world caching/creation logic that DRT depends on
      here from the findWorld function in ScriptController.cpp. Updated to
      use ScriptController::executeScriptInWorld instead of
      ScriptController::executeScriptInIsolatedWorld.
      (-[WebFrame _contextForWorld:]): Renamed from contextForWorldID:. Now
      takes a WebScriptWorld.
      
      * WebView/WebFramePrivate.h: Replaced contextForWorldID: with
      _contextForWorld:.
      
      * WebView/WebScriptWorld.h: Added.
      * WebView/WebScriptWorld.mm: Added.
      (-[WebScriptWorld initWithWorld:]): Store the passed-in world in our
      _private member.
      (-[WebScriptWorld init]): Create a new DOMWrapperWorld and pass it to
      -initWithWorld:.
      (-[WebScriptWorld dealloc]): Release _private.
      (+[WebScriptWorld standardWorld]): Returns a shared instance that
      represents WebCore's mainThreadNormalWorld().
      (+[WebScriptWorld world]): Returns a new instance.
      (core): Returns the DOMWrapperWorld for this WebScriptWorld.
      
      * WebView/WebScriptWorldInternal.h: Added.
      
      * WebView/WebView.mm:
      (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]):
      (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]):
      (+[WebView _removeUserScriptFromGroup:world:url:]):
      (+[WebView _removeUserStyleSheetFromGroup:world:url:]):
      (+[WebView _removeUserScriptsFromGroup:world:]):
      (+[WebView _removeUserStyleSheetsFromGroup:world:]):
      * WebView/WebViewPrivate.h:
      Changed these functions to take a WebScriptWorld instead of a worldID.
      
      WebKit/win:
      
      WebScriptWorld is the new object that represents a world.  The only
      place worldID is still used is in
      IWebFramePrivate::stringByEvaluatingJavaScriptInIsolatedWorld, but
      that will change soon.
      
      * ForEachCoClass.h: Added WebScriptWorld.
      
      * Interfaces/IWebFramePrivate.idl: Replaced contextForWorldID with
      contextForWorld.
      
      * Interfaces/IWebScriptWorld.idl: Added.
      
      * Interfaces/IWebViewPrivate.idl: Changed the user script/stylesheet
      functions to take an IWebScriptWorld instead of a worldID.
      
      * Interfaces/WebKit.idl: Added WebScriptWorld.
      
      * WebFrame.cpp:
      (WebFrame::contextForWorld): Renamed from contextForWorldID. Now takes
      an IWebScriptWorld.
      (WebFrame::stringByEvaluatingJavaScriptInIsolatedWorld): Moved the
      bizarre world caching/creation logic that DRT depends on here from the
      findWorld function in ScriptController.cpp. Updated to use
      ScriptController::executeScriptInWorld instead of
      ScriptController::executeScriptInIsolatedWorld.
      
      * WebFrame.h: Replaced contextForWorldID with contextForWorld.
      
      * WebScriptWorld.cpp: Added.
      (WebScriptWorld::WebScriptWorld):
      (WebScriptWorld::~WebScriptWorld):
      (WebScriptWorld::createInstance):
      (WebScriptWorld::AddRef):
      (WebScriptWorld::Release):
      (WebScriptWorld::QueryInterface):
      Standard COM class implementations.
      
      (WebScriptWorld::standardWorld): Returns a shared instance that represents
      WebCore's mainThreadNormalWorld().
      
      * WebScriptWorld.h: Added.
      (WebScriptWorld::world): Simple getter.
      
      * WebKit.vcproj/Interfaces.vcproj: Added IWebScriptWorld.idl.
      
      * WebKit.vcproj/WebKit.vcproj: Added WebScriptWorld.
      
      * WebKitClassFactory.cpp: Added WebScriptWorld.
      
      * WebView.cpp:
      (WebView::addUserScriptToGroup):
      (WebView::addUserStyleSheetToGroup):
      (WebView::removeUserScriptFromGroup):
      (WebView::removeUserStyleSheetFromGroup):
      (WebView::removeUserScriptsFromGroup):
      (WebView::removeUserStyleSheetsFromGroup):
      * WebView.h:
      Changed these functions to take an IWebScriptWorld instead of a worldID.
      
      WebKitTools:
      
      * DumpRenderTree/mac/LayoutTestControllerMac.mm:
      (LayoutTestController::addUserScript):
      (LayoutTestController::addUserStyleSheet):
      * DumpRenderTree/win/LayoutTestControllerWin.cpp:
      (LayoutTestController::addUserScript):
      (LayoutTestController::addUserStyleSheet):
      Changed these functions to create a new WebJSWorld each time they're
      called and to pass that world to WebKit.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f6cbb76a
  2. 11 Nov, 2009 1 commit
    • barraclough@apple.com's avatar
      Simplify the ownership model for worlds - rather than having a pair of weak references · b8c62238
      barraclough@apple.com authored
      between DOMWrapperWorld and ScriptController/ScriptCachedFrameData, give the latter an
      ref pointer to the former.  This reduces complexity & cost of the caching entries in the
      back forward cache.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-11-10
      Reviewed by Geoff Garen.
      
      * WebCore.base.exp:
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
      * bindings/js/JSDOMBinding.h:
      (WebCore::DOMWrapperWorld::forgetDocument):
      * bindings/js/ScriptCachedFrameData.cpp:
      (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
      (WebCore::ScriptCachedFrameData::restore):
      (WebCore::ScriptCachedFrameData::clear):
      * bindings/js/ScriptCachedFrameData.h:
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::~ScriptController):
      (WebCore::ScriptController::clearWindowShell):
      (WebCore::ScriptController::initScript):
      (WebCore::ScriptController::updateDocument):
      * bindings/js/ScriptController.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50792 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b8c62238
  3. 10 Nov, 2009 1 commit
    • bdakin@apple.com's avatar
      WebCore: Fix for <rdar://problem/7059710> · 4a0593e3
      bdakin@apple.com authored
      -and corresponding-
      https://bugs.webkit.org/show_bug.cgi?id=31196 Implement -webkit-
      color-correction for CSS colors
      
      Reviewed by Darin Adler.
      
      New exported symbol for GraphicsContext::fillColor() which now 
      accepts a ColorSpace as an optional parameter.
      * WebCore.base.exp:
      
      Added a new file, ColorSpace.h, to define the ColorSpace enum.
      * WebCore.xcodeproj/project.pbxproj:
      
      Computed Style for -webkit-color-correction
      * css/CSSComputedStyleDeclaration.cpp:
      (WebCore::):
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
      
      Parse -webkit-color-correction
      * css/CSSParser.cpp:
      (WebCore::CSSParser::parseValue):
      
             Map CSS identifiers to the appropriate values of the ColorSpace enum
      * css/CSSPrimitiveValueMappings.h:
      (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
      (WebCore::CSSPrimitiveValue::operator ColorSpace):
      
      New property -webkit-color-correction
      * css/CSSPropertyNames.in:
      
      Map -webkit-color-correction into the RenderStyle.
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::applyProperty):
      
      Add new value sRGB.
      * css/CSSValueKeywords.in:
      
      Comment out the reference to sRGB since it will now be inherited as 
      a value from CSSValueKeywords.
      * css/SVGCSSValueKeywords.in:
      
      Definition of the ColorSpace enum.
      * platform/graphics/ColorSpace.h: Added.
      (WebCore::):
      
      These functions all now take a ColorSpace as a parameter.
      * platform/graphics/GraphicsContext.cpp:
      (WebCore::GraphicsContext::setStrokeColor):
      (WebCore::GraphicsContext::setFillColor):
      (WebCore::GraphicsContext::drawHighlightForText):
      
      Return the appropriate ColorSpace.
      (WebCore::GraphicsContext::strokeColorSpace):
      (WebCore::GraphicsContext::fillColorSpace):
      
      These functions all call other functions which require a ColorSpace 
      as a parameter.
      (WebCore::GraphicsContext::setStrokePattern):
      (WebCore::GraphicsContext::setFillPattern):
      (WebCore::GraphicsContext::setStrokeGradient):
      (WebCore::GraphicsContext::setFillGradient):
      
      All of the GraphicsContext functions that take a Color should now 
      also take a ColorSpace.
      * platform/graphics/GraphicsContext.h:
      
      Added new member variables stokeColorSpace and fillColorSpace.
      * platform/graphics/GraphicsContextPrivate.h:
      (WebCore::GraphicsContextState::GraphicsContextState):
      
      Attempt to keep the Cairo port building with all of the massive 
      changes to GraphicsContext.        
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      (WebCore::GraphicsContext::fillRect):
      (WebCore::GraphicsContext::setPlatformFillColor):
      (WebCore::GraphicsContext::setPlatformStrokeColor):
      (WebCore::GraphicsContext::fillRoundedRect):
      
              
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore::sRGBColorSpaceRef): New static function that returns a 
      CGColorSpaceRef for the sRGB color space.
      (WebCore::deviceRGBColorSpaceRef): New static function that returns 
      a CGColorSpaceRef for the device RGB color space.
      
      (WebCore::setCGFillColor): Now takes a ColorSpace parameter and 
      sets the fill color to the specified color in the given ColorSpace.
      (WebCore::setCGStrokeColor): Same, but for stroke.
      
      (WebCore::setCGFillColorSpace): New static to set the 
      CGFillColorSpace to the given ColorSpace
      (WebCore::setCGStrokeColorSpace): Same, but for stroke.
      
      Send ColorSpaces when appropriate, set ColorSpaces when 
      appropriate, and check ColorSpaces when appropriate.
      (WebCore::GraphicsContext::GraphicsContext):
      (WebCore::GraphicsContext::drawRect):
      (WebCore::GraphicsContext::drawLine):
      (WebCore::GraphicsContext::fillPath):
      (WebCore::GraphicsContext::strokePath):
      (WebCore::GraphicsContext::fillRect):
      (WebCore::GraphicsContext::fillRoundedRect):
      (WebCore::GraphicsContext::strokeRect):
      (WebCore::GraphicsContext::drawLineForText):
      (WebCore::GraphicsContext::setPlatformStrokeColor):
      (WebCore::GraphicsContext::setPlatformFillColor):
      
      Attempt to keep Haiku building.
      * platform/graphics/haiku/GraphicsContextHaiku.cpp:
      (WebCore::GraphicsContext::fillRect):
      (WebCore::GraphicsContext::fillRoundedRect):
      (WebCore::GraphicsContext::setPlatformStrokeColor):
      (WebCore::GraphicsContext::setPlatformFillColor):
      
      Attempt to keep QT building.
      * platform/graphics/qt/GraphicsContextQt.cpp:
      (WebCore::GraphicsContext::fillRect):
      (WebCore::GraphicsContext::fillRoundedRect):
      (WebCore::GraphicsContext::setPlatformStrokeColor):
      (WebCore::GraphicsContext::setPlatformFillColor):
      
      Attempt to keep Wince building.
      * platform/graphics/wince/GraphicsContextWince.cpp:
      (WebCore::GraphicsContext::fillRect):
      (WebCore::GraphicsContext::setPlatformFillColor):
      (WebCore::GraphicsContext::setPlatformStrokeColor):
      (WebCore::GraphicsContext::clearRect):
      (WebCore::GraphicsContext::fillRoundedRect):
      (WebCore::GraphicsContext::setPlatformShadow):
      
      Attempt to keep WX building.
      * platform/graphics/wx/GraphicsContextWx.cpp:
      (WebCore::GraphicsContext::fillRect):
      (WebCore::GraphicsContext::fillRoundedRect):
      (WebCore::GraphicsContext::setPlatformStrokeColor):
      (WebCore::GraphicsContext::setPlatformFillColor):
      
      Added functions colorSpace() and setColorSpace()
      * rendering/style/RenderStyle.h:
      (WebCore::InheritedFlags::colorSpace):
      (WebCore::InheritedFlags::setColorSpace):
      
      The ColorSpace is stored here.
      * rendering/style/StyleRareInheritedData.cpp:
      (WebCore::StyleRareInheritedData::StyleRareInheritedData):
      (WebCore::StyleRareInheritedData::operator==):
      * rendering/style/StyleRareInheritedData.h:
      
      All of these call sites call GraphicsContext functions which now 
      require ColorSpaces.
      * editing/SelectionController.cpp:
      (WebCore::SelectionController::paintCaret):
      * html/canvas/CanvasRenderingContext2D.cpp:
      (WebCore::CanvasRenderingContext2D::drawTextInternal):
      * html/canvas/CanvasStyle.cpp:
      (WebCore::CanvasStyle::applyStrokeColor):
      (WebCore::CanvasStyle::applyFillColor):
      * inspector/InspectorController.cpp:
      (WebCore::drawOutlinedQuad):
      * page/FrameView.cpp:
      (WebCore::FrameView::paintContents):
      * platform/ScrollbarTheme.h:
      (WebCore::ScrollbarTheme::paintScrollCorner):
      * platform/ScrollbarThemeComposite.cpp:
      (WebCore::ScrollbarThemeComposite::paintScrollCorner):
      * platform/graphics/Image.cpp:
      (WebCore::Image::fillWithSolidColor):
      * platform/graphics/mac/FontMac.mm:
      (WebCore::Font::drawGlyphs):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivate::paint):
      * rendering/EllipsisBox.cpp:
      (WebCore::EllipsisBox::paint):
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::paintTextDecorations):
      * rendering/InlineTextBox.cpp:
      (WebCore::updateGraphicsContext):
      (WebCore::paintTextWithShadows):
      (WebCore::InlineTextBox::paint):
      (WebCore::InlineTextBox::paintSelection):
      (WebCore::InlineTextBox::paintCompositionBackground):
      (WebCore::InlineTextBox::paintDecoration):
      (WebCore::InlineTextBox::paintTextMatchMarker):
      (WebCore::InlineTextBox::paintCompositionUnderline):
      * rendering/InlineTextBox.h:
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::fillHorizontalSelectionGap):
      (WebCore::RenderBlock::fillVerticalSelectionGap):
      (WebCore::RenderBlock::fillLeftSelectionGap):
      (WebCore::RenderBlock::fillRightSelectionGap):
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::paintFillLayerExtended):
      (WebCore::RenderBoxModelObject::paintBoxShadow):
      * rendering/RenderFileUploadControl.cpp:
      (WebCore::RenderFileUploadControl::paintObject):
      * rendering/RenderFrameSet.cpp:
      (WebCore::RenderFrameSet::paintColumnBorder):
      (WebCore::RenderFrameSet::paintRowBorder):
      * rendering/RenderImage.cpp:
      (WebCore::RenderImage::paintReplaced):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::paintScrollCorner):
      (WebCore::RenderLayer::paintResizer):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::paintItemForeground):
      (WebCore::RenderListBox::paintItemBackground):
      * rendering/RenderListMarker.cpp:
      (WebCore::RenderListMarker::paint):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::drawLineForBoxSide):
      (WebCore::RenderObject::drawArcForBoxSide):
      * rendering/RenderReplaced.cpp:
      (WebCore::RenderReplaced::paint):
      * rendering/RenderScrollbarTheme.cpp:
      (WebCore::RenderScrollbarTheme::paintScrollCorner):
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::paintMenuListButton):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::paintBoxDecorations):
      * rendering/RenderWidget.cpp:
      (WebCore::RenderWidget::paint):
      * rendering/SVGInlineTextBox.cpp:
      (WebCore::SVGInlineTextBox::paintSelection):
      * svg/graphics/SVGPaintServerGradient.cpp:
      (WebCore::SVGPaintServerGradient::setup):
      * svg/graphics/SVGPaintServerSolid.cpp:
      (WebCore::SVGPaintServerSolid::setup):
      
      WebKit/mac: Small WebKit part of:
      Fix for <rdar://problem/7059710> 
      -and corresponding-
      https://bugs.webkit.org/show_bug.cgi?id=31196 Implement -webkit-
      color-correction for CSS colors
      
      Reviewed by Darin Adler.
      
      * Misc/WebKitNSStringExtras.mm:
      (-[NSString _web_drawAtPoint:font:textColor:]): setFillColor now 
      requires callers to pass a ColorSpace.
      
      LayoutTests: Tests for <rdar://problem/7059710> 
      -and corresponding-
      https://bugs.webkit.org/show_bug.cgi?id=31196 Implement -webkit-
      color-correction for CSS colors
      
      Reviewed by Darin Adler.
      
      New tests.
      * fast/css/color-correction-backgrounds-and-text.html: Added.
      * fast/css/color-correction-on-backgrounds.html: Added.
      * fast/css/color-correction-on-text.html: Added.
      * fast/css/color-correction.html: Added.
      * fast/css/parsing-color-correction-expected.txt: Added.
      * fast/css/parsing-color-correction.html: Added.
      * fast/css/resources/parsing-color-correction.js: Added.
      (test):
      * fast/css/resources/purple-srgb.png: Added.
      * platform/mac/fast/css/color-correction-backgrounds-and-text-expected.checksum: Added.
      * platform/mac/fast/css/color-correction-backgrounds-and-text-expected.png: Added.
      * platform/mac/fast/css/color-correction-backgrounds-and-text-expected.txt: Added.
      * platform/mac/fast/css/color-correction-expected.checksum: Added.
      * platform/mac/fast/css/color-correction-expected.png: Added.
      * platform/mac/fast/css/color-correction-expected.txt: Added.
      * platform/mac/fast/css/color-correction-on-backgrounds-expected.checksum: Added.
      * platform/mac/fast/css/color-correction-on-backgrounds-expected.png: Added.
      * platform/mac/fast/css/color-correction-on-backgrounds-expected.txt: Added.
      * platform/mac/fast/css/color-correction-on-text-expected.checksum: Added.
      * platform/mac/fast/css/color-correction-on-text-expected.png: Added.
      * platform/mac/fast/css/color-correction-on-text-expected.txt: Added.
      
      New and improved results.
      * platform/mac/fast/css/getComputedStyle/computed-style-expected.txt:
      * platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
      * svg/css/getComputedStyle-basic-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a0593e3
  4. 09 Nov, 2009 1 commit
  5. 04 Nov, 2009 1 commit
  6. 28 Oct, 2009 1 commit
    • hamaji@chromium.org's avatar
      2009-10-27 Shinichiro Hamaji <hamaji@chromium.org> · 47244a6c
      hamaji@chromium.org authored
              Reviewed by Darin Adler.
      
              Provide a way to get counter values with layoutTestContoller
              https://bugs.webkit.org/show_bug.cgi?id=30555
      
              * Api/qwebframe.cpp:
              (QWebFrame::counterValueForElementById):
              (QWebHitTestResult::frame):
              * Api/qwebframe.h:
      2009-10-27  Shinichiro Hamaji  <hamaji@chromium.org>
      
              Reviewed by Darin Adler.
      
              Provide a way to get counter values with layoutTestContoller
              https://bugs.webkit.org/show_bug.cgi?id=30555
      
              * webkit/webkitprivate.h:
              * webkit/webkitwebframe.cpp:
              (webkit_web_frame_counter_value_for_element_by_id):
      2009-10-27  Shinichiro Hamaji  <hamaji@chromium.org>
      
              Reviewed by Darin Adler.
      
              Provide a way to get counter values with layoutTestContoller
              https://bugs.webkit.org/show_bug.cgi?id=30555
      
              * Interfaces/IWebFramePrivate.idl:
              * WebFrame.cpp:
              (WebFrame::counterValueForElementById):
              * WebFrame.h:
      2009-10-27  Shinichiro Hamaji  <hamaji@chromium.org>
      
              Reviewed by Darin Adler.
      
              Provide a way to get counter values with layoutTestContoller
              https://bugs.webkit.org/show_bug.cgi?id=30555
      
              Add counterValueForElement in WebFrame to call WebCore::counterValueForElement.
      
              * Misc/WebCoreStatistics.h:
              * Misc/WebCoreStatistics.mm:
              (-[WebFrame counterValueForElement:]):
      2009-10-27  Shinichiro Hamaji  <hamaji@chromium.org>
      
              Reviewed by Darin Adler.
      
              Provide a way to get counter values with layoutTestContoller
              https://bugs.webkit.org/show_bug.cgi?id=30555
      
              Expose WebCore::counterValueForElement as a WebCore API.
      
              * WebCore.base.exp:
              * rendering/RenderTreeAsText.cpp:
              (WebCore::writeCounterValuesFromChildren):
              (WebCore::counterValueForElement):
              * rendering/RenderTreeAsText.h:
      2009-10-27  Shinichiro Hamaji  <hamaji@chromium.org>
      
              Reviewed by Darin Adler.
      
              Provide a way to get counter values with layoutTestContoller
              https://bugs.webkit.org/show_bug.cgi?id=30555
      
              Convert two pixel tests to dumpAsText tests using counterValueForElementById.
      
              * fast/css/counters/t1204-increment-00-c-o-expected.txt: Added.
              * fast/css/counters/t1204-increment-00-c-o.html:
              * fast/css/counters/t1204-increment-01-c-o-expected.txt: Added.
              * fast/css/counters/t1204-increment-01-c-o.html:
              * platform/mac/fast/css/counters/t1204-increment-00-c-o-expected.checksum: Removed.
              * platform/mac/fast/css/counters/t1204-increment-00-c-o-expected.png: Removed.
              * platform/mac/fast/css/counters/t1204-increment-00-c-o-expected.txt: Removed.
              * platform/mac/fast/css/counters/t1204-increment-01-c-o-expected.checksum: Removed.
              * platform/mac/fast/css/counters/t1204-increment-01-c-o-expected.png: Removed.
              * platform/mac/fast/css/counters/t1204-increment-01-c-o-expected.txt: Removed.
              * platform/qt/fast/css/counters/t1204-increment-00-c-o-expected.txt: Removed.
              * platform/qt/fast/css/counters/t1204-increment-01-c-o-expected.txt: Removed.
      2009-10-27  Shinichiro Hamaji  <hamaji@chromium.org>
      
              Reviewed by Darin Adler.
      
              Provide a way to get counter values with layoutTestContoller
              https://bugs.webkit.org/show_bug.cgi?id=30555
      
              Define layoutTestContoller.counterValueForElementById.
      
              * DumpRenderTree/LayoutTestController.cpp:
              (counterValueForElementByIdCallback):
              (LayoutTestController::staticFunctions):
              * DumpRenderTree/LayoutTestController.h:
              * DumpRenderTree/mac/LayoutTestControllerMac.mm:
              (LayoutTestController::counterValueForElementById):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      47244a6c
  7. 23 Oct, 2009 1 commit
    • barraclough@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=30729 · 8616dbc0
      barraclough@apple.com authored
      Provide private API to request the global context for a specific world.
      Used to initialize parameters on the global object.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-23
      Reviewed by Geoff Garen.
      
      WebCore: 
      
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::globalObject):
      * bindings/js/ScriptController.h:
      
      WebKit/mac: 
      
      * WebView/WebFramePrivate.h:
      * WebView/WebFrame.mm:
      (-[WebFrame contextForWorldID:]):
      
      WebKit/win: 
      
      * WebFrame.cpp:
      (WebFrame::contextForWorldID):
      * WebFrame.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50012 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8616dbc0
  8. 22 Oct, 2009 1 commit
    • barraclough@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=30696 · c53df831
      barraclough@apple.com authored
      Add support for IsolatedWorlds to JSC bindings.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-16
      Reviewed by Sam Weinig & Geoff Garen.
      
      An IsolatedWorld is basically a parallel, separate copy of the window shells and DOM wrapper objects for
      a given document.  To support isolation this patch:
      
          * Adds support to the ScriptController to track multiple window shells, one per world.
          * Adds support to Document to support multiple separate wrapper-maps, one per world.
          * Replaces the single global DOM wrapper map (on the WebCoreJSClientData) with separate maps,
            stored on the (new) IsolatedWorld objects.
      
      In addition to supporting separate copies of these objects, two other features are supported:
      
          * It is necessary to track the current world on entry into JSC, so that within callbacks out to WebCore
            we can determine which world (and as such, set of DOM bindings) we should be operating on.
          * EventListeners & Callbacks are run in the world they were registered in.
            This requires the handler to retain a reference to the world.
      
      No new tests. (Enabled existing isolated world layout tests.)
      
      * WebCore.base.exp:
      * bindings/js/JSAbstractWorkerCustom.cpp:
      (WebCore::JSAbstractWorker::addEventListener):
      (WebCore::JSAbstractWorker::removeEventListener):
      * bindings/js/JSCallbackData.cpp:
      (WebCore::JSCallbackData::invokeCallback):
      * bindings/js/JSCallbackData.h:
      (WebCore::JSCallbackData::JSCallbackData):
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
      * bindings/js/JSDOMApplicationCacheCustom.cpp:
      (WebCore::JSDOMApplicationCache::addEventListener):
      (WebCore::JSDOMApplicationCache::removeEventListener):
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::removeWrappers):
      (WebCore::DOMObjectWrapperMap::get):
      (WebCore::DOMObjectWrapperMap::set):
      (WebCore::DOMObjectWrapperMap::remove):
      (WebCore::DOMObjectWrapperMap::take):
      (WebCore::IsolatedWorld::IsolatedWorld):
      (WebCore::IsolatedWorld::~IsolatedWorld):
      (WebCore::EnterIsolatedWorld::EnterIsolatedWorld):
      (WebCore::EnterIsolatedWorld::~EnterIsolatedWorld):
      (WebCore::JSGlobalDataWorldIterator::JSGlobalDataWorldIterator):
      (WebCore::JSGlobalDataWorldIterator::operator bool):
      (WebCore::JSGlobalDataWorldIterator::operator*):
      (WebCore::JSGlobalDataWorldIterator::operator->):
      (WebCore::JSGlobalDataWorldIterator::operator++):
      (WebCore::getCurrentWorld):
      (WebCore::getNormalWorld):
      (WebCore::commonNormalWorld):
      (WebCore::commonCurrentWorld):
      (WebCore::DOMObjectHashTableMap::mapFor):
      (WebCore::DOMObjectWrapperMap::mapFor):
      (WebCore::forgetDOMObject):
      (WebCore::getCachedDOMNodeWrapper):
      (WebCore::forgetDOMNode):
      (WebCore::cacheDOMNodeWrapper):
      (WebCore::forgetAllDOMNodesForDocument):
      (WebCore::forgetWorldOfDOMNodesForDocument):
      (WebCore::isObservableThroughDOM):
      (WebCore::markDOMNodesForDocument):
      (WebCore::markActiveObjectsForContext):
      (WebCore::takeWrappers):
      (WebCore::updateDOMNodeDocument):
      (WebCore::markDOMObjectWrapper):
      (WebCore::allowsAccessFromFrame):
      (WebCore::printErrorMessageForFrame):
      (WebCore::JSC_DebuggerCallFrame_evaluateInWorld):
      (WebCore::JSC_callInWorld):
      (WebCore::JSC_constructInWorld):
      (WebCore::JSC_evaluateInWorld):
      * bindings/js/JSDOMBinding.h:
      (WebCore::IsolatedWorld::rememberDocument):
      (WebCore::IsolatedWorld::forgetDocument):
      (WebCore::IsolatedWorld::rememberScriptController):
      (WebCore::IsolatedWorld::forgetScriptController):
      (WebCore::DOMObjectHashTableMap::~DOMObjectHashTableMap):
      (WebCore::DOMObjectHashTableMap::get):
      (WebCore::WebCoreJSClientData::WebCoreJSClientData):
      (WebCore::WebCoreJSClientData::currentWorld):
      (WebCore::WebCoreJSClientData::normalWorld):
      (WebCore::WebCoreJSClientData::rememberWorld):
      (WebCore::WebCoreJSClientData::forgetWorld):
      (WebCore::debuggerWorld):
      (WebCore::pluginWorld):
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::createJSAttributeEventListener):
      (WebCore::toJSDOMGlobalObject):
      * bindings/js/JSDOMGlobalObject.h:
      * bindings/js/JSDOMWindowBase.cpp:
      (WebCore::JSDOMWindowBase::printErrorMessage):
      (WebCore::JSDOMWindowBase::commonJSGlobalData):
      (WebCore::toJS):
      (WebCore::toJSDOMWindow):
      * bindings/js/JSDOMWindowBase.h:
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::createWindow):
      (WebCore::JSDOMWindow::open):
      (WebCore::JSDOMWindow::showModalDialog):
      (WebCore::JSDOMWindow::setTimeout):
      (WebCore::JSDOMWindow::setInterval):
      (WebCore::JSDOMWindow::addEventListener):
      (WebCore::JSDOMWindow::removeEventListener):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::toJS):
      (WebCore::toJSDOMWindowShell):
      * bindings/js/JSDOMWindowShell.h:
      * bindings/js/JSDesktopNotificationsCustom.cpp:
      (WebCore::JSNotification::addEventListener):
      (WebCore::):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::JSEventListener):
      (WebCore::JSEventListener::handleEvent):
      (WebCore::JSEventListener::reportError):
      * bindings/js/JSEventListener.h:
      (WebCore::JSEventListener::create):
      * bindings/js/JSEventSourceCustom.cpp:
      (WebCore::JSEventSource::addEventListener):
      (WebCore::JSEventSource::removeEventListener):
      * bindings/js/JSEventTarget.cpp:
      (WebCore::toJS):
      * bindings/js/JSHTMLDocumentCustom.cpp:
      (WebCore::JSHTMLDocument::open):
      * bindings/js/JSHTMLFrameSetElementCustom.cpp:
      (WebCore::JSHTMLFrameSetElement::nameGetter):
      * bindings/js/JSInspectorBackendCustom.cpp:
      (WebCore::JSInspectorBackend::databaseForId):
      (WebCore::JSInspectorBackend::inspectedWindow):
      (WebCore::JSInspectorBackend::nodeForId):
      * bindings/js/JSLazyEventListener.cpp:
      (WebCore::JSLazyEventListener::JSLazyEventListener):
      (WebCore::JSLazyEventListener::parseCode):
      * bindings/js/JSLazyEventListener.h:
      (WebCore::JSLazyEventListener::create):
      * bindings/js/JSMessageChannelCustom.cpp:
      (WebCore::JSMessageChannel::markChildren):
      * bindings/js/JSMessagePortCustom.cpp:
      (WebCore::JSMessagePort::markChildren):
      (WebCore::JSMessagePort::addEventListener):
      (WebCore::JSMessagePort::removeEventListener):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::addEventListener):
      (WebCore::JSNode::removeEventListener):
      (WebCore::JSNode::markChildren):
      * bindings/js/JSNodeFilterCondition.cpp:
      (WebCore::JSNodeFilterCondition::acceptNode):
      * bindings/js/JSQuarantinedObjectWrapper.cpp:
      (WebCore::JSQuarantinedObjectWrapper::construct):
      (WebCore::JSQuarantinedObjectWrapper::call):
      * bindings/js/JSSVGElementInstanceCustom.cpp:
      (WebCore::JSSVGElementInstance::addEventListener):
      (WebCore::JSSVGElementInstance::removeEventListener):
      * bindings/js/JSSharedWorkerCustom.cpp:
      (WebCore::JSSharedWorker::markChildren):
      * bindings/js/JSWebSocketCustom.cpp:
      (WebCore::JSWebSocket::addEventListener):
      (WebCore::JSWebSocket::removeEventListener):
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::addEventListener):
      (WebCore::JSWorkerContext::removeEventListener):
      (WebCore::JSWorkerContext::setTimeout):
      (WebCore::JSWorkerContext::setInterval):
      * bindings/js/JSXMLHttpRequestConstructor.cpp:
      (WebCore::constructXMLHttpRequest):
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::markChildren):
      (WebCore::JSXMLHttpRequest::addEventListener):
      (WebCore::JSXMLHttpRequest::removeEventListener):
      * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
      (WebCore::JSXMLHttpRequestUpload::markChildren):
      (WebCore::JSXMLHttpRequestUpload::addEventListener):
      (WebCore::JSXMLHttpRequestUpload::removeEventListener):
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::create):
      (WebCore::ScheduledAction::ScheduledAction):
      (WebCore::ScheduledAction::executeFunctionInContext):
      (WebCore::ScheduledAction::execute):
      * bindings/js/ScheduledAction.h:
      (WebCore::ScheduledAction::ScheduledAction):
      * bindings/js/ScriptCachedFrameData.cpp:
      (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
      (WebCore::ScriptCachedFrameData::restore):
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::~ScriptController):
      (WebCore::ScriptController::evaluateInWorld):
      (WebCore::ScriptController::evaluate):
      (WebCore::ScriptController::evaluateInIsolatedWorld):
      (WebCore::ScriptController::clearWindowShell):
      (WebCore::ScriptController::initScript):
      (WebCore::ScriptController::processingUserGestureEvent):
      (WebCore::ScriptController::attachDebugger):
      (WebCore::ScriptController::updateDocument):
      (WebCore::ScriptController::bindingRootObject):
      (WebCore::ScriptController::createRootObject):
      (WebCore::ScriptController::windowScriptNPObject):
      (WebCore::ScriptController::jsObjectForPluginElement):
      * bindings/js/ScriptController.h:
      (WebCore::ScriptController::windowShell):
      (WebCore::ScriptController::existingWindowShell):
      (WebCore::ScriptController::globalObject):
      (WebCore::ScriptController::forgetWorld):
      * bindings/js/ScriptControllerMac.mm:
      (WebCore::ScriptController::windowScriptObject):
      * bindings/js/ScriptEventListener.cpp:
      (WebCore::createAttributeEventListener):
      * bindings/js/ScriptFunctionCall.cpp:
      (WebCore::ScriptFunctionCall::call):
      (WebCore::ScriptFunctionCall::construct):
      * bindings/js/ScriptObjectQuarantine.cpp:
      (WebCore::getQuarantinedScriptObject):
      * bindings/js/ScriptState.cpp:
      (WebCore::scriptStateFromNode):
      (WebCore::scriptStateFromPage):
      * bindings/js/ScriptState.h:
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::WorkerScriptController):
      (WebCore::WorkerScriptController::evaluate):
      * bindings/objc/DOMInternal.mm:
      (-[WebScriptObject _initializeScriptDOMNodeImp]):
      * bindings/objc/WebScriptObject.mm:
      (-[WebScriptObject callWebScriptMethod:withArguments:]):
      (-[WebScriptObject evaluateWebScript:]):
      * bindings/scripts/CodeGeneratorJS.pm:
      * bridge/NP_jsobject.cpp:
      (_NPN_InvokeDefault):
      (_NPN_Invoke):
      (_NPN_Evaluate):
      (_NPN_Construct):
      * bridge/jni/jni_jsobject.mm:
      (JavaJSObject::call):
      (JavaJSObject::eval):
      * dom/Document.cpp:
      (WebCore::Document::createWrapperCache):
      * dom/Document.h:
      (WebCore::Document::wrapperCacheMap):
      (WebCore::Document::getWrapperCache):
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::startUserInitiatedProfiling):
      (WebCore::InspectorController::stopUserInitiatedProfiling):
      * inspector/JavaScriptCallFrame.cpp:
      (WebCore::JavaScriptCallFrame::evaluate):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::dispatchWindowObjectAvailable):
      * platform/network/mac/AuthenticationMac.mm:
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::XMLHttpRequest):
      (WebCore::XMLHttpRequest::dropProtection):
      * xml/XMLHttpRequest.h:
      (WebCore::XMLHttpRequest::create):
      
      WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=30696
      Update to incorporate support for IsolatedWorlds in JSC bindings.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-16
      Reviewed by Sam Weinig & Geoff Garen.
      
      * WebView/WebFrame.mm:
      (-[WebFrame _attachScriptDebugger]):
      (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
      (-[WebFrame globalContext]):
      * WebView/WebScriptDebugDelegate.mm:
      (-[WebScriptCallFrame evaluateWebScript:]):
      * WebView/WebView.mm:
      (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
      
      WebKit/win: https://bugs.webkit.org/show_bug.cgi?id=30696
      Update to incorporate support for IsolatedWorlds in JSC bindings.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-22
      Reviewed by Sam Weinig & Geoff Garen.
      
      * Interfaces/IWebFramePrivate.idl:
      * WebFrame.cpp:
      (WebFrame::globalContext):
      (WebFrame::windowObjectCleared):
      (WebFrame::stringByEvaluatingJavaScriptInIsolatedWorld):
      * WebFrame.h:
      
      WebKitTools: https://bugs.webkit.org/show_bug.cgi?id=30696
      Enable isolated-worlds tests on mac.
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-22
      Reviewed by Sam Weinig & Geoff Garen.
      
      Add private interface for DRT to invoke execution in a given world.
      
      * DumpRenderTree/LayoutTestController.cpp:
      (evaluateScriptInIsolatedWorldCallback):
      (LayoutTestController::staticFunctions):
      * DumpRenderTree/LayoutTestController.h:
      * DumpRenderTree/mac/LayoutTestControllerMac.mm:
      (LayoutTestController::evaluateScriptInIsolatedWorld):
      * DumpRenderTree/win/LayoutTestControllerWin.cpp:
      (LayoutTestController::evaluateScriptInIsolatedWorld):
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=30696
      Enable isolated-worlds tests on mac.
        * Update the results to switch from windows to unix line-endings.
        * Update all-window-prototypes.html to allow for properties on
          the global object with null prototypes (just skip over them).
      
      Patch by Gavin Barraclough <barraclough@apple.com> on 2009-10-19
      Reviewed by Sam Weinig & Geoff Garen.
      
      * http/tests/security/isolatedWorld/all-window-properties-expected.txt:
      * http/tests/security/isolatedWorld/all-window-prototypes-expected.txt:
      * http/tests/security/isolatedWorld/all-window-prototypes.html:
      * http/tests/security/isolatedWorld/body-properties-expected.txt:
      * http/tests/security/isolatedWorld/body-prototype-expected.txt:
      * http/tests/security/isolatedWorld/document-properties-expected.txt:
      * http/tests/security/isolatedWorld/document-prototype-expected.txt:
      * http/tests/security/isolatedWorld/global-variables-expected.txt:
      * http/tests/security/isolatedWorld/image-properties-expected.txt:
      * http/tests/security/isolatedWorld/image-prototype-expected.txt:
      * http/tests/security/isolatedWorld/location-properties-expected.txt:
      * http/tests/security/isolatedWorld/location-prototype-expected.txt:
      * http/tests/security/isolatedWorld/number-prototype-expected.txt:
      * http/tests/security/isolatedWorld/object-prototype-expected.txt:
      * http/tests/security/isolatedWorld/storage-properties-expected.txt:
      * http/tests/security/isolatedWorld/storage-prototype-expected.txt:
      * http/tests/security/isolatedWorld/string-prototype-expected.txt:
      * http/tests/security/isolatedWorld/window-properties-expected.txt:
      * platform/mac/Skipped:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c53df831
  9. 20 Oct, 2009 1 commit
    • ukai@chromium.org's avatar
      2009-10-20 Fumitoshi Ukai <ukai@chromium.org> · 64d2b36d
      ukai@chromium.org authored
              Reviewed by David Levin.
      
              Set EnabledAtRuntime for WebSocket in DOMWindow
              https://bugs.webkit.org/show_bug.cgi?id=29896
      
              Supported by chromium/v8 only.
              Add WebSocket::isAvailable()/setIsAvailable(bool) to control v8
              bindings.
              Remove Settings::experimentalWebSocketsEnabled() and
              setExperimentalWebSocketsEnabled(bool).
      
              * WebCore.base.exp:
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::webSocket):
              * bindings/v8/V8DOMWrapper.cpp:
              (WebCore::V8DOMWrapper::getConstructor):
              * bindings/v8/custom/V8CustomBinding.h:
              * bindings/v8/custom/V8DOMWindowCustom.cpp:
              (WebCore::ACCESSOR_RUNTIME_ENABLER):
              * page/DOMWindow.idl:
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              * page/Settings.h:
              * websockets/WebSocket.cpp:
              (WebCore::WebSocket::setIsAvailable):
              (WebCore::WebSocket::isAvailable):
              * websockets/WebSocket.h:
      2009-10-20  Fumitoshi Ukai  <ukai@chromium.org>
      
              Reviewed by David Levin.
      
              Removed WebSocket runtime settings.
              https://bugs.webkit.org/show_bug.cgi?id=29896
      
              WebSocket runtime configuration is supported by chromium/v8 only.
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_update_settings):
              (webkit_web_view_settings_notify):
      2009-10-20  Fumitoshi Ukai  <ukai@chromium.org>
      
              Reviewed by David Levin.
      
              Removed WebSocket runtime settings.
              https://bugs.webkit.org/show_bug.cgi?id=29896
      
              WebSocket runtime configuration is supported by chromium/v8 only.
      
              * WebView/WebPreferenceKeysPrivate.h:
              * WebView/WebPreferences.mm:
              (+[WebPreferences initialize]):
              * WebView/WebPreferencesPrivate.h:
              * WebView/WebView.mm:
              (-[WebView _preferencesChangedNotification:]):
      2009-10-20  Fumitoshi Ukai  <ukai@chromium.org>
      
              Reviewed by David Levin.
      
              Removed WebSocket runtime settings.
              https://bugs.webkit.org/show_bug.cgi?id=29896
      
              WebSocket runtime configuration is supported by chromium/v8 only.
      
              * Interfaces/IWebPreferencesPrivate.idl:
              * WebPreferenceKeysPrivate.h:
              * WebPreferences.cpp:
              (WebPreferences::initializeDefaultSettings):
              (WebPreferences::experimentalNotificationsEnabled):
              * WebPreferences.h:
              * WebView.cpp:
              (WebView::notifyPreferencesChanged):
      2009-10-20  Fumitoshi Ukai  <ukai@chromium.org>
      
              Reviewed by David Levin.
      
              Removed WebSocket runtime settings.
              https://bugs.webkit.org/show_bug.cgi?id=29896
      
              WebSocket runtime configuration is supported by chromium/v8 only.
      
              * DumpRenderTree/mac/DumpRenderTree.mm:
              (resetDefaultsToConsistentValues):
              * DumpRenderTree/win/DumpRenderTree.cpp:
              (resetDefaultsToConsistentValues):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64d2b36d
  10. 19 Oct, 2009 1 commit
  11. 14 Oct, 2009 1 commit
  12. 13 Oct, 2009 1 commit
    • hyatt@apple.com's avatar
      WebCore: Change the order of arguments on some of the user stylesheet/script... · 844f6fef
      hyatt@apple.com authored
      WebCore: Change the order of arguments on some of the user stylesheet/script functions.  Split the removal functions
      out into separate ones for scripts and stylesheets.
      
      Reviewed by Adam Roben.
      
      * WebCore.base.exp:
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserScriptToWorld):
      (WebCore::PageGroup::addUserStyleSheetToWorld):
      (WebCore::PageGroup::removeUserScriptFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetFromWorld):
      (WebCore::PageGroup::removeUserScriptsFromWorld):
      (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
      * page/PageGroup.h:
      (WebCore::PageGroup::userScripts):
      (WebCore::PageGroup::userStyleSheets):
      
      WebKit/mac: Change the order of arguments on some methods.  Split removal for user stylesheets and script into
      separate functions based off the type of object being removed.
      
      Reviewed by Adam Roben.
      
      * WebView/WebView.mm:
      (+[WebView _addUserScriptToGroup:worldID:source:url:whitelist:blacklist:injectionTime:]):
      (+[WebView _addUserStyleSheetToGroup:worldID:source:url:whitelist:blacklist:]):
      (+[WebView _removeUserScriptFromGroup:worldID:url:]):
      (+[WebView _removeUserStyleSheetFromGroup:worldID:url:]):
      (+[WebView _removeUserScriptsFromGroup:worldID:]):
      (+[WebView _removeUserStyleSheetsFromGroup:worldID:]):
      * WebView/WebViewPrivate.h:
      
      WebKit/win: Split removal functions for user scripts and stylehseets based on type.
      
      Reviewed by Adam Roben..
      
      * Interfaces/IWebViewPrivate.idl:
      * WebView.cpp:
      (WebView::removeUserScriptFromGroup):
      (WebView::removeUserStyleSheetFromGroup):
      * WebView.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      844f6fef
  13. 09 Oct, 2009 2 commits
    • abarth@webkit.org's avatar
      2009-10-09 Adam Barth <abarth@webkit.org> · 1c893f46
      abarth@webkit.org authored
              Reviewed by Darin Adler.
      
              Factor HistoryController out of FrameLoader
              https://bugs.webkit.org/show_bug.cgi?id=30246
      
              Update API call.
      
              * WebView.cpp:
              (WebView::loadBackForwardListFromOtherView):
      2009-10-09  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Darin Adler.
      
              Factor HistoryController out of FrameLoader
              https://bugs.webkit.org/show_bug.cgi?id=30246
      
              Update API call.
      
              * WebCoreSupport/WebFrameLoaderClient.mm:
              (WebFrameLoaderClient::restoreViewState):
              * WebView/WebView.mm:
              (-[WebView _loadBackForwardListFromOtherView:]):
      2009-10-09  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Darin Adler.
      
              Factor HistoryController out of FrameLoader
              https://bugs.webkit.org/show_bug.cgi?id=30246
      
              HistoryController is in charge of managing the current / previous /
              provisional HistoryItems.  The split isn't perfect, but it's a place to
              start.  I'll move HistoryController into its own file in another patch.
      
              * WebCore.base.exp:
              * loader/FrameLoader.cpp:
              (WebCore::HistoryController::HistoryController):
              (WebCore::HistoryController::~HistoryController):
              (WebCore::FrameLoader::FrameLoader):
              (WebCore::FrameLoader::closeURL):
              (WebCore::FrameLoader::begin):
              (WebCore::HistoryController::restoreDocumentState):
              (WebCore::HistoryController::setCurrentItem):
              (WebCore::HistoryController::setProvisionalItem):
              (WebCore::FrameLoader::loadURLIntoChildFrame):
              (WebCore::FrameLoader::canCachePageContainingThisFrame):
              (WebCore::FrameLoader::logCanCacheFrameDecision):
              (WebCore::FrameLoader::scrollToAnchor):
              (WebCore::FrameLoader::commitProvisionalLoad):
              (WebCore::FrameLoader::transitionToCommitted):
              (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
              (WebCore::FrameLoader::didFirstLayout):
              (WebCore::HistoryController::updateForFrameLoadCompleted):
              (WebCore::FrameLoader::frameLoadCompleted):
              (WebCore::FrameLoader::detachFromParent):
              (WebCore::FrameLoader::receivedMainResourceError):
              (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
              (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
              (WebCore::HistoryController::addHistoryItemForFragmentScroll):
              (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
              (WebCore::FrameLoader::shouldTreatURLAsSameAsCurrent):
              (WebCore::HistoryController::createHistoryItem):
              (WebCore::FrameLoader::checkDidPerformFirstNavigation):
              (WebCore::HistoryController::addBackForwardItemClippedAtTarget):
              (WebCore::HistoryController::createHistoryItemTree):
              (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
              (WebCore::HistoryController::restoreScrollPositionAndViewState):
              (WebCore::HistoryController::invalidateCurrentItemCachedPage):
              (WebCore::HistoryController::saveDocumentState):
              (WebCore::FrameLoader::loadItem):
              (WebCore::HistoryController::urlsMatchItem):
              (WebCore::HistoryController::goToItem):
              (WebCore::HistoryController::recursiveGoToItem):
              (WebCore::HistoryController::childFramesMatchItem):
              (WebCore::HistoryController::updateForStandardLoad):
              (WebCore::HistoryController::updateForClientRedirect):
              (WebCore::HistoryController::updateForBackForwardNavigation):
              (WebCore::HistoryController::updateForReload):
              (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
              (WebCore::HistoryController::updateForCommit):
              (WebCore::HistoryController::updateForAnchorScroll):
              (WebCore::HistoryController::saveDocumentAndScrollState):
              (WebCore::HistoryController::setCurrentItemTitle):
              (WebCore::FrameLoader::didChangeTitle):
              * loader/FrameLoader.h:
              (WebCore::HistoryController::current):
              (WebCore::HistoryController::provisional):
              (WebCore::FrameLoader::policyChecker):
              (WebCore::FrameLoader::history):
              (WebCore::FrameLoader::creatingInitialEmptyDocument):
              * page/Page.cpp:
              (WebCore::Page::goToItem):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1c893f46
    • jhoneycutt@apple.com's avatar
      Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking · 721d8ace
      jhoneycutt@apple.com authored
      for the existence of a PluginHalterDelegate.
      
      This fixes a leak of WebPluginHalterClients:
      https://bugs.webkit.org/show_bug.cgi?id=30119.
      
      WebCore:
      
      Reviewed by Dan Bernstein.
      
      * WebCore.base.exp:
      Removed the export of WebCore::Settings::setPluginHalterEnabled().
      
      * loader/EmptyClients.h:
      (WebCore::EmptyPluginHalterClient::enabled):
      
      * page/Page.cpp:
      (WebCore::Page::Page):
      Remove initialization of m_pluginHalterClient, which was removed. If a
      non-null PluginHalterClient was passed, create the PluginHalter, and
      set its allowed run time.
      
      * page/Page.h:
      Removed pluginHalterEnabledStateChanged() and m_pluginHalterClient.
      
      * page/PluginHalter.cpp:
      (WebCore::PluginHalter::didStartPlugin):
      Check whether the PluginHalterClient is enabled.
      (WebCore::PluginHalter::didStopPlugin):
      Ditto.
      
      * page/PluginHalter.h:
      Made m_client an OwnPtr.
      
      * page/PluginHalterClient.h:
      Added a function to return the enabled state.
      
      * page/Settings.cpp:
      (WebCore::Settings::Settings):
      Remove initialization of removed member.
      
      * page/Settings.h:
      Removed settings for the enabled state of the PluginHalter; we now use
      the existence of a WebPluginHalterDelegate to determine whether the
      PluginHalter is enabled.
      
      WebKit/mac:
      
      * WebCoreSupport/WebPluginHalterClient.h:
      Add declaration for new function.
      
      * WebCoreSupport/WebPluginHalterClient.mm:
      (WebPluginHalterClient::enabled):
      Check whether the UIDelegate responds to shouldHaltPlugin.
      
      * WebView/WebPreferenceKeysPrivate.h:
      Remove the "enabled" preference key.
      
      * WebView/WebPreferences.mm:
      (+[WebPreferences initialize]):
      Remove the initialization of the pref.
      
      * WebView/WebPreferencesPrivate.h:
      Remove the getter/setter for this pref.
      
      * WebView/WebView.mm:
      (-[WebView _preferencesChangedNotification:]):
      Remove propagation of the pref.
      
      WebKit/win:
      
      * Interfaces/IWebPreferencesPrivate.idl:
      Remove the getter and setter.
      
      * WebCoreSupport/WebPluginHalterClient.cpp:
      (WebPluginHalterClient::enabled):
      Return true if the delegate exists.
      
      * WebCoreSupport/WebPluginHalterClient.h:
      Declare implementation of enabled().
      
      * WebPreferenceKeysPrivate.h:
      Removed the pref key.
      
      * WebPreferences.cpp:
      (WebPreferences::initializeDefaultSettings):
      Removed initialization of the pref.
      
      * WebPreferences.h:
      Removed declaration of the getter/setter.
      
      * WebView.cpp:
      (WebView::notifyPreferencesChanged):
      Don't propagate the pref.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49385 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      721d8ace
  14. 08 Oct, 2009 1 commit
    • abarth@webkit.org's avatar
      2009-10-08 Adam Barth <abarth@webkit.org> · fc80bad9
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              Update API call.
      
              * Api/qwebframe.cpp:
              (QWebFrame::evaluateJavaScript):
      2009-10-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              Update API call.
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_execute_script):
      2009-10-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              Update API call.
      
              * WebView.cpp:
              (WebView::stringByEvaluatingJavaScriptFromString):
      2009-10-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              Update API call.
      
              * WebFrame.cpp:
              (wxWebFrame::RunScript):
      2009-10-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              Update API call.
      
              * WebView/WebFrame.mm:
              (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
              * WebView/WebView.mm:
              (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
      2009-10-08  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move executeScript from FrameLoader to ScriptController
              https://bugs.webkit.org/show_bug.cgi?id=30200
      
              These methods have virtually no interaction with FrameLoader.  They
              really seem like they ought to belong to ScriptController.
      
              * WebCore.base.exp:
              * bindings/js/ScheduledAction.cpp:
              (WebCore::ScheduledAction::execute):
              * bindings/js/ScriptController.cpp:
              (WebCore::ScriptController::ScriptController):
              (WebCore::ScriptController::executeScript):
              (WebCore::ScriptController::executeIfJavaScriptURL):
              (WebCore::ScriptController::evaluate):
              * bindings/js/ScriptController.h:
              * bindings/v8/ScriptController.cpp:
              (WebCore::ScriptController::ScriptController):
              (WebCore::ScriptController::executeScript):
              (WebCore::ScriptController::executeIfJavaScriptURL):
              * bindings/v8/ScriptController.h:
              * dom/XMLTokenizer.cpp:
              (WebCore::XMLTokenizer::notifyFinished):
              * dom/XMLTokenizerLibxml2.cpp:
              (WebCore::XMLTokenizer::endElementNs):
              * dom/XMLTokenizerQt.cpp:
              (WebCore::XMLTokenizer::parseEndElement):
              * html/HTMLTokenizer.cpp:
              (WebCore::HTMLTokenizer::scriptExecution):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::changeLocation):
              (WebCore::FrameLoader::urlSelected):
              (WebCore::FrameLoader::requestFrame):
              (WebCore::FrameLoader::submitForm):
              (WebCore::FrameLoader::replaceDocument):
              * loader/FrameLoader.h:
              * plugins/PluginView.cpp:
              (WebCore::PluginView::performRequest):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49372 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc80bad9
  15. 06 Oct, 2009 2 commits
    • eric@webkit.org's avatar
      2009-10-06 Adam Barth <abarth@webkit.org> · 98d2161b
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              Move FrameLoader::canLoad to SecurityOrigin
              https://bugs.webkit.org/show_bug.cgi?id=30111
      
              * WebCore.base.exp:
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::isSafeToLoadURL):
              * loader/Cache.cpp:
              (WebCore::Cache::requestResource):
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::loadSubframe):
              (WebCore::FrameLoader::loadPlugin):
              (WebCore::FrameLoader::loadFrameRequest):
              (WebCore::FrameLoader::loadResourceSynchronously):
              (WebCore::FrameLoader::createJavaAppletWidget):
              * loader/FrameLoader.h:
              * loader/SubresourceLoader.cpp:
              (WebCore::SubresourceLoader::create):
              * page/SecurityOrigin.cpp:
              (WebCore::SecurityOrigin::canLoad):
              (WebCore::SecurityOrigin::shouldHideReferrer):
              * page/SecurityOrigin.h:
      2009-10-06  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move FrameLoader::canLoad to SecurityOrigin
              https://bugs.webkit.org/show_bug.cgi?id=30111
      
              * Plugins/Hosted/HostedNetscapePluginStream.mm:
              (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
              * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
              (WebKit::NetscapePluginInstanceProxy::loadRequest):
              * Plugins/WebBaseNetscapePluginStream.mm:
              (WebNetscapePluginStream::WebNetscapePluginStream):
              * Plugins/WebNetscapePluginView.mm:
              (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
              * Plugins/WebPluginContainerCheck.mm:
              (-[WebPluginContainerCheck _isForbiddenFileLoad]):
              * WebView/WebFrame.mm:
              (-[WebFrame _allowsFollowingLink:]):
      2009-10-06  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move FrameLoader::canLoad to SecurityOrigin
              https://bugs.webkit.org/show_bug.cgi?id=30111
      
              * WebFrame.cpp:
              (WebFrame::allowsFollowingLink):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      98d2161b
    • eric@webkit.org's avatar
      2009-10-06 Adam Barth <abarth@webkit.org> · 48bae877
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              Move setLocalLoadPolicy and friends to SecurityOrigin
              https://bugs.webkit.org/show_bug.cgi?id=30110
      
              These have more to do with security policies than with loading frames.
      
              * WebCore.base.exp:
              * dom/Document.cpp:
              (WebCore::Document::initSecurityContext):
              * loader/Cache.cpp:
              (WebCore::Cache::requestResource):
              * loader/FrameLoader.cpp:
              * loader/FrameLoader.h:
              * loader/SubresourceLoader.cpp:
              (WebCore::SubresourceLoader::create):
              * page/SecurityOrigin.cpp:
              (WebCore::SecurityOrigin::setLocalLoadPolicy):
              (WebCore::SecurityOrigin::restrictAccessToLocal):
              (WebCore::SecurityOrigin::allowSubstituteDataAccessToLocal):
              * page/SecurityOrigin.h:
              (WebCore::SecurityOrigin::):
      2009-10-06  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move setLocalLoadPolicy and friends to SecurityOrigin
              https://bugs.webkit.org/show_bug.cgi?id=30110
      
              Call the new API.
      
              * WebView/WebView.mm:
              (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
      2009-10-06  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Move setLocalLoadPolicy and friends to SecurityOrigin
              https://bugs.webkit.org/show_bug.cgi?id=30110
      
              Call the new API.
      
              * Api/qwebpage.cpp:
              (QWebPagePrivate::QWebPagePrivate):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      48bae877
  16. 05 Oct, 2009 4 commits
  17. 02 Oct, 2009 1 commit
    • hyatt@apple.com's avatar
      Add support for blacklist patterns to user stylesheets and scripts in addition... · 19fd5912
      hyatt@apple.com authored
      Add support for blacklist patterns to user stylesheets and scripts in addition to whitelist patterns.
      
      Reviewed by Adam Roben.
      
      WebCore: 
      
      * WebCore.base.exp:
      * dom/Document.cpp:
      (WebCore::Document::pageGroupUserSheets):
      * page/Frame.cpp:
      (WebCore::Frame::injectUserScriptsForWorld):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserScript):
      (WebCore::PageGroup::addUserStyleSheet):
      (WebCore::PageGroup::removeUserContentWithURLForWorld):
      (WebCore::PageGroup::removeUserContentForWorld):
      * page/PageGroup.h:
      * page/UserContentURLPattern.cpp:
      (WebCore::UserContentURLPattern::matchesPatterns):
      * page/UserContentURLPattern.h:
      * page/UserScript.h:
      (WebCore::UserScript::UserScript):
      (WebCore::UserScript::whitelist):
      (WebCore::UserScript::blacklist):
      * page/UserStyleSheet.h:
      (WebCore::UserStyleSheet::UserStyleSheet):
      (WebCore::UserStyleSheet::whitelist):
      (WebCore::UserStyleSheet::blacklist):
      
      WebKit/mac: 
      
      * WebView/WebView.mm:
      (toStringVector):
      (+[WebView _addUserScriptToGroup:source:url:worldID:whitelist:blacklist:injectionTime:]):
      (+[WebView _addUserStyleSheetToGroup:source:url:worldID:whitelist:blacklist:]):
      * WebView/WebViewPrivate.h:
      
      WebKit/win: 
      
      * Interfaces/IWebViewPrivate.idl:
      * WebView.cpp:
      (toStringVector):
      (WebView::addUserScriptToGroup):
      (WebView::addUserStyleSheetToGroup):
      * WebView.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19fd5912
  18. 01 Oct, 2009 1 commit
  19. 30 Sep, 2009 1 commit
  20. 29 Sep, 2009 2 commits
    • dglazkov@chromium.org's avatar
      WebCore: · 5063cff9
      dglazkov@chromium.org authored
      2009-09-29  Kenneth Russell  <kbr@google.com>
      
              Reviewed by Dimitri Glazkov.
      
              Add support for run-time flag for 3D canvas
              https://bugs.webkit.org/show_bug.cgi?id=29826
      
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::getContext): Check page settings for
              experimental WebGL flag before returning 3D graphics context.
              * page/Settings.cpp:
              (WebCore::Settings::Settings): Initialize new flag to false.
              (WebCore::Settings::setExperimentalWebGLEnabled):
              * page/Settings.h: Set new flag.
              (WebCore::Settings::experimentalWebGLEnabled): Return new flag.
      
      WebKit/mac:
      
      2009-09-29  Kenneth Russell  <kbr@google.com>
      
              Reviewed by Dimitri Glazkov.
      
              Add support for run-time flag for 3D canvas
              https://bugs.webkit.org/show_bug.cgi?id=29826
      
              * WebView/WebView.mm:
              (-[WebView _preferencesChangedNotification:]): Enable experimental
              WebGL flag when 3D_CANVAS is enabled in the build.
      
      WebKit/win:
      
      2009-09-29  Kenneth Russell  <kbr@google.com>
      
              Reviewed by Dimitri Glazkov.
      
              Add support for run-time flag for 3D canvas
              https://bugs.webkit.org/show_bug.cgi?id=29826
      
              * WebView.cpp:
              (WebView::notifyPreferencesChanged): Enable experimental WebGL
              flag when 3D_CANVAS is enabled in the build.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5063cff9
    • ukai@chromium.org's avatar
      2009-09-28 Fumitoshi Ukai <ukai@chromium.org> · bf4fada3
      ukai@chromium.org authored
              Reviewed by Eric Seidel.
      
              Add experimentalWebSocketsEnabled in Settings.
              https://bugs.webkit.org/show_bug.cgi?id=28941
      
              * WebCore.base.exp:
              * bindings/js/JSDOMWindowCustom.cpp:
              (WebCore::JSDOMWindow::webSocket):
              * bindings/v8/V8DOMWrapper.cpp:
              (WebCore::V8DOMWrapper::getConstructor):
              * bindings/v8/custom/V8WebSocketCustom.cpp:
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              (WebCore::Settings::setExperimentalWebSocketsEnabled):
              * page/Settings.h:
              (WebCore::Settings::experimentalWebSocketsEnabled):
      
      2009-09-28  Fumitoshi Ukai  <ukai@chromium.org>
      
              Reviewed by Eric Seidel.
      
              Add experimentalWebSocketsEnabled in WebPreferences.
              https://bugs.webkit.org/show_bug.cgi?id=28941
      
              * WebView/WebPreferenceKeysPrivate.h:
              * WebView/WebPreferences.mm:
              (+[WebPreferences initialize]):
              (-[WebPreferences experimentalWebSocketsEnabled]):
              (-[WebPreferences setExperimentalWebSocketsEnabled:]):
              * WebView/WebPreferencesPrivate.h:
              * WebView/WebView.mm:
              (-[WebView _preferencesChangedNotification:]):
      
      2009-09-28  Fumitoshi Ukai  <ukai@chromium.org>
      
              Reviewed by Eric Seidel.
      
              Add experimentalWebSocketsEnabled in WebPreferences.
              https://bugs.webkit.org/show_bug.cgi?id=28941
      
              * Interfaces/IWebPreferencesPrivate.idl:
              * WebPreferenceKeysPrivate.h:
              * WebPreferences.cpp:
              (WebPreferences::initializeDefaultSettings):
              (WebPreferences::setExperimentalWebSocketsEnabled):
              (WebPreferences::experimentalWebSocketsEnabled):
              * WebPreferences.h:
              * WebView.cpp:
              (WebView::notifyPreferencesChanged):
              (core):
      
      2009-09-28  Fumitoshi Ukai  <ukai@chromium.org>
      
              Reviewed by Eric Seidel.
      
              Add experimentalWebSocketsEnabled in WebPreferences.
              https://bugs.webkit.org/show_bug.cgi?id=28941
      
              * DumpRenderTree/mac/DumpRenderTree.mm:
              (resetDefaultsToConsistentValues):
              * DumpRenderTree/win/DumpRenderTree.cpp:
              (resetDefaultsToConsistentValues):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bf4fada3
  21. 25 Sep, 2009 1 commit
    • jhoneycutt@apple.com's avatar
      Add a mechanism for automatically halting plug-ins. · 45f50cee
      jhoneycutt@apple.com authored
      Reviewed by Oliver Hunt and Alice Liu.
      
      WebCore:
      
      * GNUmakefile.am:
      
      * WebCore.base.exp:
      Update export of Page constructor.
      
      * WebCore.gypi:
      
      * WebCore.pro:
      
      * WebCore.vcproj/WebCore.vcproj:
      Add PluginHalter.{h,cpp}, PluginHalterClient.h, and
      HaltablePlugin.h.
      
      * WebCore.xcodeproj/project.pbxproj:
      Add files to Mac project.
      
      * loader/EmptyClients.h:
      Added an empty PluginHalterClient.
      (WebCore::EmptyPluginHalterClient::shouldHaltPlugin):
      Return false.
      
      * page/PluginHalter.cpp: Added.
      (WebCore::PluginHalter::PluginHalter):
      (WebCore::PluginHalter::didStartPlugin):
      Add the object to the plug-in set. If this is the only item in the set,
      set m_oldestStartTime to this object's time, and start the timer.
      (WebCore::PluginHalter::didStopPlugin):
      Remove the plug-in from the set.
      (WebCore::PluginHalter::timerFired):
      Find the cut-off time as the current time minus the allowed run time;
      plug-ins older than this may be halted. Iterate over the plug-ins. Find
      the object with the oldest start time that is too young to be halted;
      we'll use its start time to set the timer's next fire time. For all
      plug-ins that are candidates to be halted, call the
      PluginHalterClient's shouldHaltPlugin(). If this function returns true,
      call the plug-in's halt() function. Remove these objects from the set
      of tracked plug-ins. Call startTimerIfNecessary() to restart the timer.
      (WebCore::PluginHalter::startTimerIfNecessary):
      If the timer is set to fire, or the set of tracked plug-ins is empty,
      return early. Set the timer to fire after the oldest plug-in has run
      for the allowed run time.
      
      * page/PluginHalter.h: Added.
      (WebCore::PluginHalter::setPluginAllowedRunTime):
      
      * page/PluginHalterClient.h: Added.
      (WebCore::PluginHalterClient::~PluginHalterClient)
      
      * page/Page.cpp:
      (WebCore::Page::Page):
      Initialize m_pluginHalterClient. Call pluginHalterEnabledStateChanged()
      to create the PluginHalter if necessary.
      (WebCore::Page::pluginHalterEnabledStateChanged):
      If plug-in halting is enabled, create the PluginHalter. If it is
      disabled, clear it.
      (WebCore::Page::pluginAllowedRunTimeChanged):
      If there is a plug-in halter, call its setPluginAllowedRunTime().
      (WebCore::Page::didStartPlugin):
      If there is a plug-in halter, call its didStartPlugin().
      (WebCore::Page::didStopPlugin):
      If there is a plug-in halter, call its didStopPlugin().
      
      * page/Page.h:
      Add a parameter to the Page constructor for the PluginHalterClient.
      Added declarations for didStartPlugin() and didStopPlugin(), which are
      called when HaltablePlugins are added to or removed from the page. Adds
      pluginAllowedRunTimeChanged() and pluginHalterEnabledStateChanged() to
      notify the Page when these settings are changed. Added members to hold
      the PluginHalter and the PluginHalterClient.
      
      * page/Settings.cpp:
      (WebCore::Settings::Settings):
      (WebCore::Settings::setPluginHalterEnabled):
      If the enabled state has changed, call the Page's
      pluginHalterEnabledStateChanged().
      (WebCore::Settings::setPluginAllowedRunTime):
      Call the Page's pluginAllowedRunTimeChanged().
      
      * page/Settings.h:
      (WebCore::Settings::pluginHalterEnabled):
      (WebCore::Settings::pluginAllowedRunTime):
      
      * page/HaltablePlugin.h: Added. Defines an interface for plug-ins that
      can be automatically halted.
      (WebCore::HaltablePlugin::~HaltablePlugin)
      
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::dataChanged):
      Pass a dummy PluginHalterClient.
      
      WebKit/gtk/:
      
      * webkit/webkitwebview.cpp:
      (webkit_web_view_init):
      Pass 0 for new Page constructor argument.
      
      WebKit/mac/:
      
      * WebView/WebView.mm:
      (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
      Pass 0 for new Page constructor argument.
      
      WebKit/qt/:
      
      * Api/qwebpage.cpp:
      (QWebPagePrivate::QWebPagePrivate):
      Pass 0 for new Page constructor argument.
      
      WebKit/win:
      
      * Interfaces/IWebPluginHalterDelegate.idl: Added. Defines an interface
      for a delegate that determines whether plug-ins should be halted.
      
      * Interfaces/IWebPreferencesPrivate.idl:
      Declare functions to get and set the enabled state of the plug-in
      halter and the plug-in allowed run time.
      
      * Interfaces/IWebViewPrivate.idl:
      Declare functions to get and set the IWebPluginHalterDelegate.
      
      * Interfaces/WebKit.idl:
      
      * WebCoreSupport/WebPluginHalterClient.cpp: Added.
      (WebPluginHalterClient::WebPluginHalterClient):
      (WebPluginHalterClient::shouldHaltPlugin):
      Get the IWebPluginHalterDelegate for the WebView. Create a WebKit
      DOMNode for the WebCore Node. Call the delegate's shouldHaltPlugin().
      If the call fails, return false. Otherwise, return the result of the
      call.
      
      * WebCoreSupport/WebPluginHalterClient.h: Added.
      
      * WebKit.vcproj/Interfaces.vcproj:
      Add IWebPluginHalterDelegate.idl.
      
      * WebKit.vcproj/WebKit.vcproj:
      Add WebPluginHalterClient.{h,cpp}.
      
      * WebPreferenceKeysPrivate.h:
      Define WebKitPluginHalterEnabledPreferenceKey and
      WebKitPluginAllowedRunTimePreferenceKey.
      
      * WebPreferences.cpp:
      (WebPreferences::initializeDefaultSettings):
      Leave plug-in halting disabled by default. Set the default value for
      the plug-in allowed run time to the max value of an unsigned int.
      (WebPreferences::setPluginHalterEnabled):
      (WebPreferences::pluginHalterEnabled):
      (WebPreferences::setPluginAllowedRunTime):
      (WebPreferences::pluginAllowedRunTime):
      
      * WebPreferences.h:
      
      * WebView.cpp:
      (WebView::close):
      Clear the IWebPluginHalterDelegate.
      (WebView::initWithFrame):
      Pass a WebPluginHalterClient when creating the Page.
      (WebView::notifyPreferencesChanged):
      Set the new settings when the preferences changed notification is
      received.
      (WebView::setPluginHalterDelegate):
      (WebView::pluginHalterDelegate):
      
      * WebView.h:
      Declare overrides of setPluginHalterDelegate() and
      pluginHalterDelegate(). Added a member to track the
      IWebPluginHalterDelegate.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      45f50cee
  22. 24 Sep, 2009 1 commit
    • atwilson@chromium.org's avatar
      WebCore: isEnabled switch for notifications (experimental) in Page Settings · 046e502c
      atwilson@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=28930
      
      Patch by John Gregg <johnnyg@google.com> on 2009-09-14
      Reviewed by Eric Seidel.
      
      Adds a run-time flag in Settings object that controls whether
      to expose desktop notifications.
      
      No new test, but test code also modified to set this preference.
      
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::webkitNotifications): check preference before returning notifications object
      * page/Settings.cpp:
      (WebCore::Settings::Settings):
      (WebCore::Settings::setExperimentalNotificationsEnabled):
      * page/Settings.h:
      (WebCore::Settings::experimentalNotificationsEnabled):
      
      WebKit/mac: isEnabled switch for notifications (experimental) in Page Settings
      https://bugs.webkit.org/show_bug.cgi?id=28930
      
      Patch by John Gregg <johnnyg@google.com> on 2009-09-14
      Reviewed by Eric Seidel.
      
      Adds support for the experimentalNotificationsEnabled flag in Settings
      through WebPreferencesPrivate.
      
      * WebView/WebPreferenceKeysPrivate.h:
      * WebView/WebPreferences.mm:
      (+[WebPreferences initialize]):
      (-[WebPreferences experimentalNotificationsEnabled]):
      (-[WebPreferences setExperimentalNotificationsEnabled:]):
      * WebView/WebPreferencesPrivate.h:
      * WebView/WebView.mm:
      (-[WebView _preferencesChangedNotification:]):
      
      WebKit/win: Enable switch for notifications (experimental) in Page Settings
      https://bugs.webkit.org/show_bug.cgi?id=28930
      
      Patch by John Gregg <johnnyg@google.com> on 2009-09-14
      Reviewed by Eric Seidel.
      
      Adds support for the experimentalNotificationsEnabled flag in Settings through
      WebPreferencesPrivate interface.  Also cleans up some issues accessing the
      notification delegate through DumpRenderTree.
      
      * Interfaces/IWebPreferencesPrivate.idl:
      * WebCoreSupport/WebDesktopNotificationsDelegate.cpp:
      (WebDesktopNotificationsDelegate::hasNotificationDelegate):
      (WebDesktopNotificationsDelegate::notificationDelegate):
      * WebPreferenceKeysPrivate.h:
      * WebPreferences.cpp:
      (WebPreferences::initializeDefaultSettings):
      (WebPreferences::setExperimentalNotificationsEnabled):
      (WebPreferences::experimentalNotificationsEnabled):
      * WebPreferences.h:
      * WebView.cpp:
      (WebView::notifyPreferencesChanged):
      
      WebKitTools: Enable switch for notifications (experimental) in Page Settings
      https://bugs.webkit.org/show_bug.cgi?id=28930
      
      Patch by John Gregg <johnnyg@google.com> on 2009-09-14
      Reviewed by Eric Seidel.
      
      Now that desktop notifications are controlled by run-time switch,
      set that switch to true for DumpRenderTree.
      
      * DumpRenderTree/mac/DumpRenderTree.mm:
      (resetDefaultsToConsistentValues):
      * DumpRenderTree/win/DumpRenderTree.cpp:
      (resetDefaultsToConsistentValues):
      * DumpRenderTree/win/UIDelegate.cpp:
      (UIDelegate::QueryInterface):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      046e502c
  23. 23 Sep, 2009 1 commit
    • ggaren@apple.com's avatar
      JavaScriptCore: Added the ability to swap vectors with inline capacities, so you can · 521f64b8
      ggaren@apple.com authored
      store a vector with inline capacity in a hash table.
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      * wtf/Vector.h:
      (WTF::swap):
      (WTF::VectorBuffer::swap):
      
      WebCore: Bring a little sanity to this crazy EventTarget world of ours
      https://bugs.webkit.org/show_bug.cgi?id=29701
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      Lots of EventTarget refactoring to achieve a single shared implementation
      that fixes some of the performance and correctness bugs of the many individual
      implementations, and makes reasoning about EventTargets and EventListeners
      much easier.
              
      The basic design is this:
          - EventTarget manages a set of EventListeners.
          - onXXX EventListener attributes forward to standard EventTarget APIs.
          - Since the onXXX code is repetitive, it is usually done with macros
            of the form DEFINE_ATTRIBUTE_EVENT_LISTENER(attributeName).
          - EventTarget provides a shared implementation of dispatchEvent,
            which subclasses with special event dispatch rules, like Node, override.
          - To support Node, which lazily instantiates its EventTarget data,
            EventTarget has no data members, and instead makes a virtual call
            to get its data from wherever its subclass chose to store it.
                    
      Code that used to call dispatchEvent, passing an ExceptionCode paratmeter,
      even though no exception could be thrown, has been changed not to do so,
      to improve clarity and performance.
              
      Code that used to call a special dispatchXXXEvent function, which just
      turned around and called dispatchEvent, has been changed to call
      dispatchEvent, to improve clarity and performance.
      
      * WebCore.base.exp:
      * WebCore.xcodeproj/project.pbxproj: Another day in the life of a WebKit
      engineer.
      
      * bindings/js/JSDOMBinding.cpp:
      (WebCore::isObservableThroughDOM): Updated for Node API change. Added
      "is not in the document but is firing event listeners" as a condition
      that makes a Node observable in the DOM, so that event listeners firing
      on removed nodes are not destroyed midstream. (This was a long-standing
      bug that was somewhat hidden by the old implementation's habit of
      copying the RegisteredEventListener vector before firing events, which
      would keep almost all the relevant objects from being destroyed.)
      
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent): Removed the isWindowEvent flag
      because it was one of the most elaborately planned no-ops in the history
      of software crime, and one of the reasons clients thought they needed more
      than one dispatchEvent function even though they didn't.
      * bindings/js/JSEventListener.h:
      
      * bindings/js/JSDOMWindowCustom.cpp:
      (WebCore::JSDOMWindow::markChildren):
      (WebCore::JSMessagePort::markChildren):
      * bindings/js/JSNodeCustom.cpp:
      (WebCore::JSNode::markChildren):
      * bindings/js/JSAbstractWorkerCustom.cpp:
      * bindings/js/JSDOMApplicationCacheCustom.cpp:
      * bindings/js/JSDedicatedWorkerContextCustom.cpp:
      * bindings/js/JSEventSourceCustom.cpp:
      * bindings/js/JSMessagePortCustom.cpp:
      * bindings/js/JSSharedWorkerContextCustom.cpp: Removed.
      * bindings/js/JSWebSocketCustom.cpp:
      * bindings/js/JSWorkerContextCustom.cpp:
      (WebCore::JSWorkerContext::markChildren):
      * bindings/js/JSWorkerCustom.cpp:
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::markChildren):
      * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
      (WebCore::JSXMLHttpRequestUpload::markChildren): EventListener marking is
      now autogenerated. Classes that still have custom mark functions for other
      reasons now call a shared EventTarget API to mark their EventListeners.
      
      * bindings/objc/ObjCEventListener.h:
      * bindings/objc/ObjCEventListener.mm:
      (WebCore::ObjCEventListener::handleEvent): Bye bye isWindowEvent.
      
      * bindings/scripts/CodeGeneratorJS.pm: Autogeneration support for
      marking and invalidating event listeners.
      
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::dispatchModifiedEvent):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::insertBefore):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::willRemoveChild):
      (WebCore::ContainerNode::appendChild):
      (WebCore::dispatchChildInsertionEvents):
      (WebCore::dispatchChildRemovalEvents):
      * dom/Document.cpp:
      (WebCore::Document::removeAllEventListeners):
      (WebCore::Document::implicitClose):
      (WebCore::Document::setFocusedNode):
      (WebCore::Document::dispatchWindowEvent):
      (WebCore::Document::dispatchWindowLoadEvent):
      (WebCore::Document::finishedParsing):
      * dom/Document.h: Use dispatchEvent directly.
      
      * dom/Element.h: Moved a few event listener attributes down from Node,
      since they don't apply to all Nodes, only Elements.
      
      * dom/EventListener.h: Removed isWindowEvent parameter.
      
      * dom/EventNames.h: Added the "display" event name, so it works correctly
      with attribute macros, and for performance.
      
      * dom/EventTarget.cpp:
      (WebCore::forbidEventDispatch):
      (WebCore::allowEventDispatch):
      (WebCore::eventDispatchForbidden): Made this code (embarrasingly) thread
      safe, since it's now called on multiple threads. (Currently, we only forbid
      event dispatch on the main thread. If we ever want to forbid event dispatch
      on secondary threads, we can improve it then.)
      
      (WebCore::EventTarget::addEventListener):
      (WebCore::EventTarget::removeEventListener):
      (WebCore::EventTarget::setAttributeEventListener):
      (WebCore::EventTarget::getAttributeEventListener):
      (WebCore::EventTarget::clearAttributeEventListener):
      (WebCore::EventTarget::dispatchEvent):
      (WebCore::EventTarget::fireEventListeners):
      (WebCore::EventTarget::getEventListeners):
      (WebCore::EventTarget::removeAllEventListeners):
      * dom/EventTarget.h:
      (WebCore::FiringEventEndIterator::FiringEventEndIterator):
      (WebCore::EventTarget::ref):
      (WebCore::EventTarget::deref):
      (WebCore::EventTarget::markEventListeners):
      (WebCore::EventTarget::invalidateEventListeners):
      (WebCore::EventTarget::isFiringEventListeners):
      (WebCore::EventTarget::hasEventListeners): The ONE TRUE IMPLEMENTATION of
      EventTarget APIs, crafted from an amalgam of all the different versions
      we used to have. The most significant change here is that we no longer
      make a copy of an EventListener vector before firing the events in the
      vector -- instead, we use a reference to the original vector, along with
      a notification mechanism for the unlikely case when an EventListener is
      removed from the vector. This substantially reduces malloc, copying, and
      refcount overhead, and complexity.
      
      * dom/InputElement.cpp:
      (WebCore::InputElement::setValueFromRenderer):
      * dom/MessageEvent.h:
      (WebCore::MessageEvent::create): Use dispatchEvent directly.
      
      * dom/MessagePort.cpp:
      (WebCore::MessagePort::dispatchMessages):
      (WebCore::MessagePort::eventTargetData):
      (WebCore::MessagePort::ensureEventTargetData):
      * dom/MessagePort.h:
      (WebCore::MessagePort::setOnmessage):
      (WebCore::MessagePort::onmessage):
      * dom/MessagePort.idl: Removed custom EventTarget implementation.
      
      * dom/MutationEvent.h:
      (WebCore::MutationEvent::create): Added some default values so callers
      can construct MutationEvents more easily, without calling a custom dispatch
      function.
      
      * dom/Node.cpp:
      (WebCore::Node::addEventListener):
      (WebCore::Node::removeEventListener):
      (WebCore::Node::eventTargetData):
      (WebCore::Node::ensureEventTargetData):
      (WebCore::Node::handleLocalEvents):
      (WebCore::Node::dispatchEvent):
      (WebCore::Node::dispatchGenericEvent):
      (WebCore::Node::dispatchSubtreeModifiedEvent):
      (WebCore::Node::dispatchUIEvent):
      (WebCore::Node::dispatchKeyEvent):
      (WebCore::Node::dispatchMouseEvent):
      (WebCore::Node::dispatchWheelEvent):
      (WebCore::Node::dispatchFocusEvent):
      (WebCore::Node::dispatchBlurEvent):
      * dom/Node.h:
      (WebCore::Node::preDispatchEventHandler):
      (WebCore::Node::postDispatchEventHandler):
      * dom/Node.idl:
      * dom/NodeRareData.h:
      (WebCore::NodeRareData::eventTargetData):
      (WebCore::NodeRareData::ensureEventTargetData): Use the shared EventTarget
      interface, and call dispatchEvent directly instead of custom dispatchXXXEvent
      functions that just forwarded to dispatchEvent.
      
      * dom/RegisteredEventListener.cpp:
      * dom/RegisteredEventListener.h:
      (WebCore::RegisteredEventListener::RegisteredEventListener):
      (WebCore::operator==): This is just a simple struct now, since we no longer
      do a complicated copy / refCount / isRemoved dance just to honor the rule
      that an EventListener can be removed during event dispatch.
      
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::restore): Removed another custom dispatchEvent.
      
      * html/HTMLBodyElement.cpp:
      * html/HTMLBodyElement.h: Use the shared EventTarget API.
      
      * html/HTMLFormControlElement.cpp:
      (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
      (WebCore::HTMLFormControlElement::checkValidity):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::handleLocalEvents):
      (WebCore::HTMLFormElement::prepareSubmit):
      (WebCore::HTMLFormElement::reset):
      * html/HTMLFormElement.h: Use the standard dispatchEvent API.
      
      * html/HTMLFrameSetElement.cpp:
      * html/HTMLFrameSetElement.h: Use the shared EventTarget API.
      
      * html/HTMLImageLoader.cpp:
      (WebCore::HTMLImageLoader::dispatchLoadEvent):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::onSearch):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::loadInternal):
      * html/HTMLScriptElement.cpp:
      (WebCore::HTMLScriptElement::dispatchLoadEvent):
      (WebCore::HTMLScriptElement::dispatchErrorEvent):
      * html/HTMLSourceElement.cpp:
      (WebCore::HTMLSourceElement::errorEventTimerFired):
      * html/HTMLTokenizer.cpp:
      (WebCore::HTMLTokenizer::notifyFinished): Use the standard dispatchEvent API.
      
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::handleEvent):
      * inspector/InspectorDOMAgent.h:
      * inspector/InspectorDOMStorageResource.cpp:
      (WebCore::InspectorDOMStorageResource::handleEvent):
      * inspector/InspectorDOMStorageResource.h:
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::stopLoading):
      (WebCore::FrameLoader::canCachePageContainingThisFrame):
      (WebCore::FrameLoader::logCanCacheFrameDecision):
      (WebCore::HashChangeEventTask::performTask):
      (WebCore::FrameLoader::pageHidden): No more isWindowEvent.
      
      * loader/ImageDocument.cpp:
      (WebCore::ImageEventListener::handleEvent):
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::CallCacheListenerTask::performTask):
      * loader/appcache/ApplicationCacheHost.cpp:
      (WebCore::ApplicationCacheHost::notifyDOMApplicationCache):
      * loader/appcache/ApplicationCacheHost.h:
      * loader/appcache/DOMApplicationCache.cpp:
      (WebCore::DOMApplicationCache::eventTargetData):
      (WebCore::DOMApplicationCache::ensureEventTargetData):
      * loader/appcache/DOMApplicationCache.h:
      * loader/appcache/DOMApplicationCache.idl: Switched to the standard
      EventTarget API. As a part of this, I switched this class from using a
      custom internal event name enumeration to using the standard EventNames.
      
      * notifications/Notification.cpp:
      (WebCore::Notification::eventTargetData):
      (WebCore::Notification::ensureEventTargetData):
      * notifications/Notification.h:
      (WebCore::Notification::scriptExecutionContext):
      * notifications/Notification.idl: Switched to the standard EventTarget API.
      
      * page/DOMWindow.cpp:
      (WebCore::PostMessageTimer::event):
      (WebCore::windowsWithUnloadEventListeners):
      (WebCore::windowsWithBeforeUnloadEventListeners):
      (WebCore::allowsBeforeUnloadListeners):
      (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
      (WebCore::DOMWindow::pendingUnloadEventListeners):
      (WebCore::DOMWindow::dispatchAllPendingUnloadEvents): Changed the "pending"
      unload / beforeunload listener tracker just to track which windows had
      such listeners, instead of actually keeping a copy of the listeners. Now,
      this code can use the standard EventTarget API.
      
      (WebCore::DOMWindow::~DOMWindow):
      (WebCore::DOMWindow::postMessageTimerFired):
      (WebCore::DOMWindow::addEventListener):
      (WebCore::DOMWindow::removeEventListener):
      (WebCore::DOMWindow::dispatchLoadEvent):
      (WebCore::DOMWindow::dispatchEvent):
      (WebCore::DOMWindow::removeAllEventListeners):
      (WebCore::DOMWindow::captureEvents):
      (WebCore::DOMWindow::releaseEvents):
      (WebCore::DOMWindow::eventTargetData):
      (WebCore::DOMWindow::ensureEventTargetData):
      * page/DOMWindow.h:
      * page/DOMWindow.idl: Use the standard EventTarget APIs.
      
      * page/EventHandler.cpp:
      (WebCore::EventHandler::canMouseDownStartSelect):
      (WebCore::EventHandler::canMouseDragExtendSelect):
      (WebCore::EventHandler::sendResizeEvent):
      (WebCore::EventHandler::sendScrollEvent): Use dispatchEvent directly.
      
      * page/EventSource.cpp:
      (WebCore::EventSource::endRequest):
      (WebCore::EventSource::didReceiveResponse):
      (WebCore::EventSource::parseEventStreamLine):
      (WebCore::EventSource::stop):
      (WebCore::EventSource::createMessageEvent):
      (WebCore::EventSource::eventTargetData):
      (WebCore::EventSource::ensureEventTargetData):
      * page/EventSource.h:
      * page/EventSource.idl: Use the standard EventTarget APIs.
      
      * page/FocusController.cpp:
      (WebCore::dispatchEventsOnWindowAndFocusedNode):
      (WebCore::FocusController::setFocusedFrame):
      * page/Frame.cpp:
      (WebCore::Frame::shouldClose):
      * page/Frame.h:
      * page/Page.cpp:
      (WebCore::networkStateChanged):
      * page/animation/AnimationController.cpp:
      (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::valueChanged):
      * rendering/RenderTextControl.cpp:
      (WebCore::RenderTextControl::selectionChanged):
      * rendering/RenderTextControlMultiLine.cpp:
      (WebCore::RenderTextControlMultiLine::subtreeHasChanged): Use dispatchEvent.
      
      * svg/SVGElement.cpp:
      (WebCore::hasLoadListener): Rewritten for new EventTarget API.
      
      * svg/SVGElementInstance.cpp:
      (WebCore::dummyEventTargetData):
      (WebCore::SVGElementInstance::addEventListener):
      (WebCore::SVGElementInstance::removeEventListener):
      (WebCore::SVGElementInstance::removeAllEventListeners):
      (WebCore::SVGElementInstance::dispatchEvent):
      (WebCore::SVGElementInstance::eventTargetData):
      (WebCore::SVGElementInstance::ensureEventTargetData): Use the EventTarget API.
      
      * svg/SVGElementInstance.h:
      * svg/SVGImageLoader.cpp:
      (WebCore::SVGImageLoader::dispatchLoadEvent):
      * svg/SVGScriptElement.cpp:
      (WebCore::SVGScriptElement::dispatchErrorEvent): Use dispatchEvent directly.
      
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::transferEventListenersToShadowTree): Updated for
      new EventTarget API.
      
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::ConditionEventListener::handleEvent): No more isWindowEvent.
      
      * websockets/WebSocket.cpp:
      (WebCore::ProcessWebSocketEventTask::create):
      (WebCore::ProcessWebSocketEventTask::performTask):
      (WebCore::ProcessWebSocketEventTask::ProcessWebSocketEventTask):
      (WebCore::WebSocket::didConnect):
      (WebCore::WebSocket::didReceiveMessage):
      (WebCore::WebSocket::didClose):
      (WebCore::WebSocket::eventTargetData):
      (WebCore::WebSocket::ensureEventTargetData):
      * websockets/WebSocket.h:
      * websockets/WebSocket.idl:
      * workers/AbstractWorker.cpp:
      (WebCore::AbstractWorker::eventTargetData):
      (WebCore::AbstractWorker::ensureEventTargetData):
      * workers/AbstractWorker.h:
      * workers/AbstractWorker.idl:
      * workers/DedicatedWorkerContext.cpp:
      * workers/DedicatedWorkerContext.h:
      * workers/DedicatedWorkerContext.idl:
      * workers/DefaultSharedWorkerRepository.cpp:
      (WebCore::SharedWorkerConnectTask::performTask):
      (WebCore::SharedWorkerScriptLoader::load):
      (WebCore::SharedWorkerScriptLoader::notifyFinished):
      * workers/SharedWorker.idl:
      * workers/SharedWorkerContext.cpp:
      (WebCore::createConnectEvent):
      * workers/SharedWorkerContext.h:
      * workers/SharedWorkerContext.idl:
      * workers/Worker.cpp:
      (WebCore::Worker::notifyFinished):
      * workers/Worker.h:
      * workers/Worker.idl:
      * workers/WorkerContext.cpp:
      (WebCore::WorkerContext::eventTargetData):
      (WebCore::WorkerContext::ensureEventTargetData):
      * workers/WorkerContext.h:
      * workers/WorkerContext.idl:
      * workers/WorkerMessagingProxy.cpp:
      (WebCore::MessageWorkerContextTask::performTask):
      (WebCore::MessageWorkerTask::performTask):
      (WebCore::WorkerExceptionTask::performTask):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::callReadyStateChangeListener):
      (WebCore::XMLHttpRequest::createRequest):
      (WebCore::XMLHttpRequest::abort):
      (WebCore::XMLHttpRequest::networkError):
      (WebCore::XMLHttpRequest::abortError):
      (WebCore::XMLHttpRequest::didSendData):
      (WebCore::XMLHttpRequest::didReceiveData):
      (WebCore::XMLHttpRequest::eventTargetData):
      (WebCore::XMLHttpRequest::ensureEventTargetData):
      * xml/XMLHttpRequest.h:
      * xml/XMLHttpRequest.idl:
      * xml/XMLHttpRequestProgressEvent.h:
      (WebCore::XMLHttpRequestProgressEvent::create):
      * xml/XMLHttpRequestUpload.cpp:
      (WebCore::XMLHttpRequestUpload::eventTargetData):
      (WebCore::XMLHttpRequestUpload::ensureEventTargetData):
      * xml/XMLHttpRequestUpload.h:
      * xml/XMLHttpRequestUpload.idl: Use new EventTarget API.
      
      WebKit/mac: Updated for a WebCore rename.
      
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      * WebView/WebFrame.mm:
      (-[WebFrame _cacheabilityDictionary]):
      
      LayoutTests: Layout tests for event target sanitization.
              
      Patch by Geoffrey Garen <ggaren@apple.com> on 2009-09-23
      Reviewed by Sam Weinig.
      
      New tests for event dispatch:
      
      * fast/events/event-attributes-after-exception-expected.txt: Added.
      * fast/events/event-attributes-after-exception.html: Added.
      * fast/events/event-fire-order-expected.txt: Added.
      * fast/events/event-fire-order.html: Added.
      * fast/events/event-fired-after-removal-expected.txt: Added.
      * fast/events/event-fired-after-removal.html: Added.
              
      Fixed these tests:
      
      * fast/xmlhttprequest/xmlhttprequest-get-expected.txt: eventPhase should
      be AT_TARGET (2) when firing an event on an XHR, not INVALID (0).
      * http/tests/xmlhttprequest/infoOnProgressEvent-expected.txt: ditto
      
      * http/tests/xmlhttprequest/event-target-expected.txt:
      * http/tests/xmlhttprequest/event-target.html: Removing an event listener
      during event dispatch should prevent it from firing. (This test was backwards.)
              
      * svg/custom/loadevents-capturing.svg: Enhanced this test to tell you
      why it fails when it fails. Changed it to register runTest() (now named 
      reportResults()) using addEventListener() instead of the 'onload' attribute.
      The test relies on reportResults() running after handler(), so it needs
      to register reportResults() after handler().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      521f64b8
  24. 18 Sep, 2009 2 commits
    • simon.fraser@apple.com's avatar
      2009-09-18 Simon Fraser <simon.fraser@apple.com> · 83c45d04
      simon.fraser@apple.com authored
              Reviewed by Dave Hyatt.
      
              Compositing layers are incorrectly positioned after scrolling with position:fixed
              https://bugs.webkit.org/show_bug.cgi?id=29262
      
              When scrolling a page with compositing layers inside a position:fixed element,
              we need to update the compositing layer positions when the scroll position changes.
      
              Test: compositing/geometry/fixed-position.html
      
              * WebCore.base.exp:
              Export FrameView::scrollPositionChanged()
      
              * page/FrameView.h:
              * page/FrameView.cpp:
              (WebCore::FrameView::scrollPositionChanged):
              New method that sends the scroll event, and updates compositing layers positions if necessary.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48526 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      83c45d04
    • darin@apple.com's avatar
      Each wrapped Objective-C object should use a single RuntimeObjectImp · f55539ca
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=29351
      rdar://problem/7142294
      
      Patch by Darin Adler <darin@apple.com> on 2009-09-18
      Reviewed by Sam Weinig.
      
      * WebCore.base.exp: Added a newly-needed exported symbol.
      
      * bindings/objc/DOMInternal.h: Eliminated unused
      createWrapperCacheWithIntegerKeys; it has not been needed since the
      RGBColor wrappers were reworked.
      * bindings/objc/DOMInternal.mm: Ditto.
      
      * bridge/objc/objc_instance.h: Made the create function non-inline.
      * bridge/objc/objc_instance.mm:
      (createInstanceWrapperCache): Added. Creates an appropriate map table.
      (ObjcInstance::create): Moved here from header. Uses NSMapGet and
      NSMapInsert to cache the instance in a map table.
      (ObjcInstance::~ObjcInstance): Added a call to NSMapRemove to remove
      the instance from the map table.
      
      * bridge/qt/qt_instance.cpp:
      (JSC::Bindings::QtInstance::~QtInstance): Remove unneeded code to remove
      the instance from cachedObjects, which no longer exists.
      (JSC::Bindings::QtInstance::newRuntimeObject): Renamed to overload new
      bottleneck. Caching is now handled by the base class.
      
      * bridge/runtime.cpp:
      (JSC::Bindings::Instance::Instance): Initialize m_runtimeObject to 0.
      (JSC::Bindings::Instance::~Instance): Assert m_runtimeObject is 0.
      (JSC::Bindings::Instance::createRuntimeObject): Use m_runtimeObject
      if it's already set. Set m_runtimeObject and call addRuntimeObject
      if it's not.
      (JSC::Bindings::Instance::newRuntimeObject): Added. Virtual function,
      used only by createRuntimeObject.
      (JSC::Bindings::Instance::willDestroyRuntimeObject): Added.
      Calls removeRuntimeObject and then clears m_runtimeObject.
      (JSC::Bindings::Instance::willInvalidateRuntimeObject): Added.
      Clears m_runtimeObject.
      
      * bridge/runtime.h: Made createRuntimeObject non-virtual. Added
      willDestroyRuntimeObject, willInvalidateRuntimeObject,
      newRuntimeObject, and m_runtimeObject.
      
      * bridge/runtime_object.cpp:
      (JSC::RuntimeObjectImp::RuntimeObjectImp): Removed addRuntimeObject
      call, now handled by caller.
      (JSC::RuntimeObjectImp::~RuntimeObjectImp): Replaced removeRuntimeObject
      call with willDestroyRuntimeObject call; the latter nows calls
      removeRuntimeObject.
      (JSC::RuntimeObjectImp::invalidate): Added willInvalidateRuntimeObject
      call.
      
      * bridge/runtime_object.h: Made invalidate non-virtual.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f55539ca
  25. 16 Sep, 2009 3 commits
    • bolsinga@apple.com's avatar
      Add ENABLE(INSPECTOR) · d19fa0b4
      bolsinga@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=29260
      
      Reviewed by David Kilzer.
      
      JavaScriptCore:
      
      * wtf/Platform.h:
      
      WebCore:
      
      No new tests. (No change in default behavior.)
      
      * DerivedSources.make: Use new WebCore.Inspector.exp file if ENABLE_DRAG_SUPPORT.
      * WebCore.base.exp: Move Inspector only exports to WebCore.Inspector.exp.
      * WebCore.xcodeproj/project.pbxproj: Add WebCore.Inspector.exp.
      * bindings/js/JSDOMWindowBase.cpp: Use ENABLE(INSPECTOR) where applicable.
      (WebCore::JSDOMWindowBase::supportsProfiling):
      * bindings/js/JSInspectedObjectWrapper.cpp: Wrap entire file in ENABLE(INSPECTOR).
      * bindings/js/JSInspectorBackendCustom.cpp: Ditto.
      * bindings/js/JSInspectorCallbackWrapper.cpp: Ditto.
      * bindings/js/ScriptObject.cpp: Use ENABLE(INSPECTOR) where applicable.
      * bindings/js/ScriptObject.h: Ditto.
      * bindings/js/ScriptObjectQuarantine.cpp: Wrap entire file in ENABLE(INSPECTOR).
      * dom/Document.cpp: Use ENABLE(INSPECTOR) where applicable.
      (WebCore::Document::recalcStyle):
      (WebCore::Document::addMessage):
      (WebCore::Document::resourceRetrievedByXMLHttpRequest):
      (WebCore::Document::scriptImported):
      * dom/Document.h: Ditto.
      * dom/Node.cpp: Ditto.
      (WebCore::Node::dispatchGenericEvent):
      * dom/ScriptExecutionContext.h: Ditto.
      (WebCore::):
      * html/HTMLDocument.cpp: Ditto.
      (WebCore::HTMLDocument::createTokenizer):
      * html/HTMLTokenizer.cpp: Ditto.
      (WebCore::HTMLTokenizer::write):
      * inspector/ConsoleMessage.cpp: Ditto.
      (WebCore::ConsoleMessage::ConsoleMessage):
      (WebCore::ConsoleMessage::isEqual):
      * inspector/ConsoleMessage.h: Ditto.
      * inspector/DOMDispatchTimelineItem.cpp: Wrap entire file in ENABLE(INSPECTOR).
      * inspector/InspectorBackend.cpp: Ditto.
      * inspector/InspectorController.cpp: Ditto.
      * inspector/InspectorDOMAgent.cpp: Ditto.
      * inspector/InspectorDOMStorageResource.cpp: Ditto.
      * inspector/InspectorDatabaseResource.cpp: Ditto.
      * inspector/InspectorFrontend.cpp: Ditto.
      * inspector/InspectorResource.cpp: Ditto.
      * inspector/InspectorTimelineAgent.cpp: Ditto.
      * inspector/TimelineItem.cpp: Ditto.
      * loader/FrameLoader.cpp: Use ENABLE(INSPECTOR) where applicable.
      (WebCore::FrameLoader::detachFromParent):
      (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
      (WebCore::FrameLoader::loadedResourceFromMemoryCache):
      (WebCore::FrameLoader::dispatchWindowObjectAvailable):
      (WebCore::FrameLoader::dispatchDidCommitLoad):
      (WebCore::FrameLoader::dispatchAssignIdentifierToInitialRequest):
      (WebCore::FrameLoader::dispatchWillSendRequest):
      (WebCore::FrameLoader::dispatchDidReceiveResponse):
      (WebCore::FrameLoader::dispatchDidReceiveContentLength):
      (WebCore::FrameLoader::dispatchDidFinishLoading):
      * page/Chrome.cpp: Ditto.
      (WebCore::Chrome::mouseDidMoveOverElement):
      * page/Console.cpp: Ditto.
      (WebCore::Console::addMessage):
      (WebCore::Console::count):
      (WebCore::Console::profile):
      (WebCore::Console::profileEnd):
      (WebCore::Console::time):
      (WebCore::Console::timeEnd):
      (WebCore::Console::group):
      (WebCore::Console::groupEnd):
      * page/ContextMenuController.cpp: Ditto.
      (WebCore::ContextMenuController::handleContextMenuEvent):
      (WebCore::ContextMenuController::contextMenuItemSelected):
      * page/DOMWindow.cpp: Ditto.
      (WebCore::DOMWindow::sessionStorage):
      (WebCore::DOMWindow::localStorage):
      * page/EventHandler.cpp: Ditto.
      (WebCore::EventHandler::handleMousePressEvent):
      * page/FrameView.cpp: Ditto.
      (WebCore::FrameView::layout):
      (WebCore::FrameView::paintContents):
      * page/FrameView.h: Ditto.
      * page/Page.cpp: Ditto.
      (WebCore::Page::Page):
      (WebCore::Page::~Page):
      * page/Page.h: Ditto.
      * platform/ContextMenu.cpp: Ditto.
      (WebCore::ContextMenu::checkOrEnableIfNeeded):
      * platform/ContextMenuItem.h: Ditto.
      (WebCore::):
      * storage/Database.cpp: Ditto.
      (WebCore::Database::openDatabase):
      * workers/WorkerContext.cpp: Ditto.
      (WebCore::WorkerContext::importScripts):
      * xml/XMLHttpRequest.cpp: Ditto.
      (WebCore::XMLHttpRequest::didFinishLoading):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48430 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d19fa0b4
    • bolsinga@apple.com's avatar
      Add ENABLE(CONTEXT_MENUS) · 08a4e0b1
      bolsinga@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=29225
      
      Reviewed by David Kilzer.
      
      JavaScriptCore:
      
      * wtf/Platform.h:
      
      WebCore:
      
      No new tests. (No change in default behavior.)
      
      * DerivedSources.make: Use new WebCore.ContextMenus.exp file if ENABLE_CONTEXT_MENUS.
      * WebCore.base.exp: Move ContextMenu only exports to WebCore.ContextMenus.exp.
      * WebCore.xcodeproj/project.pbxproj: Add WebCore.ContextMenus.exp.
      * dom/Node.cpp: Use ENABLE(CONTEXT_MENUS) where applicable.
      (WebCore::Node::defaultEventHandler):
      * loader/EmptyClients.h: Ditto.
      * page/ContextMenuController.cpp: Wrap entire file in ENABLE(CONTEXT_MENUS).
      * page/EventHandler.cpp: Use ENABLE(CONTEXT_MENUS) where applicable.
      * page/EventHandler.h: Ditto.
      * page/Page.cpp: Ditto.
      (WebCore::Page::Page):
      * page/Page.h: Ditto.
      * page/mac/EventHandlerMac.mm: Ditto.
      * page/mac/WebCoreViewFactory.h: Ditto.
      * platform/ContextMenu.cpp: Wrap entire file in ENABLE(CONTEXT_MENUS).
      * platform/LocalizedStrings.h: Use ENABLE(CONTEXT_MENUS) where applicable.
      * platform/mac/ContextMenuItemMac.mm: Wrap entire file in ENABLE(CONTEXT_MENUS).
      * platform/mac/ContextMenuMac.mm: Ditto.
      * platform/mac/LocalizedStringsMac.mm: Use ENABLE(CONTEXT_MENUS) where applicable.
      * svg/graphics/SVGImage.cpp: Ditto.
      (WebCore::SVGImage::dataChanged):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08a4e0b1
    • bolsinga@apple.com's avatar
      Add ENABLE(DRAG_SUPPORT) · 5db11076
      bolsinga@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=29233
      
      Reviewed by David Kilzer.
      
      JavaScriptCore:
      
      * wtf/Platform.h:
      
      WebCore:
      
      No new tests. (No change in default behavior.)
      
      * DerivedSources.make: Use new WebCore.DragSupport.exp file if ENABLE_DRAG_SUPPORT.
      * WebCore.base.exp: Move Drag Support only exports to WebCore.DragSupport.exp.
      * WebCore.xcodeproj/project.pbxproj: Add WebCore.DragSupport.exp.
      * dom/Clipboard.h: Use ENABLE(DRAG_SUPPORT) where applicable.
      * loader/EmptyClients.h: Ditto.
      * page/DragController.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * page/EventHandler.cpp: Use ENABLE(DRAG_SUPPORT) where applicable.
      (WebCore::EventHandler::EventHandler):
      (WebCore::EventHandler::clear):
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::EventHandler::handleMouseReleaseEvent):
      (WebCore::EventHandler::handleMouseMoveEvent):
      * page/EventHandler.h: Ditto.
      * page/Page.cpp: Ditto.
      (WebCore::Page::Page):
      * page/Page.h: Ditto.
      * page/mac/DragControllerMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * page/mac/EventHandlerMac.mm: Use ENABLE(DRAG_SUPPORT) where applicable.
      (WebCore::EventHandler::passSubframeEventToSubframe):
      * platform/DragData.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * platform/DragImage.cpp: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * platform/mac/ClipboardMac.h: Use ENABLE(DRAG_SUPPORT) where applicable.
      * platform/mac/ClipboardMac.mm: Ditto.
      * platform/mac/DragDataMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * platform/mac/DragImageMac.mm: Wrap entire file in ENABLE(DRAG_SUPPORT).
      * rendering/RenderLayer.cpp: Use ENABLE(DRAG_SUPPORT) where applicable.
      (WebCore::RenderLayer::autoscroll):
      * rendering/RenderObject.cpp: Ditto.
      * rendering/RenderObject.h: Ditto.
      * svg/graphics/SVGImage.cpp: Ditto.
      (WebCore::SVGImage::dataChanged):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5db11076
  26. 14 Sep, 2009 1 commit
    • beidson@apple.com's avatar
      Safari 4 cannot be used to update firmware on Linksys routers. · 29c8b21b
      beidson@apple.com authored
      <rdar://problem/7174050> and https://bugs.webkit.org/show_bug.cgi?id=29160
      
      Reviewed by Alexey Proskuryakov.
      
      WebCore: 
      
      In http://trac.webkit.org/changeset/42483, we disabled CFNetwork's session credential storage and 
      implemented our own in WebCore.
      
      One feature we lost is that CFNetwork would automatically send previously authenticated credentials
      with new connections when the paths match, as allowed by RFC 2617 for HTTP Basic and Digest Authentication.  
      
      Even though it's optional for User Agents to do this, (some?) Linksys routers rely on this behavior for
      HTTP Basic Authentication.  So now WebCore's CredentialStorage will track URL paths for Basic credentials.
      
      We're not making this enhancement for Digest at this time, since we don't know of anything that broke
      due to the change in Digest behavior.
      
      Test: http/tests/loading/basic-credentials-sent-automatically.html
            http/tests/loading/basic-auth-resend-wrong-credentials.html
      
      * WebCore.base.exp:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      
      * platform/network/Credential.cpp:
      (WebCore::Credential::isEmpty):
      * platform/network/Credential.h:
      
      Add a slightly more full featured CredentialStore that will track URL paths a credential belongs to:
      * platform/network/CredentialStorage.cpp: Added.
      (WebCore::protectionSpaceToCredentialMap):
      (WebCore::originToDefaultCredentialMap):
      (WebCore::originStringFromURL):
      (WebCore::CredentialStorage::set):
      (WebCore::CredentialStorage::get):
      (WebCore::CredentialStorage::getDefaultAuthenticationCredential):
      * platform/network/CredentialStorage.h: Added.
      
      Allow ProtectionSpace to be a hash key:
      * platform/network/ProtectionSpace.cpp:
      (WebCore::ProtectionSpace::ProtectionSpace):
      * platform/network/ProtectionSpace.h:
      (WebCore::ProtectionSpace::ProtectionSpace):
      (WebCore::ProtectionSpace::isHashTableDeletedValue):
      * platform/network/ProtectionSpaceHash.h: Added.
      (WebCore::ProtectionSpaceHash::hash):
      (WebCore::ProtectionSpaceHash::equal):
      
      Allow ResourceHandles to remember the initial credential they used:
      * platform/network/ResourceHandleInternal.h:
      
      Allow mutable ResourceRequests to update their platform object if HTTP header fields change:
      * platform/network/ResourceRequestBase.cpp:
      (WebCore::ResourceRequestBase::addHTTPHeaderField):
      
      Remove WebCoreCredentialStorage:
      * platform/network/cf/AuthenticationCF.cpp:
      * platform/network/cf/AuthenticationCF.h:
      * platform/network/mac/AuthenticationMac.h:
      * platform/network/mac/AuthenticationMac.mm:
      
      Change ResourceHandleCFNet to try to use stored credentials on new connections, if appropriate:
      * platform/network/cf/ResourceHandleCFNet.cpp:
      (WebCore::ResourceHandle::start):
      (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Only try the ProtectionSpace key'ed
        Credential if it does not match the initially used Credential.
      (WebCore::ResourceHandle::receivedCredential):
      (WebCore::WebCoreSynchronousLoader::didReceiveChallenge): Only try the ProtectionSpace key'ed
        Credential if it does not match the initially used Credential.
      (WebCore::WebCoreSynchronousLoader::load):
      
      Change ResourceHandleMac to try to use stored credentials on new connections, if appropriate:
      * platform/network/mac/ResourceHandleMac.mm:
      (WebCore::ResourceHandle::start):
      (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Only try the ProtectionSpace key'ed
        Credential if it does not match the initially used Credential.
      (WebCore::ResourceHandle::receivedCredential):
      (-[WebCoreSynchronousLoader connection:didReceiveAuthenticationChallenge:]): Only try the 
        ProtectionSpace key'ed Credential if it does not match the initially used Credential.
      (+[WebCoreSynchronousLoader loadRequest:allowStoredCredentials:returningResponse:error:]):
      
      Add base64-ability to CString:
      * platform/text/CString.cpp:
      (WebCore::CStringBuffer::base64Encode):
      (WebCore::CString::base64Encode):
      * platform/text/CString.h:
      (WebCore::CStringBuffer::create):
      (WebCore::CStringBuffer::CStringBuffer):
      
      WebKit/mac: 
      
      Adopt the new WebCore::CredentialStorage in WebKit/Mac.
      
      * Misc/WebDownload.mm:
      (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
      * Plugins/WebBaseNetscapePluginView.mm:
      (WebKit::getAuthenticationInfo):
      
      WebKit/win: 
      
      Adopt the new WebCore::CredentialStorage in WebKit/Win.
      
      * WebDownloadCFNet.cpp:
      (WebDownload::didReceiveAuthenticationChallenge):
      
      WebKitTools: 
      
      Add the ability for DRT to handle authentication challenges.
      
      * DumpRenderTree/LayoutTestController.cpp:
      (setAuthenticationPasswordCallback):
      (setAuthenticationUsernameCallback):
      (setHandlesAuthenticationChallengesCallback):
      (LayoutTestController::staticFunctions):
      
      * DumpRenderTree/LayoutTestController.h:
      (LayoutTestController::handlesAuthenticationChallenges):
      (LayoutTestController::setHandlesAuthenticationChallenges):
      (LayoutTestController::authenticationUsername):
      (LayoutTestController::setAuthenticationUsername):
      (LayoutTestController::authenticationPassword):
      (LayoutTestController::setAuthenticationPassword):
      
      * DumpRenderTree/mac/ResourceLoadDelegate.mm:
      (-[ResourceLoadDelegate webView:resource:didReceiveAuthenticationChallenge:fromDataSource:]):
      
      * DumpRenderTree/win/ResourceLoadDelegate.cpp:
      (ResourceLoadDelegate::didReceiveAuthenticationChallenge):
      * DumpRenderTree/win/ResourceLoadDelegate.h:
      
      LayoutTests: 
      
      * http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt: Added.
      * http/tests/loading/basic-auth-resend-wrong-credentials.html: Added.
      * http/tests/loading/basic-credentials-sent-automatically-expected.txt: Added.
      * http/tests/loading/basic-credentials-sent-automatically.html: Added.
      * http/tests/loading/resources/basic-auth-testing.php: Added.
      * http/tests/loading/resources/othersubresources: Added.
      * http/tests/loading/resources/othersubresources/protected-resource.php: Added.
      * http/tests/loading/resources/protected-resource.php: Added.
      * http/tests/loading/resources/subresources: Added.
      * http/tests/loading/resources/subresources/protected-resource.php: Added.
      * http/tests/loading/resources/test2: Added.
      * http/tests/loading/resources/test2/basic-auth-testing.php: Added.
      * http/tests/loading/resources/test2/protected-resource.php: Added.
      * platform/gtk/Skipped:
      * platform/qt/Skipped:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29c8b21b
  27. 11 Sep, 2009 1 commit
    • eric@webkit.org's avatar
      2009-09-11 Eric Seidel <eric@webkit.org> · 58165d43
      eric@webkit.org authored
              No review, rolling out r48229.
              http://trac.webkit.org/changeset/48229
      
              * fast/events/drag-dropeffect-expected.txt: Removed.
              * fast/events/drag-dropeffect.html: Removed.
      2009-09-11  Eric Seidel  <eric@webkit.org>
      
              No review, rolling out r48229.
              http://trac.webkit.org/changeset/48229
      
              * WebCore.base.exp:
              * dom/Clipboard.cpp:
              (WebCore::Clipboard::Clipboard):
              (WebCore::Clipboard::sourceOperation):
              * page/DragController.cpp:
              (WebCore::DragController::DragController):
              (WebCore::DragController::dragExited):
              (WebCore::DragController::performDrag):
              (WebCore::DragController::dragEnteredOrUpdated):
              (WebCore::DragController::tryDHTMLDrag):
              (WebCore::DragController::startDrag):
              * page/DragController.h:
              * page/EventHandler.cpp:
              (WebCore::EventHandler::updateDragAndDrop):
              (WebCore::EventHandler::dragSourceMovedTo):
              (WebCore::EventHandler::handleDrag):
              * page/EventHandler.h:
      2009-09-11  Eric Seidel  <eric@webkit.org>
      
              No review, rolling out r48229.
              http://trac.webkit.org/changeset/48229
      
              * WebView/WebFrame.mm:
              (-[WebFrame _dragSourceMovedTo:]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58165d43
  28. 09 Sep, 2009 2 commits
    • eric@webkit.org's avatar
      2009-09-09 Jens Alfke <snej@chromium.org> · 99e6cded
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              Initialize DataTransfer's effectAllowed and dropEffect properties correctly
              according to HTML5 spec (sec. 7.9.2-7.9.3).
              https://bugs.webkit.org/show_bug.cgi?id=26700
      
              * fast/events/drag-dropeffect-expected.txt: Added.
              * fast/events/drag-dropeffect.html: Added.
      2009-09-09  Jens Alfke  <snej@chromium.org>
      
              Reviewed by Eric Seidel.
      
              Initialize DataTransfer's effectAllowed and dropEffect properties correctly
              according to HTML5 spec (sec. 7.9.2-7.9.3).
              https://bugs.webkit.org/show_bug.cgi?id=26700
              - At the start of a drag operation, the value of effectAllowed should be
                the string "uninitialized".
              - At end of dragstart handler, if effectAllowed hasn't been set yet, it
                should be set to "copy".
              - on dragenter and dragover event, dropEffect should be initialized to a
                default value based on the value of effectAllowed.
              - at end of dragenter and dragover the dropEffect should be set to "none"
                if the value set by the handler doesn't match the effectAllowed.
              - on dragleave event, dropEffect should be "none".
              - on drop event, dropEffect should be the previously negotiated value.
      
              Test: fast/events/drag-dropeffect.html
      
              * WebCore.base.exp:
                  Added a parameter to EventHandler::dragSourceMovedTo.
              * dom/Clipboard.cpp:
              (WebCore::Clipboard::Clipboard):
                  Initialize m_effectAllowed to "uninitialized".
              (WebCore::Clipboard::sourceOperation):
                  Treat "uninitialized" as meaning no value has been set.
              * page/DragController.cpp:
              (WebCore::DragController::DragController):
                  Initialize new member m_destinationDragOperation.
              (WebCore::DragController::dragExited):
                  Set m_destinationDragOperation to none on dragExit.
              (WebCore::DragController::performDrag):
                  Set m_destinationDragOperation to current dropEffect.
              (WebCore::DragController::dragEnteredOrUpdated):
                  Make sure to clear the operation if drag source doesn't allow it.
              (WebCore::DragController::tryDHTMLDrag):
                  Set a default value for the dst drag op before sending dragEnter/Over.
              (WebCore::DragController::startDrag):
                  Clear m_destinationDragOperation at start of drag.
              * page/DragController.h:
              (WebCore::DragController::destinationDragOperation):
                  Added new member m_destinationDragOperation, and its public getter.
              * page/EventHandler.cpp:
              (WebCore::EventHandler::updateDragAndDrop):
                  dropEffect should be 'none' during dropleave handler, per spec.
              (WebCore::EventHandler::dragSourceMovedTo):
                  Added DragOperation parameter, so the handler sees the current dropEffect.
              (WebCore::EventHandler::handleDrag):
                  Assume DragOperationEvery for non-DHTML drags.
              * page/EventHandler.h:
                  Added DragOperation parameter to dragSourceMovedTo().
      2009-09-09  Jens Alfke  <snej@chromium.org>
      
              Reviewed by Eric Seidel.
      
              Initialize DataTransfer's effectAllowed and dropEffect properties correctly
              according to HTML5 spec (sec. 7.9.2-7.9.3).
              https://bugs.webkit.org/show_bug.cgi?id=26700
      
              * WebView/WebFrame.mm:
              (-[WebFrame _dragSourceMovedTo:]):
                  Pass current drag operation (if known) to EventHandler::dragSourceMovedTo().
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      99e6cded
    • hyatt@apple.com's avatar
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user... · 63e0ac2f
      hyatt@apple.com authored
      WebCore: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
      to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
      to all Frames in the PageGroup.
      
      Reviewed by Adam Roben.
      
      Added userscripts/simple-stylesheet.html test case.
      
      * WebCore.base.exp:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/CSSStyleSelector.cpp:
      (WebCore::CSSStyleSelector::CSSStyleSelector):
      * css/CSSStyleSelector.h:
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::attach):
      (WebCore::Document::pageGroupUserSheets):
      (WebCore::Document::clearPageGroupUserSheets):
      (WebCore::Document::recalcStyleSelector):
      * dom/Document.h:
      * loader/PlaceholderDocument.cpp:
      (WebCore::PlaceholderDocument::attach):
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserStyleSheet):
      (WebCore::PageGroup::removeUserContentForWorld):
      (WebCore::PageGroup::removeAllUserContent):
      * page/PageGroup.h:
      (WebCore::PageGroup::userStyleSheets):
      * page/UserStyleSheet.h: Added.
      (WebCore::UserStyleSheet::UserStyleSheet):
      (WebCore::UserStyleSheet::source):
      (WebCore::UserStyleSheet::url):
      (WebCore::UserStyleSheet::patterns):
      (WebCore::UserStyleSheet::worldID):
      * page/UserStyleSheetTypes.h: Added.
      
      WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
      to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
      to all Frames in the PageGroup.
      
      Reviewed by Adam Roben.
      
      Added userscripts/simple-stylesheet.html test case.
      
      * WebView/WebView.mm:
      (+[WebView _addUserStyleSheetToGroup:source:url:worldID:patterns:]):
      * WebView/WebViewPrivate.h:
      
      LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
      to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
      to all Frames in the PageGroup.
      
      Reviewed by Adam Roben.
      
      Added userscripts/simple-stylesheet.html test case.
      
      * platform/mac/userscripts/simple-stylesheet-expected.checksum: Added.
      * platform/mac/userscripts/simple-stylesheet-expected.png: Added.
      * platform/mac/userscripts/simple-stylesheet-expected.txt: Added.
      * userscripts/simple-stylesheet.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      63e0ac2f
  29. 08 Sep, 2009 1 commit
    • abarth@webkit.org's avatar
      2009-09-07 Steve Block <steveblock@google.com> · 3ba9b43d
      abarth@webkit.org authored
              Reviewed by Adam Barth.
      
              Adds a mock Geolocation service. This will be used to provide predictable behavior of the
              Geolocation API for use in LayoutTests. Later changes will integrate the the mock
              Geolocation service with DumpRenderTree.
              https://bugs.webkit.org/show_bug.cgi?id=28264
      
              * fast/dom/Geolocation/resources/error.js: Added. Tests that the error callback is called when the service reports an error.
              * fast/dom/Geolocation/error-expected.txt: Added. Expected result for above test.
              * fast/dom/Geolocation/error.html: Added. Wrapper for above test.
      2009-09-07  Steve Block  <steveblock@google.com>
      
              Reviewed by Adam Barth.
      
              Adds a mock Geolocation service. This will be used to provide predictable behavior of the
              Geolocation API for use in LayoutTests. Later changes will integrate the the mock
              Geolocation service with DumpRenderTree.
              https://bugs.webkit.org/show_bug.cgi?id=28264
      
              The mock Geolocation service returns a fixed position or error. This position or error can be
              set through static methods on the GeolocationService class. The position or error is shared
              between all instances of the mock Geolocation service.
      
              Implementation details.
              The GeolocationService object maintains a pointer to a factory function which it uses to create
              Geolocation service instances. Each platform implementing Geolocation sets this pointer
              to the factory function for their platform's implementation. When the mock Geolocation service
              is activated, the factory function pointer is reset to the factory function for the mock service.
      
              Test: fast/dom/Geolocation/error.html
      
              * WebCore.base.exp: Modified. Exports GeolocationServiceMock methods.
              * GNUMakefile.am: Modified. Added GeolocationServiceMock files.
              * WebCore.gypi: Modified. Added GeolocationServiceMock files.
              * WebCore.pro: Modified. Added GeolocationServiceMock files.
              * WebCore.vcproj/WebCore.vcproj: Modified. Added GeolocationServiceMock files.
              * WebCore.vcproj/WebCoreCommon.vsprops: Modified. Added mock directory to includes.
              * WebCore.xcodeproj/project.pbxproj: Modified. Added GeolocationServiceMock files and exports some headers.
              * WebCoreSources.bkl: Modified. Added GeolocationServiceMock files.
              * page/ChromeClient.h: Modified. Fixed comment.
              * page/Geolocation.cpp: Modified.
              (WebCore::Geolocation::setIsAllowed): Modified. Fixed error string.
              * platform/GeolocationService.cpp: Modified.
              (WebCore::createGeolocationServiceNull): Added. Returns null in place of a Geolocation service. Used to avoid link errors on platforms where Geolocation is not implemented.
              (WebCore::GeolocationService::create): Added. Uses the factory function pointer to create a Geolocation service implementation.
              (WebCore::GeolocationService::useMock): Added. Configures the GeolocationServie to use the mock implementation.
              * platform/GeolocationService.h: Modified.
              * platform/mock: Added.
              * platform/mock/GeolocationServiceMock.cpp: Added.
              (WebCore::GeolocationServiceMock::create): Added. Creates a GeolocationServiceMock object.
              (WebCore::GeolocationServiceMock::GeolocationServiceMock): Added. Constructor.
              (WebCore::GeolocationServiceMock::~GeolocationServiceMock): Added. Destructor.
              (WebCore::GeolocationServiceMock::setPosition): Added. Sets the position that will be returned by the object.
              (WebCore::GeolocationServiceMock::setError): Added. Sets the error that will be returned by the object.
              (WebCore::GeolocationServiceMock::startUpdating): Added. GeolocationService implementation. Starts the service.
              (WebCore::GeolocationServiceMock::stopUpdating): Added. GeolocationService implementation. Stops the service.
              (WebCore::GeolocationServiceMock::timerFired): Added. Used to provide an asynchronous callback when the service is started.
              (WebCore::GeolocationServiceMock::makeGeolocationCallbackFromAllInstances): Added. Used to call back when the position or error is updated.
              (WebCore::GeolocationServiceMock::makeGeolocationCallback): Added. Used to call back when the service starts.
              (WebCore::GeolocationServiceMock::initStatics): Added. Initializes statics members with constructors.
              (WebCore::GeolocationServiceMock::cleanUpStatics): Added. Cleans up static members with constructors.
              * platform/mock/GeolocationServiceMock.h: Added.
              (WebCore::GeolocationServiceMock::lastPosition): Added. Returns the fixed position.
              (WebCore::GeolocationServiceMock::lastError): Added. Returns the fixed error.
              * platform/gtk/GeolocationServiceGtk.cpp: Modified.
              (WebCore::GeolocationServiceGtk::create): Added. Creates an instance of GeolocationServiceGtk.
              * platform/gtk/GeolocationServiceGtk.h: Modified.
              * platform/mac/GeolocationServiceMac.h: Modified.
              * platform/mac/GeolocationServiceMac.mm: Modified.
              (WebCore::GeolocationServiceMac::create): Added. Creates an instance of GeolocationServiceMac.
      2009-09-07  Steve Block  <steveblock@google.com>
      
              Reviewed by Adam Barth.
      
              Adds a mock Geolocation service. This will be used to provide predictable behavior of the
              Geolocation API for use in LayoutTests. Later changes will integrate the the mock
              Geolocation service with DumpRenderTree.
              https://bugs.webkit.org/show_bug.cgi?id=28264
      
              * WebKit.xcodeproj/project.pbxproj: Modified. Adds WebGeolocationMock.
      2009-09-07  Steve Block  <steveblock@google.com>
      
              Reviewed by Adam Barth.
      
              Adds a mock Geolocation service. This will be used to provide predictable behavior of the
              Geolocation API for use in LayoutTests. Later changes will integrate the the mock
              Geolocation service with DumpRenderTree.
              https://bugs.webkit.org/show_bug.cgi?id=28264
      
              * WebCoreSupport/WebGeolocationMockPrivate.h: Added.
              * WebCoreSupport/WebGeolocationMock.mm: Added.
              (+[WebGeolocationMock setError:code:]): Added. Used by DumpRender tree to configure the mock Geolocation service.
              (+[WebGeolocationMock setPosition:latitude:longitude:accuracy:]): Added. Used by DumpRender tree to configure the mock Geolocation service.
              * WebKit.exp: Modified. Exports WebGeolocationMock.
      2009-09-07  Steve Block  <steveblock@google.com>
      
              Reviewed by Adam Barth.
      
              Adds a mock Geolocation service. This will be used to provide predictable behavior of the
              Geolocation API for use in LayoutTests. Later changes will integrate the the mock
              Geolocation service with DumpRenderTree.
              https://bugs.webkit.org/show_bug.cgi?id=28264
      
              * DumpRenderTree/LayoutTestController.cpp: Modified.
              (setMockGeolocationPositionCallback): Added. Configures the mock Geolocation service.
              (setMockGeolocationErrorCallback): Added. Configures the mock Geolocation service.
              (LayoutTestController::staticFunctions): Added. Registers the above functions on the LayoutTestController.
              * DumpRenderTree/LayoutTestController.h: Modified.
              * DumpRenderTree/mac/LayoutTestControllerMac.mm: Modified.
              (LayoutTestController::setMockGeolocationPosition): Added. Configures the mock Geolocation service.
              (LayoutTestController::setMockGeolocationError): Added. Configures the mock Geolocation service.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48144 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3ba9b43d
  30. 04 Sep, 2009 1 commit
    • dglazkov@chromium.org's avatar
      WebCore: · f0234eb3
      dglazkov@chromium.org authored
      2009-09-04  Mark Mentovai  <mark@chromium.org>
      
              Reviewed by Dave Hyatt.
      
              https://bugs.webkit.org/show_bug.cgi?id=28614
      
              Account for scrollbar state changes that occur during layout.
      
              * platform/ScrollView.cpp:
              (WebCore::ScrollView::updateScrollbars):
      
              Perform a layout prior to checking whether the scrollbar modes are
              off, on, or automatic.  The modes may change during layout.
      
              * WebCore.base.exp:
              * WebCore.order:
              * page/Frame.cpp:
              (WebCore::Frame::createView):
              * page/FrameView.cpp:
              (WebCore::FrameView::FrameView):
              (WebCore::FrameView::resetScrollbars):
              (WebCore::FrameView::layout):
              * page/FrameView.h:
              * platform/ScrollView.h:
      
              Eliminate duplicated (and incorrect) scrollbar mode tracking between
              FrameView and ScrollView.
      
      WebKit/mac:
      
      2009-09-04  Mark Mentovai  <mark@chromium.org>
      
              Reviewed by Dave Hyatt.
      
              https://bugs.webkit.org/show_bug.cgi?id=28614
      
              Account for scrollbar state changes that occur during layout.
      
              * WebView/WebDynamicScrollBarsView.mm:
              (-[WebDynamicScrollBarsView updateScrollers]):
      
              Perform a layout prior to checking whether the scrollbar modes are
              off, on, or automatic.  The modes may change during layout.
      
              * WebView/WebFrameView.mm:
              (-[WebFrameView _install]):
      
              Eliminate duplicated (and incorrect) scrollbar mode tracking between
              FrameView and ScrollView.
      
      WebKit/qt:
      
      2009-09-04  Mark Mentovai  <mark@chromium.org>
      
              Reviewed by Dave Hyatt.
      
              https://bugs.webkit.org/show_bug.cgi?id=28614
      
              Account for scrollbar state changes that occur during layout.
      
              * Api/qwebframe.cpp:
              (QWebFrame::setScrollBarPolicy):
      
              Eliminate duplicated (and incorrect) scrollbar mode tracking between
              FrameView and ScrollView.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f0234eb3