Generalize JSGlobalThis as JSProxy
https://bugs.webkit.org/show_bug.cgi?id=97716

Reviewed by Oliver Hunt.

../JavaScriptCore: 

Generalize JSGlobalThis as JSProxy and move proxying functionality up from the window shell into JSProxy.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::toThisObject):
    - Hoist toThisObject from WebCore.
(JSC):
* runtime/JSGlobalObject.h:
    - removed include.
(JSC::JSGlobalObject::finishCreation):
    - JSGlobalThis -> JSObject
(JSGlobalObject):
    - Hoist toThisObject from WebCore.
* runtime/JSGlobalThis.cpp: Removed.
* runtime/JSGlobalThis.h: Removed.
* runtime/JSObject.cpp:
    - removed include.
* runtime/JSObject.h:
(JSObject):
(JSC::JSObject::isProxy):
    - isGlobalThis -> isProxy
    - GlobalThisType -> ProxyType
* runtime/JSProxy.cpp: Copied from Source/JavaScriptCore/runtime/JSGlobalThis.cpp.
(JSC):
(JSC::JSProxy::visitChildren):
(JSC::JSProxy::setTarget):
(JSC::JSProxy::className):
(JSC::JSProxy::getOwnPropertySlot):
(JSC::JSProxy::getOwnPropertySlotByIndex):
(JSC::JSProxy::getOwnPropertyDescriptor):
(JSC::JSProxy::put):
(JSC::JSProxy::putByIndex):
(JSC::JSProxy::putDirectVirtual):
(JSC::JSProxy::defineOwnProperty):
(JSC::JSProxy::deleteProperty):
(JSC::JSProxy::deletePropertyByIndex):
(JSC::JSProxy::getPropertyNames):
(JSC::JSProxy::getOwnPropertyNames):
    - Class cretaed from JSGlobalThis, JSDOMWindowShell.
* runtime/JSProxy.h: Copied from Source/JavaScriptCore/runtime/JSGlobalThis.h.
(JSC::JSProxy::create):
(JSC::JSProxy::createStructure):
(JSProxy):
(JSC::JSProxy::target):
(JSC::JSProxy::JSProxy):
    - Class cretaed from JSGlobalThis, JSDOMWindowShell.
* runtime/JSType.h:
    - GlobalThisType -> ProxyType

../WebCore: 

This patch moves window shell functionality up to JSC::JSProxy.

* ForwardingHeaders/runtime/JSGlobalThis.h: Removed.
* ForwardingHeaders/runtime/JSProxy.h: Copied from Source/WebCore/ForwardingHeaders/runtime/JSGlobalThis.h.
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::finishCreation):
    - JSGlobalThis -> JSObject
* bindings/js/JSDOMGlobalObject.h:
(JSDOMGlobalObject):
    - JSGlobalThis -> JSObject
* bindings/js/JSDOMWindowBase.cpp:
(WebCore):
    - Hoist toThisObject up into JSC.
* bindings/js/JSDOMWindowBase.h:
(JSDOMWindowBase):
    - Hoist toThisObject up into JSC.
* bindings/js/JSDOMWindowShell.cpp:
(WebCore):
    - JSGlobalThis -> JSProxy
    - moved JSObject callbacks to JSProxy
* bindings/js/JSDOMWindowShell.h:
(JSDOMWindowShell):
    - JSGlobalThis -> JSProxy
    - moved JSObject callbacks to JSProxy
(WebCore::JSDOMWindowShell::window):
    - unwrappedObject() -> target()
(WebCore::JSDOMWindowShell::setWindow):
    - setUnwrappedObject() -> setTarget()
(WebCore::JSDOMWindowShell::createStructure):
    - GlobalThisType -> ProxyType



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Volume button should not be shown for videos without audio
https://bugs.webkit.org/show_bug.cgi?id=97574

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-26
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

The volume control is no longer shown for videos with
no audio.

No new tests, already tested by media/video-no-audio.html.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::hasOwnDisabledStateHandlingFor):
(WebCore):
* platform/efl/RenderThemeEfl.h:
(RenderThemeEfl):

LayoutTests:

Generate baseline for media/video-no-audio.html and unskip
it now that the volume control is no longer shown for
videos with no audio track.

Rebaseline several other media tests whose output changed
due to the fix.

* platform/efl/Skipped:
* platform/efl/media/media-controls-clone-expected.png:
* platform/efl/media/media-controls-clone-expected.txt:
* platform/efl/media/video-empty-source-expected.png:
* platform/efl/media/video-empty-source-expected.txt:
* platform/efl/media/video-no-audio-expected.png: Added.
* platform/efl/media/video-no-audio-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] Rename WrapShapeInfo to ExclusionShapeInfo
https://bugs.webkit.org/show_bug.cgi?id=96157

Patch by Bear Travis <betravis@adobe.com> on 2012-09-26
Reviewed by Dirk Schulze.

Rename WrapShapeInfo to the more specific ExclusionShapeInsideInfo, which is the only
information the class is currently tracking. This patch updates build files, class
instances and variable names. When shape-outside is added, there may be an additional
ExclusionShapeOutsideInfo class that shares a common parent class with
ExclusionShapeInsideInfo. This patch only changes names, there is no new functionality.

Covered by existing tests

* CMakeLists.txt: Rename files from WrapShapeInfo to ExclusionShapeInsideInfo.
* GNUmakefile.list.am: Ditto.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* rendering/ExclusionShapeInsideInfo.cpp: Renamed from Source/WebCore/rendering/WrapShapeInfo.cpp.
(WebCore):  Renaming functions and variables to use ExclusionShapeInsideInfo rather than
WrapShapeInfo.
(WebCore::exclusionShapeInsideInfoMap):
(WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo):
(WebCore::ExclusionShapeInsideInfo::~ExclusionShapeInsideInfo):
(WebCore::ExclusionShapeInsideInfo::ensureExclusionShapeInsideInfoForRenderBlock):
(WebCore::ExclusionShapeInsideInfo::exclusionShapeInsideInfoForRenderBlock):
(WebCore::ExclusionShapeInsideInfo::isExclusionShapeInsideInfoEnabledForRenderBlock):
(WebCore::ExclusionShapeInsideInfo::removeExclusionShapeInsideInfoForRenderBlock):
(WebCore::ExclusionShapeInsideInfo::computeShapeSize):
(WebCore::ExclusionShapeInsideInfo::computeSegmentsForLine):
* rendering/ExclusionShapeInsideInfo.h: Renamed from Source/WebCore/rendering/WrapShapeInfo.h.
(WebCore):
(ExclusionShapeInsideInfo):
(WebCore::ExclusionShapeInsideInfo::create):
(WebCore::ExclusionShapeInsideInfo::shapeLogicalTop):
(WebCore::ExclusionShapeInsideInfo::shapeLogicalBottom):
(WebCore::ExclusionShapeInsideInfo::hasSegments):
(WebCore::ExclusionShapeInsideInfo::segments):
(WebCore::ExclusionShapeInsideInfo::dirtyShapeSize):
(WebCore::ExclusionShapeInsideInfo::lineOverlapsShapeBounds):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
(WebCore):
(WebCore::LayoutState::LayoutState):
(WebCore::LayoutState::exclusionShapeInsideInfo):
(LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange):
(WebCore::RenderBlock::updateRegionsAndExclusionsLogicalSize):
(WebCore::RenderBlock::computeExclusionShapeSize):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::exclusionShapeInsideInfo):
(RenderBlock):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::layoutExclusionShapeInsideInfo):
(WebCore::LineWidth::LineWidth):
(WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
* rendering/RenderView.h:
(WebCore::RenderView::pushLayoutState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
C++ style checker should warn when the indentation is wrong
https://bugs.webkit.org/show_bug.cgi?id=97602

Reviewed by Ojan Vafai.

Rewrite the indentation checker to ensure that indentation is always a factor of 4
and that we only indent 4 spaces from the previous line.

I deleted some of the old indentation checking code since it was filtered out
and didn't match the webkit style.

* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checkers/cpp.py:
(check_indentation_amount): New function that checks indentation. Intentionally runs after
other indentation checks.
(check_style): Delete the old indentation code since we were already filtering out the whitespace/labels warnings.
(CppChecker): Remove the whitespace/labels filter.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_multi_line_comments): Force 4 space indent.
(CppStyleTest.test_explicit_single_argument_constructors):
(CppStyleTest.test_explicit_single_argument_constructors.Foo):
(CppStyleTest.test_explicit_single_argument_constructors.Qualifier):
(CppStyleTest.test_slash_star_comment_on_single_line):
(CppStyleTest.test_braces):
(CppStyleTest.test_spacing_before_last_semicolon):
(CppStyleTest.test_static_or_global_stlstrings):
(CppStyleTest.test_indent): Added macro test case.
(CppStyleTest.test_build_class):
(NoNonVirtualDestructorsTest.test_no_error):
(NoNonVirtualDestructorsTest.test_no_error.Foo):
(NoNonVirtualDestructorsTest.test_no_error.Qualified):
(NoNonVirtualDestructorsTest.test_no_destructor_when_virtual_needed):
(NoNonVirtualDestructorsTest.test_no_destructor_when_virtual_needed.Foo):
(NoNonVirtualDestructorsTest.test_destructor_non_virtual_when_virtual_needed):
(NoNonVirtualDestructorsTest.test_destructor_non_virtual_when_virtual_needed.Foo):
(NoNonVirtualDestructorsTest.test_no_warn_when_derived):
(NoNonVirtualDestructorsTest.test_no_warn_when_derived.Foo):
(NoNonVirtualDestructorsTest.test_internal_braces):
(NoNonVirtualDestructorsTest.test_internal_braces.Foo):
(NoNonVirtualDestructorsTest.test_inner_class_needs_virtual_destructor):
(NoNonVirtualDestructorsTest.test_inner_class_needs_virtual_destructor.Foo):
(NoNonVirtualDestructorsTest.test_inner_class_needs_virtual_destructor.Foo.Goo):
(NoNonVirtualDestructorsTest.test_outer_class_needs_virtual_destructor):
(NoNonVirtualDestructorsTest.test_outer_class_needs_virtual_destructor.Foo):
(NoNonVirtualDestructorsTest.test_outer_class_needs_virtual_destructor.Foo.Goo):
(NoNonVirtualDestructorsTest.test_qualified_class_needs_virtual_destructor):
(NoNonVirtualDestructorsTest.test_qualified_class_needs_virtual_destructor.Qualified):
(NoNonVirtualDestructorsTest.test_multi_line_declaration_no_error):
(NoNonVirtualDestructorsTest.test_multi_line_declaration_no_error.Foo):
(NoNonVirtualDestructorsTest.test_multi_line_declaration_with_error):
(NoNonVirtualDestructorsTest.test_multi_line_declaration_with_error.Foo):
(WebKitStyleTest.test_indentation):
(WebKitStyleTest.test_braces): Add test for call params spanning lines.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSObject::ensureArrayStorage() ignores the possibility that extensions have been prevented
https://bugs.webkit.org/show_bug.cgi?id=97719

Reviewed by Gavin Barraclough.

Source/JavaScriptCore: 

* runtime/JSObject.cpp:
(JSC::JSObject::ensureArrayStorageSlow):
(JSC):
* runtime/JSObject.h:
(JSC::JSObject::ensureArrayStorage):
(JSObject):

LayoutTests: 

* fast/js/dfg-arrayify-when-late-prevent-extensions-expected.txt: Added.
* fast/js/dfg-arrayify-when-late-prevent-extensions.html: Added.
* fast/js/dfg-arrayify-when-prevent-extensions-expected.txt: Added.
* fast/js/dfg-arrayify-when-prevent-extensions.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-arrayify-when-late-prevent-extensions.js: Added.
(foo):
* fast/js/script-tests/dfg-arrayify-when-prevent-extensions.js: Added.
(foo):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] load event fires on XMLHttpRequestUpload twice with Qt5
https://bugs.webkit.org/show_bug.cgi?id=92669

Patch by Marcelo Lira <marcelo.lira@openbossa.org> on 2012-09-26
Reviewed by Kenneth Rohde Christiansen.

When finishing, after the upload have already been done, Qt5's
QNetworkReply emits an uploadProgress signal with total bytes set to
zero. Since 0 of 0 bytes doesn't make any sense as progress, a
conditional was added to QNetworkReplyHandler::uploadProgress to make
do nothing with such values.

Unskip XMLHttpRequestUpload tests.

Source/WebCore:

* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyHandler::uploadProgress):

LayoutTests:

* platform/qt-5.0/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=97629
http/tests/security/cross-frame-access-put.html failing on Mac WK2 bots after 
being unskipped

Reviewed by Tim Horton.

The test was failing because we were failing to use the fake window origin. We 
should really always use the fake origin. This patch eliminates 
_shouldUseFakeOrigin in favor of always using it.
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(-[WebKitTestRunnerWindow setFrameOrigin:]):
(-[WebKitTestRunnerWindow setFrame:display:animate:]):
(-[WebKitTestRunnerWindow setFrame:display:]):
(-[WebKitTestRunnerWindow frameRespectingFakeOrigin]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MathML] Implement <mtd> rowspan and columnspan attributes
https://bugs.webkit.org/show_bug.cgi?id=97401

Reviewed by Eric Seidel.

Source/WebCore: 

These should behave like rowspan and colspan for HTMLTableCell. As in that case,
RenderTableCell accesses these attributes of its element as needed.

Tested by modifications to LayoutTests/mathml/presentation/tables.xhtml.

* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::colSpan):
(WebCore::MathMLElement::rowSpan):
(WebCore::MathMLElement::parseAttribute):
* mathml/MathMLElement.h:
(MathMLElement):
(WebCore::toMathMLElement):
* mathml/mathattrs.in:
* mathml/mathtags.in:
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::RenderTableCell):
(WebCore::isMathMLElement):
(WebCore::RenderTableCell::colSpan):
(WebCore::RenderTableCell::rowSpan):
(WebCore::RenderTableCell::colSpanOrRowSpanChanged):
* rendering/RenderTableCell.h:
(RenderTableCell):
    - Changed m_hasAssociatedTableCellElement to m_hasHTMLTableCellElement.

LayoutTests: 

* mathml/presentation/tables.xhtml:
* platform/mac/mathml/presentation/tables-expected.png:
* platform/mac/mathml/presentation/tables-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r129673.
http://trac.webkit.org/changeset/129673
https://bugs.webkit.org/show_bug.cgi?id=97723

Causing window build breakage (Requested by alecf on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-26

Source/WebCore:

* platform/chromium/PlatformSupport.h:
(PlatformSupport):
* platform/graphics/skia/SkiaFontWin.cpp:
(WebCore::paintSkiaText):

Source/WebKit/chromium:

* src/PlatformSupport.cpp:
(WebCore::PlatformSupport::ensureFontLoaded):

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