[BlackBerry] Replace the three different rendering mechanisms for clearing the render queue
https://bugs.webkit.org/show_bug.cgi?id=94837

Patch by Adam Treat <atreat@rim.com> on 2012-08-23
Reviewed by George Staikos.

PR 197738

Currently, we have three different mechanisms for clearing the render queue.
The first mechanism is render on idle.  Whenever the webkit thread becomes idle
(read: no more events in its queue) we render the next job in the render queue.
 This is the primary means we use for clearing the render queue.  However, this
mechanism has a flaw, it is such a low priority mechanism that sometimes the
queue grows so fast due to higher priority events adding rects to the queue
that this mechanism can't possibly keep up.  That is what leads to the second
mechanism: rendering right before a timer is fired when we discover that the
render queue is under pressure and rendering on idle can't keep up.  However,
there are still degenerate cases where even this mechanism does not allow us to
keep up.  That brings us to the third mechanism: rendering based on a timer
that is a catch-all.

The second and third mechanisms lead to very large render jobs as they try and
clear the queue faster when it comes under pressure.  These very large render
jobs end up keeping the webkit thread busy with a message that can take large
fractions of a second to resolve.

These three mechanisms were put in place when the backingstore had a different
overall design that was not truly asynchronous.  This patch replaces these
three mechanisms with a single one that uses the platform messaging classes to
full purpose - a uniquely coalescing message that has a higher priority level
than timers making sure the render queue can never come under pressure.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::BackingStorePrivate):
(WebKit):
(RenderJobMessage):
(BlackBerry::WebKit::RenderJobMessage::RenderJobMessage):
(BlackBerry::WebKit::BackingStorePrivate::dispatchRenderJob):
(BlackBerry::WebKit::BackingStorePrivate::renderJob):
(BlackBerry::WebKit::BackingStore::blitContents):
* Api/BackingStore.h:
* Api/BackingStore_p.h:
(BackingStorePrivate):
* Api/WebPage.cpp:
* Api/WebPage.h:
* WebKitSupport/RenderQueue.cpp:
(BlackBerry::WebKit::RenderQueue::reset):
(BlackBerry::WebKit::RenderQueue::addToRegularQueue):
(BlackBerry::WebKit::RenderQueue::addToScrollZoomQueue):
(BlackBerry::WebKit::RenderQueue::clear):
(BlackBerry::WebKit::RenderQueue::clearVisibleZoom):
(BlackBerry::WebKit::RenderQueue::render):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove some unneeded cruft from WebCore.xcodeproj.

* WebCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] LayoutTests: css3/selector3/xml tests are flaky / have wrong expectations on Snow Leopard
https://bugs.webkit.org/show_bug.cgi?id=82122

Unreviewed Chromium gardening. Expanded expectations from Snow Leopard to Mac.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Trailing spaces in CSP source lists should not generate console warnings.
https://bugs.webkit.org/show_bug.cgi?id=94847

Patch by Mike West <mkwst@chromium.org> on 2012-08-23
Reviewed by Adam Barth.

Trailing space after a valid source in a Content Security Policy source
list was accidentally generating console warnings about an invalid
(empty) source. This patch silently ignores trailing whitespace instead.

Source/WebCore:

A test-case has been added to 'source-list-parsing-02.html' to cover
this case.

* page/ContentSecurityPolicy.cpp:
(WebCore::CSPSourceList::parse):
    Return early if we reach the end of the source list after skipping
    leading whitespace.

LayoutTests:

* http/tests/security/contentSecurityPolicy/source-list-parsing-02-expected.txt:
* http/tests/security/contentSecurityPolicy/source-list-parsing-02.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Adjust test expectations for fast/js/toString-overrides.html and fast/js/eval-cross-window.html
https://bugs.webkit.org/show_bug.cgi?id=94824

Patch by Ulan Degenbaev <ulan@chromium.org> on 2012-08-23
Reviewed by Kentaro Hara.

Add a bug number for tracking failing cases in fast/js/toString-overrides.html.
Upload Chromium specific test expectations for fast/js/eval-cross-window.html.

Failing tests in eval-cross-window swap the eval() function in the main window and the frame.
This behaviour is not specified in ECMA-262 and is probably implementation dependent.
Both Firefox and Chromium produce the same result for this test.

* platform/chromium/TestExpectations:
* platform/chromium/fast/js/eval-cross-window-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r124815): PDF in frame does not display any more
<rdar://problem/12063306> and https://bugs.webkit.org/show_bug.cgi?id=94869

Reviewed by Alexey Proskuryakov.

* WebProcess/Plugins/PDF/BuiltInPDFView.mm:
(WebKit::BuiltInPDFView::initialize): Tell the controller that initialization was successful.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSSParser: Move enumeration to a common place (StylePropertyShorthand)
https://bugs.webkit.org/show_bug.cgi?id=93210

Patch by Adenilson Cavalcanti <cavalcantii@gmail.com> on 2012-08-23
Reviewed by Dean Jackson.

CSSParser::parseAnimationShorthand() uses an enumeration with the same
elements as another enumeration present in StylePropertyShorthand, but
with different ordering of values. This patch puts both enums in the same place.

No new tests. No change in behavior.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseAnimationShorthand):
* css/StylePropertyShorthand.cpp:
(WebCore::webkitAnimationShorthandForParsing):
(WebCore):
* css/StylePropertyShorthand.h:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change behavior of MasqueradesAsUndefined to better accommodate DFG changes
https://bugs.webkit.org/show_bug.cgi?id=93884

Reviewed by Filip Pizlo.

Source/JavaScriptCore: 

With some upcoming changes to the DFG to remove uses of ClassInfo, we will be changing the behavior of  
MasqueradesAsUndefined. In order to make this change consistent across all of our execution engines,  
we will make this change to MasqueradesAsUndefined as a separate patch. After this patch, MasqueradesAsUndefined  
objects will only masquerade as undefined in their original context (i.e. their original JSGlobalObject).  
For example, if an object that masquerades as undefined in frame A is passed to frame B, it will not  
masquerade as undefined within frame B, but it will continue to masquerade in frame A. 

There are two primary changes that are taking place here. One is to thread the ExecState* through  
JSValue::toBoolean and JSCell::toBoolean so that JSCell::toBoolean can check the object's  
JSGlobalObject to compare it to the lexical JSGlobalObject of the currently running code. If the two  
are distinct, then the object cannot MasqueradeAsUndefined. 

The other change is to perform this comparison of JSGlobalObjects everywhere where the MasqueradesAsUndefined 
flag in the Structure is checked. For C++ code, this check has been factored into its own function in  
Structure::masqueradesAsUndefined. We only perform this check in the DFG if the current JSGlobalObject has  
had a MasqueradesAsUndefined object allocated within its context. This conditional compilation is managed  
through the use of a WatchpointSet in each JSGlobalObject and alternate create() functions for JS DOM wrappers 
that are MasqueradesAsUndefined.

* API/JSValueRef.cpp:
(JSValueToBoolean):
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* bytecode/Watchpoint.h:
(WatchpointSet):
* debugger/DebuggerCallFrame.h:
(JSC::DebuggerCallFrame::callFrame):
* dfg/DFGAbstractState.cpp:
(JSC::DFG::AbstractState::execute):
* dfg/DFGCFGSimplificationPhase.cpp:
(JSC::DFG::CFGSimplificationPhase::run):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::compile):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncFilter):
(JSC::arrayProtoFuncEvery):
(JSC::arrayProtoFuncSome):
* runtime/BooleanConstructor.cpp:
(JSC::constructBoolean):
(JSC::callBooleanConstructor):
* runtime/JSCell.h:
(JSCell):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::JSGlobalObject):
* runtime/JSGlobalObject.h:
(JSGlobalObject):
(JSC::JSGlobalObject::masqueradesAsUndefinedWatchpoint):
* runtime/JSString.h:
(JSC::JSCell::toBoolean):
(JSC::JSValue::toBoolean):
* runtime/JSValue.h:
* runtime/ObjectConstructor.cpp:
(JSC::toPropertyDescriptor):
* runtime/Operations.cpp:
(JSC::jsTypeStringForValue):
(JSC::jsIsObjectType):
* runtime/Operations.h:
(JSC):
(JSC::JSValue::equalSlowCaseInline):
* runtime/RegExpConstructor.cpp:
(JSC::setRegExpConstructorMultiline):
* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncToString):
* runtime/Structure.h:
(Structure):
(JSC::Structure::globalObjectOffset):
(JSC::Structure::masqueradesAsUndefined):
(JSC):

Source/WebCore: 

With some upcoming changes to the DFG to remove uses of ClassInfo, we will be changing the behavior of  
MasqueradesAsUndefined. In order to make this change consistent across all of our execution engines,  
we will make this change to MasqueradesAsUndefined as a separate patch. After this patch, MasqueradesAsUndefined  
objects will only masquerade as undefined in their original context (i.e. their original JSGlobalObject).  
For example, if an object that masquerades as undefined in frame A is passed to frame B, it will not  
masquerade as undefined within frame B, but it will continue to masquerade in frame A. 

Test: fast/js/document-all-between-frames.html

All of the changes in WebCore are simply passing the additional ExecState argument to JSValue::toBoolean. 

* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
(WebCore::JSSQLStatementErrorCallback::handleEvent):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::addEventListener):
(WebCore::JSDOMWindow::removeEventListener):
* bindings/js/JSDataViewCustom.cpp:
(WebCore::getDataViewMember):
* bindings/js/JSDeviceMotionEventCustom.cpp:
(WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
* bindings/js/JSDeviceOrientationEventCustom.cpp:
(WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSHTMLCanvasElementCustom.cpp:
(WebCore::JSHTMLCanvasElement::getContext):
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::populateContextMenuItems):
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::dataFunctionMatrix):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::open):
* bindings/js/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::exec):
(WebCore):
* bindings/js/JavaScriptCallFrame.h:
(JavaScriptCallFrame):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::hasBreakpoint):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpIfTerminal):
* bindings/scripts/CodeGeneratorJS.pm: Also add the custom create function for MasqueradesAsUndefined JS DOM wrappers. 
(GenerateEventListenerCall):
(GenerateHeader):
(JSValueToNative):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionAddEventListener):
(WebCore::jsTestEventTargetPrototypeFunctionRemoveEventListener):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::create):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjCreate):
(WebCore::setJSTestObjReflectedBooleanAttr):
(WebCore::setJSTestObjReflectedCustomBooleanAttr):
(WebCore::jsTestObjPrototypeFunctionAddEventListener):
(WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
* bridge/c/c_utility.cpp:
(JSC::Bindings::convertValueToNPVariant):
* bridge/jni/jni_jsobject.mm:
(JavaJSObject::convertValueToJObject):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::convertValueToQVariant):

Source/WebKit/mac: 

With some upcoming changes to the DFG to remove uses of ClassInfo, we will be changing the behavior of  
MasqueradesAsUndefined. In order to make this change consistent across all of our execution engines,  
we will make this change to MasqueradesAsUndefined as a separate patch. After this patch, MasqueradesAsUndefined  
objects will only masquerade as undefined in their original context (i.e. their original JSGlobalObject).  
For example, if an object that masquerades as undefined in frame A is passed to frame B, it will not  
masquerade as undefined within frame B, but it will continue to masquerade in frame A. 

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::addValueToArray): Passing ExecState to toBoolean call.

Source/WebKit2: 

With some upcoming changes to the DFG to remove uses of ClassInfo, we will be changing the behavior of  
MasqueradesAsUndefined. In order to make this change consistent across all of our execution engines,  
we will make this change to MasqueradesAsUndefined as a separate patch. After this patch, MasqueradesAsUndefined  
objects will only masquerade as undefined in their original context (i.e. their original JSGlobalObject).  
For example, if an object that masquerades as undefined in frame A is passed to frame B, it will not  
masquerade as undefined within frame B, but it will continue to masquerade in frame A.

* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant): Passing ExecState to toBoolean call.

LayoutTests: 

Added a test that uses a variety of ways of checking whether something is correctly 
masquerading as undefined (or not) in a subframe.

* fast/js/document-all-between-frames-expected.txt: Added.
* fast/js/document-all-between-frames.html: Added.
* fast/js/resources/document-all-between-frames-subframe.html: Added.
* platform/chromium/TestExpectations: Chromium treats document.all differently, so skip our new test.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove RenderTable::removeChild
https://bugs.webkit.org/show_bug.cgi?id=94842

Reviewed by Abhishek Arya.

This change removed removeChild, replaced by willBeRemovedFromTree calls. The upside is that
the invalidations are now guaranteed to run if we split a table (which is not guaranteed when
using removeChild). This change also shows that our code may be doing too much work in some
of the child's removal, in which case the code was marked as needed.

Covered by existing tests.

* rendering/RenderTable.cpp:
(WebCore::RenderTable::removeCaption):
Helper function used to remove the caption from our Vector. The invalidation are very likely
unneeded so added a comment about that.

* rendering/RenderTable.h:
* rendering/RenderTableCaption.cpp:
(WebCore::RenderTableCaption::willBeRemovedFromTree):
(WebCore::RenderTableCaption::table):
* rendering/RenderTableCaption.h:
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::willBeRemovedFromTree):
* rendering/RenderTableCol.h:
Added the following functions to do the invalidation.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Focusable elements without a role should not be ignored
https://bugs.webkit.org/show_bug.cgi?id=94302

Reviewed by Chris Fleizach.

Source/WebCore:

Changes the accessibility logic so that a generic element that's focusable is
not ignored for accessibility, and returns its inner text as its title. That way
if you Tab to the element, a reasonable accessibility notification is generated.

One exception is the body element, because focusing the body is equivalent to
blurring the current focused element and does not result in a "focus" accessibility
notification.

Also fixes logic that determined if an element was contentEditable by making
sure it catches the case with no attribute value (e.g. <div contentEditable>),
which also implies contentEditable=true according to the spec.

Test: accessibility/focusable-div.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore):
(WebCore::nodeHasContentEditableAttributeSet):
(WebCore::AccessibilityRenderObject::title):
(WebCore::AccessibilityRenderObject::accessibilityIsIgnored):

LayoutTests:

Adds a new test to make sure that a generic focusable element (like a div with tabindex=0)
can get focus and return an appropriate title, just like a form control or element with
an ARIA role.

Modifies three existing tests that were previously assuming that a focusable node
with no role would be ignored for accessibility ("accessibilityIsIgnored").

* accessibility/editable-webarea-context-menu-point.html:
* accessibility/focusable-div-expected.txt: Added.
* accessibility/focusable-div.html: Added.
* accessibility/table-detection.html:
* platform/mac/accessibility/listbox-hit-test.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replay tests take forever to load
https://bugs.webkit.org/show_bug.cgi?id=94764

Reviewed by Adam Barth.

Don't load about:blank at the beginning. This appears to clog the DRT.

* Scripts/webkitpy/performance_tests/perftest.py:
(ReplayPerfTest.run_single):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove WebLayer::setChildren API
https://bugs.webkit.org/show_bug.cgi?id=94749

Reviewed by Adrienne Walker.

Source/Platform:

This is redundant with removeAllChildren() / addChild() and less efficient.

* chromium/public/WebLayer.h:
(WebLayer):

Source/WebCore:

Sets up the child list directly instead of building an intermediate buffer. Covered by compositing/*

* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::updateChildList):

Source/WebKit/chromium:

* src/WebLayer.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Chromium gardening. Generalized a few Snow Leopard-only
expectations to Mac in order to get the new Lion bot green.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] ScriptValue should use ScopedPresistent rather than calling New/Dispose directly
https://bugs.webkit.org/show_bug.cgi?id=94864

Reviewed by Eric Seidel.

ScriptValue was created before ScopedPersistent existed and therefore
calls New/Dispose manually. Instead, it should use the less error-prone
approach of having ScopedPersistent balance those calls.

* bindings/v8/ScriptValue.cpp:
(WebCore::ScriptValue::serialize):
(WebCore::ScriptValue::getString):
(WebCore::ScriptValue::toString):
(WebCore::ScriptValue::toInspectorValue):
* bindings/v8/ScriptValue.h:
(WebCore::ScriptValue::ScriptValue):
(WebCore::ScriptValue::operator=):
(WebCore::ScriptValue::operator==):
(WebCore::ScriptValue::isEqual):
(WebCore::ScriptValue::isFunction):
(WebCore::ScriptValue::isNull):
(WebCore::ScriptValue::isUndefined):
(WebCore::ScriptValue::isObject):
(WebCore::ScriptValue::hasNoValue):
(WebCore::ScriptValue::clear):
(WebCore::ScriptValue::v8Value):
(ScriptValue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Don't require a RenderSurface* in order to create a RenderPass
https://bugs.webkit.org/show_bug.cgi?id=94862

Reviewed by Adrienne Walker.

Source/WebCore:

If a test wants to create a RenderPass, they are required to create a
Layer, and a RenderSurface. This is not ideal, we should let tests
create RenderPasses more simply by giving the information that it needs.

This also helps us recreate the RenderPasses after receiving a copy
via IPC.

* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
* platform/graphics/chromium/cc/CCRenderPass.cpp:
(WebCore::CCRenderPass::create):
(WebCore::CCRenderPass::CCRenderPass):
* platform/graphics/chromium/cc/CCRenderPass.h:
(CCRenderPass):

Source/WebKit/chromium:

* tests/CCLayerTreeHostImplTest.cpp:
* tests/CCRendererGLTest.cpp:
(FakeCCRendererClient::FakeCCRendererClient):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] ScriptState is using stone knifes and bear skins
https://bugs.webkit.org/show_bug.cgi?id=94846

Reviewed by Eric Seidel.

This patch just modernizes ScriptState to use some of the newer tools
available in the V8 bindings. There shouldn't be any behavior changes.

* bindings/v8/ScriptState.cpp:
(WebCore::ScriptState::ScriptState):
(WebCore::ScriptState::~ScriptState):
(WebCore::ScriptState::domWindow):
(WebCore::ScriptState::scriptExecutionContext):
(WebCore::ScriptState::forContext):
(WebCore::ScriptState::current):
* bindings/v8/ScriptState.h:
(WebCore):
(WebCore::ScriptState::context):
(ScriptState):
(WebCore::ScriptStateProtectedPtr::ScriptStateProtectedPtr):
(ScriptStateProtectedPtr):
* bindings/v8/V8Binding.cpp:
(WebCore::toScriptExecutionContext):
(WebCore):
* bindings/v8/V8Binding.h:
(WebCore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix cross-direction stretch for replaced elements in column flexbox
https://bugs.webkit.org/show_bug.cgi?id=94604

Patch by Shezan Baig <shezbaig.wk@gmail.com> on 2012-08-23
Reviewed by Ojan Vafai.

Source/WebCore:

Moved the logic that constrains logical width by MinSize and MaxSize to
a new helper function called constrainLogicalWidthInRegionByMinMax.
This helper function is used from both computeLogicalWidthInRegion and
RenderFlexibleBox::applyStretchAlignmentToChild.

RenderFlexibleBox no longer checks for isMultiline when stretching
elements in a column flexbox. Instead, we now constrain the available
width by the child's min-width and max-width, and set the override
width only if that constrained width is different from the child's
current logicalWidth.

No new tests. The existing css3/flexbox/flexitem.html test was extended
to exercise the new code.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax): New helper
method to constrain logical width by min-width and max-width.
(WebCore):
(WebCore::RenderBox::computeLogicalWidthInRegion): Changed to use the
new constrainLogicalWidthInRegionByMinMax helper method.
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Changed to
use constrainLogicalWidthInRegionByMinMax to determine the override
width for the child.

LayoutTests:

Fixed failing test cases. Add tests for min/max width/height.

* css3/flexbox/flexitem-expected.txt:
* css3/flexbox/flexitem.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Add a check to filter out cookies that tries to set the domain to a top level domain
https://bugs.webkit.org/show_bug.cgi?id=94722

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-08-23
Reviewed by Rob Buis.

Changing the topleveldomain method name for better readability.

Also renaming the TopLevelDomain.h in platform to DomainTools
because there exists other tests that should belong in the same file.

Only changing method names and include file names.

* platform/blackberry/CookieParser.cpp:
(WebCore::CookieParser::parseOneCookie):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Autogenerate Opcode definitions
https://bugs.webkit.org/show_bug.cgi?id=94840

Reviewed by Gavin Barraclough.

Start the process of autogenerating the code emission for the bytecode.
We'll just start with automatic generation of the list of Opcodes as that
requires the actual definition of the opcodes, and the logic for parsing
them.

Due to some rather annoying dependency cycles, this initial version has
the OpcodeDefinitions.h file checked into the tree, although with some
work I hope to be able to fix that.

* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/Opcode.h:
  Include OpcodeDefinitions.h as our definitive source of info
  about the opcodes.
* bytecode/OpcodeDefinitions.h: Added.
  Autogenerated file
* bytecode/opcodes: Added.
  The new opcode definition file
* opcode_definition_generator.py: Added.
(generateOpcodeDefinition):
(generate):
  Module that generates the content for OpcodeDefinitions.h
* opcode_generator.py: Added.
(printUsage):
(main):
  Driver script
* opcode_parser.py: Added.
  Simple parser for the opcode definitions.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Remove V8Proxy.{h,cpp}
https://bugs.webkit.org/show_bug.cgi?id=94794

Reviewed by Dimitri Glazkov.

Now V8Proxy is no longer used. We can completely remove V8Proxy from the codebase.

No tests. No change in behavior.

Source/WebCore:

* UseV8.cmake:
* WebCore.gypi:
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateImplementation):
(GenerateCallbackImplementation):
* bindings/scripts/test/V8/V8Float64Array.cpp:
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
* bindings/scripts/test/V8/V8TestCallback.cpp:
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
* bindings/scripts/test/V8/V8TestException.cpp:
* bindings/scripts/test/V8/V8TestInterface.cpp:
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
* bindings/scripts/test/V8/V8TestNode.cpp:
* bindings/scripts/test/V8/V8TestObj.cpp:
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::ScriptController):
(WebCore::ScriptController::~ScriptController):
(WebCore::ScriptController::callFunction):
(WebCore::ScriptController::clearWindowShell):
* bindings/v8/ScriptController.h:
(WebCore):
(ScriptController):
* bindings/v8/V8AbstractEventListener.h:
(WebCore):
* bindings/v8/V8Binding.cpp:
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::reportFatalErrorInV8):
* bindings/v8/V8DOMWrapper.h:
(WebCore):
* bindings/v8/V8ObjectConstructor.cpp:
(WebCore::V8ObjectConstructor::newInstanceInDocument):
* bindings/v8/V8Proxy.cpp: Removed.
* bindings/v8/V8Proxy.h: Removed.
* bindings/v8/V8RecursionScope.h:
(WebCore):
* bindings/v8/V8Utilities.cpp:
* bindings/v8/custom/V8CustomXPathNSResolver.h:

Source/WebKit/chromium:

* src/ChromeClientImpl.cpp:
* src/WebBindings.cpp:
* src/WebDOMMessageEvent.cpp:
* src/WebDevToolsAgentImpl.cpp:
* src/WebMediaPlayerClientImpl.cpp:

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