virtualForWithFunction() should not throw an exception with a partially initialized frame.
<https://webkit.org/b/129134>

Reviewed by Michael Saboff.

Currently, when JITOperations.cpp's virtualForWithFunction() fails to
prepare the callee function for execution, it proceeds to throw the
exception using the callee frame which is only partially initialized
thus far. Instead, it should be throwing the exception using the caller
frame because:
1. the error happened "in" the caller while preparing the callee for
   execution i.e. the caller frame is the top fully initialized frame
   on the stack.
2. the callee frame is not fully initialized yet, and the unwind
   mechanism cannot depend on the data in it.

* jit/JITOperations.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop generating Objective-C bindings for the SVG DOM
<http://webkit.org/b/129107>

Reviewed by Timothy Hatcher.

Bug 114076 stopped compiling the Objective-C bindings for the
SVG DOM, but we continued to generate the header and source
files after that landed in r147822.  This patch also stops
generating the unused header and source files.

* DerivedSources.make:
- Split BINDING_IDLS into NON_SVG_BINDING_IDLS and
  SVG_BINDING_IDLS so that they may operated on separately.
- Define BINDING_IDLS again as the full list of IDL files.
- Rename DOM_CLASSES to JS_DOM_CLASSES so that JavaScript
  bindings are still generated for all IDL files.
- Add OBJC_DOM_CLASSES so that Objective-C bindings are only
  generated for non-SVG IDL files.

* bindings/scripts/CodeGeneratorObjC.pm:
(GetBaseClass):
(GetPropertyAttributes):
(AddIncludesForType):
(GenerateHeader):
(GenerateImplementation):
- Remove support for SVG classes.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove redundant deviceScaleFactor() functions and make callers use Document::deviceScaleFactor() when accessible.
https://bugs.webkit.org/show_bug.cgi?id=129137

Reviewed by Simon Fraser.

No change in behavior.

Source/WebCore:

* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI):
* page/Page.cpp:
* page/Page.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::GraphicsContext):
* platform/graphics/GraphicsContext.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageSizeForError):
(WebCore::RenderImage::paintReplaced):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::drawPlatformResizerImage):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::drawLineForBoxSide):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):

Source/WebKit2:

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::getFindIndicatorBitmapAndRect):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
m_ancestorDisabledState should never be unknown
https://bugs.webkit.org/show_bug.cgi?id=129084

Reviewed by Benjamin Poulain.

Source/WebCore: 

In order to resolve the bug 129035, a text form control elements needs to synchronously change
its inner text element's editability by setting or unsetting contenteditable content attribute.
Before this patch, we could not do this because editability of a text form control dependent on
its disabled-ness which was only computed lazily via updateAncestorDisabledState().

This patch makes HTMLFieldSetElement and HTMLFormControlElement update this state synchronously.
To avoid O(k) DOM traversal, where k is the depth of the tree, in insertedInto and removedFrom of
HTMLFormControlElement on most pages, a new document-level flag, m_disabledFieldsetElementsCount,
has been added to indicate whether the document contains any disabled fieldset or not.

Also renamed the misleadingly named disabledAttributeChanged to disabledStateChanged, and added
new function of the same name (disabledAttributeChanged) to be used by HTMLFieldSetElement
for keeping the document-level flag up-to-date upon disabled attribute changes.

Tests: fast/forms/fieldset/fieldset-disabled-2.html

* dom/Document.cpp:
(WebCore::Document::Document): Initializes newly added m_disabledFieldsetElementsCount.
(WebCore::Document::~Document): Assert that we've done house keeping right.
* dom/Document.h:
(WebCore::Document::hasDisabledFieldsetElement): Added.
(WebCore::Document::addDisabledFieldsetElement): Added.
(WebCore::Document::removeDisabledFieldsetElement): Added.

* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::~HTMLFieldSetElement): Removes itself from the owner document.

(WebCore::updateFromControlElementsAncestorDisabledStateUnder): Added. Updates startNode and
its descendants' ancestor disabled flag. We don't update controls under another disabled
fieldset element since disabled-ness of those controls aren't affected by startNode.

(WebCore::HTMLFieldSetElement::disabledAttributeChanged): Call addDisabledFieldsetElement and
removeDisabledFieldsetElement to update the owner document's flag.

(WebCore::HTMLFieldSetElement::disabledStateChanged): Renamed from disabledAttributeChanged. 
Enable form control elements under the first legend element and disable or enable other
descendent form controls in accordance with the presence of disabled content attribute.

(WebCore::HTMLFieldSetElement::childrenChanged): Update disabled-ness of form controls under
child legend elements because controls aren't disabled in the first legend element, and adding
or removing child elements may have changed the first legend element.

(WebCore::HTMLFieldSetElement::didMoveToNewDocument): Update the flag on the owner document.
* html/HTMLFieldSetElement.h:

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::HTMLFormControlElement):
(WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor): Returns boolean instead of
updating m_ancestorDisabledState internally. Also renamed from updateAncestorDisabledState.

(WebCore::HTMLFormControlElement::setAncestorDisabled): Replaced ancestorDisabledStateWasChanged.
This function updates m_disabledByAncestorFieldset and calls disabledAttributeChanged as needed.

(WebCore::HTMLFormControlElement::disabledAttributeChanged): Added. Calls disabledStateChanged.
(WebCore::HTMLFormControlElement::disabledStateChanged): Renamed from disabledAttributeChanged.

(WebCore::HTMLFormControlElement::insertedInto): Update m_disabledByAncestorFieldset if there is
a possibility (i.e. the document contains any disabled fieldset element) that this form control
is inserted under a disabled fieldset element.

(WebCore::HTMLFormControlElement::removedFrom): If this form control element is not disabled by
a fieldset ancestor, then there is nothing to do. If it is, then check to see if the element is
still disabled now that we've lost some ancestors.

(WebCore::HTMLFormControlElement::isDisabledFormControl): No longer updates m_ancestorDisabledState
lazily since m_disabledByAncestorFieldset is never ambiguous now.

* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElement::disabledByAncestorFieldset): Added.

LayoutTests: 

Added more test cases.

* fast/forms/fieldset/fieldset-disabled-2-expected.txt:
* fast/forms/fieldset/fieldset-disabled-2.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update test expectations after r164449.

* TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename EXT_draw_buffers to WEBGL_draw_buffers
https://bugs.webkit.org/show_bug.cgi?id=128894

Reviewed by Dean Jackson.

Source/WebCore:

I noticed the related spec has changed. Accordingly chromium also changed its implementation
to meet the spec. So here I'd like to apply it to webkit as well.

Merged from Blink (patch by bajones):
https://src.chromium.org/viewvc/blink?revision=152065&view=revision

Test: fast/canvas/webgl/webgl-draw-buffers.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::toJS):
* html/canvas/EXTDrawBuffers.idl: Removed.
* html/canvas/WebGLDrawBuffers.cpp: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.cpp.
(WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
(WebCore::WebGLDrawBuffers::~WebGLDrawBuffers):
(WebCore::WebGLDrawBuffers::getName):
(WebCore::WebGLDrawBuffers::create):
(WebCore::WebGLDrawBuffers::supported):
(WebCore::WebGLDrawBuffers::drawBuffersWEBGL):
(WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):
* html/canvas/WebGLDrawBuffers.h: Renamed from Source/WebCore/html/canvas/EXTDrawBuffers.h.
* html/canvas/WebGLDrawBuffers.idl: Added.
* html/canvas/WebGLExtension.h:
* html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::drawBuffersIfNecessary):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::getSupportedExtensions):
(WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
(WebCore::WebGLRenderingContext::supportsDrawBuffers):
* html/canvas/WebGLRenderingContext.h:

LayoutTests:

webgl-draw-buffers.html came from Khronos's webgl conformace tests. It requires
some new apis in webgl-test-utils.js so that it is updated as well. The attached
test results are for mac. But they're expected to fail since EXT_draw_buffers are
disabled with some reason. See WebGLDrawBuffers::supported. So I add a line
for webgl-draw-buffers.html to mac/TestExpectations.

* fast/canvas/webgl/resources/webgl-test-utils.js:
(WebGLTestUtils):
(WebGLTestUtils.):
* fast/canvas/webgl/webgl-draw-buffers-expected.txt: Added.
* fast/canvas/webgl/webgl-draw-buffers.html: Added.
* platform/mac-mountainlion/fast/canvas/webgl/webgl-draw-buffers-expected.txt: Added.
* platform/mac/TestExpectations:


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