1. 26 Aug, 2013 40 commits
    • mitz@apple.com's avatar
      Automatic bug reports case pain · f5e5752d
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120330
      
      Reviewed by Anders Carlsson.
      
      * Scripts/webkitpy/tool/commands/download.py: Made the following changes to the Description
      of bugs filed by the bot: changed “the sheriff-bot” to “webkitbot”, changed “case pain” to
      “fail”, and removed “"Only you can prevent forest fires." -- Smokey the Bear”.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f5e5752d
    • weinig@apple.com's avatar
      AlternativeTextController should hold onto Frame as a reference · a59243b8
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120327
      
      Reviewed by Andreas Kling.
      
      While in the area I also:
        - Reference-ified Editor::killRing().
        - Const-ified Editor::m_killRing, Editor::m_spellChecker, and Editor::m_alternativeTextController.
      
      * editing/AlternativeTextController.cpp:
      (WebCore::AlternativeTextController::AlternativeTextController):
      (WebCore::AlternativeTextController::stopPendingCorrection):
      (WebCore::AlternativeTextController::isSpellingMarkerAllowed):
      (WebCore::AlternativeTextController::applyAlternativeTextToRange):
      (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
      (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
      (WebCore::AlternativeTextController::timerFired):
      (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
      (WebCore::AlternativeTextController::rootViewRectForRange):
      (WebCore::AlternativeTextController::respondToChangedSelection):
      (WebCore::AlternativeTextController::respondToAppliedEditing):
      (WebCore::AlternativeTextController::respondToUnappliedEditing):
      (WebCore::AlternativeTextController::alternativeTextClient):
      (WebCore::AlternativeTextController::editorClient):
      (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
      (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
      (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
      (WebCore::AlternativeTextController::insertDictatedText):
      (WebCore::AlternativeTextController::applyDictationAlternative):
      * editing/AlternativeTextController.h:
      (WebCore::AlternativeTextController::UNLESS_ENABLED):
      * editing/Editor.cpp:
      (WebCore::Editor::Editor):
      (WebCore::Editor::addToKillRing):
      * editing/Editor.h:
      (WebCore::Editor::killRing):
      * editing/EditorCommand.cpp:
      (WebCore::executeYank):
      (WebCore::executeYankAndSelect):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a59243b8
    • aestes@apple.com's avatar
      Fix issues found by the Clang Static Analyzer · a872654a
      aestes@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120230
      
      Reviewed by Darin Adler.
      
      Source/JavaScriptCore:
      
      * API/JSValue.mm:
      (valueToString): Don't leak every CFStringRef when in Objective-C GC.
      * API/ObjCCallbackFunction.mm:
      (JSC::ObjCCallbackFunctionImpl::~ObjCCallbackFunctionImpl): Don't
      release m_invocation's target since NSInvocation will do it for us on
      -dealloc.
      (objCCallbackFunctionForBlock): Tell NSInvocation to retain its target
      and -release our reference to the copied block.
      * API/tests/minidom.c:
      (createStringWithContentsOfFile): Free buffer before returning.
      * API/tests/testapi.c:
      (createStringWithContentsOfFile): Ditto.
      
      Source/WebCore:
      
      * WebCore.xcodeproj/project.pbxproj: Removed FoundationExtras.h.
      * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Removed CFAutoreleaseHelper().
      (AXTextMarkerRange): Used HardAutorelease() instead of
      CFAutoreleaseHelper().
      (AXTextMarkerRangeStart): Ditto.
      (AXTextMarkerRangeEnd): Ditto.
      (textMarkerForVisiblePosition): Ditto.
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (-[WebCoreAVFMovieObserver initWithCallback:]): Called [super init]
      first so that we don't later use ivars from the wrong self.
      (-[WebCoreAVFLoaderDelegate initWithCallback:]): Ditto.
      * platform/mac/FoundationExtras.h: Removed.
      * platform/mac/KURLMac.mm:
      (WebCore::KURL::operator NSURL *): Used WTF's HardAutorelease().
      * platform/mac/WebCoreNSURLExtras.mm:
      (WebCore::mapHostNameWithRange): Used HardAutorelease() instead of
      WebCoreCFAutorelease().
      (WebCore::URLWithData): Ditto.
      (WebCore::userVisibleString): Ditto.
      (WebCore::URLByRemovingComponentAndSubsequentCharacter): Used Vector<>
      with an inline capacity rather than heap-allocating a buffer.
      * platform/mac/WebCoreObjCExtras.h: Used HardAutorelease() instead of
      WebCoreCFAutorelease().
      * platform/text/mac/StringImplMac.mm:
      (WTF::StringImpl::operator NSString *): Used WTF's HardAutorelease().
      
      Source/WebKit/mac:
      
      * Misc/WebNSFileManagerExtras.mm:
      (-[NSFileManager _webkit_startupVolumeName]): Used HardAutorelease()
      instead of WebCFAutorelease().
      * Misc/WebNSObjectExtras.h: Removed definition of WebCFAutorelease().
      * Misc/WebNSURLExtras.mm:
      (-[NSURL _web_URLWithLowercasedScheme]): Used HardAutorelease()
      instead of WebCFAutorelease().
      * Plugins/Hosted/WebHostedNetscapePluginView.mm:
      (-[WebHostedNetscapePluginView createPluginLayer]): Stop leaking
      CGColors (CALayer retains its backgroundColor property despite the
      property attributes claiming otherwise).
      * Plugins/WebBasePluginPackage.mm:
      (+[WebBasePluginPackage preferredLocalizationName]): Used
      HardAutorelease() instead of WebCFAutorelease().
      * WebView/WebDeviceOrientationProviderMock.mm:
      (-[WebDeviceOrientationProviderMockInternal lastOrientation]): Stop
      leaking WebDeviceOrientations.
      * WebView/WebPDFRepresentation.mm:
      (-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Used
      HardAutorelease() instead of WebCFAutorelease().
      * WebView/WebView.mm:
      (+[WebView _setCacheModel:]): Ditto.
      (-[WebView _removeObjectForIdentifier:]): Ditto.
      
      Source/WebKit2:
      
      * UIProcess/API/mac/WKBrowsingContextController.mm:
      (autoreleased): Don't leak CFURLs when in Objective-C GC.
      * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
      (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
      Don't leak CFStrings when in Objective-C GC.
      
      Source/WTF:
      
      * wtf/ObjcRuntimeExtras.h:
      (HardAutorelease): Added a canonical implementation of HardAutorelease.
      
      Tools:
      
      * DumpRenderTree/mac/DumpRenderTreePasteboard.m:
      (-[LocalPasteboard initWithName:]): Called [super init] first so that we
      don't later use ivars from the wrong self.
      * DumpRenderTree/mac/TestRunnerMac.mm:
      (-[APITestDelegate initWithCompletionCondition:]): Ditto.
      * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm:
      (TestWebKitAPI::TEST): Don't leak WKProcessGroups,
      WKBrowsingContextGroups, and WKViews.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a872654a
    • ossy@webkit.org's avatar
      [WK2] Buildfix for non Mac platforms · fffbb73f
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=120294
      
      Reviewed by Darin Adler.
      
      * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
      (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
      * NetworkProcess/NetworkResourceLoader.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fffbb73f
    • psolanki@apple.com's avatar
      Page::console() should return a reference · e21e3899
      psolanki@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120320
      
      Reviewed by Darin Adler.
      
      Page::m_console is never NULL so console() can just return a reference.
      
      * css/CSSParser.cpp:
      (WebCore::CSSParser::logError):
      * dom/Document.cpp:
      (WebCore::Document::addConsoleMessage):
      (WebCore::Document::addMessage):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::pageConsole):
      * page/Page.h:
      (WebCore::Page::console):
      * xml/XSLStyleSheetLibxslt.cpp:
      (WebCore::XSLStyleSheet::parseString):
      * xml/XSLTProcessorLibxslt.cpp:
      (WebCore::docLoaderFunc):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e21e3899
    • rwlbuis@webkit.org's avatar
      Lonely stop crashes · a945c700
      rwlbuis@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=87964
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Provide a nodeAtFloatPoint implementation for RenderSVGGradientStop to avoid hitting the assert in RenderObject::nodeAtFloatPoint.
      
      Test: svg/custom/stop-crash-hittest.svg
      
      * rendering/svg/RenderSVGGradientStop.h:
      
      LayoutTests:
      
      Add testcase by taking stop-crash.svg and adding hittest instructions.
      
      * svg/custom/stop-crash-hittest-expected.txt: Added.
      * svg/custom/stop-crash-hittest.svg: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a945c700
    • weinig@apple.com's avatar
      Editor::spellChecker() should return a reference · 35ba0bb9
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120325
      
      Reviewed by Anders Carlsson.
      
      * editing/Editor.cpp:
      (WebCore::Editor::Editor):
      * editing/Editor.h:
      (WebCore::Editor::spellChecker):
      * editing/SpellChecker.cpp:
      (WebCore::SpellChecker::SpellChecker):
      (WebCore::SpellChecker::client):
      (WebCore::SpellChecker::isAsynchronousEnabled):
      (WebCore::SpellChecker::didCheck):
      (WebCore::SpellChecker::didCheckSucceed):
      * editing/SpellChecker.h:
      * page/EditorClient.h:
      * testing/Internals.cpp:
      (WebCore::Internals::lastSpellCheckRequestSequence):
      (WebCore::Internals::lastSpellCheckProcessedSequence):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      35ba0bb9
    • roger_fong@apple.com's avatar
      AppleWin build fix following r154627. · e8a3063f
      roger_fong@apple.com authored
      * WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj:
      * WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj.filters:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e8a3063f
    • bjonesbe@adobe.com's avatar
      Optimize FloatIntervalSearchAdapter::collectIfNeeded · 0b48ff6d
      bjonesbe@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120237
      
      Reviewed by David Hyatt.
      
      Source/WebCore:
      
      This is a port of 3 Blink patches:
      https://codereview.chromium.org/22463002 (By shatch@chromium.org)
      https://chromiumcodereview.appspot.com/22909005 (By me)
      https://chromiumcodereview.appspot.com/23084002 (By me)
      
      shatch optimized FloatIntervalSearchAdapter by having it store the
      outermost float instead of making a bunch of calls to
      logical(Left/Right/Bottom)ForFloat, and then only making that call
      once when heightRemaining needs to be computed.
      
      I noticed that now we were storing both the last float encountered and
      the outermost float, and that the behavior for shape-outside wasn't
      significantly changed by using the outermost float instead of the last
      float encountered (and in most cases, using the outermost float gives
      more reasonable behavior). Since this isn't covered in the spec yet, I
      changed shape-outside to use the outermost float, making it so that we
      only need to store one float pointer when walking the placed floats
      tree, and keeping the performance win.
      
      Also while changing updateOffsetIfNeeded, removed const, since that is
      a lie. Nothing about that method is const.
      
      Test: fast/shapes/shape-outside-floats/shape-outside-floats-outermost.html
      
      * rendering/RenderBlock.cpp:
      (WebCore::::updateOffsetIfNeeded):
      (WebCore::::collectIfNeeded):
      (WebCore::::getHeightRemaining):
      (WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
      (WebCore::RenderBlock::logicalRightFloatOffsetForLine):
      * rendering/RenderBlock.h:
      (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
      (WebCore::RenderBlock::FloatIntervalSearchAdapter::outermostFloat):
      
      LayoutTests:
      
      Test shape-outside behavior when there is more than one float on a
      given line.
      
      * fast/shapes/shape-outside-floats/shape-outside-floats-outermost-expected.html: Added.
      * fast/shapes/shape-outside-floats/shape-outside-floats-outermost.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0b48ff6d
    • ap@apple.com's avatar
      WebKitTestRunner needs to protect the user's pasteboard contents while running · 94145085
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=81419
              <rdar://problem/11066794>
      
              Reviewed by Darin Adler.
      
              Mostly a copy/paste of DRT code.
      
              Tested manually by making sure that editing/pasteboard/copy-image-with-alt-text.html
              doesn't interfere with my clipboard while being run in a loop.
      
              * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
              * WebKitTestRunner/mac/PoseAsClass.h: Added.
              * WebKitTestRunner/mac/PoseAsClass.mm: Added.
              * WebKitTestRunner/mac/TestControllerMac.mm:
              (WTR::TestController::platformInitialize):
              (WTR::TestController::platformDestroy):
              * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.h: Added.
              * WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      94145085
    • ap@apple.com's avatar
      [Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail · 430f15b8
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=113094
      
              Reviewed by Darin Adler.
      
              Mac platform implementation has checks for pasteboard change count, but it
              didn't use to update the count when writing to pasteboad from JavaScript.
      
              * platform/PasteboardStrategy.h: Changed changeCount function to return a long
              instead of an int, as the underlying Mac type is NSInteger. Changed all methods
              that modify the pasteboard to return a new change count.
      
              * platform/PlatformPasteboard.h: Changed all methods that modify the pasteboard
              to return a new change count.
      
              * platform/mac/PasteboardMac.mm:
              (WebCore::Pasteboard::clear): Update m_changeCount.
              (WebCore::Pasteboard::writeSelectionForTypes): Ditto.
              (WebCore::Pasteboard::writePlainText): Ditto.
              (WebCore::writeURLForTypes): Ditto.
              (WebCore::Pasteboard::writeURL): Ditto.
              (WebCore::writeFileWrapperAsRTFDAttachment): Ditto.
              (WebCore::Pasteboard::writeImage): Ditto.
              (WebCore::Pasteboard::writePasteboard): Ditto.
              (WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
              (WebCore::Pasteboard::writeString): Ditto.
      
              * platform/mac/PlatformPasteboardMac.mm:
              (WebCore::PlatformPasteboard::changeCount): Changed returned type to long to avoid
              data loss.
              (WebCore::PlatformPasteboard::copy): Return new change count.
              (WebCore::PlatformPasteboard::addTypes): Ditto.
              (WebCore::PlatformPasteboard::setTypes): Ditto.
              (WebCore::PlatformPasteboard::setBufferForType): Ditto.
              (WebCore::PlatformPasteboard::setPathnamesForType): Ditto.
              (WebCore::PlatformPasteboard::setStringForType): Ditto. Replaced -[NSURL writeToPasteboard:]
              with an equivalent implemnentation that tells use whether writing was successful.
              There is difference with invalid URL string handling - we used to silently ignore
              such requets, but set pasteboard content to empty URL now.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      430f15b8
    • bfulgham@apple.com's avatar
      [Windows] Unreviewed build fix after r154629. · 15802aa3
      bfulgham@apple.com authored
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Add missing build files.
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      15802aa3
    • rniwa@webkit.org's avatar
      Another GTK+ build fix. · 0ed17abb
      rniwa@webkit.org authored
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0ed17abb
    • rniwa@webkit.org's avatar
      GTK+ build fix. Like r154620. · ecee4cb7
      rniwa@webkit.org authored
      * webkit/webkitwebframe.cpp:
      (webkit_web_frame_new):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ecee4cb7
    • rniwa@webkit.org's avatar
      Windows build fix attempt after r154629. · a4cd5517
      rniwa@webkit.org authored
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a4cd5517
    • roger_fong@apple.com's avatar
      Unreviewed. Add missing interface files that were left out in r154627. · 4c1ed0d6
      roger_fong@apple.com authored
      * Interfaces/Accessible2/AccessibleEditableText.idl: Added.
      * Interfaces/Accessible2/AccessibleText.idl: Added.
      * Interfaces/Accessible2/AccessibleText2.idl: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4c1ed0d6
    • mhahnenberg@apple.com's avatar
      JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage does a check on the... · 200865d6
      mhahnenberg@apple.com authored
      JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage does a check on the length of the ArrayStorage after possible reallocing it
      https://bugs.webkit.org/show_bug.cgi?id=120278
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      * runtime/JSObject.cpp:
      (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
      
      LayoutTests: 
      
      * fast/js/put-direct-index-beyond-vector-length-resize-expected.txt: Added.
      * fast/js/put-direct-index-beyond-vector-length-resize.html: Added.
      * fast/js/script-tests/put-direct-index-beyond-vector-length-resize.js: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      200865d6
    • fpizlo@apple.com's avatar
      Fix indention of Executable.h. · 2a2ee96e
      fpizlo@apple.com authored
      Rubber stamped by Mark Hahnenberg.
      
      * runtime/Executable.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2a2ee96e
    • bfulgham@apple.com's avatar
      [Windows] Let Page create the main Frame. · 3eba9c84
      bfulgham@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120323
      
      Reviewed by Anders Carlsson.
      
      * WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebFrameLoaderClient::WebFrameLoaderClient): Remove assertion that frame
      is passed as construction argument.
      (WebFrameLoaderClient::createFrame): Call new 'createSubframeWithOwnerElement'
      * WebCoreSupport/WebFrameLoaderClient.h: Update constructor to
      handle case of no default frame argument.
      (WebFrameLoaderClient::setWebFrame): Added.
      * WebFrame.cpp:
      (WebFrame::createSubframeWithOwnerElement): Renamed from 'init'.
      (WebFrame::initWithWebFrameView): Added for new page-driven load path.
      * WebFrame.h: Added new method signatures.
      * WebView.cpp:
      (WebView::initWithFrame): Update to match behavior of other ports.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3eba9c84
    • mhahnenberg@apple.com's avatar
      Object.defineProperty should be able to create a PropertyDescriptor where m_attributes == 0 · 6441bf1f
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120314
      
      Reviewed by Darin Adler.
      
      Currently with the way that defineProperty works, we leave a stray low bit set in 
      PropertyDescriptor::m_attributes in the following code:
      
      var o = {};
      Object.defineProperty(o, 100, {writable:true, enumerable:true, configurable:true, value:"foo"});
              
      This is due to the fact that the lowest non-zero attribute (ReadOnly) is represented as 1 << 1 
      instead of 1 << 0. We then calculate the default attributes as (DontDelete << 1) - 1, which is 0xF, 
      but only the top three bits mean anything. Even in the case above, the top three bits are set 
      to 0 but the bottom bit remains set, which causes us to think m_attributes is non-zero.
      
      Since some of these attributes and their corresponding values are exposed in the JavaScriptCore 
      framework's public C API, it's safer to just change how we calculate the default value, which is
      where the weirdness was originating from in the first place.
      
      * runtime/PropertyDescriptor.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6441bf1f
    • weinig@apple.com's avatar
      Add support for Promises · bd760697
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120260
      
      Reviewed by Darin Adler.
      
      Source/JavaScriptCore: 
      
      Add an initial implementation of Promises - http://dom.spec.whatwg.org/#promises.
      - Despite Promises being defined in the DOM, the implementation is being put in JSC
        in preparation for the Promises eventually being defined in ECMAScript.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * DerivedSources.pri:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      Add new files.
      
      * jsc.cpp:
      Update jsc's GlobalObjectMethodTable to stub out the new QueueTaskToEventLoop callback. This mean's
      you can't quite use Promises with with the command line tool yet.
          
      * interpreter/CallFrame.h:
      (JSC::ExecState::promisePrototypeTable):
      (JSC::ExecState::promiseConstructorTable):
      (JSC::ExecState::promiseResolverPrototypeTable):
      * runtime/VM.cpp:
      (JSC::VM::VM):
      (JSC::VM::~VM):
      * runtime/VM.h:
      Add supporting code for the new static lookup tables.
      
      * runtime/CommonIdentifiers.h:
      Add 3 new identifiers, "Promise", "PromiseResolver", and "then".
      
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::visitChildren):
      Add supporting code Promise and PromiseResolver's constructors and structures.
      
      * runtime/JSGlobalObject.h:
      (JSC::TaskContext::~TaskContext):
      Add a new callback to the GlobalObjectMethodTable to post a task on the embedder's runloop.
      
      (JSC::JSGlobalObject::promisePrototype):
      (JSC::JSGlobalObject::promiseResolverPrototype):
      (JSC::JSGlobalObject::promiseStructure):
      (JSC::JSGlobalObject::promiseResolverStructure):
      (JSC::JSGlobalObject::promiseCallbackStructure):
      (JSC::JSGlobalObject::promiseWrapperCallbackStructure):
      Add supporting code Promise and PromiseResolver's constructors and structures.
      
      * runtime/JSPromise.cpp: Added.
      * runtime/JSPromise.h: Added.
      * runtime/JSPromiseCallback.cpp: Added.
      * runtime/JSPromiseCallback.h: Added.
      * runtime/JSPromiseConstructor.cpp: Added.
      * runtime/JSPromiseConstructor.h: Added.
      * runtime/JSPromisePrototype.cpp: Added.
      * runtime/JSPromisePrototype.h: Added.
      * runtime/JSPromiseResolver.cpp: Added.
      * runtime/JSPromiseResolver.h: Added.
      * runtime/JSPromiseResolverConstructor.cpp: Added.
      * runtime/JSPromiseResolverConstructor.h: Added.
      * runtime/JSPromiseResolverPrototype.cpp: Added.
      * runtime/JSPromiseResolverPrototype.h: Added.
      Add Promise implementation.
      
      Source/WebCore: 
      
      Add an initial implementation of Promises - http://dom.spec.whatwg.org/#promises.
      - Despite Promises being defined in the DOM, the implementation is being put in JSC
        in preparation for the Promises eventually being defined in ECMAScript.
      
      Tests: fast/js/Promise-already-fulfilled.html
             fast/js/Promise-already-rejected.html
             fast/js/Promise-already-resolved.html
             fast/js/Promise-catch-in-workers.html
             fast/js/Promise-catch.html
             fast/js/Promise-chain.html
             fast/js/Promise-exception.html
             fast/js/Promise-fulfill-in-workers.html
             fast/js/Promise-fulfill.html
             fast/js/Promise-init-in-workers.html
             fast/js/Promise-init.html
             fast/js/Promise-reject-in-workers.html
             fast/js/Promise-reject.html
             fast/js/Promise-resolve-chain.html
             fast/js/Promise-resolve-in-workers.html
             fast/js/Promise-resolve-with-then-exception.html
             fast/js/Promise-resolve-with-then-fulfill.html
             fast/js/Promise-resolve-with-then-reject.html
             fast/js/Promise-resolve.html
             fast/js/Promise-simple-fulfill-inside-callback.html
             fast/js/Promise-simple-fulfill.html
             fast/js/Promise-simple-in-workers.html
             fast/js/Promise-simple.html
             fast/js/Promise-static-fulfill.html
             fast/js/Promise-static-reject.html
             fast/js/Promise-static-resolve.html
             fast/js/Promise-then-in-workers.html
             fast/js/Promise-then-without-callbacks-in-workers.html
             fast/js/Promise-then-without-callbacks.html
             fast/js/Promise-then.html
             fast/js/Promise-types.html
             fast/js/Promise.html
      
      * GNUmakefile.list.am:
      * Target.pri:
      * UseJSC.cmake:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSBindingsAllInOne.cpp:
      Add new files.
      
      * bindings/js/JSDOMGlobalObjectTask.cpp: Added.
      (WebCore::JSGlobalObjectCallback::create):
      (WebCore::JSGlobalObjectCallback::~JSGlobalObjectCallback):
      (WebCore::JSGlobalObjectCallback::call):
      (WebCore::JSGlobalObjectCallback::JSGlobalObjectCallback):
      (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
      (WebCore::JSGlobalObjectTask::~JSGlobalObjectTask):
      (WebCore::JSGlobalObjectTask::performTask):
      * bindings/js/JSDOMGlobalObjectTask.h: Added.
      (WebCore::JSGlobalObjectTask::create):
      Add a new task type to be used with the GlobalObjectMethodTable's new QueueTaskToEventLoop callback.
      
      * bindings/js/JSDOMWindowBase.cpp:
      (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
      * bindings/js/JSDOMWindowBase.h:
      Implement the GlobalObjectMethodTable callback, QueueTaskToEventLoop. 
      
      * bindings/js/JSMainThreadExecState.h:
      All using JSMainThreadExecState as a simple RAII object.
      
      * bindings/js/JSWorkerGlobalScopeBase.cpp:
      (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
      (WebCore::JSWorkerGlobalScopeBase::allowsAccessFrom):
      (WebCore::JSWorkerGlobalScopeBase::supportsProfiling):
      (WebCore::JSWorkerGlobalScopeBase::supportsRichSourceInfo):
      (WebCore::JSWorkerGlobalScopeBase::shouldInterruptScript):
      (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled):
      (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
      * bindings/js/JSWorkerGlobalScopeBase.h:
      Add a GlobalObjectMethodTable and implement QueueTaskToEventLoop. Forward the other callbacks
      to JSGlobalObject so they retain their existing behavior.
      
      LayoutTests: 
      
      Add tests adapted from the Mozilla and Blink projects.
      
      * fast/js/Promise-already-fulfilled-expected.txt: Added.
      * fast/js/Promise-already-fulfilled.html: Added.
      * fast/js/Promise-already-rejected-expected.txt: Added.
      * fast/js/Promise-already-rejected.html: Added.
      * fast/js/Promise-already-resolved-expected.txt: Added.
      * fast/js/Promise-already-resolved.html: Added.
      * fast/js/Promise-catch-expected.txt: Added.
      * fast/js/Promise-catch-in-workers-expected.txt: Added.
      * fast/js/Promise-catch-in-workers.html: Added.
      * fast/js/Promise-catch.html: Added.
      * fast/js/Promise-chain-expected.txt: Added.
      * fast/js/Promise-chain.html: Added.
      * fast/js/Promise-exception-expected.txt: Added.
      * fast/js/Promise-exception.html: Added.
      * fast/js/Promise-expected.txt: Added.
      * fast/js/Promise-fulfill-expected.txt: Added.
      * fast/js/Promise-fulfill-in-workers-expected.txt: Added.
      * fast/js/Promise-fulfill-in-workers.html: Added.
      * fast/js/Promise-fulfill.html: Added.
      * fast/js/Promise-init-expected.txt: Added.
      * fast/js/Promise-init-in-workers-expected.txt: Added.
      * fast/js/Promise-init-in-workers.html: Added.
      * fast/js/Promise-init.html: Added.
      * fast/js/Promise-reject-expected.txt: Added.
      * fast/js/Promise-reject-in-workers-expected.txt: Added.
      * fast/js/Promise-reject-in-workers.html: Added.
      * fast/js/Promise-reject.html: Added.
      * fast/js/Promise-resolve-chain-expected.txt: Added.
      * fast/js/Promise-resolve-chain.html: Added.
      * fast/js/Promise-resolve-expected.txt: Added.
      * fast/js/Promise-resolve-in-workers-expected.txt: Added.
      * fast/js/Promise-resolve-in-workers.html: Added.
      * fast/js/Promise-resolve-with-then-exception-expected.txt: Added.
      * fast/js/Promise-resolve-with-then-exception.html: Added.
      * fast/js/Promise-resolve-with-then-fulfill-expected.txt: Added.
      * fast/js/Promise-resolve-with-then-fulfill.html: Added.
      * fast/js/Promise-resolve-with-then-reject-expected.txt: Added.
      * fast/js/Promise-resolve-with-then-reject.html: Added.
      * fast/js/Promise-resolve.html: Added.
      * fast/js/Promise-simple-expected.txt: Added.
      * fast/js/Promise-simple-fulfill-expected.txt: Added.
      * fast/js/Promise-simple-fulfill-inside-callback-expected.txt: Added.
      * fast/js/Promise-simple-fulfill-inside-callback.html: Added.
      * fast/js/Promise-simple-fulfill.html: Added.
      * fast/js/Promise-simple-in-workers-expected.txt: Added.
      * fast/js/Promise-simple-in-workers.html: Added.
      * fast/js/Promise-simple.html: Added.
      * fast/js/Promise-static-fulfill-expected.txt: Added.
      * fast/js/Promise-static-fulfill.html: Added.
      * fast/js/Promise-static-reject-expected.txt: Added.
      * fast/js/Promise-static-reject.html: Added.
      * fast/js/Promise-static-resolve-expected.txt: Added.
      * fast/js/Promise-static-resolve.html: Added.
      * fast/js/Promise-then-expected.txt: Added.
      * fast/js/Promise-then-in-workers-expected.txt: Added.
      * fast/js/Promise-then-in-workers.html: Added.
      * fast/js/Promise-then-without-callbacks-expected.txt: Added.
      * fast/js/Promise-then-without-callbacks-in-workers-expected.txt: Added.
      * fast/js/Promise-then-without-callbacks-in-workers.html: Added.
      * fast/js/Promise-then-without-callbacks.html: Added.
      * fast/js/Promise-then.html: Added.
      * fast/js/Promise-types-expected.txt: Added.
      * fast/js/Promise-types.html: Added.
      * fast/js/Promise.html: Added.
      * fast/js/resources/Promise-catch-in-workers.js: Added.
      * fast/js/resources/Promise-fulfill-in-workers.js: Added.
      * fast/js/resources/Promise-init-in-workers.js: Added.
      * fast/js/resources/Promise-reject-in-workers.js: Added.
      * fast/js/resources/Promise-resolve-in-workers.js: Added.
      * fast/js/resources/Promise-simple-in-workers.js: Added.
      * fast/js/resources/Promise-then-in-workers.js: Added.
      * fast/js/resources/Promise-then-without-callbacks-in-workers.js: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd760697
    • rwlbuis@webkit.org's avatar
      Computed style of fill/stroke properties incorrect on references · 50fbb5b1
      rwlbuis@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114761
      
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      The computed style of the fill and stroke properties did not include
      the url() function. Added the url() string to output.
      
      Updated existing tests to cover the issue.
      
      * css/CSSPrimitiveValue.cpp: Cleanup.
      (WebCore::CSSPrimitiveValue::customCssText):
      * svg/SVGPaint.cpp: Added "url("
      (WebCore::SVGPaint::customCssText):
      
      LayoutTests:
      
      Add tests to verify that url function is included for references.
      
      * svg/css/script-tests/svg-attribute-parser-mode.js:
      * svg/css/svg-attribute-parser-mode-expected.txt:
      * transitions/svg-transitions-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      50fbb5b1
    • roger_fong@apple.com's avatar
      <https://bugs.webkit.org/show_bug.cgi?id=119829> Add IAccessibleText and... · cdc57e72
      roger_fong@apple.com authored
      <https://bugs.webkit.org/show_bug.cgi?id=119829> Add IAccessibleText and IAccessibleEditableText interfaces and implementation to AppleWin port.
      
      Reviewed by Chris Fleizach.
      
      * AccessibleBase.cpp:
      (AccessibleBase::createInstance): Create an AccessibleText instance when necessary.
      (AccessibleBase::QueryService):
      * AccessibleBase.h:
      * AccessibleTextImpl.cpp: Added.
      (AccessibleText::AccessibleText):
      (AccessibleText::addSelection):
      (AccessibleText::get_attributes): Not Implemented
      (AccessibleText::get_caretOffset):
      (AccessibleText::get_characterExtents):
      (AccessibleText::get_nSelections):
      (AccessibleText::get_offsetAtPoint):
      (AccessibleText::get_selection):
      (AccessibleText::get_text):
      (AccessibleText::get_textBeforeOffset): Not Implemented
      (AccessibleText::get_textAfterOffset): Not Implemented
      (AccessibleText::get_textAtOffset): Not Implemented
      (AccessibleText::removeSelection):
      (AccessibleText::setCaretOffset):
      (AccessibleText::setSelection):
      (AccessibleText::get_nCharacters):
      (AccessibleText::scrollSubstringTo):
      (AccessibleText::scrollSubstringToPoint):
      (AccessibleText::get_newText): Not Implemented
      (AccessibleText::get_oldText): Not Implemented
      (AccessibleText::get_attributeRange): Not Implemented
      (AccessibleText::copyText):
      (AccessibleText::deleteText):
      (AccessibleText::insertText):
      (AccessibleText::cutText):
      (AccessibleText::pasteText):
      (AccessibleText::replaceText):
      (AccessibleText::setAttributes): Not Implemented
      (AccessibleText::QueryInterface):
      (AccessibleText::Release):
      (AccessibleText::convertSpecialOffset):
      (AccessibleText::initialCheck):
      * AccessibleTextImpl.h: Added.
      (AccessibleText::~AccessibleText):
      (AccessibleText::AddRef):
      * WebKit.vcxproj/Interfaces/Interfaces.vcxproj:
      * WebKit.vcxproj/Interfaces/Interfaces.vcxproj.filters:
      * WebKit.vcxproj/WebKit/WebKit.vcxproj:
      * WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:
      * WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj:
      * WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj.filters:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cdc57e72
    • zandobersek@gmail.com's avatar
      Plenty of -Wcast-align warnings in KeywordLookup.h · fbef8ed9
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120316
      
      Reviewed by Darin Adler.
      
      * KeywordLookupGenerator.py: Use reinterpret_cast instead of a C-style cast when casting
      the character pointers to types of larger size. This avoids spewing lots of warnings
      in the KeywordLookup.h header when compiling with the -Wcast-align option.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fbef8ed9
    • zandobersek@gmail.com's avatar
      Undefine __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS before redefining them · f3534a56
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120313
      
      Reviewed by Darin Adler.
      
      * wtf/LLVMHeaders.h: Undefine the two macros before they are defined again.
      This way we avoid the compilation-time warnings about the macros being invalidly redefined.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3534a56
    • zandobersek@gmail.com's avatar
      Prettify generated build guards in HTMLElementFactory.cpp · 289f739f
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120310
      
      Reviewed by Darin Adler.
      
      Build guards should wrap the constructor definitions without empty lines between
      the guards and the constructor code. Similarly, build guards for addTag calls
      shouldn't put an empty line after the build guard closure.
      
      * dom/make_names.pl:
      (printConstructorInterior):
      (printConstructors):
      (printFunctionInits):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154623 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      289f739f
    • robert@webkit.org's avatar
      Avoid painting every non-edge collapsed border twice over · db937eab
      robert@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=119759
      
      Reviewed by David Hyatt.
      
      Source/WebCore:
      
      Every collapsed border that isn't on the edge of a table gets painted at least twice, once by each
      adjacent cell. The joins are painted four times. This is unnecessary and results in tables with semi-transparent
      borders getting rendered incorrectly - each border adjoing two cells is painted twice and ends up darker than it should be.
      
      Fixing the overpainting at joins is another day's work. This patch ensures each collapsed border inside a table is only
      painted once. It does this by only allowing cells at the top and left edge of the table to paint their top and left collapsed borders.
      All the others can only paint their right and bottom collapsed border. This works because the borders are painted from bottom right to top left.
      
      Tests: fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl.html
             fast/table/border-collapsing/collapsed-borders-adjoining-sections.html
      
      * rendering/RenderTableCell.cpp:
      (WebCore::RenderTableCell::paintCollapsedBorders):
      
      LayoutTests:
      
      * fast/table/border-collapsing/collapsed-borders-adjoining-sections-expected.html: Added.
      * fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl-expected.png: Added.
      * fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl-expected.txt: Added.
          The painting here, though still wrong, is a progression on the behaviour prior to bug 11759 where
          the left border was painted twice. The painting can be resolved completely when we no longer paint
          twice at the border joins.
      * fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl.html: Added.
      * fast/table/border-collapsing/collapsed-borders-adjoining-sections.html: Added.
      * fast/table/border-collapsing/collapsed-borders-painted-once-on-inner-cells-expected.png: Added.
      * fast/table/border-collapsing/collapsed-borders-painted-once-on-inner-cells-expected.txt: Added.
      * fast/table/border-collapsing/collapsed-borders-painted-once-on-inner-cells.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154622 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      db937eab
    • akling@apple.com's avatar
      Unreviewed build fix. · ccc2ab74
      akling@apple.com authored
      Source/WebCore:
      
      * page/Page.cpp:
      (WebCore::Page::setNeedsRecalcStyleInAllFrames):
      
      Source/WebKit/mac:
      
      * WebView/WebFrame.mm:
      (+[WebFrame _createMainFrameWithPage:frameName:frameView:]):
      
      Source/WebKit2:
      
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::createWithCoreMainFrame):
      (WebKit::WebFrame::createSubframe):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ccc2ab74
    • bfulgham@apple.com's avatar
      Unreviewed buid fix. · cedcea8d
      bfulgham@apple.com authored
      * page/Page.cpp: 
      (WebCore::Page::setNeedsRecalcStyleInAllFrames): Remove extra '{' character.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cedcea8d
    • psolanki@apple.com's avatar
      PageGroup::groupSettings() should return a reference · 95fe3e51
      psolanki@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120319
      
      Reviewed by Andreas Kling.
      
      PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
      
      Source/WebCore:
      
      * Modules/indexeddb/IDBFactory.cpp:
      * page/PageGroup.h:
      (WebCore::PageGroup::groupSettings):
      * storage/StorageNamespaceImpl.cpp:
      (WebCore::StorageNamespaceImpl::localStorageNamespace):
      * workers/DefaultSharedWorkerRepository.cpp:
      (WebCore::SharedWorkerProxy::groupSettings):
      * workers/WorkerMessagingProxy.cpp:
      (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
      
      Source/WebKit/blackberry:
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebdatabase.cpp:
      (webkit_set_web_database_directory_path):
      
      Source/WebKit2:
      
      * WebProcess/Storage/StorageNamespaceImpl.cpp:
      (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154618 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      95fe3e51
    • akling@apple.com's avatar
      WebCore: Let Page create the main Frame. · 8e830e40
      akling@apple.com authored
      <https://webkit.org/b/119964>
      
      Source/WebCore:
      
      Reviewed by Anders Carlsson.
      
      Previously, Frame::create() would call Page::setMainFrame() when constructing the
      main Frame for a Page. Up until that point, Page had a null mainFrame().
      
      To guarantee that Page::mainFrame() is never null, we re-order things so that
      Page is responsible for creating its own main Frame. We do this at the earliest
      possible point; in the Page constructor initializer list.
      
      Constructing a Frame requires a FrameLoaderClient*, so I've added such a field to
      the PageClients struct.
      
      When creating a WebKit-layer frame, we now wrap the already-instantiated
      Page::mainFrame() instead of creating a new Frame.
      
      * loader/EmptyClients.cpp:
      (WebCore::fillWithEmptyClients):
      
          Add an EmptyFrameLoaderClient to the PageClients constructed here.
      
      * inspector/InspectorOverlay.cpp:
      (WebCore::InspectorOverlay::overlayPage):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::dataChanged):
      
          Updated to wrap Page::mainFrame() in a FrameView instead of creating their
          own Frame manually.
      
      * page/Frame.cpp:
      (WebCore::Frame::create):
      * page/Page.h:
      
          Remove Page::setMainFrame() and the only call site.
      
      * page/Page.cpp:
      (WebCore::Page::Page):
      
          Construct Page::m_mainFrame in the initializer list.
      
      (WebCore::Page::PageClients::PageClients):
      
          Add "FrameLoaderClient* loaderClientForMainFrame" to PageClients.
      
      (WebCore::Page::setNeedsRecalcStyleInAllFrames):
      
          Null-check the Frame::document() before calling through on it. This would
          otherwise crash when changing font-related Settings before calling init() on
          the Frame (like InspectorOverlay does.)
      
      Source/WebKit/gtk:
      
      Tweak WebKit1/GTK for changes in WebCore.
      
      Patch by Zan Dobersek <zdobersek@igalia.com>
      Reviewed by Gustavo Noronha Silva.
      
      * WebCoreSupport/FrameLoaderClientGtk.h:
      (WebKit::FrameLoaderClient::setWebFrame):
      * webkit/webkitwebframe.cpp:
      (webkit_web_frame_new):
      * webkit/webkitwebview.cpp:
      (webkit_web_view_init):
      
      Source/WebKit/mac:
      
      Reviewed by Anders Carlsson.
      
      * WebCoreSupport/WebFrameLoaderClient.h:
      (WebFrameLoaderClient::setWebFrame):
      
          Make it possible to construct a WebFrameLoaderClient with a null WebFrame*.
          A WebFrame* is later hooked up with a call to setWebFrame().
      
      * WebView/WebFrame.mm:
      (+[WebFrame _createMainFrameWithPage:frameName:frameView:]):
      
          Customized this method to wrap the Page::mainFrame() instead of creating a
          new Frame.
      
      * WebView/WebView.mm:
      (-[WebView _commonInitializationWithFrameName:groupName:]):
      
          Add a WebFrameLoaderClient to the PageClients passed to Page().
      
      Source/WebKit2:
      
      Reviewed by Anders Carlsson.
      
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
      
          This starts out with a null WebFrame* pointer now.
      
      (WebKit::WebFrameLoaderClient::setWebFrame):
      
          WebFrame hooks itself up through this as soon as it's constructed.
      
      (WebKit::WebFrameLoaderClient::frameLoaderDestroyed):
      
          Tweak an out-of-date comment. The ref() we're balancing out comes from
          WebFrame::create().
      
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::createWithCoreMainFrame):
      
          Rewrote createMainFrame() as createWithCoreMainFrame(). The new method wraps
          an existing WebCore::Frame instead of creating a new one.
      
      (WebKit::WebFrame::createSubframe):
      
          Merged WebFrame::init() into here since the logic isn't shared with main
          Frame creation anymore.
      
      (WebKit::WebFrame::create):
      (WebKit::WebFrame::WebFrame):
      
          Call WebFrameLoaderClient::setWebFrame(this).
      
      * WebProcess/WebPage/WebFrame.h:
      
          WebFrame::m_frameLoaderClient is now an OwnPtr rather than an inline member.
          This way it can be created before the WebFrame.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::WebPage):
      
          Set up a WebFrameLoaderClient and pass it to the Page constructor along with
          the other PageClients.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e830e40
    • bfulgham@apple.com's avatar
      [Windows] Unreviewed build fix. · 613d91e0
      bfulgham@apple.com authored
      * rendering/RenderMediaControls.cpp: Remove references to QuickTime controls
      that are no longer part of WKSI.
      (wkHitTestMediaUIPart): 
      (wkMeasureMediaUIPart):
      (wkDrawMediaUIPart):
      (wkDrawMediaSliderTrack):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      613d91e0
    • commit-queue@webkit.org's avatar
      <https://webkit.org/b/106133> document.body.scrollTop &... · 1cff1882
      commit-queue@webkit.org authored
      <https://webkit.org/b/106133> document.body.scrollTop & document.documentElement.scrollTop differ cross-browser
      
      Patch by Gurpreet Kaur <gur.trio@gmail.com> on 2013-08-26
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      Webkit always uses document.body.scrollTop whether quirks or
      standard mode. Similiar behaviour is for document.body.scrollLeft.
      As per the specification webkit should return document.body.scrollTop
      for quirks mode and document.documentElement.scrollTop for standard mode.
      Same for document.body.scrollLeft and document.documentElement.scrollLeft.
      
      Tests: fast/dom/Element/scrollLeft-Quirks.html
             fast/dom/Element/scrollLeft.html
             fast/dom/Element/scrollTop-Quirks.html
             fast/dom/Element/scrollTop.html
      
      * dom/Element.cpp:
      (WebCore::Element::scrollLeft):
      (WebCore::Element::scrollTop):
      If the element does not have any associated CSS layout box or the element
      is the root element and the Document is in quirks mode return zero.
      Else If the element is the root element return the value of scrollY
      for scrollTop and scrollX for scrollLeft.
      * html/HTMLBodyElement.cpp:
      (WebCore::HTMLBodyElement::scrollLeft):
      (WebCore::HTMLBodyElement::scrollTop):
      If the element is the HTML body element, the Document is in quirks mode,
      return the value of scrollY for scrollTop and scrollX for scrollLeft.
      
      LayoutTests:
      
      * fast/dom/Element/scrollLeft-Quirks-expected.txt: Added.
      * fast/dom/Element/scrollLeft-Quirks.html: Added.
      * fast/dom/Element/scrollLeft-expected.txt: Added.
      * fast/dom/Element/scrollLeft.html: Added.
      * fast/dom/Element/scrollTop-Quirks-expected.txt: Added.
      * fast/dom/Element/scrollTop-Quirks.html: Added.
      * fast/dom/Element/scrollTop-expected.txt: Added.
      * fast/dom/Element/scrollTop.html: Added.
      Added new tests for verifying our behavior for document.body.scrollTop/scrollLeft and
      document.documentElement.scrollTop/scrollLeft for both Quirks as well as Standard mode.
      
      * fast/css/zoom-body-scroll-expected.txt:
      * fast/css/zoom-body-scroll.html:
      * fast/events/mouse-cursor.html:
      * http/tests/navigation/anchor-frames-expected.txt:
      * http/tests/navigation/anchor-frames-gbk-expected.txt:
      * http/tests/navigation/resources/frame-with-anchor-gbk.html:
      * http/tests/navigation/resources/frame-with-anchor-same-origin.html:
      * http/tests/navigation/resources/frame-with-anchor.html:
      * platform/mac-wk2/tiled-drawing/resources/scroll-and-load-page.html:
      * platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:
      * platform/win/fast/css/zoom-body-scroll-expected.txt:
      Rebaselining existing tests as per the new behavior. The test cases are changed to use
      quirks mode because it uses document.body.scrollTop/scrollLeft and as per the new code
      document.body.scrollTop/scrollLeft will return correct value if document is in quirk mode
      Also test cases have been modified so that it tests what it used to.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1cff1882
    • antti@apple.com's avatar
      REGRESSION (r154581): Some plugin tests failing in debug bots · 3fad2303
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120315
      
      Reviewed by Darin Adler.
              
      We are hitting the new no-event-dispatch-while-iterating assertion.
      
      Detaching deletes a plugin which modifies DOM while it dies.
      
      * dom/Document.cpp:
      (WebCore::Document::createRenderTree):
      (WebCore::Document::detach):
              
          Don't iterate at all. Document never has more than one Element child anyway.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3fad2303
    • barraclough@apple.com's avatar
      RegExpMatchesArray should not call [[put]] · 49a919a4
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=120317
      
      Reviewed by Oliver Hunt.
      
      This will call accessors on the JSObject/JSArray prototypes - so adding an accessor or read-only
      property called index or input to either of these prototypes will result in broken behavior.
      
      Source/JavaScriptCore: 
      
      * runtime/RegExpMatchesArray.cpp:
      (JSC::RegExpMatchesArray::reifyAllProperties):
          - put -> putDirect
      
      LayoutTests: 
      
      * fast/regex/lastIndex-expected.txt:
      * fast/regex/script-tests/lastIndex.js:
          - Added test
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      49a919a4
    • oliver@apple.com's avatar
      Building is so overrated. · 89147735
      oliver@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      89147735
    • oliver@apple.com's avatar
      Disable compression under MSVC for now · 1ac5b651
      oliver@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154610 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1ac5b651
    • bfulgham@apple.com's avatar
      [Windows] Updates to WKSI to get external builders working. · 84c36802
      bfulgham@apple.com authored
      * win/include/WebKitSystemInterface/WebKitSystemInterface.h:
      * win/lib32/WebKitSystemInterface.lib:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84c36802
    • ddkilzer@apple.com's avatar
      BUILD FIX (r154580): RenderObject::document() returns a reference · 7389ed76
      ddkilzer@apple.com authored
      See: <https://webkit.org/b/120272>
      
      * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
      (-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
      (AXAttributeStringSetHeadingLevel):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7389ed76
    • bfulgham@apple.com's avatar
      [Windows] Build fix after r154541. · 3e63670f
      bfulgham@apple.com authored
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Remove reference
      to deleted Element::pseudoElement(PseudoID), and add exports for new
      beforePseudoElement() and afterPseudoElement().
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e63670f