[Qt] Unreviewed weekend gardening. Skip 2 new tests, because
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
[Qt][WK2] Unreviewed weekend gardening. Skip 4 new failing tests to paint the bot green.

* platform/qt-5.0-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r128669.
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
[Qt] QDoc fixes for Qt 5 documentation
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
[Chromium] Update test expectation

* 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
[EFL][WK2] Provide implementation for PageClientImpl::processDidCrash()
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
REGRESSION (r125578): The Mac complex text code path disagrees with the fast path on word spacing
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
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
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
Add 8 bit handling to SpaceSplitString
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
llint: Implement LOCAL_LABEL_STRING for the BSD platforms.
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
[GTK] Include missing header files in the tarball
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
REGRESSION(r127438): Google Docs to renders text too small.
<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
WinCairo build fix due to missing symbols for setImagesEnabled and setStorageBlockingPolicy
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
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
Add ClipPathOperation for -webkit-clip-path organization
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
Fix the build with WTF URL
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
<use> not working when the SVG doc is embedded as <object> data
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
Source/WebCore: Pause inspector when inline scripts are blocked by Content Security Policy.
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
Fixed JSLock to use the platform abstraction for Mutex instead of
depending on pthreads.
https://bugs.webkit.org/show_bug.cgi?id=96858.

Reviewed by Filip Pizlo.

This fixes a synchronization problem on the Windows port and makes
it more reliable when running the layout tests.

* runtime/InitializeThreading.cpp:
(JSC::initializeThreadingOnce):
* runtime/JSLock.cpp:
(JSC):
(JSC::GlobalJSLock::GlobalJSLock):
(JSC::GlobalJSLock::~GlobalJSLock):
(JSC::GlobalJSLock::initialize):
* runtime/JSLock.h:
(GlobalJSLock):
(JSLock):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128704 268f45cc-cd09-0410-ab3c-d52691b4dbfc