1. 16 Sep, 2012 2 commits
  2. 15 Sep, 2012 21 commits
    • commit-queue@webkit.org's avatar
      Source/WebCore: Pause inspector when inline scripts are blocked by Content Security Policy. · 6ee5f486
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93865
      
      Patch by Mike West <mkwst@chromium.org> on 2012-09-15
      Reviewed by Pavel Feldman.
      
      When Content Security Policy blocks an inline script that's been
      injected after the document is parsed, a fairly unhelpful console
      warning is generated; it points at line 1, regardless of where the error
      occurred. This patch adjusts CSP to not only warn on the console, but
      also to notify the inspector that it should pause execution if the
      developer has toggled "Break on Exceptions". Developers will have a
      better chance of tracking down the error, as they'll have a complete
      call stack to work with.
      
      Tests: inspector/debugger/debugger-pause-on-blocked-event-handler.html
             inspector/debugger/debugger-pause-on-blocked-script-injection.html
             inspector/debugger/debugger-pause-on-blocked-script-url.html
      
      * English.lproj/localizedStrings.js:
          Adding localizable string for the new friendly pause message.
      * inspector/Inspector.json:
          Add CSPViolation as a recognized reason for pausing execution.
      * inspector/InspectorDebuggerAgent.cpp:
      (WebCore::InspectorDebuggerAgent::scriptExecutionBlockedByCSP):
          Teach the InspectorDebuggerAgent about script blocking. If pause on
          exceptions is enabled, call 'InspectorDebuggerAgent::breakProgram',
          and pass in an error object with a description that points to CSP
          as the culprit.
      (WebCore):
      * inspector/InspectorDebuggerAgent.h:
      (InspectorDebuggerAgent):
      * inspector/InspectorInstrumentation.cpp:
      (WebCore):
      (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSPImpl):
          Wire 'InspectorInstrumentation::scriptExecutionBlockedByCSP' to
          the InspectorDebuggerAgent backend.
      * inspector/InspectorInstrumentation.h:
      (InspectorInstrumentation):
      (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
          The public interface that should be kicked whenever CSP blocks
          script execution.
      (WebCore):
      * inspector/front-end/DebuggerModel.js:
          Add CSPViolation as a recognized reason for pausing execution.
      * inspector/front-end/ScriptsPanel.js:
          Add a friendly call stack status message for CSP violations.
      * page/ContentSecurityPolicy.cpp:
      (CSPDirectiveList):
      (WebCore::CSPDirectiveList::checkNonceAndReportViolation):
          If script is blocked because the nonce doesn't match, report the
          blocked script to the inspector.
      (WebCore::CSPDirectiveList::checkInlineAndReportViolation):
          If inline script is blocked, report the blocked script to the
          inspector. This requires adding a bool parameter to differentiate
          blocking inline script from inline style.
      (WebCore::CSPDirectiveList::allowJavaScriptURLs):
          Tell 'checkInlineAndReportViolation' that we're dealing with script.
      (WebCore::CSPDirectiveList::allowInlineEventHandlers):
          Tell 'checkInlineAndReportViolation' that we're dealing with script.
      (WebCore::CSPDirectiveList::allowInlineScript):
          Tell 'checkInlineAndReportViolation' that we're dealing with script.
      (WebCore::CSPDirectiveList::allowInlineStyle):
          Tell 'checkInlineAndReportViolation' that we're not dealing with script.
      (WebCore::ContentSecurityPolicy::reportBlockedScriptExecutionToInspector):
          Public interface for the various CSP* classes to poke the inspector.
      (WebCore):
      * page/ContentSecurityPolicy.h:
      
      LayoutTests: Break on inline scripts blocked by CSP.
      https://bugs.webkit.org/show_bug.cgi?id=93865
      
      Patch by Mike West <mkwst@chromium.org> on 2012-09-15
      Reviewed by Pavel Feldman.
      
      * inspector/debugger/debugger-pause-on-blocked-event-handler-expected.txt: Added.
      * inspector/debugger/debugger-pause-on-blocked-event-handler.html: Added.
      * inspector/debugger/debugger-pause-on-blocked-script-injection-expected.txt: Added.
      * inspector/debugger/debugger-pause-on-blocked-script-injection.html: Added.
      * inspector/debugger/debugger-pause-on-blocked-script-url-expected.txt: Added.
      * inspector/debugger/debugger-pause-on-blocked-script-url.html: Added.
      * inspector/debugger/resources/pause-on-blocked-by-csp.js: Added.
      (test.setStatus):
      (test.step1):
      (test.step2):
      (test):
      * inspector/debugger/resources/pause-on-blocked-event-handler.js: Added.
      (testAction):
      * inspector/debugger/resources/pause-on-blocked-script-injection.js: Added.
      (testAction):
      * inspector/debugger/resources/pause-on-blocked-script-url.js: Added.
      (testAction):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6ee5f486
    • fmalita@chromium.org's avatar
      <use> not working when the SVG doc is embedded as <object> data · f749ab15
      fmalita@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96816
      
      Reviewed by Dirk Schulze.
      
      Source/WebCore:
      
      Updated SVGURIReference::isExternalURIReference() to correctly classify fragment-only URIs.
      Also, since the fragment-only test is cheap, it should be the first thing to try.
      
      Test: svg/custom/object-data-href.html
      
      * svg/SVGURIReference.h:
      (WebCore::SVGURIReference::isExternalURIReference):
      
      LayoutTests:
      
      * svg/custom/object-data-href-expected.html: Added.
      * svg/custom/object-data-href.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f749ab15
    • benjamin@webkit.org's avatar
      Fix the build with WTF URL · a82746fd
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96875
      
      Reviewed by Adam Barth.
      
      Source/WebCore: 
      
      Fix reportMemoryUsage, the implementation was only partial.
      
      * WebCore.exp.in: Export two more symbols as needed by API tests.
      * platform/KURLWTFURL.cpp:
      (WebCore::KURL::string): emptyString() return a reference,
      it makes more sense than nullAtom() here.
      * platform/KURLWTFURLImpl.h:
      (WebCore::KURLWTFURLImpl::reportMemoryUsage):
      
      Source/WTF: 
      
      Add support for MemoryInstrumentation to WTF's URL classes.
      
      * wtf/url/api/ParsedURL.cpp:
      (WTF::ParsedURL::reportMemoryUsage):
      * wtf/url/api/ParsedURL.h:
      (ParsedURL):
      * wtf/url/api/URLString.cpp:
      (WTF::URLString::reportMemoryUsage):
      * wtf/url/api/URLString.h:
      (URLString):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a82746fd
    • krit@webkit.org's avatar
      Add ClipPathOperation for -webkit-clip-path organization · 202b364e
      krit@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=95619
      
      Reviewed by Dean Jackson.
      
      This patch adds a new class ClipPathOperation to manage the values of the
      -webkit-clip-path property. ClipPathOperation stores a Path object for clipping and is
      a preparation for IRI references of the SVG 'clipPath' element.
      
      The structure of ClipPathOperation is simular to FilterOperation.
      
      ClipPathOperation will be extended to support IRI references directly in a second patch.
      
      No new tests. The changes just affect the backend.
      
      * GNUmakefile.list.am: Added new ClipPathOperation class.
      * WebCore.gypi: Ditto.
      * WebCore.vcproj/WebCore.vcproj: Ditto.
      * WebCore.xcodeproj/project.pbxproj: Ditto.
      * css/CSSComputedStyleDeclaration.cpp: Use ClipPathOperation instead of BasicShape.
      (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Ditto.
      * css/StyleBuilder.cpp: Ditto.
      (WebCore):
      (WebCore::ApplyPropertyClipPath::setValue):
      (WebCore::ApplyPropertyClipPath::applyValue):
      (WebCore::ApplyPropertyClipPath::createHandler):
      * rendering/ClipPathOperation.h: Added. New handler for property values (BasicShape, references).
      (WebCore):
      (ClipPathOperation):
      (WebCore::ClipPathOperation::~ClipPathOperation):
      (WebCore::ClipPathOperation::operator!=):
      (WebCore::ClipPathOperation::getOperationType): Return the operation type.
      (WebCore::ClipPathOperation::isSameType): Helper function for =operator.
      (WebCore::ClipPathOperation::ClipPathOperation):
      (ShapeClipPathOperation): Inheriting class for managing BasicShapes.
      (WebCore::ShapeClipPathOperation::create):
      (WebCore::ShapeClipPathOperation::basicShape):
      (WebCore::ShapeClipPathOperation::windRule):
      (WebCore::ShapeClipPathOperation::path):
      (WebCore::ShapeClipPathOperation::operator==):
      (WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
      * rendering/RenderLayer.cpp: Use ClipPathOperation to apply clipping.
      (WebCore::RenderLayer::paintLayerContents):
      * rendering/style/RenderStyle.h:
      * rendering/style/StyleRareNonInheritedData.h:
      (StyleRareNonInheritedData):
      * rendering/svg/SVGRenderingContext.cpp: Ditto.
      (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      202b364e
    • fpizlo@apple.com's avatar
      Structure check hoisting fails to consider the possibility of conflicting... · 6e0a9edd
      fpizlo@apple.com authored
      Structure check hoisting fails to consider the possibility of conflicting checks on the source of the first assignment to the hoisted variable
      https://bugs.webkit.org/show_bug.cgi?id=96872
      
      Reviewed by Oliver Hunt.
      
      This does a few related things:
              
      - It turns off the use of ForceOSRExit for sure-to-fail CheckStructures, because
        I noticed that this would sometimes happen for a ForwardCheckStructure. The
        problem is that ForceOSRExit exits backwards, not forwards. Since the code that
        led to those ForceOSRExit's being inserted was written out of paranoia rather
        than need, I removed it. Specifically, I removed the m_isValid = false code
        for CheckStructure/StructureTransitionWatchpoint in AbstractState.
              
      - If a structure check causes a structure set to go empty, we don't want a
        PutStructure to revive the set. It should instead be smart enough to realize 
        that an empty set implies that the code can't execute. This was the only "bug"
        that the use of m_isValid = false was preventing.
              
      - Finally, the main change: structure check hoisting looks at the source of the
        SetLocals on structure-check-hoistable variables and ensures that the source
        is not checked with a conflicting structure. This is O(n^2) but it does not
        show up at all in performance tests.
              
      The first two parts of this change were auxiliary bugs that were revealed by
      the structure check hoister doing bad things.
      
      * dfg/DFGAbstractState.cpp:
      (JSC::DFG::AbstractState::initialize):
      (JSC::DFG::AbstractState::execute):
      * dfg/DFGStructureCheckHoistingPhase.cpp:
      (JSC::DFG::StructureCheckHoistingPhase::run):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e0a9edd
    • commit-queue@webkit.org's avatar
      WinCairo build fix due to missing symbols for setImagesEnabled and setStorageBlockingPolicy · 13488d85
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96866
      
      Patch by Vivek Galatage <vivekgalatage@gmail.com> on 2012-09-15
      Reviewed by Kentaro Hara.
      
      Adding missing symbol defines in the def file to fix the build break
      for WinCairo
      
      * win/WebKit2CFLite.def:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13488d85
    • kling@webkit.org's avatar
      REGRESSION(r127438): Google Docs to renders text too small. · 5b670a7e
      kling@webkit.org authored
      <http://webkit.org/b/96554>
      
      Reviewed by Antti Koivisto.
      
      Source/WebCore:
      
      Don't remove the inline StylePropertySet from ElementAttributeData in ~StyledElement.
      This behavior broke sharing of ElementAttributeData between elements with inline style,
      since destroying one element would effectively disable the inline style from all other
      elements that shared the same attribute data.
      
      What we actually want in ~StyledElement is to detach from any CSSOM wrapper that may
      have been instantiated. Added ElementAttributeData::detachCSSOMWrapperIfNeeded for this
      purpose and call that instead.
      
      Test: fast/dom/shared-inline-style-after-node-removal.html
      
      * dom/ElementAttributeData.cpp:
      (WebCore::ElementAttributeData::detachCSSOMWrapperIfNeeded):
      (WebCore::ElementAttributeData::destroyInlineStyle):
      * dom/ElementAttributeData.h:
      (ElementAttributeData):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::~StyledElement):
      (WebCore::StyledElement::styleAttributeChanged):
      * dom/StyledElement.h:
      (StyledElement):
      
      LayoutTests:
      
      Add a test that an element that shared its inline style with another element works as expected
      after the other element is destroyed.
      
      * fast/dom/shared-inline-style-after-node-removal-expected.txt: Added.
      * fast/dom/shared-inline-style-after-node-removal.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b670a7e
    • commit-queue@webkit.org's avatar
      [GTK] Include missing header files in the tarball · 2184136d
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96860
      
      Patch by Kalev Lember <kalevlember@gmail.com> on 2012-09-15
      Reviewed by Kentaro Hara.
      
      Build fix; dist two additional headers that are needed for building on
      Windows platform.
      
      * GNUmakefile.list.am:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2184136d
    • rakuco@webkit.org's avatar
      llint: Implement LOCAL_LABEL_STRING for the BSD platforms. · 21b83b83
      rakuco@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96870
      
      Patch by Raphael Kubo da Costa <rakuco@FreeBSD.org> on 2012-09-15
      Reviewed by Filip Pizlo.
      
      * wtf/InlineASM.h: Extend the definition of LOCAL_LABEL_STRING
      currently used for OS(LINUX) to the BSDs, since they also normally
      use GNU as, and clang/llvm seems to parse that syntax just fine as
      well.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21b83b83
    • msaboff@apple.com's avatar
      Add 8 bit handling to SpaceSplitString · b2b67462
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=96823
      
      Reviewed by Sam Weinig.
      
      Added templated functions based on character type to handle 8 and 16 bit string data.
      
      * dom/SpaceSplitString.cpp:
      (WebCore::hasNonASCIIOrUpper):
      (WebCore::SpaceSplitStringData::createVector):
      * dom/SpaceSplitString.h:
      (SpaceSplitStringData):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b2b67462
    • mitz@apple.com's avatar
      REGRESSION (r125578): The monospace code path in RenderText::widthFromCache... · 03408d5d
      mitz@apple.com authored
      REGRESSION (r125578): The monospace code path in RenderText::widthFromCache disagrees with Font::width on word spacing
      https://bugs.webkit.org/show_bug.cgi?id=96869
      
      Reviewed by Eric Seidel.
      
      Source/WebCore: 
      
      Test: fast/text/word-space-monospace.html
      This also fixes fast/css/word-spacing-characters.html
      
      * rendering/RenderText.cpp:
      (WebCore::RenderText::widthFromCache): Made the conditions for adding word spacing match the
      ones in WidthIterator.
      
      LayoutTests: 
      
      * fast/text/word-space-monospace-expected.html: Added.
      * fast/text/word-space-monospace.html: Added.
      * platform/mac/TestExpectations: Removed fast/css/word-spacing-characters.html.
      * platform/mac/fast/css/word-space-extra-expected.png: Updated.
      * platform/mac/fast/css/word-space-extra-expected.txt: Updated.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      03408d5d
    • mitz@apple.com's avatar
      REGRESSION (r125578): Word spacing not applied to newline and tab characters... · 35adad29
      mitz@apple.com authored
      REGRESSION (r125578): Word spacing not applied to newline and tab characters that are treated as spaces
      https://bugs.webkit.org/show_bug.cgi?id=96865
      
      Reviewed by Sam Weinig.
      
      Source/WebCore: 
      
      Fixes fast/css/word-space-extra.html.
      
      * platform/graphics/WidthIterator.cpp:
      (WebCore::WidthIterator::advanceInternal): Changed back to apply word spacing to all characters
      that are treated as spaces, except for tab characters when there are tab stops.
      * platform/graphics/mac/ComplexTextController.cpp:
      (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Ditto.
      
      LayoutTests: 
      
      * fast/text/atsui-negative-spacing-features.html: Reverted changes made in r128691, now that
      both code paths handle newlines correctly.
      * fast/text/atsui-spacing-features.html: Ditto.
      * platform/mac/TestExpectations: Removed fast/css/word-space-extra.html.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      35adad29
    • mitz@apple.com's avatar
      REGRESSION (r125578): The Mac complex text code path disagrees with the fast path on word spacing · 9017af3c
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=96857
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore: 
      
      Fixes the following tests when run with run-webkit-tests --complex-text:
      css2.1/20110323/c541-word-sp-001.htm
      css2.1/20110323/word-spacing-remove-space-002.htm
      css2.1/20110323/word-spacing-remove-space-003.htm
      css2.1/20110323/word-spacing-remove-space-004.htm
      css2.1/20110323/word-spacing-remove-space-005.htm
      css2.1/20110323/word-spacing-remove-space-006.htm
      
      Fixes fast/css/word-spacing-characters-complex-text.html
      
      * platform/graphics/mac/ComplexTextController.cpp:
      (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Made the conditions for adding
      word spacing match the ones in WidthIterator again.
      
      LayoutTests: 
      
      * fast/text/atsui-negative-spacing-features.html: Removed some newlines from this test,
      because now that the complex text code path matches the fast path, it too suffers from a bug
      where word spacing is not added at a newline.
      * fast/text/atsui-spacing-features.html: Ditto.
      * platform/mac/TestExpectations: Removed fast/css/word-spacing-characters-complex-text.html.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9017af3c
    • commit-queue@webkit.org's avatar
      [EFL][WK2] Provide implementation for PageClientImpl::processDidCrash() · b65cf8c0
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96197
      
      Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-09-15
      Reviewed by Gyuyoung Kim.
      
      WebKit2 EFL does not have an implementation for PageClientImpl::processDidCrash().
      So when WebProcess has crashed, UI process does nothing and is left alone as it is.
      
      This patch checks if loading was ongoing, if so, set the load progress as 1.
      Then send a signal callback "webprocess,crashed" for an application to handle it.
      If the application does not handle the crash event, show an Eina Log warning message
      with a url at web process exit and load an error page.
      
      * UIProcess/API/efl/PageClientImpl.cpp:
      (WebKit::PageClientImpl::processDidCrash):
      * UIProcess/API/efl/ewk_private.h:
      * UIProcess/API/efl/ewk_view.cpp:
      (ewk_view_webprocess_crashed):
      * UIProcess/API/efl/ewk_view.h:
      * UIProcess/API/efl/ewk_view_private.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b65cf8c0
    • tkent@chromium.org's avatar
      [Chromium] Update test expectation · 2ac207b4
      tkent@chromium.org authored
      * platform/chromium/TestExpectations:
      Don't run an inspector test on Mac.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2ac207b4
    • pierre.rossi@gmail.com's avatar
      [Qt] QDoc fixes for Qt 5 documentation · d87e2ffb
      pierre.rossi@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=96796
      
      Reviewed by Simon Hausmann.
      
      Source/WebKit/qt:
      
      Produce fewer warnings and a better documentation.
      Having two QML modules providing a WebView component is a bit too much for poor old qdoc to
      cope with (or would require a lot of painful disambiguation by hand). Since the plan is to have
      QDeclarativeWebView living in the qtquick1 module, we can already take it out of the
      documentation generation for now.
      
      * declarative/qdeclarativewebview.cpp: s/qmlclass/qmltype/ out of principle
      * docs/qtwebkit.qdocconf: Remove the \i alias that caused a warning. Use *.h as headers suffix, not sources.
      Also remove QDeclarativeWebView from the documentation.
      
      Source/WebKit2:
      
      Fixup miscellaneous qdoc commands syntax.
      
      * UIProcess/API/qt/qquickwebview.cpp:
      * UIProcess/API/qt/qwebloadrequest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d87e2ffb
    • tkent@chromium.org's avatar
      Unreviewed, rolling out r128669. · e4d8ae92
      tkent@chromium.org authored
      http://trac.webkit.org/changeset/128669
      https://bugs.webkit.org/show_bug.cgi?id=96637
      
      Broke http/tests/workers/text-encoding.html on Chromium Linux (dbg)
      
      * bindings/v8/DOMData.cpp:
      (WebCore::DOMData::getCurrentStore):
      * bindings/v8/ScopedPersistent.h:
      * bindings/v8/ScriptController.cpp:
      (WebCore::ScriptController::resetIsolatedWorlds):
      (WebCore::ScriptController::evaluateInIsolatedWorld):
      (WebCore::ScriptController::currentWorldContext):
      * bindings/v8/V8Binding.cpp:
      (WebCore::perContextDataForCurrentWorld):
      * bindings/v8/V8DOMWindowShell.cpp:
      (WebCore::setIsolatedWorldField):
      (WebCore::V8DOMWindowShell::enteredIsolatedWorldContext):
      (WebCore::V8DOMWindowShell::destroyIsolatedShell):
      (WebCore):
      (WebCore::isolatedContextWeakCallback):
      (WebCore::V8DOMWindowShell::disposeContext):
      (WebCore::V8DOMWindowShell::initializeIfNeeded):
      (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
      * bindings/v8/V8DOMWindowShell.h:
      (V8DOMWindowShell):
      (WebCore::V8DOMWindowShell::getEntered):
      * bindings/v8/V8DOMWrapper.h:
      (WebCore::V8DOMWrapper::getCachedWrapper):
      * bindings/v8/WorldContextHandle.cpp:
      (WebCore::WorldContextHandle::WorldContextHandle):
      * bindings/v8/custom/V8DocumentCustom.cpp:
      (WebCore::toV8):
      * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
      (WebCore::toV8):
      * bindings/v8/custom/V8SVGDocumentCustom.cpp:
      (WebCore::toV8):
      * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
      (WebCore::V8XMLHttpRequest::constructorCallback):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e4d8ae92
    • ossy@webkit.org's avatar
      [Qt][WK2] Unreviewed weekend gardening. Skip 4 new failing tests to paint the bot green. · dd908567
      ossy@webkit.org authored
      * platform/qt-5.0-wk2/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dd908567
    • ossy@webkit.org's avatar
      [Qt] Unreviewed weekend gardening. Skip 2 new tests, because · f6d903d2
      ossy@webkit.org authored
      TestRunner::overridePreference() does not support the 'WebKitDisplayImagesKey' preference
      
      * platform/qt/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f6d903d2
    • mrowe@apple.com's avatar
      Roll out r128682 since it broke the Mac release builds. · 2900addc
      mrowe@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2900addc
    • gyuyoung.kim@samsung.com's avatar
      Add *explicit* keyword to constructors to WebKit2/UIProcess · a6515e10
      gyuyoung.kim@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=96732
      
      Reviewed by Kentaro Hara.
      
      As a step of *explicit* cleanup for constructors which have only one parameter,
      *explicit* is added to WebKit2/UIProcess in order to avoid implicit type conversion.
      
      * UIProcess/Authentication/AuthenticationDecisionListener.h:
      (AuthenticationDecisionListener):
      * UIProcess/Authentication/WebCredential.h:
      (WebCredential):
      * UIProcess/Authentication/WebProtectionSpace.h:
      (WebProtectionSpace):
      * UIProcess/GenericCallback.h:
      (WebKit::CallbackBase::CallbackBase):
      * UIProcess/InspectorServer/WebSocketServer.h:
      * UIProcess/ResponsivenessTimer.h:
      (ResponsivenessTimer):
      * UIProcess/WebApplicationCacheManagerProxy.h:
      (WebApplicationCacheManagerProxy):
      * UIProcess/WebBackForwardList.h:
      (WebBackForwardList):
      * UIProcess/WebContextUserMessageCoders.h:
      (WebKit::WebContextUserMessageEncoder::WebContextUserMessageEncoder):
      * UIProcess/WebFullScreenManagerProxy.h:
      (WebFullScreenManagerProxy):
      * UIProcess/WebGrammarDetail.h:
      (WebGrammarDetail):
      * UIProcess/WebInspectorProxy.h:
      (WebInspectorProxy):
      * UIProcess/WebKeyValueStorageManagerProxy.h:
      (WebKeyValueStorageManagerProxy):
      * UIProcess/WebMediaCacheManagerProxy.h:
      (WebMediaCacheManagerProxy):
      * UIProcess/WebNavigationData.h:
      (WebNavigationData):
      * UIProcess/WebOpenPanelResultListenerProxy.h:
      (WebOpenPanelResultListenerProxy):
      * UIProcess/WebPopupMenuProxy.h:
      (WebKit::WebPopupMenuProxy::WebPopupMenuProxy):
      * UIProcess/WebPreferences.h:
      (WebPreferences):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6515e10
  3. 14 Sep, 2012 17 commits
    • commit-queue@webkit.org's avatar
      WTFString::show doesn't dump non-ASCII characters in a readable manner · 4fc46a1c
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96749
      
      Patch by Glenn Adams <glenn@skynav.com> on 2012-09-14
      Reviewed by Benjamin Poulain.
      
      Dump non-ASCII characters in a useful form for debugging.
      
      * wtf/text/WTFString.cpp:
      (asciiDebug):
      Dump non-ASCII characters (i.e., UTF-16 code elements) as well as non-printable ASCII characters
      using \uXXXX format.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4fc46a1c
    • jamesr@google.com's avatar
      Unreviewed gardening - more position:fixed stacking context rebaselines. · 14e823cb
      jamesr@google.com authored
      * fast/block/positioning/016-expected.txt: Renamed from LayoutTests/platform/chromium-linux-x86/fast/block/positioning/016-expected.txt.
      * fast/block/positioning/025-expected.txt: Renamed from LayoutTests/platform/chromium-linux-x86/fast/block/positioning/025-expected.txt.
      * platform/chromium-linux/compositing/geometry/fixed-position-composited-switch-expected.txt: Removed.
      * platform/chromium-linux/fast/block/positioning/fixed-position-stacking-context-expected.txt: Removed.
      * platform/chromium-mac-snowleopard/compositing/geometry/fixed-position-composited-switch-expected.txt: Removed.
      * platform/chromium-mac-snowleopard/fast/block/positioning/016-expected.txt: Removed.
      * platform/chromium-mac-snowleopard/fast/block/positioning/025-expected.txt: Removed.
      * platform/chromium-mac-snowleopard/fast/block/positioning/fixed-position-stacking-context-expected.txt: Removed.
      * platform/chromium-mac/compositing/geometry/fixed-position-composited-switch-expected.txt: Removed.
      * platform/chromium-mac/fast/block/positioning/016-expected.txt: Removed.
      * platform/chromium-mac/fast/block/positioning/025-expected.txt: Removed.
      * platform/chromium-mac/fast/block/positioning/fixed-position-stacking-context-expected.txt: Removed.
      * platform/chromium-win/fast/block/positioning/016-expected.png: Renamed from LayoutTests/platform/chromium-linux/fast/block/positioning/016-expected.png.
      * platform/chromium-win/fast/block/positioning/025-expected.png: Renamed from LayoutTests/platform/chromium-linux/fast/block/positioning/025-expected.png.
      * platform/chromium-win/fast/block/positioning/fixed-position-stacking-context-expected.png: Renamed from LayoutTests/platform/chromium-linux/fast/block/positioning/fixed-position-stacking-context-expected.png.
      * platform/chromium/compositing/geometry/fixed-position-composited-switch-expected.txt: Renamed from LayoutTests/platform/chromium-linux-x86/compositing/geometry/fixed-position-composited-switch-expected.txt.
      * platform/chromium/fast/block/positioning/016-expected.txt: Renamed from LayoutTests/platform/chromium-linux/fast/block/positioning/016-expected.txt.
      * platform/chromium/fast/block/positioning/025-expected.txt: Renamed from LayoutTests/platform/chromium-linux/fast/block/positioning/025-expected.txt.
      * platform/chromium/fast/block/positioning/fixed-position-stacking-context-expected.txt: Renamed from LayoutTests/platform/chromium-linux-x86/fast/block/positioning/fixed-position-stacking-context-expected.txt.
      * platform/efl/fast/block/positioning/016-expected.txt: Removed.
      * platform/efl/fast/block/positioning/025-expected.txt: Removed.
      * platform/gtk/fast/block/positioning/016-expected.txt: Removed.
      * platform/gtk/fast/block/positioning/025-expected.txt: Removed.
      * platform/qt/fast/block/positioning/016-expected.txt: Removed.
      * platform/qt/fast/block/positioning/025-expected.txt: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      14e823cb
    • fpizlo@apple.com's avatar
      All of the things in SparseArrayValueMap should be out-of-line · 9cedb5d0
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=96854
      
      Reviewed by Andy Estes.
      
      Those inline methods were buying us nothing.
      
      * GNUmakefile.list.am:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * runtime/JSArray.cpp:
      * runtime/JSGlobalData.cpp:
      * runtime/JSObject.cpp:
      * runtime/RegExpMatchesArray.cpp:
      * runtime/SparseArrayValueMap.cpp:
      (JSC::SparseArrayValueMap::SparseArrayValueMap):
      (JSC):
      (JSC::SparseArrayValueMap::~SparseArrayValueMap):
      (JSC::SparseArrayValueMap::finishCreation):
      (JSC::SparseArrayValueMap::create):
      (JSC::SparseArrayValueMap::destroy):
      (JSC::SparseArrayValueMap::createStructure):
      (JSC::SparseArrayValueMap::add):
      (JSC::SparseArrayValueMap::putEntry):
      (JSC::SparseArrayValueMap::putDirect):
      (JSC::SparseArrayEntry::get):
      (JSC::SparseArrayEntry::getNonSparseMode):
      (JSC::SparseArrayValueMap::visitChildren):
      * runtime/SparseArrayValueMapInlineMethods.h: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9cedb5d0
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r128673. · 6b54085e
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/128673
      https://bugs.webkit.org/show_bug.cgi?id=96847
      
      Makes plugins/document-open.html crash (Requested by jamesr_
      on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-14
      
      * dom/ContainerNode.cpp:
      (WebCore):
      (WebCore::ContainerNode::insertBeforeCommon):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::ContainerNode::removeBetween):
      (WebCore::ContainerNode::removeChildren):
      (WebCore::ContainerNode::appendChild):
      (WebCore::ContainerNode::parserAddChild):
      (WebCore::dispatchChildInsertionEvents):
      (WebCore::dispatchChildRemovalEvents):
      * dom/ContainerNode.h:
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
      (WebCore::ChildNodeInsertionNotifier::notify):
      (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
      * dom/Document.cpp:
      (WebCore::Document::dispatchWindowEvent):
      (WebCore::Document::dispatchWindowLoadEvent):
      * dom/EventDispatcher.cpp:
      (WebCore::EventDispatcher::dispatchEvent):
      * dom/EventTarget.cpp:
      (WebCore):
      (WebCore::forbidEventDispatch):
      (WebCore::allowEventDispatch):
      (WebCore::eventDispatchForbidden):
      (WebCore::EventTarget::fireEventListeners):
      * dom/EventTarget.h:
      (WebCore):
      (WebCore::forbidEventDispatch):
      (WebCore::allowEventDispatch):
      * dom/Node.cpp:
      (WebCore::Node::dispatchSubtreeModifiedEvent):
      (WebCore::Node::dispatchFocusInEvent):
      (WebCore::Node::dispatchFocusOutEvent):
      (WebCore::Node::dispatchDOMActivateEvent):
      * dom/WebKitNamedFlow.cpp:
      (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::loadInternal):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6b54085e
    • bdakin@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=96846 · 6f3c90be
      bdakin@apple.com authored
      Tests failing on WK2 bots after giving fixed positioning its own 
      stacking context
      
      Reviewed by Geoffrey Garen.
      
      Tests are failing because I checked in updated results that expect 
      fixed positioning to create a stacking context. However, 
      WebKitTestRunner does not enable ScrollingCoordinator, so the code 
      that I added to enable stacking contexts for fixedPos is never 
      actually running. This patch moves that code to a place where it will 
      run for the testing tools, which matches the patch for WK1.
      * WebProcess/WebPage/DrawingAreaImpl.cpp:
      (WebKit::DrawingAreaImpl::updatePreferences):
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6f3c90be
    • jchaffraix@webkit.org's avatar
      Revert r127457 and following fixes due to several hit-testing regressions · 5083f636
      jchaffraix@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96830
      
      Reviewed by Antonio Gomes.
      
      .:
      
      This change reverts r127457, r127863 and r128505.
      
      * Source/autotools/symbols.filter:
      
      Source/WebCore:
      
      This change reverts r127457, r127863 and r128505.
      
      * WebCore.exp.in:
      * WebCore.order:
      * dom/Document.cpp:
      (WebCore::Document::nodesFromRect):
      * dom/Document.h:
      (Document):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::hitTestResultAtPoint):
      * rendering/HitTestRequest.h:
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestLocation::HitTestLocation):
      * rendering/HitTestResult.h:
      (HitTestLocation):
      * rendering/RenderFrameBase.cpp:
      * rendering/RenderFrameBase.h:
      (RenderFrameBase):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::hitTest):
      * testing/Internals.cpp:
      (WebCore::Internals::nodesFromRect):
      * testing/Internals.h:
      (Internals):
      * testing/Internals.idl:
      
      Source/WebKit/chromium:
      
      This change reverts r127457, r127863 and r128505.
      
      * src/ContextMenuClientImpl.cpp:
      (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
      
      Source/WebKit2:
      
      This change reverts r127457, r127863 and r128505.
      
      * win/WebKit2.def:
      * win/WebKit2CFLite.def:
      
      LayoutTests:
      
      This change reverts r127457, r127863 and r128505. As the tests relies on the extended API
      after r127457, we cannot keep them.
      
      * fast/dom/nodesFromRect/nodesFromRect-child-frame-content-expected.txt: Removed.
      * fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html: Removed.
      * fast/dom/nodesFromRect/resources/child-frame.html: Removed.
      * fast/dom/nodesFromRect/resources/nodesFromRect.js:
      (check):
      (checkShadowContent):
      * touchadjustment/iframe-boundary-expected.txt: Removed.
      * touchadjustment/iframe-boundary.html: Removed.
      * touchadjustment/resources/inner-content-page.html: Removed.
      * touchadjustment/resources/inner-navigation-frame.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5083f636
    • commit-queue@webkit.org's avatar
      Skip image load tests that requires queueReload in WebKit2 · fe91d738
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96832
      
      Tests added in reivison 128645.
      
      Patch by Bo Liu <boliu@chromium.org> on 2012-09-14
      Reviewed by Adam Barth.
      
      * platform/wk2/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe91d738
    • dpranke@chromium.org's avatar
      nrwt: --additional-platform-dir is broken on chromium ports · 880eca66
      dpranke@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96840
      
      Reviewed by Ojan Vafai.
      
      Looks like I broke this when cleaning things up as part of
      adding ML support. Fixing and adding a test.
      
      * Scripts/webkitpy/layout_tests/port/chromium.py:
      (ChromiumPort.default_baseline_search_path):
      * Scripts/webkitpy/layout_tests/port/chromium_android.py:
      (ChromiumAndroidPort.default_baseline_search_path):
      * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
      (ChromiumLinuxPort.default_baseline_search_path):
      * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
      (ChromiumMacPort.__init__):
      * Scripts/webkitpy/layout_tests/port/chromium_win.py:
      (ChromiumWinPort.setup_environ_for_server):
      * Scripts/webkitpy/layout_tests/port/port_testcase.py:
      (test_check_build):
      (test_additional_platform_directory):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      880eca66
    • jsbell@chromium.org's avatar
      IndexedDB: Calling close() during upgradeneeded handler should fire error at open request · bd1cfeab
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96807
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Per spec, if the database connection is closed before the success event fires, the request
      should have an error event of type AbortError fired at it.
      
      Test: storage/indexeddb/intversion-close-in-upgradeneeded.html
      
      * Modules/indexeddb/IDBDatabase.h:
      (WebCore::IDBDatabase::isClosePending): Expose this state so an in-flight success can be morphed.
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::IDBDatabaseBackendImpl::close): Fire the appropriate error at connections that are mid-opening.
      * Modules/indexeddb/IDBOpenDBRequest.cpp:
      (WebCore::IDBOpenDBRequest::onSuccess): If the connection was closed before the success is enqueued -
      which can happen in multi-process ports with asynchronous messaging - convert the success to an error.
      
      LayoutTests:
      
      Update the test to match the spec behavior.
      
      * storage/indexeddb/intversion-close-in-upgradeneeded-expected.txt:
      * storage/indexeddb/resources/intversion-close-in-upgradeneeded.js:
      (deleteSuccess):
      (upgradeNeeded.transaction.oncomplete):
      (upgradeNeeded):
      (openError):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd1cfeab
    • rniwa@webkit.org's avatar
      Turn forbidEventDispatch and allowEventDispatch into a RAII object · 3f29758a
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96717
      
      Reviewed by Abhishek Arya.
      
      Replaced forbidEventDispatch and allowEventDispatch by AssertNoEventDispatch.
      
      * dom/ContainerNode.cpp:
      (WebCore):
      (WebCore::ContainerNode::insertBeforeCommon):
      (WebCore::ContainerNode::replaceChild):
      (WebCore::ContainerNode::removeBetween):
      (WebCore::ContainerNode::removeChildren):
      (WebCore::ContainerNode::appendChild):
      (WebCore::ContainerNode::parserAddChild):
      (WebCore::dispatchChildInsertionEvents):
      (WebCore::dispatchChildRemovalEvents):
      * dom/ContainerNode.h:
      (AssertNoEventDispatch):
      (WebCore::AssertNoEventDispatch::AssertNoEventDispatch):
      (WebCore::AssertNoEventDispatch::~AssertNoEventDispatch):
      (WebCore::AssertNoEventDispatch::isEventDispatchForbidden):
      (WebCore):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
      (WebCore::ChildNodeInsertionNotifier::notify):
      (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
      * dom/Document.cpp:
      (WebCore::Document::dispatchWindowEvent):
      (WebCore::Document::dispatchWindowLoadEvent):
      * dom/EventDispatcher.cpp:
      (WebCore::EventDispatcher::dispatchEvent):
      * dom/EventTarget.cpp:
      (WebCore):
      (WebCore::EventTarget::fireEventListeners):
      * dom/EventTarget.h:
      (WebCore):
      * dom/Node.cpp:
      (WebCore::Node::dispatchSubtreeModifiedEvent):
      (WebCore::Node::dispatchFocusInEvent):
      (WebCore::Node::dispatchFocusOutEvent):
      (WebCore::Node::dispatchDOMActivateEvent):
      * dom/WebKitNamedFlow.cpp:
      (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::loadInternal):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f29758a
    • ojan@chromium.org's avatar
      Mark svg/carto.net/selectionlist.svg as flaky because it depends on svg/carto.net/button.svg · 37842cc9
      ojan@chromium.org authored
      running first in order to pass.
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      37842cc9
    • ojan@chromium.org's avatar
      The cr-linux-ews thinks http/tests/cache/post-redirect-get.php and... · cadbeb92
      ojan@chromium.org authored
      The cr-linux-ews thinks http/tests/cache/post-redirect-get.php and http/tests/cache/post-with-cached-subresources.php are MISSING results
      https://bugs.webkit.org/show_bug.cgi?id=95215
      
      Reviewed by Adam Barth.
      
      Apparently, marking these as missing did not fix the EWS problem,
      so remove them from TestExpectations.
      
      * platform/chromium/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cadbeb92
    • commit-queue@webkit.org's avatar
      JSC should throw a more descriptive exception when blocking 'eval' via CSP. · 7415e10e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=94331
      
      Patch by Mike West <mkwst@chromium.org> on 2012-09-14
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore:
      
      Unless explicitly whitelisted, the 'script-src' Content Security Policy
      directive blocks 'eval' and 'eval'-like constructs such as
      'new Function()'. When 'eval' is encountered in code, an 'EvalError' is
      thrown, but the associated message is poor: "Eval is disabled" doesn't
      give developers enough information about why their code isn't behaving
      as expected.
      
      This patch adds an 'errorMessage' parameter to the JavaScriptCore method
      used to disable 'eval'; ContentSecurityPolicy has the opportunity to
      pass in a more detailed and descriptive error that contains more context
      for the developer.
      
      * runtime/Executable.cpp:
      (JSC::EvalExecutable::compileInternal):
          Drop the hard-coded "Eval is disabled" error message in favor of
          reading the error message off the global object.
      * runtime/FunctionConstructor.cpp:
      (JSC::FunctionConstructor::getCallData):
          Drop the hard-coded "Function constructor is disabled" error message
          in favor of reading the error message off the global object.
      * runtime/JSGlobalObject.h:
      (JSGlobalObject):
      (JSC::JSGlobalObject::evalEnabled):
          Making this accessor method const.
      (JSC::JSGlobalObject::evalDisabledErrorMessage):
          Accessor for the error message set via 'setEvalDisabled'.
      (JSC::JSGlobalObject::setEvalEnabled):
          Adding an 'errorMessage' parameter which is stored on the global
          object, and used when exceptions are thrown.
      
      Source/WebCore:
      
      Unless explicitly whitelisted, the 'script-src' Content Security Policy
      directive blocks 'eval' and 'eval'-like constructs such as
      'new Function()'. When 'eval' is encountered in code, an 'EvalError' is
      thrown, but the associated message is poor: "Eval is disabled" doesn't
      give developers enough information about why their code isn't behaving
      as expected.
      
      This patch adds an 'errorMessage' parameter to the JavaScriptCore method
      used to disable 'eval'; ContentSecurityPolicy has the opportunity to
      pass in a more detailed and descriptive error that contains more context
      for the developer.
      
      The new error message is tested by adjusting existing tests; nothing new
      is required.
      
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::initScript):
          Read the error message off the document's ContentSecurityPolicy.
      (WebCore::ScriptController::disableEval):
      * bindings/js/ScriptController.h:
      (ScriptController):
          Pipe the error message through to JSGlobalObject when disabling eval
      * bindings/js/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::disableEval):
      * bindings/js/WorkerScriptController.h:
      (WorkerScriptController):
          Pipe the error message through to JSGlobalObject when disabling eval
      * bindings/v8/ScriptController.cpp:
      (WebCore::ScriptController::disableEval):
      * bindings/v8/ScriptController.h:
      (ScriptController):
      * bindings/v8/WorkerScriptController.cpp:
      (WebCore::WorkerScriptController::disableEval):
      * bindings/v8/WorkerScriptController.h:
      (WorkerScriptController):
          Placeholder for V8 piping to be built in webk.it/94332.
      * dom/Document.cpp:
      (WebCore::Document::disableEval):
      * dom/Document.h:
      (Document):
      * dom/ScriptExecutionContext.h:
      (ScriptExecutionContext):
          Pipe the error message through to the ScriptController when
          disabling eval.
      * page/ContentSecurityPolicy.cpp:
      (WebCore::CSPDirectiveList::evalDisabledErrorMessage):
          Accessor for the error message that ought be displayed to developers
          when 'eval' used while disabled for a specific directive list.
      (WebCore::CSPDirectiveList::setEvalDisabledErrorMessage):
          Mutator for the error message that ought be displayed to developers
          when 'eval' used while disabled for a specific directive list.
      (CSPDirectiveList):
      (WebCore::CSPDirectiveList::create):
          Upon creation of a CSPDirectiveList, set the error message if the
          directive list disables 'eval'.
      (WebCore::ContentSecurityPolicy::didReceiveHeader):
          Pass the error message into ScriptExecutionContext::disableEval.
      (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
          Public accessor for the policy's error message; walks the list of
          directive lists and returns the first error message found.
      (WebCore):
      * page/ContentSecurityPolicy.h:
      * workers/WorkerContext.cpp:
      (WebCore::WorkerContext::disableEval):
      * workers/WorkerContext.h:
      (WorkerContext):
          Pipe the error message through to the ScriptController when
          disabling eval.
      
      LayoutTests:
      
      * http/tests/security/contentSecurityPolicy/eval-blocked-expected.txt:
      * http/tests/security/contentSecurityPolicy/eval-blocked-in-about-blank-iframe-expected.txt:
      * http/tests/security/contentSecurityPolicy/function-constructor-blocked-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7415e10e
    • commit-queue@webkit.org's avatar
      Remove V8DOMWindowShell::getEntered · 6e720dd4
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96637
      
      Patch by Dan Carney <dcarney@google.com> on 2012-09-14
      Reviewed by Adam Barth.
      
      V8DOMWindowShell::getEntered was refactored so that the window shell
      no longer has to be kept alive by a v8 context but rather a smaller
      object.
      
      No new tests. No change in functionality.
      
      * bindings/v8/DOMData.cpp:
      (WebCore::DOMData::getCurrentStore):
      * bindings/v8/ScopedPersistent.h:
      (WebCore::ScopedPersistent::leakHandle):
      (ScopedPersistent):
      * bindings/v8/ScriptController.cpp:
      (WebCore::ScriptController::resetIsolatedWorlds):
      (WebCore::ScriptController::evaluateInIsolatedWorld):
      (WebCore::ScriptController::currentWorldContext):
      * bindings/v8/V8Binding.cpp:
      (WebCore::perContextDataForCurrentWorld):
      * bindings/v8/V8DOMWindowShell.cpp:
      (WebCore::setIsolatedWorldField):
      (WebCore::V8DOMWindowShell::toIsolatedContextData):
      (WebCore::isolatedContextWeakCallback):
      (WebCore::V8DOMWindowShell::disposeContext):
      (WebCore::V8DOMWindowShell::clearIsolatedShell):
      (WebCore):
      (WebCore::V8DOMWindowShell::initializeIfNeeded):
      (WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
      * bindings/v8/V8DOMWindowShell.h:
      (V8DOMWindowShell):
      (IsolatedContextData):
      (WebCore::V8DOMWindowShell::IsolatedContextData::create):
      (WebCore::V8DOMWindowShell::IsolatedContextData::world):
      (WebCore::V8DOMWindowShell::IsolatedContextData::perContextData):
      (WebCore::V8DOMWindowShell::IsolatedContextData::setSecurityOrigin):
      (WebCore::V8DOMWindowShell::IsolatedContextData::securityOrigin):
      (WebCore::V8DOMWindowShell::IsolatedContextData::IsolatedContextData):
      (WebCore::V8DOMWindowShell::enteredIsolatedContext):
      (WebCore::V8DOMWindowShell::enteredIsolatedContextData):
      * bindings/v8/V8DOMWrapper.h:
      (WebCore::V8DOMWrapper::getCachedWrapper):
      * bindings/v8/WorldContextHandle.cpp:
      (WebCore::WorldContextHandle::WorldContextHandle):
      * bindings/v8/custom/V8DocumentCustom.cpp:
      (WebCore::toV8):
      * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
      (WebCore::toV8):
      * bindings/v8/custom/V8SVGDocumentCustom.cpp:
      (WebCore::toV8):
      * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
      (WebCore::V8XMLHttpRequest::constructorCallback):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e720dd4
    • ojan@chromium.org's avatar
      Mark compositing/geometry/fixed-position-transform-composited-page-scale.html flaky · a978e2b2
      ojan@chromium.org authored
      as it's flaky on all the Chromium bots.
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a978e2b2
    • fpizlo@apple.com's avatar
      bbc homepage crashes immediately · c9f16125
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=96812
      <rdar://problem/12081386>
      
      Reviewed by Oliver Hunt.
      
      If you use the old storage pointer to write to space you thought was newly allocated,
      you're going to have a bad time.
      
      * runtime/JSArray.cpp:
      (JSC::JSArray::unshiftCount):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c9f16125
    • michelangelo@webkit.org's avatar
      [CSS Shaders] u_textureSize uniform should be set to the size of the texture. · 65db9806
      michelangelo@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=95914
      
      Reviewed by Dean Jackson.
      
      Source/WebCore:
      
      This adds support for the following shader uniform variables:
      
          uniform vec2 u_textureSize
          uniform vec4 u_meshBox
          uniform vec2 u_tileSize
          uniform vec2 u_meshSize
      
      The relevant section of the specification is:
      http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#shader-uniform-variables
      
      Tests: css3/filters/custom/custom-filter-u-mesh-box.html
             css3/filters/custom/custom-filter-u-mesh-size.html
             css3/filters/custom/custom-filter-u-texture-size.html
             css3/filters/custom/custom-filter-u-tile-size.html
      
      * platform/graphics/filters/FECustomFilter.cpp:
      (WebCore::FECustomFilter::bindProgramAndBuffers):
      
      LayoutTests:
      
      Tests for the following uniform variables:
          uniform vec2 u_textureSize
          uniform vec4 u_meshBox
          uniform vec2 u_tileSize
          uniform vec2 u_meshSize
      
      The relevant section of the specification is:
      http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#shader-uniform-variables
      
      * css3/filters/custom/custom-filter-u-mesh-box-expected.html: Added.
      * css3/filters/custom/custom-filter-u-mesh-box.html: Added.
      * css3/filters/custom/custom-filter-u-mesh-size-expected.html: Added.
      * css3/filters/custom/custom-filter-u-mesh-size.html: Added.
      * css3/filters/custom/custom-filter-u-texture-size-expected.html: Added.
      * css3/filters/custom/custom-filter-u-texture-size.html: Added.
      * css3/filters/custom/custom-filter-u-tile-size-expected.html: Added.
      * css3/filters/custom/custom-filter-u-tile-size.html: Added.
      * css3/filters/resources/u-mesh-box-is-unit-square.fs: Added.
      * css3/filters/resources/u-mesh-size.fs: Added.
      * css3/filters/resources/u-texture-size.fs: Added.
      * css3/filters/resources/u-tile-size.fs: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      65db9806