1. 15 Oct, 2012 33 commits
    • jcivelli@chromium.org's avatar
      Calling WebCore::SharedBuffer::append(data, 0) on a shared buffer when · 18ade61c
      jcivelli@chromium.org authored
      its current position is at a segment boundary (4096) ends up adding an
      unitialized segment (with uninitialized memory) to the SharedBuffer.
      https://bugs.webkit.org/show_bug.cgi?id=99000
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      * platform/SharedBuffer.cpp:
      (WebCore::SharedBuffer::append):
      
      LayoutTests:
      
      * mhtml/shared_buffer_bug-expected.txt: Added.
      * mhtml/shared_buffer_bug.mht: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      18ade61c
    • tonikitoo@webkit.org's avatar
      [BlackBerry] Clean up BackingStoreClient (part II) · ae434975
      tonikitoo@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99327
      
      Reviewed by Yong Li.
      Patch by Antonio Gomes <agomes@rim.com>
      
      Remove more unneeded BackingStoreClient <-> WebPageClient integration
      methods:
      - BackingStoreClient* backingStoreClientForFrame(...)
      - void addBackingStoreClientForFrame(...)
      - void removeBackingStoreClientForFrame(...)
      
      Change places calling WPPriv::backingStoreClientForFrame to directly
      access WPPriv::backingStoreClient instead, since only the main frame will
      have a BackingStoreClient instance associated with it, and it is owned by
      the WKPriv.
      
      Remove non-mainframe only references to BackingStoreClient completely,
      since it is dead code now.
      
      * Api/InRegionScroller.cpp:
      (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::backingStoreClient):
      (BlackBerry::WebKit::WebPage::destroy):
      * Api/WebPage_p.h:
      (WebPagePrivate):
      * WebCoreSupport/ChromeClientBlackBerry.cpp:
      (WebCore::ChromeClientBlackBerry::invalidateContentsForSlowScroll):
      (WebCore::ChromeClientBlackBerry::scroll):
      * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
      (WebCore::FrameLoaderClientBlackBerry::transitionToCommittedForNewPage):
      (WebCore::FrameLoaderClientBlackBerry::createFrame):
      (WebCore::FrameLoaderClientBlackBerry::detachedFromParent2):
      * WebKitSupport/BackingStoreClient.cpp:
      (BlackBerry::WebKit::BackingStoreClient::create):
      (BlackBerry::WebKit::BackingStoreClient::BackingStoreClient):
      (BlackBerry::WebKit::BackingStoreClient::~BackingStoreClient):
      * WebKitSupport/BackingStoreClient.h:
      (BackingStoreClient):
      * WebKitSupport/InputHandler.cpp:
      (BlackBerry::WebKit::InputHandler::setBatchEditingActive):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ae434975
    • macpherson@chromium.org's avatar
      Make CSS variable names case-insensitive. · 4a8b3d82
      macpherson@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98712
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      This patch modifies the parser to normalize all variable names to lower case,
      making variable definitions consistent with other property names, which are also case insensitive.
      Spec: http://dev.w3.org/csswg/css-variables/#defining-variables
      
      Test: fast/css/variables/case-insensitive.html
      
      * css/CSSParser.cpp:
      (WebCore::CSSParser::createPrimitiveNumericValue):
      (WebCore):
      (WebCore::CSSParser::createPrimitiveVariableNameValue):
      (WebCore::CSSParser::parseValidPrimitive):
      (WebCore::CSSParser::parseValue):
      (WebCore::CSSParser::storeVariableDeclaration):
      (WebCore::CSSParserString::lowerSubstring):
      Added function to compute a lower case substring as an AtomicString from a CSSParserString.
      * css/CSSParser.h:
      (CSSParser):
      * css/CSSParserValues.h:
      (CSSParserString):
      (WebCore::CSSParserString::lowerSubstring):
      
      LayoutTests:
      
      Add test that variable names are match correctly when different case is used.
      
      * fast/css/variables/case-insensitive-expected.html: Added.
      * fast/css/variables/case-insensitive.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a8b3d82
    • commit-queue@webkit.org's avatar
      [EFL][EWebLauncher] Add encoding detector option. · c0f17de9
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98726
      
      Patch by Kangil Han <kangil.han@samsung.com> on 2012-10-15
      Reviewed by Gyuyoung Kim.
      
      Added an option to test WebCore's encoding detector functionality on EWebLauncher.
      With this patch, EWebLauncher would display text correctly even if web page wouldn't specify charset information.
      
      * EWebLauncher/main.c:
      (_User_Arguments):
      (windowCreate):
      (parseUserArguments):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c0f17de9
    • msaboff@apple.com's avatar
      Update RenderText to use String instead of UChar* for text · 776c286c
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=96979
      
      Reviewed by Dan Bernstein.
      
      Source/WebCore: 
      
      RenderText now uses a String for text.  It keeps a cached LCHar* or UChar* pointer to the
      actual text data for performance.  Added a characterAt() indexed accessor to RenderText to avoid the
      somewhat confusing construct for a RenderText* rt, e.g. (*re)[n] or rt->characters()[n].  This is
      now written as rt->characterAt(n).
      Enabled patch in the HTML parser to create 8 bit text data.  Modified TextRun to create 
      text runs using 8 bit string data where possible.  Added several flavors of RenderBlock::constructTextRun
      to create TextRuns from RenderText objects including with an offset.  Added an LChar flavor of constructTextRun()
      as well.  Eliminated the TextRunFlags argument to all but the String flavor as all other flavors used the default
      parameter.  
      Encased the code that creates 8 bit TextRun's in #if USE(8BIT_TEXTRUN).  Enabled WTF_USE_8BIT_TEXTRUN
      for PLATFORM(MAC).  Other platform can update this setting in Platform.h when their platform specific code is
      updated to TextRun's with 8 bit data.
      Added many 8/16 bit aware paths.  Cleanup up some int / unsigned confusion in RenderBlockLineLayout.cpp.
      
      No function change therefore no new tests.
      
      * html/parser/HTMLTokenizer.cpp:
      (WebCore::vectorEqualsString):
      (WebCore::HTMLTokenizer::nextToken):
      * html/parser/HTMLTokenizer.h:
      (HTMLTokenizer):
      * html/track/WebVTTTokenizer.cpp:
      (WebCore::vectorEqualsString):
      (WebCore::WebVTTTokenizer::nextToken):
      * html/track/WebVTTTokenizer.h:
      (WebVTTTokenizer):
      * platform/graphics/Font.h:
      (WebCore::Font::glyphDataForCharacter):
      * platform/graphics/FontFastPath.cpp:
      (WebCore):
      * platform/graphics/TextRun.h:
      (WebCore::TextRun::TextRun):
      (WebCore::TextRun::subRun):
      (TextRun):
      * platform/graphics/mac/ComplexTextController.cpp:
      (WebCore::TextLayout::isNeeded):
      (WebCore::TextLayout::constructTextRun):
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
      * rendering/InlineIterator.h:
      (WebCore::InlineIterator::atTextParagraphSeparator):
      (WebCore::InlineIterator::current):
      (WebCore::InlineIterator::previousInSameNode):
      * rendering/InlineTextBox.cpp:
      (WebCore::adjustCharactersAndLengthForHyphen):
      (WebCore::InlineTextBox::paint):
      (WebCore::InlineTextBox::paintSelection):
      (WebCore::InlineTextBox::constructTextRun):
      * rendering/InlineTextBox.h:
      (InlineTextBox):
      * rendering/RenderBlock.cpp:
      (WebCore::constructTextRunInternal):
      (WebCore::RenderBlock::constructTextRun):
      * rendering/RenderBlock.h:
      (RenderBlock):
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::endsWithASCIISpaces):
      (WebCore::reachedEndOfTextRenderer):
      (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
      (WebCore::shouldSkipWhitespaceAfterStartObject):
      (WebCore::textWidth):
      (WebCore::tryHyphenating):
      (WebCore::RenderBlock::LineBreaker::nextLineBreak):
      * rendering/RenderCombineText.cpp:
      (WebCore::RenderCombineText::getStringToRender):
      (WebCore::RenderCombineText::combineText):
      * rendering/RenderCombineText.h:
      (RenderCombineText):
      * rendering/RenderText.cpp:
      (SameSizeAsRenderText):
      (WebCore::RenderText::RenderText):
      (WebCore::RenderText::widthFromCache):
      (WebCore::RenderText::computePreferredLogicalWidths):
      (WebCore::RenderText::setTextInternal):
      (WebCore::RenderText::width):
      * rendering/RenderText.h:
      (WebCore::RenderText::is8Bit):
      (WebCore::RenderText::characters8):
      (WebCore::RenderText::characters16):
      (WebCore::RenderText::characterAt):
      (WebCore::RenderText::operator[]):
      (RenderText):
      * xml/parser/MarkupTokenBase.h:
      (WebCore::MarkupTokenBase::appendToCharacter):
      (MarkupTokenBase):
      (WebCore::MarkupTokenBase::isAll8BitData):
      
      Source/WTF: 
      
      Added WTF_USE_8BIT_TEXTRUN to encase code that creates 8 bit TextRun's.  Enabled WTF_USE_8BIT_TEXTRUN
      for PLATFORM(MAC).  Other platform can update this setting in Platform.h when their platform specific use of
      TextRun handle 8 bit data.  Added a new Vector::appendVector to allow appending the contents of a vector
      containing one type to the end of vector containing another.  This is used to append a Vector<LChar> to
      the end of a Vector<UChar>.
      
      * wtf/Platform.h:
      * wtf/Vector.h:
      (Vector):
      (WTF::Vector::appendVector):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      776c286c
    • loislo@chromium.org's avatar
      Build fix for Mac debug build. · cb1254b5
      loislo@chromium.org authored
      * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb1254b5
    • vsevik@chromium.org's avatar
      Unreviewed inspector tests fix. · c46a7429
      vsevik@chromium.org authored
      * http/tests/inspector-enabled/dynamic-scripts-expected.txt:
      * http/tests/inspector-enabled/dynamic-scripts.html:
      * inspector/debugger/dynamic-scripts-expected.txt:
      * inspector/debugger/dynamic-scripts.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c46a7429
    • ap@apple.com's avatar
      [WK2] Add SharedWorkerProcess · 7b1ed085
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=99218
      
              Reviewed by Sam Weinig.
      
              Not yet functional, just some boilerplate code.
      
              * Configurations/SharedWorkerProcess.xcconfig: Added.
      
              * DerivedSources.make: Generate message dispatch for SharedWorkerProcess and
              SharedWorkerProcessProxy.
      
              * Platform/CoreIPC/MessageID.h: Added shared worker messages classes.
      
              * Scripts/webkit2/messages.py: (struct_or_class):
              SharedWorkerProcessCreationParameters is a struct.
      
              * Shared/SharedWorkerProcessCreationParameters.cpp: Added.
              * SharedWorkerProcess/Info.plist: Added.
              * SharedWorkerProcess/SharedWorkerProcess.cpp: Added.
              * SharedWorkerProcess/SharedWorkerProcess.h: Added.
              * SharedWorkerProcess/SharedWorkerProcess.messages.in: Added.
              * SharedWorkerProcess/SharedWorkerProcessMain.h: Added.
              * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm: Added.
              * SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm: Added.
              * SharedWorkerProcess/mac/com.apple.WebKit.SharedWorkerProcess.sb: Added.
              * UIProcess/SharedWorkers/SharedWorkerProcessManager.cpp: Added.
              * UIProcess/SharedWorkers/SharedWorkerProcessManager.h: Added.
              * UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp: Added.
              * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h: Added.
              * UIProcess/SharedWorkers/SharedWorkerProcessProxy.messages.in: Added.
              * WebKit2.xcodeproj/project.pbxproj:
              Added SharedWorkerProcess boilerplate, modeled after PluginProcess.
      
              * UIProcess/WebProcessProxy.cpp:
              * UIProcess/WebProcessProxy.h:
              * UIProcess/WebProcessProxy.messages.in:
              Added getSharedWorkerProcessConnection() message.
      
              * WebProcess/WebKitMain.cpp: (WebKitMain):
              * UIProcess/Launcher/ProcessLauncher.cpp:
              (WebKit::ProcessLauncher::processTypeAsString):
              (WebKit::ProcessLauncher::getProcessTypeFromString):
              * UIProcess/Launcher/ProcessLauncher.h:
              * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::createProcess):
              Added branches for SharedWorkerProcess.
      
              * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Added a version
              for delayed reply messages with two arguments.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7b1ed085
    • kbalazs@webkit.org's avatar
      [Qt] Implement pixel snapshot generation in WTR · 62aeddea
      kbalazs@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=95992
      
      Reviewed by Jocelyn Turcotte.
      
      Switch the Qt implementation of the PlatformWebView to use
      QQuickWindow::grabWindow to generate the pixel results. This way
      we will go through the scenegraph and test the actual rendering backend.
      We use QQuickWindowPrivate::setRenderWithoutShowing to avoid the need of
      showing the window.
      
      * WebKitTestRunner/Target.pri: Had to added a bunch
      of modules to be able to use QQuickWindowPrivate.
      * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
      (WTR::WrapperWindow::handleStatusChanged):
      (WTR::PlatformWebView::windowSnapshotImage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62aeddea
    • kbalazs@webkit.org's avatar
      [Qt][WTR] Do a forced repaint before generating pixel results · d8285187
      kbalazs@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98654
      
      Reviewed by Jocelyn Turcotte.
      
      Source/WebKit2:
      
      Added API to convert a QImage to a WKImage so we can
      pass it to cross-platform code.
      
      * Shared/API/c/qt/WKImageQt.cpp:
      (WKImageCreateFromQImage):
      * Shared/API/c/qt/WKImageQt.h:
      
      Tools:
      
      Do a forced repaint before grabbing the pixel snapshot. This extra
      synchronisation is necessary with the CoordinatedGraphics rendering
      backend because it has a fully asynchronous nature. This patch make
      us using the window snapshot for pixel results which is necessary to
      capture animations and other dynamic content. The actual grabbing of
      the window has not been implemented in this patch. It will come in
      a follow-up.
      
      * WebKitTestRunner/TestInvocation.cpp:
      (WTR::TestInvocation::invoke):
      (WTR::TestInvocation::dump): Store results in member variables.
      Don't close output channels yet.
      (WTR::TestInvocation::dumpResults): Added. This is where we dump
      the results if no error happened.
      (WTR):
      (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
      * WebKitTestRunner/TestInvocation.h:
      (TestInvocation):
      * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
      (WTR::PlatformWebView::windowSnapshotImage):
      * WebKitTestRunner/qt/TestInvocationQt.cpp:
      (WTR::TestInvocation::forceRepaintDoneCallback):
      (WTR):
      (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d8285187
    • tonikitoo@webkit.org's avatar
      [BlackBerry] Clean up BackingStoreClient (part I) · 2c1febaf
      tonikitoo@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99327
      
      Reviewed by Yong Li.
      Patch by Antonio Gomes <agomes@rim.com>
      
      Now that we won't use the BackingStoreClient code path to scroll inner frames at all
      (instead we use AC layers!), we can remove all "!isMainFrame" code paths.
      
      No behavior change, since the code path being removed was not in use.
      
      * WebKitSupport/BackingStoreClient.cpp:
      (BlackBerry::WebKit::BackingStoreClient::absoluteRect):
      (BlackBerry::WebKit::BackingStoreClient::transformedActualVisibleSize):
      (BlackBerry::WebKit::BackingStoreClient::viewportSize):
      (BlackBerry::WebKit::BackingStoreClient::transformedViewportSize):
      (BlackBerry::WebKit::BackingStoreClient::visibleContentsRect):
      (BlackBerry::WebKit::BackingStoreClient::transformedVisibleContentsRect):
      (BlackBerry::WebKit::BackingStoreClient::checkOriginOfCurrentScrollOperation):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2c1febaf
    • danakj@chromium.org's avatar
      Layout Test plugins/update-widgets-crash.html is failing · 5d1fdb99
      danakj@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99333
      
      Unreviewed gardening.
      
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5d1fdb99
    • dominik.rottsches@intel.com's avatar
      Unreviewed GTK gardening. · 28c75193
      dominik.rottsches@intel.com authored
      * platform/gtk/TestExpectations: Silencing a style-checker warning.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      28c75193
    • vsevik@chromium.org's avatar
      Web Inspector: Scripts for dynamically added script elements are not shown in sources panel. · 4489ddcf
      vsevik@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99324
      
      Reviewed by Pavel Feldman.
      
      Source/WebCore:
      
      NetworkUISourceCodeProvider now adds uiSourceCodes for dynamic anonymous scripts
      and dynamic scripts loaded before inspector was opened.
      
      Tests: http/tests/inspector-enabled/dynamic-scripts.html
             inspector/debugger/dynamic-scripts.html
      
      * inspector/front-end/NetworkLog.js:
      (WebInspector.NetworkLog.prototype.requestForURL):
      * inspector/front-end/NetworkUISourceCodeProvider.js:
      (WebInspector.NetworkUISourceCodeProvider):
      (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
      (WebInspector.NetworkUISourceCodeProvider.prototype._projectWillReset):
      
      LayoutTests:
      
      * http/tests/inspector-enabled/dynamic-scripts-expected.txt: Added.
      * http/tests/inspector-enabled/dynamic-scripts.html: Added.
      * http/tests/inspector-enabled/resources/dynamic-script.js: Added.
      (fooDynamicScript):
      * inspector/debugger/dynamic-scripts-expected.txt: Added.
      * inspector/debugger/dynamic-scripts.html: Added.
      * inspector/debugger/resources/dynamic-script.js: Added.
      (fooDynamicScript):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4489ddcf
    • dominik.rottsches@intel.com's avatar
      REGRESSION(130613): Reintroduces crashes when using soup's timeout functionality · 7b3dbfa2
      dominik.rottsches@intel.com authored
      https://bugs.webkit.org/show_bug.cgi?id=99311
      
      Reviewed by Gustavo Noronha Silva.
      
      Removing the cleanupSoupRequestOperation call, since the cancel() call will eventually trigger the
      cleanup already setting the right flag. Cleaning the handle already here will result in crashes when
      using the soup timeout functionality.
      The explicit cleanup call reintroduced in r130613, after it had been previously removed in r130348.
      
      No new tests, tests that catch this will be part of bug 74802 for XHR timeout support.
      
      * platform/network/soup/ResourceHandleSoup.cpp:
      (WebCore::requestTimeoutCallback):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7b3dbfa2
    • hausmann@webkit.org's avatar
      [Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets · 19e084db
      hausmann@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88162
      
      Reviewed by Kenneth Rohde Christiansen.
      
      Rename the QtWebKit module to QtWebKitWidgets.
      
      .:
      
      * Source/api.pri:
      * Source/sync.profile:
      
      Source/WebKit/qt:
      
      * declarative/experimental/experimental.pri:
      * declarative/public.pri:
      * docs/webkitsnippets/simple/simple.pro:
      * docs/webkitsnippets/webpage/webpage.pro:
      * tests/tests.pri:
      
      Source/WebKit2:
      
      * PluginProcess.pro:
      * UIProcess/API/qt/tests/inspectorserver/inspectorserver.pro:
      * UIProcess/API/qt/tests/publicapi/publicapi.pro:
      * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
      * UIProcess/API/qt/tests/qmltests/WebView.pro:
      * UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
      * UIProcess/API/qt/tests/qrawwebview/qrawwebview.pro:
      * UIProcess/API/qt/tests/tests.pri:
      * WebProcess.pro:
      
      Tools:
      
      * DumpRenderTree/qt/DumpRenderTree.pro:
      * MiniBrowser/qt/MiniBrowser.pro:
      * MiniBrowser/qt/raw/Target.pri:
      * QtTestBrowser/QtTestBrowser.pro:
      * Scripts/webkitpy/layout_tests/port/qt.py:
      (QtPort._path_to_webcore_library):
      * WebKitTestRunner/InjectedBundle/Target.pri:
      * WebKitTestRunner/Target.pri:
      * qmake/mkspecs/features/default_post.prf:
      * qmake/mkspecs/features/webkit_modules.prf:
      * qmake/mkspecs/features/win32/default_post.prf:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19e084db
    • loislo@chromium.org's avatar
      Web Inspector: convert manual size calculation of different WebKit things into... · 0f18689c
      loislo@chromium.org authored
      Web Inspector: convert manual size calculation of different WebKit things into MemoryInstrumentation.
      https://bugs.webkit.org/show_bug.cgi?id=99309
      
      Reviewed by Yury Semikhatsky.
      
      JSHeap, DOMStorage and HeapProfiler data were counted manually.
      Now we count the sizes more generic way.
      
      Source/WebCore:
      
      * dom/WebCoreMemoryInstrumentation.cpp:
      * dom/WebCoreMemoryInstrumentation.h:
      (WebCoreMemoryTypes): new string identifiers were added for Inspector's data.
      * inspector/InspectorBaseAgent.cpp:
      (WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface): common data members were moved from template to base class.
      (WebCore::InspectorBaseAgentInterface::reportMemoryUsage): NMI instrumentation was added to the base template.
      * inspector/InspectorBaseAgent.h:
      (InspectorBaseAgentInterface): ditto
      (WebCore::InspectorBaseAgent::InspectorBaseAgent): ditto
      * inspector/InspectorController.cpp:
      (WebCore::InspectorController::reportMemoryUsage): NMI instrumentation was added to the class.
      * inspector/InspectorController.h:
      * inspector/InspectorDOMStorageAgent.cpp:
      (WebCore::InspectorDOMStorageAgent::reportMemoryUsage): NMI instrumentation was added to the class.
      * inspector/InspectorDOMStorageAgent.h:
      * inspector/InspectorDOMStorageResource.cpp:
      (WebCore::InspectorDOMStorageResource::reportMemoryUsage): NMI instrumentation was added to the class.
      * inspector/InspectorDOMStorageResource.h:
      * inspector/InspectorMemoryAgent.cpp:
      (WebCore::reportJSHeapInfo): these methods now use MemoryInstrumentation for reporting the size of underlying data.
      (WebCore::reportRenderTreeInfo):
      (WebCore::collectDomTreeInfo):
      (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
      (WebCore::InspectorMemoryAgent::reportMemoryUsage): NMI instrumentation was added to the class.
      * inspector/InspectorMemoryAgent.h:
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::reportMemoryUsage):
      * inspector/InspectorProfilerAgent.h:
      (InspectorProfilerAgent): NMI instrumentation was added to the class.
      * inspector/MemoryInstrumentationImpl.cpp: allocatedObjects map was converted from InspectorMemoryAgent::getProcessMemoryDistribution local variable to member variable.
      (WebCore::MemoryInstrumentationClientImpl::checkCountedObject):
      (WebCore::MemoryInstrumentationClientImpl::reportMemoryUsage): NMI instrumentation was added to the class.
      (WebCore::MemoryInstrumentationImpl::reportMemoryUsage): NMI instrumentation was added to the class.
      * inspector/MemoryInstrumentationImpl.h:
      (WebCore::MemoryInstrumentationClientImpl::MemoryInstrumentationClientImpl):
      (WebCore::MemoryInstrumentationClientImpl::allocatedObjects):
      (WebCore::MemoryInstrumentationClientImpl::checkInstrumentedObjects):
      * inspector/front-end/NativeMemorySnapshotView.js:
      (WebInspector.MemoryBlockViewProperties._initialize):
      (WebInspector.NativeMemoryBarChart.prototype._updateView):
      * page/Page.cpp:
      (WebCore::Page::reportMemoryUsage): NMI instrumentation was added to the class.
      * page/Page.h:
      
      Source/WTF:
      
      * wtf/MemoryInstrumentation.h: calculateContainerSize were removed.
      * wtf/MemoryInstrumentationSequence.h: empty instrumentations were added for 'const char*' and 'const void*' sequences.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0f18689c
    • rakuco@webkit.org's avatar
      [EFL][WK2] Encapsulate ref counting for Ewk objects in a parent class · 21481742
      rakuco@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99174
      
      Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-15
      Reviewed by Kenneth Rohde Christiansen.
      
      Ewk objects can be inherited from RefCounted class, so that ref counting is encapsulated and RefPtr can be used.
      Applied the new approach for Ewk_Navigation_Data and Ewk_Url_Request objects as an example.
      The requirement of adoption can be satisfied as long as we keep dealing with smart pointers only. 
      In case external client provides an already referenced object as a raw pointer, relaxAdoptionRequirement() can be set
      explicitly in this specific place.
      
      * UIProcess/API/efl/ewk_context_history_client.cpp:
      (didNavigateWithNavigationData):
      * UIProcess/API/efl/ewk_download_job.cpp:
      (_Ewk_Download_Job):
      (_Ewk_Download_Job::_Ewk_Download_Job):
      (_Ewk_Download_Job::~_Ewk_Download_Job):
      (ewk_download_job_request_get):
      * UIProcess/API/efl/ewk_navigation_data.cpp:
      (ewk_navigation_data_ref):
      (ewk_navigation_data_unref):
      (ewk_navigation_data_original_request_get):
      * UIProcess/API/efl/ewk_navigation_data_private.h:
      (_Ewk_Navigation_Data):
      (_Ewk_Navigation_Data::_Ewk_Navigation_Data):
      * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
      (_Ewk_Navigation_Policy_Decision):
      (_Ewk_Navigation_Policy_Decision::_Ewk_Navigation_Policy_Decision):
      (_Ewk_Navigation_Policy_Decision::~_Ewk_Navigation_Policy_Decision):
      (ewk_navigation_policy_request_get):
      (ewk_navigation_policy_decision_new):
      * UIProcess/API/efl/ewk_url_request.cpp:
      (ewk_url_request_ref):
      (ewk_url_request_unref):
      * UIProcess/API/efl/ewk_url_request_private.h:
      (_Ewk_Url_Request):
      (_Ewk_Url_Request::_Ewk_Url_Request):
      * UIProcess/API/efl/ewk_view_resource_load_client.cpp:
      (didInitiateLoadForResource):
      (didSendRequestForResource):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21481742
    • allan.jensen@digia.com's avatar
      [Qt] Regression(r130031) coverRect is used in wrong coordinates. · 64e90963
      allan.jensen@digia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97777
      
      Reviewed by Jocelyn Turcotte.
      
      Convert coverRect from screen coordinates to content coordinates before using it
      outside tiled-backing store.
      
      * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h:
      (WebCore::CoordinatedGraphicsLayer::coverRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64e90963
    • kinuko@chromium.org's avatar
      [chromium] Removes unnecessary dependencies in DumpRenderTree.gyp · aa68fe54
      kinuko@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99132
      
      Reviewed by Kent Tamura.
      
      Removing webkit_support:blob dependency for DumpRenderTree target as it doesn't seem necessary.
      
      * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aa68fe54
    • ossy@webkit.org's avatar
      [Qt] Unskip and rebase now passing tests. · 128e0bd7
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98824
      
      Patch by Tullio Lucena <tullio.lucena@openbossa.org> on 2012-10-15
      Reviewed by Csaba Osztrogonác.
      
      Updating tests results.
      
      * platform/qt/TestExpectations:
      * platform/qt/editing/selection/caret-rtl-2-expected.png: Added.
      * platform/qt/editing/selection/caret-rtl-2-expected.txt:
      * platform/qt/editing/selection/caret-rtl-expected.png: Added.
      * platform/qt/editing/selection/caret-rtl-expected.txt:
      * platform/qt/editing/selection/extend-selection-bidi-expected.png: Added.
      * platform/qt/editing/selection/extend-selection-bidi-expected.txt: Added.
      * platform/qt/editing/selection/move-past-trailing-space-expected.png: Added.
      * platform/qt/editing/selection/move-past-trailing-space-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      128e0bd7
    • ossy@webkit.org's avatar
      [Qt][WK2] Buildfix for newer Qt5. · 19e180f3
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99303
      
      Reviewed by Simon Hausmann.
      
      * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
      (WTR::PlatformWebView::resizeTo):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      19e180f3
    • tkent@chromium.org's avatar
      Improve code of LocaleMac.mm · b53ac8d4
      tkent@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98383
      
      Reviewed by Darin Adler.
      
      - Use isNull instead of isEmpty because isNull is more efficient.
      - create*Formatter should return RetainPtr to avoid to retain in each of callsites.
      - Explicit String conversion is not needed.
      
      No new tests. This doesn't change any behavior.
      
      * platform/text/mac/LocaleMac.h:
      (LocaleMac):
      - Change the return types of createShortDateFormatter,
      createTimeFormatter, and createShortTimeFormatter from NSDateFormatter*
      to RetainPtr<NSDateFormatter>.
      - Omit 'create' from their names.
      - Add m_gregorianCalendar.
      * platform/text/mac/LocaleMac.mm:
      (WebCore::createDateTimeFormatter):
      Change the return type from NSDateFormatter* to RetainPtr<NSDateFormatter>.
      Add an NSCalendar argument.
      (WebCore::LocaleMac::shortDateFormatter):
      Renamed from createShortTimeFormatter.
      Change the return type from NSDateFormatter* to RetainPtr<NSDateFormatter>.
      (WebCore::LocaleMac::parseDateTime): Follow the return type change and the renaming.
      (WebCore::LocaleMac::formatDateTime): Ditto. Also, remove explicit String construction.
      (WebCore::LocaleMac::dateFormatText): Ditto. Also, use isNull.
      (WebCore::LocaleMac::monthLabels): Follow the return type change and the renaming.
      (WebCore::LocaleMac::weekDayShortLabels): Ditto.
      (WebCore::LocaleMac::timeFormatter):
      Change the return type from NSDateFormatter* to RetainPtr<NSDateFormatter>.
      Renamed from createTimeFormatter.
      (WebCore::LocaleMac::shortTimeFormatter): Ditto.
      (WebCore::LocaleMac::dateFormat):
      Use isNull. Remove explicit String construction. Follow the return type
      change and the renaming.
      (WebCore::LocaleMac::timeFormat): ditto.
      (WebCore::LocaleMac::shortTimeFormat): ditto.
      (WebCore::LocaleMac::timeAMPMLabels):
      Remove explicit String construction. Follow the return type change.
      (WebCore::LocaleMac::initializeLocalizerData):
      Remove explicit String construction.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b53ac8d4
    • carlosgc@webkit.org's avatar
      Unreviewed. Fix make distcheck. · e6a51d27
      carlosgc@webkit.org authored
      Source/JavaScriptCore:
      
      * GNUmakefile.list.am: Add missing header file.
      
      Source/WebKit2:
      
      * GNUmakefile.am: Add .in files in WebKit2/Shared to EXTRA_DIST.
      * GNUmakefile.list.am: Remove deleted file.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6a51d27
    • shinyak@chromium.org's avatar
      [Chromium] Unreviewed gardening, TestExpectations updated. · 8fe1de24
      shinyak@chromium.org authored
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8fe1de24
    • loislo@chromium.org's avatar
      Web Inspector: NMI remove hand made object builders with automatic builder. · 811f2c96
      loislo@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99186
      
      Reviewed by Yury Semikhatsky.
      
      Old builders were replaced with single automatic builder.
      It does the next things:
      a) deduplicates entries in the MemoryInstrumentationClient's map and converts objectType pointers to String;
      b) creates parent entries and assigns their aggregated sizes;
      c) creates the hierarchy of MemoryBlocks recursively.
      
      * dom/WebCoreMemoryInstrumentation.cpp:
      (WebCore):
      * dom/WebCoreMemoryInstrumentation.h:
      (WebCoreMemoryTypes):
      * inspector/InspectorMemoryAgent.cpp:
      (WebCore):
      (WebCore::jsHeapInfo):
      (WebCore::renderTreeInfo):
      (WebCore::addPlatformComponentsInfo):
      (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
      * inspector/MemoryInstrumentationImpl.cpp:
      (WebCore::MemoryInstrumentationClientImpl::sizesMap):
      (WebCore):
      * inspector/MemoryInstrumentationImpl.h:
      (WebCore):
      (MemoryInstrumentationClientImpl):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      811f2c96
    • fpizlo@apple.com's avatar
      DFG should handle polymorphic array modes by eagerly transforming arrays into... · e07b17b1
      fpizlo@apple.com authored
      DFG should handle polymorphic array modes by eagerly transforming arrays into the most general applicable form
      https://bugs.webkit.org/show_bug.cgi?id=99269
      
      Reviewed by Geoffrey Garen.
      
      This kills off a bunch of code for "polymorphic" array modes in the DFG. It should
      also be a performance win for code that uses a lot of array storage arrays.
      
      * dfg/DFGAbstractState.cpp:
      (JSC::DFG::AbstractState::execute):
      * dfg/DFGArrayMode.cpp:
      (JSC::DFG::fromObserved):
      (JSC::DFG::modeAlreadyChecked):
      (JSC::DFG::modeToString):
      * dfg/DFGArrayMode.h:
      (DFG):
      (JSC::DFG::modeUsesButterfly):
      (JSC::DFG::modeIsJSArray):
      (JSC::DFG::mayStoreToTail):
      (JSC::DFG::mayStoreToHole):
      (JSC::DFG::canCSEStorage):
      (JSC::DFG::modeSupportsLength):
      (JSC::DFG::benefitsFromStructureCheck):
      * dfg/DFGFixupPhase.cpp:
      (JSC::DFG::FixupPhase::checkArray):
      (JSC::DFG::FixupPhase::blessArrayOperation):
      * dfg/DFGGraph.h:
      (JSC::DFG::Graph::byValIsPure):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
      (JSC::DFG::SpeculativeJIT::checkArray):
      (JSC::DFG::SpeculativeJIT::arrayify):
      (DFG):
      (JSC::DFG::SpeculativeJIT::compileGetArrayLength):
      * dfg/DFGSpeculativeJIT.h:
      (JSC::DFG::SpeculativeJIT::putByValWillNeedExtraRegister):
      (SpeculativeJIT):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e07b17b1
    • andersca@apple.com's avatar
      Fix the world. · 02e34a78
      andersca@apple.com authored
      Add back a forgotten !.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::postInjectedBundleMessage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      02e34a78
    • fpizlo@apple.com's avatar
      REGRESSION(126886): Fat binary builds don't know how to handle architecture... · f0016fc9
      fpizlo@apple.com authored
      REGRESSION(126886): Fat binary builds don't know how to handle architecture variants to which the LLInt is agnostic
      https://bugs.webkit.org/show_bug.cgi?id=99270
      
      Reviewed by Geoffrey Garen.
      
      The fix is to hash cons the offsets based on configuration index, not the offsets
      themselves.
      
      * offlineasm/offsets.rb:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f0016fc9
    • shinyak@chromium.org's avatar
      [Chromium] Unreviewed gardening, TestExpectations updated. · 642ff27e
      shinyak@chromium.org authored
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      642ff27e
    • weinig@apple.com's avatar
      Stop all the crashing! · c3ba16a2
      weinig@apple.com authored
      The WebProcessProxy is not the Connection::Client, the WebConnectionToWebProcess is.
      
      * UIProcess/WebConnectionToWebProcess.h:
      (WebKit::WebConnectionToWebProcess::webProcessProxy):
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::fromConnection):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c3ba16a2
    • weinig@apple.com's avatar
      Re-land of "WebContext should be a MessageReceiver" · 7356d973
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=98958
      
      Patch by Anders Carlsson <andersca@apple.com> on 2012-10-14
      Reviewed by Sam Weinig.
      
      Make WebContext be a MessageReceiver that lives in its own map. This allows us to get rid of the
      knowsHowToHandleMessage functions on MessageReceiverMap and WebContext.
      
      * Platform/CoreIPC/Connection.h:
      (CoreIPC::Connection::client):
      (Connection):
      * Platform/CoreIPC/MessageReceiverMap.cpp:
      (CoreIPC::MessageReceiverMap::addMessageReceiver):
      (CoreIPC::MessageReceiverMap::invalidate):
      (CoreIPC::MessageReceiverMap::knowsHowToHandleMessage):
      (CoreIPC::MessageReceiverMap::dispatchMessage):
      (CoreIPC::MessageReceiverMap::dispatchSyncMessage):
      * Platform/CoreIPC/MessageReceiverMap.h:
      (MessageReceiverMap):
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::WebContext):
      (WebKit::WebContext::~WebContext):
      (WebKit::WebContext::dispatchMessage):
      (WebKit::WebContext::dispatchSyncMessage):
      (WebKit::WebContext::didReceiveMessage):
      (WebKit::WebContext::didReceiveSyncMessage):
      * UIProcess/WebContext.h:
      (WebContext):
      * UIProcess/WebProcessProxy.cpp:
      (WebKit::WebProcessProxy::fromConnection):
      (WebKit):
      (WebKit::WebProcessProxy::didReceiveMessage):
      (WebKit::WebProcessProxy::didReceiveSyncMessage):
      * UIProcess/WebProcessProxy.h:
      (WebProcessProxy):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7356d973
    • andersca@apple.com's avatar
      WebPage::PostInjectedBundleMessage should be a variadic message · eff9afce
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=99277
      
      Reviewed by Sam Weinig.
      
      Don't use a data reference for messages posted to the injected bundle; they could contain data that requires attachments
      (such as shared memory).
      
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::postMessageToInjectedBundle):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::postInjectedBundleMessage):
      * WebProcess/WebPage/WebPage.h:
      (WebPage):
      * WebProcess/WebPage/WebPage.messages.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eff9afce
  2. 14 Oct, 2012 7 commits
    • weinig@apple.com's avatar
      Simplify user content in WebKit2 by using WebCore::UserStyleSheet and WebCore::UserScript directly · 214f9aca
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=99276
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      Add default constructors for UserScript and UserStyleSheet so they can be used in CoreIPC encoding/decoding.
      
      * page/UserScript.h:
      (WebCore::UserScript::UserScript):
      (UserScript):
      * page/UserStyleSheet.h:
      (WebCore::UserStyleSheet::UserStyleSheet):
      (UserStyleSheet):
      
      Source/WebKit2:
      
      - Removes UserContentContainer in favor of Vector<UserStyleSheet> and Vector<UserScript> right on WebPageGroupData.
      - Adds support for UserScripts, but does not expose API for it just yet.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebKit2.xcodeproj/project.pbxproj:
      * win/WebKit2.vcproj:
      * Shared/UserContentContainer.cpp: Removed.
      * Shared/UserContentContainer.h: Removed.
      Remove UserContentContainer.h/cpp.
      
      * Shared/API/c/WKBase.h:
      * Shared/API/c/WKSharedAPICast.h:
      (WebKit::toUserScriptInjectionTime):
      (WebKit::toUserContentInjectedFrames):
      * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
      * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
      Move UserContent enums to WKBase.h so they can be used from both processes, and move the
      casts to WKSharedAPICast.
      
      * Shared/WebCoreArgumentCoders.cpp:
      * Shared/WebCoreArgumentCoders.h:
      Add coders for UserStyleSheet and UserScript.
      
      * Shared/WebPageGroupData.cpp:
      (WebKit::WebPageGroupData::encode):
      (WebKit::WebPageGroupData::decode):
      * Shared/WebPageGroupData.h:
      (WebPageGroupData):
      Replace UserContentContainer with Vector<UserStyleSheet> and Vector<UserScript>. Stop using
      CoreIPC::In() and CoreIPC::Out(), and instead just call encode/decode multiple times.
      
      * UIProcess/API/C/WKPageGroup.cpp:
      (WKPageGroupAddUserStyleSheet):
      Pass the parameters with as little conversion as possible to the C++ to avoid doing too much
      work in the API layer.
      
      * UIProcess/WebPageGroup.cpp:
      (WebKit::toStringVector):
      (WebKit::WebPageGroup::addUserStyleSheet):
      (WebKit::WebPageGroup::addUserScript):
      (WebKit::WebPageGroup::removeAllUserStyleSheets):
      (WebKit::WebPageGroup::removeAllUserScripts):
      (WebKit::WebPageGroup::removeAllUserContent):
      * UIProcess/WebPageGroup.h:
      * WebProcess/WebPage/WebPageGroupProxy.cpp:
      (WebKit::WebPageGroupProxy::WebPageGroupProxy):
      (WebKit::WebPageGroupProxy::addUserStyleSheet):
      (WebKit::WebPageGroupProxy::addUserScript):
      (WebKit::WebPageGroupProxy::removeAllUserScripts):
      (WebKit::WebPageGroupProxy::removeAllUserContent):
      * WebProcess/WebPage/WebPageGroupProxy.h:
      (WebPageGroupProxy):
      * WebProcess/WebPage/WebPageGroupProxy.messages.in:
      Add support for user scripts and update to use UserScript and UserStyleSheet directly.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      214f9aca
    • jonlee@apple.com's avatar
      Allow notification origin permission request when no js callback is provided · 2ee4bbe6
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=63615
      <rdar://problem/11059590>
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      Instead of throwing a type error when no callback is provided, we pass a null callback.
      
      Test: http/tests/notifications/legacy/request-no-callback.html
      
      * bindings/js/JSDesktopNotificationsCustom.cpp:
      (WebCore::JSNotificationCenter::requestPermission):
      
      Source/WebKit/mac:
      
      Introduce a boolean to determine whether the request was using the legacy or standard API. This way,
      we do not fall through to calling the standard API's callback if the legacy API's callback is null.
      
      * WebCoreSupport/WebNotificationClient.mm:
      (WebCore):
      (-[WebNotificationPolicyListener initWithVoidCallback:]):
      (-[WebNotificationPolicyListener allow]):
      (-[WebNotificationPolicyListener deny]):
      
      Source/WebKit2:
      
      Null checks already exist for both standard and legacy API callbacks, so no changes are needed here
      like there are in WebKit 1. The checks existed because the callbacks are held in a hash map used to keep
      track of pending requests.
      
      Also, add a check for a null callback when short circuiting.
      
      * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
      (WebKit::NotificationPermissionRequestManager::startRequest):
      
      Tools:
      
      Teach DRT to look at the existing entries in the permission hash map when permission is requested.
      
      * DumpRenderTree/mac/MockWebNotificationProvider.h: Expose policyForOrigin.
      * DumpRenderTree/mac/MockWebNotificationProvider.mm:
      (-[MockWebNotificationProvider setWebNotificationOrigin:permission:]):
      * DumpRenderTree/mac/UIDelegate.mm:
      (-[UIDelegate webView:decidePolicyForNotificationRequestFromOrigin:listener:]): Look at whether a
      policy for the origin already exists. If so, accept or deny the request as appropriate. Otherwise,
      accept by default.
      
      LayoutTests:
      
      * http/tests/notifications/legacy/request-expected.txt:
      * http/tests/notifications/legacy/request-no-callback-expected.txt: Added.
      * http/tests/notifications/legacy/request-no-callback.html: Calls webkitNotifications.requestPermission()
      with no callback, with default and denied permission. For WebKit2, if the permission is not default, it
      will short circuit instead of creating a pending request.
      * http/tests/notifications/legacy/request.html: The test mistakenly uses the standard API instead of
      the legacy API. The results don't change, but we make sure that we call
      webkitNotifications.requestPermission() with a callback to test full coverage of the legacy API. We also
      expand the test to cover both default and denied permissions.
      * http/tests/notifications/request-expected.txt:
      * http/tests/notifications/request.html: Expand test to cover both default and denied permissions.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2ee4bbe6
    • andersca@apple.com's avatar
      Move QDataStream functions into HistoryItemQt.cpp · a9909b58
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=99203
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
      inside WebCore, so move them there. If in the future they are required elsewhere, they should
      be moved into a separate header instead of polluting headers unnecessarily.
      
      * history/qt/HistoryItemQt.cpp:
      (operator<<):
      (operator>>):
      * platform/FractionalLayoutUnit.h:
      * platform/graphics/IntPoint.h:
      
      Source/WebKit2:
      
      Forward declare QTransform.
      
      * Shared/qt/WebEventFactoryQt.h:
      
      Source/WTF:
      
      It seems like the QDataStream stream operators are only used from HistoryItemQt.cpp
      inside WebCore, so move them there. If in the future they are required elsewhere, they should
      be moved into a separate header instead of polluting headers unnecessarily.
      
      * wtf/Vector.h:
      * wtf/qt/StringQt.cpp:
      * wtf/text/WTFString.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9909b58
    • andersca@apple.com's avatar
      Explicitly mark messages variadic · 4ed277f8
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=99229
      
      Reviewed by Dan Bernstein.
      
      Instead of deciding whether messages are variadic based on their type, decide it based on the existence of a 'Variadic' message attribute.
      
      * Scripts/webkit2/messages.py:
      (messages_to_kind_enum):
      (decode_type):
      (async_case_statement):
      (sync_case_statement):
      * UIProcess/WebPageProxy.messages.in:
      * WebProcess/WebProcess.messages.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4ed277f8
    • weinig@apple.com's avatar
      Fix the windows build. · 7a363aba
      weinig@apple.com authored
      * WebView.cpp:
      (toStringVector):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a363aba
    • fpizlo@apple.com's avatar
      IndexingType should not have a bit for each type · b9aa7ba0
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=98997
      
      Reviewed by Oliver Hunt.
      
      Somewhat incidentally, the introduction of butterflies led to each indexing
      type being represented by a unique bit. This is superficially nice since it
      allows you to test if a structure corresponds to a particular indexing type
      by saying !!(structure->indexingType() & TheType). But the downside is that
      given the 8 bits we have for the m_indexingType field, that leaves only a
      small number of possible indexing types if we have one per bit.
              
      This changeset changes the indexing type to be:
              
      Bit #1: Tells you if you're an array.
              
      Bits #2 - #5: 16 possible indexing types, including the blank type for
          objects that don't have indexed properties.
              
      Bits #6-8: Auxiliary bits that we could use for other things. Currently we
          just use one of those bits, for MayHaveIndexedAccessors.
              
      This is performance-neutral, and is primarily intended to give us more
      breathing room for introducing new inferred array modes.
      
      * assembler/AbstractMacroAssembler.h:
      (JSC::AbstractMacroAssembler::JumpList::jumps):
      * assembler/MacroAssembler.h:
      (MacroAssembler):
      (JSC::MacroAssembler::patchableBranch32):
      * assembler/MacroAssemblerARMv7.h:
      (JSC::MacroAssemblerARMv7::patchableBranch32):
      (MacroAssemblerARMv7):
      * dfg/DFGArrayMode.cpp:
      (JSC::DFG::modeAlreadyChecked):
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::tryCacheGetByID):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::speculationCheck):
      (JSC::DFG::SpeculativeJIT::forwardSpeculationCheck):
      (JSC::DFG::SpeculativeJIT::jumpSlowForUnwantedArrayMode):
      (DFG):
      (JSC::DFG::SpeculativeJIT::checkArray):
      (JSC::DFG::SpeculativeJIT::arrayify):
      * dfg/DFGSpeculativeJIT.h:
      (SpeculativeJIT):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitAllocateJSArray):
      (JSC::JIT::chooseArrayMode):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::emit_op_get_by_val):
      (JSC::JIT::emitContiguousGetByVal):
      (JSC::JIT::emitArrayStorageGetByVal):
      (JSC::JIT::emit_op_put_by_val):
      (JSC::JIT::emitContiguousPutByVal):
      (JSC::JIT::emitArrayStoragePutByVal):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::emit_op_get_by_val):
      (JSC::JIT::emitContiguousGetByVal):
      (JSC::JIT::emitArrayStorageGetByVal):
      (JSC::JIT::emit_op_put_by_val):
      (JSC::JIT::emitContiguousPutByVal):
      (JSC::JIT::emitArrayStoragePutByVal):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      * llint/LowLevelInterpreter.asm:
      * llint/LowLevelInterpreter32_64.asm:
      * llint/LowLevelInterpreter64.asm:
      * runtime/IndexingType.h:
      (JSC):
      (JSC::hasIndexedProperties):
      (JSC::hasContiguous):
      (JSC::hasFastArrayStorage):
      (JSC::hasArrayStorage):
      (JSC::shouldUseSlowPut):
      * runtime/JSGlobalObject.cpp:
      (JSC):
      * runtime/StructureTransitionTable.h:
      (JSC::newIndexingType):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b9aa7ba0
    • weinig@apple.com's avatar
      Make UserScript and UserStyleSheet value objects that are copyable · 1a6cf377
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=99275
      
      Reviewed by Tim Horton.
      
      Source/WebCore:
      
      Simplify UserScript and UserStyleSheet and make them more easily usable
      without sticking them in an OwnPtr.
      
      * WebCore.exp.in:
      Update exports.
      
      * page/PageGroup.cpp:
      (WebCore::PageGroup::addUserScriptToWorld):
      (WebCore::PageGroup::addUserStyleSheetToWorld):
      * page/PageGroup.h:
      (PageGroup):
      * page/UserContentURLPattern.cpp:
      (WebCore::UserContentURLPattern::matchesPatterns):
      * page/UserContentURLPattern.h:
      (UserContentURLPattern):
      Update to not assume whitelist and blacklist are in Vector<String>*.
      
      * page/UserScript.h:
      (UserScript):
      (WebCore::UserScript::UserScript):
      (WebCore::UserScript::whitelist):
      (WebCore::UserScript::blacklist):
      * page/UserStyleSheet.h:
      (UserStyleSheet):
      (WebCore::UserStyleSheet::UserStyleSheet):
      (WebCore::UserStyleSheet::whitelist):
      (WebCore::UserStyleSheet::blacklist):
      Switch OwnPtr<Vector<String> > to Vector<String> and remove Noncopyable restriction.
      
      Source/WebKit/chromium:
      
      * src/WebViewImpl.cpp:
      (WebKit::WebView::addUserScript):
      (WebKit::WebView::addUserStyleSheet):
      Update for new PageGroup function signatures.
      
      Source/WebKit/efl:
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      (DumpRenderTreeSupportEfl::addUserScript):
      (DumpRenderTreeSupportEfl::addUserStyleSheet):
      Update for new PageGroup function signatures.
      
      Source/WebKit/mac:
      
      * WebView/WebView.mm:
      (-[WebView _injectMailQuirksScript]):
      (-[WebView _injectOutlookQuirksScript]):
      Update for new PageGroup function signatures.
      
      Source/WebKit2:
      
      * Shared/UserContentContainer.cpp:
      (WebKit::toStringVector):
      (WebKit::UserContentContainer::Item::Item):
      (WebKit::UserContentContainer::Item::encode):
      (WebKit::UserContentContainer::Item::decode):
      * Shared/UserContentContainer.h:
      (WebKit::UserContentContainer::Item::whitelist):
      (WebKit::UserContentContainer::Item::blacklist):
      Switch UserContentContainer::Item to store Vector<String> instead of ImmutableArray, easing
      transition to new PageGroup function signatures.
      
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::toStringVector):
      * WebProcess/WebPage/qt/WebPageQt.cpp:
      (WebKit::WebPage::setUserScripts):
      Update for new PageGroup function signatures.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a6cf377